/* Gestão TG 4.6.48 · legibilidade global e otimização mobile
   Camada visual carregada por último. Não altera cálculos, banco ou regras. */

:root{
  --muted:#586b72;
  --line:#d7e3e6;
  --readability-muted:#586b72;
  --readability-soft:#687b81;
  --readability-ink:#172b31;
}

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

body{
  color:var(--readability-ink);
  -webkit-font-smoothing:antialiased;
  -moz-osx-font-smoothing:grayscale;
  text-rendering:optimizeLegibility;
}

input:not([type="checkbox"]):not([type="radio"]),
select,
textarea{
  color:#1d343a;
  font-size:13px;
  line-height:1.35;
}

::placeholder{
  color:#819096;
  opacity:1;
}

.section-kicker,
.eyebrow{
  font-size:10.5px !important;
  line-height:1.25;
  letter-spacing:.085em !important;
}

.text-button{
  font-size:11px !important;
}

.compact-button{
  min-height:38px !important;
  font-size:10.5px !important;
}

/* Tabelas, vendas e relatórios no notebook */
th{
  color:#5d7178 !important;
  font-size:10px !important;
  line-height:1.25;
}

td{
  color:#40545b !important;
  font-size:12px !important;
  line-height:1.38;
}

.customer-cell strong,
td > strong{
  font-size:12px !important;
  line-height:1.3;
}

.customer-cell small,
.cell-sub{
  color:#63767c !important;
  font-size:10px !important;
  line-height:1.35;
}

.mini-avatar{
  font-size:10px !important;
}

.status{
  min-height:27px;
  padding:6px 9px !important;
  font-size:9.5px !important;
  line-height:1.05;
}

.sales-filter-summary small{
  color:#5d7178 !important;
  font-size:10px !important;
}
.sales-filter-summary strong{
  font-size:13px !important;
}

.sales-history-table .row-action{
  width:34px !important;
  min-width:34px !important;
  height:34px !important;
}
.sales-history-table .sale-edit-action{
  min-width:68px !important;
  font-size:10px !important;
}
.marketplace-buyer-inline b{
  font-size:11px !important;
}

/* Estoque */
.stock-analysis-product strong{
  font-size:12.5px !important;
  line-height:1.3;
}
.stock-analysis-product small,
.stock-analysis-product em{
  color:#5f7278 !important;
  font-size:9.5px !important;
  line-height:1.35;
}
.stock-analysis-stat small,
.stock-analysis-stat em{
  color:#60747a !important;
  font-size:9.5px !important;
  line-height:1.35;
}
.stock-analysis-stat strong{
  font-size:12.5px !important;
}
.stock-analysis-status{
  min-height:29px !important;
  font-size:9.5px !important;
}
.stock-analysis-buy,
.stock-analysis-ok{
  min-height:34px !important;
  font-size:9.5px !important;
}
.stock-row-actions .stock-action-label{
  font-size:9.5px !important;
}

/* Relatórios */
.report-tabs button{
  min-height:40px !important;
  color:#5c7076 !important;
  font-size:10.5px !important;
}
.metric-top > span{
  color:#536970 !important;
  font-size:11.5px !important;
}
.metric-card > small{
  color:#61747a !important;
  font-size:10.5px !important;
}
.card-heading h3{
  font-size:17px;
}
.mini-empty small{
  color:#63767c !important;
  font-size:10px !important;
}

/* Financeiro */
.finance-page-head p{
  font-size:10px !important;
}
.finance-view-tabs button{
  min-height:41px !important;
  color:#5d7076 !important;
  font-size:11.5px !important;
}
.filter-chips button,
.goal-filter-chips button{
  min-height:37px !important;
  color:#596d73 !important;
  font-size:10.5px !important;
}
.transaction-copy strong{
  font-size:13.5px !important;
  line-height:1.3 !important;
}
.transaction-copy small{
  color:#5e7177 !important;
  font-size:10.5px !important;
}
.transaction-copy em{
  color:#687b81 !important;
  font-size:10px !important;
}
.transaction-status{
  min-width:82px;
  font-size:9.5px !important;
}
.transaction-status-block small{
  color:#60747a !important;
  font-size:9px !important;
}
.finance-metric p{
  color:#536970 !important;
  font-size:11px !important;
}
.finance-metric > small{
  color:#61747a !important;
  font-size:10.5px !important;
}
.account-card > header p{
  color:#5d7076 !important;
  font-size:9px !important;
}
.account-card > header h3{
  font-size:14px !important;
}
.account-card > header small,
.account-balance small,
.account-card footer small{
  color:#60747a !important;
  font-size:10px !important;
}
.account-card footer b{
  font-size:11.5px !important;
}

/* Central, manutenção, segurança, notificações e arquivo morto */
.control-page small,
.mt-page small,
.security-shell small,
.notifications-shell small,
.archive-shell small,
.muted{
  color:#5d7076 !important;
}

.control-page label,
.mt-page label,
.security-shell label,
.archive-shell label{
  font-size:12px;
}

/* Melhora o foco visual sem mudar a paleta do ERP */
input:focus,
select:focus,
textarea:focus,
button:focus-visible,
a:focus-visible{
  outline:2px solid rgba(10,167,159,.38);
  outline-offset:2px;
}

/* Notebook e desktop: evita a sensação de interface "miniatura" */
@media (min-width:721px){
  .side-nav .nav-button{
    color:#5c7076;
    font-size:13.5px;
  }

  .nav-alert-count,
  .top-reminders-button em{
    font-size:9px;
  }

  .stock-analysis-row{
    min-height:72px;
  }

  .sales-history-table td{
    padding-top:14px !important;
    padding-bottom:14px !important;
  }

  .finance-transaction-row{
    min-height:78px;
  }

  .finance-transaction-row .transaction-date small,
  .finance-transaction-row .transaction-amount small{
    font-size:9.5px !important;
  }
}

/* Tablet */
@media (min-width:721px) and (max-width:1180px){
  th{
    font-size:9.5px !important;
  }
  td{
    font-size:11.5px !important;
  }
  .customer-cell strong,
  td > strong{
    font-size:11.5px !important;
  }
  .stock-analysis-product strong{
    font-size:12px !important;
  }
}

/* Celular: leitura e toque confortáveis */
@media (max-width:720px){
  body{
    line-height:1.45;
  }

  input:not([type="checkbox"]):not([type="radio"]),
  select,
  textarea{
    min-height:44px;
    font-size:16px !important;
  }

  textarea{
    min-height:92px;
  }

  .section-kicker,
  .eyebrow{
    font-size:10px !important;
  }

  .mobile-nav .nav-button small,
  .finance-mobile-nav small,
  .tasks-mobile-nav small{
    font-size:10px !important;
    line-height:1.08 !important;
  }

  .mobile-nav .nav-button,
  .finance-mobile-nav button,
  .tasks-mobile-nav button{
    min-height:50px;
  }

  .mobile-row-main strong{
    font-size:15px !important;
    line-height:1.28 !important;
  }
  .mobile-row-main small{
    color:#5f7379 !important;
    font-size:11.5px !important;
    line-height:1.4 !important;
  }
  .mobile-row-side strong{
    font-size:12.5px !important;
  }

  .sale-compact-card .mobile-sale-actions .row-action,
  .sale-compact-card .mobile-sale-actions .status{
    min-height:44px !important;
    font-size:11.5px !important;
  }

  .stock-analysis-product strong{
    font-size:14px !important;
    white-space:normal !important;
  }
  .stock-analysis-product small,
  .stock-analysis-product em,
  .stock-analysis-stat small,
  .stock-analysis-stat em{
    font-size:10.5px !important;
  }
  .stock-analysis-stat strong{
    font-size:13px !important;
  }
  .stock-analysis-status,
  .stock-analysis-buy,
  .stock-analysis-ok{
    font-size:10.5px !important;
  }

  .report-tabs button{
    min-height:43px !important;
    font-size:11px !important;
  }

  .metric-top > span{
    font-size:10.5px !important;
  }
  .metric-card > small{
    font-size:10.5px !important;
    line-height:1.35;
  }

  .finance-page-head p{
    font-size:9.5px !important;
  }
  .finance-view-tabs button{
    min-height:45px !important;
    font-size:10.5px !important;
  }
  .finance-transaction-toolbar .filter-chips button,
  .filter-chips button{
    min-height:40px !important;
    font-size:11px !important;
  }
  .transaction-copy strong{
    font-size:15px !important;
    white-space:normal !important;
  }
  .transaction-copy small{
    font-size:11.5px !important;
    line-height:1.4 !important;
  }
  .transaction-copy em{
    font-size:11px !important;
    line-height:1.35 !important;
  }
  .transaction-status{
    min-height:29px;
    font-size:10px !important;
  }
  .transaction-status-block small{
    font-size:9.5px !important;
  }

  .finance-metric p{
    font-size:10.5px !important;
  }
  .finance-metric > small{
    font-size:10.5px !important;
  }

  .account-card > header p{
    font-size:9.5px !important;
  }
  .account-card > header h3{
    font-size:15px !important;
  }
  .account-card > header small,
  .account-balance small,
  .account-card footer small{
    font-size:10.5px !important;
  }

  .finance-mobile-more-grid strong{
    font-size:13px !important;
  }
  .finance-mobile-more-grid small{
    font-size:10.5px !important;
  }

  .task-form label{
    font-size:12px !important;
  }
  .task-form-note{
    font-size:11px !important;
  }

  .modal-header h2{
    font-size:22px;
  }
  .modal-header p,
  .modal-sheet small{
    color:#5d7076;
  }

  .primary-button,
  .secondary-button,
  .ghost-button,
  .danger-button{
    min-height:44px;
    font-size:12px;
  }
}

@media (max-width:420px){
  .mobile-nav .nav-button small,
  .finance-mobile-nav small,
  .tasks-mobile-nav small{
    font-size:9.5px !important;
  }

  .finance-view-tabs button{
    min-width:112px;
  }

  .combined-balance-parts{
    gap:6px;
  }
}
