/* Layout typography v189: visual-only font-size/line-height convergence.
   This layer changes typography only. It does not change business behavior,
   navigation, buttons, menus, workflows, storage or API logic. */

:is(
  body.erp-app,
  body.source-inbox-frame-page,
  body.copywriting-app,
  body.api-app,
  body.templates-app
) {
  --m2-font-ui: "Segoe UI Variable Text", "PingFang SC", "Microsoft YaHei UI",
    "Microsoft YaHei", system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  --m2-font-mono: "Cascadia Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
  --m2-type-display: 20px;
  --m2-type-section: 15px;
  --m2-type-title: 14px;
  --m2-type-body: 13px;
  --m2-type-table: 12px;
  --m2-type-label: 11px;
  --m2-type-meta: 10.5px;
  font-family: var(--m2-font-ui) !important;
  font-size: 13px !important;
  line-height: 1.5 !important;
  -webkit-font-smoothing: antialiased !important;
  text-rendering: optimizeLegibility !important;
}

:is(
  body.erp-app,
  body.source-inbox-frame-page,
  body.copywriting-app,
  body.api-app,
  body.templates-app
)
:is(h1, h2, h3, h4, h5, p, th, td, span, small, strong, label, button, input, select, textarea) {
  letter-spacing: 0 !important;
}

/* ------------------------------------------------------------------ */
/* Shell, login and user menu                                          */
/* ------------------------------------------------------------------ */
body.erp-app .sidebar .brand {
  font-size: 15px !important;
  line-height: 1.2 !important;
}

body.erp-app .sidebar .brand::after {
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

body.erp-app .sidebar .nav button {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.erp-app .user-name {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1 !important;
}

body.erp-app .user-menu-action {
  
  
  line-height: 1 !important;
}

body.erp-app .login-brand-copy h1 {
  font-size: 20px !important;
  font-weight: 650 !important;
  line-height: 1.3 !important;
}

body.erp-app .login-brand-copy p {
  font-size: 13px !important;
  font-weight: 400 !important;
  line-height: 1.55 !important;
}

body.erp-app .login-field span {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.erp-app .login-card input,
body.erp-app .login-card #loginSubmitBtn {
  font-size: 13px !important;
  font-weight: 600 !important;
  line-height: 20px !important;
}

body.erp-app .login-error {
  font-size: 12px !important;
  line-height: 18px !important;
}

body.erp-app .permission-empty-card p,
body.erp-app .permission-empty-view p {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
}

/* ------------------------------------------------------------------ */
/* Shared buttons                                                      */
/* ------------------------------------------------------------------ */
body.source-inbox-frame-page .collector-button,
body.copywriting-app :is(
  .pageClearButton,
  .selectionDeleteButton,
  .selectionPromptButton,
  .workflowButton,
  .embeddedRemovalButton,
  .textLink
),
body.api-app :is(
  .action-button,
  .quick-button,
  .icon-button.has-label span
),
body.templates-app :is(
  .primary,
  .secondary,
  .retry,
  .template-load-more
),
body.erp-app :is(
  .system-check-button,
  .export-mapping-button,
  .export-complete-button,
  .page-clear-button,
  .account-add-button,
  .modal-btn,
  .account-editor-secondary,
  .account-editor-primary,
  .export-quiet-delete,
  .erp-primary-button,
  .erp-secondary-button
) {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
  white-space: nowrap !important;
}

body.erp-app .account-more-button {
  font-size: 15px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

body.erp-app .password-control button {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

/* ------------------------------------------------------------------ */
/* Empty states, statuses and form labels                              */
/* ------------------------------------------------------------------ */
:is(
  body.erp-app,
  body.source-inbox-frame-page,
  body.copywriting-app,
  body.api-app,
  body.templates-app
) :is(
  .collector-empty-state,
  .account-list-empty .account-table-cell,
  .export-listing-empty,
  .image-empty-cell,
  .emptyCell,
  .embeddedRemovalEmpty,
  .connection-empty,
  .template-page .empty,
  .permission-empty-card
) {
  font-size: 13px !important;
  font-weight: 500 !important;
  line-height: 1.6 !important;
}

body.erp-app :is(
  .account-form-feedback,
  .account-editor-feedback,
  .export-file-message,
  .system-modal-copy p
) {
  font-size: 13px !important;
  line-height: 1.6 !important;
}

body.erp-app :is(
  .system-modal-copy h2,
  .account-editor-header h2,
  .product-detail-header h2,
  .export-file-modal-copy h2,
  #exportFileTitle
) {
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 1.4 !important;
}

body.erp-app :is(
  .account-editor-field > span,
  .account-editor-field label > span,
  .export-file-modal-copy > label
) {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.erp-app :is(
  .account-editor-field input,
  .account-editor-field select,
  .account-editor-field textarea,
  .export-file-modal-copy input,
  .export-file-modal-copy select
) {
  font-size: 13px !important;
  line-height: 20px !important;
}

body.erp-app :is(
  .account-status-badge,
  .status-badge,
  .connection-state
) {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

/* ------------------------------------------------------------------ */
/* Accounts and system check                                           */
/* ------------------------------------------------------------------ */
body.erp-app .account-table-header {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.erp-app .account-table-cell,
body.erp-app .account-table-cell-account {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.erp-app .account-table-cell-name > span {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.erp-app .account-row-meta {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
}

body.erp-app .system-check-header p {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.erp-app .system-check-row-main strong {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 20px !important;
}

body.erp-app .system-check-row-main span {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.erp-app .system-check-row-main small {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 17px !important;
}

body.erp-app .system-check-badge {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

/* ------------------------------------------------------------------ */
/* Collector toolbar, progress and footer                              */
/* ------------------------------------------------------------------ */
body.source-inbox-frame-page .collector-links-input {
  font-size: 12px !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-progress-label {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-progress-figure,
body.source-inbox-frame-page .collector-progress-total {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-progress-figure > span:not(.collector-progress-total) {
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-progress-figure.is-waiting span {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-campaign-done {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-campaign-result {
  font-size: 12px !important;
  font-weight: 400 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-campaign-result b {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
  font-variant-numeric: tabular-nums !important;
}

body.source-inbox-frame-page .collector-selection-meta {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-inline-status {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-page-size,
body.source-inbox-frame-page .collector-page-size select,
body.source-inbox-frame-page .collector-pager {
  font-size: 12px !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-pager button {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
}

/* ------------------------------------------------------------------ */
/* Collector table and details                                         */
/* ------------------------------------------------------------------ */
body.source-inbox-frame-page #collectorResultTable th,
body.copywriting-app :is(#dataTable th, #embeddedRemovalTable th, #outputTable th),
body.erp-app #exportListingTable thead th {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
  white-space: nowrap !important;
}

body.source-inbox-frame-page #collectorResultTable td,
body.copywriting-app :is(#dataTable td, #embeddedRemovalTable td, #outputTable td),
body.erp-app #exportListingTable tbody td {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page #collectorResultTable :is(.cell-title, .cell-line),
body.copywriting-app :is(#dataTable .cellClamp, #embeddedRemovalTable .cellClamp, #outputTable .cellClamp),
body.erp-app #exportListingTable :is(.image-cell-clamp, .removal-cell-clamp, .erp-cell-clamp) {
  line-height: 18px !important;
  max-height: 36px !important;
}

body.copywriting-app :is(
  #dataTable td.col-sku .cellClamp,
  #embeddedRemovalTable td.col-sku .cellClamp,
  #outputTable td.col-sku .cellClamp
) {
  max-height: 18px !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page #collectorResultTable .cell-link,
body.source-inbox-frame-page #collectorResultTable .cell-asin,
body.copywriting-app :is(#dataTable td.col-sku .cellClamp, #embeddedRemovalTable td.col-sku .cellClamp),
body.erp-app #exportListingTable td.image-col-sku .image-cell-clamp {
  font-family: var(--m2-font-mono) !important;
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page #collectorResultTable :is(.cell-price, .cell-rating) {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
  font-variant-numeric: tabular-nums !important;
}

body.source-inbox-frame-page #collectorResultTable :is(.cell-number, .cell-delivery) {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
  font-variant-numeric: tabular-nums !important;
}

body.source-inbox-frame-page #collectorResultTable .cell-secondary {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page #collectorResultTable .collector-badge,
body.source-inbox-frame-page #collectorResultTable .collector-currency,
body.source-inbox-frame-page .collector-sort-indicator {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

body.source-inbox-frame-page .collector-detail-head h2 {
  font-size: 15px !important;
  font-weight: 700 !important;
  line-height: 21px !important;
}

body.source-inbox-frame-page .collector-detail-head strong {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-detail-section h3 {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-field label {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-field input,
body.source-inbox-frame-page .collector-field textarea {
  font-size: 12px !important;
  line-height: 18px !important;
}

body.source-inbox-frame-page .collector-detail-meta-row,
body.source-inbox-frame-page .collector-detail-meta-row dd,
body.source-inbox-frame-page .collector-detail-meta-row dt {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

body.source-inbox-frame-page .collector-detail-recollect,
body.source-inbox-frame-page .collector-detail-image-error,
body.source-inbox-frame-page .collector-detail-section-head {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

/* ------------------------------------------------------------------ */
/* Copywriting                                                         */
/* ------------------------------------------------------------------ */
body.copywriting-app .commandIdentity strong {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 20px !important;
}

body.copywriting-app .commandIdentity span,
body.copywriting-app .commandMeta {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.copywriting-app .panelHeader h1,
body.copywriting-app .compactHeader h1,
body.copywriting-app .embeddedRemovalTitle h2 {
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 20px !important;
}

body.copywriting-app .panelHeader p,
body.copywriting-app .compactHeader p {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

body.copywriting-app .parseInstruction p,
body.copywriting-app .message,
body.copywriting-app .embeddedRemovalNotice {
  font-size: 12px !important;
  line-height: 1.5 !important;
}

body.copywriting-app .parseInputTitle strong {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.copywriting-app .parseInputTitle span,
body.copywriting-app .parseInputMeta,
body.copywriting-app .embeddedRemovalMeta,
body.copywriting-app .selectionStats {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.copywriting-app .selectionStats strong,
body.copywriting-app .parseInputMeta strong,
body.copywriting-app .embeddedRemovalMeta strong {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.copywriting-app .resultPreviewHeader {
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
}

body.copywriting-app .editor,
body.copywriting-app .parseInputPane textarea {
  font-family: var(--m2-font-mono) !important;
  font-size: 13px !important;
  line-height: 1.7 !important;
}

body.copywriting-app .embeddedRemovalEyebrow {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.copywriting-app .embeddedActionStatus {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

body.copywriting-app .tableFootnote,
body.copywriting-app #previewNote,
body.copywriting-app .copywritingPager {
  font-size: 12px !important;
  line-height: 18px !important;
}

body.copywriting-app .copywritingPager button {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 18px !important;
}

body.copywriting-app .moduleToast {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

/* ------------------------------------------------------------------ */
/* Export listing                                                      */
/* ------------------------------------------------------------------ */
body.erp-app .export-listing-header,
body.erp-app .export-mapping-center,
body.erp-app .export-mapping-center button,
body.erp-app .export-mapping-center span {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.erp-app #exportMappingStatus {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 30px !important;
}

body.erp-app .export-selection-meta,
body.erp-app #exportSelectionMeta {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.erp-app #exportSelectedMeta strong,
body.erp-app #exportListingCount,
body.erp-app #exportSelectedCount {
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
  font-variant-numeric: tabular-nums !important;
}

body.erp-app .export-mapping-issue-title {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.erp-app .export-mapping-issue-item,
body.erp-app .export-mapping-issue-more,
body.erp-app .workflow-pagination,
body.erp-app .workflow-pagination button,
body.erp-app [data-workflow-page-summary] {
  font-size: 12px !important;
  line-height: 18px !important;
}

body.erp-app #exportListingTable tbody td {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.erp-app #exportListingTable td.image-col-sku .image-cell-clamp,
body.erp-app #exportListingTable td.image-col-url .image-cell-clamp,
body.erp-app #exportListingTable td.image-col-asin .image-cell-clamp {
  font-family: var(--m2-font-mono) !important;
  font-size: 12px !important;
  line-height: 18px !important;
}

body.erp-app #exportListingTable :is(
  td.image-col-final-price,
  td.image-col-price,
  td.image-col-rating,
  td.image-col-review-count
) {
  font-weight: 650 !important;
  font-variant-numeric: tabular-nums !important;
}

body.erp-app #exportListingTable :is(.image-opt-placeholder, .optimized-placeholder) {
  font-size: 12px !important;
  font-weight: 600 !important;
  line-height: 1 !important;
}

/* ------------------------------------------------------------------ */
/* API settings                                                        */
/* ------------------------------------------------------------------ */
body.api-app .sidebar-head h1 {
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 20px !important;
}

body.api-app .connection-card strong {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.api-app .connection-card small,
body.api-app .connection-card .connection-state {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 16px !important;
}

body.api-app .provider-dot {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

body.api-app .editor-title-group h2 {
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 20px !important;
}

body.api-app .connection-form.provider-deepseek .editor-title-group h2 {
  font-size: 15px !important;
  font-weight: 650 !important;
  line-height: 20px !important;
}

body.api-app .editor-badge,
body.api-app .status-pill {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

body.api-app .switch-control,
body.api-app .provider-select span {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.api-app .card-head h3,
body.api-app .advanced-card summary,
body.api-app .result-head strong {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.api-app .field span {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.api-app .field input,
body.api-app .field select,
body.api-app .field textarea,
body.api-app .provider-select select {
  font-size: 13px !important;
  line-height: 20px !important;
}

body.api-app .result-head span,
body.api-app .save-state {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 18px !important;
}

body.api-app .result-card pre {
  font-family: var(--m2-font-mono) !important;
  font-size: 12px !important;
  line-height: 1.65 !important;
}

body.api-app .module-toast {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

/* ------------------------------------------------------------------ */
/* Templates                                                           */
/* ------------------------------------------------------------------ */
body.templates-app .toolbar-actions button,
body.templates-app .upload-failure-actions button,
body.templates-app .search-box input {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.templates-app .library-kicker,
body.templates-app .source-badge,
body.templates-app .status-pill,
body.templates-app .cloud-status {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

body.templates-app .template-title strong {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 18px !important;
}

body.templates-app .template-title small,
body.templates-app .template-meta,
body.templates-app .browse-path,
body.templates-app .upload-status-row.secondary,
body.templates-app .upload-failure-item {
  font-size: 12px !important;
  font-weight: 500 !important;
  line-height: 1.45 !important;
}

body.templates-app .upload-status-row,
body.templates-app .upload-failure-head,
body.templates-app .upload-failure-head strong,
body.templates-app .upload-failure-count {
  font-size: 12px !important;
  line-height: 18px !important;
}

body.templates-app .template-actions button {
  font-size: 12px !important;
  font-weight: 650 !important;
  line-height: 1 !important;
}

body.templates-app .metric-eyebrow {
  font-size: 12px !important;
  font-weight: 700 !important;
  line-height: 18px !important;
}

body.templates-app .metric-card .metric-value strong {
  font-size: 32px !important;
  font-weight: 700 !important;
  font-variant-numeric: tabular-nums !important;
  line-height: 1 !important;
}

body.templates-app .metric-card .metric-value span {
  font-size: 13px !important;
  font-weight: 650 !important;
  line-height: 1.2 !important;
}

body.templates-app .toast {
  font-size: 12px !important;
  line-height: 1.45 !important;
}

/* ------------------------------------------------------------------ */
/* Drawers, image zoom and copy buttons                                */
/* ------------------------------------------------------------------ */
body.erp-app .product-detail-header h2,
body.erp-app .product-detail-header p,
body.erp-app .product-detail-body :is(label, .field-label) {
  font-size: 13px !important;
  line-height: 1.5 !important;
}

body.erp-app .erp-image-zoom-dialog img,
body.source-inbox-frame-page .collector-image-hover-preview img,
body.erp-app .erp-image-hover-preview img {
  font-size: 0 !important;
}

body.erp-app .erp-cell-copy-button,
body.source-inbox-frame-page .collector-copy-button,
body.copywriting-app .cellCopyButton {
  width: 24px !important;
  height: 24px !important;
  min-width: 24px !important;
  min-height: 24px !important;
  font-size: 12px !important;
  line-height: 1 !important;
}

/* ------------------------------------------------------------------ */
/* Stable responsive safety                                            */
/* ------------------------------------------------------------------ */
@media (max-width: 1280px) {
  body.source-inbox-frame-page .collector-commandbar,
  body.copywriting-app .commandBar,
  body.erp-app .export-listing-header {
    font-size: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.erp-app *,
  body.source-inbox-frame-page *,
  body.copywriting-app *,
  body.api-app *,
  body.templates-app * {
    transition: none !important;
  }
}
