/* NCP Partner Portal styles. Colors follow the NCP brand (CLAUDE.md). */
:root {
  --blue: #237FB5;        /* NCP Blue: large areas, charts, highlights */
  --blue-dark: #1A6593;   /* text and buttons (meets contrast) */
  --blue-deeper: #134C6F;
  --blue-tint: #EEF6FB;
  --blue-soft: #E3F0F8;
  --blue-bar: #BCD9EC;
  --charcoal: #3F3F3F;
  --text: #2B2B2B;
  --muted: #5F6368;
  --line: #E1E5EA;
  --line-soft: #EAEDF0;
  --page: #F4F6F8;
  --white: #FFFFFF;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.4;
}
a { color: var(--blue-dark); }
a:hover { color: var(--blue-deeper); }
h1, h2 { color: var(--charcoal); margin: 0; }
h1 { font-size: 28px; line-height: 1.2; }
h2 { font-size: 17px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }
h1[tabindex="-1"]:focus { outline: none; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--white); padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 13px; }

.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }

.btn {
  font: inherit; font-weight: 600; font-size: 14px;
  border-radius: 8px; padding: 10px 16px; min-height: 44px;
  cursor: pointer; border: 1px solid #C9CFD6; background: var(--white); color: var(--charcoal);
  text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px;
}
.btn:hover { border-color: #9AA3AD; }
.btn.primary { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }
.btn.primary:hover { background: var(--blue-deeper); }
.btn.link { border: 0; background: transparent; color: var(--blue-dark); padding: 8px 0; }
.btn.quiet { border: 0; background: transparent; color: var(--muted); font-weight: 500; }
.btn.chip[aria-pressed="true"] { background: var(--blue-dark); border-color: var(--blue-dark); color: var(--white); }

.input {
  font: inherit; font-size: 15px; padding: 10px 12px; min-height: 44px; width: 100%;
  border: 1px solid #C9CFD6; border-radius: 8px; background: var(--white); color: var(--text);
}
.label { font-size: 13px; color: var(--muted); font-weight: 600; }
.error { color: #B3261E; font-size: 14px; margin: 0; }

/* ---------- Login ---------- */
.login {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 32px 16px;
}
.login-card { width: 100%; max-width: 820px; display: flex; flex-wrap: wrap; overflow: hidden; }
.login-brand {
  flex: 1 1 300px; background: var(--charcoal); color: var(--white);
  padding: 36px 32px; display: flex; flex-direction: column; gap: 16px;
}
.login-brand h1 { color: var(--white); }
.login-brand p { margin: 0; color: #D6D6D6; line-height: 1.5; }
.brand-name { font-weight: 700; font-size: 20px; }
.brand-rule { width: 48px; height: 4px; background: var(--blue); border-radius: 2px; }
.login-form { flex: 1 1 320px; padding: 36px 32px; display: flex; flex-direction: column; gap: 14px; }
.login-form h2 { font-size: 22px; }
.login-form p { margin: 0; line-height: 1.5; }
.code-input { letter-spacing: 6px; text-align: center; font-size: 22px; }
.notice {
  background: #FFF8E1; border: 1px solid #F0D58C; color: #5C4A00;
  border-radius: 8px; padding: 10px 12px; font-size: 13px;
}

/* ---------- App shell ---------- */
.shell { min-height: 100vh; display: grid; grid-template-columns: 240px minmax(0, 1fr); }
.sidebar {
  background: var(--charcoal); color: var(--white); padding: 22px 14px;
  display: flex; flex-direction: column; gap: 6px;
  position: sticky; top: 0; height: 100vh;
}
.sidebar .brand { padding: 0 10px 18px; }
.sidebar .brand-name { font-size: 17px; line-height: 1.2; }
.sidebar .brand-sub { font-size: 13px; color: #BDBDBD; margin-top: 4px; }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a {
  font-size: 15px; font-weight: 600; min-height: 44px; padding: 10px 14px;
  border-radius: 8px; color: #D6D6D6; text-decoration: none;
  display: flex; align-items: center; gap: 10px;
}
.nav a:hover { background: rgba(255, 255, 255, 0.08); color: var(--white); }
.nav a[aria-current="page"] { background: var(--blue); color: var(--white); }
.nav svg { flex: none; }
.user { margin-top: auto; padding: 18px 10px 0; border-top: 1px solid rgba(255, 255, 255, 0.15); }
.user .who { font-weight: 600; overflow-wrap: anywhere; }
.user .org { font-size: 13px; color: #BDBDBD; margin-bottom: 10px; overflow-wrap: anywhere; }
.user .btn { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, 0.35); min-height: 40px; padding: 6px 12px; }

.main { padding: 30px 28px 64px; min-width: 0; }
.content { max-width: 1080px; }
.page-head { margin-bottom: 22px; }
.page-head .muted { margin-top: 4px; }
.preview-tag {
  display: inline-block; margin-left: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.03em;
  background: #FFF8E1; color: #5C4A00; border: 1px solid #F0D58C; border-radius: 999px; padding: 1px 8px;
  vertical-align: middle;
}

/* ---------- Dashboard ---------- */
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; flex-wrap: wrap; gap: 16px; }
.hero {
  flex: 1 1 280px; background: var(--blue); color: var(--white); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; justify-content: space-between; gap: 14px;
}
.hero .title { font-size: 15px; font-weight: 600; }
.hero .big { font-size: 56px; font-weight: 700; line-height: 1; }
.stats { flex: 2 1 420px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.stat { padding: 16px 18px; }
.stat .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.stat .v { font-size: 28px; font-weight: 700; margin-top: 2px; color: var(--charcoal); }
.stat .s { font-size: 13px; color: var(--muted); }
.panel { padding: 22px; min-width: 0; }
.panel .sub { font-size: 13px; color: var(--muted); margin: 4px 0 16px; }
.grow-wide { flex: 1 1 420px; }
.grow-narrow { flex: 1 1 340px; }

.chart { display: flex; align-items: flex-end; gap: 18px; height: 180px; border-bottom: 1px solid var(--line); padding: 0 6px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart .n { font-size: 13px; font-weight: 600; }
.bar { width: 100%; max-width: 56px; background: var(--blue-bar); border-radius: 6px 6px 0 0; display: flex; align-items: flex-end; overflow: hidden; }
.bar .fill { width: 100%; background: var(--blue); }
.chart-labels { display: flex; gap: 18px; padding: 8px 6px 0; }
.chart-labels div { flex: 1; min-width: 0; overflow: visible; text-align: center; font-size: 13px; color: var(--muted); white-space: nowrap; }
.chart, .chart-labels { min-width: 0; }
.panel.grow-wide { overflow: hidden; }
.upload-main a[download] { display: inline-block; padding: 10px 0; }
.chart.dense, .chart-labels.dense { gap: 6px; }
.chart.dense .n { font-size: 11px; }
.chart-labels.dense div { font-size: 11px; }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }

.funnel { display: flex; flex-direction: column; gap: 12px; }
.funnel .line { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 4px; }
.funnel .line span:first-child { font-weight: 600; }
.track { height: 8px; background: #EEF1F4; border-radius: 4px; }
.track > div { height: 8px; border-radius: 4px; }

.outreach { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.outreach > div { border-top: 3px solid var(--blue); padding-top: 10px; }
.outreach .v { font-size: 24px; font-weight: 700; color: var(--charcoal); }
.outreach .k { font-size: 14px; color: var(--muted); }

/* ---------- Leads table ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 14px; }
.toolbar .input { max-width: 320px; }
.table-wrap { overflow-x: auto; }
table.leads { width: 100%; min-width: 900px; border-collapse: collapse; }
.leads th, .leads td { text-align: left; padding: 14px 18px; border-top: 1px solid var(--line-soft); vertical-align: middle; }
.leads thead th { border-top: 0; font-size: 13px; color: var(--muted); font-weight: 600; background: #F7F9FA; }
.leads tbody tr { cursor: pointer; }
.leads tbody tr:hover { background: #F2F8FC; }
.leads td { font-size: 14px; }
.leads .biz { font-weight: 600; font-size: 15px; }
.leads .biz a { color: var(--text); text-decoration: none; }
.leads .biz a:hover { text-decoration: underline; }
.leads .person { font-size: 13px; color: var(--muted); }
.empty { padding: 32px; text-align: center; color: var(--muted); }
.leads .num { text-align: center; }
.reached { display: inline-block; min-width: 28px; padding: 2px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-deeper); font-weight: 700; }

/* Outreach summary on lead detail */
.touch-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 12px 0 16px; }
.touch-grid > div { background: var(--page); border-radius: 8px; padding: 10px 12px; }
.touch-grid .v { font-size: 22px; font-weight: 700; color: var(--charcoal); }
.touch-grid .k { font-size: 13px; color: var(--muted); }

.badge { display: inline-block; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; white-space: nowrap; }
.badge.received { background: #F1F2F3; color: var(--charcoal); }
.badge.contacting, .badge.reviewing { background: var(--blue-soft); color: var(--blue-deeper); }
.badge.agreement { background: #D3E7F4; color: var(--blue-deeper); }
.badge.enrolled { background: var(--blue-dark); color: var(--white); }
.badge.closed { background: #F1F2F3; color: var(--muted); }
.badge.plain { background: var(--blue-soft); color: var(--blue-deeper); }
.legend-panel { margin-top: 16px; }
.stage-legend { margin: 12px 0 10px; display: grid; gap: 10px; }
.stage-legend > div { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 12px; align-items: baseline; }
.stage-legend dt, .stage-legend dd { margin: 0; }
.stage-legend dd { font-size: 14px; }
@media (max-width: 560px) { .stage-legend > div { grid-template-columns: 1fr; gap: 4px; } }

/* ---------- Lead detail ---------- */
.detail-main { flex: 2 1 420px; min-width: 0; padding: 24px; }
.detail-side { flex: 1 1 280px; min-width: 0; padding: 24px; }
.detail-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; align-items: flex-start; }
.detail-head h1 { font-size: 26px; }
.tracker { list-style: none; padding: 0; margin: 26px 0 0; }
.tracker li { display: flex; gap: 12px; align-items: flex-start; min-height: 40px; position: relative; color: #6B6F75; }
.tracker li:not(:last-child)::before {
  content: ""; position: absolute; left: 6px; top: 19px; bottom: -1px; width: 2px; background: #E1E5EA;
}
.tracker li.done:not(:last-child)::before { background: var(--blue); }
.tracker .dot { flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: var(--white); border: 2px solid #C9CFD6; position: relative; z-index: 1; }
.tracker li.done, .tracker li.current { color: var(--charcoal); }
.tracker li.done .dot, .tracker li.current .dot { background: var(--blue); border-color: var(--blue); }
.tracker li.current { font-weight: 700; }
.closed-note { background: var(--page); border-radius: 8px; padding: 12px 14px; color: var(--muted); }
.update { background: var(--blue-tint); border-radius: 10px; padding: 16px 18px; margin-top: 18px; }
.update .k { font-size: 13px; font-weight: 700; color: var(--blue-dark); text-transform: uppercase; letter-spacing: 0.04em; }
.update p { margin: 6px 0 0; line-height: 1.5; }
.history { list-style: none; margin: 0; padding: 0; }
.history li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }

/* ---------- Upload ---------- */
.upload-main { flex: 1 1 420px; min-width: 0; padding: 24px; display: flex; flex-direction: column; gap: 12px; }
.upload-main p { margin: 0; line-height: 1.5; }
.upload-side { flex: 1 1 340px; min-width: 0; padding: 24px; }
.success { background: var(--blue-tint); border: 1px solid #A9CDE3; color: var(--blue-deeper); border-radius: 8px; padding: 12px 14px; }
.uploads { list-style: none; margin: 12px 0 0; padding: 0; }
.upload-main .btn.primary { align-self: flex-start; }
.upload-main .error:empty, #upload-ok:empty, #file-info:empty { display: none; }
.uploads li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }

.loading { padding: 40px 0; color: var(--muted); }

/* ---------- Calculations ---------- */
.calc-layout { display: grid; grid-template-columns: minmax(300px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.calc-inputs h2 { margin-bottom: 10px; }
.calc-inputs .field { margin-bottom: 12px; }
.calc-results { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.money-in { position: relative; }
.money-in::before { content: "$"; position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.money-in .input { padding-left: 22px; }
.lender-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; position: relative;
  border: 1px solid var(--line); border-radius: 10px; padding: 12px 12px 12px; margin-bottom: 10px;
}
.lender-row .lr-name { grid-column: 1 / -1; padding-right: 40px; }
.lender-row .label { display: block; margin-bottom: 4px; font-size: 12px; }
.lender-row .input { min-height: 40px; padding: 8px 10px; font-size: 14px; }
.lender-row .money-in .input { padding-left: 20px; }
.rm-lender {
  position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 8px;
  background: transparent; color: var(--muted); font-size: 22px; cursor: pointer;
}
.rm-lender:hover { background: #FBE9E0; color: #A4481F; }
.add-lender { width: 100%; border-style: dashed; color: var(--blue-dark); margin-bottom: 6px; }
.slider-top { display: flex; justify-content: space-between; align-items: baseline; }
.slider-top b { font-size: 18px; color: var(--blue-dark); }
input[type="range"] { width: 100%; accent-color: var(--blue); height: 32px; }
.slider-ends { display: flex; justify-content: space-between; }
.preapprove-box { border-top: 1px solid var(--line); margin-top: 16px; padding-top: 16px; }
.preapprove-box .btn { width: 100%; font-size: 16px; min-height: 48px; }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.preapprove-box p { margin: 8px 0 0; }
.fit-badge { border-radius: 10px; padding: 12px 14px; font-weight: 600; }
.fit-badge.ok { background: #E2F3EA; color: #1C6B44; }
.fit-badge.no { background: #FBE9E0; color: #8A3B18; }
.fit-badge.warn { background: #FFF8E1; color: #5C4A00; border: 1px solid #F0D58C; font-weight: 500; }
.pa-chart { margin: 4px 0 8px; max-width: 440px; }
.pa-note { background: #FFF8E1; border: 1px solid #F0D58C; padding: 8px 10px; font-size: 10pt; border-radius: 4px; }
.fit-badge.pending { background: var(--page); color: var(--muted); font-weight: 500; border: 1px dashed var(--line); }
.before-after { display: grid; grid-template-columns: 1fr auto 1fr auto; gap: 16px; align-items: center; }
.before-after .k { font-size: 13px; color: var(--muted); font-weight: 600; }
.before-after .v { font-size: 28px; font-weight: 700; line-height: 1.15; }
.before-after .v.old { color: #6B6F75; }
.before-after .v.new { color: var(--blue-dark); }
.before-after .arrow { font-size: 24px; color: var(--muted); }
.cut-box { background: var(--blue-dark); color: var(--white); border-radius: 10px; padding: 10px 16px; text-align: center; }
.cut-box .v { font-size: 26px; font-weight: 700; }
.calc-stats { flex: none; }
.stat .v.good { color: #1C6B44; }
table.simple { width: 100%; border-collapse: collapse; min-width: 420px; font-size: 14px; }
table.simple th { text-align: left; font-size: 13px; color: var(--muted); font-weight: 600; padding: 0 10px 8px; border-bottom: 2px solid var(--line); }
table.simple td { padding: 10px; border-bottom: 1px solid var(--line-soft); }
table.simple th:first-child, table.simple td:first-child { padding-left: 0; }
table.simple tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
table.simple .r { text-align: right; }
@media (max-width: 1000px) { .calc-layout { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .before-after { grid-template-columns: 1fr auto 1fr; }
  .before-after .cut-box { grid-column: 1 / -1; }
  .before-after .v { font-size: 22px; }
}

/* ---------- Pre-approval letter (print only) ---------- */
#print-root { display: none; }
@media print {
  @page { margin: 0.6in; }
  body.printing { background: #fff; }
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block; }
}
.pa { font-family: "Source Sans 3", Arial, sans-serif; color: #2B2B2B; font-size: 11.5pt; line-height: 1.45; }
.pa-head { display: flex; justify-content: space-between; align-items: flex-end; }
.pa-brand { font-size: 18pt; font-weight: 700; color: #3F3F3F; }
.pa-sub { color: #5F6368; font-size: 10pt; }
.pa-date { color: #5F6368; font-size: 10pt; }
.pa-rule { height: 4px; background: #237FB5; margin: 10px 0 18px; }
.pa-title { font-size: 22pt; color: #1A6593; margin: 0 0 6px; }
.pa-for { margin: 0 0 14px; color: #3F3F3F; }
.pa-key { width: 100%; border-collapse: collapse; margin: 12px 0 18px; }
.pa-key td { padding: 7px 10px; border-bottom: 1px solid #E1E5EA; }
.pa-key td:first-child { color: #5F6368; width: 42%; }
.pa-h2 { font-size: 13pt; color: #3F3F3F; margin: 16px 0 6px; }
.pa-table { width: 100%; border-collapse: collapse; font-size: 10.5pt; }
.pa-table th { text-align: left; color: #5F6368; border-bottom: 2px solid #E1E5EA; padding: 5px 8px 5px 0; }
.pa-table td { padding: 5px 8px 5px 0; border-bottom: 1px solid #EAEDF0; }
.pa-table tfoot td { font-weight: 700; border-top: 2px solid #E1E5EA; border-bottom: 0; }
.pa-fine { margin-top: 22px; font-size: 9pt; color: #5F6368; border-top: 1px solid #E1E5EA; padding-top: 10px; }

/* ---------- Phones and small tablets ---------- */
@media (max-width: 800px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; padding: 14px 16px; gap: 10px; }
  .sidebar .brand { padding: 0; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
  .nav a { justify-content: center; padding: 10px 6px; gap: 6px; font-size: 14px; white-space: nowrap; }
  .user { margin-top: 0; padding: 10px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
  .user .org { margin: 0; flex: 1; }
  .main { padding: 22px 16px 48px; }
  .hero .big { font-size: 48px; }
  .chart, .chart-labels { gap: 10px; }
}
@media (max-width: 480px) {
  .stats { grid-template-columns: 1fr 1fr; gap: 10px; }
  .stat { padding: 12px 14px; }
  .stat .v { font-size: 24px; }
  .login-brand, .login-form { padding: 28px 22px; }
}

/* Sign-in log (admins only) */
.table-title { font-size: 1.05rem; margin: 16px 16px 4px; }
.table-wrap + .table-wrap { margin-top: 16px; }
.staff-tag { display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 10px; background: #E8F1F8; color: #1A6593; font-size: 0.78rem; font-weight: 600; vertical-align: middle; }
tr.refused td { background: #FFF8E1; }
table.leads.log { min-width: 560px; }
.leads.log tbody tr { cursor: default; }
.leads.log tbody tr:hover { background: none; }

/* Help + confidentiality footer, and the code-step links */
.site-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line-soft); line-height: 1.5; }
.site-foot p { margin: 0 0 4px; }
.site-foot a { color: var(--blue-dark, #1A6593); }
.login > .site-foot { max-width: 820px; width: 100%; margin: 20px auto 0; border-top: 0; text-align: center; }
.login-links { display: flex; flex-wrap: wrap; gap: 4px 12px; }
.login-links .btn.quiet { padding-left: 0; padding-right: 0; }
.staff-tag.odd { background: #FBE9E0; color: #8A3B18; }

/* ---------- Dashboard: deal banners, tiles, deal stages (boss's notes 2026-11-12) ---------- */
.hero.dark { background: var(--charcoal); }
.hero .hero-money { font-size: 26px; font-weight: 700; }
.hero .hero-money span { font-size: 15px; font-weight: 500; opacity: 0.9; }
.hero .small { opacity: 0.9; }
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1000px) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 420px) { .tiles { grid-template-columns: 1fr; } }
.deal-bars { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
@media (max-width: 900px) { .deal-bars { grid-template-columns: 1fr; } }
.deal-bar-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.deal-bar-head h3 { font-size: 16px; margin: 0; }
.segbar { display: flex; height: 16px; border-radius: 8px; overflow: hidden; background: #EEF1F4; gap: 2px; }
.segbar > div { min-width: 6px; }
.stage-list { list-style: none; padding: 0; margin: 14px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 6px 16px; }
.stage-list li { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.stage-list li span:nth-child(2) { flex: 1; min-width: 0; }
.stage-list li b { color: var(--charcoal); }
.stage-list li.zero { color: var(--muted); }
.stage-list li.zero b { color: var(--muted); font-weight: 500; }
.panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 8px; }
.seg-toggle { display: flex; gap: 6px; }

/* Submit Referrals: single referral form */
.refer-form { display: flex; flex-direction: column; gap: 10px; }
.refer-form .two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 14px; }
@media (max-width: 560px) { .refer-form .two { grid-template-columns: 1fr; } }
.refer-form textarea.input { resize: vertical; font: inherit; min-height: 72px; }
.refer-form .btn.primary { align-self: flex-start; }
#refer-error:empty, #refer-ok:empty { display: none; }
.pa-logo-wrap { display: flex; align-items: center; gap: 12px; }
.pa-logo { width: 46px; height: auto; flex: none; }
.refer-form .two .span2 { grid-column: 1 / -1; }

/* Sidebar logo: NCP_logo_full.svg on a white tile so its colors read on the charcoal sidebar */
.sidebar .brand-tile { background: #FFFFFF; border-radius: 8px; padding: 10px 10px 8px; }
.sidebar .brand-logo { display: block; width: 100%; height: auto; }
.sidebar .brand-sub { margin-top: 10px; padding-left: 2px; letter-spacing: 0.02em; }
@media (max-width: 800px) { .sidebar .brand-tile { max-width: 240px; } }
