:root{--ui-font:"HarmonyOS Sans SC","Noto Sans SC","Microsoft YaHei",sans-serif}body,button,input,select,textarea{font-family:var(--ui-font)!important}.page-heading h1,.lead-heading h1,.enterprise-header h1{font-weight:600}.nav-group-label.module-label,.nav-group-label.settings-label{font-weight:600}.lead-unified-table td{font-size:12px}.lead-company{font-size:13px}.font-preview-toggle{width:32px;height:32px;border-radius:5px;color:#557395;font-family:Georgia,serif!important;font-size:17px}.font-preview-toggle:hover{background:#eaf1fb}.font-preview-panel{position:fixed;z-index:30;right:20px;top:56px;width:min(450px,calc(100vw - 24px));max-height:calc(100vh - 75px);overflow:auto;background:#fff;border:1px solid #dde6f2;border-radius:8px;box-shadow:0 15px 55px #233e6029;padding:0 20px 20px}.font-preview-panel header{display:flex;align-items:center;justify-content:space-between;padding:18px 0 12px;font-size:14px;color:#365271}.font-preview-panel header button{width:28px;height:28px;font-size:20px;color:#8091a7}.font-preview-options{display:grid;gap:12px}.font-preview-option{display:block;padding:15px 17px;background:#f8fafd;border:1px solid #e2e9f2;border-radius:6px;cursor:pointer;color:#405977}.font-preview-option:has(input:checked){border-color:#83aef4;background:#f0f6ff}.font-preview-option>span{display:flex;align-items:center;gap:8px;font-size:12px;margin-bottom:14px}.font-preview-option small{margin-left:auto;font-size:11px;color:#8b9bb0}.font-preview-option input{accent-color:#3370ff;width:14px;height:14px}.font-preview-option>strong{font-family:inherit;display:block;font-size:19px;font-weight:500;line-height:1.6;overflow-wrap:anywhere}.font-preview-option p{font-size:13px;color:#698099;margin:8px 0;line-height:1.8}.font-preview-option>div{font-size:12px;color:#8c9caf}.font-preview-option input,.font-preview-option b,.font-preview-option small,.font-preview-option strong,.font-preview-option p,.font-preview-option div{font-family:inherit!important}@media(max-width:700px){.font-preview-panel{right:12px}.font-preview-option>strong{font-size:17px}.font-preview-option{padding:12px}}
:root {
  --ui-text-size: 13px;
  --ui-label-size: 13px;
  --ui-input-size: 14px;
  --ui-caption-size: 12px;
  --ui-badge-size: 12px;
  --ui-title-size: 20px;
}

/* Compact desktop scale shared by lists, forms and drawers; keep browser zoom. */
body { font-size: var(--ui-text-size); }
.page-heading h1, .lead-heading h1, .sf-heading h1,
.enterprise-header h1 { font-size: var(--ui-title-size); line-height: 1.5; }
.nav-item { font-size: var(--ui-text-size); }
.sub-item, .breadcrumb { font-size: var(--ui-caption-size); }
.primary-btn, .secondary-btn, .page-tab, .enterprise-tabs button,
.enterprise-open-tab, .lead-status-tabs button { font-size: var(--ui-text-size); }
.row-action { font-size: var(--ui-caption-size); }

:is(#page-root, #modal-root, #enterprise-tab-drawer) :is(.data-table, .sf-table) td,
:is(#page-root, #modal-root, #enterprise-tab-drawer) :is(.lead-company, .sf-company strong, .name-link strong) {
  font-size: var(--ui-text-size);
}
:is(#page-root, #modal-root, #enterprise-tab-drawer) :is(.data-table, .sf-table) th {
  font-size: var(--ui-caption-size);
}
.lead-last-note, .lead-product-choice, .lead-search, .lead-muted,
.lead-subtext, .lead-product-cell small, .lead-detail-facts dt,
.lead-detail-facts dd, .sf-caption, .sf-facts dt, .sf-facts dd,
.enterprise-facts dt, .crm-create-summary span { font-size: var(--ui-caption-size); }
.enterprise-facts dd, .lead-record-list p, .enterprise-timeline p {
  font-size: var(--ui-text-size);
}
.tag, .lead-chip, .lead-demo-badge, .lead-status-tabs span,
.lead-social-badges button, .lead-social-badges span,
.data-table td small, .catalog-table-scroll small { font-size: var(--ui-badge-size); }

:is(#page-root, #modal-root, #enterprise-tab-drawer, .office-dialog) label,
.sf-confirm, .lead-social-quality { font-size: var(--ui-label-size); }
/* The legacy theme marks .sf-field important; retain that cascade contract. */
.sf-field { font-size: var(--ui-label-size) !important; }
:is(#page-root, #modal-root, #enterprise-tab-drawer, .office-dialog) :is(
  input:not([type="checkbox"]):not([type="radio"]):not([type="range"]), select, textarea
) {
  font-size: var(--ui-input-size);
  line-height: 1.45;
  min-height: 34px;
}
.global-search input { font-size: var(--ui-caption-size); }
:is(#page-root, #modal-root) .form-section-title { font-size: 14px; }
.enterprise-contact-card strong, .enterprise-contact-phone,
.office-panel .card-header h3 { font-size: 14px; }
.enterprise-contact-card small, .office-row-main>strong,
.office-row-main .row-action, .office-row-main p, .office-empty,
.office-error, .office-notice, .office-modal .form-field,
.office-description { font-size: var(--ui-text-size); }
.office-panel .card-header p, .office-muted, .office-footnote,
.office-row-main .office-reminder-excerpt { font-size: var(--ui-caption-size); }
.stat-value { font-size: 24px; }

/* Allow company names to wrap inside existing user-adjusted column widths. */
.lead-unified-table .lead-company {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 700px) {
  :root { --ui-input-size: 16px; --ui-title-size: 18px; }
  /* Preserve the existing icon-only sidebar on narrow screens. */
  .nav-item { font-size: 0; }
}
