:root {
  --card: #ffffff;
  --navy: #0b2235;
  --gold: #c0a060;
  --accent: #14344d;
  --accent-dark: #0b2235;
  --danger: #b3402e;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 6px 18px -8px rgba(16, 24, 40, .16);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, .06), 0 18px 38px -14px rgba(16, 24, 40, .30);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

/* ---------- top bar ---------- */
#topbar {
  display: flex; align-items: center; gap: 24px;
  padding: 0 24px; height: 58px;
  position: sticky; top: 0; z-index: 50;
}
.brand { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; letter-spacing: .2px; }
.brand .topbar-logo { height: 46px; width: auto; display: block; }
.brand-product { text-transform: uppercase; white-space: nowrap; padding: 4px 12px 0; display: flex; align-items: center; gap: 7px; letter-spacing: .14em; }
.brand-mark { height: 20px; width: auto; display: block; }
.brand-product + .nav-sec { padding-top: 3px; }
#topbar nav { display: flex; gap: 6px; margin-left: 8px; }
.navbtn {
  background: transparent; border: 0; color: #cdd5e0;
  padding: 8px 14px; border-radius: 7px; cursor: pointer; font-size: 14px;
}
.navbtn:hover { background: rgba(255,255,255,.08); color: #fff; }
.navbtn.active { background: rgba(192,160,96,.22); color: #fff; box-shadow: inset 0 -2px 0 var(--gold); }
.userbox { margin-left: auto; display: flex; align-items: center; gap: 12px; font-size: 13px; }
.btn-ghost { background: transparent; border: 1px solid rgba(255,255,255,.25); color: #fff; }

/* ---------- buttons ---------- */
.btn {
  border: 0; border-radius: 8px; padding: 9px 16px;
  font-size: 14px; font-weight: 600; cursor: pointer;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-primary:disabled { opacity: .6; cursor: default; }
.btn-ghost {
  background: transparent; border: 1px solid var(--line);
  color: var(--ink); font-weight: 500;
}
.btn-ghost:hover { background: #eef1f6; }
.btn-block { width: 100%; margin-top: 6px; }

/* ---------- layout ---------- */
#app { max-width: 1180px; margin: 0 auto; padding: 28px 24px 60px; }
.view.hidden, .hidden { display: none !important; }
.muted { font-size: 13px; margin: 0; }
.error { color: var(--danger); font-size: 13px; }
.empty { color: var(--muted); padding: 36px 0; text-align: center; }

/* ---------- login (split screen, Billdr-style) ---------- */
#view-login, #view-set-password {
  width: 100vw; margin-left: calc(50% - 50vw);
  margin-top: -28px; margin-bottom: -60px;
}
.auth-split {
  display: grid; grid-template-columns: 1.05fr 1fr;
  min-height: 100vh;
}
.auth-brand {
  background: var(--navy); color: #fff;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 56px 48px; text-align: center;
}
.auth-brand img { width: min(520px, 100%); height: auto; display: block; }
/* Rookery brand pass (2026-10-19): the login brand panel is the sunset
 * artwork itself — lockup + tagline are baked into the image. */
.auth-brand.rookery-login { background: #1c0b38 url("login-panel-sunset.jpg") center 20% / cover no-repeat; }
.auth-brand.rookery-login > * { display: none; }
.auth-tagline {
  font-family: Georgia, "Times New Roman", serif; font-size: 21px;
  color: #ece5d3; margin: 30px 0 0; letter-spacing: .3px;
}
.auth-product {
  color: var(--gold); font-size: 12px; font-weight: 700;
  letter-spacing: 2.5px; text-transform: uppercase; margin: 14px 0 0;
}
.auth-formside {
  background: #fff; display: flex; align-items: center; justify-content: center;
  padding: 48px 32px;
}
.login-card {
  width: 360px; background: var(--card); border: 1px solid var(--line);
  border-radius: 14px; padding: 32px 28px; box-shadow: var(--shadow);
}
.auth-card { border: 0; box-shadow: none; width: 380px; max-width: 100%; padding: 8px; }
.auth-h { font-size: 26px; margin: 0 0 6px; }
.login-sub { color: var(--muted); font-size: 13px; margin: 6px 0 22px; }
.login-forgot { margin: 16px 0 0; text-align: center; }
/* Login form — the Rookery sample (brand fix pass, 2026-10-19):
 * icon fields, the keep-signed-in row, the divider, Google button. */
.auth-input { display: block; } /* Login fix (2026-10-19): no icons inside the fields — clean typing areas, like other logins. The old icon rule also lost the cascade: .login-card input's padding shorthand overrode the 42px left pad at equal specificity, so the text sat on the icon. */
.auth-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 2px 0 14px; }
.auth-keep { display: flex !important; align-items: center; gap: 8px; margin: 0 !important; font-weight: 500 !important; font-size: 13.5px; white-space: nowrap; flex: none; cursor: pointer; }
.auth-keep input { width: 16px; height: 16px; margin: 0; padding: 0; display: inline-block; accent-color: var(--gold); }
.auth-divider { display: flex; align-items: center; gap: 12px; margin: 18px 0 14px; color: var(--muted); font-size: 13px; }
.auth-divider::before, .auth-divider::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.auth-google, .auth-microsoft { width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 11px 12px; font-size: 15px; font-weight: 600; color: #22314a; cursor: pointer; }
.auth-google:hover, .auth-microsoft:hover { background: #f6f8fb; }
.auth-google svg, .auth-microsoft svg { width: 18px; height: 18px; flex: none; }
.auth-microsoft { margin-top: 10px; }
.auth-note { font-size: 13px; color: var(--muted); text-align: center; margin: 10px 0 0; }
/* Sidebar brand — the Rookery stacked lockup (brand fix pass,
 * 2026-10-19): bird over ROOKERY, the tenant name beneath. Every
 * frame is dark (violet / navy / black), so the lockup is white. */
#topbar .brand { align-items: center; text-align: center; padding-top: 10px; }
.brand-lockup-img { width: 148px; max-width: 80%; height: auto; display: block; }
.linkbtn { background: none; border: none; padding: 0; color: var(--royal); font-size: 13px; cursor: pointer; text-decoration: underline; }
.login-card label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 14px; }
.login-card input {
  display: block; width: 100%; margin-top: 6px; padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 15px;
}
.login-card input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.btn-primary { border-bottom: 2px solid var(--gold); }

/* ---------- cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 18px; }
.card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  overflow: hidden; cursor: pointer; box-shadow: var(--shadow);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c9d4e2; }
.card .thumb { width: 100%; aspect-ratio: 16/9; object-fit: cover; background: #dfe4ec; display: block; }
.card .thumb-placeholder {
  width: 100%; aspect-ratio: 16/10; background: linear-gradient(135deg, #dfe4ec, #c9d2e0);
  display: flex; align-items: center; justify-content: center; color: #8a94a6; font-size: 13px;
}
.card .body { padding: 12px 14px 14px; }
.card .title { font-weight: 700; font-size: 15px; margin: 0 0 4px; }
.card .sub { color: var(--muted); font-size: 12.5px; margin: 0; line-height: 1.5; }
.pill {
  display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .4px; padding: 3px 8px; border-radius: 20px; margin-top: 8px;
  background: #e8eef5; color: #44506a;
}
.pill.green { background: #dff3e7; color: var(--accent-dark); }

/* ---------- tabs ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 2px solid var(--line); margin-bottom: 18px; }
.tab {
  background: none; border: 0; padding: 10px 16px; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px;
}
.tab:hover { color: var(--ink); }

/* ---------- project module bar (PM alignment) ---------- */
.modbar { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.mod-door {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--card); border: 1.5px solid var(--line); border-radius: 10px;
  padding: 8px 13px; font: inherit; cursor: pointer; color: var(--muted);
  box-shadow: var(--shadow);
}
.mod-door:hover { color: var(--ink); border-color: #c6cfdd; }
.mod-door.active { color: var(--ink); border-color: var(--gold); box-shadow: inset 0 -3px 0 var(--gold), var(--shadow); }
.mod-ico { font-size: 16px; line-height: 1; }
.mod-name { font-weight: 700; font-size: 14px; }
.mod-count { font-size: 12px; font-weight: 600; background: #eef1f6; color: #55617a; border-radius: 9px; padding: 1px 8px; white-space: nowrap; }
.mod-door.active .mod-count { background: #f6ecd2; color: #7c5e10; }

/* ---------- module content bits ---------- */
.pill.red { background: #fbe7e1; color: var(--danger); }
.pill.grey { background: #e8ebf0; color: #66707f; }
.pill.gold { background: #f6ecd2; color: #7c5e10; }
.tag-gold { background: #f6ecd2; color: #7c5e10; font-weight: 700; }
.due-overdue { color: var(--danger); font-weight: 700; }
.attn {
  background: #fdf8ea; border: 1px solid #ecd28a; border-radius: var(--radius);
  padding: 10px 14px; margin-bottom: 16px; box-shadow: var(--shadow);
}
.attn p { margin: 2px 0; font-size: 14px; }
.attn button { font: inherit; font-weight: 700; color: var(--accent-dark); background: none; border: 0; padding: 0; cursor: pointer; text-decoration: underline; }
button.stat-tile { text-align: left; font: inherit; cursor: pointer; }
button.stat-tile:hover { border-color: var(--gold); }
.mod-h { font-size: 16px; margin: 22px 0 10px; }
.mod-h:first-child { margin-top: 0; }
.task-hist { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 8px; }
.task-hist p { font-size: 12.5px; color: var(--muted); margin: 3px 0; }
.proof-thumb { width: 46px; height: 46px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); cursor: zoom-in; flex: none; }
.ci-check { flex: none; width: 26px; text-align: center; font-size: 16px; }
/* Wave 2 chunk 4.9: checklist ticks + the Add-checklist chooser */
.ci-toggle { flex: none; width: 26px; text-align: center; font-size: 16px; display: inline-flex; align-items: center; justify-content: center; background: none; border: 0; padding: 2px 0; cursor: pointer; color: inherit; border-radius: 6px; }
.ci-toggle:hover { background: #eef1f6; }
.ci-toggle:disabled { opacity: .5; cursor: default; }
.cl-choice { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink); cursor: pointer; }
.cl-choice:hover { border-color: var(--gold); }
.cl-choice:disabled { opacity: .6; cursor: default; }
.cl-additem { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 8px 0 18px; }
.cl-additem input { flex: 1 1 220px; padding: 8px 11px; border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px; color: var(--ink); background: #fff; }
.cl-additem input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.ci-done-label { color: var(--muted); }
.floor-thumb { width: 100%; aspect-ratio: 16/10; object-fit: contain; background: #eef1f6; display: block; }

/* ---------- photo grid ---------- */
.photogrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.photogrid .ph { position: relative; cursor: zoom-in; border-radius: 10px; overflow: hidden; border: 1px solid var(--line); background: #dfe4ec; transition: transform .12s ease, box-shadow .12s ease; }
.photogrid .ph:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.photogrid img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.photogrid .badge {
  position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700;
  background: rgba(20,28,40,.78); color: #fff; padding: 3px 8px; border-radius: 6px;
}
.photogrid .badge.video { background: rgba(32,80,160,.9); }

/* ---------- timeline ---------- */
.filterbar {
  display: flex; gap: 16px; flex-wrap: wrap; align-items: end;
  padding: 14px 16px; margin-bottom: 8px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.filterbar label { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .4px; }
.filterbar select {
  display: block; margin-top: 5px; padding: 8px 10px; min-width: 170px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 14px; color: var(--ink); background: #fff;
}
.filterbar select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.tl-day {
  position: sticky; top: 0; z-index: 5;
  margin: 26px 0 12px; padding: 8px 2px; font-size: 16px;
  background: var(--bg); border-bottom: 2px solid var(--gold);
}
.tl-cell { min-width: 0; }
.tl-cell .ph { position: relative; cursor: zoom-in; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: #dfe4ec; }
.tl-cell .ph img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.tl-cap { color: var(--muted); font-size: 12px; margin: 6px 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.photogrid .badge.qm { background: rgba(11,34,53,.85); color: var(--gold); }

/* ---------- tables / lists ---------- */
.list { display: flex; flex-direction: column; gap: 10px; }
.row {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; display: flex; gap: 14px; align-items: center; box-shadow: var(--shadow);
}
.row.clickable { cursor: pointer; }
.row.clickable:hover { border-color: var(--accent); }
.row .grow { flex: 1; min-width: 0; }
.row .t { font-weight: 700; font-size: 14px; margin: 0 0 2px; }
.row .s { color: var(--muted); font-size: 12.5px; margin: 0; }
.row .val { font-weight: 800; font-size: 16px; color: var(--accent-dark); white-space: nowrap; }
.tag { font-size: 11px; background: #eef1f6; border-radius: 4px; padding: 2px 6px; color: #55617a; margin-right: 4px; }

/* ---------- walkthrough areas ---------- */
.area { margin-bottom: 22px; }
.area > h3 { margin: 0 0 10px; font-size: 17px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
.entry {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 16px; margin-bottom: 10px; box-shadow: var(--shadow);
}
.entry .note { margin: 0 0 6px; font-size: 14px; }
.entry .meta { color: var(--muted); font-size: 12px; margin: 0 0 8px; }
.entry .photogrid { margin-top: 8px; }

/* ---------- lightbox ---------- */
#lightbox { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; }
.lb-backdrop { position: absolute; inset: 0; background: rgba(10, 15, 25, .82); }
.lb-panel {
  position: relative; width: min(1060px, 94vw); max-height: 92vh; overflow: auto;
  background: #101826; display: flex; flex-direction: column;
}
.lb-x {
  position: absolute; top: 8px; right: 12px; z-index: 2; background: rgba(255,255,255,.12);
  border: 0; color: #fff; font-size: 26px; width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
}
.lb-media { display: flex; align-items: center; justify-content: center; background: #000; min-height: 300px; }
.lb-media img, .lb-media video { max-width: 100%; max-height: 66vh; display: block; }
.lb-info { color: #dbe2ee; }
.lb-info h3 { margin: 0 0 8px; color: #fff; }
.lb-info dl { display: grid; grid-template-columns: 130px 1fr; gap: 4px 12px; margin: 0; }
.lb-info dt { color: #8fa0b8; }
.lb-info dd { margin: 0; }
.lb-info .audio-row { margin-top: 10px; }
.lb-info audio { width: 100%; margin-top: 6px; }

@media (max-width: 860px) {
  .auth-split { grid-template-columns: 1fr; min-height: 0; }
  .auth-brand { padding: 32px 24px 26px; }
  .auth-brand img { width: min(340px, 100%); }
  .auth-tagline { font-size: 17px; margin-top: 18px; }
  .auth-formside { padding: 28px 18px 44px; }
  #view-login, #view-set-password { margin-top: -18px; margin-bottom: -50px; }
  /* wave115-resp (2026-10-25) — the login card's fixed 380px floored the
   * split grid's column, so phones under ~416px scrolled sideways on the
   * sign-in screen (probe: layout width stuck at 416 from 320–412).
   * Let the panes shrink below content size and the card go fluid. */
  .auth-split, .auth-brand, .auth-formside { min-width: 0; }
  .auth-formside .login-card { width: 100%; max-width: 380px; }
}

@media (max-width: 640px) {
  #app { padding: 18px 14px 50px; }
  #topbar { padding: 0 14px; gap: 12px; }
  .brand-product { display: none; }
  .brand .topbar-logo { height: 36px; }
  .userbox #user-email { display: none; }
  .lb-info dl { grid-template-columns: 1fr; }
}

/* ---------- login on phones (wave45-login, 2026-10-21) ----------
 * Micheal, on his iPhone: the sign-in page "looks wrong... doesn't
 * fit the screen." Causes, all in the rules above:
 *  1. The brand panel. .auth-brand.rookery-login hides every child
 *     (the lockup is baked into the sunset art) and cover-fits that
 *     PORTRAIT art (668x1086). Stacked at <=860px the panel's height
 *     collapses to its padding (58px), so the phone showed a thin
 *     cover-cropped sliver of the art — sky and a giant cropped R —
 *     and no logo at all. Below, small screens get the contained
 *     white lockup on the deep-violet brand field instead; the
 *     sunset panel above 860px is untouched.
 *  2. .auth-h never stepped down (26px at every width).
 *  3. .login-card input is 15px — under iOS Safari's 16px auto-zoom
 *     threshold, so tapping a field zoomed the page off-fit.
 * Hardening: the views' full-bleed uses width:100vw + a 50vw margin
 * term, which turns any viewport/scrollbar mismatch into horizontal
 * overflow; on small screens the breakout uses negative margins
 * matched to #app's side padding instead (the same trick the
 * top/bottom margins already use). */
.auth-mobile-mark { display: none; }
.auth-pass { position: relative; }
.login-card .auth-pass input { padding-right: 48px; }
.auth-eye {
  position: absolute; right: 6px; top: calc(50% + 3px); transform: translateY(-50%);
  width: 38px; height: 38px; padding: 0; display: flex; align-items: center; justify-content: center;
  background: none; border: 0; border-radius: 8px; color: #66707f; cursor: pointer;
}
.auth-eye:hover { color: var(--ink); background: #f0f3f7; }
.auth-eye:focus-visible { outline: 2px solid var(--gold); outline-offset: 1px; }
.auth-eye svg { width: 20px; height: 20px; display: block; }
.auth-eye .ic-off { display: none; }
.auth-eye.on .ic-on { display: none; }
.auth-eye.on .ic-off { display: block; }

@media (max-width: 860px) {
  #view-login, #view-set-password { width: auto; margin-left: -24px; margin-right: -24px; }
  #view-login .auth-brand.rookery-login, #view-set-password .auth-brand.rookery-login {
    background: #2A095E; padding: 26px 24px 22px;
  }
  #view-login .auth-brand.rookery-login > .auth-mobile-mark,
  #view-set-password .auth-brand.rookery-login > .auth-mobile-mark {
    display: block; width: min(168px, 56%); height: auto;
  }
  #view-login .login-card input, #view-set-password .login-card input { font-size: 16px; }
}

@media (max-width: 640px) {
  #view-login, #view-set-password { margin-left: -14px; margin-right: -14px; }
  #view-login .auth-h, #view-set-password .auth-h { font-size: 23px; line-height: 1.25; }
}

/* ---------- room plans ---------- */
.card .plan-thumb { object-fit: contain; background: #fff; padding: 6px; }
.plan-cols { display: grid; grid-template-columns: minmax(0, 7fr) minmax(280px, 5fr); gap: 22px; align-items: start; }
@media (max-width: 860px) { .plan-cols { grid-template-columns: 1fr; } }
.plan-stage {
  position: relative; background: #fff; border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow-lg); overflow: hidden;
}
.plan-stage > img { width: 100%; display: block; }
.plan-pin {
  position: absolute; transform: translate(-50%, -50%);
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--gold); color: #101826; border: 2px solid #fff;
  font-size: 13px; font-weight: 800; cursor: pointer;
  box-shadow: 0 1px 4px rgba(16,24,40,.4); padding: 0; line-height: 1;
}
.plan-pin:hover { background: var(--navy); color: #fff; }
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.stat-tile {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 12px 14px; box-shadow: var(--shadow);
}
.stat-v { font-size: 19px; font-weight: 800; color: var(--accent-dark); margin: 0 0 2px; }
.stat-l { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .4px; color: var(--muted); margin: 0; }
.plan-h { font-size: 15px; margin: 20px 0 8px; }
table.mini { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
table.mini th, table.mini td { text-align: left; padding: 8px 12px; font-size: 13px; border-bottom: 1px solid var(--line); }
table.mini th { background: #eef1f6; color: #44506a; font-size: 11.5px; text-transform: uppercase; letter-spacing: .4px; }
table.mini tr:last-child td { border-bottom: 0; }
.wall-chip {
  display: inline-block; min-width: 26px; text-align: center;
  background: var(--navy); color: var(--gold); font-weight: 800; font-size: 12.5px;
  border-radius: 6px; padding: 2px 7px;
}

/* ---------- login phone band art (wave47-loginart, 2026-10-21) ----------
 * Micheal approved the phone-shaped sunset band (2026-10-21 19:34):
 * the desktop panel's scene recomposed wide at 1560x720 (13:6) with
 * the white lockup already centred in the art, deployed beside this
 * file as login-phone-band.jpg (an optimised derivative of the PNG
 * master — 192 KB against 1.5 MB). At <=860px the brand panel becomes
 * that band: its box takes the art's own aspect ratio, so the cover
 * fit crops nothing at any phone width (a 360px-wide box stands
 * 360 x 6/13 = 166px tall, exactly the art's scaled height; 430px ->
 * 198px, same ratio). The wave45 lockup img is display:none in this
 * treatment — the lockup is in the art, and showing both would double
 * it; the img stays in the DOM, and the wave45 block above is left
 * untouched: this block wins by standing later at equal specificity.
 * The deep violet remains the background colour under the image, so
 * a failed image load still shows the brand field. Desktop (>860px)
 * is unchanged — the base rules' portrait sunset panel stands. */
@media (max-width: 860px) {
  #view-login .auth-brand.rookery-login, #view-set-password .auth-brand.rookery-login {
    background: #2A095E url("login-phone-band.jpg") center / cover no-repeat;
    aspect-ratio: 13 / 6;
    padding: 0;
  }
  #view-login .auth-brand.rookery-login > .auth-mobile-mark,
  #view-set-password .auth-brand.rookery-login > .auth-mobile-mark {
    display: none;
  }
}

/* ---------- daily log ---------- */
.kind-ico { font-size: 19px; flex: none; width: 28px; text-align: center; }
.log-thumb { width: 52px; height: 52px; object-fit: cover; border-radius: 7px; border: 1px solid var(--line); flex: none; }

/* ---------- map ---------- */
.map-wrap {
  height: calc(100vh - 260px); min-height: 420px;
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); background: #dfe7ee; z-index: 0;
}
.map-legend { margin: 12px 2px 0; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.map-legend .dot { width: 12px; height: 12px; border-radius: 50%; display: inline-block; margin-left: 10px; }
.map-legend .dot:first-child { margin-left: 0; }
.map-icon { background: transparent; border: none; }
.map-pin {
  width: 20px; height: 20px; border-radius: 50% 50% 50% 0;
  transform: rotate(-45deg); border: 2px solid #fff;
  box-shadow: 0 1px 4px rgba(16, 24, 40, .35);
}
.map-pop p { margin: 4px 0; }
.map-pop-title { font-weight: 600; font-size: 15px; margin-top: 0; }
.map-pop .map-open { margin-top: 8px; }
.map-unmapped-h { font-size: 17px; margin: 28px 0 12px; }

/* ---------- design pass: dashboard, covers, downloads ---------- */
.dash { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 20px; }
.dash-tile {
  background: linear-gradient(180deg, #ffffff, #fbfcfe);
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow);
}
.dash-tile .stat-v { font-size: 25px; }
.card .cover { position: relative; }
.card .thumb-placeholder { aspect-ratio: 16/9; font-size: 14px; }
.cover-pill {
  position: absolute; left: 10px; bottom: 10px; margin: 0 !important;
  background: rgba(11, 34, 53, .88); color: #f0e6cf;
}
.card .sub-dim { opacity: .72; font-size: 11.5px; margin-top: 3px; }
.actions-bar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
/* Wave 2 chunk 4.10: the upload dropzone (Files + Media tabs) and its
 * per-file progress lines. The highlight mirrors the kanban column's. */
.up-zone { border-radius: 10px; }
.up-zone.dragover { outline: 2px dashed var(--gold); outline-offset: 4px; }
.up-row { display: flex; gap: 10px; align-items: baseline; padding: 4px 0; font-size: 13.5px; }
.up-row .up-name { font-weight: 600; }
.up-state { color: var(--muted, #66707c); }
.up-state.ok { color: #1d7a3a; }
.up-state.bad { color: var(--danger); }
.dl-chip {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 30px; height: 30px; border-radius: 50%; border: 0;
  background: rgba(11, 34, 53, .85); color: #fff; font-size: 14px;
  cursor: pointer; opacity: 0; transition: opacity .12s ease;
  display: flex; align-items: center; justify-content: center;
}
.ph:hover .dl-chip, .dl-chip:focus-visible { opacity: 1; }
@media (hover: none) { .dl-chip { opacity: .92; } }
.lb-info .btn-ghost {
  color: #dbe2ee; border-color: rgba(255, 255, 255, .35);
  background: rgba(255, 255, 255, .06);
}
.lb-info .btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.row { transition: box-shadow .12s ease, border-color .12s ease; }
.row.clickable:hover { box-shadow: var(--shadow-lg); }

/* ---------- the colony (easter egg) ---------- */
.penguin-waddle {
  position: fixed; left: 0; bottom: 18px; z-index: 200;
  display: flex; align-items: center; gap: 10px;
  pointer-events: none;
  animation: pg-cross 12s linear forwards;
}
.penguin-waddle .pg-bird {
  font-size: 54px; display: inline-block;
  animation: pg-waddle .42s ease-in-out infinite alternate;
}
.penguin-waddle .pg-line {
  background: var(--navy); color: #fff; font-size: 13px; font-weight: 600;
  padding: 8px 12px; border-radius: 12px; border-bottom: 2px solid var(--gold);
  box-shadow: var(--shadow-lg); white-space: nowrap;
}
/* the crossing, slowed (owner, 2026-10-16: "slow it down so you
 * can read the banner"): she walks in, HOLDS at 4vw fully readable
 * for ~3.1s (16% → 42% of 12s), walks on, and fades as she leaves.
 * The trigger and the artwork are untouched — only the timing. */
@keyframes pg-cross {
  0% { transform: translateX(-110%); opacity: 1; }
  16% { transform: translateX(4vw); opacity: 1; }
  42% { transform: translateX(4vw); opacity: 1; }
  78% { transform: translateX(72vw); opacity: 1; }
  100% { transform: translateX(108vw); opacity: 0; }
}
@keyframes pg-waddle { from { transform: rotate(-6deg) translateY(0); } to { transform: rotate(6deg) translateY(-4px); } }

/* ---------- layout pass: left sidebar (Billdr / CompanyCam shell) ---------- */
#topbar {
  position: fixed; left: 0; top: 0; bottom: 0; z-index: 50;
  width: var(--rail-w); height: auto;
  flex-direction: column; align-items: stretch;
  padding: 18px 14px 14px; gap: 0; overflow-y: auto;
}
.brand { flex-direction: column; align-items: flex-start; gap: 9px; padding: 2px 8px 16px; cursor: pointer; }
.brand .topbar-logo { width: 178px; height: auto; display: block; }
@media (max-width: 900px) {
  .brand .topbar-logo { width: auto; height: 42px; }
}
#topbar nav { flex-direction: column; align-items: stretch; gap: 2px; margin: 2px 0 0; width: 100%; }
#topbar .navbtn {
  display: flex; align-items: center; gap: 10px;
  width: 100%; text-align: left;
}
.nav-ico { width: 20px; text-align: center; flex: none; }
.nav-sec {
  font-size: 10.5px; letter-spacing: 1.6px;
  text-transform: uppercase; padding: 16px 12px 6px;
}
.navbtn.soon { color: #8b98ab; }
.navbtn.soon:hover { color: #cdd5e0; }
.soon-tag {
  margin-left: auto; font-size: 9.5px;
  text-transform: uppercase;
  padding: 2px 7px; border-radius: 20px;
}
.userbox {
  margin: auto 0 0; flex-direction: column; align-items: stretch; gap: 8px;
  padding: 14px 8px 2px;
}
.userbox #user-email { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* Fluid width (the owner's screen-fit pass, 2026-10-16):
 * the 1500px cap is OFF, portal-wide. #app runs from the
 * sidebar's edge to the window's right edge on every view —
 * the treatment Wave 2 chunk 4.4 proved on the Schedule alone
 * (body.sched-wide, below) is now the shell's default — and
 * the column stands at least the window's full height, so no
 * view ends in dead space short of the fold either. Panels,
 * tables, boards and registers stretch with the shell; forms
 * and reading surfaces keep their own measure inside it
 * (their max-widths live in their own files, untouched). */
#app { max-width: none; }
body:has(#topbar:not(.hidden)) #app { margin-left: var(--rail-w); min-height: 100vh; }
#soon-toast {
  position: fixed; left: 50%; bottom: 26px; z-index: 300;
  transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  background: var(--navy); color: #e8edf4; font-size: 13.5px;
  padding: 12px 18px; border-radius: 12px; border-bottom: 2px solid var(--gold);
  box-shadow: var(--shadow-lg); max-width: min(560px, 92vw); text-align: center;
}
#soon-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Bundle 3: attribution, comments, For you ---------- */
.ph-cap {
  margin: 0; padding: 6px 9px; font-size: 12px; color: var(--muted);
  background: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fy-badge {
  margin-left: auto;
  font-size: 11px; font-weight: 800; line-height: 1;
  padding: 3px 8px; border-radius: 20px;
}
.mention { border-radius: 4px;
  padding: 0 3px; white-space: nowrap;
}
.wt-comments-h { font-size: 17px; margin: 26px 0 10px; padding-bottom: 6px; border-bottom: 1px solid var(--line); }
#walkthrough-comments .c-slot, .lb-comments .c-slot { display: block; }
#walkthrough-comments .comments-list, #walkthrough-comments .composer {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
#walkthrough-comments .comments-list { padding: 6px 16px; }
#walkthrough-comments .composer { margin-top: 10px; padding: 12px 16px; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment:last-child { border-bottom: 0; }
.c-head { margin: 0 0 3px; font-size: 13.5px; }
.c-time { color: var(--muted); font-size: 12px; font-weight: 400; }
.c-body { margin: 0; font-size: 14px; line-height: 1.45; white-space: pre-wrap; word-break: break-word; }
.c-deleted { margin: 0; font-size: 13px; font-style: italic; color: var(--muted); }
.c-actions { margin: 6px 0 0; display: flex; gap: 14px; }
.c-actions .c-del { color: var(--danger); }
.c-edited { font-size: 12px; }
.c-history { margin-top: 8px; padding: 8px 10px; background: #f2f5f9; border-radius: 8px; }
.c-hist-item { margin: 0 0 4px; font-size: 12.5px; color: #44506a; white-space: pre-wrap; word-break: break-word; }
.c-hist-item:last-child { margin-bottom: 0; }
.c-none { padding: 10px 0; }
.composer-box { position: relative; }
.composer textarea {
  display: block; width: 100%; padding: 10px 12px; resize: vertical;
  border: 1px solid var(--line); border-radius: 8px;
  font: inherit; font-size: 14px; color: var(--ink); background: #fff;
}
.composer textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.mention-picker {
  position: absolute; left: 0; bottom: calc(100% + 4px); z-index: 30;
  min-width: 220px; max-height: 240px; overflow: auto;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  box-shadow: var(--shadow-lg); padding: 4px;
}
.mp-item {
  display: block; width: 100%; text-align: left; background: none; border: 0;
  padding: 8px 10px; border-radius: 7px; font-size: 14px; cursor: pointer; color: var(--ink);
}
.mp-item:hover { background: #eef1f6; }
.composer-bar { display: flex; align-items: center; gap: 14px; margin-top: 8px; }
.composer-actions { margin-left: auto; display: flex; gap: 8px; }
.c-at { font-weight: 700; }
/* comments inside the dark lightbox */
.lb-comments { border-top: 1px solid rgba(255, 255, 255, .14); padding: 14px 20px 20px; color: #dbe2ee; }
.lb-comments .c-title { margin: 0 0 4px; color: #fff; font-size: 15px; }
.lb-comments .comment { border-bottom-color: rgba(255, 255, 255, .12); }
.lb-comments .c-time, .lb-comments .c-deleted { color: #8fa0b8; }
.lb-comments .c-history { background: rgba(255, 255, 255, .07); }
.lb-comments .c-hist-item { color: #c3cede; }
.lb-comments .composer { margin-top: 10px; }
.lb-comments .composer textarea {
  background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .25);
}
.lb-comments .mention-picker { background: #16222f; border-color: rgba(255, 255, 255, .2); }
.lb-comments .mp-item { color: #dbe2ee; }
.lb-comments .mp-item:hover { background: rgba(255, 255, 255, .1); }
.lb-comments .btn-ghost { color: #dbe2ee; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06); }
/* For you list */
.fy-reason { color: var(--muted); font-weight: 500; font-size: 12.5px; }
.fy-new {
  background: var(--danger); color: #fff; font-size: 10px; font-weight: 800;
  letter-spacing: .6px; padding: 2px 6px; border-radius: 4px; vertical-align: 2px;
}
.fy-body { font-size: 13px !important; color: var(--ink) !important; margin-top: 2px !important; white-space: pre-wrap; word-break: break-word; }

@media (max-width: 900px) {
  #topbar {
    position: sticky; width: auto; height: 58px; bottom: auto;
    flex-direction: row; align-items: center; padding: 0 14px; gap: 12px;
    overflow: visible;
  }
  .brand { flex-direction: row; align-items: center; padding: 0; gap: 10px; }
  .brand .topbar-logo { height: 36px; width: auto; }
  .brand-product { display: none; }
  #topbar nav { flex-direction: row; align-items: center; margin: 0; width: auto; overflow-x: auto; }
  #topbar .navbtn { width: auto; white-space: nowrap; }
  .nav-sec, .soon-tag { display: none; }
  .userbox { margin: 0 0 0 auto; flex-direction: row; align-items: center; padding: 0; }
  .userbox #user-email { display: none; }
  body:has(#topbar:not(.hidden)) #app { margin-left: auto; min-height: calc(100vh - 58px); }
  .tl-day { top: 58px; }
}

/* ---------- Rookery Assistant drawer ---------- */
.asst-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 120;
  width: min(400px, 94vw);
  display: flex; flex-direction: column; color: var(--ink);
  border-left: 1px solid var(--line);
}
.asst-drawer.hidden { display: none; }
.asst-head {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 12px;
}
.asst-title { margin: 0; font-weight: 700; }
.asst-sub { margin: 3px 0 0; line-height: 1.4; }
.asst-x {
  flex: none; background: transparent; border: 0;
  font-size: 24px; line-height: 1; cursor: pointer;
}
.asst-messages {
  flex: 1; overflow-y: auto; padding: 14px 14px 6px;
  display: flex; flex-direction: column; gap: 10px;
}
.asst-msg {
  max-width: 92%; padding: 10px 12px; border-radius: var(--radius);
  font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-wrap: break-word;
}
.asst-msg p { margin: 0 0 6px; }
.asst-msg p:last-child { margin-bottom: 0; }
.asst-bot {
  align-self: flex-start; background: var(--card);
  border: 1px solid var(--line); border-left: 4px solid var(--gold);
}
.asst-user {
  align-self: flex-end; background: var(--navy); color: #fff;
  border-bottom: 2px solid var(--gold);
}
.asst-thinking { color: var(--muted); font-style: italic; }
.asst-examples { color: var(--muted); font-size: 13px; }
.asst-sources { padding: 8px 14px 6px; }
.asst-sources.hidden { display: none; }
.asst-sources-toggle {
  display: block; margin: 0; padding: 2px 0; background: none; border: 0;
  font: inherit; text-transform: uppercase;
  cursor: pointer; text-align: left;
}
.asst-sources-arrow { letter-spacing: 0; }
.asst-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.asst-chips.hidden { display: none; }
.asst-list { margin: 2px 0 6px; padding-left: 18px; }
.asst-list:last-child { margin-bottom: 0; }
.asst-list li { margin: 0 0 2px; }
.asst-chip {
  font-size: 11.5px; padding: 3px 9px; border-radius: 20px;
}
.asst-form {
  display: flex; flex-direction: column; gap: 8px;
  border-top: 1px solid var(--line);
}
.asst-form input {
  flex: 1; min-width: 0; padding: 10px 12px; font-size: 14.5px;
  border: 1px solid var(--line); border-radius: 9px; color: var(--ink);
}
.asst-form input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.asst-note { margin: 0; padding: 6px 14px 12px; font-size: 11.5px; color: var(--muted); background: var(--card); }
/* wave203-asstinchat (2026-10-29): the assistant's conversation —
 * messages, sources, the ask form, the note and the drop veil —
 * travels as ONE panel. Its home is the drawer (under the head);
 * the Conversations page and the Messages dock mount the same
 * panel into their thread panes, so the assistant reads like
 * every other conversation there. The drawer keeps its head and
 * its close; the hosts below give the panel the slot's shape. */
.asst-panel { display: flex; flex-direction: column; flex: 1; min-height: 0; position: relative; }
.conv-asst-host { display: flex; flex-direction: column; height: calc(100vh - 348px); min-height: 330px; }
.dock-asst-host { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.conv-asst-host.hidden, .dock-asst-host.hidden { display: none; }
/* The drawer's bar, chat-bubble thread, drop state and
 * question attachments (fix pass 7) are styled in chat.css,
 * with the chat surfaces whose shapes they share — this file
 * sits at the per-file upload ceiling, the same reason
 * clients.css split off. */

/* ---------- 360 viewer ---------- */
.badge.b360 { background: rgba(94, 53, 177, .92); color: #fff; }
.pano-badge {
  position: absolute; left: 8px; bottom: 8px; font-size: 11px; font-weight: 700;
  padding: 3px 8px; border-radius: 6px;
}
#pano-overlay {
  position: fixed; inset: 0; z-index: 120; background: #0b1220;
  display: flex; flex-direction: column;
}
.pano-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px 14px; background: #101826; color: #fff;
}
.pano-title { font-weight: 700; font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pano-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.pano-actions .btn-ghost {
  color: #dbe2ee; border-color: rgba(255, 255, 255, .35); background: rgba(255, 255, 255, .06);
}
.pano-actions .btn-ghost:hover { background: rgba(255, 255, 255, .14); }
.pano-x {
  background: rgba(255, 255, 255, .12); border: 0; color: #fff; font-size: 24px;
  width: 38px; height: 38px; border-radius: 50%; cursor: pointer; line-height: 1;
}
#pano-viewer { flex: 1; width: 100%; min-height: 0; }
#pano-fallback {
  flex: 1; overflow: auto; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 12px; padding: 20px;
}
#pano-fallback img { max-width: 100%; max-height: 70vh; display: block; }
.pano-note { color: #b9c4d6; font-size: 13.5px; text-align: center; max-width: 520px; margin: 0; }

/* ---------- schedule (Bundle 5) ---------- */
.sched-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 4px 0 12px; }
.sched-month-label { font-size: 19px; margin: 0; }
.sched-nav-right { display: inline-flex; gap: 8px; }
.sched-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.sched-dow { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); text-align: center; padding: 2px 0; }
.sched-day {
  background: var(--card); border: 1px solid var(--line); border-radius: 9px;
  min-height: 104px; padding: 6px; cursor: pointer; overflow: hidden;
}
.sched-day:hover { border-color: #c6cfdd; }
.sched-day.dim { background: #eef1f6; }
.sched-day.dim .sched-dnum, .sched-day.dim .sched-chip { opacity: .55; }
.sched-day.today { border-color: var(--gold); box-shadow: inset 0 0 0 1.5px var(--gold); }
.sched-dnum { font-size: 12.5px; font-weight: 700; color: var(--muted); margin: 0 0 4px; }
.sched-day.today .sched-dnum { color: #7c5e10; }
.sched-chip {
  display: block; width: 100%; text-align: left; font: inherit; font-size: 11.5px; font-weight: 600;
  color: var(--accent-dark); background: #e8eef5; border: 1px solid transparent; border-radius: 6px;
  padding: 3px 6px; margin: 0 0 4px; cursor: pointer;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sched-chip:hover { border-color: var(--accent); }
.sched-chip.proposed { background: #fdf8ea; border: 1.5px dashed var(--gold); color: #7c5e10; }
.sched-more { font: inherit; font-size: 11px; font-weight: 700; color: var(--royal); background: none; border: 0; padding: 1px 2px; cursor: pointer; }
.sched-legend { margin-top: 12px; font-size: 12.5px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.sched-swatch { display: inline-block; width: 14px; height: 14px; border-radius: 4px; background: #e8eef5; border: 1px solid #c6cfdd; vertical-align: -2px; }
.sched-swatch.proposed { background: #fdf8ea; border: 1.5px dashed var(--gold); }
.sched-past { opacity: .55; }
.sched-warn { cursor: help; }
@media (max-width: 760px) {
  .sched-day { min-height: 74px; padding: 4px; }
  .sched-chip { font-size: 10.5px; padding: 2px 4px; }
}

/* ---------- Wave 1: Billdr-calm projects, tabs, kanban, forms ----------
 * Design discipline (Micheal, 2026-10-13): Billdr's calm — generous
 * whitespace, quiet typography, pills/chips for status, ONE primary
 * action per screen, no dashboard clutter or card soup. Navy/gold
 * Havenridge branding stays; the breathing room is Billdr's. */

/* projects page controls */
.proj-controls {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; flex-wrap: wrap; margin-bottom: 14px;
}
/* Wave 2 chunk 4.11: the stage filter is ONE scrolling rail of text
 * tabs (Billdr's Projects row) — a single line that scrolls sideways,
 * never a wrapping button grid. The track line is the rail's own inset
 * shadow: inside a scroll container the old -2px tab-margin overlap
 * would protrude past the scroll box, so the line moves into the rail
 * itself and the active tab's gold border paints over it. */
.stage-tabs {
  display: flex; gap: 2px; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden;
  flex: 1; min-width: 280px; box-shadow: inset 0 -2px 0 var(--line);
  scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.stage-tabs::-webkit-scrollbar { display: none; }
.stage-tab {
  background: none; border: 0; padding: 9px 13px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; white-space: nowrap; flex: none;
}
.stage-tab:hover { color: var(--ink); }
.proj-controls .seg { flex: none; margin-bottom: 6px; }
.proj-search { margin-bottom: 18px; display: flex; gap: 10px; align-items: stretch; }
.proj-search input {
  flex: 1; min-width: 0; padding: 12px 15px; font: inherit; font-size: 14.5px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow);
}
.proj-search input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
/* PARITY-2: Billdr's Filter by tag combobox rides the search row
 * (rendered by app.js once the tags column answers). */
.proj-search select {
  flex: none; max-width: 220px; padding: 12px 12px; font: inherit; font-size: 14px; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); cursor: pointer;
}
.proj-search select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

/* projects table (Billdr's rows: one quiet line per project) */
#projects-table-wrap { overflow-x: auto; position: relative; }
table.ptable {
  width: 100%; border-collapse: collapse; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
table.ptable th {
  text-align: left; padding: 12px 16px; font-size: 11.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: .5px; color: var(--muted);
  border-bottom: 1px solid var(--line); white-space: nowrap;
}
table.ptable td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.ptable tbody tr { cursor: pointer; transition: background .12s ease; }
table.ptable tbody tr:hover { background: #f4f7fb; }
table.ptable tbody tr:last-child td { border-bottom: 0; }
.ptable .pref { font-weight: 600; color: #44506a; white-space: nowrap; font-size: 13.5px; }
.pt-name { font-weight: 700; font-size: 15px; margin: 0 0 2px; }
.pt-sub { color: var(--muted); font-size: 12.5px; margin: 0; }
.pt-upd { color: var(--muted); font-size: 13px; white-space: nowrap; }
.pt-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
/* PARITY-2: the project's stored colour as a dot before its name
 * (finding #26 — the colour the form assigned, the calendar's). */
.pt-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
/* PARITY-2: Billdr's tag cell — soft chips with their hash dot
 * and a × each, then the quiet Add a tag door. */
.ptags { display: inline-flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.ptag {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 6px 3px 8px;
  background: #f1f4f9; border: 1px solid var(--line); border-radius: 999px;
  font-size: 12px; font-weight: 600; color: var(--ink); white-space: nowrap;
}
.ptag-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.ptag-x {
  background: none; border: 0; padding: 0 2px; font: inherit; font-size: 13px; line-height: 1;
  color: var(--muted); cursor: pointer; border-radius: 4px;
}
.ptag-x:hover { color: var(--danger); }
.ptag-add {
  background: none; border: 0; padding: 3px 4px; font: inherit; font-size: 12.5px; font-weight: 600;
  color: var(--accent-dark); cursor: pointer; white-space: nowrap;
}
.ptag-add:hover { text-decoration: underline; text-underline-offset: 3px; }
.pill.stage-pill { background: #e8eef5; color: var(--accent-dark); text-transform: none; letter-spacing: 0; font-size: 12px; padding: 4px 10px; }

/* assignee chips (Billdr's overlapping initial circles) */
.chips { display: inline-flex; align-items: center; }
.avatar-chip {
  width: 28px; height: 28px; border-radius: 50%; flex: none;
  background: var(--navy); color: #f0e6cf; border: 2px solid #fff;
  font-size: 10.5px; font-weight: 800; letter-spacing: .3px;
  display: inline-flex; align-items: center; justify-content: center;
}
.avatar-chip + .avatar-chip { margin-left: -8px; }

/* kanban (Pipedrive's board shape) */
.kanban { display: flex; gap: 14px; overflow-x: auto; padding: 4px 2px 18px; align-items: flex-start; }
.kb-col {
  flex: 0 0 264px; background: #edf1f6; border: 1px solid var(--line);
  border-radius: var(--radius); padding: 12px 10px 14px; min-height: 180px;
}
.kb-col.dragover { outline: 2px dashed var(--gold); outline-offset: -4px; }
.kb-head { font-size: 14px; font-weight: 700; margin: 0 4px 10px; display: flex; align-items: baseline; gap: 8px; }
.kb-count { color: var(--muted); font-size: 12px; font-weight: 600; }
.kb-cards { display: flex; flex-direction: column; gap: 9px; }
.kb-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 11px 12px; box-shadow: var(--shadow); cursor: grab;
}
.kb-card:hover { border-color: #c6cfdd; }
.kb-card.dragging { opacity: .45; }
.kb-ref { font-size: 11px; font-weight: 700; color: var(--muted); letter-spacing: .4px; margin: 0 0 3px; }
.kb-name { font-weight: 700; font-size: 14px; margin: 0 0 2px; line-height: 1.35; }
.kb-sub { color: var(--muted); font-size: 12px; margin: 0; line-height: 1.45; }
.kb-foot { margin: 8px 0 0; }
.kb-none { color: var(--muted); font-size: 12.5px; text-align: center; margin: 10px 0 2px; }

/* project page tab strip (the app's tabs, Billdr's calm underline) */
.ptabs { display: flex; gap: 2px; flex-wrap: wrap; border-bottom: 2px solid var(--line); margin-bottom: 22px; }
.ptab {
  background: none; border: 0; padding: 10px 14px; font: inherit; font-size: 14px; font-weight: 600;
  color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -2px; white-space: nowrap;
}
.ptab:hover { color: var(--ink); }
.ptab-count { font-size: 11.5px; font-weight: 700; background: #eef1f6; color: #55617a; border-radius: 9px; padding: 1px 7px; }

/* summary: conversation door, latest-media strip, map block */
.conv-door {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  width: 100%; text-align: left; font: inherit; font-size: 14.5px; font-weight: 700; color: var(--ink);
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 6px; cursor: pointer; box-shadow: var(--shadow);
}
.conv-door:hover { border-color: var(--gold); }
.media-strip { display: flex; gap: 10px; flex-wrap: wrap; }
.ms-thumb {
  position: relative; width: 118px; height: 118px; padding: 0; border: 1px solid var(--line);
  border-radius: 10px; overflow: hidden; background: #dfe4ec; cursor: zoom-in; flex: none;
}
.ms-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ms-thumb .badge {
  position: absolute; left: 6px; bottom: 6px; font-size: 11px; font-weight: 700;
  background: rgba(32, 80, 160, .9); color: #fff; padding: 3px 8px; border-radius: 6px;
}
.map-mini {
  height: 240px; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); background: #dfe7ee; z-index: 0;
}

/* written daily-log entries */
.log-written { align-items: flex-start; }
.written-body { margin: 2px 0 6px; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.written-edited { color: var(--muted); font-weight: 500; font-size: 12.5px; }

/* shared small form panel (typed measures, new task) */
.qm-form {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 16px; margin-bottom: 18px;
}
.qm-form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px 14px; }
.qm-form-grid label { display: block; font-size: 12.5px; font-weight: 700; color: #44506a; }
.qm-form-grid .qm-wide { grid-column: 1 / -1; }
.qm-form-grid input, .qm-form-grid select {
  display: block; width: 100%; margin-top: 5px; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px;
  font-weight: 400; color: var(--ink); background: #fff;
}
.qm-form-grid input:focus, .qm-form-grid select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }

/* ---------- dialog forms (wave205-dlglook, 2026-10-29) ----------
 * Inside a dialog the form is not a second card: the .qm-form
 * panel chrome comes off, and the fields get the stacked,
 * full-width treatment — label over input, two-up where the
 * grid asks for it, nothing clipped at the dialog's edge.
 * This one system carries the Templates & costs dialogs
 * (tc-dlg-grid / qm-field), the category + cost-code dialogs,
 * and the cost-group editor's fields. */
.fx-dialog .qm-form { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; border-radius: 0; }
/* wave208-teamfix: the Contacts member form rides in a dialog now —
 * wider than the standard dialog, its own panel chrome off, and its
 * built-in heading hidden (the dialog head carries the title). */
.fx-dialog.tm-dlg { max-width: 680px; }
.fx-dialog .tm-dlg-slot .qm-form { background: none; border: 0; box-shadow: none; padding: 0; margin: 0; border-radius: 0; }
.fx-dialog .tm-dlg-slot .qm-form > h3.sum-card-h { display: none; }
.tc-dlg-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.tc-dlg-grid .full { grid-column: 1 / -1; }
.qm-field { display: block; min-width: 0; }
.qm-field > span, .tc-dlg-label { display: block; font-size: 12.5px; font-weight: 700; color: #44506a; margin-bottom: 5px; }
.qm-field input, .qm-field select, .qm-field textarea {
  display: block; width: 100%; box-sizing: border-box; padding: 9px 11px;
  border: 1px solid var(--line); border-radius: 8px; font: inherit; font-size: 14px;
  font-weight: 400; color: var(--ink); background: #fff;
}
.qm-field input:focus, .qm-field select:focus, .qm-field textarea:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.qm-field > small { display: block; margin-top: 4px; font-weight: 400; }
.tc-dlg-note { margin: 10px 0 0; font-size: 12.5px; }
.tc-pic-pick { margin-top: 14px; }
.tc-pic-pick [data-tc-samples] { max-height: 216px; overflow-y: auto; }
@media (max-width: 560px) { .tc-dlg-grid { grid-template-columns: 1fr; } }

/* task write controls */
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 7px; }
.task-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.tk-assign { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; color: var(--muted); margin-left: 4px; }
.tk-assign select {
  padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px;
  font: inherit; font-size: 13px; color: var(--ink); background: #fff;
}
.tk-assign select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.qm-typed { cursor: default; }
.qm-typed:hover { transform: none; }

/* comment threads mounted in a page body (project conversation, conversations view) */
#proj-thread-slot .comments-list, #proj-thread-slot .composer,
#conv-thread-slot .comments-list, #conv-thread-slot .composer {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
#proj-thread-slot .comments-list, #conv-thread-slot .comments-list { padding: 6px 16px; }
#proj-thread-slot .composer, #conv-thread-slot .composer { margin-top: 10px; padding: 12px 16px; }

@media (max-width: 760px) {
  .kb-col { flex-basis: 232px; }
  .ms-thumb { width: 96px; height: 96px; }
  /* PARITY-2: the date columns stand down on a narrow screen —
   * classed, not counted, now that Tag and two more columns
   * ride the row (the old rule hid the fifth column, Updated). */
  table.ptable th.pt-date, table.ptable td.pt-date,
  table.ptable th.pt-upd, table.ptable td.pt-upd { display: none; }
}

/* ---------- Wave 1.1: Billdr skin, Summary anatomy, Schedule views, chat ----------
 * THE SKIN SWITCH: everything Billdr-flavoured in the content area is
 * scoped under `body.skin-billdr` (the class sits on <body> in
 * index.html). Havenridge navy/gold keeps the frame — top bar, sidebar,
 * brand surfaces — untouched by this section. To veto the skin, remove
 * the class from <body>: the portal falls back to the Wave 1 look with
 * no other change. The structural pieces (Summary cards, Gantt,
 * two-pane Conversations) are unscoped — they are layout, not skin. */

body.skin-billdr {
  --content-bg: #edf0f5;
  --primary: #4756e8;
  --primary-dark: #3543c8;
  --primary-tint: #eceefe;
  --line-soft: #e0e5ee;
  background: var(--content-bg);
}
body.skin-billdr #app, body.skin-billdr .asst-drawer {
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 2px 8px -2px rgba(16, 24, 40, .06);
  --shadow-lg: 0 2px 4px rgba(16, 24, 40, .05), 0 14px 30px -12px rgba(16, 24, 40, .22);
}

/* buttons & controls, Billdr's way: solid indigo primary, white
 * bordered secondary, rounded corners throughout */
body.skin-billdr #app .btn, body.skin-billdr .asst-drawer .btn { border-radius: 10px; }
body.skin-billdr #app .btn-primary, body.skin-billdr .asst-drawer .btn-primary {
  background: var(--primary); border-bottom: 0;
}
body.skin-billdr #app .btn-primary:hover, body.skin-billdr .asst-drawer .btn-primary:hover { background: var(--primary-dark); }
body.skin-billdr #app .btn-ghost { background: #fff; border-color: #d3dae4; }
body.skin-billdr #app .btn-ghost:hover { background: #f2f5fa; border-color: #bfc9d8; }
body.skin-billdr #app .linkbtn { color: var(--primary); }
body.skin-billdr #app input:focus, body.skin-billdr #app select:focus, body.skin-billdr #app textarea:focus {
  outline: none; border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(71, 86, 232, .16);
}
body.skin-billdr .seg { background: #e4e9f1; border-color: transparent; border-radius: 999px; }
body.skin-billdr .seg-btn { border-radius: 999px; }
body.skin-billdr .seg-btn.active { background: #fff; box-shadow: 0 1px 3px rgba(16, 24, 40, .16); }

/* panels: white cards, soft border, 12px radius */
body.skin-billdr #app .card, body.skin-billdr #app .row, body.skin-billdr #app .entry,
body.skin-billdr #app .filterbar, body.skin-billdr #app .qm-form,
body.skin-billdr #app table.ptable, body.skin-billdr #app table.mini,
body.skin-billdr #app .sched-day, body.skin-billdr #app .kb-card,
body.skin-billdr #app .stat-tile, body.skin-billdr #app .attn {
  border-color: var(--line-soft); border-radius: 12px;
}
body.skin-billdr #app .filterbar select, body.skin-billdr #app .qm-form-grid input,
body.skin-billdr #app .qm-form-grid select, body.skin-billdr #app .composer textarea,
body.skin-billdr #app .tk-assign select, body.skin-billdr #app .proj-search input,
body.skin-billdr #app .login-card input {
  border-color: #d3dae4; border-radius: 10px;
}

/* tab strips: Billdr's text tabs, coloured underline on the active one */
body.skin-billdr .ptab.active { color: var(--primary); border-bottom-color: var(--primary); }
body.skin-billdr .stage-tab.active, body.skin-billdr .tab.active { color: var(--ink); border-bottom-color: var(--primary); }
body.skin-billdr .ptab.active .ptab-count { background: var(--primary-tint); color: var(--primary-dark); }

/* chips: soft tints, sentence case — Billdr's status pills */
body.skin-billdr #app .pill {
  text-transform: none; letter-spacing: 0; font-size: 12px; font-weight: 600; padding: 4px 10px;
}
body.skin-billdr #app .pill.green { background: #e0f3e6; color: #157347; }
body.skin-billdr #app .pill.red { background: #fdecea; color: #b3402e; }
body.skin-billdr #app .pill.grey { background: #eceff3; color: #66707f; }
body.skin-billdr #app .pill.stage-pill { background: var(--primary-tint); color: var(--primary-dark); }
body.skin-billdr #app .pill.stage-pill[data-stage="lead"] { background: #edf0f4; color: #55677c; }
body.skin-billdr #app .pill.stage-pill[data-stage="meeting_scheduled"] { background: #e1f1ef; color: #14707c; }
body.skin-billdr #app .pill.stage-pill[data-stage="to_bid"] { background: #fdeef0; color: #b03a4e; }
body.skin-billdr #app .pill.stage-pill[data-stage="quote_sent"] { background: #fdf3e0; color: #9a6a12; }
body.skin-billdr #app .pill.stage-pill[data-stage="quote_signed"] { background: #efe9fd; color: #5b3ec8; }
body.skin-billdr #app .pill.stage-pill[data-stage="in_construction"] { background: #e3ecfd; color: #2456c4; }
body.skin-billdr #app .pill.stage-pill[data-stage="completed"] { background: #e0f3e6; color: #157347; }

/* people chips soften to Billdr's pastel initials */
body.skin-billdr #app .avatar-chip { background: #dfe3fb; color: #333fa3; }
body.skin-billdr #app .sched-chip { background: var(--primary-tint); color: var(--primary-dark); }
body.skin-billdr #app .sched-chip:hover { border-color: var(--primary); }
body.skin-billdr #app .sched-day.today { border-color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
body.skin-billdr #app .sched-day.today .sched-dnum { color: var(--primary-dark); }
body.skin-billdr #app .gt-bar.confirmed { background: var(--primary); }
body.skin-billdr #app .conv-row.active { background: var(--primary-tint); }

/* project title block: chips ride beside the name, Billdr-style */
.proj-chips { display: inline-flex; flex-wrap: wrap; }
.proj-chips:empty { display: none; }
#view-project .page-head .muted { margin-top: 5px; }

/* ---------- Summary anatomy (Billdr's cards) ---------- */
.sum-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 18px; }
.sum-stat {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px 18px; box-shadow: var(--shadow); font: inherit; text-align: left; color: var(--ink);
}
button.sum-stat { cursor: pointer; }
button.sum-stat:hover { border-color: #c6cfdd; }
.sum-stat-v { display: block; font-size: 24px; font-weight: 800; margin: 0 0 2px; }
.sum-stat-l { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.sum-cols { display: grid; grid-template-columns: minmax(0, 1fr) 344px; gap: 18px; align-items: start; }
.sum-main, .sum-rail { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.sum-card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 18px; }
.sum-card-h { font-size: 15.5px; margin: 0 0 10px; }
.sum-desc { margin: 0; font-size: 14px; line-height: 1.55; white-space: pre-wrap; word-break: break-word; }
.team-row { display: flex; align-items: center; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.team-row:last-child { border-bottom: 0; padding-bottom: 2px; }
.team-row:first-of-type { padding-top: 2px; }
.avatar-chip.lg { width: 40px; height: 40px; font-size: 13px; margin: 0; }
.team-who { display: flex; flex-direction: column; min-width: 0; }
.team-name { font-weight: 700; font-size: 14.5px; }
.team-role { color: var(--muted); font-size: 12.5px; }
.sum-card .ms-thumb { width: 100px; height: 100px; }
.sum-rail .conv-door { margin-bottom: 0; }
@media (max-width: 980px) {
  .sum-cols { grid-template-columns: 1fr; }
  .sum-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- project Schedule: view bar + Gantt ---------- */
.psched-bar { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 16px; }
.gantt-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: var(--card); box-shadow: var(--shadow); }
.gantt { position: relative; min-width: 780px; padding: 12px 14px 16px; }
.gt-axis, .gt-row { display: flex; }
.gt-labelcell { flex: 0 0 240px; width: 240px; padding-right: 14px; min-width: 0; }
.gt-track { position: relative; flex: 1; min-width: 0; }
.gt-axis { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.gt-axis-track { height: 18px; }
.gt-tick { position: absolute; top: 0; transform: translateX(-50%); font-size: 11px; color: var(--muted); white-space: nowrap; }
.gt-today-flag {
  position: absolute; top: 0; transform: translateX(-50%);
  font-size: 10.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase; color: #b3402e;
}
.gt-group { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .6px; color: var(--muted); margin: 16px 0 4px; }
.gt-row { padding: 8px 0; border-bottom: 1px solid #eef1f6; align-items: center; }
.gt-row:last-child { border-bottom: 0; }
.gt-title { font-weight: 700; font-size: 13.5px; margin: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gt-sub { color: var(--muted); font-size: 12px; margin: 1px 0 0; }
.gt-people { margin: 4px 0 0; display: flex; }
.gt-people:empty { display: none; }
.avatar-chip.sm { width: 21px; height: 21px; font-size: 8.5px; border-width: 1.5px; }
.gt-bar { position: absolute; top: 50%; transform: translateY(-50%); height: 16px; border-radius: 8px; min-width: 10px; background: var(--royal); overflow: hidden; }
.gt-bar.proposed { background: #e8c96a; border: 1.5px dashed #b98f1e; }
.gt-bar.cancelled { background: #c3cad4; }
.gt-dim { opacity: .55; }
.gt-overlay { position: absolute; top: 0; bottom: 0; left: 254px; right: 14px; pointer-events: none; }
.gt-todayline { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: rgba(179, 64, 46, .5); }

/* ---------- Conversations: two-pane messenger (Bolster's shape) ---------- */
.conv-layout { display: grid; grid-template-columns: 332px minmax(0, 1fr); gap: 18px; align-items: start; }
.conv-pane-list {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 10px;
  max-height: calc(100vh - 178px); overflow-y: auto;
}
.conv-pane-head { padding: 6px 8px 12px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.conv-pane-head h2 { font-size: 17px; margin: 0 0 10px; }
.conv-pane-head input {
  width: 100%; padding: 10px 12px; font: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.conv-loading { padding: 12px 8px; }
.conv-row {
  display: flex; align-items: flex-start; gap: 10px; width: 100%;
  text-align: left; font: inherit; color: var(--ink);
  background: none; border: 0; border-radius: 10px; padding: 11px 10px; cursor: pointer;
}
.conv-row:hover { background: #f2f5fa; }
.conv-row.active { background: #eceefe; }
.conv-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.conv-row-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.conv-row-name { font-weight: 700; font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-row-time { color: var(--muted); font-size: 11.5px; white-space: nowrap; }
.conv-row-snip { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.conv-row-meta { color: var(--muted); font-size: 11.5px; }
.conv-unread {
  flex: none; margin-top: 2px; min-width: 21px; height: 21px; padding: 0 6px;
  border-radius: 999px; background: var(--danger); color: #fff;
  font-size: 11px; font-weight: 800; display: inline-flex; align-items: center; justify-content: center;
}
.conv-pane-thread {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 16px 18px;
}
.conv-back { display: none; }
.conv-thread-head { border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 4px; }
.conv-thread-titlerow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.conv-thread-titlerow h2 { font-size: 19px; margin: 0; }
#conv-view-project { margin-left: auto; }
.conv-thread-head .muted { margin-top: 5px; }
#conv-thread-slot { height: calc(100vh - 348px); min-height: 330px; }

/* chat surfaces: the thread scrolls, the composer stays pinned under
 * it, and the old per-slot card chrome gives way to the pane/card the
 * slot now lives in */
.chat-slot { display: flex; flex-direction: column; min-height: 0; }
.chat-slot .comments-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; padding: 4px 2px; }
.chat-slot .c-composer-slot { flex: none; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 6px; }
#proj-thread-slot .comments-list, #conv-thread-slot .comments-list,
#proj-thread-slot .composer, #conv-thread-slot .composer {
  background: transparent; border: 0; box-shadow: none; border-radius: 0;
}
#proj-thread-slot .comments-list, #conv-thread-slot .comments-list { padding: 4px 2px; }
#proj-thread-slot .composer, #conv-thread-slot .composer { margin-top: 0; padding: 0; }
.chat-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: var(--shadow); padding: 12px 16px;
}
.chat-card .chat-slot .comments-list { max-height: 46vh; }
.chat-internal-tag {
  font-size: 10.5px; font-weight: 800; letter-spacing: 1.2px;
  text-transform: uppercase; color: var(--muted); margin: 0 0 8px;
}

@media (max-width: 900px) {
  .conv-layout { grid-template-columns: 1fr; }
  .conv-pane-list { max-height: none; }
  .conv-layout .conv-pane-thread { display: none; }
  .conv-layout.show-thread .conv-pane-thread { display: block; }
  .conv-layout.show-thread .conv-pane-list { display: none; }
  .conv-back { display: inline-block; margin-bottom: 12px; }
  #conv-thread-slot { height: calc(100vh - 380px); }
}

/* ================= Wave 2 =================
 * Schedule-from-template + the coming-soon placeholder set. The
 * placeholders share one discipline: muted tint, small type, a "soon"
 * marker — never styled like a live control. Each placeholder's
 * activation trigger is logged in WAVE1_BUILD_LOG.md (Wave 2). */

.soon-mini {
  font-size: 9.5px; letter-spacing: .8px;
  text-transform: uppercase; margin-left: 5px;
  vertical-align: 1px; white-space: nowrap;
}

/* Projects: muted stage tabs + Kanban toggle (until Bundle 8 SQL) */
.stage-tab.soon-tab { color: var(--muted); opacity: .72; }
.stage-tab.soon-tab:hover { color: var(--ink); border-bottom-color: transparent; }
.seg-btn.soon-btn { opacity: .55; }
.seg-btn.soon-btn.active { background: transparent; box-shadow: none; color: var(--muted); }

/* Project head: the stage slot's placeholder chip */
.pill.soon-chip { opacity: .72; text-transform: none; letter-spacing: 0; }

/* Conversations: the General channel placeholder row */
.conv-row.soon-row {
  opacity: .62; border: 1px dashed var(--line); background: transparent;
  cursor: pointer; margin-top: 10px;
}
.conv-row.soon-row:hover { background: rgba(127, 142, 163, .08); }
.conv-row.soon-row .conv-row-name { font-weight: 600; }

/* Communications: audience placeholders beside the live Internal tab */
.aud-tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 14px; }
.aud-tab {
  font-size: 12.5px; font-weight: 700; padding: 6px 12px;
  border-radius: 999px; border: 1px solid var(--line);
}
.aud-tab.current { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }
.aud-tab.soon {
  font: inherit; font-size: 12.5px; font-weight: 600;
  background: transparent; color: var(--muted); opacity: .72; cursor: pointer;
}
.aud-tab.soon:hover { color: var(--ink); }

/* Project Logs: the flags placeholder chip */
.dl-filterbar { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.flags-chip {
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: transparent; border: 1px dashed var(--line); border-radius: 999px;
  padding: 6px 12px; opacity: .78; cursor: pointer;
}
.flags-chip:hover { color: var(--ink); }

/* Summary: the share-with-client placeholder door */
.conv-door.soon-door { opacity: .62; box-shadow: none; margin-top: 8px; }
.conv-door.soon-door:hover { border-color: var(--line); }
.sum-rail .conv-door.soon-door { margin-bottom: 0; }

/* Schedule-from-template */
.psched-spacer { flex: 1; }
.qm-form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 14px; flex-wrap: wrap; }
.psched-tpl-form .tpl-preview { margin-top: 12px; }
.psched-tpl-form .tpl-note { margin-top: 12px; font-size: 12.5px; }
.psched-tpl-form .tpl-stop { font-size: 15px; margin-bottom: 6px; }

/* ================= Wave 2 chunk 2: Map =================
 * Two panes that move together (CompanyCam's treatment): the map and
 * its project list. The side list dims rows whose pin is outside the
 * current viewport; the selected row and pin share a gold marker. */
.map-layout { display: flex; gap: 14px; align-items: stretch; }
.map-main { flex: 1 1 auto; min-width: 0; }
.map-main .map-wrap { height: calc(100vh - 350px); min-height: 400px; }
.map-side {
  width: 300px; flex: none; background: var(--card);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); display: flex; flex-direction: column; overflow: hidden;
}
.map-side-head {
  margin: 0; padding: 12px 14px; font-size: 12px; font-weight: 700;
  color: var(--muted); text-transform: uppercase; letter-spacing: .4px;
  border-bottom: 1px solid var(--line);
}
.map-list { overflow-y: auto; }
.map-row { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; }
.map-row:hover { background: var(--bg); }
.map-row.active { background: #eef3fa; box-shadow: inset 3px 0 0 var(--gold); }
.map-row.out { opacity: .42; }
.map-row-t { margin: 0; font-weight: 600; font-size: 14.5px; }
.map-row-s { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.map-list-empty { padding: 14px; }
#map-photonote { margin: 6px 2px 0; }
.dot-photo { background: #fff; border: 2px solid var(--navy); }
.pin-photo {
  width: 12px; height: 12px; border-radius: 50%;
  background: #fff; border: 2px solid var(--navy);
  box-shadow: 0 1px 3px rgba(16, 24, 40, .4);
}
.map-pop-pills { display: flex; gap: 6px; flex-wrap: wrap; }
.map-pop .map-strip { display: flex; gap: 4px; margin: 8px 0 2px; }
.map-thumb {
  position: relative; padding: 0; width: 48px; height: 48px; flex: none;
  border: 1px solid var(--line); border-radius: 6px; overflow: hidden;
  background: var(--bg); cursor: pointer;
}
.map-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-thumb .badge { position: absolute; right: 2px; bottom: 2px; }
.map-pop-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.map-pop-actions .btn { text-decoration: none; }
@media (max-width: 920px) {
  .map-layout { flex-direction: column; }
  .map-side { width: auto; }
  .map-list { max-height: 300px; }
}

/* ---------- Wave 2 chunk 3: company Schedule rebuild, clients ---------- */
/* Month with spanning bars (company #sched-grid.bars only — the
 * project Calendar keeps its chip grid). Cells carry the day boxes;
 * an overlay layer carries the bars, so a bar can cross cells. */
#sched-grid.bars { display: block; }
.sched-dowrow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.sched-weekrow { position: relative; margin-bottom: 6px; }
.sched-week-cells { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
#sched-grid.bars .sched-day { min-height: 108px; }
.sched-week-bars { position: absolute; inset: 0; pointer-events: none; }
.sched-bar {
  position: absolute; pointer-events: auto; font: inherit; font-size: 11.5px; font-weight: 600;
  text-align: left; border: 1px solid; border-radius: 6px; padding: 1px 6px; height: 19px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer;
}
.sched-bar.proposed { border-style: dashed; }
.sched-bar.cont-l { border-top-left-radius: 2px; border-bottom-left-radius: 2px; }
.sched-bar.cont-r { border-top-right-radius: 2px; border-bottom-right-radius: 2px; }
.sched-morebtn {
  position: absolute; pointer-events: auto; font: inherit; font-size: 11px; font-weight: 700;
  color: var(--royal); background: none; border: 0; padding: 1px 6px; height: 16px; cursor: pointer; text-align: left;
}
/* Week strip + day list */
.sched-wstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 14px; }
.sched-wday {
  font: inherit; background: var(--card); border: 1px solid var(--line); border-radius: 10px;
  padding: 8px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 1px;
}
.sched-wday:hover { border-color: #c6cfdd; }
.sched-wdow { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--muted); }
.sched-wdnum { font-size: 17px; font-weight: 700; color: var(--ink); }
.sched-wcount { font-size: 11px; color: var(--muted); }
/* Agenda / week event cards: the project's colour on the left edge */
.sched-card { border-left: 4px solid var(--line); }
.sched-pdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; vertical-align: 0; }
/* Clients card (project Summary) */
.clients-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.clients-table th {
  text-align: left; font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); padding: 2px 8px 6px 0;
}
.clients-table td { padding: 4px 8px 2px 0; vertical-align: middle; }
.clients-table .client-name { font-weight: 600; }
.pill.client-primary { background: #e0f3e6; color: #157347; }
@media (max-width: 760px) {
  #sched-grid.bars .sched-day { min-height: 92px; }
  .sched-bar { font-size: 10.5px; padding: 1px 4px; }
  .sched-wcount { display: none; }
}
body.skin-billdr .sched-wday.sel { border-color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }
body.skin-billdr .sched-wday.today .sched-wdnum { color: var(--primary-dark); }
body.skin-billdr #app .sched-day.today { border-color: var(--primary); box-shadow: inset 0 0 0 1.5px var(--primary); }

/* ---------- Wave 2 chunk 4: Settings ---------- */
.set-wrap { max-width: 780px; display: flex; flex-direction: column; gap: 16px; }
.set-card { background: var(--card); border: 1px solid var(--line); padding: 18px 20px 20px; }
.set-card h2 { margin: 0 0 4px; font-size: 16px; }
.set-sub { color: var(--muted); font-size: 13px; margin: 0 0 14px; }
.set-head { display: flex; gap: 14px; align-items: center; margin-bottom: 6px; }
.set-avatar { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; background: #dfe4ec; flex: none; }
.set-avatar-init { display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 21px; color: var(--muted); }
.set-name { font-size: 17px; font-weight: 700; }
.set-rolemeta { margin-top: 5px; display: flex; align-items: center; gap: 8px; font-size: 12.5px; }
.set-form label { display: block; font-size: 13px; font-weight: 600; margin: 12px 0 0; }
.set-form input[type="text"], .set-form input[type="tel"] {
  display: block; width: 100%; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 14.5px; background: #fff; color: var(--ink);
}
.set-form input:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.set-form .set-filelabel input[type="file"] { display: block; margin-top: 6px; font-size: 13.5px; }
.set-filenote { display: block; margin-top: 4px; font-weight: 400; font-size: 12.5px; }
.set-soonrows { margin-top: 4px; }
.set-soonrow {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; width: 100%;
  background: none; border: 0; border-bottom: 1px dashed var(--line); padding: 11px 2px;
  font: inherit; font-size: 13.5px; color: var(--muted); cursor: pointer; text-align: left;
}
.set-soonrow:last-child { border-bottom: 0; }
.set-soonlabel { font-weight: 600; }
.set-soon { font-size: 12px; text-transform: uppercase; letter-spacing: .4px; }
.set-actions { display: flex; align-items: center; gap: 12px; margin-top: 16px; flex-wrap: wrap; }
.set-err { color: #b3261e; }
.set-note { font-size: 12.5px; margin: 12px 0 0; }
.set-datarows { display: flex; flex-direction: column; }
.set-datarow { display: flex; gap: 16px; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.set-datarow:last-child { border-bottom: 0; }
.set-datakey { flex: 0 0 130px; font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .4px; padding-top: 1px; }
body.skin-billdr .set-card { border-radius: 12px; box-shadow: 0 1px 3px rgba(16, 24, 40, .06); }
body.skin-billdr #app .set-form input:focus { outline-color: var(--primary); border-color: var(--primary); }
body.skin-billdr .set-datakey { color: var(--muted); }
@media (max-width: 760px) {
  .set-datarow { flex-direction: column; gap: 2px; }
  .set-datakey { flex: none; }
}

/* ---------- Wave 2 chunk 4.2: the drawn icon set ----------
 * One set (icons.js + inline twins in index.html): 24 grid, stroke 1.5,
 * round caps, currentColor. Sizes are fixed per context so every icon
 * in a context renders at the same size and labels line up in columns:
 * sidebar 18 · page heads 22 · buttons 15 · list-row kinds 17 ·
 * inline small 14 · inline micro 12. Icons are never gold decoration;
 * they take the text colour of where they sit, in both skins. */
.ico { display: inline-block; width: 16px; height: 16px; vertical-align: -3px; flex: none; }
.i-nav { width: 18px; height: 18px; vertical-align: 0; }
.i-h { width: 22px; height: 22px; }
.i-btn { width: 15px; height: 15px; }
.i-kind { width: 17px; height: 17px; vertical-align: 0; }
.i-sm { width: 14px; height: 14px; }
.i-xs { width: 12px; height: 12px; vertical-align: -2px; }
.i-chip { width: 15px; height: 15px; vertical-align: 0; }
.i-x { width: 17px; height: 17px; vertical-align: middle; }
.i-plan { width: 40px; height: 40px; vertical-align: 0; }
/* sidebar: one icon box width everywhere — the label column stays true */
.nav-ico { display: inline-flex; align-items: center; justify-content: center; height: 20px; }
/* page heads: the mark sits on the headline's rhythm */
.page-head h1 .ico { margin-right: 6px; vertical-align: -4px; }
/* list rows: the kind icon centres in its fixed column */
.kind-ico { display: inline-flex; align-items: center; justify-content: center; }
/* badges: the play / verified marks sit at cap height */
.badge .ico { vertical-align: -1.5px; }
/* segmented controls: icon and word on one line */
.seg-btn .ico { margin-right: 2px; }
/* checklist ticks are drawn boxes now */
.ci-check { display: inline-flex; align-items: center; }
/* double-booked warning: drawn triangle, same help cursor */
.sched-warn .ico { vertical-align: -1.5px; }
/* the colony easter egg: the gunslinger penguin herself crosses
 * the screen — drawn, hat and all (fix pass 4). She is NOT boxed
 * in a card; a soft ground shadow rides under her instead. */
.penguin-waddle .pg-bird {
  display: inline-flex; line-height: 0;
  filter: drop-shadow(0 7px 7px rgba(11, 34, 53, .30));
}
.penguin-waddle .pg-bird svg { width: 66px; height: 66px; display: block; }
/* assistant sources disclosure: the chevron turns instead of swapping */
.asst-sources-arrow { display: inline-flex; }
.asst-sources-arrow .ico { transition: transform .15s ease; }
.asst-sources-arrow.open .ico { transform: rotate(90deg); }
/* icon-only close buttons centre the drawn x */
.lb-x, .pano-x, .asst-x { display: inline-flex; align-items: center; justify-content: center; }

/* ---------- Wave 2 chunk 4.4: Schedule layout & views ----------
 * Micheal, from his side-by-side of our Calendar against Billdr's:
 * "make the calendar layout look more like that, ours doesn't look
 * good" and "it is small and doesn't take the whole space up."
 * Billdr's schedule owns the workspace; ours sat in the 1500px cage.
 * body.sched-wide is put on by app.js (showView for the company
 * Schedule, renderProjectTab for the project's Schedule tab) and
 * taken off everywhere else. Since the fluid-width pass
 * (2026-10-16) the whole shell is uncapped, so wide mode no
 * longer changes any view's width or measure — what remains
 * below is the Schedule's own tighter padding, kept so the
 * calendar's measure does not move under it. */
body.sched-wide:has(#topbar:not(.hidden)) #app {
  margin-right: 0; padding: 20px 26px 48px;
}
@media (max-width: 760px) {
  body.sched-wide:has(#topbar:not(.hidden)) #app { padding: 14px 12px 40px; }
}
/* Month cells at Billdr's scale: room for three two-line bars plus
 * the overflow row (bar top 26 + 3 lanes x 37 + the +N more line). */
#sched-grid.bars .sched-day { min-height: 160px; }
.sched-bar {
  height: 33px; padding: 3px 8px; border-radius: 7px;
  display: flex; flex-direction: column; justify-content: center;
}
.sched-bar .sb-t {
  font-size: 12px; font-weight: 650; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sched-bar .sb-p {
  font-size: 10.5px; font-weight: 500; opacity: .75; line-height: 1.2;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
@media (max-width: 760px) {
  #sched-grid.bars .sched-day { min-height: 150px; }
  .sched-bar { height: 27px; }
  .sched-bar .sb-p { display: none; }
}
/* The project Calendar's days grow a step too, in wide mode only. */
body.sched-wide #psched-body .sched-day { min-height: 122px; }
/* Schedule tables (company List + project List): Billdr's row
 * discipline on the shared ptable — a title with quiet sub-lines,
 * no-wrap date cells, initial chips for people. */
.stable-wrap { overflow-x: auto; }
.stable .st-title { font-weight: 650; font-size: 14px; }
.stable .st-sub { display: block; color: var(--muted); font-size: 12px; font-weight: 400; margin-top: 1px; }
.stable .st-nowrap { white-space: nowrap; }
.stable .st-people { display: inline-flex; gap: 3px; flex-wrap: wrap; }
table.stable-static tbody tr { cursor: default; }
tr.sched-past-row { opacity: .55; }
/* Gantt: weekend shading bands + Billdr's working-day caption. */
.gt-wknd { position: absolute; top: 0; bottom: 0; background: rgba(27, 43, 68, .05); }
.gt-dur {
  position: absolute; top: 50%; transform: translate(7px, -50%);
  font-size: 11px; color: var(--muted); white-space: nowrap;
}

/* ---------- Bundle 9 follow-on (A3): the Schedule plan ----------
 * Phase rows in the project Schedule's List (schedule-plan.js): a
 * quiet band across Billdr's table, its rollup % at the right; the
 * chevron folds the phase's events away. The Gantt's % fill sits
 * inside the bar (darker = done), and the FS arrows are one SVG
 * laid over the chart. */
.psched-phaserow td {
  background: #eef2f8; font-weight: 800; font-size: 13px; color: var(--ink);
  cursor: pointer; padding-top: 9px; padding-bottom: 9px;
}
.psched-phaserow:hover td { background: #e4ebf5; }
.psched-phaserow .pchev { display: inline-block; transition: transform .15s ease; }
.psched-phaserow.closed .pchev { transform: rotate(-90deg); }
.psched-phaserow .phase-pct { float: right; font-weight: 800; color: var(--royal); }
.psched-phased-off { display: none; }
.gt-fill {
  position: absolute; left: 0; top: 0; bottom: 0;
  border-radius: 8px 0 0 8px; background: rgba(27, 43, 68, .28);
  pointer-events: none;
}
.gt-arrows { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.gt-arrows > path { fill: none; stroke: #93a0b4; stroke-width: 1.5; marker-end: url(#gt-ah); }
.gt-arrows path.gt-ah-fill { fill: #93a0b4; stroke: none; }

/* ---------- Wave 2 chunk 4.5: start a conversation ----------
 * The ＋ New conversation action fills the pane head's width like the
 * main action it is; the picker is a quiet panel in the same chrome
 * as the thread rows, its rows shaped like them. */
.conv-new-btn { width: 100%; margin: 0 0 10px; }
.conv-picker {
  border: 1px solid var(--line); background: #fff; margin: 0 0 10px;
}
.conv-picker input {
  width: 100%; padding: 9px 11px; font: inherit; font-size: 14px; color: var(--ink);
  border: 1px solid var(--line); border-radius: 10px; background: #fff; margin-bottom: 8px;
}
.conv-picker-list { display: flex; flex-direction: column; }
.conv-picker-row {
  display: flex; flex-direction: column; gap: 1px; width: 100%;
  text-align: left; font: inherit; color: var(--ink);
  background: none; border: 0; border-radius: 8px; padding: 9px 8px; cursor: pointer;
}
.conv-picker-row:hover { background: #f2f5fa; }
.conv-picker-name { font-weight: 700; font-size: 14px; }
.conv-picker-none { padding: 6px 2px; }

/* ---------- Wave 2 chunk 4.7: Pending actions card + Clients address ----------
 * The Summary's old tally strip (.sum-stats) is retired with the strip
 * itself — the rules above stay unused, like .modbar/.dash before them.
 * Pending actions is a Summary card like the others; its rows are quiet
 * full-width doors. The Clients card's address line speaks the table's
 * field language (small-caps key, plain value). */
.pending-card { margin-bottom: 18px; }
.pend-row {
  display: flex; align-items: center; gap: 9px; width: 100%;
  text-align: left; font: inherit; font-size: 14px; color: var(--ink);
  background: none; border: 0; border-top: 1px solid var(--line);
  padding: 10px 2px; cursor: pointer;
}
.pend-row:first-of-type { border-top: 0; padding-top: 2px; }
.pend-row:last-child { padding-bottom: 2px; }
.pend-row:hover { color: var(--accent-dark); }
.client-addr { display: flex; gap: 12px; align-items: baseline; margin: 12px 0 0; font-size: 14px; }
.client-addr-k {
  font-size: 11px; font-weight: 700; text-transform: uppercase;
  letter-spacing: .5px; color: var(--muted); flex: none;
}

/* ---------- Wave 2 Summary-readiness: the rail panels ----------
 * The Summary's right rail becomes the project's side panel (Team /
 * Meetings / Notes on top — summary-rail.js). Meeting rows are quiet
 * doors to the Schedule tab, shaped like Pending actions rows. The
 * two placeholders keep the standing discipline: muted, dashed,
 * never styled like a live control. */
.meet-row {
  display: block; width: 100%; text-align: left; font: inherit;
  background: none; border: 0; border-top: 1px solid var(--line);
  padding: 9px 2px; cursor: pointer; color: var(--ink);
}
.meet-row:first-of-type { border-top: 0; padding-top: 2px; }
.meet-row:last-of-type { padding-bottom: 2px; }
.meet-row:hover { color: var(--accent-dark); }
.meet-t { display: block; font-weight: 700; font-size: 14px; }
.meet-s { display: block; color: var(--muted); font-size: 12.5px; margin-top: 1px; }
.sum-soon-line {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
  font: inherit; font-size: 12.5px; font-weight: 600; color: var(--muted);
  background: transparent; border: 1px dashed var(--line); border-radius: 999px;
  padding: 6px 12px; opacity: .78; cursor: pointer; box-shadow: none;
}
.sum-soon-line:hover { color: var(--ink); }
button.sum-card.sum-notes-slot {
  display: block; width: 100%; text-align: left; font: inherit; color: inherit;
  background: transparent; border: 1px dashed var(--line); border-radius: 12px;
  box-shadow: none; opacity: .72; cursor: pointer;
}
.sum-notes-slot:hover { opacity: .9; }
.sum-notes-h { display: block; }
.sum-notes-line { display: block; font-size: 13px; line-height: 1.5; }

/* ---------- Wave 2 chunk 4.8: schedule editing + the company Gantt ----------
 * The editor panel rides the shared .qm-form card (like the task and
 * template forms); the chips are the app's pill toggles in portal dress.
 * Project Gantt bars are tools now: grab to move, the right edge
 * resizes, and a small date tag follows the drag. Company Gantt bars
 * are doors (a click opens the project's Schedule), not tools. */
#psched-edit:empty { display: none; }
.sched-edit-form { margin-bottom: 16px; }
.sched-edit-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin: 0 0 12px; font-size: 15px; }
.sched-edit-notice {
  border: 1px solid var(--line); border-left: 3px solid var(--gold);
  background: var(--card); border-radius: 10px; box-shadow: var(--shadow);
  padding: 10px 14px; margin: 0 0 16px; font-size: 14px;
}
.ev-allday-line { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; color: var(--ink); padding-top: 8px; }
.ev-allday-line input { width: 17px; height: 17px; accent-color: var(--gold); }
.ev-people-label { display: block; font-size: 12.5px; font-weight: 700; color: #44506a; margin-bottom: 7px; }
.ev-people { display: flex; flex-wrap: wrap; gap: 7px; }
.ev-chip {
  font: inherit; font-size: 13.5px; font-weight: 700; color: var(--ink);
  background: #fff; border: 1px solid var(--line); border-radius: 999px;
  padding: 7px 13px; cursor: pointer;
}
.ev-chip:hover { border-color: var(--gold); }
.ev-chip.on { background: var(--gold); border-color: var(--gold); color: #231a04; }
.ev-people-now { margin: 8px 0 0; font-size: 13px; }
.psched-evrow { cursor: pointer; }
.psched-evrow:hover { background: #f6f8fc; }
.gt-bar[data-evbar] { cursor: grab; touch-action: none; }
.gt-bar[data-evbar]:active { cursor: grabbing; }
.gt-dragtip {
  position: absolute; top: -24px; transform: translateX(-50%);
  background: #1b2b44; color: #fff; font-size: 11.5px; font-weight: 700;
  padding: 2.5px 8px; border-radius: 6px; white-space: nowrap; pointer-events: none; z-index: 3;
}
.cg-group { display: flex; align-items: center; gap: 8px; }
.cg-bar { cursor: pointer; }
.cg-bar:hover { filter: brightness(.97); }

/* ================= Wave 2 Part B: the Library, session view,
 * A10 log fields + the real Flags filter =================
 * The flags chip keeps its pill shape but loses the dashed
 * placeholder dress: solid border when it can filter, inert and
 * quiet when the project honestly has no flags. */
.flags-chip.on { background: #fdf3e0; border: 1px solid var(--gold); color: var(--ink); opacity: 1; }
.flags-chip.off { cursor: default; opacity: .55; border-style: solid; }
.flags-chip.off:hover { color: var(--muted); }

/* Written-log A10 fields (dailylog.js) */
.written-title { font-weight: 700; font-size: 15px; margin: 3px 0 0; }
.written-flags { margin: 5px 0 0; }
.tag-flag { background: #fdf3e0; color: #7a5410; border: 1px solid #ecd9ac; font-weight: 600; }
.written-fields { margin-top: 7px; }
.written-field { margin: 2px 0; font-size: 13.5px; }
.written-field-k { font-weight: 700; color: var(--muted); }

/* The Library (library.js) */
.lib-filterbar { display: flex; gap: 16px; align-items: flex-end; flex-wrap: wrap; margin: 4px 0 14px; }
.lib-filterbar label { display: flex; flex-direction: column; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lib-filterbar select {
  font: inherit; font-size: 14px; font-weight: 500; color: var(--ink);
  padding: 7px 10px; border: 1px solid var(--line); border-radius: 8px; background: var(--card);
}
.lib-filterbar select:focus { outline: 2px solid var(--gold); border-color: var(--gold); }
.lib-doclist { margin-top: 12px; }
.lib-selwrap {
  position: absolute; top: 8px; left: 8px; z-index: 2;
  background: rgba(255, 255, 255, .94); border-radius: 6px; padding: 4px; line-height: 0;
  box-shadow: 0 1px 4px rgba(11, 34, 53, .25); cursor: pointer;
}
.lib-sel { width: 17px; height: 17px; margin: 0; accent-color: var(--gold); cursor: pointer; }
.ph.lib-selected { outline: 3px solid var(--gold); outline-offset: -3px; }
.lib-selbar { margin: 0 0 14px; }

/* The session view: media as figures in capture order */
.lib-fig { margin: 0 0 20px; }
.lib-fig img {
  width: 100%; max-height: 540px; object-fit: contain; display: block;
  background: #101b28; border: 1px solid var(--line); border-radius: 10px; cursor: zoom-in;
}
.lib-fig-cap { display: block; margin-top: 7px; font-size: 14.5px; }
.lib-fig-sub { display: block; margin-top: 2px; font-size: 12.5px; color: var(--muted); }
.lib-line { margin-bottom: 10px; }
/* The Bundle 9 Files rules that stood here moved to files.css
 * (fluid-width pass, 2026-10-16 — styles.css upload ceiling). */

/* wave146-settings-look: a row-shaped set-form (Fiscal year's month/day/save) */
.set-form.set-rowflex { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.set-form.set-rowflex label { margin: 0; }
.set-form.set-rowflex select, .set-form.set-rowflex input[type="number"] {
  display: block; margin-top: 6px; padding: 10px 12px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 14.5px; background: #fff; color: var(--ink);
}
.set-form.set-rowflex input[type="number"] { width: 5.5em; }

/* ---------- wave548: the collapsible main rail ----------
 * Micheal's pick from Pipedrive's divider (2026-11-10): click to
 * collapse the rail to icons. The device choice (rkRailMin) is
 * stamped pre-paint by index-inline.js; rail-toggle.js wires it.
 * Desktop only; the project rail keeps its own fold. */
.rail-toggle {
  display: flex; align-items: center; gap: 10px;
  width: 100%; margin: 0 0 6px; padding: 7px 12px;
  background: none; border: 0; border-radius: 8px;
  color: inherit; font: inherit; font-size: 13px;
  cursor: pointer; text-align: left; opacity: .75;
}
.rail-toggle:hover { opacity: 1; background: rgba(127, 147, 179, .14); }
.rail-toggle .rail-toggle-ico { display: inline-flex; flex: none; }
.rail-toggle .rail-toggle-ico svg { transition: transform .18s ease; }
body.in-project .rail-toggle { display: none; }
@media (max-width: 900px) {
  .rail-toggle { display: none; }
}
@media (min-width: 901px) {
  body.rail-min:not(.in-project) #topbar {
    width: var(--rail-w); padding: 18px 8px 14px;
  }
  body.rail-min:not(.in-project):has(#topbar:not(.hidden)) #app { margin-left: var(--rail-w); }
  body:not(.in-project) #topbar,
  body:not(.in-project) #app { transition: width .18s ease, margin-left .18s ease; }
  body.rail-min:not(.in-project) .brand { align-items: center; padding: 2px 0 10px; }
  body.rail-min:not(.in-project) .brand .brand-lockup-img,
  body.rail-min:not(.in-project) .brand .topbar-logo { display: none; }
  /* wave559: the global chrome row was built as one horizontal
   * [search field][bell] row for the open rail. At 64px those two
   * controls cannot share a row — the search squeezed and the bell
   * spilled past the rail. In the folded rail they stack as two
   * centred 40px icon buttons, the same shape as the nav below. */
  body.rail-min:not(.in-project) #topbar .gc-row {
    flex-direction: column; justify-content: center; gap: 6px;
    width: 100%; margin: 0 0 8px; padding: 0;
  }
  body.rail-min:not(.in-project) #topbar .gs-trigger {
    flex: none; width: 40px; height: 40px; padding: 0; justify-content: center;
  }
  body.rail-min:not(.in-project) #topbar .gs-trigger .gs-trigger-t,
  body.rail-min:not(.in-project) #topbar .gs-trigger .gs-kbd { display: none; }
  body.rail-min:not(.in-project) #topbar .nb-wrap { justify-content: center; }
  body.rail-min:not(.in-project) #topbar .nb-bell { width: 40px; height: 40px; }
  body.rail-min:not(.in-project) #topbar nav .navbtn {
    justify-content: center; gap: 0; padding-left: 0; padding-right: 0;
    font-size: 0; letter-spacing: 0;
  }
  body.rail-min:not(.in-project) #topbar nav .navbtn .fy-badge { margin-left: 0; }
  body.rail-min:not(.in-project) .nav-sec { display: none; }
  body.rail-min:not(.in-project) .rail-toggle { justify-content: center; padding-left: 0; padding-right: 0; }
  body.rail-min:not(.in-project) .rail-toggle .rail-toggle-tx { display: none; }
  body.rail-min:not(.in-project) .rail-toggle .rail-toggle-ico svg { transform: rotate(180deg); }
  body.rail-min:not(.in-project) .userbox { align-items: center; padding: 14px 0 2px; }
  body.rail-min:not(.in-project) .userbox #user-email,
  body.rail-min:not(.in-project) .userbox #btn-logout,
  body.rail-min:not(.in-project) .userbox .userbox-caret { display: none; }
}

/* ---- wave549/552: the collapsed rail's hover name tag. wave549's
 * ::after bubble targeted '.sidebar .navitem', markup that does not
 * exist, and could never have painted anyway: #topbar is an
 * overflow-y:auto scroll box, so a bubble sticking out of the folded
 * 64px rail gets clipped. wave552: rail-toggle.js stamps data-tip on
 * the real '#topbar nav .navbtn' items and positions this body-level
 * fixed tag itself. ---- */
#rail-tip{position:fixed;transform:translateY(-50%);background:#0b2235;color:#fff;font-size:12.5px;font-weight:600;line-height:1.2;padding:5px 10px;border-radius:8px;white-space:nowrap;z-index:200;pointer-events:none;box-shadow:0 4px 14px rgba(11,34,53,.28);opacity:0;transition:opacity .12s ease}
#rail-tip.on{opacity:1}

/* ---- wave550: collapsed means FULL width. The shell itself is uncapped
 * (#app max-width:none), but several top-level views carry their own wrapper
 * caps — .obl-wrap 1240, .invt-wrap 1320, .km-page 1240, .rt-wrap 1240,
 * #training-root 1100 — so on a wide screen those pages stopped at their cap
 * with dead space to the right, rail folded or not (the owner's three
 * screenshots, 2026-11-10: Projects board stretches, Obligations and
 * Inventory do not). In the collapsed rail ONLY, the caps lift and the
 * views take the whole width the fold freed. Expanded keeps the caps —
 * the standing measures — and forms/reading surfaces (.sp-main and kin)
 * keep theirs in both states. ---- */
@media (min-width: 901px) {
  body.rail-min:not(.in-project) .obl-wrap,
  body.rail-min:not(.in-project) .invt-wrap,
  body.rail-min:not(.in-project) .km-page,
  body.rail-min:not(.in-project) .rt-wrap,
  body.rail-min:not(.in-project) #training-root { max-width: none; }
}
