:root {
  --bg: #f3f5f8;
  --panel: #ffffff;
  --panel-soft: #f7f9fc;
  --ink: #071326;
  --muted: #5a6680;
  --line: #e4e7ec;
  --line-strong: #d0d5dd;
  --green: #004425;
  --green-2: #05603a;
  --gold: #c18519;
  --gold-soft: #fbf5e6;
  --blue: #175cd3;
  --red: #b42318;
  --orange: #b54708;
  --shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  --rail: 292px;
  --radius: 8px;
}

* { box-sizing: border-box; }
html, body, #app { min-height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Aptos", "Segoe UI", Calibri, sans-serif;
  font-size: 14px;
  letter-spacing: 0;
}
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; }
.platform {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  min-height: 100vh;
}
.rail {
  background: #000a16;
  border-right: 1px solid #101c2e;
  padding: 18px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand-lockup {
  display: grid;
  grid-template-columns: 42px 1fr;
  gap: 10px;
  align-items: center;
  min-height: 52px;
}
.brand-lockup img { width: 42px; height: 42px; object-fit: contain; }
.brand-kicker { color: #ffffff; font-weight: 800; font-size: 12px; letter-spacing: .08em; }
.brand-sub { color: #9aa6ba; font-size: 11px; text-transform: uppercase; }
.account-card {
  border: 1px solid #1b2a40;
  border-radius: var(--radius);
  background: #071326;
  padding: 12px;
}
.avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--green);
  color: white;
  font-weight: 800;
  margin-right: 10px;
}
.account-row { display: flex; align-items: center; }
.account-name { font-weight: 800; color: #ffffff; }
.account-role { color: #a7b1c2; font-size: 12px; margin-top: 2px; }
.switch-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mode-btn {
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--ink);
  border-radius: 6px;
  padding: 8px 9px;
  font-size: 12px;
  font-weight: 750;
}
.mode-btn.active { background: var(--green); border-color: var(--green); color: white; }
.nav-group { display: flex; flex-direction: column; gap: 5px; }
.nav-title {
  color: var(--muted);
  font-weight: 850;
  font-size: 11px;
  text-transform: uppercase;
  margin: 10px 4px 4px;
}
.nav-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  border: 1px solid transparent;
  background: transparent;
  color: #dbe3ef;
  border-radius: 6px;
  padding: 9px 10px;
  text-align: left;
  font-size: 13px;
  font-weight: 720;
}
.nav-btn:hover { background: #071326; }
.nav-btn.active { background: #fff6e6; border-color: #d9a536; color: #4c3100; }
.nav-meta { font-size: 10px; color: var(--muted); font-weight: 800; }
.system-status {
  margin-top: auto;
  border: 1px solid #1b2a40;
  background: #071326;
  border-radius: var(--radius);
  padding: 12px;
}
.status-line { display: flex; justify-content: space-between; gap: 8px; font-size: 12px; color: #dbe3ef; }
.status-dot { width: 8px; height: 8px; background: #12b76a; border-radius: 50%; display: inline-block; margin-right: 6px; }
.main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}
.topbar {
  height: 68px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.search {
  width: min(520px, 48vw);
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--muted);
  background: #fcfcfd;
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.select {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: white;
  padding: 9px 10px;
  min-width: 190px;
}
.btn {
  border: 1px solid var(--line-strong);
  background: white;
  color: var(--ink);
  border-radius: 6px;
  padding: 9px 12px;
  font-weight: 800;
  font-size: 13px;
}
.btn.primary { background: var(--green); color: white; border-color: var(--green); }
.btn.gold { background: var(--gold); color: #1a1304; border-color: var(--gold); }
.btn.danger { background: #fef3f2; color: var(--red); border-color: #fecdca; }
.workspace { padding: 28px; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 22px;
}
.eyebrow { color: var(--green); font-weight: 850; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
h1 { margin: 4px 0 6px; font-size: 30px; line-height: 1.1; }
.lede { color: var(--muted); margin: 0; max-width: 780px; }
.breadcrumb { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.hero-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  min-width: 230px;
  box-shadow: var(--shadow);
}
.grid { display: grid; gap: 16px; }
.grid.kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.card.highlight { border-color: #e0c37a; background: linear-gradient(180deg, #fffdf7, #fff); }
.card-title { margin: 0 0 12px; font-size: 16px; }
.kpi-label { color: var(--muted); text-transform: uppercase; font-size: 11px; font-weight: 850; }
.kpi-value { font-size: 28px; font-weight: 900; margin: 5px 0; }
.kpi-sub { color: var(--muted); font-size: 12px; }
.pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 4px 9px;
  font-size: 11px;
  font-weight: 850;
  border: 1px solid transparent;
  white-space: nowrap;
}
.pill.green { color: #067647; background: #ecfdf3; border-color: #abefc6; }
.pill.gold { color: #7a4f00; background: #fffaeb; border-color: #fedf89; }
.pill.blue { color: #175cd3; background: #eff8ff; border-color: #b2ddff; }
.pill.red { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.pill.gray { color: #475467; background: #f2f4f7; border-color: #eaecf0; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 12px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.table th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.progress { height: 9px; background: #eaecf0; border-radius: 999px; overflow: hidden; }
.progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--green), var(--gold)); }
.timeline { display: flex; flex-direction: column; gap: 12px; }
.timeline-item { border-left: 3px solid var(--gold); padding-left: 12px; }
.small { color: var(--muted); font-size: 12px; }
.split-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.tier-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}
.tier-box {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fff;
}
.tier-box.recommended { border-color: var(--gold); background: var(--gold-soft); }
.tier-box.current { border-color: var(--green); }
.factor-list { margin: 0; padding-left: 18px; color: var(--muted); }
.factor-list li { margin: 7px 0; }
.notice {
  border: 1px solid #fedf89;
  background: #fffaeb;
  color: #5f4210;
  border-radius: var(--radius);
  padding: 12px;
  font-size: 13px;
}
.client-theme .brand-kicker, .client-theme .eyebrow { color: #006b3f; }
.client-theme .mode-btn.active, .client-theme .btn.primary, .client-theme .avatar { background: #006b3f; border-color: #006b3f; }
.staff-theme .mode-btn.active, .staff-theme .btn.primary, .staff-theme .avatar { background: #003d29; border-color: #003d29; }
.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  background: #101828;
  color: white;
  padding: 12px 14px;
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: none;
  z-index: 20;
}
.toast.show { display: block; }

@media (max-width: 1050px) {
  .platform { grid-template-columns: 1fr; }
  .rail { position: relative; width: 100%; height: auto; }
  .topbar { position: relative; height: auto; flex-wrap: wrap; gap: 12px; padding: 16px; }
  .search { width: 100%; }
  .workspace { padding: 18px; }
  .grid.kpis, .grid.two, .grid.three, .tier-band { grid-template-columns: 1fr; }
  .hero { grid-template-columns: 1fr; }
}

.intake-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
}
.intake-row:last-child { border-bottom: 0; }
.intake-status { display: grid; gap: 8px; }
.mini-metric {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fff;
  min-height: 110px;
}
.mini-value {
  font-size: 20px;
  line-height: 1.2;
  font-weight: 900;
  margin: 7px 0;
}
.review-stack {
  display: grid;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 12px;
}
.review-stack .split-row {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.review-stack .split-row:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

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

.workflow-steps {
  display: grid;
  grid-template-columns: repeat(11, minmax(110px, 1fr));
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
}
.workflow-step {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: #fff;
  padding: 10px;
  min-height: 82px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.workflow-step strong {
  font-size: 12px;
  line-height: 1.2;
}
.workflow-step span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}
.workflow-step.active {
  border-color: #e0c37a;
  background: #fffaf0;
}

@media (max-width: 1050px) {
  .workflow-steps { grid-template-columns: repeat(11, 130px); }
}

.page-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}
.action-cluster {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.summary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.summary-strip > div {
  background: #fff;
  padding: 13px 14px;
  min-width: 0;
}
.summary-strip span {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
  margin-bottom: 4px;
}
.summary-strip strong {
  display: block;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.progress.large { height: 12px; }
.milestone-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}
.milestone-row span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px;
  background: #fff;
  text-align: center;
}

@media (max-width: 900px) {
  .page-actions { grid-template-columns: 1fr; }
  .action-cluster { flex-wrap: wrap; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .milestone-row { grid-template-columns: 1fr; }
}

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

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.form-grid input,
.form-grid select {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px 11px;
  color: var(--ink);
  background: #fff;
  text-transform: none;
  font-weight: 700;
  width: 100%;
}

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

.grid.kpis-five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

@media (max-width: 1180px) {
  .grid.kpis-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

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

.landing-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 40px;
  background:
    linear-gradient(90deg, rgba(12, 68, 45, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(12, 68, 45, 0.045) 1px, transparent 1px),
    radial-gradient(circle at 18% 18%, rgba(193, 133, 25, 0.22), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(0, 68, 37, 0.14), transparent 30%),
    linear-gradient(135deg, #fbfaf6 0%, #eef4ef 52%, #f6f8fb 100%);
  background-size: 44px 44px, 44px 44px, auto, auto, auto;
  position: relative;
  overflow: hidden;
}
.landing-page::before {
  content: "";
  position: absolute;
  inset: 28px;
  border: 1px solid rgba(0, 68, 37, 0.1);
  pointer-events: none;
}
.landing-page::after {
  content: "";
  position: absolute;
  width: 52vw;
  height: 52vw;
  right: -28vw;
  bottom: -32vw;
  border: 1px solid rgba(193, 133, 25, 0.26);
  transform: rotate(38deg);
  pointer-events: none;
}
.landing-panel {
  width: min(1220px, 100%);
  min-height: 650px;
  background: linear-gradient(135deg, #ffffff 0%, #f9fbf8 58%, #fffaf0 100%);
  border: 1px solid rgba(0, 68, 37, 0.14);
  border-radius: 8px;
  box-shadow: 0 32px 80px rgba(7, 19, 38, 0.16);
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) 420px;
  gap: 0;
  align-items: stretch;
  position: relative;
  z-index: 1;
  overflow: hidden;
}
.landing-copy {
  padding: 42px 40px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  background:
    linear-gradient(115deg, rgba(0, 68, 37, 0.04), transparent 44%),
    linear-gradient(180deg, #ffffff 0%, rgba(255, 255, 255, 0.78) 100%);
}
.landing-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 24px;
  border-bottom: 1px solid rgba(0, 68, 37, 0.12);
}
.landing-brand img { height: 64px; width: auto; object-fit: contain; }
.landing-brand span {
  color: #41526a;
  font-weight: 900;
  font-size: 11px;
  text-transform: uppercase;
  text-align: right;
  max-width: 310px;
}
.landing-main-copy {
  max-width: 720px;
  padding: 46px 0 22px;
}
.landing-copy h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(44px, 5vw, 70px);
  line-height: 0.98;
  margin: 10px 0 18px;
  max-width: 720px;
  letter-spacing: 0;
}
.landing-copy .lede {
  font-size: 16px;
  line-height: 1.72;
  max-width: 650px;
  color: #43536b;
}
.landing-command-preview {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border: 1px solid rgba(0, 68, 37, 0.14);
  background: rgba(255, 255, 255, 0.72);
}
.landing-command-preview div {
  padding: 18px;
  display: grid;
  gap: 6px;
}
.landing-command-preview div + div { border-left: 1px solid rgba(0, 68, 37, 0.12); }
.landing-command-preview span {
  color: var(--gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.landing-command-preview strong {
  color: var(--green);
  font-size: 22px;
}
.landing-command-preview em {
  color: #58667a;
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}
.login-panel {
  border-left: 1px solid rgba(0, 68, 37, 0.14);
  border-radius: 0;
  background: #071326;
  padding: 42px 36px;
  display: grid;
  align-content: center;
  gap: 16px;
  color: white;
}
.login-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 4px;
}
.login-panel-head span {
  color: #c9a447;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.login-panel-head h2 {
  margin: 5px 0 0;
  font-size: 28px;
  line-height: 1;
  color: #fff;
}
.login-panel-head b {
  border: 1px solid rgba(201, 164, 71, 0.42);
  color: #f7d77b;
  border-radius: 999px;
  padding: 6px 9px;
  font-size: 11px;
  text-transform: uppercase;
}
.login-panel label {
  display: grid;
  gap: 8px;
  color: #bdc8d8;
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.login-panel input {
  border: 1px solid rgba(215, 224, 231, 0.18);
  border-radius: 4px;
  padding: 14px 13px;
  color: #ffffff;
  background: rgba(255, 255, 255, 0.08);
  font-size: 15px;
  text-transform: none;
  outline: none;
}
.login-panel input::placeholder { color: #8d9bad; }
.login-panel input:focus {
  border-color: #d6b45c;
  box-shadow: 0 0 0 3px rgba(214, 180, 92, 0.18);
  background: rgba(255, 255, 255, 0.11);
}
.login-panel .btn.primary {
  min-height: 48px;
  border-radius: 4px;
  background: #f1c85d;
  border-color: #f1c85d;
  color: #071326;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.26);
}
.login-panel .btn.primary:hover {
  background: #ffd978;
  border-color: #ffd978;
  transform: translateY(-1px);
}
.login-examples { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.login-examples button,
.session-row button {
  border: 1px solid var(--line-strong);
  background: #fff;
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
}
.login-panel .notice {
  border-color: rgba(201, 164, 71, 0.28);
  background: rgba(201, 164, 71, 0.08);
  color: #e8edf4;
}
.login-trust-list {
  display: grid;
  gap: 8px;
  padding-top: 4px;
}
.login-trust-list span {
  position: relative;
  color: #b7c3d3;
  font-size: 12px;
  padding-left: 18px;
}
.login-trust-list span::before {
  content: "";
  position: absolute;
  left: 0;
  top: 5px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #c9a447;
  box-shadow: 0 0 0 4px rgba(201, 164, 71, 0.12);
}
.session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
.session-row span {
  color: var(--muted);
  font-size: 12px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .landing-page { padding: 18px; place-items: start center; }
  .landing-page::before { inset: 10px; }
  .landing-panel { grid-template-columns: 1fr; min-height: auto; }
  .landing-copy { padding: 24px; }
  .landing-brand { align-items: flex-start; flex-direction: column; }
  .landing-main-copy { padding: 26px 0 4px; }
  .landing-copy h1 { font-size: 39px; }
  .landing-command-preview { grid-template-columns: 1fr; }
  .landing-command-preview div + div { border-left: 0; border-top: 1px solid rgba(0, 68, 37, 0.12); }
  .login-panel { border-left: 0; padding: 28px 24px; }
}

/* Public website and dedicated authentication */
.public-site,
.auth-page {
  --public-ink: #071426;
  --public-midnight: #091a2b;
  --public-green: #003f32;
  --public-green-2: #005844;
  --public-gold: #c7a35a;
  --public-ivory: #fbfaf6;
  --public-stone: #e9e5da;
  min-height: 100vh;
  background: var(--public-ivory);
  color: var(--public-ink);
}
.public-site {
  overflow-x: hidden;
}
.public-site::selection,
.auth-page::selection {
  background: rgba(199, 163, 90, 0.34);
}
.public-nav {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 28px;
  align-items: center;
  padding: 18px clamp(20px, 4vw, 64px);
  background: rgba(251, 250, 246, 0.86);
  border-bottom: 1px solid rgba(9, 26, 43, 0.08);
  backdrop-filter: blur(18px);
  transition: padding 260ms ease, background 260ms ease, box-shadow 260ms ease;
}
.public-scrolled .public-nav {
  padding-top: 12px;
  padding-bottom: 12px;
  background: rgba(251, 250, 246, 0.96);
  box-shadow: 0 12px 34px rgba(9, 26, 43, 0.08);
}
.public-brand {
  border: 0;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 0;
  color: var(--public-green);
}
.public-brand img {
  width: 118px;
  height: auto;
  object-fit: contain;
}
.public-brand span {
  color: #526071;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
}
.public-nav nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2.4vw, 32px);
}
.public-nav a,
.public-footer a,
.public-footer button {
  color: #3f4f63;
  text-decoration: none;
  font-size: 12px;
  font-weight: 850;
  text-transform: uppercase;
}
.public-nav-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}
.public-nav-actions button,
.public-hero-actions button,
.closing-cta button {
  border: 1px solid var(--public-green);
  background: var(--public-green);
  color: #fff;
  min-height: 42px;
  padding: 0 16px;
  font-weight: 900;
  border-radius: 2px;
}
.public-nav-actions .staff-link {
  background: transparent;
  color: var(--public-green);
}
.public-nav a:focus-visible,
.public-nav button:focus-visible,
.public-hero-actions a:focus-visible,
.public-hero-actions button:focus-visible,
.auth-card button:focus-visible,
.auth-card input:focus-visible,
.auth-return:focus-visible {
  outline: 3px solid rgba(199, 163, 90, 0.5);
  outline-offset: 3px;
}
.public-hero {
  min-height: calc(100vh - 78px);
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(420px, 1.05fr);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  padding: clamp(48px, 8vw, 116px) clamp(20px, 5vw, 86px);
  background:
    linear-gradient(90deg, rgba(9, 26, 43, 0.055) 1px, transparent 1px),
    linear-gradient(0deg, rgba(9, 26, 43, 0.04) 1px, transparent 1px),
    radial-gradient(circle at 80% 20%, rgba(199, 163, 90, 0.16), transparent 31%),
    linear-gradient(135deg, #fbfaf6 0%, #f7f4ec 56%, #eef3ef 100%);
  background-size: 64px 64px, 64px 64px, auto, auto;
}
.public-kicker {
  color: var(--public-gold);
  font-weight: 950;
  font-size: 11px;
  text-transform: uppercase;
}
.public-hero h1,
.public-section h2,
.member-story h2,
.operating-section h2,
.closing-cta h2,
.auth-card h1 {
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}
.public-hero h1 {
  max-width: 780px;
  margin: 16px 0 20px;
  font-size: clamp(58px, 7.2vw, 108px);
  line-height: 0.9;
}
.public-hero-copy {
  animation: publicTextRise 820ms ease both;
}
.public-hero p {
  max-width: 610px;
  color: #425168;
  font-size: clamp(17px, 1.55vw, 22px);
  line-height: 1.65;
}
.public-hero-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 30px;
}
.public-hero-actions a,
.closing-cta a {
  color: var(--public-green);
  text-decoration: none;
  font-weight: 900;
  border-bottom: 1px solid rgba(0, 63, 50, 0.28);
}
.public-hero-visual {
  position: relative;
  min-height: 560px;
  display: grid;
  place-items: center;
}
.blueprint-constellation {
  width: min(100%, 680px);
  height: auto;
  overflow: visible;
}
.bp-frame {
  fill: rgba(255, 255, 255, 0.42);
  stroke: rgba(0, 63, 50, 0.22);
}
.bp-grid {
  stroke: rgba(0, 63, 50, 0.09);
  stroke-width: 1;
}
.bp-line {
  fill: none;
  stroke: url(#bqtLine);
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-dasharray: 720;
  stroke-dashoffset: 720;
  animation: blueprintDraw 1800ms ease forwards;
}
.path-two { animation-delay: 180ms; }
.path-three { animation-delay: 340ms; }
.bp-node circle:first-child {
  fill: var(--public-green);
}
.bp-node circle:nth-child(2) {
  fill: none;
  stroke: rgba(199, 163, 90, 0.44);
  transform-origin: center;
  animation: nodePulse 4.8s ease-in-out infinite;
  animation-delay: calc(var(--i) * 220ms);
}
.bp-node text {
  fill: #243448;
  font-size: 13px;
  font-weight: 800;
  opacity: 0;
  animation: publicTextRise 650ms ease forwards;
  animation-delay: calc(620ms + var(--i) * 80ms);
}
.bp-core circle {
  fill: rgba(0, 63, 50, 0.94);
  stroke: rgba(199, 163, 90, 0.7);
}
.bp-core text {
  fill: #fffaf0;
  text-anchor: middle;
  font-weight: 900;
  font-size: 14px;
  text-transform: uppercase;
}
.instrument-caption {
  position: absolute;
  right: 4%;
  bottom: 8%;
  border-left: 2px solid var(--public-gold);
  padding-left: 14px;
}
.instrument-caption span {
  display: block;
  color: var(--public-gold);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}
.instrument-caption strong {
  display: block;
  margin-top: 4px;
  color: var(--public-green);
}
.public-section,
.member-story,
.operating-section,
.principles-section,
.closing-cta {
  padding: clamp(70px, 10vw, 136px) clamp(20px, 5vw, 86px);
}
.public-section {
  display: grid;
  grid-template-columns: 80px minmax(240px, 0.72fr) minmax(0, 1fr);
  gap: clamp(24px, 4vw, 68px);
  align-items: start;
  border-top: 1px solid rgba(9, 26, 43, 0.09);
}
.section-index,
.principles-rail span {
  color: var(--public-gold);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
}
.public-section h2,
.member-story h2,
.operating-section h2,
.closing-cta h2 {
  margin: 10px 0 0;
  font-size: clamp(34px, 4.8vw, 72px);
  line-height: 0.98;
}
.public-section p,
.member-story p,
.operating-section p {
  color: #44546a;
  font-size: 18px;
  line-height: 1.75;
  margin: 0;
}
.blueprint-layers {
  display: grid;
  gap: 10px;
}
.blueprint-layers div {
  display: grid;
  grid-template-columns: 54px 1fr;
  align-items: center;
  border-top: 1px solid rgba(0, 63, 50, 0.16);
  padding: 18px 0;
  transform: translateY(18px);
  opacity: 0;
  animation: publicTextRise 680ms ease forwards;
  animation-delay: calc(120ms + var(--i) * 90ms);
}
.blueprint-layers span {
  color: var(--public-gold);
  font-weight: 950;
}
.blueprint-layers strong {
  color: var(--public-green);
  font-size: 22px;
}
.intelligence-section {
  background: #071426;
  color: #fff;
}
.intelligence-section h2,
.intelligence-section .section-index {
  color: #fffaf0;
}
.intelligence-section p {
  color: #cad4df;
}
.intelligence-copy {
  display: grid;
  gap: 26px;
}
.intelligence-copy ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}
.intelligence-copy li {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding-top: 14px;
  color: #f2efe7;
  font-weight: 800;
}
.member-story {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 0.7fr);
  gap: clamp(28px, 6vw, 88px);
  align-items: center;
}
.member-stage {
  border: 1px solid rgba(0, 63, 50, 0.18);
  background: #fff;
  box-shadow: 0 26px 70px rgba(9, 26, 43, 0.1);
}
.member-stage div {
  padding: 28px;
  display: grid;
  gap: 8px;
}
.member-stage div + div {
  border-top: 1px solid rgba(0, 63, 50, 0.12);
}
.member-stage span {
  color: var(--public-gold);
  font-weight: 950;
  text-transform: uppercase;
  font-size: 11px;
}
.member-stage strong {
  font-size: 24px;
  color: var(--public-green);
}
.operating-section {
  background: linear-gradient(135deg, #f7f4ec, #fbfaf6);
}
.operating-section h2,
.operating-section p {
  max-width: 980px;
}
.principles-section {
  display: grid;
  grid-template-columns: 220px repeat(4, minmax(0, 1fr));
  gap: 0;
  background: var(--public-midnight);
  color: #fff;
}
.principles-rail,
.principles-section article {
  min-height: 310px;
  border-left: 1px solid rgba(255, 255, 255, 0.14);
  padding: 24px;
}
.principles-rail {
  border-left: 0;
}
.principles-rail strong {
  display: block;
  margin-top: 16px;
  color: #f8f2df;
  text-transform: uppercase;
}
.principles-section h3 {
  margin: 0 0 90px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  color: #f8f2df;
}
.principles-section p {
  color: #cbd5e1;
  line-height: 1.65;
}
.closing-cta {
  min-height: 520px;
  display: grid;
  align-content: center;
  justify-items: start;
  background:
    linear-gradient(rgba(251, 250, 246, 0.86), rgba(251, 250, 246, 0.86)),
    linear-gradient(90deg, rgba(0, 63, 50, 0.12) 1px, transparent 1px);
  background-size: auto, 72px 72px;
}
.closing-cta h2 {
  max-width: 980px;
  margin: 12px 0 28px;
}
.closing-cta div {
  display: flex;
  align-items: center;
  gap: 18px;
}
.public-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: 24px;
  align-items: center;
  padding: 30px clamp(20px, 5vw, 86px);
  background: #071426;
  color: #d9e1ea;
}
.public-footer nav {
  display: flex;
  gap: 18px;
  align-items: center;
}
.public-footer a,
.public-footer button {
  color: #d9e1ea;
  background: transparent;
  border: 0;
  padding: 0;
}
.public-footer span {
  text-align: right;
  color: #aab7c7;
}
.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 32px;
  background:
    radial-gradient(circle at 22% 16%, rgba(199, 163, 90, 0.18), transparent 30%),
    linear-gradient(135deg, #06111f 0%, #091a2b 56%, #003f32 100%);
  position: relative;
  overflow: hidden;
}
.auth-return {
  position: fixed;
  top: 24px;
  left: 24px;
  z-index: 5;
  color: #e8edf4;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  padding: 10px 12px;
  border-radius: 2px;
  font-weight: 850;
}
.auth-shell {
  width: min(1120px, 100%);
  min-height: 680px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 430px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(7, 20, 38, 0.64);
  box-shadow: 0 40px 90px rgba(0, 0, 0, 0.32);
}
.auth-atmosphere {
  display: grid;
  place-items: center;
  opacity: 0.78;
  padding: 38px;
}
.auth-atmosphere .bp-frame {
  fill: rgba(255, 255, 255, 0.035);
  stroke: rgba(199, 163, 90, 0.26);
}
.auth-atmosphere .bp-grid {
  stroke: rgba(255, 255, 255, 0.08);
}
.auth-atmosphere .bp-node text {
  fill: #dbe5ee;
}
.auth-card {
  display: grid;
  align-content: center;
  gap: 15px;
  padding: 44px 38px;
  background: #fbfaf6;
}
.auth-card img {
  width: 132px;
  height: auto;
  margin-bottom: 12px;
}
.auth-card h1 {
  margin: 0;
  font-size: 54px;
  line-height: 0.96;
}
.auth-card p {
  margin: 0 0 10px;
  color: #4d5d70;
}
.auth-card label {
  display: grid;
  gap: 7px;
  color: #526071;
  font-size: 11px;
  font-weight: 950;
  text-transform: uppercase;
}
.auth-card input {
  min-height: 48px;
  border: 1px solid rgba(9, 26, 43, 0.18);
  border-radius: 2px;
  padding: 0 13px;
  background: #fff;
  color: var(--public-ink);
  outline: none;
}
.auth-card input:focus {
  border-color: var(--public-gold);
  box-shadow: 0 0 0 4px rgba(199, 163, 90, 0.18);
}
.auth-submit {
  min-height: 50px;
  border: 1px solid var(--public-green);
  background: var(--public-green);
  color: #fff;
  font-weight: 950;
  border-radius: 2px;
}
.auth-submit:disabled,
.auth-card input:disabled {
  opacity: 0.72;
  cursor: wait;
}
.auth-message {
  min-height: 42px;
  border-left: 2px solid var(--public-gold);
  padding: 10px 12px;
  color: #425168;
  background: #f5f1e7;
  font-size: 13px;
}
.auth-message.error {
  border-left-color: var(--red);
  background: #fff3f1;
  color: #8a1f15;
}
.auth-message.success,
.auth-message.loading {
  border-left-color: var(--public-green);
  background: #edf7f2;
  color: var(--public-green);
}
.forgot-link {
  justify-self: start;
  border: 0;
  background: transparent;
  padding: 0;
  color: var(--public-green);
  font-weight: 900;
}
.auth-demo {
  margin-top: 4px;
}
@keyframes blueprintDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes nodePulse {
  0%, 100% { opacity: 0.38; transform: scale(1); }
  50% { opacity: 0.95; transform: scale(1.22); }
}
@keyframes publicTextRise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 1080px) {
  .public-nav {
    grid-template-columns: 1fr auto;
  }
  .public-nav nav {
    display: none;
  }
  .public-hero,
  .member-story,
  .auth-shell {
    grid-template-columns: 1fr;
  }
  .public-hero-visual {
    min-height: 420px;
  }
  .public-section {
    grid-template-columns: 52px 1fr;
  }
  .public-section > p,
  .public-section > .blueprint-layers,
  .public-section > .intelligence-copy {
    grid-column: 2;
  }
  .principles-section {
    grid-template-columns: 1fr 1fr;
  }
  .principles-rail {
    grid-column: 1 / -1;
    min-height: auto;
  }
  .public-footer {
    grid-template-columns: 1fr;
  }
  .public-footer span {
    text-align: left;
  }
  .auth-atmosphere {
    min-height: 360px;
  }
}
@media (max-width: 640px) {
  .public-nav {
    padding: 14px 16px;
    gap: 12px;
  }
  .public-brand img {
    width: 94px;
  }
  .public-brand span,
  .public-nav-actions .staff-link {
    display: none;
  }
  .public-nav-actions button {
    min-height: 38px;
    padding: 0 12px;
  }
  .public-hero {
    min-height: auto;
    padding: 58px 18px 44px;
    grid-template-columns: 1fr;
  }
  .public-hero h1 {
    font-size: clamp(48px, 15vw, 66px);
  }
  .public-hero p,
  .public-section p,
  .member-story p,
  .operating-section p {
    font-size: 16px;
  }
  .public-hero-actions,
  .closing-cta div {
    align-items: stretch;
    flex-direction: column;
  }
  .public-hero-visual {
    min-height: 310px;
  }
  .instrument-caption {
    position: static;
    margin-top: 12px;
  }
  .public-section,
  .member-story,
  .operating-section,
  .principles-section,
  .closing-cta {
    padding: 66px 18px;
  }
  .public-section {
    grid-template-columns: 1fr;
  }
  .public-section > p,
  .public-section > .blueprint-layers,
  .public-section > .intelligence-copy {
    grid-column: auto;
  }
  .principles-section {
    grid-template-columns: 1fr;
  }
  .principles-rail,
  .principles-section article {
    min-height: auto;
    border-left: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.14);
  }
  .principles-section h3 {
    margin-bottom: 22px;
  }
  .member-stage div {
    padding: 22px;
  }
  .public-footer nav {
    align-items: flex-start;
    flex-direction: column;
  }
  .auth-page {
    padding: 74px 14px 18px;
    place-items: start center;
  }
  .auth-return {
    top: 14px;
    left: 14px;
  }
  .auth-shell {
    min-height: auto;
  }
  .auth-atmosphere {
    display: none;
  }
  .auth-card {
    padding: 30px 22px;
  }
  .auth-card h1 {
    font-size: 44px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    scroll-behavior: auto !important;
    transition-duration: 0.001ms !important;
  }
}


.chart-grid .card {
  min-height: 230px;
}
.chart-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.donut-wrap {
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
}
.donut {
  --accent: #2f6f61;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--accent) calc(var(--value) * 1%), #e7edf0 0);
  position: relative;
  box-shadow: inset 0 0 0 1px rgba(15, 23, 42, 0.06);
}
.donut::after {
  content: "";
  position: absolute;
  inset: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: inset 0 0 0 1px var(--line);
}
.donut span {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 23px;
  font-weight: 900;
}
.donut.blue { --accent: #366d92; }
.donut.green { --accent: #2f6f61; }
.donut.gold { --accent: #c8a24a; }
.bar-list {
  display: grid;
  gap: 12px;
}
.bar-row .split-row {
  align-items: center;
  margin-bottom: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.bar-row .split-row strong {
  color: var(--ink);
  font-size: 12px;
}
.bar-track {
  height: 10px;
  border-radius: 999px;
  background: #e7edf0;
  overflow: hidden;
  border: 1px solid var(--line);
}
.bar-track span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #2f6f61, #c8a24a);
}
.metric-panel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.metric-panel div {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: #fff;
  min-height: 78px;
  display: grid;
  align-content: space-between;
}
.metric-panel span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.metric-panel strong {
  font-size: 20px;
  line-height: 1.1;
}
.stage-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 12px;
}
.stage-column {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  min-height: 210px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.stage-column .split-row {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
  margin-bottom: 10px;
}
.stage-column .split-row strong {
  color: var(--ink);
  font-size: 14px;
}
.stage-client {
  border: 1px solid var(--line);
  border-left: 4px solid #2f6f61;
  border-radius: 6px;
  padding: 10px;
  margin-top: 8px;
  font-size: 13px;
  font-weight: 800;
  background: var(--panel-soft);
}

@media (max-width: 980px) {
  .donut-wrap { grid-template-columns: 1fr; }
  .stage-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .metric-panel { grid-template-columns: 1fr; }
  .stage-board { grid-template-columns: 1fr; }
}

.calendar-board {
  display: grid;
  grid-template-columns: repeat(5, minmax(160px, 1fr));
  gap: 12px;
}
.calendar-day {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px;
  min-height: 250px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.calendar-day .split-row {
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 10px;
}
.calendar-day .split-row strong { font-size: 15px; }
.calendar-day .split-row span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}
.meeting-chip {
  display: grid;
  gap: 3px;
  border: 1px solid var(--line);
  border-left: 4px solid #c8a24a;
  border-radius: 6px;
  padding: 9px;
  margin-top: 8px;
  background: var(--panel-soft);
}
.meeting-chip span,
.meeting-chip em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}
.meeting-chip strong { font-size: 13px; line-height: 1.25; }
.vault-grid,
.integration-grid,
.settings-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.vault-folder,
.integration-tile,
.settings-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px;
  min-height: 132px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.folder-tab {
  width: 58px;
  height: 12px;
  background: #dbe8e4;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: 7px 7px 0 0;
  margin-bottom: 12px;
}
.vault-folder .split-row,
.integration-tile .split-row {
  align-items: center;
  gap: 8px;
}
.vault-folder > span,
.integration-tile > span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  margin-top: 12px;
}
.workspace-list {
  display: grid;
  gap: 10px;
}
.workspace-list > strong {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
}
.workspace-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 12px;
}
.workspace-row span { font-weight: 850; }
.workspace-row em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}
.preview-sheet {
  min-height: 160px;
  border: 1px solid var(--line-strong);
  border-radius: 7px;
  background: linear-gradient(180deg, #fff, #f7f9f8);
  padding: 16px;
  display: grid;
  align-content: start;
  gap: 10px;
  margin-bottom: 14px;
}
.preview-sheet strong { font-size: 18px; }
.preview-sheet span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}
.settings-block {
  display: grid;
  align-content: start;
  gap: 10px;
}
.settings-block label {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel-soft);
  padding: 9px;
  font-size: 13px;
  font-weight: 800;
}
.settings-block input { accent-color: #2f6f61; }

@media (max-width: 1160px) {
  .calendar-board { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .vault-grid,
  .integration-grid,
  .settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .calendar-board,
  .vault-grid,
  .integration-grid,
  .settings-grid { grid-template-columns: 1fr; }
}

.avatar {
  position: relative;
  overflow: hidden;
  flex: 0 0 auto;
}
.avatar strong {
  position: relative;
  z-index: 1;
}
.avatar.has-photo {
  background: #071326;
  border: 1px solid #c18519;
}
.avatar.has-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 2;
}
.photo-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  margin-top: 10px;
  border: 1px solid #24344d;
  background: #020d1c;
  color: #e9edf5;
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 12px;
  font-weight: 850;
}
.photo-upload input {
  display: none;
}
.rail .small,
.rail .nav-title,
.rail .nav-meta,
.rail .session-row span {
  color: #9aa6ba;
}
.rail .session-row {
  border-top-color: #1c2a40;
}
.rail .session-row button {
  border-color: #2d3d56;
  background: #fff;
}
.staff-dashboard {
  display: grid;
  gap: 16px;
}
.dashboard-welcome {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 16px;
  align-items: stretch;
}
.dashboard-welcome h1 {
  margin: 4px 0 6px;
  font-size: 32px;
  line-height: 1.08;
}
.dashboard-hero-card {
  border: 1px solid var(--line);
  border-top: 4px solid var(--gold);
  border-radius: 8px;
  background: #fff;
  padding: 16px;
  display: grid;
  align-content: center;
  gap: 4px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.03);
}
.dashboard-hero-card span,
.dashboard-hero-card em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 850;
  text-transform: uppercase;
}
.dashboard-hero-card strong {
  font-size: 34px;
  line-height: 1;
}
.compact-summary {
  margin-bottom: 0;
}
.compact-summary > div {
  padding: 11px 14px;
}
.staff-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
}
.dashboard-card {
  min-height: 0;
  padding: 18px 20px;
}
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }
.pipeline-snapshot {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.pipeline-stage-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  padding: 12px;
  display: grid;
  gap: 9px;
  min-height: 126px;
}
.pipeline-stage-card strong { font-size: 13px; }
.pipeline-stage-card .split-row span {
  color: var(--green);
  font-size: 20px;
  font-weight: 900;
}
.pipeline-stage-card em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 850;
}
.alert-card {
  border-color: #e5c36b;
  background: #fffdf8;
}
.alert-count {
  width: 30px;
  height: 30px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  background: #071326;
  color: #fff;
  font-weight: 900;
}
.dashboard-alert {
  border-left: 4px solid var(--gold);
  padding: 9px 0 9px 12px;
  display: grid;
  gap: 3px;
}
.dashboard-alert + .dashboard-alert { border-top: 1px solid #f0dfb2; }
.dashboard-alert strong { font-size: 13px; }
.dashboard-alert span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}
.dashboard-alert.red { border-left-color: var(--red); }
.dashboard-alert.blue { border-left-color: var(--blue); }
.blueprint-progress-list,
.workflow-queue-list,
.dashboard-mini-rows {
  display: grid;
  gap: 10px;
}
.blueprint-progress-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 12px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
}
.blueprint-progress-row:last-child { border-bottom: 0; padding-bottom: 0; }
.blueprint-progress-row strong,
.workflow-queue-list strong { font-size: 14px; }
.blueprint-progress-row span,
.blueprint-progress-row em,
.workflow-queue-list span,
.workflow-queue-list em {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.blueprint-progress-row em { margin-bottom: 5px; }
.admin-center-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.admin-center-tile {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-soft);
  color: var(--ink);
  padding: 13px;
  display: grid;
  gap: 5px;
  text-align: left;
  min-height: 96px;
}
.admin-center-tile:hover { border-color: var(--gold); background: #fffaf0; }
.admin-center-tile strong { font-size: 14px; }
.admin-center-tile span { font-size: 20px; font-weight: 900; }
.admin-center-tile em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.donut-wrap.compact {
  grid-template-columns: 104px minmax(0, 1fr);
  margin-bottom: 10px;
}
.donut-wrap.compact .donut {
  width: 104px;
  height: 104px;
}
.donut-wrap.compact .donut::after { inset: 15px; }
.dashboard-mini-rows div,
.workflow-queue-list div {
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--panel-soft);
  padding: 10px;
}
.dashboard-mini-rows div {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.dashboard-mini-rows span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.dashboard-mini-rows strong { font-size: 15px; text-align: right; }
.workflow-queue-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.workflow-queue-list strong {
  color: var(--green);
  font-size: 24px;
}
.btn.full {
  width: 100%;
  justify-content: center;
  margin-top: 12px;
}

@media (max-width: 1180px) {
  .span-4,
  .span-6,
  .span-8 { grid-column: span 12; }
  .pipeline-snapshot { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .dashboard-welcome { grid-template-columns: 1fr; }
  .pipeline-snapshot,
  .admin-center-grid,
  .workflow-queue-list { grid-template-columns: 1fr; }
  .blueprint-progress-row { grid-template-columns: 1fr; }
}

/* Phase 14C: executive light-shell refinement for CEO dashboard alignment. */
:root {
  --bg: #f3f6f8;
  --panel: #ffffff;
  --panel-soft: #f7fafb;
  --ink: #071626;
  --muted: #607089;
  --line: #dfe6ec;
  --line-strong: #c8d3dd;
  --green: #064a35;
  --green-2: #0f6b50;
  --gold: #b8872f;
  --gold-soft: #fff6e4;
  --blue: #24577a;
  --shadow: 0 14px 34px rgba(25, 45, 68, 0.08);
  --rail: 292px;
}
body {
  background: #f3f6f8;
}
.rail {
  background: linear-gradient(180deg, #eef4f8 0%, #e7eef5 100%);
  border-right: 1px solid #cbd8e3;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.75);
}
.brand-kicker {
  color: #063f32;
  letter-spacing: .03em;
}
.brand-sub,
.rail .nav-title,
.rail .nav-meta,
.rail .small,
.rail .session-row span {
  color: #64748b;
}
.account-card,
.system-status {
  background: rgba(255,255,255,0.82);
  border-color: #d4dee7;
  box-shadow: 0 10px 28px rgba(25, 45, 68, 0.07);
}
.account-name {
  color: #071626;
}
.account-role {
  color: #5f6f84;
}
.avatar {
  background: linear-gradient(135deg, #064a35, #0d6b50);
  box-shadow: 0 0 0 3px #e8f2ee;
}
.avatar.has-photo {
  background: #fff;
  border-color: var(--gold);
}
.photo-upload {
  background: #fff;
  color: #0e263f;
  border-color: #cbd8e3;
}
.photo-upload:hover {
  border-color: var(--gold);
  background: #fffaf0;
}
.nav-btn {
  color: #20324a;
  border-radius: 7px;
  padding: 10px 11px;
}
.nav-btn:hover {
  background: rgba(255,255,255,0.68);
  border-color: #d7e1ea;
}
.nav-btn.active {
  background: #ffffff;
  border-color: #d8ad54;
  color: #071626;
  box-shadow: 0 8px 22px rgba(184, 135, 47, 0.12);
}
.status-line {
  color: #20324a;
}
.rail .session-row {
  border-top-color: #d8e2eb;
}
.rail .session-row button {
  border-color: #cbd8e3;
  background: #ffffff;
  color: #071626;
}
.topbar {
  height: 66px;
  background: rgba(255,255,255,0.95);
  backdrop-filter: blur(10px);
  border-bottom-color: #dfe6ec;
}
.search,
.select,
.btn {
  border-color: #c8d3dd;
  border-radius: 7px;
}
.btn.primary {
  background: #064a35;
  border-color: #064a35;
}
.workspace {
  padding: 20px 28px 28px;
}
.staff-dashboard {
  gap: 14px;
}
.dashboard-welcome {
  grid-template-columns: minmax(0, 1fr) 210px;
  gap: 14px;
  padding: 2px 0 0;
}
.dashboard-welcome h1 {
  font-size: 28px;
  letter-spacing: 0;
}
.dashboard-welcome .lede {
  max-width: 980px;
  font-size: 13px;
  line-height: 1.45;
}
.dashboard-hero-card {
  border-color: #dfe6ec;
  border-top-color: var(--gold);
  box-shadow: 0 10px 26px rgba(25, 45, 68, 0.07);
  padding: 14px;
}
.dashboard-hero-card strong {
  font-size: 29px;
}
.compact-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-radius: 8px;
  background: #dfe6ec;
}
.compact-summary > div {
  padding: 12px 14px;
  min-height: 66px;
}
.compact-summary strong {
  font-size: 16px;
}
.staff-dashboard-grid {
  gap: 14px;
}
.dashboard-card {
  padding: 16px;
  border-color: #dfe6ec;
  box-shadow: 0 8px 22px rgba(25, 45, 68, 0.055);
}
.card-title {
  font-size: 17px;
  letter-spacing: 0;
}
.pipeline-snapshot,
.admin-center-grid {
  gap: 10px;
}
.pipeline-stage-card,
.admin-center-tile,
.dashboard-mini-rows div,
.workflow-queue-list div {
  background: #f8fbfc;
  border-color: #dfe6ec;
}
.pipeline-stage-card {
  min-height: 112px;
  padding: 12px 13px;
}
.pipeline-stage-card .split-row span,
.workflow-queue-list strong {
  color: #064a35;
}
.bar-track {
  background: #e6edf2;
  border-color: #d9e3eb;
}
.bar-track span {
  background: linear-gradient(90deg, #0f6b50, #b8872f);
}
.alert-card {
  background: #fffdf8;
  border-color: #e5c477;
}
.alert-count {
  background: #0e263f;
}
.dashboard-alert + .dashboard-alert {
  border-top-color: #ead8aa;
}
.admin-center-tile:hover {
  background: #fffaf0;
  border-color: #d8ad54;
}
.admin-center-tile span {
  color: #071626;
}
.donut.green,
.donut.blue,
.donut.gold {
  --accent: #0f6b50;
}
.donut.gold {
  --accent: #b8872f;
}

@media (max-width: 1180px) {
  .compact-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .compact-summary { grid-template-columns: 1fr; }
}

/* Phase 14D: missing CEO dashboard widgets. */
.portfolio-command {
  background: linear-gradient(135deg, #ffffff 0%, #f7fbfc 58%, #fffaf0 100%);
  border-color: #d7e1ea;
}
.portfolio-command-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.portfolio-metric {
  border: 1px solid #dfe6ec;
  border-radius: 8px;
  background: rgba(255,255,255,0.82);
  padding: 13px;
  display: grid;
  gap: 5px;
  min-height: 92px;
}
.portfolio-metric span,
.meeting-list span,
.document-overview span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}
.portfolio-metric strong {
  color: #071626;
  font-size: 22px;
  line-height: 1.1;
}
.portfolio-metric em,
.meeting-list em {
  color: var(--muted);
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}
.meeting-list {
  display: grid;
  gap: 10px;
}
.meeting-list div {
  border: 1px solid #dfe6ec;
  border-left: 4px solid var(--gold);
  border-radius: 8px;
  background: #f8fbfc;
  padding: 10px 11px;
  display: grid;
  gap: 3px;
}
.meeting-list strong {
  font-size: 14px;
}
.quick-action-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}
.quick-action {
  min-height: 58px;
  border: 1px solid #c8d3dd;
  border-radius: 8px;
  background: #ffffff;
  color: #071626;
  font-weight: 900;
  text-align: center;
  box-shadow: 0 6px 16px rgba(25,45,68,0.045);
}
.quick-action:hover {
  border-color: var(--gold);
  background: #fffaf0;
}
.document-overview {
  display: grid;
  gap: 9px;
}
.doc-overview-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid #dfe6ec;
  border-left: 4px solid #24577a;
  border-radius: 8px;
  background: #f8fbfc;
  padding: 10px 11px;
}
.doc-overview-row strong {
  font-size: 18px;
}
.doc-overview-row.green { border-left-color: #0f6b50; }
.doc-overview-row.gold { border-left-color: #b8872f; }
.doc-overview-row.blue { border-left-color: #24577a; }
.doc-overview-row.red { border-left-color: #b42318; }

@media (max-width: 1180px) {
  .portfolio-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 720px) {
  .portfolio-command-grid,
  .quick-action-grid { grid-template-columns: 1fr; }
}

/* Phase 14E: dashboard grid repair after portfolio card overlap. */
.staff-dashboard-grid {
  grid-auto-flow: row dense;
  align-items: start;
}
.portfolio-command {
  overflow: hidden;
}
.portfolio-command .split-row {
  align-items: center;
}
.portfolio-command-grid {
  width: 100%;
  min-width: 0;
}
.portfolio-metric {
  min-width: 0;
}
.portfolio-metric strong,
.portfolio-metric span,
.portfolio-metric em {
  overflow-wrap: anywhere;
}
@media (max-width: 1180px) {
  .span-12 { grid-column: span 12; }
}
/* Phase 14F: card color and icon system for CEO dashboard taste. */
.icon-title {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 0;
  min-width: 0;
}
.icon-title span:last-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.dashboard-icon {
  --icon-bg: #eef4f8;
  --icon-fg: #24577a;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: var(--icon-bg);
  color: var(--icon-fg);
  box-shadow: inset 0 0 0 1px rgba(7,22,38,0.07);
}
.dashboard-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.dashboard-card {
  position: relative;
  overflow: hidden;
}
.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--card-accent, #dfe6ec);
}
.dashboard-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 56px;
  background: linear-gradient(90deg, var(--card-wash, transparent), transparent 70%);
  pointer-events: none;
}
.dashboard-card > * {
  position: relative;
  z-index: 1;
}
.tone-pipeline { --card-accent: #0f6b50; --card-wash: rgba(15,107,80,0.09); }
.tone-alert { --card-accent: #b8872f; --card-wash: rgba(184,135,47,0.12); }
.tone-portfolio { --card-accent: #24577a; --card-wash: rgba(36,87,122,0.10); }
.tone-meetings { --card-accent: #7a5a18; --card-wash: rgba(184,135,47,0.10); }
.tone-actions { --card-accent: #064a35; --card-wash: rgba(6,74,53,0.10); }
.tone-documents { --card-accent: #3f6f92; --card-wash: rgba(63,111,146,0.10); }
.tone-blueprint { --card-accent: #355f7d; --card-wash: rgba(53,95,125,0.09); }
.tone-admin { --card-accent: #8a6b26; --card-wash: rgba(184,135,47,0.09); }
.tone-ai { --card-accent: #426a74; --card-wash: rgba(66,106,116,0.10); }
.tone-rae { --card-accent: #0f6b50; --card-wash: rgba(15,107,80,0.10); }
.tone-team { --card-accent: #566f86; --card-wash: rgba(86,111,134,0.10); }
.tone-workflow { --card-accent: #b8872f; --card-wash: rgba(184,135,47,0.10); }
.tone-clients { --card-accent: #064a35; --card-wash: rgba(6,74,53,0.09); }
.dashboard-icon.pipeline,
.dashboard-icon.rae,
.dashboard-icon.bolt,
.dashboard-icon.clients { --icon-bg: #e8f3ef; --icon-fg: #064a35; }
.dashboard-icon.alert,
.dashboard-icon.calendar,
.dashboard-icon.admin,
.dashboard-icon.workflow { --icon-bg: #fff2d7; --icon-fg: #8a5d13; }
.dashboard-icon.portfolio,
.dashboard-icon.document,
.dashboard-icon.blueprint { --icon-bg: #e8f1f7; --icon-fg: #24577a; }
.dashboard-icon.ai,
.dashboard-icon.team { --icon-bg: #edf4f5; --icon-fg: #426a74; }
.pipeline-stage-card,
.admin-center-tile,
.portfolio-metric,
.meeting-list div,
.quick-action,
.doc-overview-row,
.dashboard-mini-rows div,
.workflow-queue-list div {
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 8px 18px rgba(25,45,68,0.035);
}
.pipeline-stage-card:hover,
.admin-center-tile:hover,
.quick-action:hover,
.doc-overview-row:hover,
.meeting-list div:hover {
  transform: translateY(-1px);
  transition: transform .16s ease, border-color .16s ease, background .16s ease;
}
.quick-action:nth-child(1) { border-top: 3px solid #064a35; }
.quick-action:nth-child(2) { border-top: 3px solid #24577a; }
.quick-action:nth-child(3) { border-top: 3px solid #b8872f; }
.quick-action:nth-child(4) { border-top: 3px solid #566f86; }
.portfolio-metric:nth-child(1) { border-top: 3px solid #064a35; }
.portfolio-metric:nth-child(2) { border-top: 3px solid #24577a; }
.portfolio-metric:nth-child(3) { border-top: 3px solid #b8872f; }
.portfolio-metric:nth-child(4) { border-top: 3px solid #566f86; }
.admin-center-tile:nth-child(1) { border-top: 3px solid #24577a; }
.admin-center-tile:nth-child(2) { border-top: 3px solid #566f86; }
.admin-center-tile:nth-child(3) { border-top: 3px solid #064a35; }
.admin-center-tile:nth-child(4) { border-top: 3px solid #b8872f; }

/* Phase 14G: richer CEO-reference color treatment without returning to black. */
:root {
  --bg: #eef4f7;
  --panel-soft: #f5faf9;
  --green: #005a3c;
  --green-2: #12805c;
  --gold: #c18a24;
  --blue: #1f5f8b;
  --red: #b52b22;
}
.workspace {
  background:
    linear-gradient(180deg, rgba(31,95,139,0.045), transparent 260px),
    #eef4f7;
}
.rail {
  background:
    linear-gradient(180deg, rgba(0,90,60,0.08), transparent 240px),
    linear-gradient(180deg, #f1f7f9 0%, #e4edf4 100%);
}
.brand-lockup img {
  filter: drop-shadow(0 6px 12px rgba(193,138,36,0.24));
}
.dashboard-hero-card {
  background: linear-gradient(135deg, #ffffff 0%, #f4fbf9 50%, #fff4d9 100%);
  border-top-width: 5px;
}
.compact-summary > div:nth-child(1) { box-shadow: inset 0 4px 0 #005a3c; }
.compact-summary > div:nth-child(2) { box-shadow: inset 0 4px 0 #1f5f8b; }
.compact-summary > div:nth-child(3) { box-shadow: inset 0 4px 0 #c18a24; }
.compact-summary > div:nth-child(4) { box-shadow: inset 0 4px 0 #12805c; }
.compact-summary > div:nth-child(5) { box-shadow: inset 0 4px 0 #7b5b19; }
.dashboard-card {
  border-color: color-mix(in srgb, var(--card-accent, #dfe6ec) 24%, #dfe6ec);
  box-shadow: 0 12px 26px rgba(25,45,68,0.075), inset 0 1px 0 rgba(255,255,255,0.92);
}
.dashboard-card::before {
  width: 6px;
  background: linear-gradient(180deg, var(--card-accent, #dfe6ec), color-mix(in srgb, var(--card-accent, #dfe6ec) 45%, white));
}
.dashboard-card::after {
  height: 88px;
  background:
    linear-gradient(115deg, var(--card-wash, transparent), transparent 72%),
    radial-gradient(circle at 92% 18%, color-mix(in srgb, var(--card-accent, #dfe6ec) 15%, transparent), transparent 34%);
}
.tone-pipeline { --card-accent: #007a55; --card-wash: rgba(0,122,85,0.16); }
.tone-alert { --card-accent: #c18a24; --card-wash: rgba(193,138,36,0.18); }
.tone-portfolio { --card-accent: #1f5f8b; --card-wash: rgba(31,95,139,0.17); }
.tone-meetings { --card-accent: #d39a2e; --card-wash: rgba(211,154,46,0.16); }
.tone-actions { --card-accent: #005a3c; --card-wash: rgba(0,90,60,0.16); }
.tone-documents { --card-accent: #2b77a8; --card-wash: rgba(43,119,168,0.16); }
.tone-blueprint { --card-accent: #315f91; --card-wash: rgba(49,95,145,0.15); }
.tone-admin { --card-accent: #b77d18; --card-wash: rgba(183,125,24,0.16); }
.tone-ai { --card-accent: #257784; --card-wash: rgba(37,119,132,0.16); }
.tone-rae { --card-accent: #00825f; --card-wash: rgba(0,130,95,0.16); }
.tone-team { --card-accent: #657c99; --card-wash: rgba(101,124,153,0.16); }
.tone-workflow { --card-accent: #c18a24; --card-wash: rgba(193,138,36,0.16); }
.tone-clients { --card-accent: #006347; --card-wash: rgba(0,99,71,0.16); }
.dashboard-icon {
  color: #ffffff;
  box-shadow: 0 10px 18px color-mix(in srgb, var(--icon-fg, #1f5f8b) 28%, transparent), inset 0 1px 0 rgba(255,255,255,0.32);
}
.dashboard-icon.pipeline,
.dashboard-icon.rae,
.dashboard-icon.bolt,
.dashboard-icon.clients { --icon-bg: linear-gradient(135deg, #005a3c, #14a06f); --icon-fg: #005a3c; }
.dashboard-icon.alert,
.dashboard-icon.calendar,
.dashboard-icon.admin,
.dashboard-icon.workflow { --icon-bg: linear-gradient(135deg, #9a6513, #dba33a); --icon-fg: #9a6513; }
.dashboard-icon.portfolio,
.dashboard-icon.document,
.dashboard-icon.blueprint { --icon-bg: linear-gradient(135deg, #1f5f8b, #3a96c8); --icon-fg: #1f5f8b; }
.dashboard-icon.ai,
.dashboard-icon.team { --icon-bg: linear-gradient(135deg, #257784, #63a9b4); --icon-fg: #257784; }
.bar-track span {
  background: linear-gradient(90deg, #007a55, #d39a2e 76%, #e7bc55);
}
.pipeline-stage-card,
.admin-center-tile,
.portfolio-metric,
.meeting-list div,
.quick-action,
.doc-overview-row,
.dashboard-mini-rows div,
.workflow-queue-list div {
  background: linear-gradient(180deg, rgba(255,255,255,0.92), rgba(247,251,252,0.96));
  border-color: color-mix(in srgb, var(--card-accent, #dfe6ec) 18%, #dfe6ec);
}
.quick-action {
  background: linear-gradient(180deg, #ffffff, #f5faf9);
}
.quick-action:nth-child(1) { background: linear-gradient(180deg, #ffffff, #edf8f4); }
.quick-action:nth-child(2) { background: linear-gradient(180deg, #ffffff, #edf5fb); }
.quick-action:nth-child(3) { background: linear-gradient(180deg, #ffffff, #fff6e3); }
.quick-action:nth-child(4) { background: linear-gradient(180deg, #ffffff, #f2f6fa); }
.doc-overview-row.green { background: linear-gradient(90deg, rgba(0,122,85,0.08), #fff); }
.doc-overview-row.gold { background: linear-gradient(90deg, rgba(193,138,36,0.10), #fff); }
.doc-overview-row.blue { background: linear-gradient(90deg, rgba(31,95,139,0.09), #fff); }
.doc-overview-row.red { background: linear-gradient(90deg, rgba(181,43,34,0.08), #fff); }
.alert-card {
  background: linear-gradient(180deg, #fffaf0, #ffffff 62%);
}
.alert-count {
  background: linear-gradient(135deg, #1f5f8b, #005a3c);
}
.nav-btn.active {
  background: linear-gradient(90deg, #fff8e8, #ffffff);
  border-color: #d49b31;
  box-shadow: 0 8px 22px rgba(193,138,36,0.18);
}
.btn.primary {
  background: linear-gradient(135deg, #005a3c, #087a58);
  border-color: #005a3c;
}

/* Phase 14H: restore original-reference rich navy/gold staff dashboard treatment. */
:root {
  --bg: #eef2f5;
  --panel-soft: #f6f9fb;
  --ink: #061323;
  --muted: #56657a;
  --green: #007a55;
  --green-2: #12a06f;
  --gold: #c98920;
  --blue: #1f6ea5;
  --red: #c7372f;
  --shadow: 0 18px 42px rgba(0, 8, 20, 0.11);
}

.staff-theme .rail {
  background:
    radial-gradient(circle at 28px 26px, rgba(201,137,32,0.34), transparent 92px),
    linear-gradient(180deg, #000814 0%, #07172b 48%, #0c233a 100%);
  border-right-color: #1b3856;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.06), 14px 0 34px rgba(0,8,20,0.16);
}

.staff-theme .brand-kicker,
.staff-theme .account-name,
.staff-theme .status-line {
  color: #ffffff;
}

.staff-theme .brand-sub,
.staff-theme .rail .nav-title,
.staff-theme .rail .nav-meta,
.staff-theme .rail .small,
.staff-theme .rail .session-row span,
.staff-theme .account-role {
  color: #b9c5d4;
}

.staff-theme .account-card,
.staff-theme .system-status {
  background: linear-gradient(180deg, rgba(255,255,255,0.12), rgba(255,255,255,0.06));
  border-color: rgba(255,255,255,0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 18px 32px rgba(0,0,0,0.18);
}

.staff-theme .nav-btn {
  color: #dce6f2;
}

.staff-theme .nav-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.14);
}

.staff-theme .nav-btn.active {
  background: linear-gradient(90deg, #613c09 0%, #c98920 100%);
  border-color: #e2ad43;
  color: #fff8e8;
  box-shadow: 0 14px 26px rgba(201,137,32,0.25);
}

.staff-theme .rail .session-row {
  border-top-color: rgba(255,255,255,0.12);
}

.staff-theme .rail .session-row button,
.staff-theme .photo-upload {
  background: rgba(255,255,255,0.1);
  border-color: rgba(255,255,255,0.18);
  color: #ffffff;
}

.staff-theme .workspace {
  background:
    radial-gradient(circle at 18% 0%, rgba(31,110,165,0.12), transparent 360px),
    radial-gradient(circle at 92% 8%, rgba(201,137,32,0.15), transparent 300px),
    #eef2f5;
}

.staff-dashboard {
  gap: 16px;
}

.staff-theme .dashboard-welcome {
  background:
    linear-gradient(115deg, rgba(0,8,20,0.98), rgba(8,35,56,0.96) 58%, rgba(97,60,9,0.92)),
    linear-gradient(90deg, #000814, #0d2c4a);
  border: 1px solid #143557;
  border-radius: 8px;
  padding: 18px 20px;
  box-shadow: 0 20px 44px rgba(0,8,20,0.18);
}

.staff-theme .dashboard-welcome .eyebrow {
  color: #f0b84a;
}

.staff-theme .dashboard-welcome h1,
.staff-theme .dashboard-welcome .lede {
  color: #ffffff;
}

.staff-theme .dashboard-welcome .lede {
  color: #c8d4e3;
}

.staff-theme .dashboard-hero-card {
  background: linear-gradient(145deg, #fff5d8 0%, #ffffff 52%, #dff4ee 100%);
  border-color: #dca23c;
  border-top-color: #f0b84a;
  box-shadow: 0 18px 34px rgba(0,8,20,0.2);
}

.staff-theme .dashboard-hero-card strong {
  color: #005a3c;
}

.staff-theme .compact-summary {
  background: transparent;
  gap: 10px;
}

.staff-theme .compact-summary > div {
  border: 1px solid rgba(255,255,255,0.88);
  background: linear-gradient(145deg, #ffffff 0%, var(--summary-tint, #f5faf9) 100%);
  box-shadow: 0 14px 28px rgba(0,8,20,0.08), inset 0 4px 0 var(--summary-accent, #c98920);
}

.staff-theme .compact-summary > div:nth-child(1) { --summary-accent: #007a55; --summary-tint: #e6f8f1; }
.staff-theme .compact-summary > div:nth-child(2) { --summary-accent: #1f6ea5; --summary-tint: #e8f4fb; }
.staff-theme .compact-summary > div:nth-child(3) { --summary-accent: #c98920; --summary-tint: #fff3d7; }
.staff-theme .compact-summary > div:nth-child(4) { --summary-accent: #12a06f; --summary-tint: #e4fbf3; }
.staff-theme .compact-summary > div:nth-child(5) { --summary-accent: #7a4d11; --summary-tint: #fff1cf; }

.staff-theme .dashboard-card {
  border-color: color-mix(in srgb, var(--card-accent, #1f6ea5) 42%, #dce5ee);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent, #1f6ea5) 13%, #ffffff) 0%, #ffffff 44%, color-mix(in srgb, var(--card-accent, #1f6ea5) 8%, #ffffff) 100%);
  box-shadow: 0 18px 34px rgba(0,8,20,0.1), inset 0 1px 0 rgba(255,255,255,0.96);
}

.staff-theme .dashboard-card::before {
  width: 8px;
  background: linear-gradient(180deg, var(--card-accent, #1f6ea5), color-mix(in srgb, var(--card-accent, #1f6ea5) 62%, #f0b84a));
}

.staff-theme .dashboard-card::after {
  height: 116px;
  background:
    radial-gradient(circle at 92% 12%, color-mix(in srgb, var(--card-accent, #1f6ea5) 30%, transparent), transparent 34%),
    linear-gradient(110deg, color-mix(in srgb, var(--card-accent, #1f6ea5) 18%, transparent), transparent 66%);
}

.staff-theme .tone-pipeline { --card-accent: #007a55; }
.staff-theme .tone-alert { --card-accent: #c98920; }
.staff-theme .tone-portfolio { --card-accent: #1f6ea5; }
.staff-theme .tone-meetings { --card-accent: #d99725; }
.staff-theme .tone-actions { --card-accent: #005a3c; }
.staff-theme .tone-documents { --card-accent: #2485c1; }
.staff-theme .tone-blueprint { --card-accent: #24689a; }
.staff-theme .tone-admin { --card-accent: #b87313; }
.staff-theme .tone-ai { --card-accent: #168392; }
.staff-theme .tone-rae { --card-accent: #009968; }
.staff-theme .tone-team { --card-accent: #687d9a; }
.staff-theme .tone-workflow { --card-accent: #c98920; }
.staff-theme .tone-clients { --card-accent: #006347; }

.staff-theme .pipeline-stage-card,
.staff-theme .admin-center-tile,
.staff-theme .portfolio-metric,
.staff-theme .meeting-list div,
.staff-theme .quick-action,
.staff-theme .doc-overview-row,
.staff-theme .dashboard-mini-rows div,
.staff-theme .workflow-queue-list div {
  border-color: color-mix(in srgb, var(--card-accent, #1f6ea5) 28%, #dce5ee);
  background: linear-gradient(180deg, rgba(255,255,255,0.96), color-mix(in srgb, var(--card-accent, #1f6ea5) 10%, #ffffff));
  box-shadow: 0 10px 20px rgba(0,8,20,0.06), inset 0 1px 0 rgba(255,255,255,0.95);
}

.staff-theme .pipeline-stage-card:nth-child(1) { --card-accent: #007a55; }
.staff-theme .pipeline-stage-card:nth-child(2) { --card-accent: #1f6ea5; }
.staff-theme .pipeline-stage-card:nth-child(3) { --card-accent: #c98920; }
.staff-theme .pipeline-stage-card:nth-child(4) { --card-accent: #12a06f; }

.staff-theme .portfolio-command {
  background:
    linear-gradient(135deg, rgba(0,8,20,0.98), rgba(10,45,72,0.96) 54%, rgba(31,110,165,0.86)),
    #000814;
  border-color: #1f6ea5;
}

.staff-theme .portfolio-command .card-title,
.staff-theme .portfolio-command .btn {
  color: #ffffff;
}

.staff-theme .portfolio-command .btn {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.22);
}

.staff-theme .portfolio-command .portfolio-metric {
  background: linear-gradient(180deg, rgba(255,255,255,0.16), rgba(255,255,255,0.08));
  border-color: rgba(255,255,255,0.2);
}

.staff-theme .portfolio-command .portfolio-metric span,
.staff-theme .portfolio-command .portfolio-metric em {
  color: #c7d7e8;
}

.staff-theme .portfolio-command .portfolio-metric strong {
  color: #ffffff;
}

.staff-theme .quick-action:nth-child(1) { --card-accent: #007a55; background: linear-gradient(145deg, #e6f8f1, #ffffff); }
.staff-theme .quick-action:nth-child(2) { --card-accent: #1f6ea5; background: linear-gradient(145deg, #e8f4fb, #ffffff); }
.staff-theme .quick-action:nth-child(3) { --card-accent: #c98920; background: linear-gradient(145deg, #fff3d7, #ffffff); }
.staff-theme .quick-action:nth-child(4) { --card-accent: #7a4d11; background: linear-gradient(145deg, #fff1cf, #ffffff); }

.staff-theme .doc-overview-row.green { background: linear-gradient(90deg, rgba(0,122,85,0.18), #ffffff); }
.staff-theme .doc-overview-row.gold { background: linear-gradient(90deg, rgba(201,137,32,0.2), #ffffff); }
.staff-theme .doc-overview-row.blue { background: linear-gradient(90deg, rgba(31,110,165,0.18), #ffffff); }
.staff-theme .doc-overview-row.red { background: linear-gradient(90deg, rgba(199,55,47,0.16), #ffffff); }

.staff-theme .alert-card {
  background: linear-gradient(180deg, #fff2cf, #ffffff 66%);
}

.staff-theme .dashboard-alert {
  background: rgba(255,255,255,0.5);
  border-radius: 6px;
  padding-right: 9px;
}
/* Phase 14I: screenshot-mapped Client Management and Engagement Pipeline richness. */
.reference-screen {
  display: grid;
  gap: 0;
}

.staff-theme .hero {
  background: linear-gradient(135deg, #ffffff 0%, #f7fafc 72%, #fff4d8 100%);
  border-color: #dfe7ef;
  box-shadow: 0 14px 30px rgba(0,8,20,0.06);
}

.staff-theme .reference-kpis > .card {
  border-color: rgba(255,255,255,0.9);
  background: linear-gradient(145deg, #ffffff 0%, var(--summary-tint, #f5faf9) 100%);
  box-shadow: 0 14px 28px rgba(0,8,20,0.075), inset 0 4px 0 var(--summary-accent, #c98920);
}

.staff-theme .reference-kpis > .card:nth-child(1) { --summary-accent: #007a55; --summary-tint: #e6f8f1; }
.staff-theme .reference-kpis > .card:nth-child(2) { --summary-accent: #1f6ea5; --summary-tint: #e8f4fb; }
.staff-theme .reference-kpis > .card:nth-child(3) { --summary-accent: #c98920; --summary-tint: #fff3d7; }
.staff-theme .reference-kpis > .card:nth-child(4) { --summary-accent: #7a4d11; --summary-tint: #fff1cf; }

.client-command-grid,
.pipeline-command-layout {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}

.reference-panel {
  position: relative;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--panel-accent, #1f6ea5) 36%, #dce5ee);
  background:
    radial-gradient(circle at 96% 8%, color-mix(in srgb, var(--panel-accent, #1f6ea5) 16%, transparent), transparent 32%),
    linear-gradient(135deg, color-mix(in srgb, var(--panel-accent, #1f6ea5) 10%, #ffffff), #ffffff 52%, color-mix(in srgb, var(--panel-accent, #1f6ea5) 6%, #ffffff));
  box-shadow: 0 18px 34px rgba(0,8,20,0.085), inset 0 1px 0 rgba(255,255,255,0.95);
}

.reference-panel::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: linear-gradient(180deg, var(--panel-accent, #1f6ea5), color-mix(in srgb, var(--panel-accent, #1f6ea5) 62%, #f0b84a));
}

.reference-panel > * {
  position: relative;
  z-index: 1;
}

.client-list-panel,
.pipeline-board-panel { --panel-accent: #1f6ea5; }
.review-packet-panel,
.pipeline-sources-panel { --panel-accent: #c98920; }

.staff-theme .reference-panel .table {
  margin-top: 12px;
}

.staff-theme .reference-panel .table th {
  background: #000814;
  color: #f7c96a;
  border-bottom-color: #132b46;
}

.staff-theme .reference-panel .table td {
  background: rgba(255,255,255,0.74);
}

.staff-theme .reference-panel .table tr:nth-child(even) td {
  background: color-mix(in srgb, var(--panel-accent, #1f6ea5) 6%, #ffffff);
}

.vivid-stack {
  gap: 9px;
  margin: 13px 0;
}

.vivid-stack .split-row {
  border: 1px solid color-mix(in srgb, var(--panel-accent, #c98920) 26%, #dce5ee);
  border-left: 4px solid var(--panel-accent, #c98920);
  border-radius: 7px;
  background: rgba(255,255,255,0.78);
  padding: 10px;
}

.packet-actions {
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.client-insight-row .card,
.staff-theme .reference-analytics .chart-card,
.staff-theme .pipeline-command-layout .embedded-chart,
.staff-theme .engagement-pipeline-screen .metric-panel div {
  border-color: color-mix(in srgb, #1f6ea5 24%, #dce5ee);
  background: linear-gradient(145deg, #ffffff, #f4f9fc);
  box-shadow: 0 12px 24px rgba(0,8,20,0.065);
}

.embedded-chart {
  display: grid;
  gap: 14px;
}

.reference-stage-board {
  margin-top: 12px;
}

.staff-theme .reference-stage-board .stage-column {
  min-height: 260px;
  border-color: color-mix(in srgb, var(--stage-accent, #1f6ea5) 38%, #dce5ee);
  background: linear-gradient(180deg, color-mix(in srgb, var(--stage-accent, #1f6ea5) 14%, #ffffff), #ffffff);
  box-shadow: 0 14px 26px rgba(0,8,20,0.075);
}

.staff-theme .reference-stage-board .stage-column:nth-child(1) { --stage-accent: #007a55; }
.staff-theme .reference-stage-board .stage-column:nth-child(2) { --stage-accent: #1f6ea5; }
.staff-theme .reference-stage-board .stage-column:nth-child(3) { --stage-accent: #c98920; }
.staff-theme .reference-stage-board .stage-column:nth-child(4) { --stage-accent: #12a06f; }

.staff-theme .reference-stage-board .stage-column .split-row {
  border-bottom: 1px solid color-mix(in srgb, var(--stage-accent, #1f6ea5) 20%, #dce5ee);
  padding-bottom: 10px;
}

.staff-theme .reference-stage-board .stage-column .split-row span {
  color: #ffffff;
  background: linear-gradient(135deg, var(--stage-accent, #1f6ea5), color-mix(in srgb, var(--stage-accent, #1f6ea5) 64%, #000814));
  border-radius: 999px;
  padding: 5px 8px;
}

.staff-theme .reference-stage-board .stage-client {
  border-left-color: var(--stage-accent, #1f6ea5);
  background: rgba(255,255,255,0.78);
}

@media (max-width: 1180px) {
  .client-command-grid,
  .pipeline-command-layout { grid-template-columns: 1fr; }
  .client-command-grid .span-8,
  .client-command-grid .span-4,
  .pipeline-command-layout .span-8,
  .pipeline-command-layout .span-4 { grid-column: auto; }
}
/* Phase 15A: route-wide reference palette for backend-backed navigation screens. */
.staff-theme .grid.kpis:not(.compact-summary) > .card {
  position: relative;
  overflow: hidden;
  border-color: rgba(255,255,255,0.9);
  background:
    radial-gradient(circle at 94% 12%, color-mix(in srgb, var(--kpi-accent, #1f6ea5) 22%, transparent), transparent 34%),
    linear-gradient(145deg, #ffffff 0%, var(--kpi-tint, #f5faf9) 100%);
  box-shadow: 0 14px 28px rgba(0,8,20,0.075), inset 0 4px 0 var(--kpi-accent, #c98920);
}

.staff-theme .grid.kpis:not(.compact-summary) > .card:nth-child(1) { --kpi-accent: #007a55; --kpi-tint: #e6f8f1; }
.staff-theme .grid.kpis:not(.compact-summary) > .card:nth-child(2) { --kpi-accent: #1f6ea5; --kpi-tint: #e8f4fb; }
.staff-theme .grid.kpis:not(.compact-summary) > .card:nth-child(3) { --kpi-accent: #c98920; --kpi-tint: #fff3d7; }
.staff-theme .grid.kpis:not(.compact-summary) > .card:nth-child(4) { --kpi-accent: #7a4d11; --kpi-tint: #fff1cf; }

.staff-theme .grid.two > .card,
.staff-theme .grid.three > .card,
.staff-theme .chart-grid > .card,
.staff-theme .blueprint-canvas,
.staff-theme .preview-sheet,
.staff-theme .settings-block,
.staff-theme .calendar-day,
.staff-theme .stage-column,
.staff-theme .vault-folder,
.staff-theme .integration-tile {
  border-color: color-mix(in srgb, var(--route-accent, #1f6ea5) 30%, #dce5ee);
  background:
    radial-gradient(circle at 96% 8%, color-mix(in srgb, var(--route-accent, #1f6ea5) 14%, transparent), transparent 32%),
    linear-gradient(145deg, color-mix(in srgb, var(--route-accent, #1f6ea5) 8%, #ffffff), #ffffff 56%, color-mix(in srgb, var(--route-accent, #1f6ea5) 5%, #ffffff));
  box-shadow: 0 14px 28px rgba(0,8,20,0.07), inset 0 1px 0 rgba(255,255,255,0.96);
}

.staff-theme .grid.two > .card:nth-child(1),
.staff-theme .grid.three > .card:nth-child(1),
.staff-theme .chart-grid > .card:nth-child(1) { --route-accent: #1f6ea5; }
.staff-theme .grid.two > .card:nth-child(2),
.staff-theme .grid.three > .card:nth-child(2),
.staff-theme .chart-grid > .card:nth-child(2) { --route-accent: #c98920; }
.staff-theme .grid.three > .card:nth-child(3),
.staff-theme .chart-grid > .card:nth-child(3) { --route-accent: #007a55; }

.staff-theme .table {
  border-collapse: separate;
  border-spacing: 0;
  overflow: hidden;
  border-radius: 8px;
}

.staff-theme .table th {
  background: #000814;
  color: #f7c96a;
  border-bottom-color: #132b46;
}

.staff-theme .table td {
  background: rgba(255,255,255,0.82);
}

.staff-theme .table tr:nth-child(even) td {
  background: #f4f8fb;
}

.staff-theme .calendar-day:nth-child(1),
.staff-theme .stage-column:nth-child(1),
.staff-theme .vault-folder:nth-child(1),
.staff-theme .integration-tile:nth-child(1) { --route-accent: #007a55; }
.staff-theme .calendar-day:nth-child(2),
.staff-theme .stage-column:nth-child(2),
.staff-theme .vault-folder:nth-child(2),
.staff-theme .integration-tile:nth-child(2) { --route-accent: #1f6ea5; }
.staff-theme .calendar-day:nth-child(3),
.staff-theme .stage-column:nth-child(3),
.staff-theme .vault-folder:nth-child(3),
.staff-theme .integration-tile:nth-child(3) { --route-accent: #c98920; }
.staff-theme .calendar-day:nth-child(4),
.staff-theme .stage-column:nth-child(4),
.staff-theme .vault-folder:nth-child(4),
.staff-theme .integration-tile:nth-child(4) { --route-accent: #7a4d11; }
.staff-theme .calendar-day:nth-child(5) { --route-accent: #168392; }

.staff-theme .calendar-day .split-row,
.staff-theme .stage-column .split-row {
  border-bottom: 1px solid color-mix(in srgb, var(--route-accent, #1f6ea5) 22%, #dce5ee);
  padding-bottom: 10px;
}

.staff-theme .calendar-day .split-row strong,
.staff-theme .stage-column .split-row strong,
.staff-theme .vault-folder strong,
.staff-theme .integration-tile strong {
  color: #061323;
}

.staff-theme .meeting-chip,
.staff-theme .stage-client,
.staff-theme .workspace-row,
.staff-theme .settings-block label {
  border-color: color-mix(in srgb, var(--route-accent, #1f6ea5) 28%, #dce5ee);
  background: rgba(255,255,255,0.82);
  box-shadow: 0 8px 16px rgba(0,8,20,0.045);
}

.staff-theme .meeting-chip {
  border-left: 4px solid var(--route-accent, #1f6ea5);
}

.staff-theme .stage-client {
  border-left-color: var(--route-accent, #1f6ea5);
}

.staff-theme .folder-tab {
  background: linear-gradient(90deg, var(--route-accent, #1f6ea5), color-mix(in srgb, var(--route-accent, #1f6ea5) 60%, #f0b84a));
}

.staff-theme .bar-track span {
  background: linear-gradient(90deg, #007a55, #1f6ea5 48%, #c98920);
}

.staff-theme .donut.blue { --accent: #1f6ea5; }
.staff-theme .donut.green { --accent: #007a55; }
.staff-theme .donut.gold { --accent: #c98920; }

.staff-theme .metric-panel div {
  border-color: color-mix(in srgb, #1f6ea5 26%, #dce5ee);
  background: linear-gradient(145deg, #ffffff, #f4f9fc);
}

.staff-theme .notice {
  border-color: #f0c66a;
  background: linear-gradient(135deg, #fff6df, #ffffff);
}

.staff-theme .btn.gold,
.staff-theme .pill.gold {
  background: linear-gradient(135deg, #fff1cc, #ffffff);
  border-color: #dca23c;
  color: #684207;
}
/* Phase 15B: preferred previous executive accent baseline for all staff screens. */
:root {
  --bg: #f3f6f8;
  --panel: #ffffff;
  --panel-soft: #f7fafb;
  --ink: #071626;
  --muted: #607089;
  --line: #dfe6ec;
  --line-strong: #c8d3dd;
  --green: #064a35;
  --green-2: #0f6b50;
  --gold: #b8872f;
  --gold-soft: #fff6e4;
  --blue: #24577a;
  --red: #b42318;
  --shadow: 0 14px 34px rgba(25, 45, 68, 0.08);
}

body {
  background: #f3f6f8;
}

.staff-theme .workspace {
  background: #f3f6f8;
}

.staff-theme .rail {
  background: linear-gradient(180deg, #eef4f8 0%, #e7eef5 100%);
  border-right: 1px solid #cbd8e3;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.75);
}

.staff-theme .brand-kicker,
.staff-theme .account-name,
.staff-theme .status-line {
  color: #071626;
}

.staff-theme .brand-sub,
.staff-theme .rail .nav-title,
.staff-theme .rail .nav-meta,
.staff-theme .rail .small,
.staff-theme .rail .session-row span,
.staff-theme .account-role {
  color: #64748b;
}

.staff-theme .account-card,
.staff-theme .system-status {
  background: rgba(255,255,255,0.84);
  border-color: #d4dee7;
  box-shadow: 0 10px 28px rgba(25,45,68,0.07);
}

.staff-theme .rail .session-row {
  border-top-color: #d8e2eb;
}

.staff-theme .rail .session-row button,
.staff-theme .photo-upload {
  background: #ffffff;
  border-color: #cbd8e3;
  color: #071626;
}

.staff-theme .nav-btn {
  color: #20324a;
}

.staff-theme .nav-btn:hover {
  background: rgba(255,255,255,0.68);
  border-color: #d7e1ea;
}

.staff-theme .nav-btn.active {
  background: #ffffff;
  border-color: #d8ad54;
  color: #071626;
  box-shadow: 0 8px 22px rgba(184,135,47,0.12);
}

.staff-theme .hero,
.staff-theme .dashboard-welcome {
  background: #ffffff;
  border: 1px solid #dfe6ec;
  box-shadow: 0 10px 26px rgba(25,45,68,0.07);
}

.staff-theme .dashboard-welcome .eyebrow,
.staff-theme .hero .eyebrow {
  color: #064a35;
}

.staff-theme .dashboard-welcome h1,
.staff-theme .dashboard-welcome .lede {
  color: #071626;
}

.staff-theme .dashboard-welcome .lede {
  color: #607089;
}

.staff-theme .dashboard-hero-card {
  background: #ffffff;
  border-color: #dfe6ec;
  border-top-color: #b8872f;
  box-shadow: 0 10px 26px rgba(25,45,68,0.07);
}

.staff-theme .dashboard-hero-card strong {
  color: #071626;
}

.staff-theme .compact-summary,
.staff-theme .grid.kpis:not(.compact-summary) {
  gap: 12px;
}

.staff-theme .compact-summary {
  background: #dfe6ec;
}

.staff-theme .compact-summary > div,
.staff-theme .grid.kpis:not(.compact-summary) > .card {
  border: 1px solid #dfe6ec;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(25,45,68,0.055), inset 0 4px 0 var(--summary-accent, #b8872f);
}

.staff-theme .compact-summary > div:nth-child(1),
.staff-theme .grid.kpis:not(.compact-summary) > .card:nth-child(1) { --summary-accent: #064a35; }
.staff-theme .compact-summary > div:nth-child(2),
.staff-theme .grid.kpis:not(.compact-summary) > .card:nth-child(2) { --summary-accent: #24577a; }
.staff-theme .compact-summary > div:nth-child(3),
.staff-theme .grid.kpis:not(.compact-summary) > .card:nth-child(3) { --summary-accent: #b8872f; }
.staff-theme .compact-summary > div:nth-child(4),
.staff-theme .grid.kpis:not(.compact-summary) > .card:nth-child(4) { --summary-accent: #0f6b50; }
.staff-theme .compact-summary > div:nth-child(5) { --summary-accent: #566f86; }

.staff-theme .dashboard-card,
.staff-theme .reference-panel,
.staff-theme .grid.two > .card,
.staff-theme .grid.three > .card,
.staff-theme .chart-grid > .card,
.staff-theme .blueprint-canvas,
.staff-theme .preview-sheet,
.staff-theme .settings-block,
.staff-theme .calendar-day,
.staff-theme .stage-column,
.staff-theme .vault-folder,
.staff-theme .integration-tile {
  border-color: #dfe6ec;
  background: #ffffff;
  box-shadow: 0 8px 22px rgba(25,45,68,0.055);
}

.staff-theme .dashboard-card::after,
.staff-theme .reference-panel::after {
  background: linear-gradient(90deg, rgba(36,87,122,0.055), transparent 70%);
}

.staff-theme .dashboard-card::before,
.staff-theme .reference-panel::before {
  width: 4px;
  background: var(--card-accent, var(--panel-accent, #dfe6ec));
}

.staff-theme .tone-pipeline,
.client-list-panel,
.pipeline-board-panel { --card-accent: #0f6b50; --panel-accent: #0f6b50; }
.staff-theme .tone-alert,
.review-packet-panel,
.pipeline-sources-panel { --card-accent: #b8872f; --panel-accent: #b8872f; }
.staff-theme .tone-portfolio { --card-accent: #24577a; }
.staff-theme .tone-meetings { --card-accent: #b8872f; }
.staff-theme .tone-actions { --card-accent: #064a35; }
.staff-theme .tone-documents { --card-accent: #24577a; }
.staff-theme .tone-blueprint { --card-accent: #24577a; }
.staff-theme .tone-admin { --card-accent: #b8872f; }
.staff-theme .tone-ai { --card-accent: #426a74; }
.staff-theme .tone-rae { --card-accent: #0f6b50; }
.staff-theme .tone-team { --card-accent: #566f86; }
.staff-theme .tone-workflow { --card-accent: #b8872f; }
.staff-theme .tone-clients { --card-accent: #064a35; }

.staff-theme .portfolio-command {
  background: linear-gradient(135deg, #ffffff 0%, #f7fbfc 58%, #fffaf0 100%);
  border-color: #d7e1ea;
}

.staff-theme .portfolio-command .card-title,
.staff-theme .portfolio-command .btn,
.staff-theme .portfolio-command .portfolio-metric strong {
  color: #071626;
}

.staff-theme .portfolio-command .btn {
  background: #ffffff;
  border-color: #c8d3dd;
}

.staff-theme .portfolio-command .portfolio-metric {
  background: rgba(255,255,255,0.84);
  border-color: #dfe6ec;
}

.staff-theme .portfolio-command .portfolio-metric span,
.staff-theme .portfolio-command .portfolio-metric em {
  color: #607089;
}

.staff-theme .pipeline-stage-card,
.staff-theme .admin-center-tile,
.staff-theme .portfolio-metric,
.staff-theme .meeting-list div,
.staff-theme .quick-action,
.staff-theme .doc-overview-row,
.staff-theme .dashboard-mini-rows div,
.staff-theme .workflow-queue-list div,
.staff-theme .meeting-chip,
.staff-theme .stage-client,
.staff-theme .workspace-row,
.staff-theme .settings-block label,
.vivid-stack .split-row {
  border-color: #dfe6ec;
  background: #f8fbfc;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.85), 0 8px 18px rgba(25,45,68,0.035);
}

.staff-theme .dashboard-icon {
  color: #ffffff;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.3), 0 8px 16px rgba(25,45,68,0.12);
}

.staff-theme .dashboard-icon.pipeline,
.staff-theme .dashboard-icon.rae,
.staff-theme .dashboard-icon.bolt,
.staff-theme .dashboard-icon.clients { --icon-bg: linear-gradient(135deg, #064a35, #0f6b50); --icon-fg: #064a35; }
.staff-theme .dashboard-icon.alert,
.staff-theme .dashboard-icon.calendar,
.staff-theme .dashboard-icon.admin,
.staff-theme .dashboard-icon.workflow { --icon-bg: linear-gradient(135deg, #8a6b26, #b8872f); --icon-fg: #8a6b26; }
.staff-theme .dashboard-icon.portfolio,
.staff-theme .dashboard-icon.document,
.staff-theme .dashboard-icon.blueprint { --icon-bg: linear-gradient(135deg, #24577a, #366d92); --icon-fg: #24577a; }
.staff-theme .dashboard-icon.ai,
.staff-theme .dashboard-icon.team { --icon-bg: linear-gradient(135deg, #426a74, #6f8f98); --icon-fg: #426a74; }

.staff-theme .table th {
  background: #f5f8fb;
  color: #607089;
  border-bottom-color: #dfe6ec;
}

.staff-theme .table td,
.staff-theme .reference-panel .table td,
.staff-theme .reference-panel .table tr:nth-child(even) td {
  background: #ffffff;
}

.staff-theme .bar-track span {
  background: linear-gradient(90deg, #0f6b50, #b8872f);
}

.staff-theme .notice {
  border-color: #e0c37a;
  background: #fffaf0;
}

.staff-theme .doc-overview-row.green,
.staff-theme .doc-overview-row.gold,
.staff-theme .doc-overview-row.blue,
.staff-theme .doc-overview-row.red,
.staff-theme .quick-action:nth-child(1),
.staff-theme .quick-action:nth-child(2),
.staff-theme .quick-action:nth-child(3),
.staff-theme .quick-action:nth-child(4) {
  background: #ffffff;
}
/* Staff exact-match batch 1: Dashboard, Client Management, Engagement Pipeline. */
.staff-theme .rail {
  background:
    radial-gradient(circle at 36px 42px, rgba(184,135,47,0.34), transparent 86px),
    linear-gradient(180deg, #000814 0%, #07192e 54%, #0b243d 100%);
  border-right-color: #18324f;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.07), 12px 0 28px rgba(0,8,20,0.14);
}

.staff-theme .brand-kicker,
.staff-theme .account-name,
.staff-theme .status-line {
  color: #ffffff;
}

.staff-theme .brand-sub,
.staff-theme .rail .nav-title,
.staff-theme .rail .nav-meta,
.staff-theme .rail .small,
.staff-theme .rail .session-row span,
.staff-theme .account-role {
  color: #c1cad8;
}

.staff-theme .account-card,
.staff-theme .system-status {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.16), 0 16px 28px rgba(0,0,0,0.18);
}

.staff-theme .rail .session-row {
  border-top-color: rgba(255,255,255,0.15);
}

.staff-theme .rail .session-row button,
.staff-theme .photo-upload {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #ffffff;
}

.staff-theme .nav-btn {
  color: #e5ebf3;
}

.staff-theme .nav-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}

.staff-theme .nav-btn.active {
  background: linear-gradient(90deg, #8a570c, #c98920);
  border-color: #dda946;
  color: #fff8e8;
  box-shadow: 0 12px 24px rgba(201,137,32,0.23);
}

.staff-theme .workspace {
  background: #f3f6f8;
}

.exact-match-screen {
  --exact-green: #064a35;
  --exact-blue: #24577a;
  --exact-gold: #b8872f;
  --exact-rail: #000814;
}

.staff-dashboard.exact-match-screen {
  gap: 14px;
}

.staff-dashboard.exact-match-screen .dashboard-welcome {
  padding: 14px 16px;
  min-height: 108px;
}

.staff-dashboard.exact-match-screen .dashboard-welcome h1 {
  font-size: 27px;
}

.staff-dashboard.exact-match-screen .dashboard-welcome .lede {
  max-width: 980px;
  font-size: 13px;
}

.staff-dashboard.exact-match-screen .staff-dashboard-grid,
.client-management-screen.exact-match-screen .client-command-grid,
.engagement-pipeline-screen.exact-match-screen .pipeline-command-layout {
  gap: 14px;
}

.staff-dashboard.exact-match-screen .dashboard-card,
.client-management-screen.exact-match-screen .reference-panel,
.engagement-pipeline-screen.exact-match-screen .reference-panel {
  border-radius: 8px;
  border-color: #cbd8e3;
  box-shadow: 0 10px 24px rgba(25,45,68,0.07);
}

.staff-dashboard.exact-match-screen .dashboard-card::before,
.client-management-screen.exact-match-screen .reference-panel::before,
.engagement-pipeline-screen.exact-match-screen .reference-panel::before {
  width: 7px;
}

.staff-dashboard.exact-match-screen .compact-summary > div,
.client-management-screen.exact-match-screen .reference-kpis > .card,
.engagement-pipeline-screen.exact-match-screen .reference-kpis > .card {
  min-height: 70px;
  border-radius: 8px;
}

.client-management-screen.exact-match-screen .table th,
.engagement-pipeline-screen.exact-match-screen .table th {
  background: #f5f8fb;
  color: #5f6f84;
}

.client-management-screen.exact-match-screen .review-packet-panel,
.engagement-pipeline-screen.exact-match-screen .pipeline-sources-panel {
  align-self: stretch;
}

.engagement-pipeline-screen.exact-match-screen .reference-stage-board .stage-column {
  min-height: 238px;
  background: #ffffff;
}

.engagement-pipeline-screen.exact-match-screen .reference-stage-board .stage-column .split-row span {
  background: #f8fbfc;
  color: #071626;
  border: 1px solid #dfe6ec;
}

.staff-theme .topbar {
  background: #ffffff;
}
/* Staff exact-match batch 2: Calendar, Tasks, Documents & Vault. */
.staff-theme .hero.exact-match-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
  padding: 14px 16px;
  border: 1px solid #cbd8e3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 22px rgba(20,40,62,0.06);
}

.staff-theme .hero.exact-match-screen::before {
  content: attr(data-reference);
  justify-self: end;
  align-self: start;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #5c6c80;
  border: 1px solid #d8e1ea;
  border-radius: 7px;
  background: #f8fafc;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 900;
}

.staff-theme .hero.exact-match-screen .eyebrow {
  color: #0f6b50;
  font-size: 11px;
  letter-spacing: 0;
}

.staff-theme .hero.exact-match-screen h1 {
  color: #071322;
  font-size: 27px;
  line-height: 1.12;
}

.staff-theme .hero.exact-match-screen .lede {
  max-width: 980px;
  color: #5d6b7e;
  font-size: 13px;
}

.staff-theme .calendar-screen + .split-row,
.staff-theme .tasks-screen + .split-row,
.staff-theme .vault-screen + .split-row {
  margin-bottom: 10px !important;
}

.staff-theme .calendar-board {
  gap: 12px;
}

.staff-theme .calendar-day,
.staff-theme .vault-folder,
.staff-theme .workflow-step {
  border-color: #cbd8e3;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(25,45,68,0.055);
}

.staff-theme .calendar-day {
  min-height: 230px;
  padding: 12px;
}

.staff-theme .calendar-day .split-row {
  border-bottom: 1px solid #dde7ee;
  padding-bottom: 10px;
  margin-bottom: 10px;
}

.staff-theme .meeting-chip {
  border-color: #dbe5ed;
  background: linear-gradient(90deg, #ffffff, #f4f8fb);
  border-radius: 7px;
}

.staff-theme .workflow-steps {
  gap: 9px;
}

.staff-theme .workflow-step.active {
  border-color: #d9ab48;
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.staff-theme .vault-grid {
  gap: 12px;
}

.staff-theme .vault-folder {
  position: relative;
  min-height: 118px;
  padding: 16px 14px 14px;
  overflow: hidden;
}

.staff-theme .vault-folder::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 7px;
  background: var(--route-accent, #0f6b50);
}

.staff-theme .vault-folder .folder-tab {
  background: #d9ab48;
}

/* Staff exact-match batch 3: Analytics, AI, Modeling, RAE, Blueprint Admin, Administration. */
.staff-theme .analytics-screen ~ .grid.kpis > .card,
.staff-theme .ai-screen ~ .grid.kpis > .card,
.staff-theme .modeling-screen ~ .grid.kpis > .card,
.staff-theme .rae-screen ~ .grid.kpis > .card,
.staff-theme .builder-screen ~ .grid.kpis > .card,
.staff-theme .templates-screen ~ .grid.kpis > .card,
.staff-theme .automation-screen ~ .grid.kpis > .card,
.staff-theme .blueprint-analytics-screen ~ .grid.kpis > .card,
.staff-theme .content-screen ~ .grid.kpis > .card,
.staff-theme .approvals-screen ~ .grid.kpis > .card,
.staff-theme .ai-blueprint-screen ~ .grid.kpis > .card,
.staff-theme .users-screen ~ .grid.kpis > .card,
.staff-theme .system-screen ~ .grid.kpis > .card,
.staff-theme .integrations-screen ~ .grid.kpis > .card {
  min-height: 104px;
  border-color: #cbd8e3;
  background: linear-gradient(180deg, #ffffff, #f9fbfc);
  box-shadow: 0 8px 18px rgba(25,45,68,0.055);
}

.staff-theme .analytics-screen ~ .chart-grid .card,
.staff-theme .ai-screen ~ .chart-grid .card,
.staff-theme .modeling-screen ~ .chart-grid .card,
.staff-theme .rae-screen ~ .chart-grid .card,
.staff-theme .builder-screen ~ .grid.two > .card,
.staff-theme .templates-screen ~ .grid.two > .card,
.staff-theme .automation-screen ~ .grid.two > .card,
.staff-theme .blueprint-analytics-screen ~ .grid.two > .card,
.staff-theme .content-screen ~ .grid.two > .card,
.staff-theme .approvals-screen ~ .grid.two > .card,
.staff-theme .ai-blueprint-screen ~ .grid.two > .card,
.staff-theme .users-screen ~ .grid.two > .card,
.staff-theme .system-screen ~ .settings-grid > div,
.staff-theme .integrations-screen ~ .integration-grid > div {
  border-radius: 8px;
  border-color: #cbd8e3;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(25,45,68,0.065);
}

.staff-theme .analytics-screen ~ .chart-grid .card::before,
.staff-theme .ai-screen ~ .chart-grid .card::before,
.staff-theme .modeling-screen ~ .chart-grid .card::before,
.staff-theme .rae-screen ~ .chart-grid .card::before,
.staff-theme .builder-screen ~ .grid.two > .card::before,
.staff-theme .templates-screen ~ .grid.two > .card::before,
.staff-theme .automation-screen ~ .grid.two > .card::before,
.staff-theme .blueprint-analytics-screen ~ .grid.two > .card::before,
.staff-theme .content-screen ~ .grid.two > .card::before,
.staff-theme .approvals-screen ~ .grid.two > .card::before,
.staff-theme .ai-blueprint-screen ~ .grid.two > .card::before,
.staff-theme .users-screen ~ .grid.two > .card::before {
  width: 7px;
  background: var(--route-accent, #0f6b50);
}

.staff-theme .analytics-screen ~ .chart-grid .card:nth-child(1),
.staff-theme .ai-screen ~ .chart-grid .card:nth-child(1),
.staff-theme .modeling-screen ~ .chart-grid .card:nth-child(1),
.staff-theme .rae-screen ~ .chart-grid .card:nth-child(1),
.staff-theme .builder-screen ~ .grid.two > .card:nth-child(1),
.staff-theme .templates-screen ~ .grid.two > .card:nth-child(1),
.staff-theme .automation-screen ~ .grid.two > .card:nth-child(1),
.staff-theme .blueprint-analytics-screen ~ .grid.two > .card:nth-child(1),
.staff-theme .content-screen ~ .grid.two > .card:nth-child(1),
.staff-theme .approvals-screen ~ .grid.two > .card:nth-child(1),
.staff-theme .ai-blueprint-screen ~ .grid.two > .card:nth-child(1),
.staff-theme .users-screen ~ .grid.two > .card:nth-child(1) { --route-accent: #0f6b50; }

.staff-theme .analytics-screen ~ .chart-grid .card:nth-child(2),
.staff-theme .ai-screen ~ .chart-grid .card:nth-child(2),
.staff-theme .modeling-screen ~ .chart-grid .card:nth-child(2),
.staff-theme .rae-screen ~ .chart-grid .card:nth-child(2),
.staff-theme .builder-screen ~ .grid.two > .card:nth-child(2),
.staff-theme .templates-screen ~ .grid.two > .card:nth-child(2),
.staff-theme .automation-screen ~ .grid.two > .card:nth-child(2),
.staff-theme .blueprint-analytics-screen ~ .grid.two > .card:nth-child(2),
.staff-theme .content-screen ~ .grid.two > .card:nth-child(2),
.staff-theme .approvals-screen ~ .grid.two > .card:nth-child(2),
.staff-theme .ai-blueprint-screen ~ .grid.two > .card:nth-child(2),
.staff-theme .users-screen ~ .grid.two > .card:nth-child(2) { --route-accent: #24577a; }

.staff-theme .analytics-screen ~ .chart-grid .card:nth-child(3),
.staff-theme .ai-screen ~ .chart-grid .card:nth-child(3),
.staff-theme .modeling-screen ~ .chart-grid .card:nth-child(3),
.staff-theme .rae-screen ~ .chart-grid .card:nth-child(3) { --route-accent: #b8872f; }

.staff-theme .analytics-screen ~ .grid.two,
.staff-theme .ai-screen ~ .grid.two,
.staff-theme .modeling-screen ~ .grid.three,
.staff-theme .rae-screen ~ .grid.two,
.staff-theme .builder-screen ~ .grid.three,
.staff-theme .templates-screen ~ .grid.three,
.staff-theme .automation-screen ~ .grid.three,
.staff-theme .blueprint-analytics-screen ~ .grid.three,
.staff-theme .content-screen ~ .grid.three,
.staff-theme .approvals-screen ~ .grid.three,
.staff-theme .ai-blueprint-screen ~ .grid.three,
.staff-theme .users-screen ~ .grid.two,
.staff-theme .system-screen ~ .grid.three,
.staff-theme .integrations-screen ~ .grid.three {
  gap: 14px;
}

.staff-theme .blueprint-canvas,
.staff-theme .preview-sheet,
.staff-theme .settings-block,
.staff-theme .integration-tile {
  border-radius: 8px;
}

.staff-theme .blueprint-workspace-row,
.staff-theme .metric-row,
.staff-theme .bar-row,
.staff-theme .table td {
  border-color: #dfe7ef;
}

.staff-theme .donut-wrap {
  min-height: 150px;
}

.staff-theme .donut {
  box-shadow: inset 0 0 0 16px #edf2f6;
}

.staff-theme .bar-track {
  background: #eef3f7;
}

.staff-theme .bar-track span {
  background: linear-gradient(90deg, #0f6b50, #c98920);
}

/* Staff backend action hooks: compact table controls. */
.inline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}

.inline-actions .btn {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
  border-radius: 7px;
}

/* Client exact-match phase 1: Dashboard, Health, Engagement, Blueprint. */
.client-theme .rail {
  background:
    radial-gradient(circle at 38px 44px, rgba(12,107,67,0.36), transparent 90px),
    linear-gradient(180deg, #00130d 0%, #052116 56%, #0a2c1d 100%);
  border-right-color: #143b2a;
  box-shadow: inset -1px 0 0 rgba(255,255,255,0.08), 12px 0 28px rgba(0,19,13,0.14);
}

.client-theme .brand-kicker,
.client-theme .account-name,
.client-theme .status-line {
  color: #ffffff;
}

.client-theme .brand-sub,
.client-theme .rail .nav-title,
.client-theme .rail .nav-meta,
.client-theme .rail .small,
.client-theme .rail .session-row span,
.client-theme .account-role {
  color: #c6d2ca;
}

.client-theme .account-card,
.client-theme .system-status {
  background: rgba(255,255,255,0.11);
  border-color: rgba(255,255,255,0.18);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.15), 0 16px 28px rgba(0,0,0,0.18);
}

.client-theme .rail .session-row {
  border-top-color: rgba(255,255,255,0.15);
}

.client-theme .rail .session-row button,
.client-theme .photo-upload {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.2);
  color: #ffffff;
}

.client-theme .nav-btn {
  color: #e8f0eb;
}

.client-theme .nav-btn:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}

.client-theme .nav-btn.active {
  background: linear-gradient(90deg, #075a37, #0f8a59);
  border-color: #35b37a;
  color: #f4fff9;
  box-shadow: 0 12px 24px rgba(15,138,89,0.24);
}

.client-theme .workspace {
  background: #f4f7f5;
}

.client-theme .client-dashboard-screen.exact-match-screen,
.client-theme .hero.exact-match-screen {
  --client-green: #075a37;
  --client-mint: #dff4ea;
  --client-gold: #b8872f;
  --client-blue: #24577a;
}

.client-theme .client-dashboard-screen.exact-match-screen {
  display: grid;
  gap: 14px;
}

.client-theme .client-dashboard-screen.exact-match-screen::before,
.client-theme .hero.exact-match-screen::before {
  content: attr(data-reference);
  justify-self: end;
  max-width: 260px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #53665c;
  border: 1px solid #d5e2da;
  border-radius: 7px;
  background: #f9fbfa;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 900;
}

.client-theme .page-actions,
.client-theme .hero.exact-match-screen {
  border: 1px solid #cbd9d1;
  border-radius: 8px;
  background: #ffffff;
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: 0 10px 22px rgba(15,50,35,0.06);
}

.client-theme .hero.exact-match-screen {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
}

.client-theme .page-actions h1,
.client-theme .hero.exact-match-screen h1 {
  color: #06130d;
  font-size: 27px;
  line-height: 1.12;
}

.client-theme .page-actions .lede,
.client-theme .hero.exact-match-screen .lede {
  max-width: 980px;
  color: #596b61;
  font-size: 13px;
}

.client-theme .summary-strip,
.client-theme .grid.kpis > .card,
.client-theme .grid.two > .card,
.client-theme .grid.three > .card,
.client-theme .tier-box,
.client-theme .table,
.client-theme .review-stack,
.client-theme .mini-metric {
  border-color: #cbd9d1;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 8px 18px rgba(15,50,35,0.052);
}

.client-theme .grid.kpis > .card {
  min-height: 104px;
  background: linear-gradient(180deg, #ffffff, #f9fbfa);
}

.client-theme .grid.kpis > .card::before,
.client-theme .grid.two > .card::before,
.client-theme .grid.three > .card::before {
  background: var(--client-card-accent, #075a37);
}

.client-theme .grid.kpis > .card:nth-child(1),
.client-theme .grid.two > .card:nth-child(1),
.client-theme .grid.three > .card:nth-child(1) { --client-card-accent: #075a37; }
.client-theme .grid.kpis > .card:nth-child(2),
.client-theme .grid.two > .card:nth-child(2),
.client-theme .grid.three > .card:nth-child(2) { --client-card-accent: #24577a; }
.client-theme .grid.kpis > .card:nth-child(3),
.client-theme .grid.three > .card:nth-child(3) { --client-card-accent: #b8872f; }
.client-theme .grid.kpis > .card:nth-child(4) { --client-card-accent: #0f8a59; }

.client-theme .card.highlight,
.client-theme .tier-box.recommended {
  border-color: #d4af5a;
  background: linear-gradient(180deg, #fffaf0, #ffffff);
}

.client-theme .tier-box.current {
  border-color: #50b887;
  background: linear-gradient(180deg, #eefaf4, #ffffff);
}

.client-theme .progress span {
  background: linear-gradient(90deg, #075a37, #b8872f);
}

.client-theme .table th {
  background: #f3f7f5;
  color: #52655b;
}

.client-theme .notice {
  border-color: #dfc276;
  background: #fffaf0;
}

/* Browser visual QA fixes: contain wide tables and wrap compact vault labels. */
.card,
.reference-panel,
.grid > *,
.vault-folder,
.integration-tile,
.settings-block {
  min-width: 0;
}

.card:has(.table),
.reference-panel:has(.table) {
  overflow-x: auto;
  overflow-y: hidden;
}

.card:has(.table) .table,
.reference-panel:has(.table) .table {
  min-width: 100%;
}

.vault-folder .split-row,
.integration-tile .split-row {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.vault-folder .split-row strong,
.integration-tile .split-row strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 760px) {
  .table th,
  .table td {
    padding: 10px 8px;
  }
}

/* Visual QA fix: wrap dense RAE compliance tables instead of widening cards. */
.staff-theme .rae-screen ~ .grid.two .table {
  table-layout: fixed;
}

.staff-theme .rae-screen ~ .grid.two .table th,
.staff-theme .rae-screen ~ .grid.two .table td {
  overflow-wrap: anywhere;
  word-break: normal;
}

@media (max-width: 760px) {
  .staff-theme .rae-screen ~ .grid.two .table th,
  .staff-theme .rae-screen ~ .grid.two .table td {
    padding: 8px 5px;
    font-size: 12px;
    line-height: 1.25;
  }

  .staff-theme .rae-screen ~ .grid.two .table .pill {
    max-width: 100%;
    white-space: normal;
    text-align: left;
    border-radius: 8px;
  }
}

/* Full-route visual QA fixes: keep all navigation screens inside desktop/mobile viewports. */
.reference-stage-board {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.stage-column,
.stage-client {
  min-width: 0;
}

.stage-column .split-row {
  flex-wrap: wrap;
  align-items: flex-start;
}

.stage-column strong,
.stage-column span,
.stage-client {
  overflow-wrap: anywhere;
}

.workflow-steps,
.staff-theme .workflow-steps {
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  overflow-x: visible;
}

.workflow-step,
.staff-theme .workflow-step {
  min-width: 0;
}

.card:has(.table) .table,
.reference-panel:has(.table) .table {
  table-layout: fixed;
}

.card:has(.table) .table th,
.card:has(.table) .table td,
.reference-panel:has(.table) .table th,
.reference-panel:has(.table) .table td {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.card:has(.table) .table .pill,
.reference-panel:has(.table) .table .pill {
  max-width: 100%;
  white-space: normal;
  text-align: left;
  border-radius: 8px;
}

/* Blueprint+ Member Dashboard rebuild */
.client-theme .rail {
  background: #03150f;
  border-right-color: #123428;
}
.member-topbar {
  height: 78px;
  gap: 18px;
}
.member-welcome {
  display: grid;
  gap: 3px;
  min-width: 260px;
}
.member-welcome strong { font-size: 17px; }
.member-welcome span { color: var(--muted); font-size: 12px; }
.member-topmeta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  min-width: 0;
  flex-wrap: wrap;
}
.member-topmeta > span {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 7px 9px;
  background: #fff;
  color: #344054;
  font-size: 12px;
  font-weight: 800;
}
.icon-count,
.icon-menu {
  border: 1px solid var(--line-strong);
  background: #fff;
  color: var(--ink);
  border-radius: 7px;
  min-width: 34px;
  height: 34px;
  display: inline-grid;
  place-items: center;
  font-weight: 900;
  position: relative;
}
.icon-count span {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: var(--gold);
  color: #1d1300;
  font-size: 10px;
  line-height: 17px;
}
.member-profile {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  display: grid;
  grid-template-columns: 30px minmax(120px, 1fr) 10px;
  gap: 8px;
  align-items: center;
  padding: 5px 8px;
}
.small-avatar { width: 30px; height: 30px; margin: 0; font-size: 11px; }
.member-profile span:not(.avatar) { display: grid; text-align: left; }
.member-profile em { color: var(--muted); font-size: 11px; font-style: normal; }
.rail-promo,
.rail-security {
  border: 1px solid #315c47;
  background: linear-gradient(180deg, #082017, #03150f);
  color: #d7efe4;
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 7px;
}
.rail-promo strong,
.rail-security strong { color: #fff; }
.rail-promo span,
.rail-security span { color: #9ec6b5; font-size: 12px; }
.rail-promo button {
  border: 1px solid #d5a13a;
  background: #c18519;
  color: #1a1304;
  border-radius: 6px;
  padding: 8px;
  font-weight: 900;
}
.member-dashboard-screen {
  display: grid;
  gap: 16px;
}
.member-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}
.member-hero h1 {
  font-size: 28px;
  margin-bottom: 6px;
}
.member-identity {
  min-width: 230px;
  border: 1px solid #d6c18a;
  background: #fffaf0;
  border-radius: 8px;
  padding: 13px;
  display: grid;
  gap: 4px;
}
.member-identity span,
.member-identity em { color: #667085; font-size: 12px; font-style: normal; }
.member-identity strong { color: #05603a; font-size: 22px; }
.member-metrics {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.member-metric {
  border: 1px solid var(--line);
  border-left-width: 4px;
  background: #fff;
  border-radius: 8px;
  padding: 13px;
  min-height: 128px;
  display: grid;
  align-content: start;
  gap: 6px;
}
.member-metric.green { border-left-color: #087443; }
.member-metric.gold { border-left-color: #c18519; }
.member-metric.blue { border-left-color: #175cd3; }
.member-metric.purple { border-left-color: #6941c6; }
.member-metric > span {
  color: #667085;
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
}
.member-metric > strong {
  font-size: 24px;
  line-height: 1.05;
}
.member-metric p {
  color: var(--muted);
  margin: 0;
  font-size: 12px;
}
.member-dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 16px;
  align-items: start;
}
.member-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}
.member-card h2 { margin: 0 0 10px; font-size: 17px; }
.member-card-head {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 12px;
  margin-bottom: 12px;
}
.member-card-head p { color: var(--muted); margin: 3px 0 0; font-size: 12px; }
.span-12 { grid-column: span 12; }
.span-8 { grid-column: span 8; }
.span-4 { grid-column: span 4; }
.span-2 { grid-column: span 2; }
.wallet-card {
  border-color: #a7d7c0;
  background: linear-gradient(135deg, #ffffff 0%, #f3fbf7 100%);
}
.wallet-hero {
  background: linear-gradient(135deg, #003d29, #006b3f);
  color: #fff;
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}
.wallet-hero span { color: #bee7d3; font-size: 12px; text-transform: uppercase; font-weight: 900; }
.wallet-hero strong { font-size: 38px; line-height: 1; }
.wallet-hero em { color: #d9f7e8; font-style: normal; }
.text-link {
  border: 0;
  background: transparent;
  color: #005f3b;
  font-weight: 900;
  padding: 0;
}
.foundation-table { display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.foundation-head,
.foundation-row {
  display: grid;
  grid-template-columns: 1.5fr .8fr .8fr 1fr .4fr;
  gap: 10px;
  align-items: center;
  background: #fff;
  padding: 10px 12px;
}
.foundation-head { color: #667085; font-size: 11px; font-weight: 900; text-transform: uppercase; }
.foundation-row strong { display: block; }
.foundation-row em { color: var(--muted); font-size: 11px; font-style: normal; }
.foundation-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #ecfdf3;
  color: #067647;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  font-size: 11px;
  font-weight: 900;
}
.member-progress { height: 8px; border-radius: 999px; background: #eaecf0; overflow: hidden; }
.member-progress span { display: block; height: 100%; background: #087443; }
.member-progress.gold span { background: #c18519; }
.member-progress.blue span { background: #175cd3; }
.member-progress.purple span { background: #6941c6; }
.wallet-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.wallet-actions > div { margin-right: auto; display: grid; gap: 2px; }
.wallet-actions > div span { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 900; }
.wallet-actions > div strong { font-size: 20px; }
.wallet-actions.tight { justify-content: flex-start; }
.milestone-stack { display: grid; gap: 10px; }
.milestone-card {
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  padding: 11px;
  background: #fff;
}
.milestone-card.current { background: #fffbf0; border-color: #d8a738; }
.milestone-card.green { border-left-color: #087443; }
.milestone-card.blue { border-left-color: #175cd3; }
.milestone-card.purple { border-left-color: #6941c6; }
.milestone-card span { color: var(--muted); font-size: 11px; font-weight: 900; text-transform: uppercase; }
.milestone-card strong { display: block; font-size: 18px; }
.milestone-card p { margin: 5px 0; color: #344054; font-size: 12px; }
.notice.compact { padding: 9px; font-size: 12px; margin-top: 10px; }
.allocation-list { display: grid; gap: 9px; }
.allocation-list > div,
.allocation-total {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
}
.allocation-total { margin-top: 10px; font-weight: 900; }
.positive { color: #067647; }
.negative { color: #b42318; }
.warning { color: #b54708; }
.circle-progress {
  width: 86px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#087443 calc(var(--p) * 1%), #eaecf0 0);
  position: relative;
  color: var(--ink);
}
.circle-progress.gold { background: conic-gradient(#c18519 calc(var(--p) * 1%), #eaecf0 0); }
.circle-progress::before {
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 50%;
  background: #fff;
}
.circle-progress strong,
.circle-progress span { position: relative; z-index: 1; }
.circle-progress strong { font-size: 18px; align-self: end; }
.circle-progress span { font-size: 10px; color: var(--muted); align-self: start; }
.journey-grid { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 12px; align-items: center; }
.journey-grid span { color: var(--muted); display: block; margin: 2px 0 8px; }
.credit-card { background: #f8fbff; border-color: #c7d7fe; }
.credit-number { font-size: 30px; font-weight: 950; color: #175cd3; }
.activity-list,
.transaction-drawer { display: grid; gap: 10px; }
.activity-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border-bottom: 1px solid var(--line);
  padding: 9px 0;
}
.activity-row b {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: #f2f4f7;
  display: grid;
  place-items: center;
  font-size: 12px;
}
.activity-row span { color: var(--muted); font-size: 12px; display: block; }
.activity-row em { font-style: normal; font-weight: 900; }
.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}
.quick-grid button {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  display: grid;
  gap: 6px;
  text-align: left;
}
.quick-grid b { color: #087443; }
.foundation-cards {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
}
.foundation-cards article {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  display: grid;
  gap: 8px;
}
.foundation-cards strong { font-size: 15px; }
.foundation-cards span,
.foundation-cards em { color: var(--muted); font-size: 12px; font-style: normal; }
.member-footer {
  border: 1px solid #123428;
  background: #03150f;
  color: #fff;
  border-radius: 8px;
  padding: 14px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
}
.member-footer b { color: #c18519; }
.member-footer span,
.member-footer em { color: #a7b1c2; font-style: normal; font-size: 12px; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(3, 21, 15, .55);
  display: grid;
  place-items: center;
  z-index: 40;
  padding: 18px;
}
.member-modal {
  width: min(520px, 100%);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  display: grid;
  gap: 12px;
  box-shadow: 0 24px 70px rgba(0,0,0,.22);
}
.member-modal.wide { width: min(720px, 100%); }
.member-modal label,
.allocation-editor label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 11px;
  text-transform: uppercase;
  font-weight: 900;
}
.member-modal input,
.member-modal select,
.allocation-editor input {
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  padding: 10px;
  color: var(--ink);
  font-weight: 800;
}
.allocation-editor { display: grid; gap: 10px; }
.allocation-editor label { grid-template-columns: minmax(0, 1fr) 120px 54px; align-items: center; }
.allocation-editor em { font-style: normal; color: var(--ink); }
.transaction-drawer {
  position: fixed;
  right: 0;
  top: 0;
  width: min(440px, 100vw);
  height: 100vh;
  overflow: auto;
  background: #fff;
  border-left: 1px solid var(--line);
  z-index: 35;
  padding: 18px;
  box-shadow: -20px 0 60px rgba(0,0,0,.16);
}
@media (max-width: 1280px) {
  .member-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-8, .span-4 { grid-column: span 12; }
  .span-2 { grid-column: span 6; }
  .foundation-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .member-topbar { height: auto; align-items: start; }
  .member-hero { grid-template-columns: 1fr; }
  .member-metrics { grid-template-columns: 1fr; }
  .span-2 { grid-column: span 12; }
  .foundation-head { display: none; }
  .foundation-row { grid-template-columns: 1fr; gap: 6px; }
  .quick-grid, .foundation-cards { grid-template-columns: 1fr; }
  .member-footer { grid-template-columns: 1fr; }
  .allocation-editor label { grid-template-columns: 1fr; }
}

/* Visual QA overflow fixes for member dashboard */
.member-topmeta .icon-count {
  width: 54px;
  min-width: 54px;
  height: 36px;
  overflow: visible;
  font-size: 12px;
}
.member-dashboard-grid .span-2 {
  grid-column: span 4;
}
.member-dashboard-grid .journey-grid {
  grid-template-columns: 86px minmax(110px, 1fr);
}
.member-dashboard-grid .journey-grid > div:last-child {
  min-width: 0;
}
@media (max-width: 1280px) {
  .member-dashboard-grid .span-2 { grid-column: span 6; }
}
@media (max-width: 900px) {
  .member-dashboard-grid .span-2 { grid-column: span 12; }
  .member-dashboard-grid .journey-grid { grid-template-columns: 86px minmax(0, 1fr); }
}
.member-topmeta .icon-count span {
  top: 2px;
  right: 4px;
  min-width: 13px;
  height: 13px;
  font-size: 8px;
  line-height: 13px;
}

/* Blueprint+ Staff Command Center CEO rebuild */
.staff-theme {
  --command-green: #003b24;
  --command-green-2: #005b3a;
  --command-gold: #c99522;
  --command-line: #d8e0e3;
  --command-ink: #101828;
  --command-muted: #607086;
  --command-bg: #f7faf9;
}
.staff-theme .rail {
  background: linear-gradient(180deg, #00190f 0%, #002718 54%, #00150d 100%);
  border-right: 2px solid #b88916;
}
.staff-theme .brand-sub { color: #d6a21d; text-transform: uppercase; }
.staff-theme .nav-btn {
  min-height: 34px;
  padding: 8px 10px;
  color: #e9f4ef;
  border: 1px solid transparent;
  font-size: 13px;
}
.staff-theme .nav-btn.active {
  background: rgba(187, 133, 19, 0.2);
  border-color: #c99522;
  color: #fff7d8;
  box-shadow: inset 3px 0 0 #c99522;
}
.staff-theme .nav-meta {
  min-width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #c99522;
  color: #08130d;
  font-size: 11px;
}
.staff-command-topbar {
  height: 72px;
  gap: 12px;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid var(--command-line);
}
.staff-date-card,
.staff-system-pill,
.staff-command-profile {
  border: 1px solid var(--command-line);
  border-radius: 6px;
  background: #fff;
  min-height: 48px;
  padding: 7px 10px;
  display: grid;
  align-content: center;
}
.staff-date-card strong,
.staff-system-pill strong,
.staff-command-profile strong { font-size: 12px; color: var(--command-ink); }
.staff-date-card span,
.staff-system-pill span,
.staff-system-pill em,
.staff-command-profile em { font-size: 10px; color: var(--command-muted); font-style: normal; }
.staff-system-pill i,
.command-system-card i {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #0c8a50;
  margin-right: 5px;
}
.staff-global-search { flex: 1 1 360px; min-width: 220px; height: 46px; }
.staff-command-icons { display: flex; gap: 8px; }
.staff-command-icons button {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--command-line);
  background: #fff;
  font-weight: 900;
  position: relative;
}
.staff-command-icons span {
  position: absolute;
  top: -7px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  border-radius: 999px;
  background: #e1261c;
  color: #fff;
  font-size: 9px;
  line-height: 17px;
}
.staff-command-profile {
  grid-template-columns: 32px minmax(110px, auto) 92px;
  align-items: center;
  gap: 8px;
  min-width: 270px;
}
.staff-command-profile .select { height: 32px; padding: 4px 6px; font-size: 11px; }
.blueprint-command-center {
  display: grid;
  gap: 10px;
  color: var(--command-ink);
  background: var(--command-bg);
}
.command-hero {
  display: flex;
  justify-content: space-between;
  align-items: stretch;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--command-line);
  border-radius: 6px;
  padding: 12px 16px;
}
.command-hero h1 {
  margin: 2px 0 3px;
  font-size: 25px;
  letter-spacing: 0;
  text-transform: uppercase;
}
.command-hero .lede { font-size: 13px; color: var(--command-muted); max-width: 780px; }
.command-system-card {
  min-width: 190px;
  border: 1px solid var(--command-line);
  border-radius: 6px;
  padding: 9px 12px;
  display: grid;
  align-content: center;
  background: #fff;
}
.command-system-card span,
.command-system-card em { font-size: 11px; color: var(--command-muted); font-style: normal; }
.command-system-card strong { font-size: 13px; }
.command-mode-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.command-mode {
  border: 1px solid var(--command-line);
  border-radius: 7px;
  min-height: 64px;
  background: #fff;
  display: grid;
  place-items: center;
  gap: 2px;
  cursor: pointer;
}
.command-mode strong { text-transform: uppercase; font-size: 13px; }
.command-mode span { color: var(--command-muted); font-size: 11px; }
.command-mode.active.operations { background: linear-gradient(180deg, #00402a, #001f13); color: #fff; border-color: #00351f; }
.command-mode.active.coaching { background: #f6f9ff; color: #164c96; border-color: #adc6e8; }
.command-mode.active.strategy { background: #fbf8ff; color: #6840a4; border-color: #d8c7f4; }
.command-mode.active.intelligence { background: #fffaf2; color: #a45f10; border-color: #edc783; }
.command-mode.active span { color: currentColor; opacity: 0.78; }
.command-kpi-strip {
  display: grid;
  grid-template-columns: repeat(10, minmax(96px, 1fr));
  gap: 8px;
}
.command-kpi {
  border: 1px solid var(--command-line);
  border-radius: 7px;
  background: #fff;
  padding: 10px 9px;
  text-align: left;
  min-height: 78px;
  box-shadow: none;
  border-top: 4px solid var(--tone, #0c734a);
}
.command-kpi.green { --tone: #0c8a50; }
.command-kpi.gold { --tone: #c99522; }
.command-kpi.red { --tone: #d92d20; }
.command-kpi.blue { --tone: #2167a8; }
.command-kpi.purple { --tone: #7547c8; }
.command-kpi span { display: block; color: #4d5d73; font-size: 10px; font-weight: 900; text-transform: uppercase; }
.command-kpi strong { display: block; margin-top: 6px; font-size: 20px; color: var(--command-ink); }
.command-kpi em { color: var(--command-muted); font-size: 10px; font-style: normal; }
.command-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 10px;
}
.command-panel {
  grid-column: span 4;
  background: #fff;
  border: 1px solid var(--command-line);
  border-radius: 7px;
  padding: 12px;
  min-width: 0;
  overflow: hidden;
}
.command-panel.span-8 { grid-column: span 8; }
.command-panel.span-4 { grid-column: span 4; }
.command-panel-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.command-panel-head h2 {
  margin: 0;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0;
}
.command-panel-head span { color: var(--command-muted); font-size: 11px; }
.command-panel button,
.command-panel-head button,
.command-pagination b,
.command-pagination span {
  border: 1px solid var(--command-line);
  border-radius: 5px;
  background: #fff;
  padding: 6px 9px;
  font-weight: 800;
  font-size: 11px;
}
.command-panel button.full { width: 100%; margin-top: 10px; }
.command-filters {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 130px 120px 76px;
  gap: 8px;
  margin-bottom: 8px;
}
.command-filters input,
.command-filters select,
.quick-member-select,
.what-if-controls select {
  width: 100%;
  border: 1px solid var(--command-line);
  border-radius: 5px;
  min-height: 34px;
  padding: 6px 8px;
  font-size: 11px;
  background: #fff;
}
.command-table-wrap { width: 100%; overflow: hidden; }
.command-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 10px;
}
.command-table th,
.command-table td {
  border-bottom: 1px solid #edf1f3;
  padding: 7px 5px;
  vertical-align: middle;
  overflow-wrap: anywhere;
}
.command-table th { background: #002a1a; color: #fff; text-align: left; text-transform: uppercase; font-size: 9px; }
.command-table th:nth-child(1) { width: 13%; }
.command-table th:nth-child(4) { width: 10%; }
.command-table th:nth-child(11) { width: 9%; }
.command-table th:nth-child(12) { width: 12%; }
.command-table th:nth-child(13) { width: 6%; }
.command-table tr.selected td { background: #f0fbf5; }
.table-sort { all: unset; cursor: pointer; color: inherit; font-weight: 900; }
.command-person { display: flex; align-items: center; gap: 7px; min-width: 0; }
.command-person b {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #e9f6ef;
  color: #005b3a;
  flex: 0 0 auto;
  font-size: 10px;
}
.command-person.large b { width: 40px; height: 40px; }
.command-person span { display: grid; min-width: 0; font-weight: 900; }
.command-person em { color: var(--command-muted); font-style: normal; font-size: 10px; }
.command-progress {
  height: 7px;
  border-radius: 999px;
  background: #e8ecef;
  overflow: hidden;
  min-width: 0;
}
.command-progress span { display: block; height: 100%; background: var(--tone, #0c8a50); }
.command-progress.green { --tone: #0c8a50; }
.command-progress.gold { --tone: #c99522; }
.command-progress.red { --tone: #d92d20; }
.command-progress.blue { --tone: #2167d1; }
.command-progress.purple { --tone: #7547c8; }
.command-ring {
  --tone: #0c8a50;
  width: 70px;
  aspect-ratio: 1;
  border-radius: 50%;
  background: conic-gradient(var(--tone) calc(var(--value) * 1%), #d8d3cd 0);
  display: grid;
  place-items: center;
  position: relative;
  flex: 0 0 auto;
}
.command-ring::after { content: ""; position: absolute; inset: 9px; background: #fff; border-radius: 50%; }
.command-ring strong,
.command-ring span { position: relative; z-index: 1; line-height: 1; }
.command-ring strong { font-size: 19px; }
.command-ring span { font-size: 9px; color: var(--command-muted); align-self: start; margin-top: -16px; }
.command-ring.green { --tone: #0c8a50; }
.command-ring.gold { --tone: #c99522; }
.command-ring.red { --tone: #d92d20; }
.command-ring.blue { --tone: #2167d1; }
.command-ring.purple { --tone: #7547c8; }
.command-pagination { display: flex; justify-content: flex-end; align-items: center; gap: 8px; margin-top: 9px; color: var(--command-muted); font-size: 11px; }
.command-pagination b { background: #003b24; color: #fff; }
.ai-opportunity-card,
.forecast-row,
.activity-feed-row,
.foundation-analytics-row,
.approval-list button,
.drawer-foundation {
  display: grid;
  gap: 7px;
  align-items: center;
  border-bottom: 1px solid #edf1f3;
  padding: 9px 0;
  min-width: 0;
}
.ai-opportunity-card { grid-template-columns: 42px minmax(0, 1fr) auto; }
.ai-opportunity-card > b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf7f1;
  color: #006b45;
}
.ai-opportunity-card p { margin: 4px 0; color: #344054; font-size: 11px; }
.ai-opportunity-card small { color: var(--command-muted); font-size: 10px; }
.quick-member-head,
.quick-score-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 10px 0; }
.foundation-bars { display: grid; gap: 7px; }
.foundation-bars > div,
.foundation-analytics-row,
.drawer-foundation { grid-template-columns: 76px minmax(0, 1fr) 36px; font-size: 11px; }
.quick-actions-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.forecast-row { grid-template-columns: 90px 80px minmax(0, 1fr) 38px 86px; font-size: 11px; }
.foundation-analytics-grid { display: grid; grid-template-columns: 94px minmax(0, 1fr); gap: 12px; align-items: center; }
.foundation-stats,
.rae-forecast-cards,
.treasury-grid,
.what-if-results {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.rae-forecast-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.treasury-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.foundation-stats div,
.rae-forecast-cards div,
.treasury-grid div,
.what-if-results div,
.forecast-note {
  border: 1px solid #edf1f3;
  border-radius: 6px;
  padding: 8px;
  background: #fbfcfd;
  min-width: 0;
}
.foundation-stats span,
.rae-forecast-cards span,
.treasury-grid span,
.what-if-results span,
.forecast-note span { display: block; color: var(--command-muted); font-size: 10px; }
.foundation-stats strong,
.rae-forecast-cards strong,
.treasury-grid strong,
.what-if-results strong { font-size: 15px; overflow-wrap: anywhere; }
.activity-feed-row { grid-template-columns: 34px 58px minmax(0, 1fr) 70px; font-size: 11px; }
.activity-feed-row b { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: #eef7f2; }
.activity-feed-row mark { background: transparent; font-weight: 900; text-align: right; color: #0c8a50; }
.activity-feed-row.red mark { color: #d92d20; }
.command-line { width: 100%; height: 120px; margin-top: 8px; }
.command-line circle { fill: #006b45; }
.reserve-health { margin-top: 12px; display: grid; grid-template-columns: 90px minmax(0, 1fr) 80px; gap: 8px; align-items: center; font-size: 11px; }
.approval-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
.approval-list button { grid-template-columns: minmax(0, 1fr) 28px; border: 1px solid #edf1f3; border-radius: 6px; text-align: left; }
.approval-list strong { border-radius: 50%; color: #fff; display: grid; place-items: center; width: 24px; height: 24px; }
.approval-list strong.green { background: #0c8a50; }
.approval-list strong.gold { background: #c99522; }
.approval-list strong.red { background: #d92d20; }
.approval-list strong.purple { background: #7547c8; }
.what-if-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 12px; }
.what-if-controls { display: grid; gap: 8px; }
.what-if-controls label { font-size: 11px; font-weight: 900; color: #344054; }
.what-if-results { grid-template-columns: repeat(5, minmax(0, 1fr)); margin-top: 0; }
.what-if-results em { display: block; color: #0c8a50; font-style: normal; font-size: 10px; }
.command-list { margin: 0; padding-left: 18px; color: #344054; font-size: 12px; }
.command-list li { margin: 8px 0; }
.command-footer {
  min-height: 54px;
  background: linear-gradient(90deg, #001a10, #00331f);
  color: #fff;
  border-radius: 6px;
  display: grid;
  grid-template-columns: 40px minmax(0, auto) minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  border: 1px solid #c99522;
}
.command-footer b { color: #c99522; font-size: 22px; }
.command-footer span { color: #d6a21d; font-size: 11px; }
.command-footer em { color: #d9e8e0; font-style: normal; font-size: 10px; }
.staff-wallet-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: min(430px, 96vw);
  height: 100vh;
  overflow: auto;
  background: #fff;
  border-left: 2px solid #c99522;
  z-index: 30;
  padding: 18px;
  box-shadow: -18px 0 34px rgba(16, 24, 40, 0.18);
}
.drawer-head { display: flex; justify-content: space-between; gap: 10px; border-bottom: 1px solid var(--command-line); padding-bottom: 12px; }
.drawer-head h2 { margin: 3px 0; }
.drawer-head span,
.drawer-head em { color: var(--command-muted); font-size: 11px; font-style: normal; }
.drawer-head button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--command-line); background: #fff; }
.drawer-section { border-bottom: 1px solid #edf1f3; padding: 12px 0; }
.drawer-section h3 { margin: 0 0 8px; font-size: 13px; text-transform: uppercase; }
.drawer-section p,
.drawer-section li { color: #344054; font-size: 12px; }
.drawer-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding-top: 12px; }
.drawer-actions button { border: 1px solid var(--command-line); background: #fff; border-radius: 6px; padding: 8px; font-weight: 900; }
@media (max-width: 1320px) {
  .command-kpi-strip { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .command-panel.span-8,
  .command-panel.span-4 { grid-column: span 12; }
}
@media (max-width: 900px) {
  .staff-command-topbar { height: auto; align-items: stretch; }
  .staff-date-card,
  .staff-system-pill,
  .staff-command-profile,
  .staff-global-search { width: 100%; min-width: 0; }
  .staff-command-profile { grid-template-columns: 32px minmax(0, 1fr); }
  .staff-command-profile .select { grid-column: 1 / -1; width: 100%; }
  .command-hero { flex-direction: column; }
  .command-mode-tabs { grid-template-columns: 1fr; }
  .command-kpi-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .command-filters,
  .what-if-grid,
  .foundation-analytics-grid { grid-template-columns: 1fr; }
  .quick-actions-row,
  .rae-forecast-cards,
  .treasury-grid,
  .what-if-results,
  .foundation-stats { grid-template-columns: 1fr 1fr; }
  .forecast-row { grid-template-columns: 1fr; }
  .command-footer { grid-template-columns: 36px 1fr; }
  .command-footer span,
  .command-footer em { grid-column: 1 / -1; }
}

/* Blueprint+ Staff Command Center visual QA containment */
.staff-command-topbar {
  display: grid;
  grid-template-columns: 112px 164px minmax(180px, 1fr) 142px 230px;
  overflow: hidden;
}
.staff-command-icons button {
  width: 44px;
  min-width: 44px;
  overflow: visible;
  font-size: 11px;
}
.staff-command-icons span {
  top: 1px;
  right: 3px;
  min-width: 14px;
  height: 14px;
  line-height: 14px;
  font-size: 8px;
}
.staff-command-profile {
  min-width: 0;
  grid-template-columns: 32px minmax(0, 1fr) 28px;
  overflow: hidden;
}
.staff-command-profile div {
  min-width: 0;
  overflow: hidden;
}
.staff-command-profile strong,
.staff-command-profile em {
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.staff-command-profile .select {
  width: 28px;
  min-width: 28px;
  max-width: 28px;
  color: transparent;
  padding: 0;
}
.command-table th,
.command-table td,
.command-table button,
.command-table .pill {
  font-size: 9px;
  line-height: 1.2;
}
@media (max-width: 900px) {
  .staff-command-topbar {
    display: flex;
    overflow: visible;
  }
  .staff-command-icons button {
    width: 44px;
    min-width: 44px;
  }
  .command-table th:nth-child(2),
  .command-table td:nth-child(2),
  .command-table th:nth-child(3),
  .command-table td:nth-child(3),
  .command-table th:nth-child(4),
  .command-table td:nth-child(4),
  .command-table th:nth-child(6),
  .command-table td:nth-child(6),
  .command-table th:nth-child(7),
  .command-table td:nth-child(7),
  .command-table th:nth-child(8),
  .command-table td:nth-child(8),
  .command-table th:nth-child(11),
  .command-table td:nth-child(11),
  .command-table th:nth-child(12),
  .command-table td:nth-child(12) {
    display: none;
  }
  .command-table th:nth-child(1) { width: 38%; }
  .command-table th:nth-child(5) { width: 22%; }
  .command-table th:nth-child(9) { width: 18%; }
  .command-table th:nth-child(10) { width: 14%; }
  .command-table th:nth-child(13) { width: 8%; }
  .command-table-wrap,
  .command-table { overflow: hidden; }
  .command-table .command-ring {
    width: 48px;
  }
  .command-person b {
    width: 22px;
    height: 22px;
  }
}
.staff-command-topbar {
  grid-template-columns: 112px 164px minmax(160px, 1fr) 154px 214px;
}
.staff-command-icons {
  width: 154px;
  overflow: visible;
}
.command-table td {
  overflow: hidden;
}
.command-table .command-ring {
  width: 42px;
}
.command-table .command-ring strong {
  font-size: 13px;
}
.command-table .command-ring span {
  display: none;
}
.command-table .pill {
  display: inline-block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.command-footer {
  grid-template-columns: 52px minmax(0, auto) minmax(0, 1fr) auto;
}
.command-footer b {
  min-width: 44px;
}
@media (max-width: 900px) {
  .command-table th:nth-child(10),
  .command-table td:nth-child(10) {
    display: none;
  }
  .command-table th:nth-child(1) { width: 48%; }
  .command-table th:nth-child(5) { width: 23%; }
  .command-table th:nth-child(9) { width: 17%; }
  .command-table th:nth-child(13) { width: 12%; }
  .command-table td:nth-child(13) {
    padding-left: 0;
    padding-right: 0;
    text-align: center;
  }
  .command-table td:nth-child(13) button {
    width: 24px;
    min-width: 24px;
    height: 24px;
    padding: 0;
    font-size: 0;
    line-height: 1;
  }
  .command-table td:nth-child(13) button::after {
    content: ">";
    font-size: 12px;
    line-height: 1;
  }
}
.command-table .pill {
  width: 14px;
  min-width: 14px;
  max-width: 14px;
  height: 14px;
  padding: 0;
  border-radius: 50%;
  color: transparent;
  font-size: 0;
  vertical-align: middle;
}
.command-table .command-ring {
  width: 28px;
  margin: 0 auto;
}
.command-table .command-ring::after {
  inset: 5px;
}
.command-table .command-ring strong {
  font-size: 10px;
}
.command-table td:nth-child(9) {
  text-align: center;
}

/* Staff command navigation and spacing bug fixes */
.staff-theme .nav-meta {
  width: auto;
  min-width: 20px;
  padding: 0 6px;
}
.command-grid {
  align-items: start;
}
.command-panel {
  align-self: start;
}
.compact-command-table th,
.compact-command-table td {
  white-space: normal;
}
.approval-list button span em {
  display: block;
  margin-top: 2px;
  color: var(--command-muted);
  font-size: 10px;
  font-style: normal;
}

/* Blueprint+ member route containment */
.member-dashboard-grid {
  align-items: start;
}
.member-card {
  align-self: start;
}
.member-focused-screen .member-metrics {
  margin-bottom: 12px;
}

/* Expanded command route visual QA fixes */
.approval-list {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}
.approval-list button {
  grid-template-columns: minmax(0, 1fr) minmax(46px, auto);
  align-items: center;
}
.approval-list button span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.approval-list strong {
  width: auto;
  min-width: 42px;
  padding: 0 8px;
  border-radius: 999px;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .approval-list {
    grid-template-columns: 1fr;
  }
}

/* Command route gap and table header polish */
.command-stack {
  grid-column: span 8;
  display: grid;
  gap: 10px;
  align-content: start;
  min-width: 0;
}
.command-stack > .command-panel,
.command-stack > .command-panel.span-4,
.command-stack > .command-panel.span-8 {
  grid-column: 1 / -1;
  width: 100%;
}
.command-table th .table-sort,
.command-table th button.table-sort,
.command-panel .command-table th button.table-sort {
  all: unset;
  box-sizing: border-box;
  display: inline;
  color: inherit;
  font: inherit;
  font-weight: 900;
  text-transform: uppercase;
  cursor: pointer;
  white-space: normal;
  overflow-wrap: anywhere;
}
.command-table th .table-sort:hover {
  text-decoration: underline;
  text-underline-offset: 2px;
}
.member-quick-view,
.command-panel[data-command-section="rae"] {
  align-self: start;
}
@media (max-width: 980px) {
  .command-stack {
    grid-column: span 12;
  }
}

/* Supabase-ready auth and rehearsal labeling */
.auth-mode-pill {
  display: grid;
  gap: 3px;
  border: 1px solid #d7e3dd;
  border-left: 4px solid #0c8a50;
  border-radius: 7px;
  padding: 10px 12px;
  background: #f6fbf8;
}
.auth-mode-pill span {
  color: #003b24;
  font-weight: 900;
  text-transform: uppercase;
  font-size: 12px;
}
.auth-mode-pill em {
  color: #52685f;
  font-style: normal;
  font-size: 12px;
}
.password-field.demo input {
  background: #fbfcfd;
  border-style: dashed;
}
.auth-status-line {
  margin-top: 6px;
  color: #d7b24c;
  font-weight: 900;
  text-transform: uppercase;
}
.ceo-demo-callout {
  border: 1px solid #d8e0e3;
  border-left: 4px solid #c99522;
  background: #fffaf0;
  border-radius: 7px;
  padding: 12px;
}
.ceo-demo-callout strong {
  display: block;
  color: #003b24;
  margin-bottom: 4px;
}
.ceo-demo-callout span {
  display: block;
  color: #5f6f64;
  font-size: 12px;
}
.treasury-readiness-grid,
.treasury-limit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}
.treasury-readiness-grid div,
.treasury-limit-grid div {
  border: 1px solid #edf1f3;
  border-radius: 6px;
  background: #fbfcfd;
  padding: 8px;
  min-width: 0;
}
.treasury-readiness-grid span,
.treasury-limit-grid span {
  display: block;
  color: var(--command-muted);
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
.treasury-readiness-grid strong,
.treasury-limit-grid strong {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  overflow-wrap: anywhere;
}
.treasury-gate-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.treasury-gate-list span {
  border: 1px solid #dbe5ec;
  border-radius: 999px;
  background: #ffffff;
  padding: 6px 8px;
  color: #27384d;
  font-size: 10px;
  font-weight: 900;
  text-transform: uppercase;
}
@media (max-width: 900px) {
  .treasury-readiness-grid,
  .treasury-limit-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .treasury-readiness-grid,
  .treasury-limit-grid { grid-template-columns: 1fr; }
}

.topbar-signout {
  border: 1px solid #cbd5df;
  background: #ffffff;
  color: #143325;
  border-radius: 7px;
  padding: 9px 12px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  white-space: nowrap;
}

.topbar-signout:hover {
  border-color: #b8872f;
  background: #fffaf0;
}

.staff-command-profile .topbar-signout {
  grid-column: 1 / -1;
  width: 100%;
  padding: 7px 8px;
}
