@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700;800;900&family=Roboto+Slab:wght@500;700&display=swap");

:root {
  color-scheme: light;
  --brand: #e1251b;
  --brand-dark: #a91d17;
  --ink: #202226;
  --muted: #60646b;
  --line: #dedede;
  --panel: #fff;
  --page: #f5f5f2;
  --steel: #4f5965;
  --good: #2f855a;
  --blue: #177ea8;
  --gold: #b7791f;
  --shadow: 0 18px 42px rgba(32, 34, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-width: 320px;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
  font-family: Roboto, Arial, sans-serif;
}

button,
input {
  font: inherit;
}

select {
  font: inherit;
}

.role-shell {
  min-height: 100vh;
}

.role-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 18px clamp(18px, 4vw, 44px);
  background: rgba(255, 255, 255, 0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-lockup img {
  width: 76px;
  height: auto;
  padding: 6px 8px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--brand);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1,
h2,
h3 {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  color: var(--steel);
  font-family: "Roboto Slab", Georgia, serif;
  font-size: clamp(1.15rem, 2vw, 1.65rem);
}

h2 {
  color: var(--brand);
  font-size: clamp(1.55rem, 3vw, 2.5rem);
  font-weight: 900;
}

h3 {
  color: var(--steel);
  font-size: 1.02rem;
  font-weight: 900;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.status-pill,
.domain-pill,
.resource-link {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 11px;
  color: var(--steel);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 800;
  white-space: nowrap;
}

.resource-link {
  color: var(--brand);
  text-decoration: none;
  background: #fff;
  border-color: rgba(225, 37, 27, 0.35);
}

.resource-link:hover,
.resource-link:focus-visible {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand-dark);
  outline: none;
}

.domain-pill {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand-dark);
}

.role-main {
  display: grid;
  gap: 22px;
  padding: 28px clamp(18px, 4vw, 44px) 44px;
}

.hero-band {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 24px;
  align-items: end;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.compact-hero {
  grid-template-columns: 1fr;
}

.hero-copy p:last-child {
  max-width: 780px;
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
}

.sync-panel {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: #f9faf9;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.sync-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 0.9rem;
}

.dashboard-refresh-button {
  min-height: 36px;
  padding: 8px 12px;
  color: #fff;
  font-weight: 900;
  border: 1px solid var(--brand-dark);
  border-radius: 8px;
  background: var(--brand);
  cursor: pointer;
}

.dashboard-refresh-button:disabled {
  cursor: wait;
  opacity: 0.7;
}

.dashboard-refresh-status {
  min-height: 16px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.sync-line strong {
  color: var(--ink);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(170px, 1fr));
  gap: 14px;
}

body[data-dashboard="office"] .metric-grid {
  grid-template-columns: repeat(3, minmax(210px, 1fr));
}

body[data-dashboard="ops"] .metric-grid {
  grid-template-columns: minmax(280px, 1fr);
}

body[data-dashboard="captkirk"] .metric-grid {
  grid-template-columns: repeat(5, minmax(160px, 1fr));
}

.metric-card,
.work-panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(32, 34, 38, 0.06);
}

.metric-card {
  min-height: 124px;
  padding: 18px;
}

.history-control-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(32, 34, 38, 0.05);
}

.history-selector {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: min(100%, 360px);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.history-selector select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-transform: none;
}

.history-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  text-align: right;
}

.metric-value {
  margin: 8px 0 4px;
  color: var(--ink);
  font-size: clamp(1.45rem, 2.7vw, 2.2rem);
  font-weight: 900;
}

.metric-list {
  display: grid;
  gap: 8px;
  margin-top: 12px;
}

.metric-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: baseline;
  padding-top: 8px;
  border-top: 1px solid #ececec;
}

.metric-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.metric-name {
  color: var(--steel);
  font-size: 0.9rem;
  font-weight: 800;
}

.metric-amount {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
  white-space: nowrap;
}

.metric-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.4;
}

.speed-to-lead-panel {
  padding: 18px;
}

.speed-table {
  display: grid;
  gap: 0;
  margin-top: 14px;
}

.speed-row {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(130px, 0.8fr) minmax(150px, 0.8fr) minmax(170px, 0.8fr);
  gap: 14px;
  align-items: center;
  padding: 10px 0;
  border-top: 1px solid #ececec;
}

.speed-header {
  padding-top: 0;
  color: var(--muted);
  border-top: 0;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.speed-row span:first-child {
  color: var(--steel);
  font-weight: 900;
}

.speed-row span:not(:first-child) {
  color: var(--ink);
  font-weight: 900;
  text-align: right;
}

.panel-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.single-panel-grid {
  grid-template-columns: minmax(0, 1fr);
}

.work-panel {
  min-width: 0;
  padding: 20px;
}

.section-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}

.count-badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  color: var(--brand-dark);
  background: #ffe6e5;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
  white-space: nowrap;
}

.table-wrap {
  overflow-x: auto;
}

.lead-disclosure-list {
  display: grid;
  gap: 12px;
  padding: 16px 20px 20px;
}

.lead-disclosure {
  border: 1px solid #e8e8e8;
  border-radius: 8px;
  background: #fafafa;
}

.lead-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.lead-disclosure summary::-webkit-details-marker {
  display: none;
}

.lead-disclosure summary strong {
  color: var(--ink);
  font-size: 1rem;
}

.lead-disclosure summary span {
  color: var(--brand-dark);
  font-size: 0.84rem;
  font-weight: 900;
  white-space: nowrap;
}

.lead-disclosure[open] summary {
  border-bottom: 1px solid #ececec;
}

.open-lead-list {
  display: grid;
  gap: 10px;
  padding: 12px 14px 14px;
}

.open-lead-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  padding-top: 10px;
  border-top: 1px solid #ececec;
}

.open-lead-card:first-child {
  padding-top: 0;
  border-top: 0;
}

.open-lead-card p,
.open-lead-card small {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.open-lead-card > p {
  grid-column: 1 / -1;
}

.open-lead-card .latest-lead-comment {
  color: var(--steel);
  display: -webkit-box;
  font-size: 0.82rem;
  line-height: 1.35;
  margin-top: 6px;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
}

.latest-lead-comment strong {
  color: var(--ink);
  font-weight: 900;
}

.customer-comment-form {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  margin-top: 4px;
}

.customer-comment-form label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.customer-comment-form textarea {
  width: 100%;
  min-height: 62px;
  padding: 9px 10px;
  color: var(--ink);
  font: inherit;
  font-size: 0.88rem;
  text-transform: none;
  resize: vertical;
  border: 1px solid #d8d8d8;
  border-radius: 8px;
  background: #fff;
}

.customer-comment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.customer-comment-actions button {
  min-height: 34px;
  padding: 7px 10px;
  color: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  border: 1px solid var(--brand);
  border-radius: 8px;
  background: var(--brand);
  cursor: pointer;
}

.customer-comment-actions button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.customer-comment-status {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.fieldpulse-link {
  color: var(--steel);
  font-weight: 900;
  text-decoration: none;
}

.fieldpulse-link:hover {
  color: var(--brand-dark);
  text-decoration: underline;
}

.opportunity-phone-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 6px;
}

.callrail-text-button {
  background: transparent;
  border: 0;
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.callrail-text-button:disabled {
  cursor: wait;
  opacity: 0.55;
}

.callrail-text-status {
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.25;
}

.liveswitch-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 8px;
}

.liveswitch-review-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 8px 12px;
  color: #fff;
  background: var(--steel);
  border: 1px solid #3d4650;
  border-radius: 8px;
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.liveswitch-review-link:hover {
  background: var(--brand-dark);
  border-color: var(--brand-dark);
}

table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

th,
td {
  padding: 13px 10px;
  text-align: left;
  border-bottom: 1px solid #ececec;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

td {
  color: var(--ink);
  font-size: 0.92rem;
}

.person-cell {
  font-weight: 900;
}

.board-filter {
  display: grid;
  gap: 6px;
  min-width: 150px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.board-filter select {
  min-height: 38px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-transform: none;
}

.subtle-line {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 9px;
  border: 1px solid #d9dde0;
  border-radius: 8px;
  color: var(--steel);
  background: #f7f8f8;
  font-size: 0.78rem;
  font-weight: 900;
  white-space: nowrap;
}

.status-good {
  color: #1f6b46;
  background: #e8f5ee;
  border-color: #bfe3cf;
}

.status-info {
  color: #12617f;
  background: #e7f5fa;
  border-color: #b9ddeb;
}

.status-warn {
  color: #7a4d08;
  background: #fff4dc;
  border-color: #efd6a7;
}

.status-bad {
  color: #8b1f1b;
  background: #fde9e7;
  border-color: #efc2be;
}

.money {
  color: var(--good);
  font-weight: 900;
}

.ops-production-table {
  display: none;
}

.bonus-review-section {
  display: grid;
  gap: 4px;
  margin-top: 24px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.review-leaderboard {
  display: grid;
  gap: 11px;
  margin-top: 12px;
}

.review-source-note {
  display: grid;
  gap: 3px;
  padding: 10px 12px;
  border: 1px solid #ececec;
  border-radius: 8px;
  background: #fff;
}

.review-source-note strong {
  color: var(--steel);
  font-size: 0.86rem;
  font-weight: 900;
}

.review-source-note span {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.review-source-note.trusted {
  border-color: #b9d8c4;
  background: #f5fbf7;
}

.review-source-note.needs-review {
  border-color: #efc2be;
  background: #fff7f6;
}

.review-credit-row {
  display: grid;
  align-items: center;
  padding: 12px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
}

.review-credit-main {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.review-credit-top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.review-credit-top strong {
  color: var(--steel);
  font-weight: 900;
}

.review-credit-top span {
  color: var(--ink);
  font-size: 0.9rem;
  font-weight: 900;
  white-space: nowrap;
}

.review-customers {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.35;
}

.office-sale-card {
  position: relative;
  min-height: 116px;
}

.office-sale-amount {
  margin-top: 10px;
  color: var(--good);
  font-size: 1.25rem;
  font-weight: 900;
}

.goal-sheet {
  margin-top: 18px;
}

.goal-chart {
  --goal-label-width: 182px;
  position: relative;
  display: grid;
  gap: 12px;
}

.goal-axis {
  position: relative;
  height: 34px;
  margin-left: var(--goal-label-width);
  border-bottom: 1px solid #ececec;
}

.goal-marker {
  position: absolute;
  top: 0;
  bottom: -1px;
  width: 4px;
  border-radius: 999px;
  background: #8fd19e;
  transform: translateX(-50%);
}

.goal-marker-2 {
  background: #2f855a;
}

.goal-marker span {
  position: absolute;
  top: 0;
  left: 8px;
  display: grid;
  gap: 1px;
  color: var(--steel);
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.goal-marker strong {
  color: var(--ink);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.goal-rows {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 11px;
}

.goal-line {
  position: absolute;
  top: 46px;
  bottom: 0;
  z-index: 2;
  width: 5px;
  border-radius: 999px;
  pointer-events: none;
  transform: translateX(-50%);
}

.goal-line-one {
  left: calc(var(--goal-label-width) + (100% - var(--goal-label-width)) * var(--goal-one));
  background: #8fd19e;
}

.goal-line-two {
  left: calc(var(--goal-label-width) + (100% - var(--goal-label-width)) * var(--goal-two));
  background: #2f855a;
}

.goal-row {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.goal-tech {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.goal-tech strong {
  color: var(--steel);
  font-size: 0.92rem;
  font-weight: 900;
}

.goal-tech span {
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.goal-track {
  position: relative;
  min-height: 34px;
  overflow: hidden;
  background: #f0f1ef;
  border: 1px solid #dedede;
  border-radius: 8px;
}

.goal-fill {
  position: absolute;
  inset: 0 auto 0 0;
  min-width: 8px;
  border-radius: 7px;
  transition: width 200ms ease, background 200ms ease;
}

.goal-fill-base {
  background: #8b99a8;
}

.goal-fill-close {
  background: #d2a84c;
}

.goal-fill-first {
  background: #8fd19e;
}

.goal-fill-second {
  background: #2f855a;
}

.goal-value {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 34px;
  padding: 0 10px;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 900;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.6);
  white-space: nowrap;
}

.attention-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.focus-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.focus-tab {
  min-height: 34px;
  padding: 7px 11px;
  color: var(--ink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 900;
  border: 1px solid #dedede;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.focus-tab:hover {
  border-color: var(--brand);
  color: var(--brand-dark);
}

.focus-tab.active {
  color: #fff;
  border-color: var(--brand);
  background: var(--brand);
}

.followup-owner-panel {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fff;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.followup-owner-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.followup-owner-heading strong {
  color: var(--ink);
  font-size: 0.94rem;
}

.followup-owner-heading span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: right;
}

.followup-owner-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px;
}

.followup-owner-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 58px;
  padding: 9px 10px;
  color: var(--ink);
  background: #fafafa;
  border: 1px solid #e1e1e1;
  border-radius: 8px;
  cursor: pointer;
  text-align: left;
}

.followup-owner-button:hover {
  border-color: var(--brand);
}

.followup-owner-button.active {
  background: #fff5f4;
  border-color: var(--brand);
  box-shadow: inset 3px 0 0 var(--brand);
}

.followup-owner-button span {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.followup-owner-button strong {
  overflow: hidden;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.15;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.followup-owner-button small {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.2;
}

.followup-owner-button b {
  flex: 0 0 auto;
  color: var(--brand-dark);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.attention-item {
  padding: 14px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.attention-item strong {
  display: block;
  margin-bottom: 5px;
  color: var(--ink);
}

.attention-item span {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.attention-disclosure {
  padding: 0;
}

.attention-disclosure summary {
  display: grid;
  gap: 5px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.attention-disclosure summary::-webkit-details-marker {
  display: none;
}

.attention-disclosure summary::after {
  content: "View";
  justify-self: start;
  margin-top: 4px;
  color: var(--brand-dark);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.attention-disclosure[open] summary {
  border-bottom: 1px solid #ececec;
}

.attention-disclosure[open] summary::after {
  content: "Hide";
}

.attention-lead-list {
  display: grid;
  gap: 9px;
  padding: 12px 14px 14px;
}

.attention-lead {
  display: grid;
  gap: 3px;
  padding-top: 9px;
  border-top: 1px solid #ececec;
}

.attention-lead:first-child {
  padding-top: 0;
  border-top: 0;
}

.attention-lead b {
  color: var(--ink);
  font-size: 0.9rem;
}

.attention-lead small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.office-opportunity-list {
  padding: 0;
}

.office-opportunity {
  padding: 11px 14px;
  background: #fff;
  border: 1px solid #ececec;
  border-radius: 8px;
}

.office-opportunity:first-child {
  padding-top: 11px;
  border-top: 1px solid #ececec;
}

.attention-empty {
  padding: 12px 14px 14px;
  color: var(--muted);
  font-size: 0.9rem;
}

.split-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.sales-lists-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}

.estimator-list-panel {
  align-self: start;
}

.estimator-site-visits-panel {
  margin-bottom: 18px;
}

.site-visit-groups {
  display: grid;
  gap: 14px;
}

.site-visit-group {
  display: grid;
  gap: 10px;
}

.site-visit-group-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.site-visit-group-heading h4 {
  margin: 0;
  color: var(--ink);
  font-size: 0.98rem;
}

.site-visit-list {
  display: grid;
  gap: 10px;
}

.site-visit-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(145px, auto);
  gap: 14px;
  align-items: start;
  padding: 13px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.site-visit-complete {
  opacity: 0.72;
}

.site-visit-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.site-visit-time {
  color: var(--ink);
  font-weight: 900;
  white-space: nowrap;
}

.estimator-select {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 900;
  text-transform: uppercase;
}

.estimator-select select {
  width: 100%;
  min-height: 42px;
  padding: 9px 11px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
  text-transform: none;
}

.estimate-list {
  display: grid;
  gap: 10px;
  max-height: 540px;
  overflow: auto;
  padding-right: 4px;
}

.estimate-list-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
  padding: 13px;
  background: #fafafa;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.estimate-list-side {
  display: grid;
  gap: 8px;
  justify-items: end;
  text-align: right;
}

.estimate-list-side strong {
  color: var(--good);
  white-space: nowrap;
}

.item-title,
.item-reference,
.item-meta,
.item-notes {
  margin: 0;
}

.item-title {
  color: var(--ink);
  font-weight: 900;
}

.item-meta,
.item-reference,
.item-notes,
.muted-text {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.item-reference {
  margin-top: 3px;
  color: var(--steel);
  font-weight: 800;
}

.estimate-status-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-top: 7px;
}

.estimate-status-chip {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid #d8dee8;
  border-radius: 999px;
  background: #eef4fb;
  color: #244366;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.estimate-status-action {
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid var(--blue);
  border-radius: 7px;
  background: #ffffff;
  color: var(--blue);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1;
}

.estimate-status-action:hover:not(:disabled) {
  background: #eef6ff;
}

.estimate-status-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.item-notes {
  margin-top: 5px;
}

.phone-link {
  color: var(--blue);
  font-size: 0.9rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.phone-link:hover {
  text-decoration: underline;
}

.contact-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  justify-content: flex-end;
}

.text-link {
  color: var(--good);
}

.empty-state {
  padding: 16px;
  color: var(--muted);
  background: #fafafa;
  border: 1px dashed #d8d8d8;
  border-radius: 8px;
  font-size: 0.92rem;
  line-height: 1.45;
}

.mini-card {
  min-height: 96px;
  padding: 14px;
  background: #f9faf9;
  border: 1px solid #e8e8e8;
  border-radius: 8px;
}

.mini-card strong {
  display: block;
  margin-bottom: 8px;
  color: var(--steel);
}

.mini-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.captkirk-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.9fr) minmax(320px, 1.2fr) minmax(260px, 0.9fr);
  gap: 16px;
  align-items: start;
}

.captkirk-status-list {
  display: grid;
  gap: 10px;
}

.dashboard-health-banner {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid rgba(105, 233, 255, 0.2);
  border-radius: 8px;
  background: rgba(105, 233, 255, 0.08);
}

.dashboard-health-banner strong {
  color: var(--ink);
  font-size: 0.94rem;
  font-weight: 900;
}

.dashboard-health-banner span {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.35;
}

.dashboard-health-banner.trusted {
  border-color: rgba(77, 255, 155, 0.28);
  background: rgba(77, 255, 155, 0.08);
}

.dashboard-health-banner.needs-review {
  border-color: rgba(255, 189, 89, 0.34);
  background: rgba(255, 189, 89, 0.1);
}

.captkirk-status-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.9fr) minmax(140px, 1.1fr);
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid #ececec;
}

.captkirk-status-row:last-child {
  border-bottom: 0;
}

.captkirk-status-row span {
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
}

.captkirk-status-row strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.35;
}

body[data-dashboard="captkirk"] {
  color: #dffcff;
  background:
    linear-gradient(rgba(83, 224, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(83, 224, 255, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 18% 0%, rgba(50, 214, 255, 0.2), transparent 28%),
    radial-gradient(circle at 82% 12%, rgba(255, 184, 64, 0.12), transparent 24%),
    #071017;
  background-size: 34px 34px, 34px 34px, auto, auto, auto;
  --brand: #69e9ff;
  --brand-dark: #0a8ca6;
  --ink: #e7fbff;
  --muted: #90b8c4;
  --line: rgba(105, 233, 255, 0.24);
  --panel: rgba(8, 22, 31, 0.9);
  --page: #071017;
  --steel: #dffcff;
  --good: #4dff9b;
  --blue: #69e9ff;
  --gold: #ffbd59;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.34);
}

body[data-dashboard="captkirk"] .role-topbar {
  background: rgba(4, 13, 20, 0.9);
  border-bottom-color: rgba(105, 233, 255, 0.28);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.28);
}

body[data-dashboard="captkirk"] .brand-lockup img {
  width: 64px;
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(105, 233, 255, 0.32);
  filter: saturate(0.65) hue-rotate(145deg) brightness(1.22);
}

body[data-dashboard="captkirk"] h1,
body[data-dashboard="captkirk"] h2,
body[data-dashboard="captkirk"] h3 {
  color: #e7fbff;
  font-family: Roboto, Arial, sans-serif;
  text-transform: uppercase;
}

body[data-dashboard="captkirk"] .eyebrow {
  color: #ffbd59;
}

body[data-dashboard="captkirk"] .status-pill,
body[data-dashboard="captkirk"] .domain-pill {
  color: #dffcff;
  background: rgba(9, 27, 39, 0.92);
  border-color: rgba(105, 233, 255, 0.28);
  box-shadow: inset 0 0 18px rgba(105, 233, 255, 0.08);
}

body[data-dashboard="captkirk"] .domain-pill {
  color: #08161f;
  background: #69e9ff;
}

body[data-dashboard="captkirk"] .hero-band {
  position: relative;
  overflow: hidden;
  min-height: 190px;
  background:
    linear-gradient(135deg, rgba(105, 233, 255, 0.16), transparent 36%),
    linear-gradient(90deg, rgba(255, 189, 89, 0.12), transparent 72%),
    rgba(8, 22, 31, 0.86);
  border-color: rgba(105, 233, 255, 0.28);
  box-shadow: 0 20px 70px rgba(0, 0, 0, 0.34), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

body[data-dashboard="captkirk"] .captkirk-hero {
  min-height: 118px;
}

body[data-dashboard="captkirk"] .hero-band::after {
  content: "";
  position: absolute;
  inset: auto 28px 22px 28px;
  height: 3px;
  background: linear-gradient(90deg, #69e9ff, #ffbd59, #ff5c7a, transparent);
  opacity: 0.88;
}

body[data-dashboard="captkirk"] .hero-copy p:last-child {
  color: #b8dbe4;
}

body[data-dashboard="captkirk"] .metric-card,
body[data-dashboard="captkirk"] .work-panel,
.spock-mission-control,
.captkirk-crew-status {
  background:
    linear-gradient(rgba(105, 233, 255, 0.04) 1px, transparent 1px),
    rgba(8, 22, 31, 0.9);
  background-size: 100% 22px, auto;
  border-color: rgba(105, 233, 255, 0.24);
  box-shadow: 0 16px 46px rgba(0, 0, 0, 0.28), inset 0 0 22px rgba(105, 233, 255, 0.04);
}

.screen-reader-summary {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

body[data-dashboard="captkirk"] .metric-value {
  color: #69e9ff;
}

body[data-dashboard="captkirk"] .metric-note,
body[data-dashboard="captkirk"] .metric-name,
body[data-dashboard="captkirk"] .captkirk-status-row span,
body[data-dashboard="captkirk"] .attention-item span {
  color: #9fc6d0;
}

body[data-dashboard="captkirk"] .metric-amount,
body[data-dashboard="captkirk"] .captkirk-status-row strong,
body[data-dashboard="captkirk"] .attention-item strong {
  color: #e7fbff;
}

body[data-dashboard="captkirk"] .captkirk-status-row,
body[data-dashboard="captkirk"] .attention-item {
  border-color: rgba(105, 233, 255, 0.16);
}

.spock-mission-control {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(105, 233, 255, 0.28);
  border-radius: 8px;
}

.captkirk-cockpit {
  display: grid;
  gap: 16px;
}

.cockpit-status-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.42fr);
  gap: 18px;
  align-items: stretch;
  padding: 18px;
  background: rgba(5, 17, 26, 0.84);
  border: 1px solid rgba(105, 233, 255, 0.2);
  border-radius: 8px;
}

.cockpit-status-panel.green {
  border-color: rgba(77, 255, 155, 0.34);
}

.cockpit-status-panel.amber {
  border-color: rgba(255, 189, 89, 0.38);
}

.cockpit-status-panel.red {
  border-color: rgba(255, 92, 122, 0.44);
}

.cockpit-status-panel h3 {
  margin: 0;
  font-size: clamp(1.7rem, 4vw, 3rem);
}

.cockpit-status-panel p {
  max-width: 780px;
  margin: 8px 0 0;
  color: #b8dbe4;
  line-height: 1.45;
}

.cockpit-next-action {
  display: grid;
  align-content: center;
  gap: 8px;
  min-height: 120px;
  padding: 16px;
  color: #08161f;
  background: linear-gradient(135deg, #69e9ff, #92ffc6);
  border-radius: 8px;
}

.cockpit-next-action span {
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cockpit-next-action strong {
  font-size: 1.02rem;
  line-height: 1.3;
}

.cockpit-lanes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.cockpit-lane,
.cockpit-issue,
.captkirk-disclosure {
  background: rgba(5, 17, 26, 0.84);
  border: 1px solid rgba(105, 233, 255, 0.18);
  border-radius: 8px;
}

.cockpit-lane.green,
.cockpit-issue.green {
  border-color: rgba(77, 255, 155, 0.3);
}

.cockpit-lane.amber,
.cockpit-issue.amber {
  border-color: rgba(255, 189, 89, 0.36);
}

.cockpit-lane.red,
.cockpit-issue.red {
  border-color: rgba(255, 92, 122, 0.42);
}

.cockpit-lane summary,
.cockpit-issue summary,
.captkirk-disclosure summary {
  display: grid;
  grid-template-columns: 16px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 64px;
  padding: 14px;
  cursor: pointer;
  list-style: none;
}

.captkirk-disclosure summary {
  grid-template-columns: minmax(100px, 0.24fr) minmax(0, 1fr);
}

.cockpit-lane summary::-webkit-details-marker,
.cockpit-issue summary::-webkit-details-marker,
.captkirk-disclosure summary::-webkit-details-marker {
  display: none;
}

.cockpit-lane summary::after,
.cockpit-issue summary::after,
.captkirk-disclosure summary::after {
  content: "+";
  color: #69e9ff;
  font-size: 1.2rem;
  font-weight: 900;
}

.cockpit-lane[open] summary::after,
.cockpit-issue[open] summary::after,
.captkirk-disclosure[open] summary::after {
  content: "-";
}

.lane-name,
.captkirk-disclosure summary span {
  color: #ffbd59;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cockpit-lane summary strong,
.cockpit-issue summary strong,
.captkirk-disclosure summary strong {
  color: #e7fbff;
  font-size: 1rem;
  text-transform: uppercase;
}

.cockpit-lane summary small {
  grid-column: 2 / -1;
  color: #9fc6d0;
  font-size: 0.86rem;
  line-height: 1.3;
}

.cockpit-detail-list,
.cockpit-attention-grid {
  display: grid;
  gap: 10px;
  padding: 0 14px 14px;
}

.cockpit-detail-list div {
  display: grid;
  gap: 4px;
  padding: 10px;
  background: rgba(105, 233, 255, 0.055);
  border: 1px solid rgba(105, 233, 255, 0.12);
  border-radius: 8px;
}

.cockpit-detail-list span {
  color: #ffbd59;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.cockpit-detail-list strong {
  color: #e7fbff;
  font-size: 0.9rem;
  line-height: 1.3;
}

.cockpit-link {
  display: inline-flex;
  justify-content: center;
  min-height: 38px;
  padding: 10px 12px;
  color: #08161f;
  background: #69e9ff;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

.cockpit-attention {
  display: grid;
  gap: 10px;
}

.compact-heading {
  margin-top: 2px;
}

.cockpit-issue p,
.cockpit-issue small {
  display: block;
  margin: 0;
  padding: 0 14px 10px 40px;
  color: #b8dbe4;
  line-height: 1.4;
}

.cockpit-issue small {
  padding-bottom: 14px;
  color: #ffbd59;
  font-weight: 900;
}

.crew-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
  padding: 0 14px 14px;
}

.crew-strip-card {
  display: grid;
  gap: 5px;
  min-height: 112px;
  padding: 12px;
  background: rgba(105, 233, 255, 0.055);
  border: 1px solid rgba(105, 233, 255, 0.12);
  border-radius: 8px;
}

.crew-strip-card span {
  color: #ffbd59;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crew-strip-card strong {
  color: #e7fbff;
  font-size: 1rem;
}

.crew-strip-card p {
  margin: 0;
  color: #9fc6d0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.captkirk-crew-status {
  display: grid;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(105, 233, 255, 0.28);
  border-radius: 8px;
}

.crew-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.crew-tab {
  min-height: 38px;
  padding: 8px 12px;
  color: #dffcff;
  background: rgba(105, 233, 255, 0.08);
  border: 1px solid rgba(105, 233, 255, 0.22);
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crew-tab.active {
  color: #08161f;
  background: #69e9ff;
}

.crew-command-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.38fr);
  gap: 16px;
  align-items: stretch;
}

.crew-command-panel p {
  max-width: 840px;
  margin: 10px 0 0;
  color: #b8dbe4;
  line-height: 1.5;
}

.crew-job-card {
  display: grid;
  align-content: center;
  gap: 6px;
  min-height: 128px;
  padding: 14px;
  color: #08161f;
  background: linear-gradient(135deg, #69e9ff, #92ffc6);
  border-radius: 8px;
}

.crew-job-card span,
.crew-job-card small {
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crew-job-card strong {
  font-size: 1.05rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.crew-job-card p {
  margin: 0;
  color: rgba(8, 22, 31, 0.78);
  font-size: 0.86rem;
  font-weight: 900;
}

.crew-org-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(240px, 1fr));
  gap: 12px;
}

.crew-card,
.crew-model-card {
  min-height: 250px;
  padding: 14px;
  background: rgba(5, 17, 26, 0.84);
  border: 1px solid rgba(105, 233, 255, 0.18);
  border-radius: 8px;
}

.crew-card.gold {
  border-color: rgba(255, 189, 89, 0.38);
}

.crew-card.green {
  border-color: rgba(77, 255, 155, 0.34);
}

.crew-card.amber {
  border-color: rgba(255, 189, 89, 0.34);
}

.crew-card.red {
  border-color: rgba(255, 92, 122, 0.42);
}

.crew-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: #ffbd59;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crew-card-heading strong {
  color: #e7fbff;
  text-align: right;
}

.crew-post {
  margin: 8px 0 12px;
  color: #69e9ff;
  font-size: 0.92rem;
  font-weight: 900;
}

.crew-card-body {
  display: grid;
  gap: 8px;
}

.crew-card-body div,
.crew-recommendation-list div {
  display: grid;
  gap: 4px;
  padding: 9px;
  background: rgba(105, 233, 255, 0.055);
  border: 1px solid rgba(105, 233, 255, 0.12);
  border-radius: 8px;
}

.crew-card-body span,
.crew-recommendation-list span {
  color: #ffbd59;
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.crew-card-body strong,
.crew-recommendation-list strong {
  color: #e7fbff;
  font-size: 0.84rem;
  line-height: 1.35;
}

.crew-command-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.crew-command-list code {
  max-width: 100%;
  padding: 5px 7px;
  color: #92ffc6;
  background: rgba(0, 0, 0, 0.24);
  border: 1px solid rgba(146, 255, 198, 0.18);
  border-radius: 6px;
  font-size: 0.75rem;
  overflow-wrap: anywhere;
}

.crew-model-grid {
  display: grid;
  grid-template-columns: minmax(260px, 0.8fr) minmax(320px, 1.2fr);
  gap: 12px;
}

.crew-recommendation-list {
  display: grid;
  gap: 8px;
}

.mission-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(190px, 0.28fr);
  gap: 18px;
  align-items: stretch;
}

.mission-hero h3 {
  font-size: clamp(1.2rem, 2.2vw, 1.85rem);
}

.mission-hero p {
  max-width: 880px;
  margin: 10px 0 0;
  color: #b8dbe4;
  line-height: 1.5;
}

.mission-readout {
  display: grid;
  align-content: center;
  gap: 5px;
  min-height: 122px;
  padding: 16px;
  color: #08161f;
  background: linear-gradient(135deg, #69e9ff, #92ffc6);
  border-radius: 8px;
  box-shadow: 0 0 34px rgba(105, 233, 255, 0.24);
}

.mission-readout strong {
  font-size: clamp(1.45rem, 3vw, 2.2rem);
  font-weight: 900;
  text-transform: uppercase;
}

.mission-readout span {
  font-size: 0.8rem;
  font-weight: 900;
}

.mission-label {
  color: rgba(8, 22, 31, 0.72);
}

.mission-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.4fr) repeat(2, minmax(220px, 0.8fr));
  gap: 14px;
}

.mission-panel {
  min-height: 220px;
  padding: 14px;
  background: rgba(5, 17, 26, 0.84);
  border: 1px solid rgba(105, 233, 255, 0.2);
  border-radius: 8px;
}

.mission-panel-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  color: #ffbd59;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mission-panel-title strong {
  color: #dffcff;
}

.mission-system-list,
.mission-directives,
.mission-scan-grid {
  display: grid;
  gap: 10px;
}

.mission-system-row {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-height: 58px;
  padding: 10px;
  background: rgba(105, 233, 255, 0.055);
  border: 1px solid rgba(105, 233, 255, 0.12);
  border-radius: 8px;
}

.mission-system-row strong,
.mission-directives strong,
.mission-scan-grid strong {
  color: #e7fbff;
  font-size: 0.9rem;
}

.mission-system-row p {
  margin: 3px 0 0;
  color: #9fc6d0;
  font-size: 0.82rem;
  line-height: 1.35;
}

.mission-system-row > span:last-child {
  color: #ffbd59;
  font-size: 0.8rem;
  font-weight: 900;
  text-align: right;
  text-transform: uppercase;
}

.mission-light {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  box-shadow: 0 0 14px currentColor;
}

.mission-light.green {
  color: #4dff9b;
  background: #4dff9b;
}

.mission-light.amber {
  color: #ffbd59;
  background: #ffbd59;
}

.mission-light.red {
  color: #ff5c7a;
  background: #ff5c7a;
}

.mission-directives div,
.mission-scan-grid div {
  display: grid;
  gap: 5px;
  padding: 10px;
  background: rgba(105, 233, 255, 0.055);
  border: 1px solid rgba(105, 233, 255, 0.12);
  border-radius: 8px;
}

.mission-directives span,
.mission-scan-grid span {
  color: #ffbd59;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

body[data-dashboard="captkirk"] {
  color: #202226;
  background: #f5f5f2;
  --brand: #e1251b;
  --brand-dark: #a91d17;
  --ink: #202226;
  --muted: #60646b;
  --line: #dedede;
  --panel: #fff;
  --page: #f5f5f2;
  --steel: #4f5965;
  --good: #2f855a;
  --blue: #177ea8;
  --gold: #b7791f;
  --shadow: 0 18px 42px rgba(32, 34, 38, 0.08);
}

body[data-dashboard="captkirk"] .role-topbar {
  background: rgba(255, 255, 255, 0.94);
  border-bottom-color: var(--line);
  box-shadow: none;
}

body[data-dashboard="captkirk"] .brand-lockup img {
  width: 76px;
  background: #fff;
  border-color: #e8e8e8;
  filter: none;
}

body[data-dashboard="captkirk"] h1,
body[data-dashboard="captkirk"] h2,
body[data-dashboard="captkirk"] h3 {
  color: var(--steel);
  font-family: "Roboto Slab", Georgia, serif;
  text-transform: none;
}

body[data-dashboard="captkirk"] .eyebrow {
  color: var(--brand);
}

body[data-dashboard="captkirk"] .status-pill {
  color: var(--steel);
  background: #fff;
  border-color: var(--line);
  box-shadow: none;
}

body[data-dashboard="captkirk"] .domain-pill {
  color: #fff;
  background: var(--brand);
  border-color: var(--brand-dark);
  box-shadow: none;
}

body[data-dashboard="captkirk"] .hero-band {
  min-height: 138px;
  background:
    linear-gradient(90deg, rgba(225, 37, 27, 0.08), transparent 54%),
    #fff;
  border-color: var(--line);
  box-shadow: var(--shadow);
}

body[data-dashboard="captkirk"] .hero-band::after {
  background: linear-gradient(90deg, var(--brand), var(--blue), var(--good), var(--gold));
  opacity: 1;
}

body[data-dashboard="captkirk"] .hero-copy p:last-child {
  color: var(--muted);
}

body[data-dashboard="captkirk"] .metric-card,
body[data-dashboard="captkirk"] .work-panel,
body[data-dashboard="captkirk"] .executive-section,
body[data-dashboard="captkirk"] .executive-history-panel {
  background: #fff;
  background-size: auto;
  border-color: var(--line);
  box-shadow: 0 12px 30px rgba(32, 34, 38, 0.06);
}

body[data-dashboard="captkirk"] .metric-value {
  color: var(--ink);
}

body[data-dashboard="captkirk"] .metric-note,
body[data-dashboard="captkirk"] .metric-name {
  color: var(--muted);
}

body[data-dashboard="captkirk"] .metric-amount {
  color: var(--ink);
}

.executive-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
}

.executive-tab {
  display: grid;
  gap: 4px;
  min-height: 66px;
  padding: 12px 14px;
  text-align: left;
  color: var(--steel);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(32, 34, 38, 0.05);
  cursor: pointer;
}

.executive-tab:hover {
  border-color: rgba(225, 37, 27, 0.36);
}

.executive-tab.active {
  color: #fff;
  background: var(--steel);
  border-color: var(--steel);
}

.executive-tab span {
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.executive-tab strong {
  font-size: 0.96rem;
  line-height: 1.2;
}

.executive-summary-grid {
  position: static;
  width: auto;
  height: auto;
  margin: 0;
  padding: 0;
  overflow: visible;
  clip: auto;
  white-space: normal;
  border: 0;
}

.executive-page-nav {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.executive-page-link {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  padding: 7px 11px;
  color: var(--steel);
  border-radius: 6px;
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
  white-space: nowrap;
}

.executive-page-link.active {
  color: #fff;
  background: var(--steel);
}

.executive-history-control[hidden] {
  display: none;
}

.executive-section-grid {
  display: grid;
  gap: 18px;
}

.executive-ytd-trends[hidden] {
  display: none;
}

.executive-ytd-trends {
  display: grid;
  gap: 16px;
  margin: 2px 0 4px;
}

.executive-trend-heading {
  align-items: center;
  padding: 2px 0;
}

.executive-trend-heading p:not(.eyebrow) {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.executive-trend-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.executive-trend-panel {
  position: relative;
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.executive-trend-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: var(--brand);
}

.executive-trend-panel.blue::before {
  background: var(--blue);
}

.executive-trend-panel.green::before {
  background: var(--good);
}

.executive-trend-panel.gold::before {
  background: var(--gold);
}

.executive-trend-panel.steel::before {
  background: var(--steel);
}

.executive-trend-panel-header,
.executive-mini-chart-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.executive-trend-panel-header h4 {
  margin: 2px 0 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 900;
}

.executive-mini-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}

.executive-mini-chart {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding-top: 10px;
  border-top: 1px solid #ececec;
}

.executive-mini-chart-header span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.executive-mini-chart-header strong {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 900;
  text-align: right;
}

.executive-week-bars {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(6px, 1fr);
  align-items: stretch;
  gap: 3px;
  height: 170px;
  padding: 8px 0 0;
}

.executive-week-bar {
  position: relative;
  display: grid;
  grid-template-rows: minmax(0, 1fr) 14px;
  gap: 3px;
  min-width: 0;
  height: 100%;
}

.executive-week-bar-fill {
  display: flex;
  align-items: end;
  min-width: 0;
  border-bottom: 1px solid #dedede;
}

.executive-week-bar i {
  display: block;
  width: 100%;
  min-height: 2px;
  background: var(--steel);
  border-radius: 3px 3px 0 0;
}

.executive-call-week-bar-fill {
  position: relative;
  display: block;
  align-self: end;
  width: 100%;
  min-width: 0;
  border-bottom: 1px solid #dedede;
}

.executive-call-week-bar-fill i {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  min-height: 0;
  border-radius: 2px 2px 0 0;
}

.executive-call-week-bar-fill .call-total {
  height: 100%;
  background: var(--blue);
  opacity: 0.72;
  z-index: 1;
}

.executive-call-week-bar-fill .call-answered {
  background: var(--good);
  z-index: 2;
}

.executive-call-week-bar-fill .call-missed {
  background: #d94b4b;
  z-index: 3;
}

.executive-call-week-bar-fill .call-off-hours {
  background: #7c3aed;
  border: 1px solid rgba(255, 255, 255, 0.75);
  z-index: 4;
}

.executive-call-week-bar-fill i:hover::after,
.executive-call-week-bar-fill i:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 8;
  width: max-content;
  max-width: 190px;
  padding: 5px 7px;
  color: #fff;
  background: rgba(28, 34, 42, 0.94);
  border-radius: 5px;
  box-shadow: 0 6px 16px rgba(20, 24, 30, 0.18);
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%);
  white-space: normal;
}

.executive-week-bar.tooltip-left .executive-call-week-bar-fill i:hover::after,
.executive-week-bar.tooltip-left .executive-call-week-bar-fill i:focus-visible::after {
  right: 0;
  left: auto;
  transform: none;
}

.executive-week-bar.tooltip-right .executive-call-week-bar-fill i:hover::after,
.executive-week-bar.tooltip-right .executive-call-week-bar-fill i:focus-visible::after {
  right: auto;
  left: 0;
  transform: none;
}

.executive-call-week-bar:hover::after,
.executive-call-week-bar:focus-visible::after {
  display: none;
}

.executive-week-bar b {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 0.54rem;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-overflow: clip;
}

.executive-week-bar:hover::after,
.executive-week-bar:focus-visible::after {
  content: attr(data-tooltip);
  position: absolute;
  left: 50%;
  bottom: calc(100% + 8px);
  z-index: 3;
  width: max-content;
  max-width: 170px;
  padding: 5px 7px;
  color: #fff;
  background: rgba(28, 34, 42, 0.94);
  border-radius: 5px;
  box-shadow: 0 6px 16px rgba(20, 24, 30, 0.18);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.2;
  pointer-events: none;
  text-align: center;
  transform: translateX(-50%);
  white-space: normal;
}

.executive-week-bar.tooltip-left:hover::after,
.executive-week-bar.tooltip-left:focus-visible::after {
  right: 0;
  left: auto;
  transform: none;
}

.executive-week-bar.tooltip-right:hover::after,
.executive-week-bar.tooltip-right:focus-visible::after {
  right: auto;
  left: 0;
  transform: none;
}

.executive-trend-panel.blue .executive-week-bar i {
  background: var(--blue);
}

.executive-trend-panel.green .executive-week-bar i {
  background: var(--good);
}

.executive-trend-panel.gold .executive-week-bar i {
  background: var(--gold);
}

.executive-trend-panel.blue .executive-week-bar.executive-call-week-bar .executive-call-week-bar-fill .call-total {
  background: var(--blue);
  opacity: 0.72;
  z-index: 1;
}

.executive-trend-panel.blue .executive-week-bar.executive-call-week-bar .executive-call-week-bar-fill .call-answered {
  background: var(--good);
  z-index: 2;
}

.executive-trend-panel.blue .executive-week-bar.executive-call-week-bar .executive-call-week-bar-fill .call-missed {
  background: #d94b4b;
  z-index: 3;
}

.executive-trend-panel.blue .executive-week-bar.executive-call-week-bar .executive-call-week-bar-fill .call-off-hours {
  background: #7c3aed;
  border: 1px solid rgba(255, 255, 255, 0.75);
  z-index: 4;
}

.executive-mini-chart p,
.executive-chart-empty {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.executive-chart-empty {
  display: grid;
  place-items: center;
  min-height: 130px;
  padding: 10px;
  background: #f9faf9;
  border: 1px dashed #d8d8d8;
  border-radius: 8px;
  text-align: center;
}

.executive-chart-detail-block {
  display: grid;
  gap: 12px;
  padding-top: 14px;
  border-top: 1px solid #ececec;
}

.executive-section {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.executive-section::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  border-radius: 8px 0 0 8px;
  background: var(--brand);
}

.executive-section.blue::before {
  background: var(--blue);
}

.executive-section.green::before {
  background: var(--good);
}

.executive-section.gold::before {
  background: var(--gold);
}

.executive-section.steel::before {
  background: var(--steel);
}

.executive-section-heading {
  align-items: center;
  padding-left: 8px;
}

.executive-section-heading p:not(.eyebrow) {
  max-width: 740px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.executive-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(130px, 1fr));
  gap: 12px;
}

.executive-kpi-grid.metric-count-2 {
  grid-template-columns: repeat(2, minmax(180px, 1fr));
}

.executive-kpi-grid.metric-count-4 {
  grid-template-columns: repeat(4, minmax(140px, 1fr));
}

.executive-kpi {
  min-height: 116px;
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 14px;
  background: #f9faf9;
  border: 1px solid #ececec;
  border-radius: 8px;
}

.executive-kpi span {
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.executive-kpi strong {
  color: var(--ink);
  font-size: clamp(1.45rem, 2vw, 2rem);
  font-weight: 900;
}

.executive-kpi small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
}

.executive-detail {
  background: transparent;
}

.executive-detail summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 52px;
  padding: 12px 14px;
  color: var(--steel);
  cursor: pointer;
  list-style: none;
}

.executive-detail summary::-webkit-details-marker {
  display: none;
}

.executive-detail summary span {
  font-weight: 900;
}

.executive-detail summary strong {
  color: var(--brand-dark);
  font-size: 0.82rem;
  text-transform: uppercase;
}

.executive-detail[open] summary {
  margin-bottom: 12px;
}

.executive-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  align-items: start;
  padding: 0;
}

.executive-detail-grid.detail-count-5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.executive-detail-card {
  display: grid;
  gap: 10px;
  align-content: start;
  align-self: start;
  padding: 10px;
  background: #f9faf9;
  border: 1px solid #ececec;
  border-radius: 8px;
}

.executive-detail-card-header,
.executive-detail-list p {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 0;
}

.executive-detail-card-header span,
.executive-detail-list span {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
}

.executive-detail-card-header strong,
.executive-detail-list strong {
  color: var(--ink);
  text-align: right;
}

.executive-detail-list {
  display: grid;
  gap: 7px;
  padding-top: 8px;
  border-top: 1px solid #ececec;
}

.executive-detail-list span,
.executive-detail-list strong {
  font-size: 0.8rem;
}

@media (max-width: 980px) {
  .hero-band,
  .panel-grid {
    grid-template-columns: 1fr;
  }

  .sales-lists-grid {
    grid-template-columns: 1fr;
  }

  .captkirk-grid {
    grid-template-columns: 1fr;
  }

  .crew-command-panel,
  .crew-org-grid,
  .crew-model-grid {
    grid-template-columns: 1fr;
  }

  .mission-hero,
  .mission-grid {
    grid-template-columns: 1fr;
  }

  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .executive-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .executive-kpi-grid,
  .executive-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 680px) {
  .role-topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar-actions {
    justify-content: flex-start;
  }

  .hero-band,
  .work-panel,
  .history-control-panel {
    padding: 18px;
  }

  .history-control-panel,
  .history-selector {
    align-items: stretch;
    flex-direction: column;
  }

  .history-note {
    text-align: left;
  }

  .metric-grid,
  .split-list {
    grid-template-columns: 1fr;
  }

  .executive-tabs {
    grid-template-columns: 1fr;
  }

  .executive-kpi-grid {
    grid-template-columns: 1fr;
  }

  .executive-kpi-grid.metric-count-2,
  .executive-kpi-grid.metric-count-4 {
    grid-template-columns: 1fr;
  }

  .executive-detail-grid,
  .executive-detail-grid.detail-count-5 {
    grid-template-columns: 1fr;
  }

  .executive-trend-grid {
    grid-template-columns: 1fr;
  }

  .executive-mini-chart-grid {
    grid-template-columns: 1fr;
  }

  .executive-tab,
  .executive-section {
    min-width: 0;
  }

  .estimate-list-item {
    grid-template-columns: 1fr;
  }

  .site-visit-item {
    grid-template-columns: 1fr;
  }

  .site-visit-side {
    justify-items: start;
    text-align: left;
  }

  .speed-row {
    grid-template-columns: minmax(78px, 0.85fr) repeat(3, minmax(78px, 1fr));
    gap: 8px;
  }

  .estimate-list-side {
    justify-items: start;
    text-align: left;
  }

  .contact-actions {
    justify-content: flex-start;
  }

  .goal-axis {
    margin-left: 0;
  }

  .goal-chart {
    --goal-label-width: 0px;
  }

  .goal-row {
    grid-template-columns: 1fr;
    gap: 7px;
  }

  .goal-tech {
    display: flex;
    justify-content: space-between;
    gap: 12px;
  }
}
