/* Shared readable type scale for dense operational screens. */
:root {
  --text-body: 15px;
  --text-label: 13px;
  --text-meta: 12px;
  --text-table-head: 11px;
  --text-small-button: 12px;
}

body {
  font-size: var(--text-body);
  line-height: 1.5;
}

h1,
.page-head h1,
.crm-view-root .page-header h1 {
  font-size: 28px;
  line-height: 1.2;
  letter-spacing: 0;
}

h2,
.panel-head h2,
.master-card h3,
.pr-section h3,
.pr-form-section > h3,
.pr-form-section-head h3 {
  font-size: 18px;
  line-height: 1.3;
  letter-spacing: 0;
}

h3 {
  line-height: 1.35;
  letter-spacing: 0;
}

.page-head p,
.panel-head p,
.crm-view-root .page-header p {
  font-size: 14px;
  line-height: 1.5;
}

.eyebrow {
  font-size: 11px;
  letter-spacing: .08em;
}

.field label,
.field-label,
.crm-view-root .form-group > label,
.crm-view-root .form-group > .form-label,
.crm-workflow-form label {
  font-size: var(--text-label);
  line-height: 1.35;
}

.field > small,
.field-hint,
.form-text,
.crm-view-root .form-text {
  font-size: var(--text-meta);
  line-height: 1.45;
}

th {
  font-size: var(--text-table-head);
  letter-spacing: .02em;
}

td {
  font-size: var(--text-body);
  line-height: 1.45;
}

.cell-title {
  font-size: 14px;
}

.cell-sub,
.pr-related-po > div span,
.pr-history-row p,
.po-detail-head p,
.po-history-row span,
.po-schedule-row > div span,
.bank-box p,
.invoice-box p {
  font-size: var(--text-meta);
  line-height: 1.45;
}

.status,
.role-tags span {
  font-size: var(--text-meta);
}

.button.small,
.btn-sm,
.crm-view-root .btn-sm {
  font-size: var(--text-small-button);
}

.stat .label {
  font-size: 13px;
}

.stat .value {
  font-size: 29px;
  line-height: 1.15;
}

.stat .trend,
.activity-row p,
.activity-row time,
.sidebar-foot,
.brand small,
.account-identity strong {
  font-size: var(--text-meta);
}

.pipe span,
.bar-group small,
.callout,
.receiving-instruction,
.transfer-box strong {
  font-size: 13px;
}

.pr-detail-head h2 {
  font-size: 23px;
  line-height: 1.25;
}

.pr-detail-status > strong {
  font-size: 24px;
}

.pr-info-grid span,
.pr-purpose > span,
.po-status-strip > div > span,
.transfer-box span,
.bank-box span,
.invoice-box span {
  font-size: 11px;
  letter-spacing: .02em;
}

.pr-info-grid strong {
  font-size: 14px;
  line-height: 1.4;
}

.modal-head h2,
.crm-view-root .card-header h5,
.crm-view-root .card-body h5 {
  font-size: 20px;
}

.login-form h2 {
  font-size: 30px;
}

.login-brand h1 {
  font-size: 54px;
}

/* CRM has a few compact dashboard/workflow labels with their own selectors. */
.crm-view-root .crm-project-approval-kicker,
.crm-view-root .crm-workflow-kicker,
.crm-view-root .li-cell-label,
.crm-view-root .rv-chart__label,
.crm-view-root .crm-revenue-legend,
.crm-view-root .crm-finance-kpi span,
.crm-view-root .crm-finance-kpi small,
.crm-view-root .crm-dashboard-section-head p,
.crm-view-root .crm-dashboard-section-head span,
.crm-view-root .crm-dashboard-metrics span,
.crm-view-root .crm-overdue-date,
.crm-view-root .crm-workflow-hint,
.crm-view-root .crm-payment-ledger dt {
  font-size: var(--text-meta);
  line-height: 1.45;
}

.crm-stat-icon {
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
}

.crm-stat-icon-image {
  width: 34px;
  height: 34px;
  display: block;
  object-fit: contain;
}

.crm-revenue-chart-bars {
  min-width: 820px;
  height: 280px;
  grid-template-columns: repeat(12, minmax(52px, 1fr));
  gap: 14px;
  padding: 18px 12px 0;
}

.crm-revenue-chart-month {
  font-size: 12px;
  gap: 10px;
}

.crm-revenue-bars {
  gap: 6px;
}

.crm-chart-bar-slot {
  min-width: 0;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
}

.crm-chart-bar-value {
  min-height: 16px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.crm-chart-month-label {
  font-size: 12px;
  font-weight: 700;
}

.crm-bar {
  width: 24px;
  min-height: 3px;
  border-radius: 4px 4px 0 0;
}

@media (max-width: 640px) {
  .crm-revenue-chart-bars {
    min-width: 760px;
    height: 250px;
    gap: 10px;
  }

  .crm-bar {
    width: 20px;
  }
}

@media (max-width: 768px) {
  body {
    font-size: 15px;
  }

  h1,
  .page-head h1,
  .crm-view-root .page-header h1 {
    font-size: 24px;
  }

  h2,
  .panel-head h2,
  .master-card h3,
  .pr-section h3,
  .pr-form-section > h3,
  .pr-form-section-head h3 {
    font-size: 17px;
  }

  th {
    font-size: 11px;
  }

  td,
  .cell-title {
    font-size: 14px;
  }

  .cell-sub,
  .stat .trend,
  .activity-row p,
  .activity-row time {
    font-size: 12px;
  }

  .stat .value {
    font-size: 23px;
  }

  .stat .label {
    font-size: 12px;
  }

  .modal-head h2 {
    font-size: 19px;
  }

  .pr-detail-head h2 {
    font-size: 21px;
  }

  .pr-detail-status > strong {
    font-size: 20px;
  }

  .login-brand h1 {
    font-size: 30px;
  }
}

@media (max-width: 480px) {
  h1,
  .page-head h1,
  .crm-view-root .page-header h1 {
    font-size: 22px;
  }

  h2,
  .panel-head h2,
  .master-card h3,
  .pr-section h3,
  .pr-form-section > h3,
  .pr-form-section-head h3 {
    font-size: 16px;
  }

  th {
    font-size: 10px;
  }

  .stat .value {
    font-size: 22px;
  }

  .stat .trend {
    font-size: 11px;
  }
}
