/* Gearhub unified Google Cloud / Material 3 enterprise theme. */

body.platform-google-theme {
  color-scheme: light;
  --gh-on-surface: #202124;
  --gh-surface-top: #ffffff;
  --gh-surface-nav: #ffffff;
  --gh-surface-hover: #f1f3f4;
  --gh-primary: #1a73e8;
  --gh-primary-strong: #0b57d0;
  --gh-primary-soft: #e8f0fe;
  --gh-blue-600: #0b57d0;
  --gh-blue-700: #0842a0;
  --gh-blue-100: #e8f0fe;
  --gh-green-600: #188038;
  --gh-green-100: #e6f4ea;
  --gh-red-600: #d93025;
  --gh-red-100: #fce8e6;
  --gh-amber-700: #b06000;
  --gh-canvas: #f8fafd;
  --gh-surface: #ffffff;
  --gh-surface-muted: #f1f3f4;
  --gh-border: #dadce0;
  --gh-border-strong: #bdc1c6;
  --gh-text: #202124;
  --gh-muted: #5f6368;
  --gh-shadow: 0 1px 2px rgb(60 64 67 / 12%), 0 1px 3px 1px rgb(60 64 67 / 6%);
  --bg: var(--gh-canvas);
  --panel: var(--gh-surface);
  --panel-strong: var(--gh-surface-muted);
  --text: var(--gh-text);
  --muted: var(--gh-muted);
  --line: var(--gh-border);
  --accent: var(--gh-green-600);
  --accent-2: var(--gh-blue-600);
  --warning: var(--gh-amber-700);
  --danger: var(--gh-red-600);
  --shadow: var(--gh-shadow);
  --glow: none;
  min-width: 320px;
  margin: 0;
  background: var(--gh-canvas);
  color: var(--gh-text);
  font-family: "Google Sans", Roboto, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  font-size: 14px;
  line-height: 1.45;
}

body.platform-google-theme,
body.platform-google-theme * {
  box-sizing: border-box;
  letter-spacing: 0;
}

body.platform-google-theme a {
  color: var(--gh-blue-600);
  text-decoration: none;
}

body.platform-google-theme a:hover {
  color: var(--gh-blue-700);
  text-decoration: underline;
}

body.platform-google-theme :is(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid #a8c7fa;
  outline-offset: 2px;
}

body.platform-google-theme :is(button, input, select, textarea) {
  font: inherit;
}

/* Google Cloud-style application shell */
body.platform-google-theme header.platform-google-header {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: max-content minmax(320px, 1fr) max-content;
  grid-template-rows: 64px 44px;
  min-height: 108px;
  align-items: center;
  gap: 0 22px;
  border: 0;
  border-bottom: 1px solid var(--gh-border);
  padding: 0 max(18px, calc((100vw - 1480px) / 2));
  background: var(--gh-surface-top);
  box-shadow: 0 1px 2px rgb(60 64 67 / 12%);
  backdrop-filter: none;
}

.platform-google-header > .brand {
  grid-row: 1;
  grid-column: 1;
}

.platform-google-header .brand {
  display: flex;
  min-width: max-content;
  align-items: center;
  gap: 10px;
  color: #3c4043;
  font-size: 20px;
  font-weight: 600;
}

.platform-google-header .brand:hover {
  color: #202124;
  text-decoration: none;
}

.platform-google-header .brand-mark {
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  position: relative;
  border: 0;
  border-radius: 8px;
  background: #1a73e8;
  box-shadow: 0 1px 2px rgb(60 64 67 / 22%);
  color: #ffffff;
  font-size: 20px;
  font-weight: 700;
}

.platform-google-header .brand-mark::after {
  position: absolute;
  right: -2px;
  bottom: -2px;
  width: 10px;
  height: 10px;
  border: 2px solid #ffffff;
  border-radius: 50%;
  background: #34a853;
  content: "";
}

.platform-google-header .brand > span:last-child {
  display: grid;
  min-width: 0;
}

.platform-google-header .brand small {
  color: #80868b;
  font-size: 10px;
  font-weight: 500;
}

.platform-global-search {
  display: grid;
  height: 46px;
  min-width: 0;
  grid-row: 1;
  grid-column: 2;
  grid-template-columns: 132px minmax(0, 1fr) 74px;
  align-items: stretch;
  border: 1px solid transparent;
  border-radius: 8px;
  background: #f1f3f4;
  box-shadow: none;
}

.platform-global-search:focus-within {
  border-color: #a8c7fa;
  background: #ffffff;
  box-shadow: 0 1px 2px rgb(60 64 67 / 18%);
}

.platform-global-search :is(select, input, button) {
  min-width: 0;
  min-height: 44px;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  outline: 0;
}

.platform-global-search select {
  border-right: 1px solid var(--gh-border);
  border-radius: 8px 0 0 8px;
  padding: 0 28px 0 10px;
  background: #edf2fa;
  color: #3c4043;
  font-size: 12px;
}

.platform-global-search input {
  padding: 0 13px;
  background: transparent;
  color: var(--gh-text);
  font-size: 14px;
}

.platform-global-search button {
  border-left: 1px solid #d2e3fc;
  border-radius: 0 8px 8px 0;
  background: transparent;
  color: var(--gh-primary-strong);
  font-size: 13px;
  font-weight: 750;
  cursor: pointer;
}

.platform-global-search button:hover {
  background: var(--gh-primary-soft);
}

.platform-google-header > .header-actions,
.platform-google-header .platform-account-cluster {
  display: flex;
  width: auto;
  min-width: max-content;
  grid-row: 1;
  grid-column: 3;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.platform-google-header :is(.auth-status, .auth-button, .icon-button, .language-switch, .platform-density-toggle) {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  box-shadow: none;
  color: #3c4043;
  font-size: 12px;
}

.platform-google-header :is(.auth-button, .icon-button, .platform-density-toggle) {
  justify-content: center;
  padding: 0 9px;
  cursor: pointer;
}

.platform-google-header :is(.auth-status, .language-switch) {
  padding: 0 8px;
}

.platform-google-header :is(.auth-status, .auth-button, .icon-button, .language-switch, .platform-density-toggle):hover {
  border-color: #d2e3fc;
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
  text-decoration: none;
}

.platform-google-header .language-switch select {
  width: 66px;
  min-height: 30px;
  flex-basis: 66px;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  padding: 0 5px;
  background: #ffffff;
  color: var(--gh-text);
}

.platform-google-header .icon-button {
  display: none;
}

.platform-google-header > .topnav {
  display: flex;
  width: 100%;
  max-width: none;
  min-height: 44px;
  grid-row: 2;
  grid-column: 1 / -1;
  align-items: stretch;
  gap: 0;
  overflow-x: auto;
  border: 0;
  border-top: 1px solid #f1f3f4;
  border-radius: 0;
  padding: 0;
  background: var(--gh-surface-nav);
  scrollbar-width: thin;
}

.platform-google-header .topnav a {
  display: inline-flex;
  min-width: max-content;
  min-height: 44px;
  flex: 0 0 auto;
  align-items: center;
  border: 0;
  border-bottom: 3px solid transparent;
  border-radius: 0;
  padding: 0 15px;
  background: transparent;
  color: #3c4043;
  font-size: 12px;
  font-weight: 500;
}

.platform-google-header .topnav a:hover {
  border-bottom-color: #a8c7fa;
  background: var(--gh-surface-hover);
  color: var(--gh-primary-strong);
  text-decoration: none;
}

.platform-google-header .topnav a.is-active,
.platform-google-header .topnav a[aria-current="page"] {
  border-bottom-color: var(--gh-primary);
  background: #ffffff;
  color: var(--gh-primary-strong);
}

.platform-google-header .topnav .platform-flow-link {
  color: #5f6368;
  font-weight: 500;
}

.platform-nav-divider {
  width: 1px;
  min-width: 1px;
  height: 22px;
  align-self: center;
  margin: 0 4px;
  background: var(--gh-border);
}

.platform-industrial-utility {
  display: none !important;
}

/* Workflow and operational context */
body.platform-google-theme .platform-command-bar {
  display: grid !important;
  grid-template-columns: minmax(135px, 0.55fr) minmax(500px, 2fr) minmax(120px, auto) minmax(245px, auto);
  min-height: 56px;
  align-items: center;
  gap: 12px;
  margin: 0 0 12px;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  padding: 7px 12px;
  background: var(--gh-surface);
  box-shadow: 0 1px 2px rgb(60 64 67 / 8%);
}

.platform-context {
  display: grid;
  min-width: 0;
  gap: 1px;
}

.platform-context span {
  color: var(--gh-muted);
  font-size: 9px;
  text-transform: uppercase;
}

.platform-context strong {
  overflow: hidden;
  color: var(--gh-text) !important;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.platform-design-flow {
  display: flex;
  min-width: 0;
  align-items: stretch;
  overflow-x: auto;
  border-right: 1px solid #e8eaed;
  border-left: 1px solid #e8eaed;
  scrollbar-width: thin;
}

.platform-design-flow a {
  display: inline-flex;
  min-width: max-content;
  min-height: 38px;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  gap: 5px;
  padding: 0 9px;
  color: var(--gh-blue-600);
  font-size: 11px;
  font-weight: 500;
}

.platform-design-flow a + a {
  border-left: 1px solid #e8eaed;
}

.platform-design-flow a:hover,
.platform-design-flow a[aria-current="step"] {
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
  text-decoration: none;
}

.platform-design-flow a span {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border-radius: 50%;
  background: #edf2fa;
  color: var(--gh-primary-strong);
  font-size: 9px;
  font-weight: 700;
}

.platform-design-flow a[aria-current="step"] span {
  background: var(--gh-primary);
  color: #ffffff;
}

.platform-design-flow a strong {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
}

body.platform-google-theme .platform-services,
body.platform-google-theme .platform-operations {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 5px;
  overflow-x: auto;
  white-space: nowrap;
}

body.platform-google-theme :is(.platform-service, .platform-environment, .platform-readiness) {
  display: inline-flex;
  min-height: 26px;
  align-items: center;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  padding: 0 7px;
  background: #ffffff;
  color: var(--gh-muted);
  font-size: 9px;
}

.platform-service i {
  width: 7px;
  height: 7px;
  margin-right: 5px;
  border-radius: 50%;
  background: var(--gh-primary);
}

.platform-service.is-online i,
.platform-readiness.is-ready {
  border-color: #9dcdbf;
  background: var(--gh-green-100);
  color: var(--gh-green-600);
}

.platform-service.is-online i {
  background: var(--gh-green-600);
}

.platform-service.is-offline i {
  background: var(--gh-red-600);
}

body.platform-google-theme .platform-operations > span:first-child {
  color: var(--gh-muted);
  font-size: 9px;
}

/* Shared controls and content surfaces */
body.platform-google-theme > main:not(.account-shell),
body.platform-google-theme .plm-app-shell,
body.platform-google-theme.operations-center-page main,
body.platform-google-theme.engineering-integrated-page main {
  width: min(1480px, calc(100% - 32px));
  margin-inline: auto;
  padding-top: 14px;
}

body.platform-google-theme .page-head {
  min-height: 78px;
  align-items: center;
  gap: 18px;
  margin: 0 0 12px;
  border: 0;
  border-bottom: 1px solid var(--gh-border);
  border-radius: 0;
  padding: 8px 2px 14px;
  background: transparent;
  box-shadow: none;
}

body.platform-google-theme .page-head h1 {
  margin: 0;
  color: var(--gh-text);
  font-size: 24px;
  font-weight: 500;
  line-height: 1.2;
  text-shadow: none;
}

body.platform-google-theme :is(.eyebrow, .section-kicker) {
  margin: 0 0 3px;
  color: var(--gh-primary-strong);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
}

body.platform-google-theme .page-subtitle {
  max-width: 860px;
  margin: 4px 0 0;
  color: var(--gh-muted);
  font-size: 12px;
  line-height: 1.55;
}

body.platform-google-theme .page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

body.platform-google-theme :is(.button, .small-button, .auth-button, .object-actions button) {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--gh-border-strong);
  border-radius: 8px;
  padding: 7px 13px;
  background: #ffffff;
  box-shadow: none;
  color: var(--gh-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  transform: none;
  cursor: pointer;
}

body.platform-google-theme :is(.button, .small-button, .object-actions button):hover {
  border-color: #a8c7fa;
  background: #f8fafd;
  box-shadow: none;
  color: var(--gh-primary-strong);
  text-decoration: none;
  transform: none;
}

body.platform-google-theme :is(.button.primary, button.primary, .object-actions button.primary) {
  border-color: var(--gh-primary);
  background: var(--gh-primary);
  color: #ffffff;
}

body.platform-google-theme :is(.button.primary, button.primary, .object-actions button.primary):hover {
  border-color: var(--gh-primary-strong);
  background: var(--gh-primary-strong);
  color: #ffffff;
}

body.platform-google-theme :is(.button.secondary, button.secondary) {
  border-color: var(--gh-border-strong);
  background: #ffffff;
  color: var(--gh-text);
}

body.platform-google-theme :is(.button.danger, button.danger, .is-danger) {
  border-color: #d8a093;
  background: var(--gh-red-100);
  color: var(--gh-red-600);
}

body.platform-google-theme :is(button, .button)[disabled] {
  opacity: 0.48;
  cursor: not-allowed;
}

body.platform-google-theme :is(input, select, textarea):not([type="checkbox"]):not([type="radio"]) {
  min-height: 40px;
  border: 1px solid var(--gh-border-strong);
  border-radius: 8px;
  padding: 7px 10px;
  background: #ffffff;
  color: var(--gh-text);
  box-shadow: none;
}

body.platform-google-theme textarea {
  line-height: 1.5;
  resize: vertical;
}

body.platform-google-theme :is(input, select, textarea):focus {
  border-color: var(--gh-primary);
  box-shadow: 0 0 0 2px rgb(26 115 232 / 18%);
  outline: 0;
}

body.platform-google-theme :is(input, select, textarea)::placeholder {
  color: #747b7b;
}

body.platform-google-theme :is(input[type="checkbox"], input[type="radio"]) {
  width: 17px;
  height: 17px;
  accent-color: var(--gh-blue-600);
}

body.platform-google-theme :is(
  .metrics,
  .app-shell,
  .es-admin-page,
  .nas-panel,
  .agent-flow,
  .agent-panel,
  .operations-control-metrics,
  .operations-workspace,
  .engx-commandbar,
  .engx-shell,
  .plm-module-bar,
  .plm-workbench-toolbar,
  .plm-smartbar,
  .plm-workbench,
  .pm-layout
) {
  border-color: var(--gh-border);
  border-radius: 8px;
  background: var(--gh-surface);
  box-shadow: var(--gh-shadow);
}

body.platform-google-theme :is(
  .side-panel,
  .content-panel,
  .detail-panel,
  .es-admin-card,
  .es-ops-panel,
  .agent-column,
  .agent-result-card,
  .agent-alt-card,
  .auth-dialog,
  .file-dialog
) {
  border-color: var(--gh-border);
  border-radius: 8px;
  background: var(--gh-surface);
  box-shadow: none;
  backdrop-filter: none;
}

body.platform-google-theme :is(.metrics, .operations-control-metrics) {
  overflow: hidden;
  margin-bottom: 12px;
}

body.platform-google-theme :is(.metrics, .operations-control-metrics) article {
  min-height: 76px;
  border-color: var(--gh-border);
  padding: 11px 14px;
}

body.platform-google-theme :is(.metrics, .operations-control-metrics) :is(span, small) {
  color: var(--gh-muted);
  font-size: 10px;
}

body.platform-google-theme :is(.metrics, .operations-control-metrics) strong {
  color: var(--gh-text);
  font-size: 20px;
  font-weight: 500;
  text-shadow: none;
}

body.platform-google-theme :is(table, .object-table, .operations-table, .pm-data-table, .bom-table, .plm-eco-table) {
  border-color: var(--gh-border);
  background: var(--gh-surface);
  color: var(--gh-text);
}

body.platform-google-theme :is(table, .object-table, .operations-table, .pm-data-table, .bom-table, .plm-eco-table) :is(th, [role="columnheader"]) {
  border-color: var(--gh-border);
  background: #f8fafd;
  color: #3c4043;
  font-size: 11px;
  font-weight: 600;
}

body.platform-google-theme :is(table, .object-table, .operations-table, .pm-data-table, .bom-table, .plm-eco-table) :is(th, td, [role="cell"], [role="columnheader"]) {
  border-color: var(--gh-border);
}

body.platform-google-theme :is(table, .object-table, .operations-table, .pm-data-table, .bom-table, .plm-eco-table) tbody tr:hover {
  background: #f5f9fc;
}

body.platform-google-theme :is(.toolbar, .module-tabs, .engx-module-strip, .plm-subnav, .pm-view-toolbar) {
  border-color: var(--gh-border);
  background: var(--gh-surface-muted);
  box-shadow: none;
}

body.platform-google-theme :is(.module-tabs a.active, .engx-module-strip .is-active, .plm-subnav a.active) {
  border-bottom-color: var(--gh-primary);
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
}

body.platform-google-theme :is(.ossd-message, .account-form-message, [role="alert"]) {
  border-radius: 8px;
}

/* Work console */
body.workspace-home-page.platform-google-theme {
  --home-blue: var(--gh-blue-600);
  --home-green: var(--gh-green-600);
  --home-yellow: var(--gh-primary);
  --home-red: var(--gh-red-600);
  --home-canvas: var(--gh-canvas);
  --home-surface: var(--gh-surface);
  --home-subtle: var(--gh-surface-muted);
  --home-line: var(--gh-border);
  --home-text: var(--gh-text);
  --home-muted: var(--gh-muted);
}

.platform-google-theme .workspace-home-head {
  min-height: 86px !important;
}

.platform-google-theme .workspace-home-role {
  min-height: 38px;
  border: 1px solid #a9cfc3;
  border-left: 4px solid var(--gh-green-600);
  border-radius: 8px;
  background: var(--gh-green-100);
  color: var(--gh-green-600);
}

.platform-google-theme .workspace-home-metrics,
.platform-google-theme :is(.workspace-home-section, .workspace-access-panel, .workspace-scope-panel, .workspace-decision-panel, .workspace-quick-panel) {
  overflow: hidden;
  border-color: var(--gh-border);
  border-radius: 8px;
  background: var(--gh-surface);
  box-shadow: var(--gh-shadow);
}

.platform-google-theme .workspace-home-metrics article,
.platform-google-theme .workspace-section-heading,
.platform-google-theme .workspace-workflow,
.platform-google-theme .workspace-queue-row,
.platform-google-theme .workspace-decision-row,
.platform-google-theme .workspace-quick-links a,
.platform-google-theme .workspace-access-list > div,
.platform-google-theme .workspace-scope-list li {
  border-color: var(--gh-border);
}

.platform-google-theme .workspace-section-heading > div > span,
.platform-google-theme .workspace-workflow-copy > span {
  color: var(--gh-primary-strong);
}

.platform-google-theme .workspace-workflow-index {
  border-color: #a8c7fa;
  border-radius: 8px;
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
}

.platform-google-theme .workspace-workflow[data-workflow="engineering"] .workspace-workflow-index {
  border-color: #a9c9e4;
  background: var(--gh-blue-100);
  color: var(--gh-blue-600);
}

.platform-google-theme .workspace-workflow[data-workflow="operations"] .workspace-workflow-index {
  border-color: #a9cfc3;
  background: var(--gh-green-100);
  color: var(--gh-green-600);
}

.platform-google-theme .workspace-queue-row:hover {
  background: #f5f9fc;
}

.platform-google-theme .workspace-queue-row em {
  border-color: #a9cfc3;
  border-radius: 8px;
  background: var(--gh-green-100);
  color: var(--gh-green-600);
}

.platform-google-theme .workspace-home-metrics article.has-risk strong {
  color: var(--gh-red-600);
}

.platform-google-theme .workspace-queue-row.is-overdue .workspace-queue-state {
  background: var(--gh-red-600);
}

.platform-google-theme .workspace-queue-row.is-overdue em {
  border-color: #efb7b2;
  background: var(--gh-red-100);
  color: var(--gh-red-600);
}

.platform-google-theme .workspace-queue-row.is-review .workspace-queue-state {
  background: var(--gh-primary);
}

.workspace-value-flows .workspace-workflow {
  min-height: 96px;
}

.workspace-decision-panel,
.workspace-quick-panel {
  min-width: 0;
  border: 1px solid var(--home-line);
  background: var(--home-surface);
}

.workspace-decision-list,
.workspace-quick-links {
  display: grid;
}

.workspace-decision-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  min-height: 64px;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--home-line);
  padding: 10px 13px;
  color: var(--home-text);
}

.workspace-decision-row:last-child,
.workspace-quick-links a:last-child {
  border-bottom: 0;
}

.workspace-decision-row:hover,
.workspace-quick-links a:hover {
  background: #f5f9fc;
}

.workspace-decision-row > span:first-child {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.workspace-decision-row strong,
.workspace-decision-row small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workspace-decision-row strong {
  font-size: 12px;
}

.workspace-decision-row small {
  color: var(--home-muted);
  font-size: 9px;
}

.workspace-decision-row em {
  padding: 4px 7px;
  border: 1px solid var(--gh-border);
  border-radius: 5px;
  color: var(--gh-muted);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
}

.workspace-decision-row em[data-state="review-required"] {
  border-color: #f4c7a1;
  background: #fef7e0;
  color: #9a4f00;
}

.workspace-decision-row em[data-state="approved"],
.workspace-decision-row em[data-state="submitted"] {
  border-color: #a9cfc3;
  background: var(--gh-green-100);
  color: var(--gh-green-600);
}

.workspace-quick-links a {
  display: flex;
  min-height: 46px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--home-line);
  padding: 9px 13px;
  color: var(--home-text);
  font-size: 11px;
}

.workspace-quick-links a > span {
  color: var(--gh-primary-strong);
  font-size: 15px;
}

@media (max-width: 620px) {
  .workspace-decision-row {
    grid-template-columns: minmax(0, 1fr) auto;
  }
}

/* Engineering, operations, and storage */
body.platform-google-theme.engineering-integrated-page {
  --engx-canvas: var(--gh-canvas);
  --engx-surface: var(--gh-surface);
  --engx-surface-muted: var(--gh-surface-muted);
  --engx-sidebar: #f8fafd;
  --engx-text: var(--gh-text);
  --engx-muted: var(--gh-muted);
  --engx-line: var(--gh-border);
  --engx-blue: var(--gh-blue-600);
  --engx-green: var(--gh-green-600);
  --engx-amber: var(--gh-primary-strong);
  --engx-red: var(--gh-red-600);
}

body.platform-google-theme.operations-center-page {
  --ops-canvas: var(--gh-canvas);
  --ops-surface: var(--gh-surface);
  --ops-surface-muted: var(--gh-surface-muted);
  --ops-text: var(--gh-text);
  --ops-muted: var(--gh-muted);
  --ops-line: var(--gh-border);
  --ops-blue: var(--gh-blue-600);
  --ops-green: var(--gh-green-600);
  --ops-amber: var(--gh-primary-strong);
  --ops-red: var(--gh-red-600);
}

body.platform-google-theme.operations-center-page .operations-workspace.operations-workspace-simplified {
  grid-template-columns: minmax(0, 1fr);
}

body.platform-google-theme.operations-center-page .operations-view-tabs {
  overflow-x: auto;
  border-color: var(--gh-border);
  border-radius: 8px;
  background: var(--gh-surface);
}

body.platform-google-theme.operations-center-page .operations-view-tabs > button.is-active {
  border-bottom-color: var(--gh-primary);
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
}

@media (max-width: 760px) {
  body.platform-google-theme.operations-center-page .operations-view-tabs > button {
    min-width: 92px;
    padding: 0 12px;
  }

  body.platform-google-theme.operations-center-page .operations-view-tabs > span {
    display: none;
  }
}

body.platform-google-theme.pdm-pm-page {
  --pm-bg: var(--gh-surface);
  --pm-sidebar: #f8fafd;
  --pm-subtle: var(--gh-surface-muted);
  --pm-hover: var(--gh-blue-100);
  --pm-text: var(--gh-text);
  --pm-muted: var(--gh-muted);
  --pm-faint: #879191;
  --pm-line: var(--gh-border);
  --pm-blue: var(--gh-blue-600);
  --pm-blue-soft: var(--gh-blue-100);
  --pm-green: var(--gh-green-600);
  --pm-green-soft: var(--gh-green-100);
  --pm-orange: var(--gh-primary-strong);
  --pm-orange-soft: var(--gh-primary-soft);
  --pm-red: var(--gh-red-600);
  --pm-red-soft: var(--gh-red-100);
}

body.platform-google-theme.nas-dsm-page {
  --nas-blue: var(--gh-blue-600);
  --nas-blue-dark: var(--gh-blue-700);
  --nas-green: var(--gh-green-600);
  --nas-amber: var(--gh-primary-strong);
  --nas-red: var(--gh-red-600);
  --nas-text: var(--gh-text);
  --nas-muted: var(--gh-muted);
  --nas-line: var(--gh-border);
  --nas-soft-line: #e7e9ec;
  --nas-soft: var(--gh-surface-muted);
  --nas-surface: var(--gh-surface);
}

.platform-google-theme :is(.engx-commandbar, .plm-module-bar, .plm-workbench-toolbar) {
  border-top: 1px solid var(--gh-border);
}

.platform-google-theme :is(.engx-command-icon, .plm-app-icon, .pm-workspace-switcher > span) {
  border-radius: 8px;
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
}

.platform-google-theme :is(.engx-sidebar, .engx-context, .operations-sidebar, .plm-workbench-nav, .pm-sidebar, .nas-dsm-sidebar) {
  background: #f8fafd;
}

.platform-google-theme :is(
  .engx-project-item.is-active,
  .engx-sidebar-section button.is-active,
  .operations-sidebar nav button.is-active,
  .plm-workbench-nav button.active,
  .pm-primary-nav button.active,
  .pm-sidebar-project.active,
  .nas-dsm-navigation button.is-active
) {
  border-color: #a8c7fa;
  border-left-color: var(--gh-primary);
  background: var(--gh-blue-100);
  color: var(--gh-blue-700);
}

.platform-google-theme :is(.engx-module-strip button.is-active, .plm-subnav a.active, .plm-smartbar > button.active) {
  border-bottom-color: var(--gh-primary);
  background: var(--gh-primary-soft);
  box-shadow: inset 0 -3px 0 var(--gh-primary);
  color: var(--gh-text);
}

.platform-google-theme .engx-work-ai-entry {
  border-left-color: var(--gh-primary);
  background: var(--gh-primary-soft);
}

.platform-google-theme :is(.engx-project-item, .engx-eco-card, .engx-selection-card, .plm-eco-card, .pm-doc-block, .nas-panel) {
  border-color: var(--gh-border);
  border-radius: 8px;
  box-shadow: none;
}

.platform-google-theme .operations-sidebar {
  top: 118px;
}

.platform-google-theme .operations-service-card,
.platform-google-theme .operations-search-section {
  border-color: var(--gh-border);
  border-radius: 8px;
  background: var(--gh-surface);
}

.platform-google-theme :is(.nas-dsm-shell, .nas-sync-workspace, .nas-file-station, .nas-protection-layout) {
  border-color: var(--gh-border);
  border-radius: 8px;
  background: var(--gh-surface);
  box-shadow: var(--gh-shadow);
}

.platform-google-theme :is(.nas-info-banner, .nas-protection-banner) {
  border-color: #a9c9e4;
  background: var(--gh-blue-100);
}

.platform-google-theme .nas-protection-banner[data-state="protected"] {
  border-color: #a9cfc3;
  background: var(--gh-green-100);
}

.platform-google-theme .nas-alert-list button.is-warning {
  border-left-color: var(--gh-primary);
}

/* AI selection and service administration */
.platform-google-theme .agent-flow {
  overflow: hidden;
}

.platform-google-theme .agent-column {
  border-color: var(--gh-border);
}

.platform-google-theme .agent-column h2,
.platform-google-theme .agent-panel h2 {
  color: var(--gh-text);
}

.platform-google-theme :is(.agent-column span, .agent-capability-grid span, .agent-output-grid article) {
  border-color: var(--gh-border);
  border-radius: 8px;
  background: var(--gh-surface);
}

.platform-google-theme .data-layer :is(h2, span) {
  color: var(--gh-green-600);
}

.platform-google-theme .app-layer :is(h2, span) {
  color: var(--gh-blue-600);
}

.platform-google-theme .output-layer :is(h2, span) {
  color: var(--gh-primary-strong);
}

/* Google Cloud-style engineering marketplace */
body.mi-procurement-page.platform-google-theme {
  --mi-yellow: var(--gh-primary);
  --mi-yellow-dark: var(--gh-primary-strong);
  --mi-navy: var(--gh-blue-600);
  --mi-navy-dark: var(--gh-blue-700);
  --mi-charcoal: var(--gh-surface-nav);
  --mi-header-gray: var(--gh-surface-top);
  --mi-page: var(--gh-canvas);
  --mi-rule: var(--gh-border);
  --mi-bg: var(--gh-canvas);
  --mi-surface: var(--gh-surface);
  --mi-surface-muted: var(--gh-surface-muted);
  --mi-text: var(--gh-text);
  --mi-muted: var(--gh-muted);
  --mi-blue: var(--gh-blue-600);
  --mi-blue-dark: var(--gh-blue-700);
  --mi-amber: var(--gh-primary-strong);
  --mi-teal: var(--gh-green-600);
}

.mi-procurement-page .mi-site-header {
  border-bottom: 1px solid var(--gh-border);
  background: #ffffff;
  color: var(--gh-text);
  font-family: inherit;
  box-shadow: 0 1px 2px rgb(60 64 67 / 12%);
}

.mi-procurement-page :is(.mi-utility-bar, .mi-masthead, .mi-primary-catalog-nav) {
  padding-right: max(18px, calc((100vw - 1480px) / 2));
  padding-left: max(18px, calc((100vw - 1480px) / 2));
}

.mi-procurement-page .mi-utility-bar {
  min-height: 28px;
  border-bottom: 1px solid #eef0f2;
  background: #f8fafd;
  color: var(--gh-muted);
}

.mi-procurement-page .mi-utility-bar :is(a, button, span, strong, small) {
  color: inherit;
}

.mi-procurement-page .mi-account-avatar {
  border: 1px solid #a8c7fa;
  border-radius: 50%;
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
}

.mi-procurement-page .mi-masthead {
  grid-template-columns: 245px minmax(320px, 1fr) 126px 108px;
  min-height: 68px;
  background: var(--gh-surface-top);
}

.mi-procurement-page .mi-wordmark {
  grid-template-columns: 42px auto;
  color: #3c4043;
}

.mi-procurement-page .mi-wordmark > span {
  width: 38px;
  height: 38px;
  transform: none;
  border: 0;
  border-radius: 8px;
  background: var(--gh-primary);
  color: #ffffff;
}

.mi-procurement-page .mi-wordmark strong {
  font-size: 21px;
  font-weight: 600;
}

.mi-procurement-page .mi-wordmark small {
  color: var(--gh-muted);
}

.mi-procurement-page .mi-header-search {
  height: 46px;
  grid-template-columns: 118px minmax(0, 1fr) 72px;
  border: 1px solid transparent;
  border-radius: 8px;
  overflow: hidden;
  background: #f1f3f4;
  box-shadow: none;
}

.mi-procurement-page .mi-header-search:focus-within {
  border-color: #a8c7fa;
  background: #ffffff;
  box-shadow: 0 1px 2px rgb(60 64 67 / 14%);
}

.mi-procurement-page .mi-header-search button {
  background: var(--gh-primary);
  color: #ffffff;
}

.mi-procurement-page .mi-bulk-order {
  border-color: #a8c7fa;
  border-radius: 8px;
  background: #ffffff;
  color: var(--gh-primary-strong);
}

.mi-procurement-page .mi-header-cart {
  border-color: var(--gh-primary);
  border-radius: 8px;
  background: var(--gh-primary);
  color: #ffffff;
}

.mi-procurement-page .mi-primary-catalog-nav {
  min-height: 40px;
  border-top: 1px solid #f1f3f4;
  background: #ffffff;
}

.mi-procurement-page .mi-primary-catalog-nav a {
  color: #3c4043;
}

.mi-procurement-page .mi-primary-catalog-nav a:hover {
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
}

.mi-procurement-page .mi-primary-catalog-nav .is-category {
  border-bottom: 3px solid var(--gh-primary);
  background: #ffffff;
  color: var(--gh-primary-strong);
}

.mi-procurement-page main {
  width: min(1480px, calc(100% - 36px));
  padding: 12px 0 42px;
}

.mi-procurement-page :is(.mi-catalog-intro, .mi-visual-filter, .misumi-catalog-status, .misumi-catalog-shell, .mi-product-stage) {
  border-color: var(--gh-border);
  border-radius: 8px;
  background: var(--gh-surface);
  box-shadow: var(--gh-shadow);
}

.mi-procurement-page .mi-visual-filter {
  overflow: hidden;
}

.mi-procurement-page .mi-visual-filter-title {
  border-color: var(--gh-border);
  background: #f8fafd;
}

.mi-procurement-page .mi-shape-filter-grid a {
  border-radius: 8px;
}

.mi-procurement-page .mi-shape-filter-grid a:hover,
.mi-procurement-page .mi-shape-filter-grid a.is-active {
  border-color: var(--gh-primary);
  background: var(--gh-primary-soft);
}

.mi-procurement-page .misumi-catalog-shell {
  grid-template-columns: 220px minmax(0, 1fr) 280px;
  align-items: start;
  overflow: visible;
}

.mi-procurement-page .misumi-mobile-filter-toggle {
  display: none;
}

.mi-procurement-page .misumi-catalog-sidebar {
  border-radius: 8px 0 0 8px;
  background: #f8fafd;
}

.mi-procurement-page .misumi-result-toolbar {
  border-top: 0;
  border-bottom: 1px solid var(--gh-border);
  background: #ffffff;
}

.mi-procurement-page .misumi-result-list {
  gap: 8px;
  padding: 8px;
  background: #f8fafd;
}

.mi-procurement-page .misumi-product-row {
  border-color: var(--gh-border);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: none;
}

.mi-procurement-page :is(.misumi-product-main h2, .misumi-series-code strong, .misumi-related a strong) {
  color: var(--gh-blue-600);
}

.mi-procurement-page :is(.misumi-product-actions .button.primary, .misumi-filter-panel .button.primary) {
  border-color: var(--gh-primary);
  background: var(--gh-primary);
  color: #ffffff;
}

.mi-procurement-page .misumi-procurement-sidebar {
  position: sticky;
  top: 12px;
  display: grid;
  grid-column: auto;
  grid-template-columns: minmax(0, 1fr);
  border-top: 0;
  border-left: 1px solid var(--gh-border);
  border-radius: 0 8px 8px 0;
  background: #ffffff;
}

.mi-procurement-page .misumi-procurement-sidebar > section {
  border-right: 0;
  border-bottom: 1px solid var(--gh-border);
}

.mi-procurement-page :is(.mi-cart-button, .mi-order-button) {
  min-height: 40px;
  border-radius: 8px;
}

.mi-procurement-page .mi-cart-button {
  border-color: var(--gh-primary);
  background: var(--gh-primary);
  color: #ffffff;
}

.mi-procurement-page .mi-price-callout {
  border-radius: 8px;
  background: var(--gh-primary-soft);
}

.mi-procurement-page .mi-price-callout strong {
  color: var(--gh-red-600);
}

.mi-procurement-page .mi-quick-rail {
  border-color: var(--gh-border);
  border-radius: 8px 0 0 8px;
  box-shadow: 0 2px 8px rgb(60 64 67 / 14%);
}

/* Marketplace administration */
body.seller-center-v2.platform-google-theme {
  --seller-orange: var(--gh-primary);
  --seller-orange-dark: var(--gh-primary-strong);
  --seller-ink: var(--gh-text);
  --seller-muted: var(--gh-muted);
  --seller-line: var(--gh-border);
  --seller-bg: var(--gh-canvas);
  --seller-surface: var(--gh-surface);
  --seller-blue: var(--gh-blue-600);
  --seller-green: var(--gh-green-600);
  --seller-amber: var(--gh-amber-700);
}

.seller-center-v2.platform-google-theme .seller-topbar {
  min-height: 64px;
  border-color: var(--gh-border);
  background: var(--gh-surface-top);
  box-shadow: 0 1px 2px rgb(60 64 67 / 12%);
}

.seller-center-v2.platform-google-theme .seller-brand,
.seller-center-v2.platform-google-theme .seller-brand strong,
.seller-center-v2.platform-google-theme .seller-top-links a,
.seller-center-v2.platform-google-theme .seller-account button,
.seller-center-v2.platform-google-theme .seller-account .auth-status {
  color: #3c4043;
}

.seller-center-v2.platform-google-theme .seller-brand small {
  color: var(--gh-muted);
}

.seller-center-v2.platform-google-theme .seller-brand-mark {
  border: 0;
  border-radius: 8px;
  background: var(--gh-primary);
  color: #ffffff;
}

.seller-center-v2.platform-google-theme .seller-global-search input {
  border-color: var(--gh-border);
  background: #ffffff;
}

.seller-center-v2.platform-google-theme .seller-global-search button,
.seller-center-v2.platform-google-theme .button.primary {
  border-color: var(--gh-primary);
  background: var(--gh-primary);
  color: #ffffff;
}

.seller-center-v2.platform-google-theme .commerce-admin-sidebar nav button:hover,
.seller-center-v2.platform-google-theme .commerce-admin-sidebar nav button.is-active {
  border-left-color: var(--gh-primary);
  background: var(--gh-primary-soft);
  color: var(--gh-text);
}

.seller-center-v2.platform-google-theme :is(.commerce-admin-panel, .seller-welcome) {
  border-color: var(--gh-border);
  border-radius: 8px;
  box-shadow: var(--gh-shadow);
}

.seller-center-v2.platform-google-theme .seller-welcome {
  border-left-color: var(--gh-primary);
}

/* Enterprise account */
body.account-management-page.platform-google-theme .account-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding-top: 18px;
}

.account-management-page.platform-google-theme .account-page-head {
  border-color: var(--gh-border);
  background: transparent;
}

.account-management-page.platform-google-theme :is(
  .account-auth-workspace,
  .account-auth-stage,
  .account-auth-panel,
  .account-member-workspace,
  .account-work-launcher,
  .account-permission-section
) {
  border-color: var(--gh-border);
  border-radius: 8px;
  background: var(--gh-surface);
  box-shadow: var(--gh-shadow);
}

.account-management-page.platform-google-theme :is(.account-auth-tabs, .account-section-tabs) {
  border-color: var(--gh-border);
  background: #f8fafd;
}

.account-management-page.platform-google-theme :is(.account-auth-tabs, .account-section-tabs) button.active {
  border-color: var(--gh-primary);
  background: var(--gh-primary-soft);
  color: var(--gh-primary-strong);
}

.account-management-page.platform-google-theme .account-panel-title > span,
.account-management-page.platform-google-theme .account-page-head > div > span {
  color: var(--gh-primary-strong);
}

/* Optional compact density for data-intensive work */
body.platform-google-theme.platform-density-compact {
  font-size: 13px;
}

.platform-density-compact .platform-command-bar {
  min-height: 42px !important;
  margin-bottom: 8px !important;
  padding-block: 3px !important;
}

.platform-density-compact :is(.metrics, .operations-control-metrics) article {
  min-height: 62px !important;
  padding-block: 8px !important;
}

.platform-density-compact :is(table, .object-table, .operations-table, .pm-data-table, .bom-table, .plm-eco-table) :is(th, td, [role="cell"], [role="columnheader"]) {
  padding-top: 7px !important;
  padding-bottom: 7px !important;
}

.platform-density-compact :is(.workspace-queue-row, .workspace-scope-list li, .nas-route-list article) {
  min-height: 44px !important;
}

.platform-density-compact :is(.button, .small-button, .object-actions button) {
  min-height: 34px !important;
  padding-block: 5px !important;
}

/* Responsive shell */
@media (max-width: 1180px) {
  body.platform-google-theme header.platform-google-header {
    grid-template-columns: max-content minmax(0, 1fr) max-content;
    grid-template-rows: 56px 48px 44px;
    min-height: 148px;
    gap: 0 12px;
    padding-inline: 14px;
  }

  .platform-google-header > .brand {
    grid-row: 1;
  }

  .platform-google-header > .header-actions,
  .platform-google-header .platform-account-cluster {
    grid-row: 1;
    grid-column: 3;
  }

  .platform-global-search {
    width: 100%;
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .platform-google-header > .topnav {
    grid-row: 3;
  }

  body.platform-google-theme .platform-command-bar {
    grid-template-columns: minmax(120px, 0.5fr) minmax(360px, 2fr) minmax(160px, 0.8fr);
  }

  body.platform-google-theme .platform-operations {
    display: none;
  }

  .platform-google-theme .operations-sidebar {
    top: 158px;
  }

  .mi-procurement-page .misumi-catalog-shell {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .mi-procurement-page .misumi-procurement-sidebar {
    position: static;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-column: 1 / -1;
    border-top: 1px solid var(--gh-border);
    border-left: 0;
    border-radius: 0 0 6px 6px;
  }
}

@media (max-width: 820px) {
  body.platform-google-theme header.platform-google-header {
    position: relative;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: 54px 48px 44px;
    min-height: 146px;
    padding-inline: 10px;
  }

  .platform-google-header .brand {
    grid-row: 1;
    grid-column: 1;
    font-size: 16px;
  }

  .platform-google-header .brand-mark {
    width: 34px;
    height: 34px;
    font-size: 17px;
  }

  .platform-google-header > .header-actions,
  .platform-google-header .platform-account-cluster {
    display: flex;
    grid-row: 1;
    grid-column: 2;
  }

  .platform-google-header :is(.auth-status, .platform-density-toggle, .language-switch > span) {
    display: none;
  }

  .platform-google-header .language-switch {
    display: inline-flex;
    padding: 2px;
  }

  .platform-global-search {
    grid-template-columns: 94px minmax(0, 1fr) 64px;
  }

  .platform-google-header .topnav a {
    padding-inline: 11px;
  }

  body.platform-google-theme > main:not(.account-shell),
  body.platform-google-theme .plm-app-shell,
  body.platform-google-theme.operations-center-page main,
  body.platform-google-theme.engineering-integrated-page main {
    width: min(100% - 16px, 800px);
    padding-top: 8px;
  }

  body.platform-google-theme .platform-command-bar {
    grid-template-columns: minmax(105px, 0.35fr) minmax(330px, 1fr);
    overflow-x: auto;
  }

  body.platform-google-theme .platform-services,
  body.platform-google-theme .platform-operations {
    display: none;
  }

  body.platform-google-theme .page-head {
    min-height: 0;
    align-items: flex-start;
    flex-direction: column;
  }

  body.platform-google-theme .page-actions {
    width: 100%;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .mi-procurement-page :is(.mi-utility-bar, .mi-masthead, .mi-primary-catalog-nav) {
    padding-inline: 10px;
  }

  .mi-procurement-page .mi-utility-bar {
    display: none;
  }

  .mi-procurement-page .mi-masthead {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    min-height: 112px;
    padding-block: 8px;
  }

  .mi-procurement-page .mi-wordmark {
    grid-column: 1;
  }

  .mi-procurement-page .mi-search-stack {
    grid-row: 2;
    grid-column: 1 / -1;
  }

  .mi-procurement-page .mi-bulk-order {
    display: none;
  }

  .mi-procurement-page .mi-header-cart {
    grid-row: 1;
    grid-column: 2;
    min-width: 88px;
  }

  .mi-procurement-page .mi-hot-keywords {
    display: none;
  }

  .mi-procurement-page main {
    width: calc(100% - 16px);
  }

  .mi-procurement-page .misumi-catalog-shell {
    grid-template-columns: minmax(0, 1fr);
  }

  .mi-procurement-page .misumi-mobile-filter-toggle {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    border: 0;
    border-bottom: 1px solid var(--gh-border);
    border-radius: 0;
    background: #ffffff;
    color: var(--gh-blue-600);
    font-weight: 750;
  }

  .mi-procurement-page .misumi-mobile-filter-toggle::after {
    content: "+";
    color: var(--gh-primary-strong);
    font-size: 18px;
  }

  .mi-procurement-page .misumi-mobile-filter-toggle[aria-expanded="true"]::after {
    content: "−";
  }

  .mi-procurement-page .misumi-mobile-filter-toggle strong {
    margin-left: auto;
    padding-right: 10px;
    color: var(--gh-muted);
    font-size: 11px;
  }

  .mi-procurement-page .misumi-catalog-sidebar:not(.is-open) {
    display: none;
  }

  .mi-procurement-page .misumi-catalog-sidebar {
    border-right: 0;
    border-bottom: 1px solid var(--gh-border);
    border-radius: 6px 6px 0 0;
  }

  .mi-procurement-page .misumi-procurement-sidebar {
    grid-template-columns: minmax(0, 1fr);
  }

  .mi-procurement-page .mi-quick-rail {
    display: none;
  }

  body.account-management-page.platform-google-theme .account-shell {
    width: calc(100% - 16px);
    padding-top: 10px;
  }
}

@media (max-width: 560px) {
  .platform-google-header .language-switch,
  .platform-google-header .brand small {
    display: none;
  }

  .platform-google-header .auth-button {
    min-width: 54px;
    padding-inline: 7px;
  }

  .platform-global-search {
    grid-template-columns: minmax(0, 1fr) 58px;
  }

  .platform-global-search select {
    display: none;
  }

  .platform-google-header .topnav .platform-flow-link,
  .platform-nav-divider {
    display: none;
  }

  body.platform-google-theme .platform-command-bar {
    display: block !important;
    padding: 6px 8px;
  }

  .platform-design-flow {
    margin-top: 5px;
    border-right: 0;
    border-left: 0;
  }

  .platform-design-flow a {
    min-height: 32px;
    justify-content: flex-start;
  }

  body.platform-google-theme .page-head h1 {
    font-size: 21px;
  }

  body.platform-google-theme .page-actions :is(.button, button) {
    min-width: max-content;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.platform-google-theme *,
  body.platform-google-theme *::before,
  body.platform-google-theme *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}

/* Merchant onboarding and platform review */
.merchant-onboarding-page {
  min-height: 100vh;
}

.merchant-onboarding-page [hidden] {
  display: none !important;
}

.merchant-topbar {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: max-content 1fr max-content;
  min-height: 64px;
  align-items: center;
  gap: 28px;
  border-bottom: 1px solid var(--gh-border);
  padding: 0 max(20px, calc((100vw - 1280px) / 2));
  background: #fff;
  box-shadow: 0 1px 2px rgb(60 64 67 / 10%);
}

.merchant-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gh-text) !important;
}

.merchant-brand:hover {
  text-decoration: none !important;
}

.merchant-brand > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 6px;
  background: var(--gh-blue-600);
  color: #fff;
  font-size: 20px;
  font-weight: 700;
}

.merchant-brand strong {
  font-size: 19px;
}

.merchant-brand small {
  border-left: 1px solid var(--gh-border);
  padding-left: 9px;
  color: var(--gh-muted);
}

.merchant-topbar > nav {
  display: flex;
  align-items: center;
  gap: 24px;
}

.merchant-topbar > nav a {
  color: var(--gh-text);
  font-weight: 500;
}

.merchant-account {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--gh-muted);
}

.merchant-account button {
  min-height: 34px;
  border: 1px solid var(--gh-border);
  border-radius: 4px;
  padding: 0 13px;
  background: #fff;
  color: var(--gh-text);
  cursor: pointer;
}

.merchant-shell {
  width: min(1240px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 56px;
}

.merchant-page-head {
  display: flex;
  min-height: 92px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 24px;
}

.merchant-page-head > div > span,
.merchant-form-stage > header span,
.merchant-review-workspace > header span,
.merchant-review-dialog header span {
  color: var(--gh-blue-600);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.merchant-page-head h1 {
  margin: 4px 0 5px;
  font-size: 28px;
  font-weight: 500;
}

.merchant-page-head p,
.merchant-review-workspace > header p {
  margin: 0;
  color: var(--gh-muted);
}

.merchant-status,
.merchant-table-status {
  display: inline-flex;
  min-height: 28px;
  align-items: center;
  border-radius: 14px;
  padding: 0 11px;
  background: var(--gh-surface-muted);
  color: var(--gh-muted);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.merchant-status[data-status="submitted"],
.merchant-status[data-status="under_review"],
.merchant-table-status[data-status="submitted"],
.merchant-table-status[data-status="under_review"] {
  background: #fef7e0;
  color: #8a4b00;
}

.merchant-status[data-status="approved"],
.merchant-table-status[data-status="approved"] {
  background: var(--gh-green-100);
  color: var(--gh-green-600);
}

.merchant-status[data-status="needs_changes"],
.merchant-status[data-status="rejected"],
.merchant-table-status[data-status="needs_changes"],
.merchant-table-status[data-status="rejected"] {
  background: var(--gh-red-100);
  color: var(--gh-red-600);
}

.merchant-message,
.merchant-form-message {
  margin: 0;
  color: var(--gh-red-600);
}

.merchant-message {
  border: 1px solid #f4c7c3;
  border-radius: 6px;
  padding: 11px 14px;
  background: var(--gh-red-100);
}

.merchant-message.is-success,
.merchant-form-message.is-success {
  color: var(--gh-green-600);
}

.merchant-message.is-success {
  border-color: #b7dfc3;
  background: var(--gh-green-100);
}

.merchant-application-layout {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--gh-shadow);
}

.merchant-progress {
  border-right: 1px solid var(--gh-border);
  padding: 26px 22px;
  background: #f8fafd;
}

.merchant-progress > header {
  display: grid;
  gap: 4px;
  padding-bottom: 22px;
}

.merchant-progress > header span,
.merchant-review-note span {
  color: var(--gh-muted);
  font-size: 12px;
}

.merchant-progress > header strong {
  font-size: 18px;
  font-weight: 500;
}

.merchant-progress ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.merchant-progress li {
  position: relative;
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 11px;
  min-height: 82px;
  color: var(--gh-muted);
}

.merchant-progress li:not(:last-child)::after {
  position: absolute;
  top: 30px;
  bottom: 0;
  left: 14px;
  width: 1px;
  background: var(--gh-border);
  content: "";
}

.merchant-progress li b {
  z-index: 1;
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--gh-border-strong);
  border-radius: 50%;
  background: #fff;
}

.merchant-progress li > span {
  display: grid;
  align-content: start;
  gap: 3px;
  padding-top: 3px;
}

.merchant-progress li strong {
  color: var(--gh-text);
}

.merchant-progress li small {
  line-height: 1.45;
}

.merchant-progress li.is-active b {
  border-color: var(--gh-blue-600);
  background: var(--gh-blue-600);
  color: #fff;
}

.merchant-progress li.is-complete b {
  border-color: var(--gh-green-600);
  background: var(--gh-green-100);
  color: var(--gh-green-600);
}

.merchant-review-note {
  border-top: 1px solid var(--gh-border);
  padding-top: 16px;
}

.merchant-review-note p {
  margin: 5px 0 0;
  color: var(--gh-text);
  line-height: 1.6;
}

.merchant-form-stage {
  min-width: 0;
  padding: 26px 30px 32px;
}

.merchant-form-stage > header,
.merchant-review-workspace > header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 20px;
}

.merchant-form-stage h2,
.merchant-review-workspace h2 {
  margin: 3px 0 0;
  font-size: 22px;
  font-weight: 500;
}

.merchant-form-stage > header small {
  color: var(--gh-muted);
}

.merchant-form-stage form {
  display: grid;
}

.merchant-form-stage fieldset {
  display: grid;
  gap: 16px;
  min-width: 0;
  margin: 0;
  border: 0;
  border-top: 1px solid var(--gh-border);
  padding: 22px 0;
}

.merchant-form-stage legend {
  padding: 0 14px 0 0;
  color: var(--gh-text);
  font-size: 15px;
  font-weight: 600;
}

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

.merchant-form-stage label,
.merchant-review-dialog label {
  display: grid;
  min-width: 0;
  gap: 7px;
}

.merchant-form-stage label > span:first-child,
.merchant-channel-field > span:first-child,
.merchant-review-dialog label > span:first-child {
  color: var(--gh-muted);
  font-size: 12px;
  font-weight: 500;
}

.merchant-form-stage :is(input, select, textarea),
.merchant-review-dialog :is(input, select, textarea) {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--gh-border-strong);
  border-radius: 4px;
  padding: 9px 11px;
  background: #fff;
  color: var(--gh-text);
}

.merchant-form-stage textarea,
.merchant-review-dialog textarea {
  min-height: 104px;
  resize: vertical;
}

.merchant-form-stage :is(input, select, textarea):disabled {
  border-color: var(--gh-border);
  background: var(--gh-surface-muted);
  color: var(--gh-muted);
}

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

.merchant-choice-grid label,
.merchant-inline-choices label {
  display: flex;
  min-height: 42px;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--gh-border);
  border-radius: 4px;
  padding: 8px 10px;
  background: #fff;
}

.merchant-choice-grid input,
.merchant-inline-choices input {
  width: 17px;
  min-height: 17px;
  margin: 0;
}

.merchant-choice-grid label > span,
.merchant-inline-choices label > span {
  color: var(--gh-text) !important;
  font-size: 13px !important;
}

.merchant-wide-field {
  grid-column: 1 / -1;
}

.merchant-channel-field {
  display: grid;
  gap: 7px;
}

.merchant-inline-choices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.merchant-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--gh-border);
  padding-top: 20px;
}

.merchant-approved-action {
  display: flex;
  min-height: 126px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-top: 1px solid var(--gh-border);
  border-bottom: 1px solid var(--gh-border);
  padding: 22px 0;
}

.merchant-approved-action > div {
  display: grid;
  gap: 4px;
}

.merchant-approved-action span {
  color: var(--gh-green-600);
  font-weight: 600;
}

.merchant-approved-action strong {
  font-size: 19px;
  font-weight: 500;
}

.merchant-approved-action small {
  color: var(--gh-muted);
}

.merchant-review-workspace {
  overflow: hidden;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--gh-shadow);
}

.merchant-review-workspace > header {
  padding: 24px 26px;
}

.merchant-review-metrics {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--gh-border);
  border-bottom: 1px solid var(--gh-border);
  background: #f8fafd;
}

.merchant-review-metrics > div {
  display: grid;
  gap: 4px;
  padding: 18px 26px;
}

.merchant-review-metrics > div + div {
  border-left: 1px solid var(--gh-border);
}

.merchant-review-metrics span {
  color: var(--gh-muted);
  font-size: 12px;
}

.merchant-review-metrics strong {
  font-size: 24px;
  font-weight: 500;
}

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

.merchant-review-table {
  width: 100%;
  border-collapse: collapse;
}

.merchant-review-table th,
.merchant-review-table td {
  border-bottom: 1px solid var(--gh-border);
  padding: 13px 16px;
  text-align: left;
  vertical-align: middle;
}

.merchant-review-table th {
  background: #fff;
  color: var(--gh-muted);
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.merchant-review-table td:first-child {
  min-width: 210px;
}

.merchant-review-table td:first-child strong,
.merchant-review-table td:first-child small {
  display: block;
}

.merchant-review-table td:first-child small {
  margin-top: 3px;
  color: var(--gh-muted);
}

.merchant-review-table td:last-child button {
  border: 0;
  background: transparent;
  color: var(--gh-blue-600);
  cursor: pointer;
  font-weight: 600;
}

.merchant-empty-row {
  height: 140px;
  color: var(--gh-muted);
  text-align: center !important;
}

.merchant-review-dialog {
  width: min(680px, calc(100% - 28px));
  max-height: calc(100vh - 40px);
  overflow: auto;
  border: 1px solid var(--gh-border);
  border-radius: 8px;
  padding: 0;
  background: #fff;
  color: var(--gh-text);
  box-shadow: 0 8px 28px rgb(60 64 67 / 28%);
}

.merchant-review-dialog::backdrop {
  background: rgb(32 33 36 / 36%);
}

.merchant-review-dialog form {
  display: grid;
}

.merchant-review-dialog header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid var(--gh-border);
  padding: 20px 22px;
}

.merchant-review-dialog h2 {
  margin: 3px 0;
  font-size: 21px;
  font-weight: 500;
}

.merchant-review-dialog header p {
  margin: 0;
  color: var(--gh-muted);
}

.merchant-review-dialog header button {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--gh-muted);
  cursor: pointer;
  font-size: 22px;
}

.merchant-review-detail,
.merchant-review-dialog > form > label,
.merchant-review-dialog .merchant-form-message {
  margin-right: 22px;
  margin-left: 22px;
}

.merchant-review-detail {
  padding: 18px 0;
}

.merchant-review-detail dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px 22px;
  margin: 0;
}

.merchant-review-detail dt {
  margin-bottom: 3px;
  color: var(--gh-muted);
  font-size: 12px;
}

.merchant-review-detail dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.merchant-review-dialog footer {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  border-top: 1px solid var(--gh-border);
  margin-top: 20px;
  padding: 16px 22px;
}

@media (max-width: 860px) {
  .merchant-topbar {
    grid-template-columns: 1fr max-content;
    gap: 12px;
    padding: 0 14px;
  }

  .merchant-topbar > nav {
    display: none;
  }

  .merchant-account span {
    display: none;
  }

  .merchant-application-layout {
    grid-template-columns: 1fr;
  }

  .merchant-progress {
    border-right: 0;
    border-bottom: 1px solid var(--gh-border);
  }

  .merchant-progress ol {
    grid-template-columns: repeat(3, 1fr);
  }

  .merchant-progress li {
    grid-template-columns: 30px minmax(0, 1fr);
    min-height: auto;
  }

  .merchant-progress li::after {
    display: none;
  }

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

@media (max-width: 620px) {
  .merchant-brand small,
  .merchant-page-head p {
    display: none;
  }

  .merchant-shell {
    width: calc(100% - 16px);
    padding-top: 16px;
  }

  .merchant-page-head {
    min-height: 76px;
  }

  .merchant-page-head h1 {
    font-size: 23px;
  }

  .merchant-progress {
    padding: 18px 14px;
  }

  .merchant-progress > header,
  .merchant-progress li small {
    display: none;
  }

  .merchant-progress li {
    display: flex;
    min-width: 0;
    align-items: center;
  }

  .merchant-progress li strong {
    font-size: 12px;
  }

  .merchant-form-stage {
    padding: 20px 16px 24px;
  }

  .merchant-form-grid,
  .merchant-choice-grid,
  .merchant-inline-choices,
  .merchant-review-detail dl {
    grid-template-columns: 1fr;
  }

  .merchant-form-actions,
  .merchant-approved-action,
  .merchant-review-dialog footer {
    align-items: stretch;
    flex-direction: column;
  }

  .merchant-review-metrics > div {
    padding: 14px;
  }

  .merchant-review-metrics strong {
    font-size: 20px;
  }
}
