/*
  Global Cotigo typography layer.
  Loaded last by the Admin gateway so module-specific CSS keeps layout while text
  sizes and weights stay consistent across pages.
*/
:root {
  --ct-typo-font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  --ct-typo-body-size: 13px;
  --ct-typo-body-weight: 400;
  --ct-typo-note-size: 12px;
  --ct-typo-module-title-size: 23px;
  --ct-typo-module-title-weight: 700;
  --ct-typo-section-title-size: 18px;
  --ct-typo-section-title-weight: 600;
  --ct-typo-tab-size: 15px;
  --ct-typo-tab-weight: 500;
  --ct-typo-button-size: 13px;
  --ct-typo-button-weight: 400;
  --ct-typo-table-head-size: 13px;
  --ct-typo-table-head-weight: 600;
  --ct-typo-table-cell-size: 13px;
  --ct-typo-modal-title-size: 20px;
  --ct-typo-modal-title-weight: 600;
  --ct-typo-field-size: 13px;
  --ct-typo-field-weight: 400;
  --ct-typo-sidebar-size: 14px;
  --ct-typo-sidebar-weight: 400;
  --ct-typo-brand-size: 18px;
  --ct-typo-brand-weight: 700;
}

html,
body,
button,
input,
select,
textarea {
  font-family: var(--ct-typo-font-family) !important;
  letter-spacing: 0 !important;
}

body {
  font-size: var(--ct-typo-body-size) !important;
  font-weight: var(--ct-typo-body-weight) !important;
  line-height: 1.35 !important;
}

.side h1,
.mobile-admin-heading h1 {
  font-size: var(--ct-typo-brand-size) !important;
  font-weight: var(--ct-typo-brand-weight) !important;
  line-height: 1.1 !important;
}

.head h2,
.sales-issue-head h2,
.mobile-admin-placeholder h2,
[data-module-title],
.module-title,
.page-title {
  font-size: var(--ct-typo-module-title-size) !important;
  font-weight: var(--ct-typo-module-title-weight) !important;
  line-height: 1.1 !important;
}

.settings-card-head h3,
.sec .top h3,
.menu-toolbar h3,
.analysis-ai-title,
.mobile-inbound-modal header h3,
.mobile-inbound-detail-page header h3 {
  font-size: var(--ct-typo-section-title-size) !important;
  font-weight: var(--ct-typo-section-title-weight) !important;
  line-height: 1.2 !important;
}

.head-tab,
.customer-head-tab,
.settings-tab,
.module-tab,
.permission-tab,
.permission-subtab,
.sales-tab,
.sales-issue-tab,
.warehouse-tab,
.purchase-tab,
.analysis-tab,
.shipping-tab,
[data-page-tab],
[data-sales-tab],
[data-sales-issue-tab],
[data-module-tab],
[data-permission-tab],
[data-shipping-tab] {
  font-size: var(--ct-typo-tab-size) !important;
  font-weight: var(--ct-typo-tab-weight) !important;
  line-height: 1.2 !important;
}

button,
.toolbar-item,
.btns button,
.settings-actions button,
.settings-head-actions button,
.settings-toolbar-actions button,
.settings-modal-actions button,
.customer-columns-footer button,
.customer-edit-actions button,
.export-actions button,
.column-actions button,
.permission-btn,
.permission-inline-action,
.sales-issue-toolbar button,
.sales-issue-dialog-actions button,
.shipping-toolbar button,
.warehouse-documents-operations button,
.discount-actions button,
.discount-save,
.mobile-admin-module-menu button,
.mobile-admin-user-menu button {
  font-size: var(--ct-typo-button-size) !important;
  font-weight: var(--ct-typo-button-weight) !important;
  line-height: 1.2 !important;
}

.head-tab,
.customer-head-tab,
.settings-tab,
.module-tab,
.permission-tab,
.permission-subtab,
.sales-tab,
.sales-issue-tab,
.warehouse-tab,
.purchase-tab,
.analysis-tab,
.shipping-tab,
[data-page-tab],
[data-sales-tab],
[data-sales-issue-tab],
[data-module-tab],
[data-permission-tab],
[data-shipping-tab] {
  font-size: var(--ct-typo-tab-size) !important;
  font-weight: var(--ct-typo-tab-weight) !important;
  line-height: 1.2 !important;
}

.nav a,
.admin-side-user-name,
.admin-side-user-menu button,
.admin-side-user-submenu button,
.mobile-admin-user-name {
  font-size: var(--ct-typo-sidebar-size) !important;
  font-weight: var(--ct-typo-sidebar-weight) !important;
  line-height: 1.25 !important;
}

label,
.settings-field label,
.customer-edit-field label,
.prod-edit-field label,
.warehouse-inbound-toolbar-field,
.warehouse-inbound-docbar-item,
.warehouse-documents-field,
.permission-inline-mode span,
.permission-inline-switch span,
.mobile-inbound-detail-field,
.discount-meta label {
  font-size: var(--ct-typo-field-size) !important;
  font-weight: var(--ct-typo-field-weight) !important;
  line-height: 1.25 !important;
}

input,
select,
textarea,
.toolbar-search,
.product-search,
.sales-issue-product-picker-search,
.analysis-ai-input {
  font-size: var(--ct-typo-field-size) !important;
  font-weight: var(--ct-typo-field-weight) !important;
  line-height: 1.35 !important;
}

table,
.product-table,
.customer-table,
.sales-table,
.sales-issue-table,
.shipping-table,
.permission-table,
.settings-user-table,
.api-share-table,
.warehouse-documents-table,
.mobile-inbound-table {
  font-size: var(--ct-typo-table-cell-size) !important;
  font-weight: var(--ct-typo-body-weight) !important;
}

th,
thead th,
.product-table th,
.customer-table th,
.sales-table th,
.sales-issue-table th,
.shipping-table th,
.permission-table th,
.settings-user-table th,
.api-share-table th,
.warehouse-documents-table th,
.mobile-inbound-table th,
.sort-button,
thead button {
  font-size: var(--ct-typo-table-head-size) !important;
  font-weight: var(--ct-typo-table-head-weight) !important;
  line-height: 1.25 !important;
}

td,
tbody td,
.product-table td,
.customer-table tbody td,
.sales-table td,
.sales-issue-table td,
.shipping-table td,
.permission-table td,
.settings-user-table td,
.api-share-table td,
.warehouse-documents-table td,
.mobile-inbound-table td {
  font-size: var(--ct-typo-table-cell-size) !important;
  font-weight: var(--ct-typo-body-weight) !important;
  line-height: 1.3 !important;
}

.export-modal h3,
.columns-modal h3,
.customer-columns-title,
.customer-edit-title,
.prod-edit-title,
.settings-modal-head h3,
.sales-issue-dialog h3,
.sales-issue-product-picker-head h3,
.sales-issue-columns-dialog h3,
.admin-side-logout-dialog h3,
[role="dialog"] h3 {
  font-size: var(--ct-typo-modal-title-size) !important;
  font-weight: var(--ct-typo-modal-title-weight) !important;
  line-height: 1.15 !important;
}

.export-modal,
.columns-modal,
.customer-columns-modal,
.customer-edit-modal,
.prod-edit-modal,
.settings-modal,
.sales-issue-dialog,
.admin-side-logout-dialog,
[role="dialog"] {
  font-size: var(--ct-typo-body-size) !important;
  font-weight: var(--ct-typo-body-weight) !important;
}

.msg,
.toast,
.settings-status,
.settings-note,
.menu-note,
.permission-empty,
.permission-denied,
.external-order-import-status,
.analysis-status,
.search-result-count,
.product-sales-stat-count,
.customer-current-count,
.admin-side-logout-dialog p,
.mobile-admin-placeholder p,
.mobile-inbound-meta {
  font-size: var(--ct-typo-note-size) !important;
  font-weight: var(--ct-typo-body-weight) !important;
  line-height: 1.4 !important;
}

strong,
b {
  font-weight: 600;
}

@media (max-width: 760px) {
  :root {
    --ct-typo-module-title-size: 20px;
    --ct-typo-tab-size: 13px;
    --ct-typo-button-size: 13px;
    --ct-typo-table-head-size: 12px;
    --ct-typo-table-cell-size: 12px;
  }

  .mobile-inbound-detail-name,
  .mobile-inbound-detail-identity span,
  .mobile-inbound-detail-field input {
    font-weight: var(--ct-typo-body-weight) !important;
  }
}
