/*
 * Camada global de legibilidade do Alô SocIA.
 *
 * Mantém títulos e indicadores com a escala própria de cada módulo, mas evita
 * textos operacionais pequenos demais em menus, formulários, tabelas e cards.
 */
:root {
  --alo-readable-body: 16px;
  --alo-readable-text: 14px;
  --alo-readable-small: 12px;
  --alo-readable-control: 14px;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-size: var(--alo-readable-body) !important;
  line-height: 1.55;
}

p,
li,
dt,
dd,
label,
legend,
blockquote,
figcaption,
summary,
address,
td,
th {
  font-size: max(var(--alo-readable-text), .92em) !important;
  line-height: 1.5;
}

input,
select,
textarea,
button,
[role="button"],
.btn,
.button {
  font-size: max(var(--alo-readable-control), .92em) !important;
  line-height: 1.35;
}

input,
select,
button,
[role="button"],
.btn,
.button {
  min-height: 42px;
}

small,
.muted,
.helper,
.help,
.hint,
.description,
.subtitle,
.subheading,
.caption,
.meta,
.eyebrow,
.breadcrumb,
[class$="-label"],
[class$="-meta"],
[class$="-hint"],
[class$="-sub"],
[class$="-eyebrow"],
[class$="-breadcrumb"] {
  font-size: max(var(--alo-readable-small), .84em) !important;
  line-height: 1.45;
}

table {
  font-size: var(--alo-readable-text) !important;
}

table th,
table td {
  padding-top: max(10px, .65em);
  padding-bottom: max(10px, .65em);
}

nav a,
.main-nav a,
.menu a,
.tabs a,
[role="tab"],
.alo-command-links a,
.alo-command-actions a,
.alo-command-actions button {
  font-size: max(var(--alo-readable-small), .86em) !important;
  line-height: 1.35;
}

.message,
.alert,
.toast,
.error,
.errorlist,
.field-error,
.form-errors {
  font-size: max(var(--alo-readable-small), .86em) !important;
  line-height: 1.5;
}

/*
 * Produtos/Estoque e Fichas Técnicas são telas densas. A escala abaixo segue
 * a proporção do Cockpit: KPI em destaque, descrição discreta e tabela legível
 * sem transformar valores de linha em números de dashboard.
 */
.product-content .stock-alert span:not(.stock-alert-icon),
.recipe-content .recipe-alert > div > span {
  font-size: 12px !important;
}

.product-content .stock-alert h2,
.recipe-content .recipe-alert h2 {
  font-size: 18px !important;
}

.product-content .stock-alert p,
.recipe-content .recipe-alert p {
  font-size: 13px !important;
}

.product-content .stock-alert button,
.recipe-content .recipe-alert > a {
  font-size: 14px !important;
}

.product-content .stock-kpis small,
.recipe-content .recipe-kpis small {
  font-size: 12px !important;
}

.product-content .stock-kpis strong,
.recipe-content .recipe-kpis strong {
  font-size: 24px !important;
  line-height: 1.15;
}

.product-content .stock-kpis p,
.recipe-content .recipe-kpis p {
  font-size: 12px !important;
  line-height: 1.4;
}

.product-content .inventory-head h2,
.recipe-content .recipe-panel-head h2 {
  font-size: 16px !important;
}

.product-content .inventory-head p,
.recipe-content .recipe-panel-head p {
  font-size: 13px !important;
}

.product-content .inventory-toolbar select,
.product-content .inventory-search input,
.recipe-content .recipe-search input {
  font-size: 14px !important;
}

.product-content .stock-filter-tabs button {
  min-height: 34px;
  font-size: 12px !important;
}

.product-content .record-pill,
.recipe-content .record-pill,
.recipe-content .recipe-filter-note {
  font-size: 12px !important;
}

.product-content .inventory-table,
.recipe-content .recipe-table {
  font-size: 13px !important;
}

.product-content .inventory-table th,
.recipe-content .recipe-table th {
  font-size: 12px !important;
}

.product-content .inventory-table td,
.recipe-content .recipe-table td {
  font-size: 13px !important;
}

.product-content .inventory-table td:first-child strong,
.recipe-content .recipe-table td:first-child strong {
  font-size: 14px !important;
}

.product-content .inventory-table td:first-child small,
.recipe-content .recipe-table td:first-child small {
  font-size: 12px !important;
}

.product-content .product-type,
.product-content .stock-value,
.recipe-content .recipe-status {
  font-size: 12px !important;
}

.product-content .margin-value,
.recipe-content .recipe-value {
  font-size: 13px !important;
}

.product-content .inventory-actions a,
.product-content .inventory-actions button,
.recipe-content .recipe-actions a {
  min-height: 34px;
  font-size: 12px !important;
}

.product-content .inventory-empty,
.recipe-content .recipe-empty {
  font-size: 13px !important;
}

.product-content .inventory-table td::before,
.recipe-content .recipe-table td::before {
  font-size: 12px !important;
}

@media (max-width: 720px) {
  :root {
    --alo-readable-body: 16px;
    --alo-readable-text: 14px;
    --alo-readable-small: 12px;
    --alo-readable-control: 16px;
  }

  input,
  select,
  textarea {
    /* Evita zoom automático dos navegadores móveis ao focar um campo. */
    font-size: 16px !important;
  }
}
