:root {
  --bg: #f3f6fa;
  --panel: #ffffff;
  --elev: #eef3f9;
  --line: #d3deea;
  --navy: #0b2239;
  --text: #0b2239;
  --muted: #5b6d80;
  --accent: #0077c8;
  --accent-bright: #33a1fd;
  --over: #c45c26;
  --under: #1a7a8c;
  --match: #4d6478;
  font-family: Montserrat, "Avenir Next", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  background:
    radial-gradient(1200px 480px at 100% -10%, rgba(51, 161, 253, 0.12), transparent 55%),
    var(--bg);
  color: var(--text);
}

button,
input,
code {
  font-family: inherit;
}

.app {
  display: grid;
  grid-template-columns: 220px 1fr;
  min-height: 100%;
}

aside {
  padding: 20px 16px 28px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  background: #fff;
  border: 0;
  box-shadow: none;
}

.brand img {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  outline: 0;
}

nav {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

nav button,
.primary,
.back,
.chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--text);
  padding: 9px 12px;
  text-align: left;
  cursor: pointer;
  font-weight: 500;
  font-size: 13px;
}

nav button.active,
.chip.active {
  background: var(--elev);
  border-color: var(--accent);
  color: var(--accent);
}

.aside-meta p {
  margin: 6px 0 0;
  font-size: 13px;
}

.aside-user-name {
  margin: 0 0 8px !important;
  font-weight: 600;
}

.sign-out {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  width: 100%;
  text-align: left;
}

.sign-out:hover {
  color: var(--text);
  border-color: var(--accent);
}

.muted {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

main {
  padding: 24px 24px 40px;
  min-width: 0;
}

.page-head {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

h1 {
  margin: 0 0 8px;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.page-head p {
  margin: 0;
  color: var(--muted);
  max-width: 52ch;
  line-height: 1.45;
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}

.stat,
.card {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 16px 18px;
}

.stat strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  font-weight: 700;
}

.stat strong.over,
.stat strong.recovered {
  color: var(--over);
}

.compare {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: stretch;
  margin-bottom: 20px;
}

.compare-col {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 18px 20px;
}

.compare-col.vera {
  border-color: var(--accent);
}

.compare-col span,
.compare-mid span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.compare-col strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
}

.compare-mid {
  display: flex;
  flex-direction: column;
  justify-content: center;
  text-align: center;
  min-width: 140px;
}

.compare-mid strong.recovered {
  color: var(--over);
  font-size: 22px;
  margin-top: 8px;
}

.pill.omitted,
.pill.underpriced,
.pill.quantity {
  color: var(--over);
  border-color: var(--over);
}

.pill.flagged {
  color: var(--over);
  border-color: var(--over);
}

.flag-note {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 400;
}

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

.starters button {
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text);
  padding: 8px 10px;
  font-size: 12px;
  text-align: left;
  cursor: pointer;
  max-width: 280px;
}

.argument {
  background: var(--panel);
  border: 1px solid var(--line);
  padding: 18px 20px;
  max-width: 720px;
}

.argument h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.argument .verdict {
  margin: 0 0 14px;
  font-size: 14px;
  line-height: 1.5;
}

.codes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
}

.cites {
  margin: 0 0 14px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}

textarea {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  min-height: 88px;
  width: 100%;
  max-width: 720px;
  resize: vertical;
}

.toolbar {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
}

.toolbar-aside {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.inline-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}

.compact-select {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 8px 10px;
  min-width: 0;
  width: auto;
  max-width: 180px;
  font: inherit;
  font-size: 13px;
}

.block-select {
  display: block;
  width: 100%;
  max-width: none;
  margin-top: 6px;
}

.rep-cell {
  min-width: 140px;
}

td.rep-cell .compact-select {
  width: 100%;
  max-width: 160px;
}


.row-actions {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.link-btn {
  border: none;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 4px 0;
  white-space: nowrap;
}

.link-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.link-btn.danger-link {
  color: #b42318;
}

.link-btn.danger-link:hover {
  color: #912018;
}

.row-btn {
  appearance: none;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 6px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--navy, #0b2239);
  cursor: pointer;
  white-space: nowrap;
  line-height: 1.2;
}

.row-btn:hover:not(:disabled) {
  border-color: var(--accent);
  color: var(--accent);
}

.row-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.row-btn.row-btn-muted {
  opacity: 0.72;
  color: var(--muted, #5b6b7c);
}

.row-btn.row-btn-danger {
  border-color: #f0c2bd;
  color: #b42318;
  background: #fff8f7;
}

.row-btn.row-btn-danger:hover:not(:disabled) {
  border-color: #b42318;
  background: #fff1ef;
}

.toolbar .filters {
  margin: 0;
}

input {
  background: var(--panel);
  border: 1px solid var(--line);
  color: var(--text);
  padding: 10px 12px;
  min-width: 280px;
  flex: 1;
}

input:focus {
  outline: 2px solid rgba(0, 119, 200, 0.28);
  border-color: var(--accent);
}

.filters {
  display: flex;
  gap: 6px;
}

.table-wrap {
  border: 1px solid var(--line);
  overflow: auto;
  background: var(--panel);
}

.table-wrap.retail-dash {
  overflow-x: hidden;
}

.table-wrap.retail-dash table {
  table-layout: fixed;
  width: 100%;
  font-size: 12px;
}

.table-wrap.retail-dash th,
.table-wrap.retail-dash td {
  padding: 8px 6px;
}

.table-wrap.retail-dash th:nth-child(1),
.table-wrap.retail-dash td:nth-child(1) {
  width: 20%;
}

.table-wrap.retail-dash th:nth-child(2),
.table-wrap.retail-dash td:nth-child(2) {
  width: 12%;
}

.table-wrap.retail-dash th:nth-child(3),
.table-wrap.retail-dash td:nth-child(3) {
  width: 5%;
}

.table-wrap.retail-dash th:nth-child(4),
.table-wrap.retail-dash td:nth-child(4) {
  width: 6%;
}

.table-wrap.retail-dash th:nth-child(5),
.table-wrap.retail-dash td:nth-child(5),
.table-wrap.retail-dash th:nth-child(6),
.table-wrap.retail-dash td:nth-child(6),
.table-wrap.retail-dash th:nth-child(7),
.table-wrap.retail-dash td:nth-child(7) {
  width: 9%;
}

.table-wrap.retail-dash th:nth-child(8),
.table-wrap.retail-dash td:nth-child(8) {
  width: 9%;
}

.table-wrap.retail-dash th:nth-child(9),
.table-wrap.retail-dash td:nth-child(9) {
  width: 9%;
}

.table-wrap.retail-dash th:nth-child(10),
.table-wrap.retail-dash td:nth-child(10) {
  width: 12%;
}

.table-wrap.retail-dash .cell-clip {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
}

.table-wrap.retail-dash .rep-cell {
  min-width: 0;
}

.table-wrap.retail-dash td.rep-cell .compact-select {
  width: 100%;
  max-width: none;
  padding: 4px 6px;
  font-size: 11px;
}

.table-wrap.retail-dash .row-actions {
  gap: 4px;
  flex-wrap: wrap;
}

.table-wrap.retail-dash .row-btn {
  padding: 4px 8px;
  font-size: 11px;
}

.table-wrap.retail-dash .pill {
  font-size: 11px;
  padding: 1px 6px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7fafd;
}

td {
  padding: 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr.clickable {
  cursor: pointer;
}

tbody tr.clickable:hover {
  background: var(--elev);
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border: 1px solid var(--line);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

a.pill.match {
  cursor: pointer;
}

a.pill.match:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.pill.over {
  color: var(--over);
  border-color: var(--over);
}

.pill.under {
  color: var(--under);
  border-color: var(--under);
}

.pill.match,
.pill.demo {
  color: var(--match);
}

.pill.ready,
.pill.live {
  color: var(--accent);
  border-color: var(--accent);
}

.pill.unmatched,
.pill.empty {
  color: var(--muted);
}

button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.primary {
  background: linear-gradient(135deg, var(--accent-bright), var(--accent) 55%, var(--navy));
  color: #fff;
  border-color: transparent;
}

.row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

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

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

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

.gbb-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  text-align: left;
  padding: 16px 14px;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: inherit;
  width: 100%;
}

.gbb-card:hover {
  border-color: var(--accent);
}

.gbb-card.active {
  border-color: var(--accent);
  background: #e8f3fb;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.gbb-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--accent);
}

.gbb-shingle {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
}

.gbb-warranty {
  font-size: 0.85rem;
}

.gbb-price {
  margin-top: 6px;
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
}

.rt-price-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.65rem 0.85rem;
  margin: 0 0 1rem;
  padding: 0.85rem 0.95rem;
  background: var(--panel-2, #f5f7fa);
  border: 1px solid var(--line, #d3dee9);
  border-radius: 10px;
}

.rt-price-field {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}

.rt-price-input-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: #fff;
  border: 1px solid var(--line, #d3dee9);
  border-radius: 8px;
  padding: 0.35rem 0.55rem;
}

.rt-price-input-wrap input {
  width: 5.5rem;
  border: 0;
  outline: 0;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--navy);
  background: transparent;
}

.rt-price-hint {
  flex: 1 1 100%;
  margin: 0;
  font-size: 0.85rem;
}

.gbb-delta {
  font-size: 0.8rem;
}

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

.mfr-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 16px 14px;
  background: var(--elev);
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  color: inherit;
  width: 100%;
}

.mfr-card:hover:not(:disabled) {
  border-color: var(--accent);
}

.mfr-card:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.mfr-card.active {
  border-color: var(--accent);
  background: #e8f3fb;
  box-shadow: inset 0 0 0 1px var(--accent);
}

.mfr-card strong {
  font-size: 1.05rem;
  color: var(--navy);
}

.mfr-sheets {
  margin-top: 6px;
  font-size: 0.8rem;
  color: #b48444;
  font-weight: 600;
}

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

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

.estimate-summary {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 18px 20px;
  margin-bottom: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: 0 1px 0 rgba(11, 34, 57, 0.04);
}

.estimate-logo {
  display: block;
  width: 108px;
  height: auto;
  flex-shrink: 0;
}

.estimate-summary-body {
  display: flex;
  flex: 1;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-end;
  min-width: 0;
}

.estimate-summary-body > div:first-child {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.estimate-summary .muted {
  color: var(--muted);
  font-size: 0.82rem;
}

.estimate-summary strong {
  font-size: 1.05rem;
  color: var(--navy);
}

.estimate-summary-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  text-align: right;
  flex-shrink: 0;
}

.estimate-summary-meta span {
  color: #b48444;
  font-size: 0.82rem;
  font-weight: 600;
}

.estimate-summary-meta strong {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--navy);
}

@media (max-width: 720px) {
  .estimate-summary {
    flex-direction: column;
    align-items: flex-start;
  }

  .estimate-summary-body {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .estimate-summary-meta {
    align-items: flex-start;
    text-align: left;
  }
}

.upload-card {
  margin-bottom: 20px;
  max-width: none;
}

.upload-card input[type="file"] {
  min-width: 0;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
  max-width: 560px;
}

label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  font-weight: 500;
}

.file-picker input[type="file"] {
  display: block;
  width: 100%;
  max-width: 100%;
  padding: 10px 12px;
  border: 1px dashed var(--line);
  background: #fff;
  cursor: pointer;
}

.file-picker-hint {
  font-size: 12px;
  font-weight: 400;
}

.steps {
  margin: 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.7;
}

.notice {
  margin: 0;
  color: var(--accent);
  font-size: 13px;
}

.back {
  margin-bottom: 16px;
}

.head-totals {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  font-size: 13px;
}

code {
  font-size: 12px;
}

/* Login */
.login-body {
  min-height: 100%;
  display: grid;
  place-items: center;
  padding: 32px 16px;
  background:
    radial-gradient(900px 420px at 10% -10%, rgba(180, 132, 68, 0.18), transparent 50%),
    radial-gradient(1000px 500px at 100% 0%, rgba(12, 30, 68, 0.12), transparent 55%),
    var(--bg);
}

.login-shell {
  width: min(420px, 100%);
}

.login-card {
  background: #fff;
  padding: 36px 32px 28px;
  border: 1px solid var(--line);
}

.login-logo {
  display: block;
  width: 180px;
  max-width: 70%;
  height: auto;
  margin: 0 auto 20px;
}

.login-card h1 {
  text-align: center;
  margin: 0 0 6px;
  font-size: 26px;
  letter-spacing: 0.08em;
}

.login-card > .muted {
  text-align: center;
  margin-bottom: 22px;
}

.login-card label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.login-card input {
  border: 1px solid var(--line);
  padding: 10px 12px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
}

/* Back Office */
.bo-tabs {
  gap: 0.5rem;
  margin: 0 0 1.25rem;
  flex-wrap: wrap;
}

.bo-tab {
  border: 1px solid var(--line);
  background: #fff;
  padding: 0.45rem 0.85rem;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
}

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

.bo-section-title {
  margin: 1.25rem 0 0.5rem;
  font-size: 1.05rem;
  color: var(--navy);
}

.bo-stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.bo-stat {
  background: var(--panel-2, #f5f7fa);
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.bo-stat strong {
  font-size: 1.5rem;
  color: var(--navy);
}

.bo-stat span {
  font-size: 0.8rem;
  color: var(--muted);
}

.bo-exception-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
}

/* Vision QC reuses Back Office tab/stat patterns */
.vqc-banner {
  border: 1px solid var(--line);
  background: var(--panel-2, #f5f7fa);
  border-radius: 10px;
  padding: 0.75rem 1rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
}

.vqc-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: end;
  margin: 0 0 1.25rem;
}

.vqc-form-row label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.8rem;
  color: var(--muted);
  min-width: 140px;
}

.vqc-status {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.vqc-checklist td {
  vertical-align: top;
}

.bo-exc-pill {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 120px;
}

.bo-exc-pill strong {
  font-size: 1.25rem;
  color: var(--navy);
}

.bo-explain {
  background: #f8fafc;
  border-left: 3px solid var(--gold, #b48444);
  padding: 0.75rem 1rem;
}

.bo-exc-detail label,
.bo-settings label {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
}

.bo-exc-detail textarea,
.bo-settings input {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0.5rem 0.65rem;
  font: inherit;
  color: var(--text);
}

.login-card .primary {
  width: 100%;
  text-align: center;
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.login-password-fallback {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}

.login-password-fallback summary {
  cursor: pointer;
  margin-bottom: 12px;
}

.login-password-fallback .stack,
.login-password-fallback label {
  margin-top: 10px;
}

.login-password-fallback .primary {
  margin-top: 12px;
}

/* —— Command Center —— */
.cc-panel .page-head h1 {
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.cc-head-actions {
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cc-test-banner {
  background: #faf7f2;
  border: 1px solid #e6dcc8;
  color: #6a5a3a;
  padding: 0.65rem 1rem;
  margin-bottom: 1.25rem;
  font-size: 0.9rem;
}

.cc-home {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.cc-status-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.85rem;
}

.cc-status-row--tight {
  margin: 0;
}

.cc-stat {
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.1rem 1.15rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
}

button.cc-stat {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

button.cc-stat:hover {
  border-color: color-mix(in srgb, var(--navy) 35%, var(--line));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--navy) 8%, transparent);
}

button.cc-stat:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--navy) 35%, transparent);
  outline-offset: 2px;
}

.cc-stat strong {
  font-size: 1.85rem;
  line-height: 1.1;
  font-weight: 600;
  color: var(--navy);
}

.cc-stat span {
  color: var(--muted);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-weight: 550;
}

.cc-stat.cc-critical strong { color: #b42318; }
.cc-stat.cc-attention strong { color: #b54708; }
.cc-stat.cc-track strong { color: #027a48; }

.cc-caught-up,
.cc-attention-strip {
  border: 1px solid var(--line);
  background: #fff;
  padding: 1rem 1.2rem;
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}

.cc-caught-up {
  border-color: #c8e6d4;
  background: #f6fbf8;
}

.cc-caught-up h2,
.cc-attention-strip strong {
  margin: 0 0 0.2rem;
  font-size: 1.05rem;
}

.cc-caught-up p,
.cc-attention-strip p {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
}

.cc-ask-strip {
  border: 1px solid var(--line);
  background: #fff;
  padding: 1.1rem 1.2rem;
  display: grid;
  gap: 0.85rem;
}

.cc-ask-copy strong {
  display: block;
  font-size: 1.05rem;
  margin-bottom: 0.15rem;
}

.cc-ask-copy p {
  margin: 0;
  font-size: 0.92rem;
}

.cc-ask-row {
  display: flex;
  gap: 0.5rem;
  align-items: stretch;
}

.cc-ask-row input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  padding: 0.7rem 0.85rem;
  font: inherit;
  background: #fafafa;
}

.cc-ask-row input:focus {
  outline: 2px solid color-mix(in srgb, var(--navy) 25%, transparent);
  outline-offset: 1px;
  background: #fff;
}

.cc-section-label {
  margin: 0.25rem 0 0;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

.cc-module-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.cc-module {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  padding: 1.15rem 1.2rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.cc-module:hover {
  border-color: color-mix(in srgb, var(--navy) 35%, var(--line));
  box-shadow: 0 1px 0 color-mix(in srgb, var(--navy) 8%, transparent);
}

.cc-module-kicker {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 600;
}

.cc-module strong {
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--navy);
  font-weight: 600;
}

.cc-module > span {
  color: var(--muted);
  font-size: 0.92rem;
}

.cc-module em {
  margin-top: 0.55rem;
  font-style: normal;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--navy);
}

.cc-home-preview {
  display: grid;
  gap: 0.65rem;
}

.cc-home-preview-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
}

.cc-alert-teaser {
  list-style: none;
  margin: 0;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
}

.cc-alert-teaser li {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--line);
  cursor: pointer;
}

.cc-alert-teaser li:last-child {
  border-bottom: 0;
}

.cc-alert-teaser li:hover {
  background: #fafafa;
}

.cc-alert-teaser span {
  font-size: 0.95rem;
  line-height: 1.35;
}

.cc-compliance-link {
  margin: 0;
  font-size: 0.9rem;
}

button.linkish {
  background: none;
  border: 0;
  padding: 0;
  color: var(--navy);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.cc-panel-view {
  display: grid;
  gap: 0.85rem;
}

.cc-panel-head h2 {
  margin: 0;
  font-size: 1.35rem;
}

.cc-panel-hint,
.cc-panel-actions {
  margin: 0.5rem 0 0;
}

.cc-priority-list {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.cc-priority {
  border: 1px solid var(--line);
  border-left-width: 3px;
  padding: 0.9rem 1rem;
  background: #fff;
  cursor: pointer;
}

.cc-priority.cc-red { border-left-color: #b42318; }
.cc-priority.cc-orange { border-left-color: #b54708; }
.cc-priority.cc-yellow { border-left-color: #ca8a04; }
.cc-priority.cc-green { border-left-color: #027a48; }
.cc-priority.cc-blue { border-left-color: #026aa2; }

.cc-priority h3 {
  margin: 0.35rem 0;
  font-size: 1rem;
}

.cc-priority p {
  margin: 0.25rem 0;
}

.cc-priority-top {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
}

.cc-action {
  font-weight: 600;
  color: var(--navy);
}

.cc-pill {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  padding: 0.2rem 0.45rem;
  border: 1px solid transparent;
  flex-shrink: 0;
}

.cc-pill.cc-red { background: #fef3f2; color: #b42318; border-color: #fecdca; }
.cc-pill.cc-orange { background: #fff6ed; color: #b54708; border-color: #f9dbaf; }
.cc-pill.cc-yellow { background: #fefbe8; color: #a15c07; border-color: #fde272; }
.cc-pill.cc-green { background: #ecfdf3; color: #027a48; border-color: #abefc6; }
.cc-pill.cc-blue { background: #f0f9ff; color: #026aa2; border-color: #b9e6fe; }

.cc-watch-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.75rem;
}

.cc-watch-card {
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  padding: 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  cursor: pointer;
}

.cc-watch-card strong {
  font-size: 1.35rem;
}

.cc-watch-card span {
  color: var(--muted);
  font-size: 0.9rem;
}

.cc-watch-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.5rem;
}

.cc-watch-list li {
  border: 1px solid var(--line);
  padding: 0.75rem 0.9rem;
  background: #fff;
  display: grid;
  gap: 0.25rem;
  cursor: pointer;
}

.cc-watch-list li:hover,
.cc-job-row:hover {
  background: #fafafa;
}

.cc-job-row {
  cursor: pointer;
}

.cc-health-score {
  font-size: 2rem;
  font-weight: 700;
}

.cc-health-score span {
  font-size: 1rem;
  color: var(--muted);
  font-weight: 500;
}

.cc-reason-list {
  margin: 0 0 1rem;
  padding-left: 1.2rem;
}

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

@media (max-width: 900px) {
  .cc-status-row {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 640px) {
  .cc-status-row,
  .cc-module-grid {
    grid-template-columns: 1fr;
  }

  .cc-attention-strip,
  .cc-caught-up {
    flex-direction: column;
    align-items: flex-start;
  }

  .cc-ask-row {
    flex-direction: column;
  }
}

@media (max-width: 900px) {
  .app {
    grid-template-columns: 1fr;
  }
  .stats,
  .compare {
    grid-template-columns: 1fr;
  }
  aside {
    border-bottom: 0;
  }
}
