/* BMB Portal — house look (white + black rail + BMB blue). Colors live ONLY in
   these tokens; pages use var(--…), never hex or inline style="". */
:root {
  --page: #f6f7f9;  --card: #ffffff;  --ink: #16212e;  --muted: #5b6877;  --faint: #8b96a3;
  --line: #e3e7ec;  --line-strong: #cfd6de;
  --rail: #0f1114;  --rail-ink: #e9edf2;  --rail-muted: #9aa4b0;
  --brand: #00679b;  --brand-ink: #ffffff;  --brand-tint: #e6f1f7;
  --gold: #c9a24a;
  --pos: #1e8a5a;  --neg: #c0392b;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --page: #101418;  --card: #171c22;  --ink: #e8edf2;  --muted: #a3adb8;  --faint: #7d8894;
    --line: #262d35;  --line-strong: #353e48;
    --brand: #3a9ad0;  --brand-tint: #14283a;
    --pos: #4ec9a0;  --neg: #f0705f;
  }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: -apple-system, "Segoe UI", Helvetica, Arial, sans-serif; background: var(--page); color: var(--ink); font-size: 16px; -webkit-font-smoothing: antialiased; }
a { color: var(--brand); }

.shell { display: flex; min-height: 100vh; }
.rail { width: 220px; flex: none; background: var(--rail); color: var(--rail-ink); display: flex; flex-direction: column; padding: 22px 14px; }
.rail .logo { display: block; margin: 0 auto 6px; width: 132px; }
.rail .tag { text-align: center; color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0.12em; margin-bottom: 18px; }
.rail nav a { display: block; color: var(--rail-ink); text-decoration: none; padding: 9px 12px; border-radius: 999px; font-size: 14.5px; font-weight: 600; margin-bottom: 4px; }
.rail nav a:hover { background: rgba(255,255,255,0.07); }
.rail nav a.on { background: var(--brand); color: var(--brand-ink); }
.rail nav .grp { color: var(--gold); font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; margin: 14px 12px 4px; }
.rail nav .comms { margin-top: 6px; }   /* Email & Phone group, no box ([jared] 10/10) */
.rail nav .comms a:last-child { margin-bottom: 0; }
main:has(.tabframe) { padding: 0; }
.tabframe { display: block; width: 100%; height: 100vh; border: 0; background: var(--page); }
.rail .who { margin-top: auto; font-size: 12px; color: var(--rail-muted); padding: 0 6px; line-height: 1.6; }
.rail .who b { color: var(--rail-ink); }
.rail .who a { color: var(--rail-muted); }

main { flex: 1; min-width: 0; padding: 28px 32px; }
h1 { font-family: "Playfair Display", Georgia, serif; font-weight: 600; font-size: 30px; margin: 0 0 4px; }
.sub { color: var(--muted); font-size: 14px; margin-bottom: 20px; }
.card { background: var(--card); border: 1px solid var(--line); border-left: 5px solid var(--brand); border-radius: 12px; padding: 18px 22px; margin-bottom: 18px; max-width: 1080px; }
.card h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); margin: 0 0 8px; }
.empty { color: var(--muted); font-size: 14.5px; line-height: 1.6; }

.btn { display: inline-block; background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 999px; padding: 10px 18px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; }

/* Login */
.loginwrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; background: var(--rail); }
.loginbox { background: var(--card); border-radius: 14px; padding: 28px 26px; width: 100%; max-width: 360px; }
.loginbox .logo { display: block; width: 150px; margin: 0 auto 16px; background: var(--rail); padding: 12px; border-radius: 10px; }
.loginbox label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 4px; }
.loginbox input { width: 100%; font-size: 16px; padding: 10px 12px; border: 1px solid var(--line-strong); border-radius: 8px; background: var(--card); color: var(--ink); }
.loginbox .btn { width: 100%; margin-top: 18px; }
.loginbox .err { color: var(--neg); font-size: 14px; margin-top: 10px; }

@media (max-width: 820px) {
  .shell { flex-direction: column; }
  .rail { width: 100%; padding: 12px 16px; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; }
  .rail .logo { width: 96px; margin: 0; }
  .rail .tag { display: none; }
  .rail nav { display: flex; gap: 6px; overflow-x: auto; width: 100%; }
  .rail nav a { white-space: nowrap; margin: 0; }
  .rail nav .grp { display: none; }
  .tabframe { height: calc(100vh - 110px); }
  .rail .who { margin: 0 0 0 auto; }
  main { padding: 18px 16px; }
}

/* View as (pages/view_as.py, [jared] 10/9): partner previews a seat's portal, read-only. */
.rail .viewas { font-size: 12px; color: var(--rail-muted); padding: 0 6px 10px; line-height: 1.8; }
.rail .viewas a { color: var(--rail-ink); text-decoration: none; border: 1px solid rgba(255,255,255,0.18); border-radius: 999px; padding: 1px 9px; margin-left: 2px; }
.rail .viewas a.on { background: var(--gold); border-color: var(--gold); color: var(--rail); }
.viewbar { background: var(--gold); color: var(--rail); font-size: 13.5px; font-weight: 600; padding: 9px 16px; border-radius: 10px; margin-bottom: 14px; }
.viewbar a { color: var(--rail); }

/* Collapsible menu rail ([jared] 10/9). */
.rail { position: relative; }
.railhide { position: absolute; top: 10px; right: 10px; background: none; border: 1px solid rgba(255,255,255,0.18); color: var(--rail-muted); border-radius: 999px; width: 26px; height: 26px; cursor: pointer; font-size: 14px; line-height: 1; }
.railhide:hover { color: var(--rail-ink); }
.railshow { display: none; position: fixed; top: 10px; left: 10px; z-index: 50; background: var(--rail); color: var(--rail-ink); border: 0; border-radius: 999px; padding: 6px 12px; font-size: 12.5px; font-weight: 700; cursor: pointer; }
.shell.norail .rail { display: none; }
.shell.norail .railshow { display: block; }

/* Inbox icons under the rail: tabs hidden from a seat's menu but kept reachable ([jared] 10/9) */
.rail .inbox { display: flex; gap: 6px; padding: 4px 6px 12px; flex-wrap: wrap; }
.rail .inbox a { color: var(--rail-ink); text-decoration: none; font-size: 13px; font-weight: 600; padding: 6px 12px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; }
.rail .inbox a:hover { background: rgba(255,255,255,.07); } .rail .inbox a.on { background: var(--brand); border-color: var(--brand); }

/* Jobs-first menu + job pages for the Project Manager seat ([jared] 10/9) */
.rail nav a.jobln { display: flex; align-items: center; gap: 9px; font-size: 13.5px; padding: 8px 12px; }
.jdot { width: 10px; height: 10px; border-radius: 50%; flex: none; display: inline-block; }
.rail nav a.jobln .jdot { box-shadow: 0 0 0 1.5px rgba(255,255,255,.25); }
main:has(.jobframe) { display: flex; flex-direction: column; height: 100vh; }
.jobhd { padding: 16px 24px 0; background: var(--card); border-bottom: 1px solid var(--line); flex: none; }
.jobt { display: flex; align-items: center; gap: 12px; }
.jobt small { color: var(--muted); font-size: 12px; font-weight: 600; }
.jobt h1 { margin: 0; font-size: 22px; }
.jobt .jdot { width: 14px; height: 14px; }
.jobtabs { display: flex; gap: 24px; margin-top: 12px; overflow-x: auto; }
.jobtabs a { padding: 8px 2px 11px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; border-bottom: 3px solid transparent; white-space: nowrap; }
.jobtabs a.on { color: var(--brand); border-bottom-color: var(--brand); }
.jobframe { flex: 1; height: auto; min-height: 0; }
.jobcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-top: 16px; }
.jobcard { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.jobcard .jc-name { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 16px; color: var(--ink); text-decoration: none; }
.jobcard .jc-stage { color: var(--muted); font-size: 12.5px; margin: 4px 0 10px 20px; }
.jobcard .jc-links { display: flex; flex-wrap: wrap; gap: 6px; margin-left: 20px; }
.jobcard .jc-links a { font-size: 12.5px; font-weight: 600; color: var(--brand); text-decoration: none; border: 1px solid var(--line-strong); border-radius: 999px; padding: 3px 10px; }

/* Site-visit header ([jared] 10/9: tools are their own pages; the job page is just the visit) */
.jobhd.visit { display: flex; align-items: center; gap: 16px; padding: 12px 20px; flex-wrap: wrap; }
.jobhd.visit .back { color: var(--brand); text-decoration: none; font-weight: 700; font-size: 14px; }
.jobhd.visit .stops { margin-left: auto; display: flex; gap: 8px; }
.jobhd.visit .stops a { border: 1px solid var(--line-strong); border-radius: 999px; padding: 6px 14px; color: var(--ink); text-decoration: none; font-weight: 700; font-size: 14px; }
