/* DIAMOND FONT SYSTEM
   Ajuste global de tipografia.
   Não mexe em regras de negócio, API, banco, sidebar tenant ou layout estrutural.
*/

:root{
  --diamond-font:
    "Segoe UI Variable",
    "Inter",
    "Roboto",
    "Segoe UI",
    -apple-system,
    BlinkMacSystemFont,
    "Helvetica Neue",
    Arial,
    sans-serif;

  --diamond-font-mono:
    "Cascadia Mono",
    "Consolas",
    "SFMono-Regular",
    monospace;

  --diamond-weight-regular: 400;
  --diamond-weight-medium: 500;
  --diamond-weight-semibold: 600;
  --diamond-weight-bold: 700;
  --diamond-weight-heavy: 760;
}

/* Base geral */
html,
body,
button,
input,
select,
textarea,
table,
label,
small,
span,
div,
p,
a{
  font-family:var(--diamond-font) !important;
  font-synthesis-weight:none;
  text-rendering:optimizeLegibility;
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
}

/* Preserva fontes técnicas */
code,
pre,
kbd,
samp,
.mono,
[class*="mono"]{
  font-family:var(--diamond-font-mono) !important;
}

/* Corpo de texto */
body{
  font-weight:var(--diamond-weight-regular) !important;
  letter-spacing:-0.006em;
}

/* Títulos: fortes, mas sem exagero */
h1{
  font-family:var(--diamond-font) !important;
  font-weight:var(--diamond-weight-heavy) !important;
  letter-spacing:-0.035em !important;
  line-height:1.08 !important;
}

h2{
  font-family:var(--diamond-font) !important;
  font-weight:720 !important;
  letter-spacing:-0.025em !important;
  line-height:1.12 !important;
}

h3,
h4{
  font-family:var(--diamond-font) !important;
  font-weight:680 !important;
  letter-spacing:-0.018em !important;
}

/* Textos secundários */
.sub,
small,
.text-muted,
.muted,
.help,
.hint,
.crumb,
.breadcrumb{
  font-weight:var(--diamond-weight-regular) !important;
  letter-spacing:-0.004em !important;
}

/* Labels não precisam parecer título pesado */
label,
.form-label{
  font-weight:620 !important;
  letter-spacing:-0.01em !important;
}

/* Botões: premium, legíveis, sem “negritozão” */
button,
.btn,
a.btn,
[role="button"]{
  font-family:var(--diamond-font) !important;
  font-weight:680 !important;
  letter-spacing:-0.012em !important;
}

/* Botões principais podem ser um pouco mais fortes */
button.primary,
.btn.primary,
.btn-gold,
.btn-green,
.dxBtnGold,
.dxBtnGreen{
  font-weight:720 !important;
}

/* Inputs mais limpos */
input,
select,
textarea{
  font-weight:450 !important;
  letter-spacing:-0.008em !important;
}

/* Tabelas: cabeçalho técnico sem ficar duro demais */
th,
.table th,
thead th{
  font-weight:680 !important;
  letter-spacing:.045em !important;
}

td,
.table td,
tbody td{
  font-weight:450 !important;
  letter-spacing:-0.006em !important;
}

/* Nomes de itens continuam destacados, mas menos brutos */
td b,
td strong,
.table b,
.table strong,
.dxItemTitle,
.dxMetricValue,
.dxStatusValue{
  font-weight:720 !important;
}

/* Cards */
.card,
.panel,
.dxPanel,
.dxMetric{
  font-family:var(--diamond-font) !important;
}

/* Dashboard atual */
#page-dashboard .dxDashTitle h1{
  font-weight:var(--diamond-weight-heavy) !important;
}

#page-dashboard .dxMetricLabel,
#page-dashboard .dxPanelHead h2{
  font-weight:680 !important;
}

#page-dashboard .dxMetricValue{
  font-weight:740 !important;
}

/* Sidebar: só reduz peso, sem mexer em cor/configuração tenant */
aside button,
aside a,
aside [data-page],
.sidebar button,
.sidebar a,
.sidebar [data-page],
[class*="sidebar"] button,
[class*="sidebar"] a,
[class*="sidebar"] [data-page]{
  font-family:var(--diamond-font) !important;
  font-weight:620 !important;
  letter-spacing:-0.006em !important;
}

/* Item ativo do sidebar pode destacar um pouco mais */
aside .active,
aside button.active,
aside a.active,
aside [data-page].active,
.sidebar .active,
.sidebar button.active,
.sidebar a.active,
.sidebar [data-page].active,
[class*="sidebar"] .active,
[class*="sidebar"] button.active,
[class*="sidebar"] a.active,
[class*="sidebar"] [data-page].active{
  font-weight:680 !important;
}

/* Texto pequeno do sidebar */
aside small,
aside .sidebar-credit,
.sidebar small,
.sidebar .sidebar-credit,
[class*="sidebar"] small,
[class*="sidebar"] .sidebar-credit{
  font-weight:400 !important;
  letter-spacing:-0.004em !important;
}

/* Badges e status */
.badge,
.tag,
.status,
.dxBadge{
  font-weight:680 !important;
  letter-spacing:-0.006em !important;
}

/* Evita que patches antigos forcem peso absurdo */
[style*="font-weight:900"],
[style*="font-weight: 900"],
[style*="font-weight:950"],
[style*="font-weight: 950"],
[style*="font-weight:800"],
[style*="font-weight: 800"]{
  font-weight:720 !important;
}

/* ===== PATCH FASE7C FONTE SUAVE INICIO ===== */

/* Suaviza o sistema sem mexer em cor/layout/regra */
h1{
  font-weight:720 !important;
}

h2{
  font-weight:680 !important;
}

h3,
h4{
  font-weight:640 !important;
}

strong,
b{
  font-weight:680 !important;
}

button,
.btn,
a.btn,
[role="button"]{
  font-weight:660 !important;
}

label,
.form-label{
  font-weight:600 !important;
}

th,
.table th,
thead th{
  font-weight:640 !important;
}

td b,
td strong,
.table b,
.table strong{
  font-weight:680 !important;
}

/* Sidebar continua respeitando Configurações; só reduz peso visual */
aside button,
aside a,
aside [data-page],
.sidebar button,
.sidebar a,
.sidebar [data-page],
[class*="sidebar"] button,
[class*="sidebar"] a,
[class*="sidebar"] [data-page]{
  font-weight:590 !important;
}

aside .active,
aside button.active,
aside a.active,
aside [data-page].active,
.sidebar .active,
.sidebar button.active,
.sidebar a.active,
.sidebar [data-page].active,
[class*="sidebar"] .active,
[class*="sidebar"] button.active,
[class*="sidebar"] a.active,
[class*="sidebar"] [data-page].active{
  font-weight:650 !important;
}

/* ===== PATCH FASE7C FONTE SUAVE FIM ===== */
