/* UX-03: icon-first utility actions, tooltips and overflow menus. */
.ux-row-actions { display: inline-flex; align-items: center; gap: 2px; vertical-align: middle; }

/* Shared page action buttons: one geometry, clear primary/secondary hierarchy. */
html body .main .ux-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: .01em;
  line-height: 1;
  white-space: nowrap;
  text-decoration: none;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
  transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease, box-shadow 140ms ease;
}
html body .main .ux-btn svg {
  width: 16px;
  height: 16px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html body .main .ux-btn-primary {
  background: linear-gradient(180deg, #2E7FCB 0%, #1768BA 100%);
  border-color: #1762AA;
  color: #FFF;
  box-shadow: var(--shadow-button-primary, 0 2px 5px rgba(23, 104, 186, .22));
}
html body .main .ux-btn-primary:hover {
  background: linear-gradient(180deg, #2A77C0 0%, #155FA9 100%);
  border-color: #155FA9;
  color: #FFF;
  box-shadow: 0 3px 9px rgba(23, 104, 186, .26), inset 0 1px 0 rgba(255, 255, 255, .14);
}
html body .main .ux-btn-secondary {
  background: #FFFFFF;
  border-color: #D5DDE7;
  color: #31465E;
}
html body .main .ux-btn-secondary:hover {
  background: #F6F9FC;
  border-color: #B9C8D8;
  color: var(--text, #142B49);
  box-shadow: var(--shadow-button-hover, 0 2px 6px rgba(16, 24, 40, .08));
}
html body .main .ux-btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--secondary, #51637A);
}
html body .main .ux-btn-ghost:hover { background: #F1F5F9; color: var(--text, #142B49); }
html body .main .ux-btn:focus-visible {
  outline: 2px solid rgba(23, 104, 186, .32);
  outline-offset: 2px;
}
@media (max-width: 767px) {
  html body .main .ux-btn {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
}

/* Numeric columns share one alignment contract across every data table. */
html body .main table th.ux-num,
html body .main table td.ux-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Table row actions center with the row text; panels' margin-bottom must not leak in. */
html body .main table td .actions,
html body .main table th .actions { margin: 0; }
html body .main table td .actions { align-items: center; }

button.ux-icon-btn.ux-icon-btn,
a.ux-icon-btn.ux-icon-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  flex: 0 0 30px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--secondary, #51637A);
  line-height: 1;
  text-decoration: none;
  cursor: pointer;
}
button.ux-icon-btn.ux-icon-btn:hover,
a.ux-icon-btn.ux-icon-btn:hover { background: #F1F3F5; color: var(--text, #142B49); }
button.ux-icon-btn.ux-icon-btn.danger:hover,
a.ux-icon-btn.ux-icon-btn.danger:hover { background: #FEF2F2; color: #B42318; }
button.ux-icon-btn.ux-icon-btn:focus-visible,
a.ux-icon-btn.ux-icon-btn:focus-visible { outline: 2px solid rgba(20,43,73,.18); outline-offset: 2px; }
button.ux-icon-btn.ux-icon-btn:disabled { opacity: .45; cursor: not-allowed; }
.ux-icon-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.ux-menu-wrap { position: relative; display: inline-flex; vertical-align: middle; }
.ux-menu {
  position: fixed;
  z-index: 120;
  min-width: 176px;
  max-width: min(240px, calc(100vw - 16px));
  padding: 4px;
  border: 1px solid var(--border, #E4E7EC);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 24px rgba(16,24,40,.12);
}
.ux-menu[hidden] { display: none; }
button.ux-menu-item.ux-menu-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 7px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--text, #142B49);
  font-size: 13px;
  font-weight: 400;
  text-align: left;
}
button.ux-menu-item.ux-menu-item:hover { background: #F3F4F6; }
button.ux-menu-item.ux-menu-item.danger { color: #B42318; }
button.ux-menu-item.ux-menu-item.danger:hover { background: #FEF2F2; }
button.ux-menu-item.ux-menu-item svg { width: 15px; height: 15px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

.ux-tip {
  position: fixed;
  z-index: 200;
  padding: 4px 8px;
  border-radius: 6px;
  background: #1F2328;
  color: #fff;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(16,24,40,.18);
  pointer-events: none;
  transform: translate(-50%, -100%);
}
.ux-tip[hidden] { display: none; }

.ux-sheet-layer {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: flex-end;
  background: rgba(15,23,42,.32);
}
.ux-sheet-layer[hidden] { display: none; }
.ux-sheet {
  width: 100%;
  padding: 8px 16px calc(18px + env(safe-area-inset-bottom));
  border-radius: 16px 16px 0 0;
  background: #fff;
  box-shadow: 0 -12px 40px rgba(16,24,40,.16);
}
.ux-sheet-handle { width: 36px; height: 4px; margin: 4px auto 14px; border-radius: 2px; background: #D0D5DD; }
.ux-sheet h3 { margin: 0 0 8px; font-size: 14px; }
button.ux-sheet-item.ux-sheet-item {
  display: flex;
  width: 100%;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 10px 8px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--text, #142B49);
  font-size: 15px;
  text-align: left;
}
button.ux-sheet-item.ux-sheet-item:hover { background: #F3F4F6; }
button.ux-sheet-item.ux-sheet-item.danger { color: #B42318; }
button.ux-sheet-item.ux-sheet-item svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
button.ux-sheet-cancel.ux-sheet-cancel {
  display: flex;
  width: 100%;
  justify-content: center;
  min-height: 46px;
  margin-top: 8px;
  border: 0;
  border-radius: 8px;
  background: #F3F4F6;
  color: var(--secondary, #51637A);
  font-size: 14px;
}

/* `.actions` wrappers carry high-specificity text-button sizing; reset it for icons. */
html body .main .actions > .ux-icon-btn.ux-icon-btn,
html body .main .actions > a.ux-icon-btn.ux-icon-btn {
  width: 30px;
  height: 30px;
  min-width: 30px;
  min-height: 30px;
  flex: 0 0 30px;
  padding: 0;
  color: var(--secondary, #51637A);
}
html body .main .actions > .ux-icon-btn.ux-icon-btn:hover,
html body .main .actions > a.ux-icon-btn.ux-icon-btn:hover { background: #F1F3F5; color: var(--text, #142B49); }
html body .main .actions > .ux-icon-btn.ux-icon-btn.danger:hover,
html body .main .actions > a.ux-icon-btn.ux-icon-btn.danger:hover { background: #FEF2F2; color: #B42318; }

/* Existing modules sized their text buttons for labels; icon buttons opt out. */
.api-service-actions { justify-content: flex-end; }
.api-service-actions .ux-icon-btn { flex: 0 0 30px; min-width: 0; min-height: 30px; padding: 0; }
.api-secret-control .ux-icon-btn { flex: 0 0 30px; width: 30px; min-width: 30px; min-height: 30px; padding: 0; color: var(--secondary, #51637A); }
.vault-actions .ux-icon-btn,
.vault-data .ux-icon-btn { flex: 0 0 30px; width: 30px; min-width: 30px; min-height: 30px; padding: 0; }
.vault-data .ux-icon-btn { width: 26px; height: 26px; min-width: 26px; min-height: 26px; flex-basis: 26px; }
.vault-data .ux-icon-btn svg { width: 15px; height: 15px; }
.vault-record-head .ux-row-actions { flex: none; }
.vault-record-head .ux-icon-btn { width: 30px; height: 30px; min-width: 30px; min-height: 30px; }

@media (max-width: 767px) {
  button.ux-icon-btn.ux-icon-btn,
  a.ux-icon-btn.ux-icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-basis: 44px;
  }
  .ux-icon-btn svg { width: 18px; height: 18px; }
  .ux-tip { display: none !important; }
  .api-service-actions .ux-icon-btn,
  .api-secret-control .ux-icon-btn,
  .vault-actions .ux-icon-btn,
  .vault-data .ux-icon-btn,
  .vault-record-head .ux-icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-basis: 44px;
  }
  .vault-data .ux-icon-btn svg { width: 18px; height: 18px; }
  html body .main .actions > .ux-icon-btn.ux-icon-btn,
  html body .main .actions > a.ux-icon-btn.ux-icon-btn {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    flex-basis: 44px;
  }
}

html body .main .ux-btn-danger {
  background: transparent;
  border-color: transparent;
  color: #B42318;
}
html body .main .ux-btn-danger:hover { background: #FEF2F2; color: #B42318; }
/* Page action rows carry stronger legacy selectors; keep the new variants authoritative. */
html body .main .pagehead .actions > a.ux-btn.ux-btn,
html body .main .pagehead .actions > button.ux-btn.ux-btn,
html body .main .module-nav-actions > a.ux-btn.ux-btn,
html body .main .module-nav-actions > button.ux-btn.ux-btn {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-button, 999px);
  font-size: 13px;
}
html body .main .pagehead .actions > a.ux-btn-secondary.ux-btn-secondary,
html body .main .pagehead .actions > button.ux-btn-secondary.ux-btn-secondary,
html body .main .module-nav-actions > a.ux-btn-secondary.ux-btn-secondary {
  background: #FFFFFF;
  border-color: #D5DDE7;
  color: #31465E;
}
html body .main .pagehead .actions > a.ux-btn-secondary.ux-btn-secondary:hover,
html body .main .pagehead .actions > button.ux-btn-secondary.ux-btn-secondary:hover,
html body .main .module-nav-actions > a.ux-btn-secondary.ux-btn-secondary:hover {
  background: #F6F9FC;
  border-color: #B9C8D8;
  color: var(--text, #142B49);
}
html body .main .pagehead .actions > a.ux-btn-primary.ux-btn-primary,
html body .main .pagehead .actions > button.ux-btn-primary.ux-btn-primary,
html body .main .module-nav-actions > a.ux-btn-primary.ux-btn-primary {
  background: linear-gradient(180deg, #2E7FCB 0%, #1768BA 100%);
  border-color: #1762AA;
  color: #FFF;
}
html body .main .pagehead .actions > a.ux-btn-primary.ux-btn-primary:hover,
html body .main .pagehead .actions > button.ux-btn-primary.ux-btn-primary:hover,
html body .main .module-nav-actions > a.ux-btn-primary.ux-btn-primary:hover {
  background: linear-gradient(180deg, #2A77C0 0%, #155FA9 100%);
  border-color: #155FA9;
  color: #FFF;
}
html body .main .pagehead .actions > a.ux-btn-danger.ux-btn-danger,
html body .main .pagehead .actions > button.ux-btn-danger.ux-btn-danger {
  background: #FFFFFF;
  border-color: #F0C7CD;
  color: #B42318;
}
html body .main .pagehead .actions > a.ux-btn-danger.ux-btn-danger:hover,
html body .main .pagehead .actions > button.ux-btn-danger.ux-btn-danger:hover {
  background: #FEF2F2;
  border-color: #E9ABB4;
  color: #B42318;
}
@media (max-width: 767px) {
  html body .main .pagehead .actions > a.ux-btn.ux-btn,
  html body .main .pagehead .actions > button.ux-btn.ux-btn,
  html body .main .module-nav-actions > a.ux-btn.ux-btn,
  html body .main .module-nav-actions > button.ux-btn.ux-btn {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
}

html body .main .insight-actions > a.ux-btn.ux-btn,
html body .main .insight-actions > button.ux-btn.ux-btn {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border-radius: var(--radius-button, 999px);
  font-size: 13px;
}
@media (max-width: 767px) {
  html body .main .insight-actions > a.ux-btn.ux-btn,
  html body .main .insight-actions > button.ux-btn.ux-btn {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
}

/* Navigation micro-interaction: same quiet hover timing for sidebar and module tabs. */
.sidebar .nav-link,
.module-nav-track > a,
.tabs > a,
.tabs > button,
.qm-tabs a,
.nav-view-tabs a {
  transition: background-color 120ms ease, color 120ms ease, border-color 120ms ease;
}

/* Module-tab row: page actions match the tab height exactly. */
html body .main .module-nav-actions > a.ux-btn.ux-btn,
html body .main .module-nav-actions > button.ux-btn.ux-btn {
  height: 38px;
  min-height: 38px;
}

/* Fallback when the quote page actions are not merged into the module tab bar:
   match the qm-tabs height instead of leaving a shorter, visually offset row. */
html body .main .pagehead.qm-list-heading > .actions > a.ux-btn.ux-btn,
html body .main .pagehead.qm-list-heading > .actions > button.ux-btn.ux-btn {
  height: 44px;
  min-height: 44px;
}

/* Shared pill skin: wins over legacy module button rules. */
html body .main .ux-btn.ux-btn {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .main .ux-btn.ux-btn:hover { text-decoration: none; }
html body .main .ux-btn.ux-btn.ux-btn-primary {
  background: linear-gradient(180deg, #2E7FCB 0%, #1768BA 100%);
  border-color: #1762AA;
  color: #FFF;
  box-shadow: var(--shadow-button-primary, 0 2px 5px rgba(23, 104, 186, .22));
}
html body .main .ux-btn.ux-btn.ux-btn-primary:hover {
  background: linear-gradient(180deg, #2A77C0 0%, #155FA9 100%);
  border-color: #155FA9;
}
html body .main .ux-btn.ux-btn.ux-btn-secondary {
  background: #FFFFFF;
  border-color: #D5DDE7;
  color: #31465E;
}
html body .main .ux-btn.ux-btn.ux-btn-secondary:hover {
  background: #F6F9FC;
  border-color: #B9C8D8;
  color: var(--text, #142B49);
}
html body .main .ux-btn.ux-btn.ux-btn-ghost {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: var(--secondary, #51637A);
}
html body .main .ux-btn.ux-btn.ux-btn-ghost:hover { background: #F1F5F9; color: var(--text, #142B49); }
html body .main .ux-btn.ux-btn.ux-btn-danger {
  background: #FFFFFF;
  border-color: #F0C7CD;
  color: #B42318;
}
html body .main .ux-btn.ux-btn.ux-btn-danger:hover { background: #FEF2F2; border-color: #E9ABB4; color: #B42318; }
@media (max-width: 767px) {
  html body .main .ux-btn.ux-btn {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
}

/* Legacy action buttons that do not yet consume the uxButton component. */
html body .main :is(
  .pagehead .actions > a:not(.ux-btn):not(.text):not(.primary):not(.danger):not(.secondary),
  .pagehead .actions > button:not(.ux-btn):not(.ux-icon-btn):not(.primary):not(.danger),
  .actions > button:not(.ux-btn):not(.ux-icon-btn):not(.primary):not(.danger):not(.link-button),
  .actions > a:not(.ux-btn):not(.ux-icon-btn):not(.text):not(.primary):not(.danger):not(.secondary),
  .filters button:not(.ux-icon-btn),
  .filters > a.opt-reset,
  .prq-btn:not(.primary):not(.danger),
  .prq-actions > a:not(.text),
  .o3-sale-toolbar button:not(.primary):not(.danger),
  .o3-sale-section > a:not(.text):not(.primary),
  .opt-progress-action > a:not(.ux-btn)
) {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 13px;
  text-decoration: none;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .main :is(
  .pagehead .actions > a:not(.ux-btn):not(.text):not(.primary):not(.danger):not(.secondary):hover,
  .pagehead .actions > button:not(.ux-btn):not(.ux-icon-btn):not(.primary):not(.danger):hover,
  .actions > button:not(.ux-btn):not(.ux-icon-btn):not(.primary):not(.danger):not(.link-button):hover,
  .actions > a:not(.ux-btn):not(.ux-icon-btn):not(.text):not(.primary):not(.danger):not(.secondary):hover,
  .filters button:not(.ux-icon-btn):hover,
  .prq-btn:not(.primary):not(.danger):hover,
  .prq-actions > a:not(.text):hover,
  .o3-sale-toolbar button:not(.primary):not(.danger):hover,
  .o3-sale-section > a:not(.text):not(.primary):hover
) {
  border-color: #B9C8D8;
  background: #F6F9FC;
  color: var(--text, #142B49);
  box-shadow: var(--shadow-button-hover, 0 2px 6px rgba(16, 24, 40, .08));
}
html body .main :is(
  .pagehead .actions > .primary,
  .actions > .primary,
  .filters button.primary,
  .prq-btn.primary,
  .o3-sale-toolbar button.primary,
  .o3-sale-section > a.primary,
  .opt-progress-action > .primary
) {
  border: 1px solid #1762AA;
  border-radius: var(--radius-button, 999px);
  background: linear-gradient(180deg, #2E7FCB 0%, #1768BA 100%);
  color: #FFF;
  box-shadow: var(--shadow-button-primary, 0 2px 5px rgba(23, 104, 186, .22));
}

/* Module controls that sit outside the shared action containers. */
html body .main > button[data-action="home"],
html body .main .vault-search button,
html body .main button[data-op="allocation-add"] {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .main > button[data-action="home"]:hover,
html body .main .vault-search button:hover,
html body .main button[data-op="allocation-add"]:hover {
  border-color: #B9C8D8;
  background: #F6F9FC;
  color: var(--text, #142B49);
  box-shadow: var(--shadow-button-hover, 0 2px 6px rgba(16, 24, 40, .08));
}
html body .main .vault-heading button.primary {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #1762AA;
  border-radius: var(--radius-button, 999px);
  background: linear-gradient(180deg, #2E7FCB 0%, #1768BA 100%);
  color: #FFF;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-button-primary, 0 2px 5px rgba(23, 104, 186, .22));
}
html body .main .vault-heading button.primary:hover {
  border-color: #155FA9;
  background: linear-gradient(180deg, #2A77C0 0%, #155FA9 100%);
}
html body .main .notice button {
  height: 30px;
  min-height: 30px;
  padding: 0 12px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
html body .main .notice button:hover { border-color: #B9C8D8; background: #F6F9FC; }
@media (max-width: 767px) {
  html body .main > button[data-action="home"],
  html body .main .vault-search button,
  html body .main button[data-op="allocation-add"],
  html body .main .vault-heading button.primary {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
  html body .main .notice button { height: 44px; min-height: 44px; font-size: 14px; }
}

/* Standalone primary/danger controls use the same pill skin. */
html body .main button.primary:not(.ux-btn):not(.ux-icon-btn) {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #1762AA;
  border-radius: var(--radius-button, 999px);
  background: linear-gradient(180deg, #2E7FCB 0%, #1768BA 100%);
  color: #FFF;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-button-primary, 0 2px 5px rgba(23, 104, 186, .22));
}
html body .main button.primary:not(.ux-btn):not(.ux-icon-btn):hover {
  border-color: #155FA9;
  background: linear-gradient(180deg, #2A77C0 0%, #155FA9 100%);
}
html body .main button.danger:not(.ux-btn):not(.ux-icon-btn) {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #F0C7CD;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #B42318;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .main button.danger:not(.ux-btn):not(.ux-icon-btn):hover { border-color: #E9ABB4; background: #FEF2F2; }

html body .main .quote-checklist-actions > button,
html body .main .quote-checklist-actions > a {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .main .quote-checklist-actions > button:hover,
html body .main .quote-checklist-actions > a:hover {
  border-color: #B9C8D8;
  background: #F6F9FC;
  color: var(--text, #142B49);
  box-shadow: var(--shadow-button-hover, 0 2px 6px rgba(16, 24, 40, .08));
}
@media (max-width: 767px) {
  html body .main button.primary:not(.ux-btn):not(.ux-icon-btn),
  html body .main button.danger:not(.ux-btn):not(.ux-icon-btn),
  html body .main .quote-checklist-actions > button,
  html body .main .quote-checklist-actions > a {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
}

html body .main button[data-action="customer-inline"],
html body .main .qm-search-compact button,
html body .main .opt-batch-footer button:not(.primary):not(.danger) {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .main button[data-action="customer-inline"]:hover,
html body .main .qm-search-compact button:hover,
html body .main .opt-batch-footer button:not(.primary):not(.danger):hover {
  border-color: #B9C8D8;
  background: #F6F9FC;
  color: var(--text, #142B49);
  box-shadow: var(--shadow-button-hover, 0 2px 6px rgba(16, 24, 40, .08));
}
@media (max-width: 767px) {
  html body .main button[data-action="customer-inline"],
  html body .main .qm-search-compact button,
  html body .main .opt-batch-footer button:not(.primary):not(.danger) {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
}

html body .main .insight-actions > a:not(.ux-btn):not(.text),
html body .main .insight-actions > button:not(.ux-btn):not(.ux-icon-btn):not(.primary):not(.danger),
html body .main button[data-op="change-add"],
html body .main button[data-history="line-add"] {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .main .insight-actions > a:not(.ux-btn):not(.text):hover,
html body .main .insight-actions > button:not(.ux-btn):not(.ux-icon-btn):not(.primary):not(.danger):hover,
html body .main button[data-op="change-add"]:hover,
html body .main button[data-history="line-add"]:hover {
  border-color: #B9C8D8;
  background: #F6F9FC;
  color: var(--text, #142B49);
  box-shadow: var(--shadow-button-hover, 0 2px 6px rgba(16, 24, 40, .08));
}
@media (max-width: 767px) {
  html body .main .insight-actions > a:not(.ux-btn):not(.text),
  html body .main .insight-actions > button:not(.ux-btn):not(.ux-icon-btn):not(.primary):not(.danger),
  html body .main button[data-op="change-add"],
  html body .main button[data-history="line-add"] {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
}

/* Modal dialogs live outside .main; apply the same pill skin there. */
html body .modal .ux-btn.ux-btn,
html body .modal button:not(.ux-btn):not(.ux-icon-btn):not(.link-button):not(.primary):not(.danger) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
  text-decoration: none;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .modal .ux-btn.ux-btn svg { width: 16px; height: 16px; flex: none; }
html body .modal .actions > a,
html body .modal .actions > button { flex: 0 0 auto; }
@media (min-width: 768px) {
  html body .o3-management-modal .modal { width: min(100%, 600px); max-width: 600px; }
}
html body .modal .ux-btn.ux-btn:hover,
html body .modal button:not(.ux-btn):not(.ux-icon-btn):not(.link-button):not(.primary):not(.danger):hover {
  border-color: #B9C8D8;
  background: #F6F9FC;
  color: var(--text, #142B49);
  box-shadow: var(--shadow-button-hover, 0 2px 6px rgba(16, 24, 40, .08));
}
html body .modal .ux-btn-primary.ux-btn-primary,
html body .modal button.primary:not(.ux-btn):not(.ux-icon-btn) {
  border: 1px solid #1762AA;
  border-radius: var(--radius-button, 999px);
  background: linear-gradient(180deg, #2E7FCB 0%, #1768BA 100%);
  color: #FFF;
  box-shadow: var(--shadow-button-primary, 0 2px 5px rgba(23, 104, 186, .22));
}
html body .modal .ux-btn-danger.ux-btn-danger,
html body .modal button.danger:not(.ux-btn):not(.ux-icon-btn) {
  border: 1px solid #F0C7CD;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #B42318;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .modal .ux-btn-danger.ux-btn-danger:hover,
html body .modal button.danger:not(.ux-btn):not(.ux-icon-btn):hover { border-color: #E9ABB4; background: #FEF2F2; color: #B42318; }
@media (max-width: 767px) {
  html body .modal .ux-btn.ux-btn,
  html body .modal button:not(.ux-btn):not(.ux-icon-btn):not(.link-button):not(.primary):not(.danger),
  html body .modal .ux-btn-primary.ux-btn-primary,
  html body .modal button.primary:not(.ux-btn):not(.ux-icon-btn),
  html body .modal .ux-btn-danger.ux-btn-danger,
  html body .modal button.danger:not(.ux-btn):not(.ux-icon-btn) {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
}

/* Business progress: equal-width stage actions keep the six-column grid legible. */
@media (min-width: 768px) {
  html body .main .opt-progress-grid .opt-progress-action .ux-btn { width: 100%; }
}
@media (max-width: 767px) {
  html body .main .opt-progress-grid .opt-progress-action .ux-btn { width: 100%; padding: 0 12px; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  html body .main .opt-progress-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

/* Flow quote action row: secondary anchors and plain buttons share the pill skin. */
html body .main .pagehead .actions.flow-quote-actions > a.secondary {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFFFFF;
  color: #31465E;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .main .pagehead .actions.flow-quote-actions > a.secondary:hover {
  border-color: #B9C8D8;
  background: #F6F9FC;
  color: var(--text, #142B49);
  box-shadow: var(--shadow-button-hover, 0 2px 6px rgba(16, 24, 40, .08));
}
@media (max-width: 767px) {
  html body .main .pagehead .actions.flow-quote-actions.quote-checklist-actions > a.secondary,
  html body .main .pagehead .actions.flow-quote-actions.quote-checklist-actions > button:not(.primary):not(.ux-btn):not(.ux-icon-btn) {
    height: 44px;
    min-height: 44px;
    padding: 0 18px;
    font-size: 14px;
  }
}

/* Party-statement buttons consume the shared pill language. */
html body .main .ps-button {
  height: 36px;
  min-height: 36px;
  padding: 0 16px;
  border: 1px solid #D5DDE7;
  border-radius: var(--radius-button, 999px);
  background: #FFF;
  color: #31465E;
  font-size: 13px;
  font-weight: 500;
  box-shadow: var(--shadow-button, 0 1px 2px rgba(16, 24, 40, .05));
}
html body .main .ps-button.primary {
  background: linear-gradient(180deg, #2E7FCB 0%, #1768BA 100%) !important;
  border-color: #1762AA !important;
  color: #FFF !important;
  box-shadow: var(--shadow-button-primary, 0 2px 5px rgba(23, 104, 186, .22)) !important;
}
html body .main .ps-button.ps-text {
  border-color: transparent;
  background: transparent;
  box-shadow: none;
  color: var(--primary);
}
html body .main .ps-button.ps-text:hover { background: #F6F9FC; color: var(--text); }
@media (max-width: 767px) {
  html body .main .ps-button { height: 44px; min-height: 44px; padding: 0 18px; font-size: 14px; }
}

html body .main .pagehead .ps-button.ps-button { height: 36px; min-height: 36px; padding: 0 16px; }
@media (max-width: 767px) {
  html body .main .pagehead .ps-button.ps-button { height: 44px; min-height: 44px; padding: 0 18px; }
}
