:root {
  --ink: #0b0e12;
  --ink-2: #171b22;
  --ink-3: #222833;
  --text: #20242c;
  --muted: #667085;
  --faint: #8a93a3;
  --line: #d8dde6;
  --line-strong: #b9c0cc;
  --surface: #f4f6f9;
  --panel: #ffffff;
  --gold: #caa43b;
  --gold-dark: #775a0e;
  --gold-soft: #f6edcf;
  --blue: #2767c5;
  --blue-soft: #e8f0fd;
  --green: #247b49;
  --green-soft: #e4f3e9;
  --red: #b63b30;
  --red-soft: #fae9e7;
  --amber: #8a5a00;
  --amber-soft: #fff2cf;
  --shadow: 0 2px 10px rgba(22, 30, 44, .08);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body {
  margin: 0;
  color: var(--text);
  background: var(--surface);
  font-family: var(--sans);
  font-size: 13px;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}
textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  grid-template-rows: 56px minmax(0, 1fr);
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 0 18px;
  color: #fff;
  background: var(--ink);
  border-bottom: 1px solid #282e38;
}
.brand, .topbar-tools, .location-switch, .record-commands {
  display: flex;
  align-items: center;
}
.record-commands { flex-wrap: wrap; justify-content: flex-end; }
.brand { gap: 12px; font-weight: 750; }
.brand img { width: 76px; height: 32px; object-fit: contain; }
.sandbox-chip, .environment-chip {
  padding: 4px 7px;
  color: #f5dc8d;
  border: 1px solid #80671f;
  border-radius: 3px;
  font-size: 9px;
  font-weight: 800;
}
.environment-chip.is-live { color: #b9efcb; border-color: #2a7b49; }
.environment-chip.is-test { color: #b9d5ff; border-color: #346eac; }
.environment-chip.is-training { color: #ffd99a; border-color: #a66d19; }
.topbar-tools { gap: 14px; }
.location-switch {
  padding: 3px;
  background: #12161c;
  border: 1px solid #303641;
  border-radius: 4px;
}
.location-switch button {
  height: 30px;
  padding: 0 11px;
  color: #929bab;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-weight: 700;
}
.location-switch button.is-active { color: #211a08; background: var(--gold); }
.identity { display: flex; flex-direction: column; min-width: 150px; text-align: right; }
.identity strong { font-size: 12px; }
.identity span { color: #969ead; font-size: 10px; }
.icon-command {
  height: 31px;
  padding: 0 9px;
  color: #d7dbe2;
  background: #151920;
  border: 1px solid #343a45;
  border-radius: 3px;
}

.module-rail {
  grid-row: 2;
  padding: 16px 10px;
  color: #aeb5c2;
  background: #0d1014;
  border-right: 1px solid #262b34;
}
.module-rail nav { display: flex; flex-direction: column; gap: 3px; }
.module-rail p {
  margin: 14px 10px 6px;
  color: #70798a;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.module-rail button {
  position: relative;
  width: 100%;
  min-height: 34px;
  padding: 0 10px;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
  border-radius: 3px;
  font-weight: 650;
}
.module-rail button:hover { color: #fff; background: #181d25; }
.module-rail button.is-active { color: #fff; background: var(--ink-3); }
.module-rail button.is-active::before {
  content: "";
  position: absolute;
  inset: 6px auto 6px 0;
  width: 3px;
  background: var(--gold);
}

.workspace { min-width: 0; padding: 18px 20px 24px; overflow: auto; }
.workspace-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
}
.workspace-header h1 { margin: 2px 0 1px; font-size: 24px; line-height: 1.15; }
.workspace-header p { margin: 0; color: var(--muted); }
.eyebrow { color: var(--gold-dark); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.record-commands { gap: 6px; }
.record-commands button, .filter-bar button {
  height: 34px;
  padding: 0 12px;
  color: #333946;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-weight: 700;
}
.record-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.record-section-heading h3 { margin: 0; }
.record-section-heading button, .record-command-grid button { min-height: 32px; padding: 0 10px; color: #333946; background: #fff; border: 1px solid var(--line-strong); border-radius: 3px; font-weight: 750; }
.record-command-grid button.primary { color: #201907; background: var(--gold); border-color: #b99229; }
.record-note { margin: 7px 0 12px; color: var(--muted); font-size: 11px; }
.record-command-grid { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 10px; }
.advisor-form { display: flex; align-items: end; gap: 10px; max-width: 650px; margin: 14px 0; }
.advisor-form label { flex: 1; display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.advisor-form input { min-height: 36px; padding: 7px 9px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 3px; font: inherit; letter-spacing: 0; text-transform: none; }
.advisor-form button { min-height: 36px; white-space: nowrap; }
.deal-finance-form { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 16px 0 10px; width: 100%; }
.deal-finance-form .finance-field { display: grid; gap: 6px; min-width: 0; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.deal-finance-form .finance-field-lender, .deal-finance-form .finance-estimate { grid-column: 1 / -1; }
.deal-finance-form input { width: 100%; min-width: 0; min-height: 40px; box-sizing: border-box; padding: 8px 10px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 3px; font: 750 14px var(--sans); }
.finance-estimate { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; color: var(--muted); background: #f7f8fb; border: 1px solid var(--line); border-radius: 3px; }
.finance-estimate div { min-width: 0; padding: 10px 12px; border-right: 1px solid var(--line); }
.finance-estimate span { display: block; margin-bottom: 4px; font: 800 9.5px var(--sans); letter-spacing: .05em; text-transform: uppercase; }
.finance-estimate strong { color: var(--ink); font: 850 16px var(--sans); }
.finance-estimate .finance-estimate-unavailable { grid-column: 1 / -1; padding: 12px; color: #8a6000; background: #fff9e9; border-right: 0; }
.finance-estimate-unavailable strong { color: #8a6000; font-size: 14px; }
.finance-estimate-unavailable span { margin: 5px 0 0; color: #6b5b2a; font-size: 11px; letter-spacing: 0; text-transform: none; }
.deal-finance-form button { justify-self: start; min-height: 40px; white-space: nowrap; }
.deal-finance-form button.primary { justify-self: end; }
.advisor-result { margin: 14px 0; }
.advisor-result.is-approve { color: #166534; border-left-color: var(--green); }
.advisor-result.is-counter, .advisor-result.is-manager_review { color: #8a6000; border-left-color: var(--gold); }
.advisor-result.is-do_not_pursue { color: #b42318; border-left-color: var(--red); }
.advisor-result h4 { margin: 0 0 6px; color: inherit; font-size: 15px; }
.advisor-result p { margin: 5px 0; }
.advisor-result ul { margin: 8px 0 0; padding-left: 18px; }
.advisor-history-heading { display: flex; justify-content: space-between; align-items: baseline; margin-top: 20px; }
.advisor-history-heading h3 { margin: 0; }
.advisor-history .advisor-history-row { display: grid; grid-template-columns: 130px 1fr auto; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.advisor-history-row p { margin: 2px 0; color: var(--muted); font-size: 12px; }
.advisor-history-row button { min-height: 30px; padding: 0 9px; color: #333946; background: #fff; border: 1px solid var(--line-strong); border-radius: 3px; font-weight: 750; }
.advisor-decision-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-dialog { width: min(680px, calc(100vw - 28px)); padding: 0; color: var(--text); background: var(--panel); border: 1px solid var(--line-strong); border-radius: 4px; box-shadow: 0 18px 60px rgba(0,0,0,.28); }
.guide-dialog::backdrop { background: rgba(11,14,18,.45); }
.guide-header { display: flex; align-items: center; justify-content: space-between; padding: 15px 16px; background: #f8f9fb; border-bottom: 1px solid var(--line); }
.guide-header h2 { margin: 2px 0 0; font-size: 18px; }
.guide-header button { min-height: 30px; padding: 0 10px; color: #333946; background: #fff; border: 1px solid var(--line-strong); border-radius: 3px; font-weight: 700; }
.guide-dialog > p { margin: 12px 16px; color: var(--muted); }
.guide-form { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; padding: 0 16px 14px; }
.guide-form textarea { min-height: 72px; resize: vertical; padding: 9px; color: var(--text); border: 1px solid var(--line-strong); border-radius: 3px; }
.guide-form button { align-self: end; min-height: 36px; padding: 0 13px; color: #201907; background: var(--gold); border: 1px solid #b99229; border-radius: 3px; font-weight: 800; }
.guide-answer { min-height: 90px; margin: 0 16px 16px; padding: 12px; white-space: pre-wrap; color: #343b48; background: #f8f9fb; border: 1px solid var(--line); }
.record-commands button.primary { color: #201907; background: var(--gold); border-color: #b99229; }
.is-dashboard #new-customer { order: 1; }
.is-dashboard #new-deal {
  order: 2;
  color: #fff;
  background: var(--ink);
  border-color: var(--ink);
}

.dashboard-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 330px);
  gap: 14px;
}
.dashboard-primary, .dashboard-rail {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 14px;
}
.dashboard-panel {
  min-width: 0;
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.dashboard-panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #e7eaf0;
}
.dashboard-panel-heading.compact { align-items: center; }
.dashboard-panel-heading h2 { margin: 2px 0 0; font-size: 15px; }
.dashboard-panel-note {
  margin: 0;
  padding: 9px 16px;
  color: var(--muted);
  background: #fafbfc;
  border-bottom: 1px solid #eceef2;
  font-size: 11px;
}
.live-label, .owner-label {
  color: var(--green);
  font-size: 9px;
  font-weight: 850;
  letter-spacing: .08em;
}
.owner-label { color: #d9bd66; }
.text-command {
  padding: 3px 0;
  color: var(--gold-dark);
  background: transparent;
  border: 0;
  font-size: 11px;
  font-weight: 800;
}
.dashboard-list { padding: 0 16px; }
.dashboard-list-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 0;
  border-bottom: 1px solid #e8ebf0;
  cursor: pointer;
}
.dashboard-list-row:last-child { border-bottom: 0; }
.dashboard-list-row:hover strong { color: var(--gold-dark); }
.dashboard-list-icon {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 3px;
  font-weight: 900;
}
.dashboard-list-row.is-high .dashboard-list-icon { color: var(--red); background: var(--red-soft); }
.dashboard-list-row strong, .dashboard-list-row small { display: block; }
.dashboard-list-row small { margin-top: 2px; color: var(--muted); }
.dashboard-list-count { color: var(--muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }
.dashboard-empty { grid-column: 1 / -1; padding: 18px 16px; color: var(--muted); text-align: center; }
.dashboard-kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.dashboard-kpi {
  min-height: 78px;
  padding: 12px 14px;
  border-right: 1px solid #e7eaf0;
  border-bottom: 1px solid #e7eaf0;
}
.dashboard-kpi:nth-child(even) { border-right: 0; }
.dashboard-kpi strong, .dashboard-kpi span { display: block; }
.dashboard-kpi strong { font-size: 24px; }
.dashboard-kpi span { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 700; }
.dashboard-kpi.is-gold { box-shadow: inset 0 3px var(--gold); }
.dashboard-kpi.is-blue { box-shadow: inset 0 3px var(--blue); }
.dashboard-kpi.is-red { box-shadow: inset 0 3px var(--red); }
.dashboard-kpi.is-green { box-shadow: inset 0 3px var(--green); }
.dashboard-owner { color: #fff; background: var(--ink); border-color: #303641; }
.dashboard-owner .dashboard-panel-heading { border-bottom-color: #303641; }
.dashboard-owner .dashboard-panel-heading h2 { color: #fff; }
.dashboard-owner-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
}
.dashboard-owner-stat { padding: 12px; background: var(--ink-2); border: 1px solid #303641; }
.dashboard-owner-stat strong, .dashboard-owner-stat span { display: block; }
.dashboard-owner-stat strong { color: #fff; font-size: 22px; }
.dashboard-owner-stat span { margin-top: 3px; color: #a9b0bc; font-size: 10px; }
.dashboard-owner-stat.is-gold strong { color: #d9bd66; }
.dashboard-analytics-message { grid-column: 1 / -1; padding: 12px; background: var(--ink-2); border: 1px solid #303641; }.dashboard-analytics-message strong, .dashboard-analytics-message span { display: block; }.dashboard-analytics-message span { margin-top: 4px; color: #a9b0bc; font-size: 11px; line-height: 1.35; }
.dashboard-alert-list { padding: 8px 12px 12px; }
.dashboard-alert {
  display: grid;
  grid-template-columns: 8px minmax(0, 1fr) auto;
  align-items: center;
  gap: 9px;
  min-height: 36px;
  margin-top: 6px;
  padding: 0 10px;
  color: var(--muted);
  background: #f7f8fa;
  border: 1px solid #e7eaf0;
  cursor: pointer;
}
.dashboard-alert i { width: 7px; height: 7px; background: var(--blue); border-radius: 50%; }
.dashboard-alert.is-red i { background: var(--red); }
.dashboard-alert.is-amber i { background: #d99a00; }
.dashboard-alert strong { color: var(--text); }
.dashboard-email-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.dashboard-email { min-width: 0; padding: 12px; border-right: 1px solid #e7eaf0; cursor: pointer; }
.dashboard-email:hover { background: #f8f6ee; }
.dashboard-email:last-child { border-right: 0; }
.dashboard-email strong, .dashboard-email span, .dashboard-email small { display: block; }
.dashboard-email span {
  margin-top: 5px;
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}
.dashboard-email small { margin-top: 5px; color: var(--faint); }
.email-triage-dialog { width: min(1180px, calc(100vw - 36px)); }
.triage-toolbar { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; color: var(--muted); }
.triage-toolbar label { display: flex; gap: 7px; align-items: center; font-weight: 700; color: var(--text); }
.triage-toolbar select { min-width: 140px; }
.triage-layout { display: grid; grid-template-columns: minmax(280px, .9fr) minmax(0, 1.6fr); min-height: 460px; }
.triage-list { border-right: 1px solid var(--line); overflow: auto; max-height: 62vh; }
.triage-message { width: 100%; padding: 12px 14px; text-align: left; background: #fff; border: 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.triage-message:hover, .triage-message.is-active { background: #f7f4e9; }
.triage-message strong, .triage-message span, .triage-message small { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.triage-message small { margin-top: 4px; color: var(--muted); }
.triage-message .triage-meta { display: flex; justify-content: space-between; gap: 8px; color: var(--faint); font-size: 11px; }
.triage-priority { color: var(--red); font-weight: 800; text-transform: uppercase; }
.triage-detail { min-width: 0; padding: 20px; overflow: auto; max-height: 62vh; }
.triage-detail h3 { margin: 0 0 6px; font-size: 19px; }
.triage-detail .triage-from { color: var(--muted); font-size: 13px; }
.triage-detail .triage-actions { display: flex; gap: 8px; margin: 16px 0; }
.triage-detail .triage-body { padding: 14px; background: #f8fafc; border: 1px solid var(--line); white-space: pre-wrap; line-height: 1.55; }
.dashboard-quick-actions { padding-bottom: 12px; }
.dashboard-quick-actions > button, .dashboard-quick-actions > a {
  display: flex;
  align-items: center;
  width: calc(100% - 24px);
  min-height: 34px;
  margin: 8px 12px 0;
  padding: 0 10px;
  color: #333946;
  text-align: left;
  text-decoration: none;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-weight: 700;
}

.entry-workspace {
  min-height: calc(100vh - 128px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.entry-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 16px 18px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--line-strong);
}
.entry-toolbar h2 { margin: 2px 0 1px; font-size: 20px; }
.entry-toolbar p { margin: 0; color: var(--muted); }
.entry-error {
  margin: 12px 18px 0;
  padding: 10px 12px;
  color: var(--red);
  background: var(--red-soft);
  border-left: 3px solid var(--red);
}
.entry-section {
  min-width: 0;
  margin: 0;
  padding: 16px 18px 18px;
  border: 0;
  border-bottom: 1px solid var(--line);
}
.entry-section legend {
  float: left;
  width: 100%;
  margin: 0 0 12px;
  padding: 0;
  color: #343b48;
  font-size: 12px;
  font-weight: 800;
}
.entry-grid {
  clear: both;
  display: grid;
  align-items: end;
  gap: 10px;
}
.entry-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.entry-grid-transaction {
  grid-template-columns: minmax(280px, 2fr) repeat(3, minmax(120px, 1fr));
}
.entry-grid label {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 4px;
  color: #586174;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.entry-grid .span-2 { grid-column: span 2; }
.entry-grid .checkbox-field {
  min-height: 34px;
  flex-direction: row;
  align-items: center;
  gap: 7px;
}
.entry-grid .checkbox-field input {
  width: 16px;
  height: 16px;
  min-width: 16px;
  padding: 0;
}
.field-command { display: flex; align-items: flex-end; }
.field-command button {
  width: 100%;
  height: 34px;
  color: #333946;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-weight: 700;
}
.inline-status {
  min-height: 17px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 11px;
}
.inline-status.is-match { color: var(--green); font-weight: 700; }
.entry-submit {
  display: flex;
  justify-content: flex-end;
  padding: 14px 18px;
  background: #f8f9fb;
  border-top: 1px solid var(--line);
}
.entry-submit button {
  min-width: 150px;
  height: 36px;
  padding: 0 14px;
  color: #201907;
  background: var(--gold);
  border: 1px solid #b99229;
  border-radius: 3px;
  font-weight: 800;
}
.erp-stat-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  border-bottom: 1px solid var(--line);
}
#service-stats { grid-template-columns: repeat(6, minmax(0, 1fr)); }
#launch-readiness-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.erp-stat {
  min-width: 0;
  padding: 10px 9px;
  border-right: 1px solid var(--line);
}
.erp-stat:last-child { border-right: 0; }
.erp-stat strong { display: block; font-size: 17px; }
.erp-stat span {
  display: block;
  overflow: hidden;
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
}
.erp-ledger {
  width: 100%;
  border: 1px solid var(--line);
  border-bottom: 0;
}
.erp-ledger-row {
  display: grid;
  grid-template-columns: minmax(100px, .8fr) minmax(65px, .45fr) minmax(100px, 1fr) minmax(90px, .65fr);
  min-height: 34px;
  align-items: center;
  border-bottom: 1px solid var(--line);
}
.erp-ledger-row > span { min-width: 0; padding: 6px 8px; overflow-wrap: anywhere; }
.erp-ledger-row.is-heading {
  color: #5f6878;
  background: #eef1f5;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.document-ledger small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-weight: 500;
}
.document-ledger button {
  min-height: 28px;
  padding: 4px 9px;
}
.signing-ledger .erp-ledger-row {
  grid-template-columns: minmax(150px, 1.4fr) minmax(110px, .8fr) minmax(90px, .7fr) 72px;
}
.record-subheading {
  margin: 14px 10px 0;
  color: var(--text);
  font-size: 11px;
  text-transform: uppercase;
}
.part-number { color: var(--blue); font-weight: 800; }

.register-layout {
  display: grid;
  grid-template-columns: minmax(520px, 42%) minmax(560px, 1fr);
  min-height: calc(100vh - 128px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.report-layout {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  min-height: calc(100vh - 128px);
  background: var(--panel);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.report-catalog {
  padding: 10px;
  background: #f5f7fa;
  border-right: 1px solid var(--line-strong);
}
.report-catalog-heading {
  padding: 4px 7px 10px;
  color: #626c7d;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}
.report-catalog button {
  display: block;
  width: 100%;
  min-height: 56px;
  margin-bottom: 5px;
  padding: 9px 10px;
  color: #353c48;
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid transparent;
  border-radius: 2px;
}
.report-catalog button:hover { border-color: var(--line-strong); }
.report-catalog button.is-active {
  color: #1f2530;
  background: var(--gold-soft);
  border-color: #d8bd68;
  border-left-color: var(--gold);
}
.report-catalog button strong,
.report-catalog button span { display: block; }
.report-catalog button span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.report-surface { min-width: 0; }
.report-period {
  display: grid;
  grid-template-columns: 160px 160px auto minmax(160px, 1fr);
  align-items: end;
  gap: 7px;
  padding: 10px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--line);
}
.report-period label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #586174;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.report-period span { align-self: center; color: var(--muted); text-align: right; font-size: 10px; }
.report-output { padding: 14px; }
.report-output-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 12px;
}
.report-output-heading h2 { margin: 3px 0 2px; font-size: 20px; }
.report-output-heading p { margin: 0; color: var(--muted); }
.report-table-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  margin-top: 14px;
  padding: 0 10px;
  background: #eef1f5;
  border: 1px solid var(--line);
  border-bottom: 0;
}
.report-table-heading h3 { margin: 0; font-size: 11px; text-transform: uppercase; }
.report-table-heading span { color: var(--muted); font-size: 10px; }
#report-table { border: 1px solid var(--line); }
#report-rows tr { cursor: default; }

@media print {
  .topbar, .module-rail, .workspace-header, .report-catalog, .report-period { display: none !important; }
  .app-shell { display: block; }
  .workspace { margin: 0; padding: 0; }
  .report-layout { display: block; min-height: 0; border: 0; box-shadow: none; }
  .report-output { padding: 0; }
}
.register-pane { min-width: 0; border-right: 1px solid var(--line-strong); }
.register-layout.service-wide { grid-template-columns: minmax(0, 1fr); }
.register-layout.service-wide > .record-pane { display: none; }
.service-view-switch {
  display: flex;
  gap: 2px;
  padding: 8px 10px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--line);
}
.service-view-switch button,
.service-calendar-toolbar button {
  height: 30px;
  padding: 0 11px;
  color: #4e5767;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
  font-weight: 750;
}
.service-view-switch button.is-active {
  color: #fff;
  background: var(--ink-3);
  border-color: var(--ink-3);
}
.service-board {
  display: grid;
  grid-template-columns: repeat(6, minmax(210px, 1fr));
  gap: 8px;
  min-width: 1300px;
  padding: 10px;
  background: #eef1f5;
}
#service-board-view { overflow-x: auto; }
.service-board-column {
  min-width: 0;
  background: #f8f9fb;
  border: 1px solid var(--line);
}
.service-board-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 38px;
  padding: 8px 9px;
  color: #4f5868;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  font-weight: 850;
  text-transform: uppercase;
}
.service-board-heading span {
  min-width: 21px;
  padding: 2px 5px;
  color: #fff;
  text-align: center;
  background: #687284;
  border-radius: 10px;
}
.service-board-cards { min-height: 180px; padding: 7px; }
.service-board-empty {
  padding: 16px 8px;
  color: var(--faint);
  text-align: center;
  font-size: 11px;
}
.service-card {
  margin-bottom: 7px;
  padding: 9px;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid #7e8797;
  box-shadow: 0 1px 3px rgba(22, 30, 44, .06);
}
.service-card[data-status="in_progress"] { border-left-color: var(--blue); }
.service-card[data-status="waiting_parts"] { border-left-color: var(--amber); }
.service-card[data-status="ready"] { border-left-color: var(--green); }
.service-card[data-status="closed"] { border-left-color: #687284; }
.service-card-open {
  width: 100%;
  padding: 0;
  color: inherit;
  text-align: left;
  background: transparent;
  border: 0;
}
.service-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
}
.service-card-top strong { color: var(--gold-dark); font-size: 10px; }
.service-card-title { display: block; margin-top: 5px; font-weight: 800; }
.service-card-unit,
.service-card-meta,
.service-card-concern {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
}
.service-card-concern { color: #3f4754; }
.service-card select { width: 100%; height: 29px; margin-top: 8px; font-size: 10px; }
.service-calendar-toolbar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 10px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--line);
}
.service-calendar-toolbar strong { margin-left: 6px; }
.service-calendar-wrap { overflow-x: auto; }
.service-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(140px, 1fr));
  min-width: 980px;
}
.service-calendar-day {
  min-height: 360px;
  border-right: 1px solid var(--line);
}
.service-calendar-day:last-child { border-right: 0; }
.service-calendar-day h3 {
  position: sticky;
  top: 0;
  z-index: 1;
  margin: 0;
  padding: 9px;
  color: #586174;
  background: #eef1f5;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  text-transform: uppercase;
}
.service-calendar-day.is-today h3 { color: #201907; background: var(--gold-soft); }
.service-calendar-events { padding: 7px; }
.service-calendar-event {
  width: 100%;
  margin-bottom: 6px;
  padding: 7px;
  color: var(--text);
  text-align: left;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 2px;
}
.service-calendar-event strong,
.service-calendar-event span { display: block; }
.service-calendar-event span { margin-top: 3px; color: var(--muted); font-size: 9px; }
.filter-bar {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 138px auto auto;
  align-items: end;
  gap: 7px;
  padding: 10px;
  background: #f8f9fb;
  border-bottom: 1px solid var(--line);
}
.filter-bar label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: #586174;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
input, select {
  height: 34px;
  min-width: 0;
  padding: 0 9px;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 2px;
}
.table-wrap { overflow: auto; }
table { width: 100%; border-collapse: collapse; white-space: nowrap; }
th {
  position: sticky;
  top: 0;
  z-index: 1;
  height: 34px;
  padding: 0 9px;
  color: #5f6878;
  text-align: left;
  background: #eef1f5;
  border-bottom: 1px solid var(--line-strong);
  font-size: 9px;
  text-transform: uppercase;
}
td {
  height: 42px;
  padding: 0 9px;
  border-bottom: 1px solid #e6e9ee;
  color: #323844;
}
.truncate-cell {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
}
tbody tr { cursor: pointer; }
tbody tr:hover { background: #f5f7fa; }
tbody tr.is-selected { background: var(--gold-soft); box-shadow: inset 3px 0 var(--gold); }
.numeric { text-align: right; font-variant-numeric: tabular-nums; }
.table-footer {
  display: flex;
  justify-content: space-between;
  padding: 8px 10px;
  color: var(--muted);
  background: #fafbfc;
  border-top: 1px solid var(--line);
  font-size: 10px;
}
.empty-state, .record-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 220px;
  gap: 5px;
  color: var(--muted);
}
.empty-state strong, .record-empty strong { color: var(--text); font-size: 15px; }

/* Compact secondary information inside operational registers. */
.link-button {
  height: auto;
  padding: 0;
  color: var(--gold-dark);
  background: transparent;
  border: 0;
  border-radius: 0;
  font: inherit;
  font-weight: 800;
  text-align: left;
  cursor: pointer;
}
.link-button:hover { color: var(--text); text-decoration: underline; }
.table-secondary { display: block; margin-top: 3px; color: var(--muted); font-size: 10px; }
.wants-layout { margin-top: 14px; }

.record-pane { min-width: 0; }
.record-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 82px;
  padding: 14px 16px 10px;
}
.record-id { color: var(--gold-dark); font-size: 9px; font-weight: 850; text-transform: uppercase; }
.record-header h2 { margin: 3px 0 2px; font-size: 20px; }
.record-header p { margin: 0; color: var(--muted); }
.status-chip {
  padding: 5px 8px;
  color: var(--blue);
  background: var(--blue-soft);
  border-radius: 3px;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
}
.status-chip.is-green { color: var(--green); background: var(--green-soft); }
.status-chip.is-red { color: var(--red); background: var(--red-soft); }
.status-chip.is-blue { color: var(--blue); background: var(--blue-soft); }
.status-chip.is-amber { color: var(--amber); background: var(--amber-soft); }
.section-heading { margin: 0 0 8px; font-size: 13px; }
#account-map-rows tr { cursor: default; }
#account-map-rows td { vertical-align: middle; }
#account-map-rows input:not([type="checkbox"]) {
  width: 100%;
  min-width: 120px;
  height: 30px;
  padding: 0 8px;
  border: 1px solid var(--line-strong);
}
#account-map-rows input[type="checkbox"] { width: 16px; height: 16px; }
#account-map-rows button {
  height: 30px;
  padding: 0 10px;
  color: #333946;
  background: #fff;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  font-weight: 700;
}
.accounting-ledger .erp-ledger-row {
  grid-template-columns: minmax(130px, 1fr) 90px 90px minmax(150px, 1.4fr);
}
#accounting-stats .erp-stat span { white-space: normal; }
.workflow-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 16px 10px;
  border: 1px solid var(--line);
}
.workflow-strip span {
  position: relative;
  padding: 7px 10px;
  color: var(--faint);
  text-align: center;
  background: #fafbfc;
  border-right: 1px solid var(--line);
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.workflow-strip span:last-child { border-right: 0; }
.workflow-strip span.is-complete { color: var(--green); background: var(--green-soft); }
.workflow-strip span.is-current { color: #241b05; background: var(--gold-soft); box-shadow: inset 0 -3px var(--gold); }
.tabbar {
  display: flex;
  min-width: 0;
  padding: 0 16px;
  border-bottom: 1px solid var(--line-strong);
  overflow-x: auto;
}
.tabbar button {
  height: 36px;
  padding: 0 13px;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-weight: 700;
  white-space: nowrap;
}
.tabbar button.is-active { color: var(--text); border-bottom-color: var(--gold); }
.record-body { display: grid; grid-template-columns: minmax(0, 1fr) 230px; }
.record-main { min-width: 0; padding: 14px 16px 20px; }
.record-section { border: 1px solid var(--line); }
.record-section h3, .related-panel h3 {
  margin: 0;
  padding: 9px 11px;
  color: #454d5b;
  background: #f2f4f7;
  border-bottom: 1px solid var(--line);
  font-size: 10px;
  text-transform: uppercase;
}
.section-command-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  background: #f7f8fa;
}
.section-command-bar h3 { padding: 0; border: 0; }
.section-command-bar p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.compact-command-bar { margin: 0 0 12px; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
.compact-command-bar .entry-help { margin: 0; }
.license-scan-body { padding: 0 16px 16px; }
.license-scan-body input { display: block; width: 100%; margin: 12px 0; }
.inline-message {
  margin: 10px 12px 0;
  padding: 8px 10px;
  border: 1px solid #d8bf70;
  background: #fff8dc;
  color: #6f5714;
  font-size: 12px;
  font-weight: 700;
}
.inline-message.is-error { border-color: #e0a49b; background: #fff0ed; color: #9d2f21; }
.inventory-photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 8px;
  padding: 12px;
}
.inventory-photo-grid figure,
.inventory-photo-grid label {
  position: relative;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--line);
  background: #fff;
}
.inventory-photo-grid img { display: block; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.inventory-photo-grid figcaption { padding: 7px 8px; text-transform: capitalize; font-size: 11px; font-weight: 800; }
.inventory-photo-capture label {
  min-height: 150px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  cursor: pointer;
  text-align: center;
}
.inventory-photo-capture label.is-complete { border-color: #3a8f58; }
.inventory-photo-capture label:focus-within { outline: 2px solid var(--gold); outline-offset: 2px; }
.inventory-photo-capture strong { font-size: 12px; }
.inventory-photo-capture small { color: var(--muted); font-size: 10px; }
.inventory-photo-capture input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-slot-icon { font-size: 30px; color: var(--gold-dark); line-height: 1; }
.record-inline-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 12px;
  border-bottom: 1px solid var(--line);
}
.record-inline-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: #687181;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.record-inline-form .span-2 { grid-column: span 2; }
.record-inline-form .check-field { flex-direction: row; align-items: center; text-transform: none; }
.record-inline-form .check-field input { width: auto; }
.record-inline-form button { min-height: 34px; }
.field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
}
.field-grid div {
  min-height: 62px;
  padding: 9px 11px;
  border-right: 1px solid #e3e6eb;
  border-bottom: 1px solid #e3e6eb;
}
.field-grid dt, .compact-facts dt {
  color: #7b8493;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
}
.field-grid dd, .compact-facts dd {
  margin: 5px 0 0;
  color: #252b35;
  font-weight: 650;
  overflow-wrap: anywhere;
}
.related-panel {
  min-width: 0;
  padding: 14px 12px;
  background: #f7f8fa;
  border-left: 1px solid var(--line);
}
.related-panel section {
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid var(--line);
}
.document-signing-active .record-body { grid-template-columns: 1fr; }
.document-signing-active .related-panel {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-top: 1px solid var(--line);
  border-left: 0;
}
.document-signing-active .related-panel section { margin-bottom: 0; }
.compact-facts { margin: 0; }
.compact-facts div { padding: 8px 10px; border-bottom: 1px solid #e6e9ee; }
.readiness-list { padding: 8px 10px; }
.readiness-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 34px;
  border-bottom: 1px solid #e8ebef;
}
.readiness-row:last-child { border-bottom: 0; }
.readiness-mark { color: var(--red); font-weight: 900; }
.readiness-row.is-complete .readiness-mark { color: var(--green); }
.readiness-row small { color: var(--muted); }
.readiness-summary { padding: 10px; color: var(--muted); line-height: 1.45; }
.readiness-summary strong { display: block; margin-bottom: 4px; color: var(--text); }
.readiness-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 20px;
  background: #fff;
  border: 1px solid var(--line);
}
.readiness-toolbar h2 { margin: 4px 0; font-size: 20px; }
.readiness-toolbar p { margin: 0; color: var(--muted); }
.launch-readiness-result {
  padding: 8px 10px;
  border: 1px solid var(--line-strong);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .06em;
}
.launch-readiness-result.is-ready {
  color: var(--green);
  background: var(--green-soft);
  border-color: #a8d0b7;
}
.launch-readiness-result.is-blocked {
  color: var(--red);
  background: var(--red-soft);
  border-color: #e2aea8;
}
.readiness-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .65fr);
  gap: 14px;
  margin-top: 14px;
}
.readiness-panel {
  min-width: 0;
  background: #fff;
  border: 1px solid var(--line);
}
.readiness-panel > header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f4f6f9;
  border-bottom: 1px solid var(--line);
}
.readiness-panel > header span { color: var(--muted); font-size: 11px; }
.launch-manual-gate {
  padding: 14px;
  border-top: 1px solid var(--line);
}
.launch-manual-gate ul { margin: 9px 0 0; padding-left: 18px; color: var(--muted); }
.launch-manual-gate li { margin: 6px 0; line-height: 1.4; }
.empty-inline { padding: 14px; color: var(--muted); }
.entry-help {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
}
.admin-dealer-access {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.admin-dealer-access label {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 10px;
  color: #454d5b;
  background: #f8f9fb;
  border: 1px solid var(--line);
  font-size: 10px;
  font-weight: 750;
}
.admin-dealer-access input { width: 16px; height: 16px; }
.estimate-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}
.estimate-choice {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) 78px;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 7px 9px;
  border: 1px solid var(--line);
  background: #fff;
}
.estimate-choice strong,
.estimate-choice small { display: block; }
.estimate-choice small { margin-top: 2px; color: var(--muted); }
.estimate-choice input[type="number"] { width: 100%; }
.authorization-summary {
  margin-bottom: 14px;
  padding: 12px;
  border-left: 3px solid var(--gold);
  background: var(--gold-soft);
  line-height: 1.5;
}
.authorization-summary strong { display: block; }
.authorization-proof {
  padding: 12px;
  color: #165c35;
  background: var(--green-soft);
  border-left: 3px solid var(--green);
}
.authorization-proof code {
  display: block;
  margin-top: 5px;
  overflow-wrap: anywhere;
  color: #36404d;
  font-size: 10px;
}
.service-version {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.service-version:last-child { border-bottom: 0; }
.service-version-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}
.service-version-header span { color: var(--muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.service-version .ledger { margin-bottom: 10px; }
.service-reconciliation { margin-bottom: 18px; }
.service-reconciliation .negative { color: var(--red); font-weight: 800; }
.print-authorization { margin-top: 9px; }

.login-shell {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: #0d1014;
}
.login-panel {
  width: min(360px, calc(100vw - 32px));
  padding: 24px;
  color: #fff;
  background: #171b21;
  border: 1px solid #383f4a;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .35);
}
.login-panel img { display: block; width: 110px; margin-bottom: 8px; }
.login-panel p { margin: 0 0 20px; color: #b6bdc9; font-weight: 700; }
.login-panel label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  margin: 10px 0;
  color: #b6bdc9;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}
.login-panel button { width: 100%; height: 38px; margin-top: 8px; font-weight: 800; }
.login-password-button { color: #211a07; background: var(--gold); border: 0; }
.login-divider { display: flex; align-items: center; gap: 9px; margin: 14px 0 2px; color: #8f98a8; font-size: 10px; font-weight: 800; text-transform: uppercase; }
.login-divider::before, .login-divider::after { content: ""; height: 1px; flex: 1; background: #3b424e; }
.login-google-button { color: #edf0f5; background: #fff; border: 1px solid #626b7b; }
.login-google-button:hover { background: #edf0f5; color: #141922; }
.form-error { min-height: 17px; color: #ff9e94; font-size: 11px; }
.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 30;
  max-width: 360px;
  padding: 10px 12px;
  color: #fff;
  background: var(--ink-2);
  border-left: 3px solid var(--gold);
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: .18s ease;
}
.toast.is-visible { opacity: 1; transform: translateY(0); }

/* Dedicated Surface-friendly reception checkout.  It uses the shared Parts
   catalog but deliberately exposes no cost, margin, receiving, or POs. */
.checkout-workspace { border: 1px solid var(--line-strong); background: var(--panel); box-shadow: var(--shadow); }
.checkout-header { display: flex; justify-content: space-between; gap: 18px; align-items: start; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.checkout-header h2 { margin: 3px 0; font-size: 23px; }.checkout-header p { margin: 0; color: var(--muted); }
.checkout-header button, .checkout-actions button, .checkout-customer-row button { min-height: 44px; padding: 0 15px; color: #333946; background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; font-weight: 750; }
.checkout-header-actions { display:flex; gap:8px; }
.checkout-inventory-panel { padding:18px 20px; border-bottom:1px solid var(--line-strong); background:#f8fbf7; }
.checkout-inventory-panel form { margin-top:14px; }
.checkout-inventory-grid { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:11px; }
.checkout-inventory-grid label { display:grid; gap:5px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.checkout-inventory-grid input, .checkout-inventory-grid select { min-height:48px; padding:9px 11px; color:var(--ink); background:#fff; border:1px solid var(--line-strong); border-radius:6px; font:inherit; }
.checkout-inventory-grid .span-2 { grid-column:span 2; }
.checkout-inventory-actions { display:flex; justify-content:flex-end; gap:10px; margin-top:14px; }
.checkout-inventory-actions button { min-height:48px; padding:0 18px; color:#333946; background:#fff; border:1px solid var(--line-strong); border-radius:6px; font-weight:800; }
.checkout-inventory-actions .primary { color:#201907; background:var(--gold); border-color:#b99229; }
.checkout-return-panel { padding:18px 20px; border-bottom:1px solid var(--line-strong); background:#fffaf0; }
.checkout-return-heading { display:flex; justify-content:space-between; gap:16px; align-items:start; }.checkout-return-heading h3 { margin:3px 0; }.checkout-return-heading p { margin:0; color:var(--muted); }
.checkout-return-heading button, .checkout-return-search button, .checkout-return-submit { min-height:38px; padding:0 13px; border:1px solid var(--line-strong); border-radius:3px; background:#fff; font-weight:800; }.checkout-return-search .primary, .checkout-return-submit { background:var(--gold); border-color:#b99229; }
.checkout-return-search { display:grid; grid-template-columns:minmax(220px,1fr) auto; gap:8px; margin-top:14px; }.checkout-return-search input, .checkout-return-form input, .checkout-return-form select, .checkout-return-form textarea { min-height:40px; padding:8px 10px; border:1px solid var(--line-strong); border-radius:3px; background:#fff; font:inherit; }
.checkout-return-card { margin-top:12px; padding:13px; border:1px solid var(--line); background:#fff; }.checkout-return-card-head { display:flex; justify-content:space-between; gap:12px; align-items:center; }.checkout-return-card-head small { display:block; margin-top:3px; color:var(--muted); }
.checkout-return-line { display:grid; grid-template-columns:minmax(0,1fr) 90px 120px; gap:10px; align-items:center; padding:10px 0; border-top:1px solid var(--line); }.checkout-return-line label, .checkout-return-fields label { display:grid; gap:4px; color:var(--muted); font-size:10px; font-weight:800; text-transform:uppercase; }.checkout-return-line .restock { display:flex; align-items:center; gap:7px; }.checkout-return-line .restock input { min-height:auto; }
.checkout-return-fields { display:grid; grid-template-columns:160px minmax(180px,1fr) minmax(240px,2fr); gap:10px; margin-top:12px; }.checkout-return-form-actions { display:flex; justify-content:flex-end; align-items:center; gap:12px; margin-top:12px; }.checkout-return-total { font-size:17px; font-weight:800; }
.checkout-layout { display: grid; grid-template-columns: minmax(300px, 1.15fr) minmax(360px, .85fr); min-height: 560px; }
.checkout-catalog { padding: 18px; border-right: 1px solid var(--line); background:#f7f8fa; }.checkout-search { display: grid; gap: 6px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }.checkout-search input, .checkout-customer-row select, .checkout-guest-fields input, .checkout-totals input, .checkout-payment input, .checkout-payment select { min-height: 48px; padding: 9px 12px; color: var(--ink); background: #fff; border: 1px solid var(--line-strong); border-radius: 6px; font: inherit; }
.checkout-categories { display:flex; gap:8px; margin:14px 0; padding-bottom:4px; overflow-x:auto; overscroll-behavior-x:contain; scrollbar-width:thin; }.checkout-categories button { flex:0 0 auto; min-height:52px; padding:7px 14px; color:var(--ink); background:#fff; border:1px solid var(--line-strong); border-radius:9px; font:inherit; font-weight:800; }.checkout-categories button span { margin-right:7px; font-size:20px; vertical-align:middle; }.checkout-categories button[aria-pressed="true"] { color:#201907; background:var(--gold); border-color:#a77f17; box-shadow:0 2px 7px rgba(101,74,8,.18); }
.checkout-shirt-picker { padding:16px; margin:0 0 14px; background:#fff; border:1px solid var(--line-strong); border-radius:10px; }
.checkout-shirt-picker[hidden] { display:none; }
.checkout-shirt-heading { display:flex; gap:12px; align-items:center; }.checkout-shirt-heading h3 { margin:0; font-size:18px; }.checkout-shirt-heading p { margin:3px 0 0; color:var(--muted); font-size:12px; }
.checkout-shirt-step { margin-top:17px; }.checkout-shirt-step > strong { display:block; margin-bottom:8px; font-size:12px; }.checkout-shirt-options { display:flex; flex-wrap:wrap; gap:8px; }
.checkout-shirt-options button { display:grid; gap:2px; min-height:46px; padding:8px 13px; color:var(--ink); background:#fff; border:1px solid var(--line-strong); border-radius:7px; font:inherit; font-weight:800; text-align:left; touch-action:manipulation; }.checkout-shirt-options button:hover, .checkout-shirt-options button:focus-visible { border-color:#a77f17; outline:2px solid #f5d981; outline-offset:1px; }.checkout-shirt-options button[aria-pressed="true"] { color:#201907; background:var(--gold); border-color:#a77f17; }.checkout-shirt-options small { color:var(--muted); font-size:11px; font-weight:600; }.checkout-shirt-prompt { margin:15px 0 0; color:var(--muted); font-size:12px; }
.checkout-results { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:12px; margin-top:8px; align-content:start; }.checkout-product { position:relative; display:grid; grid-template-rows:52px auto auto 1fr; gap:5px; min-height:150px; padding:13px; color:var(--ink); text-align:left; background:#fff; border:1px solid var(--line); border-radius:10px; box-shadow:0 2px 5px rgba(21,26,36,.07); touch-action:manipulation; }.checkout-product:hover, .checkout-product:focus-visible { border-color:#b99229; box-shadow:0 4px 12px rgba(73,55,13,.15); outline:none; }.checkout-product:active { transform:translateY(1px); background:#fffaf0; }.checkout-product-icon { display:grid; place-items:center; width:48px; height:48px; color:#251d09; background:#f5d981; border-radius:12px; font-size:26px; line-height:1; }.checkout-product-name { min-height:38px; font-weight:850; line-height:1.22; }.checkout-product-meta { color:var(--muted); font-size:11px; line-height:1.3; }.checkout-product-price { align-self:end; color:#231b06; font-size:21px; font-weight:900; }.checkout-empty-catalog { grid-column:1/-1; padding:52px 24px; background:#fff; border:1px dashed var(--line-strong); border-radius:9px; }
.checkout-cart { padding: 18px; background: #fcfcfd; }.checkout-customer-row { display: grid; grid-template-columns: 1fr auto; gap: 8px; align-items: end; }.checkout-customer-row label, .checkout-guest-fields label, .checkout-payment label { display: grid; gap: 5px; color: var(--muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }.checkout-guest-fields, .checkout-payment { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 10px; }.checkout-payment { grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1.4fr); }
.checkout-cart-lines { margin-top: 17px; border-top: 1px solid var(--line); }.checkout-line { display:grid; grid-template-columns:minmax(0,1fr) 126px 84px 92px; gap:9px; align-items:center; padding:12px 0; border-bottom:1px solid var(--line); }.checkout-line small { display:block; margin-top:3px; color:var(--muted); }.checkout-quantity { display:grid; grid-template-columns:40px 46px 40px; align-items:center; }.checkout-quantity input { width:100%; min-height:42px; border:1px solid var(--line-strong); border-width:1px 0; border-radius:0; padding:5px 2px; text-align:center; }.checkout-quantity button { width:40px; height:42px; color:var(--ink); background:#fff; border:1px solid var(--line-strong); border-radius:6px 0 0 6px; font-size:22px; font-weight:800; }.checkout-quantity button:last-child { border-radius:0 6px 6px 0; }.checkout-line-actions { display:flex; gap:5px; }.checkout-line-actions button { height:40px; color:#333946; background:#fff; border:1px solid var(--line-strong); border-radius:6px; font-weight:800; }.checkout-line-actions button[data-checkout-price] { padding:0 8px; font-size:11px; }.checkout-line-actions button[data-checkout-remove] { width:40px; color:var(--red); font-size:20px; }.checkout-empty { padding:28px 0; color:var(--muted); text-align:center; }
.checkout-totals { display: grid; grid-template-columns: 1fr 118px; gap: 8px 12px; align-items: center; margin-top: 14px; padding: 14px 0; border-bottom: 1px solid var(--line); }.checkout-totals strong { text-align: right; font-size: 15px; }.checkout-totals label { display: contents; color: var(--muted); }.checkout-totals label input { grid-column: 2; width: 100%; text-align: right; }.checkout-totals > span:last-of-type, .checkout-totals > strong:last-child { padding-top: 8px; border-top: 1px solid var(--line-strong); font-size: 18px; }
.checkout-actions { display:flex; justify-content:end; gap:8px; margin-top:14px; }.checkout-actions .primary { min-width:210px; min-height:54px; color:#201907; background:var(--gold); border-color:#b99229; font-size:16px; }.checkout-service { margin-top:18px; padding-top:14px; border-top:1px solid var(--line); }.checkout-service h3 { margin:0 0 8px; font-size:13px; }.checkout-service-row { display:grid; grid-template-columns:1fr auto; gap:10px; padding:7px 0; color:var(--muted); border-bottom:1px solid var(--line); }.checkout-service-row strong { color:var(--text); }
.pricing-calculator { display:grid; align-content:end; gap:5px; padding-bottom:2px; }.pricing-calculator button { min-height:38px; color:#201907; background:var(--gold); border:1px solid #b99229; border-radius:3px; font-weight:800; }.pricing-calculator small { color:var(--muted); font-size:11px; line-height:1.3; }
.checkout-printer-settings { display:flex; align-items:end; gap:10px; margin-top:12px; flex-wrap:wrap; }
.checkout-printer-settings label { display:grid; gap:5px; min-width:190px; color:var(--muted); font-size:10px; font-weight:800; letter-spacing:.04em; text-transform:uppercase; }
.checkout-printer-settings select { min-height:44px; padding:8px 11px; color:var(--ink); background:#fff; border:1px solid var(--line-strong); border-radius:6px; font:inherit; }
.checkout-printer-settings button { min-height:44px; padding:0 12px; color:#333946; background:#fff; border:1px solid var(--line-strong); border-radius:6px; font-weight:750; }
.checkout-printer-settings a { align-self:center; color:#185b93; font-size:12px; font-weight:700; }
.checkout-printer-status { margin-top:8px; color:var(--muted); font-size:12px; }
.checkout-printer-status.is-error { color:var(--red); font-weight:700; }
@media (max-width: 1180px) { .checkout-results { grid-template-columns:repeat(2,minmax(0,1fr)); }.checkout-layout { grid-template-columns:minmax(360px,1fr) minmax(350px,.88fr); } }
@media (max-width: 900px) { .checkout-layout { grid-template-columns:1fr; }.checkout-catalog { border-right:0; border-bottom:1px solid var(--line); }.checkout-results { grid-template-columns:repeat(3,minmax(0,1fr)); max-height:480px; overflow:auto; }.checkout-payment { grid-template-columns:1fr 1fr; }.checkout-payment label:last-child { grid-column:1/-1; } }
@media (max-width: 900px) { .checkout-inventory-grid { grid-template-columns:repeat(2,minmax(0,1fr)); } }
@media (max-width: 620px) { .checkout-header { padding:14px; }.checkout-header p { display:none; }.checkout-catalog, .checkout-cart { padding:12px; }.checkout-results { grid-template-columns:repeat(2,minmax(0,1fr)); }.checkout-guest-fields, .checkout-payment { grid-template-columns:1fr; }.checkout-payment label:last-child { grid-column:auto; }.checkout-line { grid-template-columns:minmax(0,1fr) 126px 92px; }.checkout-line > strong { display:none; } }
@media (max-width: 620px) { .checkout-header-actions { flex-direction:column; }.checkout-return-panel { padding:12px; }.checkout-return-search, .checkout-return-fields { grid-template-columns:1fr; }.checkout-return-line { grid-template-columns:1fr 80px 110px; } }
@media (max-width: 620px) { .checkout-inventory-panel { padding:12px; }.checkout-inventory-grid { grid-template-columns:1fr; }.checkout-inventory-grid .span-2 { grid-column:auto; } }

/* The persistent application rail leaves less than 1180px of usable workspace
   on a 1280px display, so collapse record/detail panes before they collide. */
@media (max-width: 1320px) {
  .readiness-columns { grid-template-columns: 1fr; }
  .dashboard-workspace { grid-template-columns: minmax(0, 1fr) 300px; }
  .dashboard-email-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dashboard-email { border-bottom: 1px solid #e7eaf0; }
  .triage-layout { grid-template-columns: 1fr; }
  .triage-list { max-height: 260px; border-right: 0; border-bottom: 1px solid var(--line); }
  .register-layout { grid-template-columns: 1fr; }
  .register-pane { border-right: 0; }
  .record-pane { border-top: 1px solid var(--line-strong); }
  .record-body { grid-template-columns: 1fr; }
  .related-panel { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 900px) {
  .report-layout { grid-template-columns: 1fr; }
  .report-catalog {
    display: flex;
    gap: 5px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line-strong);
  }
  .report-catalog-heading { display: none; }
  .report-catalog button { min-width: 165px; margin: 0; }
  .report-period { grid-template-columns: 1fr 1fr auto; }
  .report-period span { grid-column: 1 / -1; text-align: left; }
  .app-shell { grid-template-columns: 58px minmax(0, 1fr); }
  .module-rail button { overflow: hidden; text-indent: -999px; }
  .module-rail p { visibility: hidden; height: 6px; margin: 4px; }
  .module-rail button::after { content: attr(data-module); position: absolute; inset: 0; display: grid; place-items: center; text-indent: 0; font-size: 8px; text-transform: uppercase; }
  .identity { display: none; }
  .entry-grid-4, .entry-grid-transaction { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erp-stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .estimate-choice-grid { grid-template-columns: 1fr; }
  .dashboard-workspace { grid-template-columns: 1fr; }
  .dashboard-rail { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 620px) {
  .readiness-toolbar { display: block; padding: 14px 12px; }
  .launch-readiness-result { display: inline-block; margin-top: 12px; }
  .admin-view-switch { max-width: 100%; overflow-x: auto; }
  .admin-view-switch button { min-width: max-content; }
  .report-period { grid-template-columns: 1fr 1fr; }
  .report-period button { grid-column: 1 / -1; }
  .report-output { padding: 10px 8px; }
  .report-output-heading { display: block; }
  .report-output-heading .status-chip { display: inline-block; margin-top: 8px; }
  .app-shell { display: block; }
  .topbar { min-height: 56px; padding: 0 10px; }
  .brand span, .module-rail { display: none; }
  .topbar-tools { gap: 7px; }
  .location-switch button { padding: 0 7px; font-size: 10px; }
  .workspace { padding: 12px 8px; }
  .workspace-header { align-items: flex-start; }
  .record-commands button:not(.primary) { display: none; }
  .filter-bar { grid-template-columns: 1fr 120px; }
  .filter-bar button { display: none; }
  .field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-inline-form { grid-template-columns: 1fr; }
  .record-inline-form .span-2 { grid-column: span 1; }
  .related-panel { grid-template-columns: 1fr; }
  .entry-toolbar { align-items: flex-start; padding: 14px 12px; }
  .entry-toolbar p { display: none; }
  .entry-section { padding: 14px 12px 16px; }
  .entry-grid-4, .entry-grid-transaction { grid-template-columns: 1fr; }
  .entry-grid .span-2 { grid-column: span 1; }
  .advisor-form { align-items: stretch; flex-direction: column; }
  .advisor-history .advisor-history-row { grid-template-columns: 1fr; gap: 5px; }
  .dashboard-rail, .dashboard-email-grid { grid-template-columns: 1fr; }
  .dashboard-list-row { grid-template-columns: 28px minmax(0, 1fr); }
  .dashboard-list-count { grid-column: 2; }
  .dashboard-panel-heading { padding: 12px; }
  .erp-stat-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .erp-ledger-row { grid-template-columns: minmax(95px, .8fr) minmax(60px, .4fr) minmax(110px, 1fr); }
  .erp-ledger-row > span:last-child { display: none; }
}
