/* BirDesk Standard Skin typography system.
 * This layer maps legacy module text to one readable ERP scale without
 * changing print templates, the marketing treatment on the login screen,
 * or component geometry.
 */
html[data-theme="standard"] {
  --ui-font-xs: 12px;
  --ui-font-sm: 13px;
  --ui-font-md: 14px;
  --ui-font-lg: 16px;
  --ui-font-xl: 20px;
  --ui-font-2xl: 24px;
  --ui-line-xs: 16px;
  --ui-line-sm: 20px;
  --ui-line-md: 20px;
  --ui-line-lg: 24px;
  --ui-line-xl: 28px;
  --ui-line-2xl: 32px;
  --ui-weight-regular: 400;
  --ui-weight-medium: 500;
  --ui-weight-semibold: 600;
  --ui-weight-bold: 700;
}

html[data-theme="standard"] #erpApp,
html[data-theme="standard"] .system-dialog-backdrop,
html[data-theme="standard"] .connection-backdrop {
  font-family: var(--erp-font-family);
  font-size: var(--ui-font-sm);
  font-weight: var(--ui-weight-regular);
  line-height: var(--ui-line-sm);
  letter-spacing: 0;
}

/* Controls and commands */
html[data-theme="standard"] :is(#erpApp, .system-dialog-backdrop) :is(
  button,
  input,
  select,
  textarea,
  .fake-input,
  .searchable-trigger,
  .searchable-select-input,
  .mail-multi-trigger
) {
  font-size: var(--ui-font-sm);
  font-weight: var(--ui-weight-medium);
  line-height: var(--ui-line-sm);
}

html[data-theme="standard"] #erpApp :is(
  .btn,
  .module-tabs > button,
  .cashbox-tabs > button,
  .settings-tabs > button,
  .customer-tabs > button,
  .developer-tools-nav > button,
  .module-filter-clear,
  .server-pagination button,
  .pagination button,
  .mail-folder,
  .mail-compose-trigger
) {
  font-size: var(--ui-font-sm);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-sm);
}

/* Labels and supporting copy */
html[data-theme="standard"] #erpApp :is(
  .module-filter-field > span,
  .settings-field > span,
  .entry-panel-field > span,
  .operation-field > span,
  .operation-field-grid > label > span,
  .form-grid > label > span,
  .modal label > span,
  .mail-compose-body label,
  .mail-recipient-picker > span,
  .system-dialog-reason > span
) {
  font-size: var(--ui-font-xs);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-xs);
}

html[data-theme="standard"] #erpApp :is(
  small,
  time,
  .field-hint,
  .form-hint,
  .module-filter-meta,
  .settings-save-status,
  .profile-summary span,
  .notification-panel-head span,
  .notification-item-head span,
  .notification-item-meta span,
  .notification-item time,
  .notification-item p,
  .notification-empty,
  .cashbox-balance-grid small,
  .sidebar > .brand span,
  .customer-legacy-name small,
  .identity-scan-result-row small,
  .company-info-summary span,
  .company-info-fields span,
  .company-section-title span,
  .company-data-boundary span,
  .company-module-option small,
  .developer-tool-section-head p,
  .developer-kpi-grid small,
  .developer-tool-note,
  .platform-announcement span,
  .mail-list-pane header span,
  .mail-row-meta time,
  .mail-row-content small,
  .mail-delivery.is-detailed,
  .business-notification-list header span,
  .business-notification-row small,
  .business-notification-row time,
  .business-notification-detail > header span,
  .business-notification-detail p,
  .business-notification-metric span,
  .business-notification-metric small,
  .business-notification-section header span
) {
  font-size: var(--ui-font-xs);
  line-height: var(--ui-line-xs);
}

/* Tables use a stable header/body/footer hierarchy. */
html[data-theme="standard"] #erpApp :is(.data-table, .table-fixed-head table) thead th,
html[data-theme="standard"] #erpApp .table-fixed-head th {
  font-size: var(--ui-font-xs);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-xs);
}

html[data-theme="standard"] #erpApp :is(.data-table, .table-body-scroll table) tbody td,
html[data-theme="standard"] #erpApp .table-body-scroll td {
  font-size: var(--ui-font-sm);
  font-weight: var(--ui-weight-regular);
  line-height: var(--ui-line-sm);
}

html[data-theme="standard"] #erpApp :is(.data-table, .table-fixed-foot table) tfoot td,
html[data-theme="standard"] #erpApp .table-fixed-foot td {
  font-size: var(--ui-font-sm);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-sm);
}

/*
 * typography.css groups unrelated legacy emphasis selectors under one high
 * specificity :is() rule. Keep this Standard Skin compatibility boundary
 * above that group without changing the Windows 7 skin or print templates.
 */
html[data-theme="standard"] body #erpApp.app .data-table tfoot td,
html[data-theme="standard"] body #erpApp.app .table-fixed-foot td {
  font-size: var(--ui-font-sm);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-sm);
}

html[data-theme="standard"] #erpApp :is(.badge, .status, .status-badge, .nav-mail-badge) {
  font-size: var(--ui-font-xs);
  font-weight: var(--ui-weight-semibold);
  line-height: 18px;
}

/* Section and page hierarchy */
html[data-theme="standard"] #erpApp :is(
  .section-head h3,
  .subhead,
  .operation-section h4,
  .operation-summary h4,
  .operation-document-band h4,
  .operation-band-title h4,
  .customer-section-heading h4,
  .company-info-section > h4,
  .developer-subtitle,
  .business-notification-section h4
) {
  font-size: var(--ui-font-md);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-md);
}

html[data-theme="standard"] body #erpApp.app .section-head h3,
html[data-theme="standard"] body #erpApp.app .subhead,
html[data-theme="standard"] body #erpApp.app .operation-section h4,
html[data-theme="standard"] body #erpApp.app .operation-summary h4,
html[data-theme="standard"] body #erpApp.app .operation-document-band h4,
html[data-theme="standard"] body #erpApp.app .operation-band-title h4 {
  font-size: var(--ui-font-md);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-md);
}

html[data-theme="standard"] #erpApp :is(
  .modal .section-head h3,
  .info-drawer-head h3,
  .operation-editor-head h3,
  .mail-list-pane h3,
  .mail-reader-empty strong,
  .mail-empty strong,
  .mail-notification-placeholder h3,
  .business-notification-list h3,
  .business-notification-detail h3
) {
  font-size: var(--ui-font-lg);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-lg);
}

html[data-theme="standard"] body #erpApp.app .modal .section-head h3,
html[data-theme="standard"] body #erpApp.app .info-drawer-head h3,
html[data-theme="standard"] body #erpApp.app .operation-editor-head h3 {
  font-size: var(--ui-font-lg);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-lg);
}

html[data-theme="standard"] body #erpApp.app .topbar h2 {
  font-size: var(--ui-font-xl);
  font-weight: var(--ui-weight-semibold);
  line-height: var(--ui-line-xl);
}

html[data-theme="standard"] #erpApp :is(
  .dashboard-metric-list strong,
  .dashboard-kpi strong,
  .operation-live-total strong,
  .cash-amount
) {
  font-size: var(--ui-font-2xl);
  font-weight: var(--ui-weight-bold);
  line-height: var(--ui-line-2xl);
}

/* Financial and chronological values keep column alignment stable. */
html[data-theme="standard"] #erpApp :is(
  table,
  time,
  input[type="number"],
  input[type="date"],
  input[type="datetime-local"],
  .cash-amount,
  .operation-live-total,
  .dashboard-metric-list strong,
  .account-balances-summary strong,
  .developer-kpi-grid strong
) {
  font-variant-numeric: tabular-nums;
}

/* Login controls follow the same readable form scale; the branded hero remains intact. */
html[data-theme="standard"] :is(#loginScreen, #passwordChangeBackdrop) :is(
  input,
  button,
  select,
  textarea
) {
  font-size: var(--ui-font-sm);
  line-height: var(--ui-line-sm);
}

html[data-theme="standard"] :is(#loginScreen, #passwordChangeBackdrop) label > span {
  font-size: var(--ui-font-xs);
  line-height: var(--ui-line-xs);
}
