/* RepairTicket Application Typography Standard
   Permanent rule: equivalent UI elements use the same family, size,
   weight and line-height across every redesigned screen. */

:root {
  --rt-font-family: "Outfit", "Avenir Next", "Segoe UI", Arial, sans-serif;
  --rt-type-meta: .625rem;       /* 10px */
  --rt-type-secondary: .6875rem; /* 11px */
  --rt-type-body: .75rem;        /* 12px */
  --rt-type-title: .9375rem;     /* 15px */
  --rt-type-metric: 1.125rem;    /* 18px */
  --rt-type-hero: 1.5rem;       /* 24px — approved tickets.php hero title */
  --rt-line-tight: 1.2;
  --rt-line-base: 1.35;
  --rt-line-copy: 1.5;
  --rt-weight-regular: 400;
  --rt-weight-medium: 500;
  --rt-weight-label: 600;
  --rt-weight-title: 700;
}

body,
button,
input,
select,
textarea,
.app-header,
.rt-sidebar,
.app-hero,
.app-main,
.rt-footer,
.modal,
.dropdown-menu {
  font-family: var(--rt-font-family) !important;
}

.tv-side-stack {
  font-family: var(--rt-font-family) !important;
}

body,
.app-main,
.content-column,
.tk-shell,
.tv-shell,
.tv-side-panel,
.db-card {
  font-size: var(--rt-type-body) !important;
  line-height: var(--rt-line-base) !important;
  font-weight: var(--rt-weight-regular);
}

/* Page titles */
.tk-hero-title,
.tv-hero-title,
.inv-hero-title,
.serial-title,
.tr-hero-title,
.dash-hero-title {
  font-family: var(--rt-font-family) !important;
  font-size: var(--rt-type-hero) !important;
  font-weight: var(--rt-weight-title) !important;
  line-height: 1.08 !important;
  letter-spacing: -.025em !important;
  text-transform: uppercase !important;
}

/* Card and section titles */
.db-card-title,
.ov-head-title,
.branch-title,
.transfer-notice-title,
.transfer-mini-title,
.tk-section-title,
.tk-shell-title,
.tv-card-title,
.tv-side-section-title,
.tv-est-modal-title,
.tv-inventory-drawer-title,
.tv-device-workspace-title,
.tv-ticket-devices-title,
.inv-shell-title,
.srx-title,
.srx-panel-title,
.tpl-card-title,
.tpl-items-heading,
.ia-title,
.ia-section-title,
.ia-recent-title,
.serial-panel-title,
.tr-shell-title,
.tv-shell-title {
  font-size: var(--rt-type-title) !important;
  font-weight: var(--rt-weight-title) !important;
  line-height: var(--rt-line-tight) !important;
  letter-spacing: -.01em !important;
}

/* Main metrics and monetary totals */
.tk-stat-value,
.tv-hero-top-stat-value,
.tv-stat-value,
.dash-priority-copy strong,
.ov-mini-value,
.ov-gauge-stat strong,
.ov-transfer-kpi strong,
.db-stat-row-val,
.db-login-name,
.db-inv-name,
.tv-simple-money,
.tv-total-value,
.tv-total-grand,
.tv-wizard-amount,
.tv-est-summary-value {
  font-size: var(--rt-type-metric) !important;
  font-weight: var(--rt-weight-medium) !important;
  line-height: var(--rt-line-tight) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0 !important;
}

/* Inventory hero KPI values follow the approved Tickets compact scale. */
.inv-stat-value,
.serial-card-value:not(.is-variant),
.tr-stat-value,
.tv-hero-stat strong {
  font-family: var(--rt-font-family) !important;
  font-size: 1.25rem !important;
  font-weight: var(--rt-weight-title) !important;
  line-height: var(--rt-line-tight) !important;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0 !important;
}

/* Hero KPI values use the same standard on all three screens */
.tv-hero-top-stat-value,
.tk-stat-value {
  font-size: 1.25rem !important; /* approved 20px hero KPI value */
}

/* Body copy, controls, inputs and table values */
.tk-table,
.tv-table,
.tv-log-table,
.tk-table tbody td,
.tv-table tbody td,
.tv-log-table tbody td,
.tk-cell-primary,
.tk-device-name,
.tk-total,
.tv-note-text,
.tv-part-name,
.tv-attach-name,
.tv-check-title,
.tv-approval-title,
.tv-mini-timeline-title,
.tv-input,
.tv-money-input,
.tv-status-trigger,
.tv-status-select,
.tv-inventory-search,
.tv-note-textarea,
.tv-est-input,
.tv-est-textarea,
.ticket-input,
.tk-search-input,
.tk-status-select,
.tk-filter-btn,
.tk-range-btn,
.tk-cta-primary,
.tk-cta-ghost,
.tv-cta-primary,
.tv-cta-ghost,
.tv-print-menu-btn,
.tv-btn-action,
.db-quick-btn {
  font-family: var(--rt-font-family) !important;
  font-size: var(--rt-type-body) !important;
  line-height: var(--rt-line-base) !important;
}

/* Inventory tables keep headers restrained and row values regular. */
.inv-table,
.ia-table,
.serial-table,
.tr-line-table,
.tr-table,
.tv-table,
.inv-table tbody td,
.ia-table tbody td,
.serial-table tbody td,
.tr-line-table tbody td,
.tr-table tbody td,
.tv-table tbody td {
  font-family: var(--rt-font-family) !important;
  font-size: var(--rt-type-body) !important;
  line-height: var(--rt-line-base) !important;
}

.inv-table tbody td,
.ia-table tbody td,
.serial-table tbody td,
.tr-line-table tbody td,
.tr-table tbody td,
.tv-table tbody td {
  font-weight: var(--rt-weight-regular) !important;
}

.inv-table thead th,
.ia-table thead th,
.serial-table thead th,
.tr-line-table thead th,
.tr-table thead th,
.tv-table thead th {
  font-size: var(--rt-type-meta) !important;
  font-weight: var(--rt-weight-label) !important;
  line-height: var(--rt-line-base) !important;
}

/* Data should remain readable, not needlessly bold. */
.tk-table tbody td,
.tv-table tbody td,
.tv-log-table tbody td,
.tk-cell-primary,
.tk-device-name,
.tk-total,
.tv-note-text,
.tv-part-name,
.tv-attach-name,
.db-stat-row-val,
.db-login-name,
.db-inv-name {
  font-weight: var(--rt-weight-regular) !important;
}

/* Buttons and deliberate labels may carry modest emphasis. */
.tk-filter-btn,
.tk-range-btn.active,
.tk-cta-primary,
.tv-cta-primary,
.tv-btn-action,
.db-quick-btn {
  font-weight: var(--rt-weight-label) !important;
}

/* Secondary labels and descriptions */
.tk-hero-sub,
.tv-hero-sub,
.ov-head-sub,
.ov-head-legend,
.dash-card-subline,
.db-footer-note,
.branch-note,
.transfer-center-note,
.transfer-notice-sub,
.transfer-mini-meta,
.tk-stat-sub,
.tk-chrome-label,
.tk-pagination-info,
.tk-per-page-wrap,
.tk-date,
.tk-device-submeta,
.tv-hero-mini-meta span,
.tv-ticket-devices-sub,
.tv-device-workspace-meta,
.tv-note-ts,
.tv-note-hint,
.tv-attach-sub,
.tv-attach-note,
.tv-check-sub,
.tv-approval-meta,
.tv-mini-timeline-meta,
.tv-quick-link-meta,
.tv-est-modal-sub,
.tv-inventory-drawer-sub {
  font-size: var(--rt-type-secondary) !important;
  line-height: var(--rt-line-base) !important;
  font-weight: var(--rt-weight-regular) !important;
}

.inv-stat-sub,
.tr-stat-sub,
.serial-sub {
  font-size: var(--rt-type-secondary) !important;
  line-height: var(--rt-line-base) !important;
  font-weight: var(--rt-weight-regular) !important;
}

/* Metadata, helper copy and KPI labels */
.tk-stat-label,
.tv-hero-top-stat-label,
.tv-hero-top-stat-sub,
.dash-priority-label,
.dash-priority-copy small,
.ov-mini-label,
.ov-mini-sub,
.ov-gauge-label,
.ov-gauge-stat span,
.ov-gauge-stat small,
.ov-transfer-kpi span,
.ov-transfer-kpi small,
.ov-transfer-meta,
.ov-transfer-route,
.ov-transfer-time,
.db-muted,
.tk-table thead th,
.tv-table thead th,
.tv-log-table thead th,
.tk-chrome-count,
.tv-form-label,
.tv-input-label,
.tv-wizard-label,
.tv-est-summary-label {
  font-size: var(--rt-type-meta) !important;
  line-height: var(--rt-line-base) !important;
}

.inv-stat-label,
.serial-card-label,
.tr-stat-label,
.tv-hero-stat span {
  font-size: var(--rt-type-meta) !important;
  line-height: var(--rt-line-base) !important;
  font-weight: var(--rt-weight-label) !important;
}

/* Statuses and compact badges */
.status-pill,
.tk-device-ref,
.tk-group-count,
.tv-solid-pill,
.tv-ticket-device-active-pill,
.tv-ticket-device-ref,
.tv-device-mini-badge,
.tv-note-role-badge,
.tv-attach-badge,
.tv-log-badge,
.tv-inline-stat-chip,
.tv-stock-badge {
  font-family: var(--rt-font-family) !important;
  font-size: var(--rt-type-meta) !important;
  line-height: var(--rt-line-tight) !important;
  font-weight: var(--rt-weight-label) !important;
}

/* POS follows the same permanent application scale. */
.pos-shell,
.pos-modal-card,
.tcw-container,
.tcw-success {
  font-family: var(--rt-font-family) !important;
  font-size: var(--rt-type-body) !important;
  line-height: var(--rt-line-base) !important;
}

.pos-hero-title {
  font-family: var(--rt-font-family) !important;
  font-size: var(--rt-type-hero) !important;
  font-weight: var(--rt-weight-title) !important;
  line-height: 1.08 !important;
  letter-spacing: -.025em !important;
  text-transform: uppercase !important;
}

.pos-snapshot-toolbar-title,
.pos-modal-title,
.pos-cta-card-title {
  font-size: var(--rt-type-title) !important;
  font-weight: var(--rt-weight-title) !important;
  line-height: var(--rt-line-tight) !important;
}

.pos-hstat-value {
  font-size: 1.25rem !important;
  font-weight: var(--rt-weight-medium) !important;
  line-height: var(--rt-line-tight) !important;
  font-variant-numeric: tabular-nums;
}

.pos-sum-total-value {
  font-size: var(--rt-type-metric) !important;
  font-weight: var(--rt-weight-title) !important;
  line-height: var(--rt-line-tight) !important;
  font-variant-numeric: tabular-nums;
}

.pos-search-input,
.pos-item-search-input,
.pos-cart-title,
.pos-line-price,
.pos-cart-total-cell,
.pos-action-btn,
.pos-cta-pill,
.pos-modal-btn,
.pos-btn-orange {
  font-family: var(--rt-font-family) !important;
  font-size: var(--rt-type-body) !important;
  line-height: var(--rt-line-base) !important;
}

.pos-hero-sub,
.pos-hero-meta,
.pos-customer-sub,
.pos-customer-sub-line,
.pos-snapshot-sub,
.pos-cart-subline,
.pos-cart-links,
.pos-sum-row,
.pos-snapshot-link {
  font-size: var(--rt-type-secondary) !important;
  line-height: var(--rt-line-base) !important;
}

.pos-hero-badge,
.pos-hstat-label,
.pos-chrome-meta,
.pos-search-row::before,
.pos-item-search-wrap::before,
.pos-cart-head,
.pos-snapshot-toolbar-kicker,
.pos-right-section-title {
  font-size: var(--rt-type-meta) !important;
  line-height: var(--rt-line-base) !important;
}

.pos-md-card,
.pos-sm-card,
.pos-cust-modal,
.pos-pay-more-drawer,
.tcw-container,
.tcw-success,
.tcw-icon-modal,
.tcw-print-preview-modal,
.tcw-notice {
  font-family: var(--rt-font-family) !important;
  font-size: var(--rt-type-body) !important;
  line-height: var(--rt-line-base) !important;
}

.tcw-title,
.tcw-section-title,
.tcw-icon-modal-title,
.tcw-print-preview-title,
.tcw-notice-title,
.pos-modal-col-title,
.pos-pay-more-drawer-title {
  font-size: var(--rt-type-title) !important;
  font-weight: var(--rt-weight-title) !important;
  line-height: var(--rt-line-tight) !important;
}

.tcw-input,
.tcw-select,
.tcw-textarea,
.tcw-btn,
.tcw-model-label,
.tcw-issue-name,
.tcw-part-name,
.pos-pay-input,
.pos-pay-select {
  font-family: var(--rt-font-family) !important;
  font-size: var(--rt-type-body) !important;
  line-height: var(--rt-line-base) !important;
}

.tcw-subtitle,
.tcw-hint,
.tcw-icon-modal-sub,
.tcw-print-preview-sub,
.tcw-notice-sub,
.pos-pay-help,
.pos-pay-hint,
.pos-pay-mini {
  font-size: var(--rt-type-secondary) !important;
  line-height: var(--rt-line-base) !important;
}

.tcw-step-label,
.tcw-label,
.tcw-section-badge,
.tcw-model-count,
.pos-pay-label,
.pos-pay-lines-title {
  font-size: var(--rt-type-meta) !important;
  line-height: var(--rt-line-base) !important;
}

@media (max-width: 767.98px) {
  :root {
    /* Keep body/control typography stable; only hero display text scales down. */
    --rt-type-hero: 1.125rem; /* 18px — approved tickets.php mobile title */
  }
}
