:root {
  --gutter: 20px;
}

.bar { padding: 10px var(--gutter); min-height: 44px; }
.bar-right { display: flex; align-items: center; gap: 16px; }

/* Their search lives in the blue band, right, not in a box beside the list. */
.bar-search { position: relative; display: flex; align-items: center; }
.bar-search svg { position: absolute; left: 8px; width: 15px; height: 15px; color: var(--on-blue); opacity: 0.8; }
.bar-search input {
  width: 240px;
  min-height: 30px;
  padding: 0 10px 0 30px;
  border: 1px solid rgba(255, 255, 255, 0.45);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.16);
  color: var(--on-blue);
  font: inherit;
  font-size: var(--size-s);
}
.bar-search input::placeholder { color: rgba(255, 255, 255, 0.8); }
.bar-search input:focus { outline: 2px solid #fff; outline-offset: 1px; background: rgba(255, 255, 255, 0.24); }

/* The white bar under the band: who we are looking at, and what can be done to them. */
.contextbar {
  position: sticky;
  top: 44px;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap);
  padding: 8px var(--gutter);
  background: var(--card);
  border-bottom: 1px solid var(--line);
}
.context-title { margin: 0; font-size: var(--size-m); font-weight: 600; }
.context-actions { display: flex; gap: 8px; }

/* The grey strip: label over value, hairline rules between, money right-aligned. */
.factstrip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gutter);
  flex-wrap: wrap;
  padding: 10px var(--gutter);
  background: var(--page);
  border-bottom: 1px solid var(--line);
}
.facts { display: flex; align-items: stretch; }
.fact { display: flex; flex-direction: column; gap: 1px; padding: 0 18px; }
.fact:first-child { padding-left: 0; }
.fact + .fact { border-left: 1px solid #D9D9D9; }
.fact-label { font-size: 11px; color: var(--muted); }
.fact-value { font-weight: 600; font-variant-numeric: tabular-nums; }
.fact-value.loss { color: var(--red-ink); }
.fact-value.gain { color: var(--green-ink); }
.fact-value.flat { font-weight: 400; color: var(--muted); }
.total { font-size: var(--size-l); font-weight: 600; font-variant-numeric: tabular-nums; margin-left: auto; }

@media (max-width: 720px) {
  .bar-search input { width: 140px; }
  .contextbar { position: static; }
}

main {
  max-width: 1180px;
  margin: 0 auto;
  padding: var(--gutter);
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: var(--gutter);
  align-items: start;
}
@media (max-width: 720px) {
  main { grid-template-columns: 1fr; }
}

/* --- client list --- */

.clients { display: flex; flex-direction: column; gap: var(--gap); position: sticky; top: 94px; }
.client-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 60vh;
  overflow-y: auto;
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.client-list li + li { border-top: 1px solid var(--line); }
.client-list button {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.client-list button:hover { background: var(--page); }
.client-list button[aria-current="true"] { background: var(--uro-blue-dark); color: var(--on-blue); }
.client-list button[aria-current="true"] .client-sub { color: var(--on-blue); opacity: 0.85; }
.client-name { font-weight: 500; display: flex; align-items: center; gap: 7px; min-width: 0; }

/* Their triage marks: a red dot on the row that has gone wrong, amber on the one
   worth a look. A client the market left alone gets a hollow placeholder, so the
   names stay in one column. */
.status { width: 8px; height: 8px; border-radius: 50%; flex: none; background: transparent; }
.status.bad { background: var(--red); }
.status.warn { background: var(--amber); }
.status.ok { background: var(--green); }
.status.none { box-shadow: inset 0 0 0 1px var(--line); }

/* Their saved-filter tabs, shrunk to the three cuts we can actually make. */
.tabs { display: flex; gap: 4px; }
.tab {
  flex: 1;
  min-height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);
  color: var(--muted);
  font: inherit;
  font-size: var(--size-s);
  cursor: pointer;
  white-space: nowrap;
}
.tab[aria-pressed="true"] { background: var(--uro-blue-dark); border-color: var(--uro-blue-dark); color: var(--on-blue); }
.count { font-size: 11px; font-weight: 700; color: var(--muted); }
.tab .count { color: inherit; opacity: 0.85; }
.callfirst .eyebrow .count { color: var(--muted); }
.client-sub { font-size: var(--size-xs); color: var(--muted); }

.upload { display: flex; flex-direction: column; gap: 6px; }
.upload-status { font-size: var(--size-xs); color: var(--muted); }
.upload-status[data-state="error"] { color: var(--red); }
.upload-status[data-state="ok"] { color: var(--green); }

/* --- briefing card --- */

.briefing { min-width: 0; }
.empty h2 { margin: 0; font-size: var(--size-l); font-weight: 600; color: var(--muted); }
.empty {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 40px var(--gutter);
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
}

.slots { display: flex; flex-direction: column; gap: var(--gap); }

.btn {
  min-height: 40px;
  padding: 0 16px;
  border: 0;
  border-radius: var(--radius);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
  background: var(--uro-blue-dark);
  color: var(--on-blue);
}
.btn.secondary { background: var(--card); color: var(--navy); border: 1px solid #C3CFD9; }
.btn.wide { width: 100%; display: flex; justify-content: center; align-items: center; }

/* --- who to call first --- */

.callfirst {
  background: var(--card);
  border-radius: var(--radius);
  border: 1px solid var(--line);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.tag {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.tag.ext { background: var(--page); color: var(--muted); margin-left: 6px; }
.client-list button[aria-current="true"] .tag.ext { background: var(--navy); color: var(--on-blue); }

.caller-list { list-style: none; margin: 0; padding: 0; counter-reset: caller; }
.caller-list li + li { border-top: 1px solid var(--line); }
.caller-list button {
  width: 100%;
  text-align: left;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  font: inherit;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.caller-list button:hover { background: var(--page); }
.caller-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.caller-impact { font-size: var(--size-xs); font-weight: 600; white-space: nowrap; }
.caller-impact.loss { color: var(--red-ink); }
.caller-impact.gain { color: var(--green-ink); }

/* --- follow-up questions --- */

.ask-box { margin-top: 24px; border-top: 1px solid var(--line); padding-top: 16px; }
.ask { display: flex; flex-direction: column; gap: 6px; }
.ask-row { display: flex; gap: 8px; }
.ask input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font: inherit;
  background: var(--card);
  color: var(--ink);
}
.ask input:focus { outline: 2px solid var(--uro-blue); outline-offset: 1px; }
.answers { list-style: none; margin: 16px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.answer-card.pending { opacity: 0.6; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
