:root {
  color-scheme: dark;
  --orange: #f7941e;
  --green: #34d399;
  --orange-dim: rgba(247, 148, 30, 0.12);
  --green-dim: rgba(52, 211, 153, 0.12);
  --bg: #0a0a0a;
  --bg2: #111111;
  --bg3: #161616;
  --border: #1e1e1e;
  --border2: #2a2a2a;
  --text: #ffffff;
  --text2: #888888;
  --text3: #444444;
  --danger: #e05252;
  --mono: 'IBM Plex Mono', monospace;
  --sans: 'Space Grotesk', sans-serif;
  --shadow: 0 18px 45px rgba(0, 0, 0, 0.36);
  font-family: var(--sans);
}

.wizard-first-app {
  gap: 20px;
}

.wizard-chooser {
  display: grid;
  gap: 18px;
}

.wizard-chooser__head {
  max-width: 820px;
}

.wizard-chooser__head h1 {
  margin: 0 0 10px;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.96;
  letter-spacing: 0;
}

.wizard-chooser__head p:not(.eyebrow) {
  margin: 0;
  color: var(--text2);
  font-size: 16px;
  line-height: 1.5;
}

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

.wizard-card,
.wizard-choice-card,
.recent-activity-item,
.recent-activity-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 128px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  text-align: left;
  text-decoration: none;
  cursor: pointer;
}

.wizard-card:hover,
.wizard-choice-card:hover,
.recent-activity-item:hover,
.recent-activity-card:hover {
  border-color: var(--brand-mate, var(--green));
  background: var(--bg3);
}

.wizard-card-icon,
.wizard-choice-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  color: var(--brand-mate, var(--green));
  font-family: var(--mono);
  font-size: 13px;
  font-weight: 900;
}

.wizard-card-title,
.wizard-choice-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 18px;
  line-height: 1.1;
}

.wizard-card-sub,
.wizard-choice-card small {
  display: block;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.35;
}

.wizard-card em,
.wizard-choice-card em {
  display: block;
  margin-top: 12px;
  color: var(--text3);
  font-family: var(--mono);
  font-size: 10px;
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.recent-activity-strip {
  display: grid;
  gap: 12px;
  padding-top: 8px;
}

.recent-activity-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.recent-activity-item,
.recent-activity-card {
  grid-template-columns: minmax(0, 1fr);
  min-height: 84px;
}

.recent-activity-item strong,
.recent-activity-card strong {
  display: block;
  margin-bottom: 6px;
}

.recent-activity-item span,
.recent-activity-card span {
  color: var(--text2);
  font-size: 13px;
}

.route-wizard-mount {
  max-width: 1100px;
}

.wizard-shell {
  display: grid;
  gap: 18px;
}

.wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wizard-progress li {
  display: grid;
  gap: 7px;
  min-height: 82px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text2);
}

.wizard-progress li.is-active {
  border-color: var(--brand-late, var(--orange));
  color: var(--text);
}

.wizard-progress li.is-complete {
  border-color: rgba(52, 211, 153, 0.55);
  color: var(--brand-mate, var(--green));
}

.wizard-progress span {
  font-family: var(--mono);
  font-size: 11px;
}

.wizard-progress b {
  font-size: 13px;
}

.wizard-card.wizard-step-1,
.wizard-card[class*="wizard-step-"] {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
  min-height: 420px;
  cursor: default;
}

.wizard-card[class*="wizard-step-"]:hover {
  border-color: var(--border);
  background: var(--bg2);
}

.wizard-card h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1;
  letter-spacing: 0;
}

.wizard-step-copy,
.wizard-step-status {
  margin: 0;
  color: var(--text2);
  line-height: 1.5;
}

.wizard-step-status {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.wizard-drop-zone {
  display: grid;
  gap: 8px;
  min-height: 150px;
  align-content: center;
  padding: 22px;
  border: 1px dashed var(--border2);
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.07);
}

.wizard-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.wizard-fields {
  display: grid;
  gap: 12px;
}

.wizard-facts div {
  display: grid;
  gap: 8px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
}

.wizard-facts dt {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 10px;
  text-transform: uppercase;
}

.wizard-facts dd {
  margin: 0;
  color: var(--text);
  font-weight: 800;
}

.wizard-candidate-list,
.wizard-carrier-grid {
  display: grid;
  gap: 10px;
}

.wizard-candidate-list label,
.wizard-carrier-grid .carrier-setup-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg3);
}

.wizard-candidate-list span,
.wizard-candidate-list em,
.wizard-carrier-grid span {
  display: block;
}

.wizard-candidate-list em,
.wizard-carrier-grid span {
  margin-top: 4px;
  color: var(--text2);
  font-size: 12px;
  font-style: normal;
}

.wizard-packet-preview {
  max-height: 220px;
  overflow: auto;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #050505;
  color: var(--text2);
  font-family: var(--mono);
  font-size: 11px;
}

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

@media (max-width: 960px) {
  .wizard-chooser-grid,
  .recent-activity-list,
  .wizard-facts {
    grid-template-columns: 1fr;
  }

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

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
}

[hidden] {
  display: none !important;
}

button,
select,
input,
textarea {
  font: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  grid-row: 1 / -1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 28px 24px;
  background: #0f0f0f;
  border-right: 1px solid var(--border);
  color: var(--text);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-link {
  color: inherit;
  text-decoration: none;
  width: 100%;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 1px solid var(--border);
  background: transparent;
  font-weight: 800;
}

.brand-clock svg {
  width: 34px;
  height: 34px;
}

.brand-wordmark {
  display: flex;
  gap: 0;
  letter-spacing: -0.3px;
}

.brand-wordmark .late {
  color: var(--orange);
}

.brand-wordmark .mate {
  color: var(--green);
}

.brand strong,
.brand span {
  display: block;
}

.brand span {
  color: var(--text2);
  font-size: 13px;
}

.brand-logo {
  display: block;
  width: 192px;
  max-width: 100%;
  height: auto;
}

.nav {
  display: grid;
  gap: 6px;
}

.nav-group {
  margin-top: 10px;
  color: var(--text3);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}

.nav-item {
  border: 0;
  color: #555555;
  background: transparent;
  text-align: left;
  padding: 10px 12px;
  cursor: pointer;
  text-decoration: none;
  border-radius: 6px;
}

.nav-item.active,
.nav-item:hover {
  color: var(--text);
  background: #1a1a1a;
}

.main {
  grid-column: 2;
  padding: 30px;
  min-width: 0;
}

.global-ratemate {
  position: static;
  z-index: 20;
  grid-column: 2;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  align-self: start;
  width: calc(100% - 60px);
  max-width: 100%;
  margin: 14px 30px 0;
  padding: 7px;
  overflow: hidden;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: rgba(15, 15, 15, 0.96);
  backdrop-filter: blur(16px);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
}

.global-ratemate__brand {
  min-width: 0;
  min-height: 40px;
  padding: 0 10px;
  border: 1px solid rgba(52, 211, 153, 0.45);
  border-radius: 6px;
  background: rgba(52, 211, 153, 0.12);
  color: var(--brand-mate, var(--green));
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.global-ratemate__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
}

.global-ratemate__form input {
  min-width: 0;
  min-height: 40px;
  border: 1px solid var(--border2);
  border-radius: 6px;
  background: #101010;
  color: var(--text);
  padding: 0 14px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-view {
  display: grid;
  gap: 18px;
}

.app-view[hidden] {
  display: none !important;
}

.wizard-first-app .latemate-canon-dashboard {
  display: none;
}

.wizard-chooser,
.route-wizard {
  display: grid;
  gap: 18px;
}

.wizard-chooser__head,
.route-wizard__head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  max-width: 1080px;
}

.wizard-chooser__head h1,
.route-wizard__head h1 {
  margin: 0;
  font-size: clamp(34px, 5vw, 58px);
  line-height: 0.98;
  letter-spacing: 0;
}

.wizard-chooser__head p:not(.eyebrow),
.route-wizard__head p:not(.eyebrow) {
  max-width: 680px;
  margin: 10px 0 0;
  color: var(--text2);
  line-height: 1.5;
}

.wizard-chooser-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  max-width: 1120px;
}

.wizard-card,
.recent-activity-card {
  display: grid;
  gap: 8px;
  min-height: 156px;
  padding: 18px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--bg2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.wizard-card:hover,
.recent-activity-card:hover {
  border-color: rgba(52, 211, 153, 0.58);
  background: var(--bg3);
}

.wizard-card__icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(247, 148, 30, 0.45);
  border-radius: 7px;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
}

.wizard-card__icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.wizard-card strong,
.recent-activity-card strong {
  font-size: 20px;
  line-height: 1.1;
}

.wizard-card__detail,
.wizard-card small,
.recent-activity-card span {
  color: var(--text2);
  line-height: 1.45;
}

.recent-activity-strip {
  display: grid;
  gap: 12px;
  max-width: 1120px;
  padding-top: 4px;
}

.recent-activity-list {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.recent-activity-card {
  min-height: 98px;
  padding: 14px;
}

.route-wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  max-width: 1120px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.route-wizard-progress li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text2);
  background: var(--bg2);
  cursor: pointer;
}

.route-wizard-progress li.is-active {
  border-color: rgba(247, 148, 30, 0.72);
  color: var(--text);
}

.route-wizard-progress li.is-complete {
  border-color: rgba(52, 211, 153, 0.5);
  color: var(--green);
}

.route-wizard-progress span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 12px;
}

.route-wizard__body,
.route-wizard__actions {
  max-width: 1120px;
}

.route-wizard__step {
  display: grid;
  gap: 16px;
  min-height: 360px;
  padding: 22px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--bg2);
}

.route-wizard__step h2 {
  margin: 0;
  font-size: 28px;
  line-height: 1.05;
}

.wizard-stack {
  display: grid;
  gap: 14px;
}

.wizard-drop-zone {
  display: grid;
  gap: 12px;
  min-height: 220px;
  place-content: center;
  padding: 24px;
  border: 1px dashed rgba(52, 211, 153, 0.58);
  border-radius: 8px;
  background: rgba(52, 211, 153, 0.08);
  text-align: center;
}

.wizard-mini-list,
.wizard-packet-preview ul {
  display: grid;
  gap: 8px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.wizard-mini-list li {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.wizard-mini-list span,
.wizard-mini-list small {
  color: var(--text2);
}

.wizard-stat-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.wizard-stat-grid > div {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.03);
}

.wizard-stat-grid span {
  color: var(--text2);
  font-size: 12px;
}

.wizard-stat-grid strong {
  font-size: 22px;
}

.wizard-lever-form,
.wizard-carrier-grid,
.wizard-candidate-pick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.wizard-lever-form label {
  display: grid;
  gap: 8px;
  color: var(--text2);
}

.wizard-lever-form input,
.wizard-lever-form output {
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--border2);
  border-radius: 7px;
  background: #101010;
  color: var(--text);
}

.wizard-carrier-grid button,
.wizard-candidate-pick button {
  display: grid;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.wizard-carrier-grid button.is-selected,
.wizard-candidate-pick button.is-selected {
  border-color: var(--green);
  background: rgba(52, 211, 153, 0.1);
}

.wizard-checkline {
  display: flex;
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
}

.route-wizard__actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.page-heading {
  display: grid;
  gap: 10px;
  max-width: 900px;
  margin-bottom: 6px;
}

.page-heading h1 {
  font-size: clamp(34px, 5vw, 66px);
  line-height: 0.94;
}

.page-heading p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--text2);
  font-size: 18px;
  line-height: 1.45;
}

.page-grid {
  display: grid;
  gap: 12px;
}

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

.page-panel {
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 20px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.78);
}

.rich-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.rich-list li {
  display: grid;
  gap: 4px;
  padding: 12px 0;
  border-top: 1px solid var(--border);
}

.rich-list strong {
  color: var(--text);
}

.rich-list span {
  color: var(--text2);
  line-height: 1.45;
}

.mini-chart {
  display: grid;
  gap: 10px;
}

.mini-chart div {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  align-items: center;
  min-height: 44px;
  padding: 10px 0;
  border-top: 1px solid var(--border);
}

.mini-chart em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
}

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

.pill-cloud span {
  padding: 8px 10px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-weight: 800;
}

.stacked {
  display: grid;
  gap: 10px;
}

.credit-metrics {
  margin-bottom: 0;
}

.connection-form {
  display: grid;
  gap: 12px;
}

.connection-form label {
  display: grid;
  gap: 6px;
  color: var(--text2);
  font-weight: 800;
}

.connection-form input,
.connection-form select {
  min-height: 44px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  padding: 0 12px;
}

.connection-list {
  display: grid;
  gap: 12px;
}

.connection-wizard {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.6fr);
  gap: 18px;
  align-items: stretch;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(247, 148, 30, 0.08)),
    var(--bg2);
}

.connection-wizard__copy,
.connection-wizard__actions {
  display: grid;
  align-content: center;
  gap: 12px;
}

.connection-wizard__copy h2 {
  max-width: 780px;
}

.connection-wizard__copy p:not(.eyebrow) {
  max-width: 820px;
  color: var(--text2);
  line-height: 1.5;
}

.connection-wizard__actions {
  padding-left: 18px;
  border-left: 1px solid var(--border);
}

.customer-pilot-panel {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(320px, 1.2fr);
  gap: 18px;
  margin-bottom: 18px;
}

.customer-pilot-panel p:not(.eyebrow) {
  margin: 0;
  color: var(--text2);
  line-height: 1.5;
}

.recovery-start {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  margin-bottom: 18px;
  background:
    linear-gradient(135deg, rgba(247, 148, 30, 0.12), rgba(52, 211, 153, 0.07)),
    var(--bg2);
}

.recovery-start__copy h2 {
  margin-bottom: 8px;
  font-size: 28px;
  letter-spacing: 0;
}

.recovery-start__copy p:not(.eyebrow) {
  max-width: 760px;
  margin: 0;
  color: var(--text2);
  line-height: 1.5;
}

.recovery-start__actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

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

.connection-mode-strip {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.connection-mode-strip article,
.connection-lane-panel {
  border: 1px solid var(--border);
  background: var(--bg2);
}

.connection-mode-strip article {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 18px;
}

.connection-mode-strip span,
.connection-lane-heading .eyebrow {
  color: var(--orange);
}

.connection-mode-strip span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.connection-mode-strip strong {
  color: var(--text);
  font-size: 19px;
  line-height: 1.25;
}

.connection-mode-strip small {
  color: var(--text2);
  line-height: 1.45;
}

.connection-setup-workspace {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  align-items: start;
  margin-bottom: 18px;
}

.data-partner-workspace {
  display: grid;
  gap: 16px;
  margin-bottom: 18px;
}

.partner-connection-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 12px;
  align-content: start;
}

.partner-connection-card {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 184px;
  width: 100%;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--bg2);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.partner-connection-card:hover,
.partner-connection-card.is-selected {
  border-color: var(--green);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(52, 211, 153, 0.08);
}

.partner-connection-card.is-selected {
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.1), rgba(247, 148, 30, 0.05)),
    var(--bg2);
}

.partner-connection-card__eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(52, 211, 153, 0.08);
  border: 1px solid rgba(52, 211, 153, 0.28);
  color: var(--green);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.partner-connection-card__eyebrow.partner-connection-card__eyebrow--primary {
  background: rgba(247, 148, 30, 0.08);
  border-color: rgba(247, 148, 30, 0.28);
  color: var(--orange);
}

.partner-connection-card h3 {
  margin: 0;
  font-size: 21px;
}

.partner-connection-card p {
  margin: 0;
  color: var(--text2);
  line-height: 1.45;
}

.partner-connection-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: auto;
  color: var(--text2);
  font-size: 12px;
}

.partner-connection-detail {
  display: grid;
  gap: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(247, 148, 30, 0.08), rgba(52, 211, 153, 0.04)),
    var(--bg2);
}

.partner-connection-detail__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.partner-connection-detail__head h2 {
  margin: 0;
  font-size: 28px;
}

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

.partner-connection-facts div,
.partner-connection-notes > div {
  display: grid;
  gap: 6px;
  padding: 14px 16px;
  border: 1px solid var(--border2);
  background: rgba(255, 255, 255, 0.02);
}

.partner-connection-facts span {
  color: var(--text2);
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.partner-connection-facts strong {
  font-size: 14px;
}

.partner-connection-notes {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  gap: 12px;
}

.partner-setup-panel {
  display: grid;
  gap: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(247, 148, 30, 0.06)),
    var(--bg2);
}

.partner-setup-panel__head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
}

.partner-setup-panel__head h2 {
  margin: 0;
  font-size: 28px;
}

.partner-setup-steps,
.partner-setup-form,
.partner-setup-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.partner-setup-step,
.partner-setup-facts div {
  display: grid;
  gap: 8px;
  padding: 14px 16px;
  border: 1px solid var(--border2);
  background: rgba(255, 255, 255, 0.02);
}

.partner-setup-step {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.partner-setup-step span {
  width: 28px;
  height: 28px;
  display: inline-grid;
  place-items: center;
  border: 1px solid rgba(52, 211, 153, 0.35);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.partner-setup-step strong,
.partner-setup-facts strong {
  letter-spacing: 0;
}

.partner-setup-step p,
.partner-setup-facts span {
  margin: 0;
  color: var(--text2);
}

.partner-setup-facts span {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.partner-setup-form label {
  display: grid;
  gap: 6px;
}

.partner-setup-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.connection-carrier-lanes {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-items: start;
}

.connection-lane-panel {
  display: grid;
  align-content: start;
  align-items: start;
  gap: 14px;
  padding: 16px;
}

.connection-lane-panel--ltl {
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(247, 148, 30, 0.05)),
    var(--bg2);
}

.parcel-mini-wizard {
  background:
    linear-gradient(135deg, rgba(247, 148, 30, 0.08), rgba(52, 211, 153, 0.04)),
    transparent;
}

.connection-lane-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border2);
}

.connection-lane-heading h2,
.connection-lane-heading p {
  margin: 0;
}

.connection-lane-heading h2 {
  font-size: 22px;
}

.connection-lane-heading .connection-choice-status {
  max-width: 360px;
  text-align: right;
}

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

.ltl-mini-wizard {
  display: grid;
  gap: 16px;
  padding-top: 16px;
}

.ltl-mini-wizard__steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border2);
  background: var(--border2);
}

.ltl-mini-wizard__steps span {
  display: grid;
  min-height: 46px;
  place-items: center;
  background: #101010;
  color: var(--text2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ltl-mini-wizard__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 220px;
  gap: 12px;
  align-items: stretch;
}

.ltl-mini-wizard select {
  min-height: 56px;
  border: 1px solid var(--border2);
  border-radius: 2px;
  background: #101010;
  color: var(--text);
  font: inherit;
  font-weight: 900;
  padding: 0 16px;
}

.parcel-mini-wizard select,
.ltl-mini-wizard select {
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.015);
}

.parcel-mini-wizard .primary-button,
.ltl-mini-wizard .primary-button,
.connection-form .primary-button,
.credential-setup-form .primary-button {
  box-shadow: none;
  text-transform: none;
}

.parcel-mini-wizard .primary-button:hover,
.ltl-mini-wizard .primary-button:hover,
.connection-form .primary-button:hover,
.credential-setup-form .primary-button:hover {
  transform: translateY(-1px);
}

.parcel-mini-wizard .primary-button,
.ltl-mini-wizard .primary-button {
  min-width: 0;
  width: 100%;
  min-height: 56px;
  border-radius: 2px;
  font-weight: 900;
  letter-spacing: 0;
}

.ltl-carrier-panel {
  margin-bottom: 18px;
}

.connection-choice-status {
  min-height: 22px;
  margin: 0;
  color: var(--text2);
  font-size: 14px;
}

.carrier-setup-card {
  display: grid;
  align-content: start;
  gap: 10px;
  min-height: 220px;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--bg2);
}

.carrier-setup-card.is-selected {
  border-color: var(--orange);
  background:
    linear-gradient(135deg, rgba(247, 148, 30, 0.14), rgba(52, 211, 153, 0.06)),
    var(--bg2);
}

.carrier-setup-card span {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
}

.carrier-setup-card h2 {
  font-size: 22px;
}

.carrier-setup-card p {
  margin: 0;
  color: var(--text2);
  line-height: 1.45;
}

.carrier-card-facts {
  display: grid;
  gap: 7px;
  margin: 2px 0 0;
  padding: 0;
  list-style: none;
}

.carrier-card-facts li {
  min-height: 30px;
  padding: 7px 9px;
  border: 1px solid var(--border2);
  background: #101010;
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

.carrier-setup-card button {
  align-self: end;
  margin-top: auto;
  width: 100%;
  min-width: 0;
}

.connection-flow-panel {
  display: grid;
  gap: 12px;
}

.connection-flow-panel .page-panel {
  min-width: 0;
}

.connection-next-panel {
  background: rgba(255, 255, 255, 0.04);
}

.utility-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.file-button-strong {
  border-color: var(--orange);
  color: var(--orange);
}

.file-button-green {
  border-color: rgba(52, 211, 153, 0.85);
  color: var(--green);
}

.visually-hidden {
  position: absolute;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  border: 0 !important;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  clip-path: inset(50%);
}

.pilot-checklist {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.pilot-checklist li {
  display: grid;
  gap: 6px;
  min-height: 118px;
  padding: 14px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.pilot-checklist strong {
  color: var(--text);
}

.pilot-checklist span {
  color: var(--text2);
  line-height: 1.4;
}

.connection-steps {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.connection-steps span,
.credential-next-step,
.connection-flow-status {
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
}

.connection-steps span {
  min-height: 54px;
  display: grid;
  align-items: center;
  padding: 10px;
  color: var(--text);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
}

.credential-next-step,
.connection-flow-status {
  margin: 0;
  padding: 12px;
  color: var(--text2);
  line-height: 1.45;
}

.connection-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.connection-progress span {
  min-height: 38px;
  display: grid;
  place-items: center;
  padding: 8px;
  border: 1px solid var(--border);
  background: rgba(247, 148, 30, 0.09);
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  text-align: center;
  text-transform: uppercase;
}

.connection-progress span.is-done {
  background: rgba(52, 211, 153, 0.11);
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.24);
}

.connection-card {
  display: grid;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.72);
}

.connection-card > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.connection-card h3 {
  margin: 0;
  font-size: 18px;
}

.muted-copy {
  margin: 0;
  color: var(--text2);
  line-height: 1.45;
}

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

html[data-boot="app"] #landingShell {
  display: none;
}

.boot-state-shell {
  position: fixed;
  inset: 0;
  z-index: 200;
  min-height: 100vh;
  grid-template-columns: minmax(220px, 272px) 1fr;
  background: var(--bg);
  color: var(--text);
}

html[data-boot="app"] #bootStateShell[hidden],
.boot-state-shell:not([hidden]) {
  display: grid !important;
}

.boot-state-rail {
  padding: 28px 24px;
  border-right: 1px solid var(--border);
  background: var(--panel);
}

.boot-state-brand {
  margin-bottom: 54px;
  color: var(--brand-late);
  font: 700 16px/1 var(--mono);
  letter-spacing: .04em;
}

.boot-state-brand strong { color: var(--brand-mate); }
.boot-state-brand small { color: var(--text-quiet); font-size: 10px; }
.boot-state-rail-line { width: 100%; height: 10px; margin: 0 0 18px; border-radius: 999px; background: var(--panel-2); }
.boot-state-rail-line.short { width: 62%; }
.boot-state-main { display: grid; place-items: center; padding: 32px; }
.boot-state-panel {
  display: flex;
  width: min(100%, 560px);
  min-height: 126px;
  align-items: center;
  gap: 14px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel);
}
.boot-state-panel[hidden] { display: none; }
.boot-state-panel strong { display: block; margin-bottom: 6px; }
.boot-state-panel .btn { margin-left: auto; }

@media (max-width: 760px) {
  .boot-state-shell { grid-template-columns: 76px 1fr; }
  .boot-state-rail { padding: 24px 14px; }
  .boot-state-brand span, .boot-state-brand strong, .boot-state-brand small { display: none; }
  .boot-state-brand::before { content: "LM"; color: var(--brand-late); }
  .boot-state-main { padding: 18px; }
  .boot-state-panel { align-items: flex-start; flex-direction: column; }
  .boot-state-panel .btn { margin-left: 0; }
}

.marketing-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 22px;
  align-items: center;
  padding: 18px clamp(18px, 4vw, 58px);
  background: rgba(246, 247, 243, 0.9);
  border-bottom: 1px solid rgba(23, 33, 29, 0.08);
  backdrop-filter: blur(16px);
}

.marketing-nav .brand-mark {
  color: var(--bg2);
  border-color: rgba(23, 61, 50, 0.26);
  background: rgba(23, 61, 50, 0.08);
}

.marketing-nav .brand strong {
  color: var(--text);
}

.marketing-nav .brand span {
  color: var(--text2);
}

.marketing-nav nav {
  display: flex;
  justify-content: center;
  gap: clamp(12px, 3vw, 30px);
}

.marketing-nav a {
  color: var(--text2);
  font-weight: 700;
  text-decoration: none;
}

.marketing-nav a:hover {
  color: var(--bg2);
}

.marketing-actions,
.hero-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-section {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(22px, 4vw, 42px);
  align-items: start;
  min-height: calc(100vh - 82px);
  padding: clamp(34px, 6vw, 86px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(120deg, rgba(23, 61, 50, 0.1), transparent 42%),
    linear-gradient(180deg, rgba(199, 131, 40, 0.08), transparent 72%);
}

.hero-copy {
  display: grid;
  grid-template-areas:
    "label proof"
    "title proof"
    "lede proof"
    "actions proof";
  grid-template-columns: minmax(0, 1fr) minmax(300px, 420px);
  gap: clamp(22px, 4vw, 56px);
  align-items: start;
  width: min(100%, 1320px);
  margin: 0 auto;
}

.hero-copy .eyebrow {
  grid-area: label;
}

.hero-copy h1 {
  grid-area: title;
  max-width: 980px;
  font-size: clamp(46px, 7.2vw, 104px);
  line-height: 0.88;
}

.hero-lede {
  grid-area: lede;
  max-width: 720px;
  margin: 0;
  color: var(--text2);
  font-size: clamp(17px, 2vw, 22px);
  line-height: 1.45;
}

.hero-actions {
  grid-area: actions;
  margin-top: 0;
}

.proof-strip {
  grid-area: proof;
  align-self: end;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 420px;
  margin: 0;
}

.proof-strip div {
  padding: 14px 0;
  border-top: 1px solid var(--border);
}

.proof-strip dt {
  font-size: 24px;
  font-weight: 900;
}

.proof-strip dd {
  margin: 4px 0 0;
  color: var(--text2);
}

.hero-terminal {
  position: relative;
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(0, 1.45fr) auto;
  gap: 18px;
  align-items: stretch;
  width: min(100%, 1320px);
  min-height: 0;
  margin: 0 auto;
  padding: 24px;
  overflow: hidden;
  color: #f9fbf5;
  background:
    linear-gradient(150deg, rgba(111, 143, 90, 0.24), transparent 32%),
    linear-gradient(180deg, #173d32, #0f241f);
  border: 1px solid rgba(23, 61, 50, 0.4);
  box-shadow: var(--shadow);
}

.hero-terminal::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.045) 0 1px, transparent 1px 42px);
  pointer-events: none;
}

.hero-terminal .signal-header,
.hero-terminal .signal-lanes,
.hero-terminal .signal-magic {
  position: relative;
}

.hero-terminal .signal-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 20px;
  align-items: start;
  padding-right: 18px;
  border-right: 1px solid rgba(255, 255, 255, 0.16);
}

.hero-terminal .signal-header span {
  color: rgba(249, 251, 245, 0.66);
  font-weight: 800;
  text-transform: uppercase;
}

.hero-terminal .signal-header strong {
  color: #f7c66a;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 0.9;
}

.hero-terminal .signal-lanes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 0;
}

.hero-terminal .signal-lanes div {
  display: grid;
  gap: 8px;
  align-content: center;
  min-height: 116px;
  padding: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.13);
}

.hero-terminal .signal-lanes span {
  color: rgba(249, 251, 245, 0.7);
}

.hero-terminal .signal-lanes em {
  color: #f7c66a;
  font-style: normal;
  font-weight: 900;
}

.hero-terminal .signal-magic {
  display: grid;
  place-items: center;
  margin-top: 0;
  padding: 10px 12px;
  color: #10201c;
  background: #f7c66a;
  font-weight: 900;
  text-transform: uppercase;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

.marketing-band,
.workflow-band,
.legal-preview,
.edge-band {
  display: grid;
  gap: 24px;
  padding: clamp(46px, 7vw, 86px) clamp(18px, 5vw, 72px);
  border-top: 1px solid var(--border);
}

.marketing-band > div:first-child,
.workflow-band > div:first-child,
.legal-preview > div:first-child {
  max-width: 760px;
}

.marketing-band h2,
.workflow-band h2,
.legal-preview h2,
.edge-band h2 {
  font-size: clamp(30px, 4vw, 54px);
  line-height: 0.98;
}

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

.feature-grid article {
  padding: 22px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--border);
}

.feature-grid p,
.legal-preview p {
  color: var(--text2);
  line-height: 1.55;
}

.workflow-band {
  grid-template-columns: 0.86fr 1.14fr;
  align-items: start;
  background: rgba(23, 61, 50, 0.05);
}

.workflow-steps {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: steps;
}

.workflow-steps li {
  counter-increment: steps;
  display: grid;
  grid-template-columns: 48px 0.5fr 1fr;
  gap: 14px;
  align-items: center;
  min-height: 70px;
  padding: 16px;
  background: var(--bg2);
  border: 1px solid var(--border);
}

.workflow-steps li::before {
  content: counter(steps);
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  color: var(--bg2);
  background: rgba(111, 143, 90, 0.16);
  font-weight: 900;
}

.workflow-steps span {
  color: var(--text2);
}

.security-band {
  background: linear-gradient(180deg, transparent, rgba(199, 131, 40, 0.07));
}

.edge-band {
  grid-template-columns: 0.82fr 1.18fr;
  align-items: start;
  background:
    linear-gradient(120deg, rgba(23, 61, 50, 0.09), transparent 42%),
    linear-gradient(180deg, rgba(199, 131, 40, 0.09), transparent 70%);
}

.edge-copy {
  display: grid;
  gap: 16px;
  max-width: 620px;
}

.edge-copy p:not(.eyebrow) {
  margin: 0;
  color: var(--text2);
  font-size: 18px;
  line-height: 1.55;
}

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

.edge-grid article {
  display: grid;
  gap: 10px;
  align-content: start;
  min-height: 210px;
  padding: 22px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--border);
}

.edge-grid span {
  color: var(--orange);
  font-weight: 900;
}

.edge-grid p {
  margin: 0;
  color: var(--text2);
  line-height: 1.5;
}

.route-signal {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  overflow: hidden;
  border: 1px solid rgba(23, 61, 50, 0.2);
  background: rgba(23, 61, 50, 0.16);
}

.route-signal div {
  display: grid;
  gap: 8px;
  padding: 20px;
  background: #112721;
  color: #f9fbf5;
}

.route-signal span {
  color: rgba(249, 251, 245, 0.58);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.route-signal strong {
  color: #f7c66a;
  line-height: 1.25;
}

.legal-preview {
  grid-template-columns: 0.8fr 1.2fr;
  padding-bottom: 110px;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.legal-links a {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 10px 13px;
  border: 1px solid var(--text);
  color: var(--text);
  font-weight: 800;
  text-decoration: none;
}

.legal-page {
  width: min(1040px, 100%);
  margin: 0 auto;
  padding: clamp(34px, 6vw, 72px) clamp(18px, 5vw, 48px) 96px;
}

.legal-page header {
  display: grid;
  gap: 16px;
  margin-bottom: 34px;
}

.legal-page header h1 {
  max-width: 920px;
  font-size: clamp(42px, 7vw, 86px);
  line-height: 0.9;
}

.legal-page header p:not(.eyebrow),
.legal-section p,
.legal-section li {
  color: var(--text2);
  line-height: 1.58;
}

.legal-section {
  display: grid;
  gap: 12px;
  padding: 24px 0;
  border-top: 1px solid var(--border);
}

.legal-section h2 {
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.05;
}

.legal-section ul {
  margin-top: 0;
}

.legal-callout {
  padding: 18px;
  border: 1px solid rgba(199, 131, 40, 0.34);
  background: rgba(199, 131, 40, 0.09);
  color: var(--text);
}

.auth-panel {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(23, 33, 29, 0.52);
  backdrop-filter: blur(12px);
}

.auth-card {
  position: relative;
  width: min(100%, 440px);
  padding: 26px;
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.auth-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text);
  cursor: pointer;
}

.auth-message {
  color: var(--text2);
  line-height: 1.45;
}

.auth-form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.auth-form input {
  min-height: 46px;
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
}

.text-button {
  margin-top: 14px;
  border: 0;
  padding: 0;
  color: var(--green);
  background: transparent;
  font-weight: 800;
  cursor: pointer;
}

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

.error-line {
  flex-basis: 100%;
  min-height: 20px;
  margin: 8px 0 0;
  color: var(--danger);
  font-weight: 700;
}

.invoice-dropzone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  margin-bottom: 18px;
  min-height: 180px;
  border: 1px dashed rgba(52, 211, 153, 0.48);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(247, 148, 30, 0.05)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.025) 0 1px, transparent 1px 18px);
  padding: 24px 28px;
  cursor: pointer;
  outline: none;
  transition: border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.invoice-dropzone h2 {
  margin-bottom: 6px;
  font-size: clamp(24px, 3vw, 34px);
  letter-spacing: 0;
}

.invoice-dropzone p {
  max-width: 780px;
  margin: 0;
  color: var(--text2);
}

.invoice-dropzone .compact-green-button {
  justify-self: end;
  min-width: 190px;
}

.invoice-dropzone .muted-copy {
  grid-column: 1 / -1;
  color: var(--text2);
  font-size: 13px;
}

.invoice-dropzone.is-dragging,
.invoice-dropzone:focus-visible {
  border-color: var(--orange);
  background:
    linear-gradient(135deg, rgba(247, 148, 30, 0.2), rgba(52, 211, 153, 0.12)),
    repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.035) 0 1px, transparent 1px 18px);
  box-shadow: 0 0 0 1px rgba(247, 148, 30, 0.2), 0 18px 60px rgba(0, 0, 0, 0.26);
}

.audit-bundle-panel {
  margin-bottom: 18px;
  overflow: hidden;
}

.audit-bundle-panel[hidden] {
  display: none;
}

.audit-bundle-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}

.audit-carrier-mix {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.audit-carrier-mix span {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: var(--bg3);
  color: var(--text2);
  font-size: 12px;
  font-weight: 800;
}

.audit-bundle-grid div {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 18px;
  background: var(--bg2);
}

.audit-bundle-grid span,
.audit-bundle-grid small {
  color: var(--text2);
}

.audit-bundle-grid span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
}

.audit-bundle-grid strong {
  color: var(--text);
  font-size: 30px;
}

.audit-bucket-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  padding: 18px;
  border-top: 1px solid var(--border);
}

.audit-bucket {
  display: grid;
  gap: 6px;
  min-height: 120px;
  padding: 15px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--bg3);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.audit-bucket strong {
  font-size: 26px;
}

.audit-bucket span {
  font-weight: 800;
}

.audit-bucket small {
  color: var(--text2);
  line-height: 1.35;
}

.audit-bucket--eligible {
  border-color: rgba(52, 211, 153, 0.28);
}

.audit-bucket--eligible strong {
  color: var(--green);
}

.audit-bucket--blocked {
  border-color: rgba(247, 148, 30, 0.28);
}

.audit-bucket--blocked strong {
  color: var(--orange);
}

.audit-bucket--expired {
  border-color: rgba(224, 82, 82, 0.28);
}

.audit-bucket--expired strong {
  color: var(--danger);
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 760px;
  font-size: clamp(34px, 5vw, 66px);
  line-height: 0.95;
}

.app-ai-badge {
  display: inline-flex;
  align-items: center;
  transform: translateY(-0.35em);
  margin-left: 8px;
  border-radius: 4px;
  padding: 1px 6px;
  background: var(--orange);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.4;
  vertical-align: middle;
}

h2 {
  font-size: 18px;
}

h3 {
  font-size: 13px;
}

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

.file-button,
.primary-button,
.ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  white-space: nowrap;
  border: 1px solid var(--text);
  background: var(--text);
  color: white;
  min-width: 176px;
  min-height: 48px;
  padding: 0 18px;
  cursor: pointer;
}

.file-button {
  position: relative;
  overflow: hidden;
  background: transparent;
  color: var(--text);
}

.compact-green-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 0;
  border: 1px solid rgba(52, 211, 153, 0.65);
  border-radius: 2px;
  background: rgba(52, 211, 153, 0.14);
  color: var(--green);
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0;
  line-height: 1.1;
}

.compact-green-button:hover,
.file-button-green:hover {
  border-color: var(--green);
  background: rgba(52, 211, 153, 0.2);
}

.compact-ghost-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  min-width: 0;
  border: 1px solid var(--border2);
  border-radius: 2px;
  background: transparent;
  color: var(--text2);
  padding: 0 18px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  letter-spacing: 0;
  line-height: 1.1;
}

.compact-ghost-button:hover {
  color: var(--text);
  border-color: #555555;
}

.text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  text-align: center;
  cursor: pointer;
}

.ghost-button {
  background: transparent;
  color: var(--text);
}

.file-button input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ops-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.ops-panel {
  display: grid;
  gap: 12px;
  align-content: start;
  padding: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
}

.checkline {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-size: 14px;
}

.checkline input {
  width: 18px;
  height: 18px;
  accent-color: var(--bg2);
}

.field-label {
  display: grid;
  gap: 6px;
  color: var(--text2);
  font-size: 13px;
  font-weight: 800;
}

.note-input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  padding: 11px 12px;
}

.upload-list {
  min-height: 44px;
  margin: 0;
}

.mini-facts {
  display: grid;
  gap: 9px;
  margin: 0;
}

.mini-facts div {
  display: grid;
  gap: 3px;
}

.identity-panel {
  background: rgba(23, 61, 50, 0.06);
}

.metric {
  padding: 18px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.74);
}

.metric span,
.metric small,
.invoice-ledger-strip span,
.invoice-ledger-strip small,
.invoice-refund-focus span,
.invoice-refund-focus small,
.intelligence-metrics span,
.intelligence-metrics small,
.ltl-metrics span,
.ltl-metrics small {
  display: block;
  color: var(--text2);
}

.metric span,
.invoice-ledger-strip span,
.invoice-refund-focus span,
.intelligence-metrics span,
.ltl-metrics span {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: none;
}

.metric small,
.invoice-ledger-strip small,
.invoice-refund-focus small,
.intelligence-metrics small,
.ltl-metrics small {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.35;
}

.metric strong,
.invoice-ledger-strip strong,
.invoice-refund-focus strong,
.intelligence-metrics strong,
.ltl-metrics strong {
  display: block;
  margin: 10px 0 6px;
  color: var(--text);
  font-family: var(--sans);
  font-size: 30px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
}

.invoice-ledger-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.invoice-ledger-strip article {
  display: grid;
  gap: 8px;
  min-height: 142px;
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--bg2);
}

.invoice-ledger-strip__refund {
  border-color: rgba(52, 211, 153, 0.38) !important;
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.14), var(--bg2)) !important;
}

.invoice-ledger-strip__refund strong,
.invoice-summary-panel .invoice-refund-focus strong:first-of-type {
  color: var(--green);
}

.invoice-history-layout {
  display: grid;
  grid-template-columns: minmax(340px, 0.82fr) minmax(0, 1.18fr);
  gap: 16px;
  align-items: start;
  margin-bottom: 18px;
}

.invoice-history-panel,
.invoice-summary-panel {
  min-height: 520px;
}

.invoice-history-panel .rich-list {
  display: grid;
  gap: 10px;
  margin: 18px 0 0;
}

.invoice-history-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px 14px;
  width: 100%;
  padding: 15px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}

.invoice-history-card[aria-pressed="true"] {
  border-color: rgba(52, 211, 153, 0.58);
  background: rgba(52, 211, 153, 0.09);
}

.invoice-history-card strong,
.invoice-history-card span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-history-card strong {
  font-size: 15px;
}

.invoice-history-card span {
  grid-column: 1 / -1;
  color: var(--text2);
  font-size: 13px;
}

.invoice-history-card em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.invoice-refund-focus {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 18px 0;
  border: 1px solid var(--border);
  background: var(--border);
}

.invoice-refund-focus div {
  display: grid;
  gap: 8px;
  min-height: 150px;
  padding: 18px;
  background: #101010;
}

.invoice-summary-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0 0 18px;
  border: 1px solid var(--border);
  background: var(--border);
}

.invoice-summary-facts div {
  display: grid;
  gap: 6px;
  padding: 14px;
  background: var(--bg2);
}

.invoice-summary-facts dt {
  color: var(--text2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.invoice-summary-facts dd {
  margin: 0;
  color: var(--text);
  font-size: 20px;
  font-weight: 900;
}

.invoice-breakdown {
  display: grid;
  gap: 10px;
}

.invoice-breakdown div {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--border2);
  background: var(--bg3);
}

.invoice-breakdown strong,
.invoice-breakdown span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.invoice-breakdown span {
  color: var(--text2);
}

.invoice-breakdown em {
  color: var(--green);
  font-style: normal;
  font-weight: 900;
  white-space: nowrap;
}

.invoice-support-grid {
  align-items: start;
}

.ratemate-ledger-strip,
.ltl-ledger-strip {
  margin-bottom: 2px;
}

.audit-wizard {
  display: grid;
  gap: 18px;
  margin-bottom: 16px;
}

.audit-stepper {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 1px solid var(--border);
  background: var(--bg);
}

.audit-stepper li {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--border);
  color: var(--text2);
}

.audit-stepper li:last-child {
  border-right: 0;
}

.audit-stepper li.active {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.12), rgba(247, 148, 30, 0.08));
  color: var(--text);
}

.audit-stepper span,
.audit-stepper small {
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.audit-stepper strong {
  font-size: 16px;
}

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

.audit-launch-grid article,
.audit-note-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--bg2);
}

.audit-launch-grid article {
  min-height: 236px;
}

.audit-launch-grid h3,
.audit-note-card h2 {
  margin: 0;
  font-size: 20px;
}

.audit-launch-grid p,
.audit-note-card p {
  margin: 0;
  color: var(--text2);
  line-height: 1.45;
}

.audit-launch-grid article > button {
  width: 100%;
  margin-top: auto;
}

.audit-command-panel {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

.ratemate-brain-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 0.36fr);
}

.ratemate-brain-page {
  min-height: 420px;
}

.ratemate-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(340px, 0.42fr);
  gap: 16px;
  align-items: start;
}

.ratemate-audit-panel,
.ratemate-command-panel {
  min-height: 100%;
}

.ratemate-audit-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.ratemate-audit-card {
  grid-template-columns: minmax(0, 1fr) auto;
}

.ratemate-command-panel {
  position: sticky;
  top: 82px;
  display: grid;
  gap: 16px;
  min-width: 0;
  overflow: hidden;
}

.ratemate-command-panel > * {
  min-width: 0;
}

.ratemate-command-stack {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.ratemate-command-stack button {
  width: 100%;
  min-width: 0;
  justify-content: center;
}

.ratemate-brain-card {
  display: grid;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--border2);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.07), rgba(247, 148, 30, 0.045)),
    #0d0d0d;
}

.ratemate-brain-card h2 {
  margin: 0;
}

.compact-transcript {
  min-height: 220px;
  max-height: 320px;
}

.ratemate-insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.ratemate-insight-grid .page-panel {
  min-height: 260px;
}

.rate-savings-workbench {
  display: grid;
  gap: 16px;
  margin: 16px 0;
}

.rate-analysis-strip {
  margin-bottom: 0;
}

.rate-analysis-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(320px, 0.8fr);
  gap: 14px;
  align-items: stretch;
}

.rate-analysis-card,
.rate-scenario-form {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  background: var(--bg2);
}

.rate-scenario-form h3 {
  margin: 0;
  font-size: 20px;
}

.rate-scenario-form label {
  display: grid;
  gap: 7px;
  color: var(--text2);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.rate-scenario-form input {
  width: 100%;
  border: 1px solid var(--border);
  background: var(--bg);
  color: var(--text);
  padding: 12px;
  font-family: var(--sans);
  font-size: 16px;
  font-weight: 800;
}

.rate-scenario-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 10px;
}

.rate-scenario-actions .compact-green-button,
.rate-scenario-actions .compact-ghost-button {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  white-space: normal;
  line-height: 1.15;
  text-align: center;
  overflow-wrap: anywhere;
}

.rate-sheet-ledger {
  grid-column: 1 / -1;
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(20, 184, 166, 0.08), rgba(255, 149, 20, 0.05)), var(--bg2);
}

.rate-sheet-ledger h3 {
  margin: 0;
  font-size: 20px;
}

.ltl-history-layout {
  margin-bottom: 2px;
}

.workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(360px, 0.65fr);
  gap: 16px;
  align-items: start;
}

.copilot-strip {
  margin-bottom: 18px;
  padding: 0;
  overflow: hidden;
}

.copilot-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 18px;
  padding: 18px;
}

.copilot-lede {
  margin: 0 0 8px;
  color: var(--text);
  font-weight: 800;
  line-height: 1.45;
}

.copilot-chat-panel {
  min-height: 520px;
  display: flex;
  flex-direction: column;
}

.intelligence-command-panel {
  gap: 18px;
  margin-bottom: 12px;
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(247, 148, 30, 0.06)),
    var(--bg2);
}

.intelligence-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.intelligence-metrics div {
  display: grid;
  gap: 7px;
  min-height: 122px;
  padding: 16px;
  border: 1px solid var(--border2);
  background: rgba(8, 8, 8, 0.7);
}

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

.intelligence-grid article {
  min-height: 250px;
  padding: 16px;
  border: 1px solid var(--border2);
  background: rgba(12, 12, 12, 0.74);
}

.intelligence-grid .rich-list li:first-child {
  border-top: 0;
}

.ltl-command-panel {
  margin-bottom: 16px;
  background:
    linear-gradient(135deg, rgba(247, 148, 30, 0.1), rgba(52, 211, 153, 0.055)),
    #0f0f0f;
}

.ltl-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.ltl-metrics div {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 16px;
  background: #101010;
}

.ltl-intelligence-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.ltl-intelligence-grid article {
  display: grid;
  gap: 10px;
  padding: 18px;
  background: #101010;
}

.ltl-intelligence-grid .rich-list li:first-child {
  border-top: 0;
}

.ltl-workflow-grid {
  margin-top: 14px;
}

.ltl-wizard {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 20px;
  border: 1px solid var(--border);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(247, 148, 30, 0.04)),
    var(--bg2);
}

.ltl-wizard__head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 520px);
  gap: 18px;
  align-items: end;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border2);
}

.ltl-wizard__head h2,
.ltl-wizard__head p {
  margin: 0;
}

.ltl-wizard__head h2 {
  font-size: clamp(28px, 3vw, 42px);
  letter-spacing: 0;
}

.ltl-wizard-progress {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--border2);
  background: var(--border2);
  list-style: none;
}

.ltl-wizard-progress li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 58px;
  padding: 12px;
  background: #101010;
  color: var(--text2);
}

.ltl-wizard-progress li.is-active {
  background:
    linear-gradient(135deg, rgba(247, 148, 30, 0.16), rgba(52, 211, 153, 0.08)),
    #101010;
  color: var(--text);
}

.ltl-wizard-progress li.is-complete {
  border-color: rgba(52, 211, 153, 0.2);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.1), rgba(247, 148, 30, 0.04)),
    #101010;
  color: var(--text);
}

.ltl-wizard-progress span {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid rgba(247, 148, 30, 0.45);
  color: var(--orange);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
}

.ltl-wizard-progress b {
  font-size: 14px;
}

.ltl-wizard-form {
  display: grid;
  grid-template-columns: minmax(250px, 0.9fr) minmax(340px, 1.1fr);
  gap: 1px;
  border: 1px solid var(--border);
  background: var(--border);
}

.ltl-wizard-step {
  display: grid;
  align-content: start;
  gap: 14px;
  min-height: 280px;
  padding: 18px;
  background: #101010;
}

.ltl-wizard-step h3,
.ltl-wizard-step p {
  margin: 0;
}

.ltl-wizard-step--documents,
.ltl-wizard-step--review {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.018), rgba(52, 211, 153, 0.045)),
    #101010;
}

.ltl-carrier-choice-grid {
  display: grid;
  gap: 8px;
}

.ltl-carrier-choice-grid label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid var(--border2);
  background: var(--bg3);
  color: var(--text);
  font-weight: 900;
}

.ltl-carrier-choice-grid label:has(input:checked) {
  border-color: rgba(247, 148, 30, 0.72);
  background:
    linear-gradient(135deg, rgba(247, 148, 30, 0.15), rgba(52, 211, 153, 0.07)),
    var(--bg3);
}

.ltl-upload-dropzone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 160px;
  gap: 14px;
  align-items: center;
  min-height: 122px;
  padding: 18px;
  border: 1px dashed rgba(52, 211, 153, 0.45);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.09), rgba(247, 148, 30, 0.05)),
    #0d0d0d;
}

.ltl-upload-dropzone.is-dragging {
  border-color: var(--green);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(247, 148, 30, 0.08)),
    #0d0d0d;
}

.ltl-upload-dropzone strong,
.ltl-upload-dropzone span {
  display: block;
}

.ltl-upload-dropzone strong {
  margin-bottom: 6px;
  color: var(--text);
  font-size: 20px;
}

.ltl-upload-dropzone span {
  color: var(--text2);
  line-height: 1.45;
}

.ltl-document-summary {
  min-height: 22px;
  margin: -4px 0 0;
  color: var(--green);
  font-size: 14px;
  font-weight: 800;
}

.ltl-review-panel {
  display: grid;
  gap: 1px;
  border: 1px solid var(--border2);
  background: var(--border2);
}

.ltl-review-panel div {
  display: grid;
  gap: 5px;
  padding: 13px;
  background: #0d0d0d;
}

.ltl-review-panel span {
  color: var(--text2);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.ltl-review-panel strong {
  color: var(--text);
  font-size: 18px;
}

.ltl-step-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ltl-step-list li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border2);
  background: var(--bg3);
}

.ltl-step-list strong {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(247, 148, 30, 0.45);
  background: rgba(247, 148, 30, 0.14);
  color: var(--orange);
  font-family: var(--mono);
  font-size: 14px;
}

.ltl-step-list span {
  display: grid;
  gap: 4px;
  color: var(--text2);
  line-height: 1.45;
}

.ltl-step-list b {
  color: var(--text);
}

.ltl-intake-panel {
  align-content: start;
}

.ltl-intake-form {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.ltl-intake-form label {
  display: grid;
  gap: 8px;
  color: var(--text2);
  font-weight: 800;
}

.ltl-intake-form label span,
.ltl-document-checklist legend {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.ltl-intake-form input[type="text"] {
  min-height: 56px;
  border: 1px solid var(--border2);
  border-radius: 0;
  background: #101010;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.ltl-document-checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 4px 0 0;
  padding: 14px;
  border: 1px solid var(--border2);
  background: var(--bg3);
}

.ltl-document-checklist legend {
  grid-column: 1 / -1;
  margin-bottom: 4px;
  color: var(--orange);
}

.ltl-document-checklist label {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 8px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  background: #0d0d0d;
  color: var(--text);
  font-size: 14px;
}

.ltl-intake-form .primary-button {
  width: fit-content;
  min-height: 48px;
  padding-inline: 22px;
}

.copilot-transcript {
  display: flex;
  flex: 1;
  flex-direction: column;
  align-items: stretch;
  gap: 12px;
  min-height: 320px;
  max-height: 430px;
  overflow-y: auto;
  padding: 16px;
  border: 1px solid var(--border2);
  background:
    linear-gradient(180deg, rgba(52, 211, 153, 0.05), rgba(247, 148, 30, 0.035)),
    #090909;
}

.copilot-message {
  display: grid;
  gap: 7px;
  max-width: min(86%, 640px);
  padding: 14px 16px;
  border: 1px solid var(--border2);
  background: #151515;
  color: var(--text);
}

.copilot-message strong {
  color: var(--orange);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.copilot-message p {
  margin: 0;
  color: #d8d8d8;
  line-height: 1.55;
}

.copilot-message--user {
  align-self: flex-end;
  border-color: rgba(247, 148, 30, 0.42);
  background: rgba(247, 148, 30, 0.14);
}

.copilot-message--assistant {
  align-self: flex-start;
  border-color: rgba(52, 211, 153, 0.34);
  background: rgba(52, 211, 153, 0.1);
}

.copilot-message--assistant strong {
  color: var(--green);
}

.copilot-form {
  display: grid;
  grid-template-columns: minmax(180px, 0.45fr) minmax(0, 1fr) auto;
  gap: 10px;
  margin-top: 12px;
}

.copilot-form input,
.copilot-mode-select {
  width: 100%;
  border: 1px solid var(--border2);
  background: #101010;
  color: var(--text);
  padding: 12px;
}

.copilot-mode-select {
  color: var(--green);
  font-weight: 800;
}

.copilot-form input::placeholder {
  color: #6f6f6f;
}

.sample-question-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.compact-button {
  min-height: 38px;
  padding: 8px 10px;
  font-size: 12px;
}

.ai-control-panel {
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.08), rgba(247, 148, 30, 0.05)),
    var(--bg2);
}

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

.control-grid div {
  display: grid;
  gap: 8px;
  min-height: 132px;
  padding: 18px;
  border: 1px solid var(--border2);
  background: rgba(10, 10, 10, 0.62);
}

.control-grid strong {
  color: var(--text);
  font-size: 18px;
}

.control-grid span {
  color: var(--text2);
  line-height: 1.5;
}

.queue-panel,
.detail-panel {
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.panel-header.compact {
  align-items: start;
}

.queue-summary {
  margin: 0;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  color: var(--text2);
  line-height: 1.45;
}

select {
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  padding: 9px 10px;
}

.table-wrap {
  max-height: 520px;
  overflow: auto;
  overscroll-behavior: contain;
  border-top: 1px solid var(--border);
}

table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
  min-width: 760px;
}

th,
td {
  padding: 13px 14px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  font-size: 14px;
}

th {
  color: var(--text2);
  font-size: 12px;
  text-transform: uppercase;
}

tbody tr {
  cursor: pointer;
}

tbody tr:hover,
tbody tr.selected {
  background: #f5f7f0;
}

.queue-more-row td {
  color: var(--text2);
  font-weight: 700;
  text-align: center;
  background: rgba(247, 148, 30, 0.08);
}

.tracking {
  font-weight: 800;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 92px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  background: var(--bg3);
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.status-eligible,
.status-likely_eligible {
  border-color: rgba(111, 143, 90, 0.34);
  background: rgba(111, 143, 90, 0.16);
  color: #315321;
}

.status-blocked {
  border-color: rgba(199, 131, 40, 0.4);
  background: rgba(199, 131, 40, 0.14);
  color: #805015;
}

.status-expired {
  border-color: rgba(182, 74, 59, 0.38);
  background: rgba(182, 74, 59, 0.13);
  color: #873429;
}

.detail-panel {
  position: sticky;
  top: 18px;
  max-height: calc(100vh - 36px);
  overflow: auto;
  overscroll-behavior: contain;
}

.detail-grid {
  display: grid;
  gap: 10px;
  padding: 18px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}

.detail-grid div {
  display: grid;
  gap: 4px;
}

dt {
  color: var(--text2);
  font-size: 12px;
  text-transform: uppercase;
}

dd {
  margin: 0;
  line-height: 1.35;
  min-width: 0;
  overflow-wrap: anywhere;
}

.reason-block {
  padding: 18px;
  border-bottom: 1px solid var(--border);
}

.workflow-actions {
  display: grid;
  gap: 8px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
}

.workflow-action-list {
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 18px;
}

.workflow-actions button {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  padding-inline: 12px;
  white-space: normal;
}

.workflow-action-card {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
}

.workflow-action-card span {
  color: var(--text2);
  font-size: 13px;
  line-height: 1.35;
}

.connection-card .workflow-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

ul {
  margin: 10px 0 0;
  padding-left: 18px;
}

li {
  margin: 7px 0;
  color: var(--text2);
  line-height: 1.4;
}

.service-cell,
.tracking {
  display: block;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.muted-list-more {
  color: var(--muted);
  font-size: 13px;
}

textarea {
  width: 100%;
  min-height: 210px;
  border: 0;
  resize: vertical;
  padding: 16px;
  background: #101915;
  color: #d7eadc;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 12px;
  line-height: 1.5;
}

code,
pre {
  font-family: "SFMono-Regular", Consolas, monospace;
}

.carrier-smoke-page {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 30px;
}

.smoke-header,
.smoke-summary,
.carrier-smoke-grid,
.smoke-notes {
  margin-bottom: 24px;
}

.smoke-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
}

.smoke-header h1 {
  max-width: 900px;
}

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

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

.carrier-smoke-card,
.smoke-notes {
  background: var(--bg2);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.carrier-smoke-card .detail-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.carrier-smoke-card .detail-grid div {
  min-width: 0;
}

.status-pass {
  color: var(--bg2);
  background: #dfead8;
}

.carrier-request-json,
#smokeJson {
  margin: 0;
  padding: 16px;
  overflow: auto;
  max-height: 340px;
  background: #101915;
  color: #d7eadc;
  font-size: 12px;
  line-height: 1.5;
}

.smoke-notes {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(0, 1.3fr);
}

.smoke-notes div {
  padding: 18px;
}

.smoke-notes p {
  color: var(--text2);
  line-height: 1.5;
}

.variation-lab {
  width: min(1520px, 100%);
  margin: 0 auto;
  padding: 30px;
}

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

.variation-lab-header h1 {
  max-width: 980px;
}

.concept-disclosure {
  max-width: 760px;
  margin: 14px 0 0;
  color: var(--text2);
  line-height: 1.5;
}

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

.variation-grid {
  display: grid;
  gap: 18px;
}

.variation-card {
  padding: 18px;
  border: 1px solid var(--border);
  background: var(--bg2);
  box-shadow: var(--shadow);
}

.variation-topline {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
  color: var(--text2);
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
}

.variation-topline span {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  border: 1px solid currentColor;
}

.variation-preview-shell {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: 430px;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 29, 0.16);
}

.variation-preview-shell aside {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
}

.mini-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  margin-bottom: 12px;
  border: 1px solid currentColor;
  font-weight: 900;
}

.variation-preview-shell aside strong,
.variation-preview-shell aside small {
  display: block;
}

.variation-preview-shell aside nav {
  display: grid;
  gap: 8px;
  margin-top: 30px;
}

.variation-preview-shell aside nav span {
  padding: 10px 12px;
}

.variation-preview-main {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(320px, 0.8fr);
  gap: 22px;
  align-items: center;
  padding: 32px;
  overflow: hidden;
}

.variation-copy h2 {
  max-width: 560px;
  font-size: clamp(34px, 5vw, 74px);
  line-height: 0.93;
}

.variation-copy p:not(.eyebrow) {
  max-width: 480px;
  color: var(--text2);
  line-height: 1.55;
}

.approval-widget {
  position: relative;
  min-height: 270px;
  padding: 24px;
  overflow: hidden;
  border: 1px solid rgba(23, 33, 29, 0.16);
}

.approval-label,
.approval-widget small {
  display: block;
  position: relative;
  z-index: 2;
}

.concept-badge {
  position: relative;
  z-index: 2;
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 8px;
  border: 1px solid currentColor;
  text-transform: uppercase;
  font-size: 11px;
  font-weight: 900;
}

.approval-label {
  margin-bottom: 10px;
  text-transform: uppercase;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
}

.approval-amount {
  position: relative;
  z-index: 2;
  display: block;
  font-size: clamp(42px, 7vw, 92px);
  line-height: 0.95;
}

.approval-rail {
  position: relative;
  z-index: 2;
  height: 10px;
  margin: 24px 0;
  background: rgba(255, 255, 255, 0.34);
}

.approval-rail span {
  display: block;
  width: 0;
  height: 100%;
}

.approval-active .approval-rail span {
  animation: approval-fill 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}

.variation-signal .variation-preview-shell {
  background: #f7faf5;
}

.variation-signal aside {
  color: #eaf8f0;
  background: #123c31;
}

.variation-signal aside nav .active {
  background: rgba(34, 211, 238, 0.16);
  color: #b8f26a;
}

.variation-signal .variation-preview-main {
  background:
    linear-gradient(90deg, rgba(34, 211, 238, 0.1), transparent 42%),
    repeating-linear-gradient(90deg, rgba(18, 60, 49, 0.04) 0 1px, transparent 1px 70px),
    #f7faf5;
}

.signal-widget {
  color: #10231c;
  background: linear-gradient(135deg, rgba(184, 242, 106, 0.22), rgba(34, 211, 238, 0.16));
}

.signal-widget .approval-rail span {
  background: linear-gradient(90deg, #b8f26a, #22d3ee);
}

.approval-active .signal-widget::after {
  content: "";
  position: absolute;
  inset: -30% auto -30% -35%;
  width: 34%;
  background: linear-gradient(90deg, transparent, rgba(34, 211, 238, 0.45), transparent);
  transform: skewX(-16deg);
  animation: approval-scan 1.25s ease-out forwards;
}

.variation-night {
  background: #0f1617;
  border-color: #284143;
}

.variation-night .variation-topline,
.variation-night .variation-copy p:not(.eyebrow) {
  color: #9fb6b1;
}

.variation-night .variation-preview-shell {
  border-color: #284143;
  background: #0f1617;
}

.variation-night aside {
  color: #e9fff6;
  background: #081111;
}

.variation-night aside nav .active {
  color: #101915;
  background: #22d3ee;
}

.variation-night .variation-preview-main {
  color: #edfdf7;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.16), transparent 38%),
    linear-gradient(90deg, rgba(184, 242, 106, 0.08), transparent 55%),
    #0f1617;
}

.night-widget {
  color: #effff8;
  background: #101c1d;
  border-color: #2b5a5d;
}

.approval-bars {
  display: flex;
  gap: 8px;
  align-items: end;
  height: 70px;
  margin-bottom: 22px;
}

.approval-bars span {
  width: 18%;
  height: 24px;
  background: linear-gradient(180deg, #22d3ee, #b8f26a);
}

.approval-active .approval-bars span {
  animation: approval-bars 800ms ease-in-out infinite alternate;
}

.approval-bars span:nth-child(2) { animation-delay: 90ms; }
.approval-bars span:nth-child(3) { animation-delay: 160ms; }
.approval-bars span:nth-child(4) { animation-delay: 230ms; }
.approval-bars span:nth-child(5) { animation-delay: 300ms; }

.variation-vault .variation-preview-shell {
  background: #fbf8ef;
}

.variation-vault aside {
  color: #fff8e7;
  background: #203a2d;
}

.variation-vault aside nav .active {
  color: #fff8e7;
  background: #5b2449;
}

.variation-vault .variation-preview-main {
  background:
    linear-gradient(90deg, rgba(91, 36, 73, 0.1), transparent 38%),
    linear-gradient(180deg, rgba(198, 139, 44, 0.12), transparent 45%),
    #fbf8ef;
}

.vault-widget {
  color: #1c241d;
  background: #fffdf6;
  border-color: rgba(91, 36, 73, 0.3);
}

.approval-stamp {
  position: absolute;
  right: 18px;
  top: 20px;
  z-index: 1;
  padding: 8px 12px;
  border: 2px solid #5b2449;
  color: #5b2449;
  text-transform: uppercase;
  font-weight: 900;
  transform: rotate(-8deg) scale(0.84);
  opacity: 0.35;
}

.approval-active .approval-stamp {
  animation: stamp-pop 620ms cubic-bezier(0.2, 1.7, 0.35, 1) forwards;
}

.money-particle {
  position: absolute;
  left: 50%;
  top: 55%;
  z-index: 4;
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  pointer-events: none;
  font-size: 11px;
  font-weight: 900;
  animation: money-burst 980ms ease-out var(--delay) forwards;
}

.particle-signal {
  color: #123c31;
  background: #b8f26a;
}

.particle-night {
  color: #081111;
  background: #22d3ee;
}

.particle-vault {
  color: #fff8e7;
  background: #5b2449;
}

@keyframes approval-fill {
  to { width: 100%; }
}

@keyframes approval-scan {
  to { transform: translateX(520%) skewX(-16deg); }
}

@keyframes approval-bars {
  from { height: 18px; opacity: 0.72; }
  to { height: 68px; opacity: 1; }
}

@keyframes stamp-pop {
  0% { opacity: 0.1; transform: rotate(-12deg) scale(1.4); }
  100% { opacity: 0.86; transform: rotate(-8deg) scale(1); }
}

@keyframes money-burst {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
  20% { opacity: 1; }
  100% { opacity: 0; transform: translate(calc(-50% + var(--x)), calc(-50% + var(--y))) scale(1); }
}

@media (max-width: 1050px) {
  .marketing-nav {
    grid-template-columns: 1fr;
  }

  .marketing-nav nav {
    justify-content: flex-start;
    overflow-x: auto;
  }

  .hero-section,
  .workflow-band,
  .legal-preview,
  .edge-band {
    grid-template-columns: 1fr;
  }

  .hero-copy {
    grid-template-areas:
      "label"
      "title"
      "lede"
      "actions"
      "proof";
    grid-template-columns: 1fr;
  }

  .proof-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    max-width: none;
  }

  .hero-terminal {
    grid-template-columns: 1fr;
    min-height: 0;
  }

  .hero-terminal .signal-header {
    padding-right: 0;
    padding-bottom: 16px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.16);
  }

  .hero-terminal .signal-lanes {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .hero-terminal .signal-magic {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
  }

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

  .route-signal {
    grid-template-columns: 1fr;
  }

  .two-col {
    grid-template-columns: 1fr;
  }

  .app-shell {
    grid-template-columns: 1fr;
  }

  .global-ratemate {
    position: static;
    grid-column: 1;
    grid-template-columns: 1fr;
    width: auto;
    margin: 12px 18px 0;
    padding: 8px;
  }

  .global-ratemate__form {
    grid-template-columns: 1fr;
  }

  .main {
    grid-column: 1;
  }

  .sidebar {
    position: static;
    grid-row: auto;
  }

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

  .metrics,
  .smoke-summary,
  .carrier-smoke-grid,
  .smoke-notes,
  .variation-preview-shell,
  .variation-preview-main,
	  .connection-wizard,
	  .recovery-start,
    .connection-mode-strip,
    .connection-carrier-lanes,
    .connection-setup-workspace,
    .partner-connection-grid,
    .partner-connection-facts,
    .partner-connection-notes,
    .partner-setup-steps,
    .partner-setup-form,
    .partner-setup-facts,
	  .carrier-setup-grid,
    .connection-ltl-grid,
    .ltl-mini-wizard__body,
    .ltl-wizard__head,
    .ltl-wizard-progress,
    .ltl-wizard-form,
    .ltl-upload-dropzone,
	  .customer-pilot-panel,
  .audit-bundle-grid,
  .audit-bucket-row,
  .audit-stepper,
  .audit-launch-grid,
  .invoice-ledger-strip,
  .invoice-history-layout,
  .invoice-summary-facts,
  .ratemate-workspace,
  .ratemate-insight-grid,
  .rate-analysis-layout,
  .ops-strip,
  .copilot-grid,
  .intelligence-metrics,
  .intelligence-grid,
  .ltl-metrics,
  .ltl-intelligence-grid,
  .ltl-document-checklist,
  .control-grid,
  .workbench {
    grid-template-columns: 1fr;
  }

  .copilot-form {
    grid-template-columns: 1fr;
  }

  .connection-wizard__actions {
    padding-left: 0;
    padding-top: 14px;
    border-left: 0;
    border-top: 1px solid var(--border);
  }

  .connection-lane-heading {
    display: grid;
    align-items: start;
  }

  .connection-lane-heading .connection-choice-status {
    max-width: none;
    text-align: left;
  }

  .recovery-start__actions {
    justify-content: flex-start;
  }

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

  .pilot-checklist {
    grid-template-columns: 1fr;
  }

  .detail-panel {
    position: static;
  }

  .ratemate-command-panel {
    position: static;
  }

  .audit-command-panel {
    position: static;
  }

  .workflow-action-card {
    grid-template-columns: 1fr;
  }

  .variation-preview-shell {
    min-height: 0;
  }

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

@media (max-width: 680px) {
  .marketing-nav,
  .hero-section,
  .marketing-band,
  .workflow-band,
  .legal-preview,
  .edge-band {
    padding-left: 18px;
    padding-right: 18px;
  }

  .marketing-actions,
  .hero-actions {
    align-items: stretch;
  }

  .marketing-actions > *,
  .hero-actions > * {
    flex: 1 1 100%;
  }

  .hero-copy h1 {
    font-size: clamp(42px, 14vw, 62px);
  }

  .proof-strip,
  .feature-grid,
  .edge-grid,
  .workflow-steps li {
    grid-template-columns: 1fr;
  }

  .partner-connection-detail__head {
    display: grid;
    grid-template-columns: 1fr;
  }

  .hero-terminal .signal-lanes {
    grid-template-columns: 1fr;
  }

  .hero-terminal {
    padding: 18px;
    min-height: 0;
  }

  .hero-terminal .signal-header,
  .hero-terminal .signal-lanes div,
  .mini-chart div {
    grid-template-columns: 1fr;
  }

  .main,
  .sidebar,
  .variation-lab,
  .carrier-smoke-page {
    padding: 18px;
  }

  .topbar,
  .smoke-header,
  .variation-lab-header,
  .panel-header {
    flex-direction: column;
    align-items: stretch;
  }

  .actions,
  .recovery-start__actions,
  .utility-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .actions > *,
  .recovery-start__actions > *,
  .utility-actions > * {
    width: 100%;
  }

  .invoice-dropzone {
    grid-template-columns: 1fr;
  }

  .invoice-dropzone .compact-green-button {
    justify-self: stretch;
  }

  .invoice-refund-focus,
  .invoice-breakdown div {
    grid-template-columns: 1fr;
  }

  .invoice-history-card {
    grid-template-columns: 1fr;
  }

  .invoice-history-card em {
    white-space: normal;
  }

  .variation-preview-main,
  .variation-preview-shell aside {
    padding: 18px;
  }

  .approval-widget {
    min-height: 230px;
  }

  .metrics {
    gap: 8px;
  }

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

  .table-wrap {
    overflow-x: auto;
    max-width: calc(100vw - 36px);
  }

  table {
    min-width: 640px;
  }

  .carrier-smoke-card .detail-grid {
    grid-template-columns: 1fr;
  }

  .carrier-request-json,
  #smokeJson {
    max-width: calc(100vw - 36px);
  }
}

/* LateMate 2026 dark app shell */
.product-shell {
  background: var(--bg);
  color: var(--text);
}

.main {
  background: var(--bg);
}

.topbar,
.page-heading {
  background: transparent;
}

.metric,
.ops-panel,
.queue-panel,
.detail-panel,
.page-panel,
.connection-card,
.auth-card {
  background: var(--bg2);
  border-color: var(--border);
  box-shadow: none;
}

.page-heading h1,
.topbar h1,
.panel-header h2,
.ops-panel h2,
.page-panel h2,
.detail-panel h2,
.connection-card h3,
.metric strong,
.mini-facts dd,
.tracking {
  color: var(--text);
}

.eyebrow,
.metric span,
.metric small,
.mini-facts dt,
.page-heading p:not(.eyebrow),
.rich-list span,
.reason-block li,
.upload-list,
.muted-copy,
.detail-grid dt,
.detail-grid dd,
.panel-header select {
  color: var(--text2);
}

.eyebrow,
.metric span,
.metric small,
th,
.status-pill,
.mini-facts dt {
  font-family: var(--mono);
  letter-spacing: 1px;
}

.eyebrow {
  color: var(--orange);
  text-transform: uppercase;
}

.metric {
  border-radius: 10px;
  background: #141414;
}

.metric strong {
  font-size: 30px;
}

#openRecovery {
  color: var(--orange);
}

#claimableCount,
#creditedValue,
#creditedCount,
#creditPageCredited,
#invoiceLifetimePotential,
#invoiceLifetimeCredited,
#invoiceSummaryPotential,
#invoiceSummaryCredited {
  color: var(--green);
}

#deadlineRisk {
  color: var(--danger);
}

#blockedValue {
  color: var(--text2);
}

.primary-button {
  background: var(--orange);
  color: var(--bg);
  border: 1px solid var(--orange);
  border-radius: 2px;
  font-weight: 700;
}

.primary-button:hover {
  background: #e8870f;
  border-color: #e8870f;
}

.ghost-button,
.text-button,
.file-button {
  background: transparent;
  color: var(--text2);
  border: 1px solid var(--border2);
  border-radius: 7px;
}

.ghost-button:hover,
.text-button:hover,
.file-button:hover {
  color: var(--text);
  border-color: #555555;
}

.file-button.file-button-green {
  border-color: rgba(52, 211, 153, 0.85);
  color: var(--green);
}

.file-button.file-button-green:hover {
  border-color: var(--green);
  background: rgba(52, 211, 153, 0.2);
}

input,
select,
textarea,
.note-input,
.connection-form input,
.connection-form select {
  background: var(--bg3);
  border-color: var(--border2);
  color: var(--text);
}

input::placeholder,
textarea::placeholder {
  color: var(--text3);
}

table {
  background: var(--bg2);
}

th {
  color: var(--text3);
  border-bottom-color: var(--border);
  text-transform: uppercase;
}

td {
  color: var(--text2);
  border-bottom-color: var(--bg3);
}

td:first-child {
  color: #cccccc;
  font-weight: 600;
}

tbody tr:hover,
tbody tr.selected {
  background: var(--bg3);
}

.status-pill {
  border-radius: 10px;
  border: 1px solid transparent;
  font-size: 10px;
}

.status-eligible,
.status-likely_eligible {
  background: var(--green-dim);
  color: var(--green);
  border-color: rgba(52, 211, 153, 0.25);
}

.status-blocked,
.status-review,
.status-needs_review {
  background: var(--orange-dim);
  color: var(--orange);
  border-color: rgba(247, 148, 30, 0.25);
}

.status-expired,
.status-denied {
  background: rgba(224, 82, 82, 0.12);
  color: var(--danger);
  border-color: rgba(224, 82, 82, 0.25);
}

.security-detail,
.mini-chart div,
.rich-list li,
.ops-panel,
.page-panel,
.queue-panel,
.detail-panel,
.connection-card {
  border-color: var(--border);
}

/* LateMate standalone design-port shell. This keeps the existing app logic intact
   while matching the newer operational dashboard canon. */
.product-shell {
  --bg: #0b0d10;
  --bg2: #14171c;
  --bg3: #1a1e25;
  --border: #232830;
  --border2: #2d343e;
  --text: #e6e8ea;
  --text2: #dcdfe3;
  --text3: #c8ccd2;
  --btn-bg: #1a1e25;
  --btn-text: #e6e8ea;
  --btn-border: #3d4755;
  --btn-hover-bg: #252b33;
  --btn-hover-text: #ffffff;
  --btn-hover-border: #f7941e;
  --btn-active-bg: #3a2818;
  --btn-active-text: #ffb45a;
  --btn-active-border: #f7941e;
  --btn-disabled-bg: #14171c;
  --btn-disabled-text: #aeb5bf;
  --btn-disabled-border: #3d4755;
  --shadow: 0 10px 30px rgba(0, 0, 0, 0.24);
  grid-template-columns: 220px minmax(0, 1fr);
  background: var(--bg);
}

.product-shell .sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  gap: 0;
  padding: 16px 0;
  overflow-y: auto;
  background: #0e1114;
  border-right-color: var(--border);
}

.product-shell .brand-inline {
  align-items: center;
  gap: 10px;
  width: auto;
  padding: 4px 20px 20px;
}

.brand-orbit {
  display: grid;
  flex: 0 0 42px;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: #101318;
}

.brand-orbit svg {
  width: 32px;
  height: 32px;
}

.product-shell .brand-wordmark {
  font-size: 19px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.brand-subtitle {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 3px;
}

.product-shell .nav {
  gap: 0;
}

.product-shell .nav-group {
  margin: 16px 0 6px 20px;
  color: var(--text3);
  font-size: 10px;
  letter-spacing: 2px;
}

.product-shell .nav-item {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  min-height: 46px;
  padding: 8px 20px 8px 16px;
  border-left: 2px solid transparent;
  border-radius: 0;
  color: var(--text2);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
}

.product-shell .nav-item::before {
  content: none;
  display: none;
}

.product-shell .nav-item.active,
.product-shell .nav-item:hover {
  color: var(--text);
  background: transparent;
}

.product-shell .nav-item:hover {
  border-left-color: var(--green);
  color: var(--green);
}

.product-shell .nav-item:hover::before {
  content: none;
}

.product-shell .nav-item.active {
  border-left-color: var(--orange);
  color: var(--orange);
  background: linear-gradient(90deg, rgba(247, 148, 30, 0.1), transparent);
  font-weight: 600;
}

.product-shell .nav-item.active:hover {
  border-left-color: var(--orange);
  color: var(--orange);
  background: linear-gradient(90deg, rgba(247, 148, 30, 0.1), transparent);
}

.product-shell .nav-item.active::before {
  content: none;
}

.product-shell {
  grid-template-rows: auto minmax(0, 1fr);
}

.product-shell .global-ratemate {
  grid-row: 1;
  display: grid;
}

.product-shell .main {
  grid-column: 2;
  grid-row: 2;
  min-width: 0;
  padding: 0;
  overflow-x: hidden;
  background: var(--bg);
}

.app-dashboard-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 73px;
  padding: 16px 24px;
  border-bottom: 1px solid var(--border);
  background: rgba(11, 13, 16, 0.96);
  backdrop-filter: blur(18px);
}

.app-dashboard-header .breadcrumb {
  display: block;
  color: var(--text2);
  font-size: 12px;
  letter-spacing: 0;
}

.app-dashboard-header .breadcrumb strong {
  color: var(--text);
  font-weight: 800;
}

.live-sync {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  color: var(--text2);
  font-size: 11px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(52, 211, 153, 0.75);
}

.app-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.header-button,
.account-chip {
  min-height: 38px;
  border: 1.5px solid var(--border2);
  border-radius: 8px;
  background: transparent;
  color: var(--text2);
  cursor: pointer;
}

.header-button {
  padding: 0 18px;
  font-size: 12px;
  font-weight: 800;
}

.header-button--primary {
  border-color: var(--orange);
  background: rgba(247, 148, 30, 0.08);
  color: var(--orange);
}

.header-button--secondary {
  border-color: var(--green);
  background: rgba(52, 211, 153, 0.08);
  color: var(--green);
}

.header-button:hover,
.account-chip:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 5px 10px 5px 6px;
}

.account-chip strong,
.account-chip small {
  display: block;
  line-height: 1.1;
  text-align: left;
}

.account-chip strong {
  color: var(--text);
  font-size: 12px;
}

.account-chip small {
  color: var(--text3);
  font-size: 10px;
}

.account-avatar {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--bg3);
  color: var(--text);
  font-size: 10px;
  font-weight: 900;
}

.product-shell .app-view {
  gap: 20px;
  padding: 24px;
}

.product-shell .topbar,
.product-shell .page-heading {
  max-width: none;
  margin: 0;
  padding: 0;
}

.product-shell .topbar h1,
.product-shell .page-heading h1 {
  max-width: 980px;
  color: var(--text);
  font-size: clamp(19px, 2vw, 24px);
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: 0;
}

.product-shell .topbar p,
.product-shell .page-heading p,
.product-shell .muted-copy,
.product-shell .empty-copy,
.product-shell .recovery-start p,
.product-shell .invoice-dropzone p {
  color: var(--text2);
}

.product-shell .page-panel,
.product-shell .queue-panel,
.product-shell .detail-panel,
.product-shell .metric,
.product-shell .invoice-dropzone,
.product-shell .carrier-market-card,
.product-shell .credit-card,
.product-shell .rule-card,
.product-shell .client-card,
.product-shell .connection-card,
.product-shell .copilot-card,
.product-shell .smart-upload-panel,
.product-shell .audit-bundle-panel {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg2);
  box-shadow: none;
}

.product-shell .metric.highlight,
.product-shell .invoice-dropzone {
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.1), rgba(247, 148, 30, 0.04)),
    var(--bg2);
  border-color: rgba(52, 211, 153, 0.4);
}

.product-shell .recovery-start,
.product-shell .invoice-dropzone {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 20px;
  align-items: center;
  padding: 28px;
}

.product-shell .invoice-dropzone {
  border-style: dashed;
  cursor: pointer;
}

.product-shell .invoice-dropzone.dragging,
.product-shell .invoice-dropzone.is-dragging {
  border-color: var(--green);
  background:
    linear-gradient(135deg, rgba(52, 211, 153, 0.16), rgba(247, 148, 30, 0.06)),
    var(--bg2);
}

.product-shell .invoice-dropzone .muted-copy {
  grid-column: 1 / -1;
  font-size: 12px;
}

.product-shell .metrics,
.product-shell .audit-bundle-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.product-shell .metric {
  padding: 22px;
}

.product-shell .metric span,
.product-shell .audit-bundle-grid span,
.product-shell .eyebrow {
  color: var(--text3);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 2px;
  text-transform: uppercase;
}

.product-shell .metric strong,
.product-shell .audit-bundle-grid strong {
  color: var(--text);
  font-size: clamp(28px, 4vw, 42px);
  letter-spacing: 0;
}

.product-shell .metric.highlight strong,
.product-shell .green-text,
.product-shell .compact-green-button,
.product-shell .status-good {
  color: var(--green);
}

.product-shell .compact-green-button,
.product-shell .compact-ghost-button,
.product-shell .primary-button,
.product-shell .secondary-button,
.product-shell .ghost-button {
  min-height: 42px;
  border-radius: 8px;
  font-weight: 900;
  letter-spacing: 0;
}

.product-shell .compact-green-button,
.product-shell .primary-button {
  border-color: var(--green);
  background: rgba(52, 211, 153, 0.1);
  color: var(--green);
}

.product-shell .compact-ghost-button,
.product-shell .secondary-button,
.product-shell .ghost-button {
  border-color: var(--border2);
  background: transparent;
  color: var(--text2);
}

.product-shell .compact-green-button:hover,
.product-shell .primary-button:hover,
.product-shell .compact-ghost-button:hover,
.product-shell .secondary-button:hover,
.product-shell .ghost-button:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.product-shell .workspace-grid,
.product-shell .summary-grid,
.product-shell .connection-layout,
.product-shell .split-grid,
.product-shell .invoices-layout {
  gap: 16px;
}

.product-shell table,
.product-shell .table-card,
.product-shell .shipment-table-card {
  background: var(--bg2);
  border-color: var(--border);
}

.product-shell th {
  background: var(--bg3);
  color: var(--text3);
}

.product-shell td {
  border-bottom-color: var(--border);
}

.product-shell tbody tr:hover,
.product-shell tbody tr.selected {
  background: rgba(52, 211, 153, 0.05);
}

@media (max-width: 1100px) {
  .product-shell .metrics,
  .product-shell .audit-bundle-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .app-dashboard-header {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 760px) {
  .product-shell {
    display: block;
  }

  .product-shell .sidebar {
    position: static;
    height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .product-shell .nav {
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 0 16px 12px;
  }

  .product-shell .nav-group {
    display: none;
  }

  .product-shell .nav-item {
    flex: 0 0 auto;
    min-height: 38px;
    grid-template-columns: 1fr;
    padding: 8px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
  }

  .product-shell .nav-item::before {
    display: none;
  }

  .app-dashboard-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .account-chip {
    display: none;
  }

  .product-shell .app-view {
    padding: 18px;
  }

  .product-shell .recovery-start,
  .product-shell .invoice-dropzone {
    grid-template-columns: 1fr;
  }

  .product-shell .metrics,
  .product-shell .audit-bundle-grid {
    grid-template-columns: 1fr;
  }
}


/* LateMate exact app.html design canon */

:root {
  --bg: #0b0d10;
  --panel: #14171c;
  --panel-2: #1a1e25;
  --border: #232830;
  --text: #e6e8ea;
  --text-dim: #dcdfe3;
  --text-quiet: #c8ccd2;
  --accent: #f7941e;
  --accent-2: #34d399;
  --brand-late: #f7941e;
  --brand-mate: #34d399;
  --brand-late-deep: #d97810;
  --brand-mate-deep: #27a872;
  --danger: #ef4444;
  --warn: #f59e0b;
  --info: #60a5fa;
  --up: #34d399;
  --down: #ef4444;
}
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=IBM+Plex+Mono:wght@500;600&display=swap');
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { background: var(--bg); color: var(--text); font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", "Segoe UI", sans-serif; font-size: 13px; line-height: 1.4; -webkit-font-smoothing: antialiased; }
.mono { font-family: 'IBM Plex Mono', monospace; }

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

/* Sidebar */
.sidebar { background: #0e1114; border-right: 1px solid var(--border); padding: 16px 0; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { padding: 4px 20px 20px; }
.product-shell .brand {
  align-items: center;
  min-height: 74px;
}
.product-shell .brand-link {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: auto;
  max-width: 100%;
}
.product-shell .brand-logo-mark {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
}
.product-shell .brand-wordmark {
  display: flex;
  gap: 0;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: -0.3px;
}
.product-shell .brand-logo-light {
  display: none;
}
.product-shell .brand-link > .brand-mark,
.product-shell .brand-link > .brand-sub {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.brand-mark { font-size: 20px; font-weight: 800; letter-spacing: 1px; }
.brand-mark .a { color: var(--brand-late); }
.brand-mark .b { color: var(--brand-mate); }
.brand-sub { font-size: 10px; color: var(--text-quiet); letter-spacing: 3px; }

.sidebar-section { margin: 16px 0 6px 20px; font-size: 10px; letter-spacing: 2px; color: var(--text-quiet); text-transform: uppercase; font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 8px 20px 8px 16px; color: var(--text-dim); text-decoration: none; font-weight: 500; border-left: 2px solid transparent; font-size: 13px; letter-spacing: -0.1px; }
.nav a:hover { color: var(--brand-mate); border-left-color: var(--brand-mate); }
.nav a:hover .nav-icon { border-color: var(--brand-mate); color: var(--brand-mate); background: rgba(52,211,153,0.10); }
.nav a:hover .badge:not(.hot) { border-color: var(--brand-mate); color: var(--brand-mate); }
.nav a.active { color: var(--text); border-left-color: var(--brand-late); }
.nav a.active .nav-icon { border-color: var(--brand-late); color: var(--brand-late); background: rgba(247,148,30,0.10); }
.nav a.active:hover { color: var(--text); border-left-color: var(--brand-late); }
.nav a.active:hover .nav-icon { border-color: var(--brand-late); color: var(--brand-late); background: rgba(247,148,30,0.15); }
.nav-icon { width: 30px; height: 30px; border-radius: 50%; border: 1.5px solid var(--border); display: flex; align-items: center; justify-content: center; color: var(--text-dim); flex-shrink: 0; transition: all 0.15s; }
.nav-icon svg { width: 14px; height: 14px; }
.nav a .badge { margin-left: auto; background: var(--panel-2); color: var(--text); font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 10px; border: 1px solid var(--border); }
.nav a .badge.hot { background: var(--brand-late); color: white; border-color: var(--brand-late); }

.tenant-switcher { border-top: 1px solid var(--border); margin: 16px 0 0; padding: 12px 20px; }
.tenant-switcher .label { font-size: 10px; letter-spacing: 2px; color: var(--text-quiet); }
.tenant-switcher .name { font-weight: 700; margin-top: 4px; }
.tenant-switcher .role { color: var(--text-dim); font-size: 11px; }
.sidebar-signout { width: calc(100% - 40px); margin: 12px 20px 0; min-height: 42px; border: 1px solid var(--border); border-radius: 2px; background: transparent; color: var(--text-dim); font: 800 12px/1 'Space Grotesk', sans-serif; cursor: pointer; }
.sidebar-signout:hover { color: var(--brand-mate); border-color: var(--brand-mate); background: rgba(52,211,153,0.06); }

/* Main */
.main { padding: 0; overflow: hidden; }

/* Header */
.header { display: flex; align-items: center; justify-content: space-between; padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--bg); position: sticky; top: 0; z-index: 5; }
.header .breadcrumb { color: var(--text-dim); font-size: 12px; }
.header .breadcrumb strong { color: var(--text); margin-left: 4px; }
.header .live { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: var(--text-dim); margin-left: 12px; }
.header .live .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); box-shadow: 0 0 6px var(--accent-2); }
.header .actions { display: flex; align-items: center; gap: 16px; }
.header .btn { background: transparent; border: 1.5px solid var(--border); color: var(--text-dim); padding: 8px 18px; border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: 0.1px; cursor: pointer; transition: all 0.15s ease; font-family: 'Space Grotesk', sans-serif; }
.header .btn:hover { border-color: var(--brand-mate); color: var(--brand-mate); background: rgba(52,211,153,0.06); }
.header .btn.primary { background: rgba(247,148,30,0.06); color: var(--brand-late); border-color: var(--brand-late); font-weight: 700; padding: 8px 22px; }
.header .btn.primary:hover { background: rgba(247,148,30,0.14); color: var(--brand-late); border-color: var(--brand-late); }
.header .btn.secondary { background: rgba(52,211,153,0.06); color: var(--brand-mate); border-color: var(--brand-mate); font-weight: 700; padding: 8px 22px; }
.header .btn.secondary:hover { background: rgba(52,211,153,0.14); }
.header .avatar { width: 28px; height: 28px; background: var(--panel-2); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; }
.header .bell { position: relative; padding: 6px; }
.header .bell-count { position: absolute; top: 0; right: 0; background: var(--danger); color: white; font-size: 9px; font-weight: 700; padding: 1px 4px; border-radius: 8px; }

/* Content */
.content { padding: 24px; }

/* KPI Row */
.kpi-row { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 20px; }
.kpi { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; position: relative; overflow: hidden; }
.kpi-label { font-size: 10px; letter-spacing: 1.5px; color: var(--text-quiet); text-transform: uppercase; margin-bottom: 6px; }
.kpi-value { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.kpi-delta { display: flex; align-items: center; gap: 4px; margin-top: 4px; font-size: 11px; }
.kpi-delta.up { color: var(--up); }
.kpi-delta.down { color: var(--down); }
.kpi-delta.warn { color: var(--warn); }
.kpi-delta.neutral { color: var(--text-dim); }
.kpi-period { font-size: 10px; color: var(--text-quiet); position: absolute; top: 12px; right: 14px; }
.kpi-cta { margin-top: 6px; font-size: 11px; color: var(--accent); cursor: pointer; }

/* Filter bar */
.filter-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.filter-chip { background: var(--panel); border: 1px solid var(--border); color: var(--text-dim); padding: 5px 10px; border-radius: 14px; font-size: 11px; cursor: pointer; }
.filter-chip.active { background: var(--panel-2); color: var(--text); border-color: var(--accent); }
.filter-chip .count { color: var(--text-quiet); margin-left: 4px; }

/* Portfolio table */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; margin-bottom: 20px; overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.panel-title { font-weight: 700; font-size: 14px; letter-spacing: -0.2px; }
.panel-subtitle { color: var(--text-dim); font-size: 11px; margin-top: 2px; }
.panel-cta { display: flex; align-items: center; gap: 12px; }
.panel-link { color: var(--accent); font-size: 12px; cursor: pointer; text-decoration: none; }

table.portfolio { width: 100%; border-collapse: collapse; }
table.portfolio th { text-align: left; padding: 8px 12px; font-size: 10px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: var(--text-dim); background: var(--panel-2); }
table.portfolio th.right { text-align: right; }
table.portfolio td { padding: 10px 12px; border-top: 1px solid var(--border); color: var(--text); font-size: 12px; cursor: pointer; }
table.portfolio td.right { text-align: right; font-variant-numeric: tabular-nums; }
table.portfolio tbody tr:hover { background: rgba(249, 115, 22, 0.05); }
.carrier-cell { display: flex; align-items: center; gap: 10px; }
.carrier-icon { width: 28px; height: 28px; border-radius: 6px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: #000; }
.carrier-icon.ups { background: #7d4b1a; color: #fdb913; }
.carrier-icon.fedex { background: #4d148c; color: #ff6600; }
.carrier-icon.usps { background: #004b87; color: white; }
.carrier-icon.dhl { background: #ffcc00; color: #d40511; }
.carrier-icon.ontrac { background: #f97316; }
.carrier-icon.uniuni { background: #ec4899; color: white; }
.carrier-icon.amazon { background: #232f3e; color: #ff9900; }
.carrier-icon.veho { background: #0891b2; color: white; }
.carrier-icon.passport { background: #7c3aed; color: white; }
.carrier-icon.shipx { background: #059669; color: white; }
.carrier-icon.gls { background: #dc2626; color: white; }
.carrier-icon.ysp { background: #6b7280; color: white; }
.carrier-icon.xpo { background: #f59e0b; }
.carrier-icon.fdxfr { background: #4d148c; color: #ff6600; }
.carrier-icon.estes { background: #ef4444; color: white; }
.carrier-icon.rlcarriers { background: #b91c1c; color: white; }

.carrier-meta { display: flex; flex-direction: column; }
.carrier-name { color: var(--text); font-weight: 700; }
.carrier-modality { font-size: 10px; color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; }

.status { display: inline-flex; align-items: center; gap: 4px; font-size: 11px; padding: 2px 8px; border-radius: 10px; font-weight: 500; }
.status.healthy { background: rgba(52, 211, 153, 0.12); color: var(--up); }
.status.warn { background: rgba(245, 158, 11, 0.12); color: var(--warn); }
.status.danger { background: rgba(239, 68, 68, 0.12); color: var(--danger); }
.status.info { background: rgba(96, 165, 250, 0.12); color: var(--info); }

.spark { display: inline-block; height: 20px; vertical-align: middle; }

/* Two-col grid */
.two-col { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; margin-bottom: 20px; }
.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; margin-bottom: 20px; }

/* Chart mock */
.chart-body { padding: 16px; height: 240px; position: relative; }
.chart-legend { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.legend-item { font-size: 10px; color: var(--text-dim); display: flex; align-items: center; gap: 4px; }
.legend-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Pipeline */
.pipeline { padding: 8px 0; }
.pipeline-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; padding: 10px 16px; align-items: center; border-bottom: 1px solid var(--border); }
.pipeline-row:last-child { border-bottom: none; }
.pipeline-stage { font-weight: 500; }
.pipeline-count { color: var(--text-dim); font-size: 11px; }
.pipeline-amount { font-weight: 700; font-variant-numeric: tabular-nums; text-align: right; }
.pipeline-bar { grid-column: 1 / -1; height: 4px; background: var(--panel-2); border-radius: 2px; margin-top: 6px; overflow: hidden; }
.pipeline-fill { height: 100%; }

/* Leakage list */
.leakage-list { padding: 4px 0; }
.leakage-item { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.leakage-item:last-child { border-bottom: none; }
.leakage-rank { width: 22px; height: 22px; background: var(--panel-2); border-radius: 4px; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: var(--text-dim); }
.leakage-desc { font-size: 12px; }
.leakage-carrier { font-size: 10px; color: var(--text-quiet); margin-top: 2px; letter-spacing: 0.5px; text-transform: uppercase; }
.leakage-amount { font-weight: 700; font-variant-numeric: tabular-nums; }
.leakage-amount .pct { display: block; font-size: 10px; font-weight: 400; color: var(--text-dim); text-align: right; }

/* Alerts — modern Linear/Vercel/Ramp style */
.alerts-list { padding: 0; }
.alert-critical-banner { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; align-items: center; padding: 12px 16px; background: linear-gradient(90deg, rgba(239,68,68,0.12), rgba(239,68,68,0.02)); border-bottom: 1px solid rgba(239,68,68,0.25); }
.alert-critical-banner .cb-icon { width: 32px; height: 32px; border-radius: 50%; background: rgba(239,68,68,0.15); border: 1.5px solid var(--danger); display: flex; align-items: center; justify-content: center; color: var(--danger); font-weight: 700; }
.alert-critical-banner .cb-title { font-weight: 700; font-size: 13px; color: var(--text); }
.alert-critical-banner .cb-meta { font-size: 10px; color: var(--text-dim); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 2px; }
.alert-critical-banner .cb-impact { font-size: 11px; font-weight: 700; color: var(--danger); font-variant-numeric: tabular-nums; text-align: right; }
.alert-critical-banner .cb-impact .cb-impact-label { display: block; font-size: 9px; color: var(--text-dim); font-weight: 500; letter-spacing: 0.5px; text-transform: uppercase; }
.alert-critical-banner .cb-cta { padding: 6px 14px; border-radius: 6px; border: 1.5px solid var(--brand-late); background: rgba(247,148,30,0.06); color: var(--brand-late); font-weight: 700; font-size: 12px; cursor: pointer; white-space: nowrap; transition: all 0.15s; }
.alert-critical-banner .cb-cta:hover { background: rgba(247,148,30,0.14); }

.alert-group-header { padding: 10px 16px 6px; font-size: 10px; letter-spacing: 1.5px; color: var(--text-quiet); text-transform: uppercase; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.alert-group-header .agh-count { background: var(--panel-2); color: var(--text-dim); padding: 1px 7px; border-radius: 10px; font-size: 10px; letter-spacing: 0; text-transform: none; font-weight: 600; border: 1px solid var(--border); }

.alert-row { display: grid; grid-template-columns: auto 1fr auto auto; gap: 12px; padding: 10px 16px; align-items: center; border-bottom: 1px solid var(--border); cursor: pointer; transition: background 0.15s; position: relative; }
.alert-row:last-child { border-bottom: none; }
.alert-row:hover { background: rgba(52,211,153,0.04); }
.alert-row:hover .alert-snooze { opacity: 1; }

.alert-icon { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center; justify-content: center; border: 1.5px solid transparent; flex-shrink: 0; }
.alert-icon svg { width: 14px; height: 14px; }
.alert-icon.warn { background: rgba(245, 158, 11, 0.12); border-color: rgba(245,158,11,0.3); color: var(--warn); }
.alert-icon.info { background: rgba(96, 165, 250, 0.12); border-color: rgba(96,165,250,0.3); color: var(--info); }
.alert-icon.up { background: rgba(52, 211, 153, 0.12); border-color: rgba(52,211,153,0.3); color: var(--up); }
.alert-icon.danger { background: rgba(239, 68, 68, 0.12); border-color: rgba(239,68,68,0.3); color: var(--danger); }

.alert-body .alert-title { font-weight: 600; font-size: 12px; color: var(--text); letter-spacing: -0.1px; }
.alert-body .alert-meta { color: var(--text-dim); font-size: 10.5px; margin-top: 2px; display: flex; align-items: center; gap: 8px; }
.alert-body .alert-meta .amdot { width: 2px; height: 2px; border-radius: 50%; background: var(--text-quiet); }
.alert-body .alert-trend { color: var(--text-quiet); font-size: 10px; }

.alert-impact { text-align: right; font-variant-numeric: tabular-nums; }
.alert-impact-value { font-weight: 700; font-size: 13px; color: var(--text); }
.alert-impact-value.up { color: var(--up); }
.alert-impact-value.warn { color: var(--warn); }
.alert-impact-label { font-size: 9px; color: var(--text-quiet); letter-spacing: 0.5px; text-transform: uppercase; margin-top: 1px; }

.alert-actions { display: flex; align-items: center; gap: 6px; }
.alert-btn { padding: 5px 11px; border-radius: 6px; border: 1.5px solid; background: transparent; font-size: 11px; font-weight: 600; cursor: pointer; transition: all 0.15s; white-space: nowrap; font-family: 'Space Grotesk', sans-serif; }
.alert-btn.primary { border-color: var(--brand-late); color: var(--brand-late); background: rgba(247,148,30,0.06); }
.alert-btn.primary:hover { background: rgba(247,148,30,0.14); }
.alert-btn.secondary { border-color: var(--brand-mate); color: var(--brand-mate); background: rgba(52,211,153,0.06); }
.alert-btn.secondary:hover { background: rgba(52,211,153,0.14); }
.alert-snooze { padding: 5px 8px; border-radius: 6px; border: 1px solid var(--border); color: var(--text-quiet); font-size: 11px; cursor: pointer; opacity: 0.4; transition: all 0.15s; background: transparent; }
.alert-snooze:hover { color: var(--text-dim); border-color: var(--text-quiet); opacity: 1 !important; }

.alert-footer { display: flex; align-items: center; justify-content: space-between; padding: 10px 16px; border-top: 1px solid var(--border); background: var(--panel-2); }
.alert-footer .af-link { color: var(--text-dim); font-size: 11px; cursor: pointer; }
.alert-footer .af-link:hover { color: var(--brand-mate); }
.alert-footer .af-routing { font-size: 10px; color: var(--text-quiet); letter-spacing: 0.5px; text-transform: uppercase; }

/* Modality grouping */
.modality-header { padding: 8px 12px; background: var(--panel-2); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--text-quiet); font-weight: 600; }
.modality-header .modality-count { color: var(--text-dim); float: right; }

/* Recovery breakdown compact */
.recovery-bd { padding: 12px 16px; }
.recovery-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 4px 0; font-size: 12px; }
.recovery-label { color: var(--text-dim); }
.recovery-value { font-variant-numeric: tabular-nums; font-weight: 500; }

/* Utility */
.mono { font-variant-numeric: tabular-nums; }
.emoji { font-size: 12px; }

/* Drillable cards — every panel + KPI + mini-card gets drill state */
.kpi, .mini-card, .panel { cursor: pointer; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s; position: relative; }
.kpi:hover, .mini-card:hover { border-color: var(--brand-mate); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(52,211,153,0.08); }
.panel:hover { border-color: var(--brand-mate); }
.kpi::after, .mini-card::after { content: '→'; position: absolute; top: 12px; right: 14px; color: var(--text-quiet); font-size: 12px; opacity: 0; transition: opacity 0.15s, color 0.15s; }
.kpi:hover::after, .mini-card:hover::after { opacity: 1; color: var(--brand-mate); }
.panel-head { cursor: pointer; }
.panel-head:hover .panel-title { color: var(--brand-mate); }

/* Customize mode */
body.customize-mode .kpi, body.customize-mode .mini-card, body.customize-mode .panel { border-style: dashed; }
body.customize-mode .card-remove { display: flex; }
.card-remove { display: none; position: absolute; top: 8px; right: 8px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--danger); background: rgba(239,68,68,0.1); color: var(--danger); font-size: 14px; font-weight: 700; align-items: center; justify-content: center; cursor: pointer; z-index: 3; }
.card-remove:hover { background: var(--danger); color: white; }
body.customize-mode .add-card-tray { display: flex; }
.add-card-tray { display: none; margin: 20px 0; padding: 16px; background: linear-gradient(90deg, rgba(52,211,153,0.05), rgba(247,148,30,0.03)); border: 1.5px dashed var(--brand-mate); border-radius: 8px; flex-direction: column; gap: 12px; }
.add-card-tray-header { font-size: 11px; letter-spacing: 1.5px; color: var(--text-quiet); text-transform: uppercase; font-weight: 600; }
.add-card-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.add-card-chip { background: var(--panel); border: 1.5px solid var(--border); color: var(--text-dim); padding: 8px 14px; border-radius: 8px; font-size: 12px; font-weight: 500; cursor: pointer; transition: all 0.15s; display: flex; align-items: center; gap: 6px; }
.add-card-chip:hover { border-color: var(--brand-mate); color: var(--brand-mate); background: rgba(52,211,153,0.06); }
.add-card-chip::before { content: '+'; font-weight: 700; color: var(--brand-mate); }
.btn.active { border-color: var(--brand-mate); color: var(--brand-mate); background: rgba(52,211,153,0.14); }

/* Empty carrier row */
.empty-row td { color: var(--text-quiet); font-style: italic; }

/* Modality mini-cards (restored) */
.four-col { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; }
.mini-card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; position: relative; }
.mc-label { font-size: 10px; letter-spacing: 1.5px; color: var(--text-quiet); text-transform: uppercase; }
.mc-value { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.mc-meta { font-size: 11px; color: var(--text-dim); margin-top: 4px; }
.mc-bar { height: 4px; background: var(--panel-2); border-radius: 2px; margin-top: 10px; overflow: hidden; }
.mc-fill { height: 100%; background: var(--brand-late); }

/* Account / settings button */
.account-btn { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 1.5px solid var(--border); border-radius: 10px; padding: 3px 8px 3px 3px; cursor: pointer; transition: all 0.15s ease; font-family: 'Space Grotesk', sans-serif; }
.account-btn:hover { border-color: var(--brand-mate); background: rgba(52,211,153,0.06); }
.account-btn .avatar { width: 28px; height: 28px; }
.acct-meta { text-align: left; line-height: 1.15; }
.acct-name { font-size: 12px; font-weight: 600; color: var(--text); }
.acct-role { font-size: 10px; color: var(--text-quiet); }
.account-btn:hover .acct-role { color: var(--brand-mate); }
.acct-chev { width: 14px; height: 14px; color: var(--text-quiet); margin-left: 2px; }

.product-shell .nav-item {
  grid-template-columns: 30px minmax(0, 1fr) auto;
}

.product-shell .nav-item::before {
  content: none;
  display: none;
}

.product-shell .nav-item > span:not(.nav-icon):not(.badge) {
  min-width: 0;
}

.product-shell .nav-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border: 1.5px solid var(--border);
  border-radius: 50%;
  color: var(--text2);
  background: transparent;
  transition: color 0.15s, border-color 0.15s, background 0.15s;
}

.product-shell .nav-icon svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-shell .nav-item:hover .nav-icon {
  border-color: var(--green);
  color: var(--green);
  background: rgba(52, 211, 153, 0.1);
}

.product-shell .nav-item.active .nav-icon {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(247, 148, 30, 0.1);
}

.product-shell .global-ratemate {
  grid-template-columns: 112px minmax(0, 1fr);
  align-items: center;
}

.product-shell .global-ratemate__brand {
  border-color: rgba(52, 211, 153, 0.52);
  background: rgba(52, 211, 153, 0.1);
  color: var(--green);
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.product-shell .header-bell {
  display: inline-flex;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  min-height: 38px;
  padding: 0;
  border: 1.5px solid var(--border2);
  border-radius: 8px;
  background: transparent;
  color: var(--text2);
}

.product-shell .header-bell svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.product-shell .header-bell:hover {
  border-color: var(--green);
  color: var(--green);
  background: rgba(52, 211, 153, 0.06);
}

.product-shell .header-bell .bell-count {
  top: -5px;
  right: -5px;
  min-width: 17px;
  height: 17px;
  padding: 0 5px;
  border: 1px solid var(--bg);
  border-radius: 999px;
  background: var(--danger);
  color: #fff;
  font-size: 9px;
  line-height: 15px;
  text-align: center;
}

.product-shell .account-btn {
  min-height: 42px;
  padding: 4px 9px 4px 4px;
  border-radius: 10px;
}

.product-shell .account-btn .avatar {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--panel-2);
  color: var(--text);
  font-size: 10px;
  font-weight: 800;
}

.product-shell .page-heading {
  display: grid;
  gap: 6px;
  max-width: 920px;
}

.product-shell .page-heading .eyebrow {
  margin: 0;
  color: var(--orange);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.16em;
  line-height: 1.2;
  text-transform: uppercase;
}

.product-shell .page-heading h1,
.product-shell .topbar h1 {
  max-width: 760px;
  margin: 0;
  color: var(--text);
  font-size: clamp(19px, 2vw, 24px);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: 0;
}

.product-shell .page-heading p:not(.eyebrow),
.product-shell .topbar p:not(.eyebrow) {
  max-width: 880px;
  margin: 0;
  color: var(--text2);
  font-size: 13px;
  line-height: 1.4;
}

#productShell .page-heading h1 {
  font-size: clamp(19px, 2vw, 24px);
}

.invoice-wizard-drawer { position: fixed; inset: 0; z-index: 120; pointer-events: none; }
.invoice-wizard-drawer__scrim { position: absolute; inset: 0; background: rgba(0,0,0,0.42); opacity: 0; transition: opacity 180ms ease; }
.invoice-wizard-drawer__panel { position: absolute; top: 0; right: 0; width: min(560px, calc(100vw - 24px)); height: 100%; padding: 28px; overflow-y: auto; background: #070909; border-left: 1px solid var(--border); box-shadow: -24px 0 80px rgba(0,0,0,0.38); transform: translateX(100%); transition: transform 220ms ease; }
.invoice-wizard-drawer.is-open { pointer-events: auto; }
.invoice-wizard-drawer.is-open .invoice-wizard-drawer__scrim { opacity: 1; }
.invoice-wizard-drawer.is-open .invoice-wizard-drawer__panel { transform: translateX(0); }
.invoice-wizard-drawer__header { display: grid; grid-template-columns: 1fr auto; gap: 18px; align-items: start; padding-bottom: 20px; border-bottom: 1px solid var(--border); margin-bottom: 20px; }
.invoice-wizard-drawer__header h2 { margin: 6px 0 8px; font-size: clamp(30px, 4vw, 46px); line-height: 0.96; letter-spacing: 0; }
.invoice-wizard-drawer__header p:not(.eyebrow) { color: var(--text-dim); max-width: 46ch; }
.invoice-wizard-drawer .invoice-dropzone { margin: 0; }
.invoice-wizard-drawer__steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border: 1px solid var(--border); }
.invoice-wizard-drawer__steps div { min-height: 70px; padding: 14px; border-right: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.invoice-wizard-drawer__steps div:last-child { border-right: 0; }
.invoice-wizard-drawer__steps strong { color: var(--brand-mate); font-size: 13px; }
.invoice-wizard-drawer__steps span { color: var(--text-dim); font-size: 12px; font-weight: 800; }
.alerts-workspace-layout { display: grid; grid-template-columns: minmax(220px, 0.7fr) minmax(360px, 1.4fr) minmax(280px, 0.9fr); gap: 18px; }
.alerts-center-panel, .alerts-filter-panel, .alerts-detail-panel { min-height: 360px; }
.alerts-action-list .invoice-history-card em { color: var(--brand-mate); }

/* Settings */
.settings-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.settings-card { min-height: 250px; display: flex; flex-direction: column; gap: 16px; }
.settings-card .mini-facts,
.settings-card .rich-list { margin-top: 0; }
.settings-signout-button {
  width: fit-content;
  min-height: 42px;
  margin-top: auto;
  padding: 0 18px;
  border: 1.5px solid var(--danger);
  border-radius: 8px;
  background: rgba(239, 68, 68, 0.1);
  color: var(--danger);
  font: 900 12px/1 'Space Grotesk', sans-serif;
  cursor: pointer;
}
.settings-signout-button:hover { background: var(--danger); color: #fff; }
.theme-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  width: min(260px, 100%);
  min-height: 42px;
  overflow: hidden;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
}
.theme-segmented button {
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-dim);
  font: 900 12px/1 'Space Grotesk', sans-serif;
  cursor: pointer;
}
.theme-segmented button:last-child { border-right: 0; }
.theme-segmented button:hover,
.theme-segmented button.is-active {
  background: rgba(52, 211, 153, 0.14);
  color: var(--brand-mate);
}

/* ===== Theme toggle button ===== */
.theme-toggle { padding: 7px 10px !important; display: inline-flex; align-items: center; justify-content: center; }
/* ===== LIGHT THEME (client-selectable appearance) ===== */
html[data-theme="light"] { --bg:#f4f6f9; --panel:#ffffff; --panel-2:#eef1f5; --border:#e2e6ec; --text:#1a1d23; --mate-04:rgba(52,211,153,0.09); --mate-06:rgba(52,211,153,0.10); --late-06:rgba(247,148,30,0.09); }
html[data-theme="light"] body { background:#f4f6f9; color:#1a1d23; }
html[data-theme="light"] .sidebar { background:#ffffff; border-right-color:#e2e6ec; }
html[data-theme="light"] .header { background:#f4f6f9; }
html[data-theme="light"] .kpi:hover, html[data-theme="light"] .mini-card:hover { box-shadow:0 6px 16px rgba(52,211,153,0.16); }
html[data-theme="light"] .panel, html[data-theme="light"] .frame-box { box-shadow:0 1px 2px rgba(16,24,40,0.04); }
html[data-theme="light"] .nav a.active { background:rgba(247,148,30,0.06); }
html[data-theme="light"] .brand-mark .b, html[data-theme="light"] #brand .b { color:#27a872; }

/* ===== Light-mode legibility + logo + KPI-label fixes ===== */
html[data-theme="light"] { --text-dim:#2b313c; --text-quiet:#3a414d; }
html[data-theme="light"] .brand svg line, html[data-theme="light"] .ds-top svg line { stroke:#1a1d23; }
html[data-theme="light"] .brand svg circle[stroke="#1a1a1a"], html[data-theme="light"] .ds-top svg circle[stroke="#1a1a1a"] { stroke:#c9cfd8; }
html[data-theme="light"] .kpi, html[data-theme="light"] .mini-card, html[data-theme="light"] .stat { box-shadow:0 1px 3px rgba(16,24,40,0.06); }
html[data-theme="light"] .kpi.hero { border-color:rgba(247,148,30,0.4); }
html[data-theme="light"] .breadcrumb strong { color:#1a1d23; }
html[data-theme="light"] .kpi-value, html[data-theme="light"] .mc-value, html[data-theme="light"] .stat-value { color:#14171c; }
/* KPI period tag must not overlap wrapped labels */
.kpi-label { padding-right: 34px; }

/* KPI header as grid — label + period never overlap */
.kpi { display:grid; grid-template-columns:1fr auto; grid-template-areas:"label period" "value value" "delta delta"; align-items:start; column-gap:8px; }
.kpi-period { position:static; grid-area:period; margin-top:1px; }
.kpi-label { grid-area:label; padding-right:0; }
.kpi-value { grid-area:value; }
.kpi-delta { grid-area:delta; }
.kpi-cta { grid-area:delta; }


.dashboard-split-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(280px, 0.85fr);
  gap: 16px;
  margin-top: 16px;
}

.dashboard-leakage-list,
.recovery-breakdown-panel .recovery-breakdown-grid {
  margin-top: 14px;
}

.activation-start-here {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}

.activation-start-here summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 700;
}

.latest-imports-panel,
.recovery-ledger-panel,
.carrier-overrides-panel,
.carrier-management-panel {
  margin-bottom: 16px;
}

.carrier-management-panel .connection-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

@media (max-width: 920px) {
  .dashboard-split-row {
    grid-template-columns: 1fr;
  }
}
.latemate-canon-dashboard { display: block; }
.product-shell .app-dashboard-header.header { display: flex; }
.ai-suffix {
  margin-left: 4px;
  color: var(--text-quiet, var(--text3));
  font-family: var(--mono);
  font-size: 0.72em;
  font-weight: 700;
  letter-spacing: 0;
}
.product-shell .brand-wordmark .ai-suffix {
  align-self: end;
  margin-left: 3px;
  color: var(--text3);
  font-size: 10px;
}
.workspace-switcher-card {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: rgba(255,255,255,0.02);
}
.product-shell .nav-item .badge {
  justify-self: end;
  min-width: 18px;
  padding: 2px 6px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel-2, var(--bg3));
  color: var(--text);
  font-family: var(--mono);
  font-size: 10px;
}
.product-shell .nav-item .badge.hot {
  border-color: var(--brand-late);
  background: var(--brand-late);
  color: #0a0a0a;
}
.header-bell {
  display: inline-grid;
  place-items: center;
  width: 34px;
  min-height: 34px;
  padding: 0;
}
.button-link {
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}
.kpi-gradient {
  border-color: rgba(52, 211, 153, 0.38);
  background:
    linear-gradient(135deg, rgba(247,148,30,0.12), rgba(52,211,153,0.08)),
    var(--panel);
}
.dashboard-secondary-row {
  grid-template-columns: 1fr 3fr;
}
.dashboard-roi-card {
  border-color: rgba(52,211,153,0.42);
  background:
    linear-gradient(135deg, rgba(52,211,153,0.1), rgba(247,148,30,0.05)),
    var(--panel);
}
.dashboard-sample-banner,
.activation-checklist {
  margin-bottom: 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel, var(--bg2));
}
.dashboard-sample-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 10px 14px;
  color: var(--text-dim, var(--text2));
  font-size: 13px;
}
.dashboard-sample-banner[hidden],
.activation-checklist[hidden] {
  display: none !important;
}
.sample-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 20px;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: rgba(255,255,255,0.04);
  color: var(--text-quiet, var(--text3));
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0;
}
.dashboard-sample-banner .button-link {
  color: var(--brand-mate);
  font-weight: 800;
}
.dashboard-sample-banner .button-link:last-child {
  color: var(--text-quiet, var(--text3));
}
.activation-checklist {
  display: grid;
  gap: 14px;
  padding: 14px;
}
.activation-checklist.is-slim {
  gap: 10px;
  padding: 12px 14px;
}
.activation-checklist__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.activation-checklist__head h2 {
  margin: 2px 0 0;
  color: var(--text);
  font-size: 18px;
}
.activation-checklist.is-slim .activation-checklist__head h2 {
  font-size: 15px;
}
.activation-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}
.activation-checklist.is-slim .activation-steps {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.activation-step {
  display: grid;
  gap: 8px;
  min-height: 104px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(255,255,255,0.02);
}
.activation-checklist.is-slim .activation-step {
  grid-template-columns: auto 1fr auto;
  align-items: center;
  min-height: 42px;
  padding: 8px 10px;
}
.activation-step__status {
  color: var(--text-quiet, var(--text3));
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
}
.activation-step.is-done .activation-step__status {
  color: var(--brand-mate);
}
.activation-step strong {
  color: var(--text);
}
.activation-step p {
  margin: 0;
  color: var(--text-dim, var(--text2));
  font-size: 12px;
}
.activation-checklist.is-slim .activation-step p {
  display: none;
}
.activation-step .button-link {
  width: fit-content;
  color: var(--brand-late);
  font-size: 12px;
  font-weight: 800;
}
.sample-widget {
  position: relative;
}
.sample-widget > .sample-chip {
  justify-self: end;
  align-self: start;
}
.kpi.sample-widget > .sample-chip {
  position: absolute;
  top: 10px;
  right: 10px;
}
.kpi.sample-widget {
  position: relative;
  padding-top: max(16px, var(--sample-pad, 16px));
}
.mini-card.sample-widget > .sample-chip,
.metrics.sample-widget > .sample-chip,
.metric.sample-widget > .sample-chip,
.panel.sample-widget > .sample-chip,
.page-panel.sample-widget > .sample-chip,
.audit-bundle-panel.sample-widget > .sample-chip,
.queue-panel.sample-widget > .sample-chip,
.detail-panel.sample-widget > .sample-chip,
.data-card.sample-widget > .sample-chip,
.ops-panel.sample-widget > .sample-chip,
.invoice-history-card.sample-widget > .sample-chip {
  position: absolute;
  top: 10px;
  right: 10px;
}
.mini-card.sample-widget,
.metrics.sample-widget,
.metric.sample-widget,
.panel.sample-widget,
.page-panel.sample-widget,
.audit-bundle-panel.sample-widget,
.queue-panel.sample-widget,
.detail-panel.sample-widget,
.data-card.sample-widget,
.ops-panel.sample-widget,
.invoice-history-card.sample-widget {
  padding-top: max(16px, var(--sample-pad, 16px));
}
.carrier-portfolio-panel {
  overflow-x: auto;
}
.connection-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.connection-directory-panel,
.carrier-browse-panel {
  display: grid;
  gap: 14px;
}
.connection-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.connection-card-grid > .muted-copy {
  grid-column: 1 / -1;
}
.connection-setup-head {
  margin: -1px -1px 16px;
}
.carrier-browse-search {
  width: min(320px, 100%);
}
.carrier-browse-catalog {
  display: grid;
  gap: 12px;
}
.modality-section {
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: var(--panel, var(--bg2));
}
.modality-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--panel-2, var(--bg3));
}
.modality-section-title {
  color: var(--text);
  font-weight: 800;
}
.modality-section-count,
.modality-section-connected {
  color: var(--text-dim, var(--text2));
  font-size: 11px;
}
.modality-list {
  display: grid;
}
.carrier-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 12px;
  align-items: center;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
}
.carrier-row:last-child {
  border-bottom: 0;
}
.carrier-row:hover {
  background: rgba(52,211,153,0.04);
}
.carrier-row-icon {
  width: 28px;
  height: 28px;
}
.carrier-row-name {
  color: var(--text);
  font-weight: 700;
}
.carrier-row-modality {
  color: var(--text-quiet, var(--text3));
  font-size: 11px;
}
.carrier-row-badge {
  padding: 2px 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim, var(--text2));
  font-size: 10px;
}
.carrier-row-badge.gsr {
  border-color: rgba(52,211,153,0.35);
  color: var(--brand-mate);
}
.carrier-row-btn {
  min-height: 30px;
  padding: 0 12px;
  border: 1.5px solid var(--brand-late);
  border-radius: 8px;
  background: rgba(247,148,30,0.08);
  color: var(--brand-late);
  font-weight: 800;
  cursor: pointer;
}
.rail-group {
  display: grid;
  gap: 6px;
  margin-bottom: 18px;
}
.rail-title,
.dp-label {
  color: var(--text-quiet, var(--text3));
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.5px;
  text-transform: uppercase;
}
.rail-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  min-height: 34px;
  padding: 7px 10px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--text-dim, var(--text2));
  font: inherit;
  cursor: pointer;
}
.rail-item.active,
.rail-item:hover {
  border-color: rgba(247,148,30,0.3);
  background: rgba(247,148,30,0.08);
  color: var(--brand-late);
}
.sev-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 8px;
  border-radius: 50%;
}
.bulk-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  margin-bottom: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2, var(--bg3));
}
.bulk-bar .spacer {
  flex: 1;
}
.chk {
  width: 15px;
  height: 15px;
  border: 1.5px solid var(--border);
  border-radius: 4px;
}
.alerts-action-list {
  padding: 0;
  list-style: none;
}
.alerts-action-list .invoice-history-card {
  width: 100%;
  text-align: left;
}
.alerts-action-list .invoice-history-card em {
  color: var(--brand-mate);
}
.dp-section {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.dp-section:last-child {
  border-bottom: 0;
}
.dp-title {
  color: var(--text);
  font-weight: 800;
  font-size: 14px;
}
.dp-big {
  color: var(--brand-late);
  font-size: 24px;
  font-weight: 800;
}

@media (max-width: 760px) {
  .product-shell.app-shell {
    display: block;
    min-height: 100vh;
    padding-bottom: calc(78px + env(safe-area-inset-bottom));
  }

  .product-shell .sidebar {
    position: fixed;
    inset: auto 0 0 0;
    z-index: 60;
    display: flex;
    align-items: center;
    gap: 4px;
    width: auto;
    height: calc(72px + env(safe-area-inset-bottom));
    min-height: 0;
    padding: 8px 10px calc(8px + env(safe-area-inset-bottom));
    overflow-x: auto;
    overflow-y: hidden;
    border-right: 0;
    border-top: 1px solid var(--border);
    background: rgba(14, 17, 20, 0.97);
    backdrop-filter: blur(18px);
    -webkit-overflow-scrolling: touch;
  }

  .product-shell .brand,
  .product-shell .sidebar-section,
  .product-shell .tenant-switcher,
  .product-shell #signOutButton {
    display: none;
  }

  .product-shell .sidebar .nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 0 0 auto;
  }

  .product-shell .sidebar .nav a {
    flex: 0 0 64px;
    min-width: 64px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 4px 6px;
    border-left: 0;
    border-top: 2px solid transparent;
    border-radius: 10px;
    text-align: center;
    font-size: 10px;
    line-height: 1.05;
  }

  .product-shell .sidebar .nav a.active,
  .product-shell .sidebar .nav a:hover {
    border-left-color: transparent;
    border-top-color: var(--brand-late);
    background: rgba(247, 148, 30, 0.08);
  }

  .product-shell .nav-icon {
    width: 26px;
    height: 26px;
    margin: 0 auto;
  }

  .product-shell .nav-icon svg {
    width: 13px;
    height: 13px;
  }

  .product-shell .nav a .badge {
    position: absolute;
    top: 2px;
    right: 8px;
    margin-left: 0;
    min-width: 16px;
    padding: 1px 5px;
    font-size: 9px;
  }

  .product-shell .global-ratemate {
    display: grid;
  }

  .product-shell .main {
    width: 100%;
    max-width: 100vw;
    padding: 0;
    overflow: visible;
  }

  .kpi-row,
  .four-col,
  .dashboard-secondary-row,
  .two-col,
  .connection-summary-grid,
  .connection-card-grid,
  .alerts-workspace-layout {
    grid-template-columns: 1fr;
  }

  .product-shell #claimsView {
    display: block;
    width: 100%;
    max-width: 100vw;
    padding: 0;
    gap: 0;
    overflow-x: hidden;
  }

  .product-shell .latemate-canon-dashboard {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
  }

  .product-shell .header {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 12px;
    align-items: stretch;
  }

  .product-shell .header .live {
    display: flex;
    margin-left: 0;
    margin-top: 4px;
  }

  .product-shell .header .actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: stretch;
  }

  .product-shell .header .theme-toggle,
  .product-shell .header #customizeBtn,
  .product-shell .header .bell,
  .product-shell .header .account-btn {
    display: none;
  }

  .product-shell .header .btn {
    width: 100%;
    min-height: 42px;
    padding: 9px 10px;
    white-space: normal;
  }

  .latemate-canon-dashboard .content {
    width: 100%;
    max-width: 100vw;
    padding: 14px 12px 18px;
  }

  .latemate-canon-dashboard .content > * {
    min-width: 0;
    max-width: 100%;
  }

  .latemate-canon-dashboard .kpi-row,
  .latemate-canon-dashboard .four-col,
  .latemate-canon-dashboard .two-col,
  .settings-grid,
  .latemate-canon-dashboard .three-col,
  .latemate-canon-dashboard .four-col[style] {
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin-bottom: 12px;
  }

  .latemate-canon-dashboard .kpi,
  .latemate-canon-dashboard .mini-card,
  .latemate-canon-dashboard .panel {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    border-radius: 10px;
  }

  .latemate-canon-dashboard .kpi-value,
  .latemate-canon-dashboard .mc-value {
    font-size: 24px;
  }

  .latemate-canon-dashboard .filter-bar {
    gap: 6px;
    overflow-x: auto;
    padding: 2px 0 8px;
    margin-bottom: 10px;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .latemate-canon-dashboard .filter-bar::-webkit-scrollbar {
    display: none;
  }

  .latemate-canon-dashboard .filter-chip {
    flex: 0 0 auto;
    white-space: nowrap;
  }

  .latemate-canon-dashboard .panel-head {
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
    align-items: start;
  }

  .latemate-canon-dashboard .panel-cta {
    justify-content: flex-start;
  }

  .latemate-canon-dashboard .panel {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .latemate-canon-dashboard table.portfolio {
    min-width: 920px;
  }

  .latemate-canon-dashboard .alert-critical-banner,
  .latemate-canon-dashboard .alert-row {
    grid-template-columns: auto 1fr;
  }

  .latemate-canon-dashboard .alert-impact,
  .latemate-canon-dashboard .alert-actions,
  .latemate-canon-dashboard .alert-snooze {
    grid-column: 2;
    justify-self: start;
    text-align: left;
  }

  .latemate-canon-dashboard .leakage-item {
    grid-template-columns: auto 1fr;
  }

  .latemate-canon-dashboard .leakage-amount {
    grid-column: 2;
    justify-self: start;
  }

  .latemate-canon-dashboard .chart-body {
    min-width: 620px;
  }
}
/* ===== Wizard drawer (from Claude Design connections.html) ===== */
.wizard-overlay { display: none; position: fixed; inset: 0; z-index: 100; background: rgba(11,13,16,0.5); backdrop-filter: blur(6px); }
.wizard-overlay.open { display: block; animation: fadeIn 0.2s; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.wizard-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: 560px; max-width: 100vw; background: var(--panel); border-left: 1.5px solid var(--brand-late); z-index: 101; transform: translateX(100%); transition: transform 0.3s ease; overflow-y: auto; display: flex; flex-direction: column; }
.wizard-overlay.open + .wizard-drawer, .wizard-drawer.open { transform: none; }

.wizard-head { padding: 20px 24px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; }
.wizard-head-left { display: flex; align-items: center; gap: 12px; }
.wizard-title { font-family: 'Space Grotesk', sans-serif; font-weight: 700; font-size: 16px; letter-spacing: -0.2px; }
.wizard-sub { font-size: 11px; color: var(--text-dim); margin-top: 2px; }
.wizard-close { background: transparent; border: none; color: var(--text-quiet); font-size: 24px; cursor: pointer; padding: 4px 8px; line-height: 1; }
.wizard-close:hover { color: var(--text); }

.wizard-stepper { display: flex; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--border); background: var(--panel-2); gap: 4px; }
.step { display: flex; flex-direction: column; align-items: center; flex: 1; position: relative; }
.step-num { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--border); background: var(--panel); display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 11px; color: var(--text-quiet); z-index: 2; transition: all 0.15s; }
.step.active .step-num { border-color: var(--brand-late); background: rgba(247,148,30,0.15); color: var(--brand-late); }
.step.done .step-num { border-color: var(--brand-mate); background: var(--brand-mate); color: #000; }
.step-label { font-size: 10px; letter-spacing: 0.5px; text-transform: uppercase; color: var(--text-quiet); margin-top: 6px; font-weight: 600; }
.step.active .step-label, .step.done .step-label { color: var(--text); }
.step-line { position: absolute; top: 13px; left: 50%; width: 100%; height: 1.5px; background: var(--border); z-index: 1; }
.step.done .step-line { background: var(--brand-mate); }

.wizard-body { padding: 24px; flex: 1; }
.wizard-footer { padding: 16px 24px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; background: var(--panel-2); }
.wizard-footer button { font-family: 'Space Grotesk', sans-serif; }
.wizard-footer [data-wizard-back] { color: var(--text-dim); background: transparent; border: none; font-size: 12px; font-weight: 500; cursor: pointer; padding: 8px 14px; }
.wizard-footer [data-wizard-back]:hover { color: var(--text); }
.wizard-footer [data-wizard-back]:disabled { opacity: 0.45; cursor: not-allowed; }
.wizard-footer [data-wizard-next] { padding: 10px 22px; border-radius: 8px; border: 1.5px solid var(--brand-late); background: rgba(247,148,30,0.08); color: var(--brand-late); font-weight: 700; font-size: 13px; cursor: pointer; transition: all 0.15s; }
.wizard-footer [data-wizard-next]:hover { background: rgba(247,148,30,0.16); }
.wizard-card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 14px 16px; position: relative; text-align: left; color: var(--text); cursor: pointer; transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s, background 0.15s; min-height: 112px; }
.wizard-chooser-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.wizard-card:hover { border-color: var(--brand-mate); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(52,211,153,0.08); background: rgba(52,211,153,0.05); }
.wizard-card-icon { display: block; font-size: 20px; margin-bottom: 10px; }
.wizard-card-title { display: block; font-weight: 700; font-size: 14px; margin-bottom: 4px; }
.wizard-card-sub { display: block; color: var(--text-dim); font-size: 12px; line-height: 1.35; }
.recent-activity { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 14px; }
.recent-activity-label { color: var(--text-quiet); font-size: 10px; font-weight: 700; letter-spacing: 0.8px; margin-bottom: 8px; }
.recent-activity-list { display: flex; gap: 8px; flex-wrap: wrap; }
.recent-activity-item { border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; color: var(--text); text-decoration: none; background: var(--panel); min-width: 180px; }
.recent-activity-item:hover { border-color: var(--brand-mate); background: rgba(52,211,153,0.05); }
.recent-activity-item strong, .recent-activity-item span { display: block; }
.recent-activity-item span { color: var(--text-dim); font-size: 11px; margin-top: 3px; }
.wizard-facts { display: grid; gap: 10px; margin: 0 0 16px; }
.wizard-facts div { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: var(--panel-2); }
.wizard-facts dt { color: var(--text-quiet); font-size: 10px; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 4px; }
.wizard-facts dd { margin: 0; font-weight: 700; }
.wizard-candidate-list { display: grid; gap: 8px; margin: 12px 0; }
.wizard-candidate-list label { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: var(--panel-2); }
.wizard-candidate-list strong, .wizard-candidate-list em { display: block; }
.wizard-candidate-list em { color: var(--text-dim); font-size: 11px; font-style: normal; margin-top: 3px; }
.wizard-packet-preview { overflow: auto; max-height: 180px; border: 1px solid var(--border); border-radius: 8px; padding: 12px; background: var(--bg); color: var(--text-dim); }
.wizard-drop-zone { border: 1.5px dashed var(--border); border-radius: 8px; padding: 18px; margin-bottom: 12px; background: var(--panel-2); cursor: pointer; }
.wizard-drop-zone strong, .wizard-drop-zone span { display: block; }
.wizard-drop-zone span { color: var(--text-dim); font-size: 12px; margin-top: 5px; }
@media (max-width: 900px) {
  .wizard-chooser-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .wizard-chooser-grid { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .wizard-chooser__head,
  .route-wizard__head {
    display: grid;
  }

  .wizard-chooser-grid,
  .recent-activity-list,
  .route-wizard-progress,
  .wizard-stat-grid,
  .wizard-lever-form,
  .wizard-carrier-grid,
  .wizard-candidate-pick {
    grid-template-columns: 1fr;
  }

  .wizard-card,
  .recent-activity-card,
  .route-wizard__step {
    min-height: 0;
  }
}

.billing-kpi-grid {
  margin-bottom: 16px;
}

.billing-health-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 16px;
}

.billing-freshness-stamp {
  margin: 0 0 12px;
}

.billing-empty-panel {
  display: grid;
  gap: 12px;
  max-width: 560px;
  justify-items: start;
}

.billing-empty-panel #billingConnectCta {
  justify-self: start;
  padding: 11px 22px;
  margin-top: 4px;
}

.billing-module-panels {
  margin-bottom: 16px;
}

.billing-schedule-form,
.billing-config-actions {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.billing-operator-summary {
  display: grid;
  gap: 6px;
  margin: 0 0 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--panel) 92%, var(--accent) 8%);
}

.billing-operator-summary p {
  margin: 0;
  color: var(--text);
}

.billing-sample-banner {
  margin: 0 0 14px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid color-mix(in srgb, var(--warn) 55%, transparent);
  background: color-mix(in srgb, var(--warn) 12%, var(--panel));
  color: var(--text);
}

.billing-config-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0;
}

.billing-config-tabs .btn.active {
  border-color: var(--accent);
  color: var(--accent);
}

.billing-config-section {
  display: grid;
  gap: 12px;
}

.billing-grid-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px;
  align-items: end;
}

.billing-fieldset {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  display: grid;
  gap: 8px;
}

.billing-fieldset legend {
  padding: 0 4px;
  color: var(--text);
}

.billing-local-preview,
.billing-upload-preview {
  margin: 0;
}

.billing-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}

.billing-fee-accordion {
  display: grid;
  gap: 8px;
}

.billing-accordion-item {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px 10px;
}

.billing-fee-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.billing-monday-form {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.billing-confirm-dialog {
  border: none;
  padding: 0;
  background: transparent;
  max-width: min(92vw, 480px);
}

.billing-confirm-dialog[hidden] {
  display: none;
}

.billing-confirm-card {
  margin: 0;
  padding: 18px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

.field-invalid {
  border-color: var(--danger) !important;
}

.field-error {
  display: block;
  color: var(--danger);
  font-size: 0.85rem;
  margin-top: 4px;
}

#billingOsView .page-heading h1,
#billingOsRunView .page-heading h1 {
  color: var(--text);
}

#billingOsView .page-heading .eyebrow,
#billingOsRunView .page-heading .eyebrow {
  color: var(--muted);
}

.billing-schedule-form label,
.billing-monday-form label {
  display: grid;
  gap: 4px;
  color: var(--text);
}

.link-button {
  background: none;
  border: none;
  color: var(--accent);
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

@media (max-width: 768px) {
  .billing-grid-filters,
  .billing-schedule-form,
  .billing-config-actions {
    grid-template-columns: 1fr;
  }
}

.platform-connections-panel {
  margin-top: 20px;
}

.partner-connection-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 16px;
}

@media (max-width: 960px) {
  .partner-connection-workspace {
    grid-template-columns: 1fr;
  }
}

/* ======================================================================
   Billing OS flagship surfaces — ADDITIVE classes only (Canon-Guard §2:
   prod tokens/buttons untouched; everything below is bflag-prefixed).
   ====================================================================== */

.bflag-askbar { margin-bottom: 14px; }
.bflag-askbar-button { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 14px; background: var(--bg2); border: 1px solid var(--border); border-radius: 6px; color: var(--text2); cursor: pointer; font-family: var(--sans); font-size: 13px; text-align: left; }
.bflag-askbar-button:hover { border-color: var(--border2); }
.bflag-askbar-brand { font-size: 12px; letter-spacing: 0.08em; color: var(--text); }
.bflag-askbar-brand b { color: var(--orange); }

.bflag-portfolio-head { align-items: flex-start; }
.bflag-portfolio-actions { align-items: center; }
.bflag-pf-metrics { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-top: 12px; }
.bflag-pf-m { padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; }
.bflag-pf-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text2); }
.bflag-pf-value { font-size: 22px; font-family: var(--mono); margin-top: 4px; color: var(--text); }
.bflag-pf-sub { font-size: 11px; color: var(--text2); margin-top: 3px; }
.bflag-green { color: var(--green); }
.bflag-red { color: var(--danger); }
.bflag-amber { color: var(--orange); }

.bflag-worklist { display: flex; flex-direction: column; gap: 8px; }
.bflag-work-item { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; }
.bflag-sev { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.bflag-sev--critical { background: var(--danger); }
.bflag-sev--warning { background: var(--orange); }
.bflag-sev--info { background: #8a919c; }
.bflag-wi-main { flex: 1; min-width: 0; }
.bflag-wi-title { font-size: 13px; color: var(--text); }
.bflag-wi-body { font-size: 12px; color: var(--text2); margin-top: 2px; }
.bflag-wi-rule { font-size: 11px; color: var(--text2); border: 1px solid var(--border2); border-radius: 4px; padding: 2px 7px; flex: none; }

.bflag-config-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.bflag-config-card { padding: 12px 14px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; }
.bflag-config-card h4 { margin: 0; font-size: 13px; color: var(--text); }
.bflag-config-card p { margin: 4px 0 8px; font-size: 12px; color: var(--text2); }

.bflag-next-head { margin-top: 16px; }
.bflag-next-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; }
.bflag-next-card { padding: 14px 16px; border: 1px dashed var(--border2); border-radius: 6px; background: transparent; position: relative; pointer-events: none; user-select: none; }
.bflag-next-card h4 { margin: 6px 0 6px; font-size: 14px; color: var(--text2); }
.bflag-next-card p { margin: 0; font-size: 12px; color: var(--text3); line-height: 1.55; }
.bflag-soon { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange); border: 1px solid var(--orange); border-radius: 4px; padding: 2px 6px; }

.bflag-orange-outline { border-color: var(--btn-active-border) !important; color: var(--btn-active-text) !important; background: var(--btn-active-bg) !important; }
.bflag-green-outline { border-color: var(--green) !important; color: var(--green) !important; background: var(--green-dim) !important; }
.bflag-topbar-green { border-color: var(--green) !important; color: #0b0d10 !important; background: var(--green) !important; }

.bflag-tip { position: relative; display: inline-flex; }
.bflag-tip-btn { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border2); background: var(--bg3); color: var(--text2); font-size: 11px; cursor: pointer; line-height: 1; }
.bflag-tip-pop { display: none; position: absolute; top: 24px; right: 0; z-index: 30; width: 240px; padding: 10px 12px; background: var(--bg2); border: 1px solid var(--border2); border-radius: 6px; font-size: 12px; color: var(--text2); box-shadow: var(--shadow); }
.bflag-tip:hover .bflag-tip-pop, .bflag-tip:focus-within .bflag-tip-pop { display: block; }
.bflag-tip[data-tip-dismissed] { display: none; }
.bflag-tip-got { display: block; margin-top: 8px; background: none; border: none; color: var(--green); font-size: 12px; cursor: pointer; padding: 0; }

.bflag-client-head { display: flex; align-items: center; gap: 14px; margin-top: 10px; }
.bflag-big-ini { width: 46px; height: 46px; border-radius: 8px; background: var(--bg3); border: 1px solid var(--border2); display: inline-flex; align-items: center; justify-content: center; font-size: 15px; color: var(--orange); flex: none; }
.bflag-ini-sm { font-size: 11px; }
.bflag-badges { margin-left: auto; display: flex; gap: 6px; }

.bflag-ledger-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.bflag-ledger-toolbar .note-input { max-width: 240px; }
.bflag-toolbar-spacer { flex: 1; }
.bflag-neg-row td { background: rgba(224, 82, 82, 0.06); }
.bflag-warning-badge { font-size: 10px; color: var(--orange); border: 1px solid var(--orange); border-radius: 4px; padding: 1px 5px; margin-left: 6px; }

.bflag-scheda-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.bflag-matrix-block { margin-bottom: 18px; }
.bflag-matrix-block h4 { margin: 0 0 6px; font-size: 13px; color: var(--text); }
.bflag-matrix-block .muted-copy { margin-top: 4px; }

.bflag-waterfall { display: flex; flex-direction: column; font-size: 13px; }
.bflag-wf-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); }
.bflag-wf-row:last-child { border-bottom: none; font-weight: 700; }
.bflag-wf-row .mono, .bflag-wf-amount { font-family: var(--mono); }

.bflag-scope-select { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text2); min-width: 220px; }
.bflag-add-rule { display: flex; gap: 8px; flex-wrap: wrap; margin: 10px 0; }
.bflag-add-rule .note-input { max-width: 180px; }
.bflag-draft-preview { padding: 12px 14px; border: 1px solid var(--green); border-radius: 6px; background: var(--green-dim); margin-bottom: 12px; font-size: 13px; }
.bflag-field-errors { padding: 10px 12px; border: 1px solid var(--danger); border-radius: 6px; color: var(--danger); font-size: 12px; margin-bottom: 10px; }
.bflag-inline-error { color: var(--danger); font-size: 12px; }
.bflag-error-panel { border-color: var(--danger); }

.bflag-confirm-steps { margin: 10px 0; padding-left: 20px; font-size: 12.5px; color: var(--text2); display: flex; flex-direction: column; gap: 6px; }
.bflag-run-window { display: flex; gap: 12px; margin: 10px 0; font-size: 12px; color: var(--text2); }
.bflag-run-window label { display: flex; flex-direction: column; gap: 4px; }

.bflag-profile-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.bflag-profile-grid .field-label { display: block; margin-bottom: 10px; font-size: 12px; color: var(--text2); }
.bflag-field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; }
.bflag-connection-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; }
.bflag-connection-card { padding: 14px 16px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; }
.bflag-connection-card h3 { margin: 0; font-size: 14px; color: var(--text); display: flex; align-items: center; gap: 8px; }
.bflag-connection-card .muted-copy { margin: 6px 0 10px; }
.bflag-role-badge { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--green); border: 1px solid var(--green); border-radius: 4px; padding: 1px 6px; }
.bflag-carrier-summary { display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.bflag-carrier-row { display: flex; align-items: center; gap: 10px; padding: 8px 12px; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; }
.bflag-carrier-row .bflag-toolbar-spacer { flex: 1; }
.bflag-schedule-form { display: block; }

.bflag-drawer-scrim { position: fixed; inset: 0; background: rgba(0, 0, 0, 0.55); z-index: 90; }
.bflag-rate-drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: var(--bg2); border-left: 1px solid var(--border2); z-index: 95; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.bflag-rd-head { display: flex; align-items: center; gap: 8px; padding: 14px 16px; border-bottom: 1px solid var(--border); }
.bflag-rd-head .btn { margin-left: auto; }
.bflag-rd-brand { font-size: 13px; letter-spacing: 0.08em; color: var(--text); }
.bflag-rd-brand b { color: var(--orange); }
.bflag-rd-body { flex: 1; overflow-y: auto; padding: 16px; }
.bflag-rd-body .bflag-next-card { pointer-events: none; }
.bflag-rd-input { display: flex; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--border); }
.bflag-rd-input input { flex: 1; background: var(--bg3); border: 1px solid var(--border); border-radius: 6px; color: var(--text2); padding: 8px 10px; font-size: 13px; }

/* REV9 P1 shell: canon IA, billing tabs, bell and global RateMate drawer. */
.product-shell { grid-template-rows: minmax(0, 1fr); }
.product-shell .sidebar, .product-shell .main { grid-row: 1; }
.product-shell .app-dashboard-header.header {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) auto;
  gap: 14px;
  min-height: 68px;
  padding: 12px 22px;
}
.product-shell .app-dashboard-header .shell-context { grid-column: 1 / -1; grid-row: 2; }
.product-shell .app-dashboard-header .actions { grid-column: 2; grid-row: 1; flex-wrap: nowrap; gap: 10px; }
.product-shell .app-dashboard-header .theme-toggle { min-width: 72px; white-space: nowrap; }
.product-shell .app-dashboard-header .global-ratemate {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  min-width: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.product-shell .app-dashboard-header .global-ratemate__brand {
  min-height: 36px;
  padding-inline: 12px;
  border-radius: 7px 0 0 7px;
}
.product-shell .app-dashboard-header .global-ratemate__form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  min-width: 0;
}
.product-shell .app-dashboard-header .global-ratemate__form input {
  min-width: 0;
  min-height: 36px;
  border-radius: 0 7px 7px 0;
}
.product-shell .app-dashboard-header .global-ratemate__form button { min-height: 36px; }
.shell-context { display: flex; flex-direction: column; gap: 4px; white-space: nowrap; }
.header-alerts { position: relative; }
.header-alerts-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 80;
  width: min(360px, calc(100vw - 28px));
  padding: 12px;
  border: 1px solid var(--border2);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 18px 50px rgba(0, 0, 0, .36);
}
.header-alerts-title {
  margin-bottom: 9px;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.header-alerts-list { display: grid; gap: 7px; max-height: min(440px, 62vh); margin-bottom: 10px; overflow-y: auto; overscroll-behavior: contain; }
.header-alerts-list button,
.header-alerts-list > div {
  display: grid;
  gap: 3px;
  width: 100%;
  padding: 9px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  text-align: left;
  cursor: pointer;
}
.header-alerts-list button span,
.header-alerts-list > div span { color: var(--text-dim); font-size: 11px; }
.header-alerts-list > div { cursor: default; }
.header-alerts-list .bflag-bell-row {
  display: flex;
  align-items: center;
  gap: 8px;
}
.bflag-bell-badge {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid var(--border2);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 700;
  white-space: nowrap;
}
.bflag-bell-badge--neg { color: var(--danger); border-color: rgba(239, 68, 68, .4); background: rgba(239, 68, 68, .08); }
.bflag-bell-badge--warn { color: var(--warn); border-color: rgba(245, 158, 11, .4); background: rgba(245, 158, 11, .08); }
.bflag-bell-badge--unm { color: var(--info); border-color: rgba(96, 165, 250, .4); background: rgba(96, 165, 250, .08); }
.header-alerts-list .bflag-bell-detail { min-width: 0; color: var(--text-dim); font-size: 11px; }
.header-alerts-actions { display: flex; justify-content: flex-end; gap: 8px; }
.header-alerts-actions .btn { width: auto; }
.billing-mega-tabs {
  display: flex;
  gap: 4px;
  margin: 2px 0 14px;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}
.billing-mega-tab {
  flex: 0 0 auto;
  margin-bottom: -1px;
  padding: 10px 16px;
  border: 0;
  border-bottom: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font: 700 13px/1.2 'Space Grotesk', sans-serif;
  cursor: pointer;
}
.billing-mega-tab:hover, .billing-mega-tab.active { color: var(--text); }
.billing-mega-tab.active { border-bottom-color: var(--accent); }
.billing-mega-tab span {
  margin-left: 5px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(247, 148, 30, .16);
  color: var(--accent);
  font-size: 9px;
  letter-spacing: .07em;
}
.billing-mega-tab:disabled { cursor: not-allowed; opacity: .52; filter: saturate(.2); background: var(--panel-2); color: var(--text-quiet); pointer-events: none; }
.billing-tab-status { margin: -6px 0 14px; color: var(--text-quiet); font-size: 11px; }
.bflag-canon-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}
.bflag-canon-kpi {
  min-width: 0;
  padding: 15px 16px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--panel);
}
.bflag-canon-kpi--good { border-color: rgba(52, 211, 153, .3); }
.bflag-canon-kpi--pending { border-color: rgba(245, 158, 11, .4); }
.bflag-canon-kpi-label { margin-bottom: 9px; color: var(--text-quiet); font-size: 10px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; }
.bflag-canon-kpi-value { color: var(--text); font: 600 26px/1.15 var(--mono); letter-spacing: -.5px; overflow-wrap: anywhere; }
.bflag-canon-kpi-meta { margin-top: 7px; color: var(--text-dim); font-size: 11px; line-height: 1.4; }
.bflag-canon-panel-head { gap: 12px; }
.bflag-canon-panel-head h2 { margin: 0; font-size: 14px; }
.bflag-canon-panel-sub { margin-left: 8px; color: var(--text-quiet); font-size: 12px; font-weight: 400; }
.bflag-canon-panel-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.bflag-canon-panel-actions .btn {
  padding: 8px 14px;
  border: 1px solid var(--border2);
  border-radius: 8px;
  background: var(--panel-2);
  color: var(--text);
  font: 600 12px/1.2 'Space Grotesk', sans-serif;
  cursor: pointer;
}
.bflag-canon-panel-actions .btn:hover { border-color: var(--accent); }
.bflag-canon-panel-actions .btn.primary { border-color: var(--accent); background: var(--accent); color: #0b0d10; }
html[data-theme="light"] .bflag-canon-panel-actions .btn.primary { color: #fff; }
.bflag-canon-clients table td.right { font-family: var(--mono); }
.bflag-phase-pending { color: var(--warn); font-family: var(--sans); font-size: 10px; font-weight: 700; letter-spacing: .02em; }
.bflag-canon-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; color: var(--text-quiet); font-size: 11px; line-height: 1.5; }
.bflag-canon-legend b { color: var(--text-dim); }
.bflag-rate-drawer { background: var(--panel); transition: transform 180ms ease; }
.ratemate-drawer-chips { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 14px; }
.ratemate-drawer-chips button {
  padding: 7px 10px;
  border: 1px solid var(--border2);
  border-radius: 999px;
  background: var(--panel-2);
  color: var(--text-dim);
  font: 600 11px/1.2 'Space Grotesk', sans-serif;
  cursor: pointer;
}
.ratemate-drawer-chips button:hover { border-color: var(--accent); color: var(--text); }
.ratemate-drawer-transcript { min-height: 240px; max-height: none; }
html[data-theme="light"] .header-alerts-panel,
html[data-theme="light"] .bflag-rate-drawer { box-shadow: 0 18px 45px rgba(30, 40, 60, .16); }
html[data-theme="light"] .product-shell {
  --bg: #e3e5ea;
  --bg2: #eef0f3;
  --bg3: #e5e7ec;
  --border: #cfd5de;
  --border2: #bcc4cf;
  --text: #0e121a;
  --text2: #2b313c;
  --text3: #3a414d;
  --btn-bg: #eef1f5;
  --btn-text: #0e121a;
  --btn-border: #8b95a4;
  --btn-hover-bg: #e2e6ec;
  --btn-hover-text: #0e121a;
  --btn-hover-border: #9a4b00;
  --btn-active-bg: #fff1dc;
  --btn-active-text: #7a3900;
  --btn-active-border: #9a4b00;
  --btn-disabled-bg: #e2e6ec;
  --btn-disabled-text: #5b636f;
  --btn-disabled-border: #aab2bd;
  --shadow: 0 14px 40px rgba(30, 40, 60, .13);
}

@media (max-width: 1250px) {
  .product-shell .app-dashboard-header { grid-template-columns: minmax(260px, 1fr) auto; }
  .product-shell .app-dashboard-header .shell-context { display: none; }
}

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

@media (max-width: 820px) {
  .product-shell .app-dashboard-header.header {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 14px;
  }
  .product-shell .app-dashboard-header .global-ratemate {
    grid-column: auto;
    grid-row: auto;
    order: 2;
    flex: 1 0 100%;
    width: 100%;
  }
  .product-shell .app-dashboard-header .actions {
    grid-column: auto;
    grid-row: auto;
    order: 1;
    width: 100%;
    justify-content: flex-end;
    gap: 8px;
  }
  .product-shell .app-dashboard-header .actions > .btn { padding-inline: 10px; }
  .product-shell .sidebar .nav-item {
    position: relative;
    display: flex;
    flex: 0 0 64px;
    min-width: 64px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    min-height: 54px;
    padding: 4px 6px;
    border-left: 0;
    border-top: 2px solid transparent;
    border-radius: 10px;
    font-size: 10px;
    line-height: 1.05;
    text-align: center;
  }
  .product-shell .sidebar .nav-item.active,
  .product-shell .sidebar .nav-item:hover {
    border-left-color: transparent;
    border-top-color: var(--brand-late);
    background: rgba(247, 148, 30, .08);
  }
}

@media (max-width: 760px) {
  html,
  body {
    max-width: 100vw;
    overflow-x: clip;
  }

  .product-shell .sidebar {
    width: 100vw;
    max-width: 100vw;
    min-width: 0;
    box-sizing: border-box;
    overflow-x: auto;
  }
  .bflag-canon-kpis { grid-template-columns: 1fr; }
  .bflag-canon-panel-head { align-items: flex-start; flex-direction: column; }
  .bflag-canon-panel-actions { width: 100%; margin-left: 0; }
  .bflag-canon-panel-actions .btn { flex: 1; }
}

/* dialogs toggled via [hidden] (billing confirm + run modal): override the
   UA dialog:not([open]) rule so removing [hidden] actually shows them. */
.billing-confirm-dialog:not([hidden]) { display: block; position: fixed; inset: 0; margin: auto; height: fit-content; z-index: 120; box-shadow: var(--shadow); }

.product-shell .btn{border:1px solid var(--btn-border);background:var(--btn-bg);color:var(--btn-text);border-radius:8px;padding:8px 14px;font-family:var(--sans);font-size:12px;font-weight:600;cursor:pointer}
.product-shell .btn:hover:not(:disabled){border-color:var(--btn-hover-border);background:var(--btn-hover-bg);color:var(--btn-hover-text)}
.product-shell .btn:focus-visible{outline:2px solid var(--btn-hover-border);outline-offset:2px}
.product-shell .btn.active{border-color:var(--btn-active-border);background:var(--btn-active-bg);color:var(--btn-active-text)}
.product-shell .btn.primary{background:var(--accent);color:#0b0d10;border-color:var(--accent)}
.product-shell .btn.green{background:var(--accent-2);color:#0b0d10;border-color:var(--accent-2)}
.product-shell .btn.ghost{background:transparent}
.product-shell .btn.sm{padding:5px 10px;font-size:11px}
.product-shell .btn.oout{border-color:var(--btn-active-border);color:var(--btn-active-text);background:var(--btn-active-bg)}

/* Billing P2 — canon-aligned Workbench and lossless Pricing. */
#billingOsRunView .btn,#markupFeesView .btn { min-height: 32px; padding: 7px 11px; border: 1px solid var(--btn-border); border-radius: 7px; background: var(--btn-bg); color: var(--btn-text); font: 600 11px/1.2 'Space Grotesk',sans-serif; cursor: pointer; }
#billingOsRunView .btn:hover:not(:disabled),#markupFeesView .btn:hover:not(:disabled) { border-color: var(--btn-hover-border); background: var(--btn-hover-bg); color: var(--btn-hover-text); }
#billingOsRunView .btn.primary,#markupFeesView .btn.primary { border-color: var(--brand-late); background: var(--brand-late); color: #111; }
#billingOsRunView .btn:disabled,#markupFeesView .btn:disabled { cursor: not-allowed; opacity: 1; filter: none; border-color: var(--btn-disabled-border); background: var(--btn-disabled-bg); color: var(--btn-disabled-text); box-shadow: none; pointer-events: none; }
.bflag-workbench { position: relative; overflow: hidden; }
.bflag-run-totals { color: var(--text-dim); font: 500 12px/1.4 var(--mono); }
.bflag-workbench-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 10px 14px; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: var(--panel-2); }
.bflag-workbench-toolbar .note-input { width: auto; min-width: 132px; }
.bflag-workbench-toolbar #billingRunFilterSearch { min-width: 220px; flex: 1 1 220px; }
.bflag-toolbar-spacer { flex: 1 1 18px; }
.bflag-menu-wrap { position: relative; }
.bflag-workbench-menu { position: absolute; top: calc(100% + 6px); right: 0; z-index: 8; min-width: 160px; padding: 6px; border: 1px solid var(--border2); border-radius: 8px; background: var(--panel); box-shadow: var(--shadow); }
.bflag-workbench-menu button,.bflag-workbench-menu label { display: flex; width: 100%; align-items: center; gap: 7px; padding: 7px 8px; border: 0; border-radius: 5px; background: transparent; color: var(--text-dim); font: 600 11px/1.2 'Space Grotesk',sans-serif; text-align: left; }
.bflag-workbench-menu button:hover { background: var(--panel-2); color: var(--text); }
.bflag-workbench-chips { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; padding: 9px 14px; border-bottom: 1px solid var(--border); }
#billingOsRunView .bflag-workbench-chips .btn.active { border-color: var(--btn-active-border); background: var(--btn-active-bg); color: var(--btn-active-text); }
.bflag-override-note { margin-left: auto; color: var(--brand-late); font: 600 11px/1.4 var(--mono); }
.bflag-workbench .table-wrap { overflow-x: auto; }
.bflag-workbench table { min-width: 1080px; }
.bflag-sort-button { display: inline-flex; align-items: center; justify-content: flex-end; gap: 4px; width: 100%; padding: 0; border: 0; background: transparent; color: inherit; font: inherit; text-align: inherit; cursor: pointer; }
.bflag-sort-button:hover,.bflag-sort-button[aria-pressed="true"] { color: var(--brand-late); }
.bflag-sort-button [data-run-sort-indicator] { min-width: 1ch; font-family: var(--mono); }
.bflag-workbench-bulk { display: flex; align-items: center; gap: 8px; min-height: 46px; padding: 7px 14px; border-bottom: 1px solid var(--border); background: rgba(247,148,30,.04); }
.bflag-workbench-bulk strong { margin-right: 4px; color: var(--text-dim); font-size: 12px; }
.bflag-run-loading { display: flex; align-items: center; gap: 14px; min-height: 126px; }
.bflag-run-loading[hidden] { display: none; }
.bflag-run-loading p { margin: 5px 0 0; }
.bflag-run-refresh-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; padding: 10px 14px; border: 1px solid rgba(247,148,30,.45); border-radius: 8px; background: rgba(247,148,30,.1); color: var(--text); font-size: 12px; }
.bflag-run-refresh-error[hidden] { display: none; }
.bflag-spinner { width: 24px; height: 24px; flex: 0 0 auto; border: 3px solid var(--border2); border-top-color: var(--brand-late); border-radius: 50%; animation: bflag-spin .75s linear infinite; }
@keyframes bflag-spin { to { transform: rotate(360deg); } }
.bflag-workbench tbody tr:hover { background: var(--panel-2); }
.bflag-buy-cell { font-family: var(--mono); }
.bflag-buy-cell small { display: block; margin-top: 3px; color: var(--brand-late); font-size: 9px; }
.bflag-buy-cell[tabindex] { cursor: cell; outline: 1px dashed rgba(247,148,30,.5); outline-offset: -4px; }
.bflag-buy-cell.edited { background: rgba(247,148,30,.08); box-shadow: inset 3px 0 var(--brand-late); }
.bflag-buy-cell input { width: 90px; padding: 5px 7px; }
.bflag-green { color: var(--good) !important; }
.bflag-red { color: var(--danger) !important; }
.bflag-pricing-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 10px; }
.bflag-add-fee { display: grid; grid-template-columns: minmax(180px,1fr) minmax(140px,1fr) auto; gap: 8px; margin-bottom: 12px; padding: 10px; border: 1px solid var(--border); border-radius: 8px; background: var(--panel-2); }
.bflag-pricing-table td:first-child strong,.bflag-pricing-table td:first-child small { display: block; }
.bflag-pricing-table td:first-child small { margin-top: 3px; color: var(--text-quiet); font: 500 10px/1.3 var(--mono); }
.bflag-pricing-table .note-input { min-width: 180px; }
.bflag-pricing-json { min-height: 64px; resize: vertical; font-family: var(--mono); }
.bflag-pricing-preview { margin-top: 12px; padding: 12px 14px; border: 1px solid rgba(247,148,30,.3); border-radius: 8px; background: rgba(247,148,30,.06); }
.bflag-pricing-tabs { margin-bottom: 16px; border-bottom: 1px solid var(--border); }
.bflag-pricing-tabs .btn { min-width: 132px; border-radius: 7px 7px 0 0 !important; }
.bflag-pricing-tabs .btn.active { border-color: var(--btn-active-border) !important; background: var(--btn-active-bg) !important; color: var(--btn-active-text) !important; }
.bflag-pricing-footer { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 18px -20px -20px; padding: 14px 20px; border-top: 1px solid var(--border); }
.bflag-pricing-footer .workflow-actions { display: flex; flex-direction: row; gap: 8px; }
.bflag-unpriced-cell strong,.bflag-unpriced-cell small { display: block; white-space: nowrap; }
.bflag-unpriced-cell small { margin-top: 2px; color: var(--text-quiet); font: 500 9px/1.2 var(--mono); }
.bflag-kpi-link { padding: 0; border: 0; background: transparent; color: var(--brand-late); font: inherit; font-weight: 700; cursor: pointer; }
.bflag-pricing-lower { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.bflag-pricing-lower .rich-list li { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bflag-pricing-lower .rich-list small { display: block; margin-top: 3px; color: var(--text-quiet); }
@media (max-width: 820px) {
  .bflag-pricing-lower { grid-template-columns: 1fr; }
  .bflag-pricing-head { align-items: flex-start; flex-direction: column; }
  .bflag-add-fee { grid-template-columns: 1fr; }
  .bflag-override-note { width: 100%; margin-left: 0; }
  .bflag-pricing-footer { align-items: flex-start; flex-direction: column; }
}

/* bflag contexts use inline actions — prod .workflow-actions grid (full-width
   stacked buttons) is for workflow cards; override ONLY inside bflag- scopes. */
.bflag-portfolio-actions,
.bflag-connection-card .workflow-actions,
#markupDraftPreview .workflow-actions,
#settingsHelpPanel .workflow-actions,
#billingOsClientView .page-heading .workflow-actions,
#billingOsShipmentView .page-heading .workflow-actions,
#markupFeesView .page-heading .workflow-actions,
#billingScheduleForm .workflow-actions,
[data-client-section] .workflow-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  padding: 0;
  border-bottom: none;
}
.bflag-portfolio-actions button,
.bflag-connection-card .workflow-actions button,
#markupDraftPreview .workflow-actions button,
#settingsHelpPanel .workflow-actions button,
#billingOsClientView .page-heading .workflow-actions button,
#billingOsShipmentView .page-heading .workflow-actions button,
#markupFeesView .page-heading .workflow-actions button,
#billingScheduleForm .workflow-actions button,
[data-client-section] .workflow-actions button {
  width: auto;
  min-height: 0;
}
.product-shell #markupFeesView .workflow-actions,
.product-shell #billingOsRunView .workflow-actions,
.product-shell #alertsView .workflow-actions {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 0;
  border-bottom: 0;
}
.product-shell #markupFeesView .workflow-actions button,
.product-shell #billingOsRunView .workflow-actions button,
.product-shell #alertsView .workflow-actions button {
  width: auto;
  min-height: 0;
}
.product-shell #markupFeesView .page-heading .workflow-actions,
.product-shell #billingOsRunView > .workflow-actions {
  justify-content: flex-start;
  padding: 0;
}
.product-shell .bflag-back-button {
  padding-left: 0;
  border-color: transparent;
  background: transparent;
  color: var(--text-dim);
}
#productShell.product-shell .page-heading p#connectionsDescription,
#productShell.product-shell .page-heading p#markupDescription {
  max-height: none;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  overflow-wrap: break-word;
}
#productShell.product-shell #shipheroConnectionForm #shipheroConnectButton,
#productShell.product-shell #shipheroDisconnectButton {
  justify-self: start;
  width: auto;
}
.bflag-tip-btn { width: 18px !important; height: 18px !important; min-height: 0 !important; min-width: 0 !important; padding: 0 !important; flex: none; }

:is(.primary-button, .ghost-button, .text-button, .file-button, .compact-green-button, .btn):disabled,
#productShell :is(.primary-button, .ghost-button, .text-button, .file-button, .compact-green-button, .btn):disabled {
  cursor: not-allowed;
  opacity: .5 !important;
  filter: saturate(.2) !important;
  border-color: var(--border2) !important;
  background: var(--panel-2) !important;
  color: var(--text-quiet) !important;
  box-shadow: none !important;
  transform: none !important;
  pointer-events: none;
}
#productShell.product-shell .btn:disabled {
  opacity: 1 !important;
  filter: none !important;
  border-color: var(--btn-disabled-border) !important;
  background: var(--btn-disabled-bg) !important;
  color: var(--btn-disabled-text) !important;
}
