.card { background: var(--cor-card); border-radius: var(--raio-card); box-shadow: var(--sombra-card); padding: 36px; width: 100%; max-width: 420px; }
.card.card-largo { max-width: 860px; }
.card.card-xl { max-width: 1060px; }
.card-titulo { text-align: center; font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.card-subtitulo { text-align: center; color: var(--cor-texto-leve); font-size: 0.85rem; margin-bottom: 24px; }

.campo-label { display: block; font-weight: 600; color: var(--cor-texto-medio); margin-bottom: 6px; font-size: 0.88rem; }
.campo-input { width: 100%; padding: 11px 14px; border: 2px solid var(--cor-borda); border-radius: var(--raio); font-size: 1rem; margin-bottom: 16px; transition: border-color 0.2s; outline: none; color: var(--cor-texto); font-family: var(--fonte); }
.campo-input:focus { border-color: var(--cor-primaria); }
.campo-file { width: 100%; padding: 11px 14px; border: 2px dashed var(--cor-borda); border-radius: var(--raio); font-size: 0.88rem; margin-bottom: 16px; background: var(--cor-fundo); cursor: pointer; transition: border-color 0.2s; font-family: var(--fonte); color: var(--cor-texto-medio); }
.campo-file:hover { border-color: var(--cor-primaria); }

.btn-primary { width: 100%; padding: 13px; background: var(--cor-primaria); color: #fff; border: none; border-radius: var(--raio); font-size: 1rem; font-weight: 600; cursor: pointer; transition: background 0.2s; font-family: var(--fonte); }
.btn-primary:hover { background: var(--cor-primaria-hover); }
.btn-perigo { background: none; border: none; color: var(--cor-perigo); cursor: pointer; font-size: 0.82rem; font-weight: 600; padding: 4px 8px; border-radius: 6px; transition: background 0.2s; font-family: var(--fonte); }
.btn-perigo:hover { background: #fdf2f2; }
.btn-limpar { display: inline-block; padding: 9px 18px; background: var(--cor-perigo); color: #fff; border: none; border-radius: var(--raio); font-size: 0.85rem; font-weight: 600; cursor: pointer; transition: background 0.2s; font-family: var(--fonte); text-decoration: none; }
.btn-limpar:hover { background: var(--cor-perigo-hover); }

.resultado { margin-top: 24px; padding: 22px; border-radius: 12px; text-align: center; }
.resultado .valor { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.resultado .classificacao { font-size: 1.05rem; font-weight: 600; margin-top: 8px; }
.resultado .detalhe { font-size: 0.82rem; margin-top: 10px; opacity: 0.8; }
.bg-abaixo { background: #e8f4fd; color: #2980b9; }
.bg-normal { background: #eafaf1; color: #27ae60; }
.bg-sobrepeso { background: #fef9e7; color: #d4a017; }
.bg-obeso1 { background: #fdf2e9; color: #e67e22; }
.bg-obeso2 { background: #fdedec; color: #e74c3c; }
.bg-obeso3 { background: #f4ecf7; color: #8e44ad; }
.bg-info { background: #e8f4fd; color: #2980b9; }

.badge { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 0.72rem; font-weight: 600; white-space: nowrap; }
.badge-imc { background: #eafaf1; color: #27ae60; }
.badge-hip { background: #e8f4fd; color: #2980b9; }
.badge-ok { background: #eafaf1; color: #27ae60; }
.badge-diff { background: #fdedec; color: #e74c3c; }
.badge-ausente { background: #fef9e7; color: #d4a017; }
.badge-so-razao { background: #f4ecf7; color: #8e44ad; }

.tabela-ref { margin-top: 20px; width: 100%; border-collapse: collapse; font-size: 0.78rem; }
.tabela-ref th { text-align: left; padding: 8px 10px; background: var(--cor-tabela-header); color: var(--cor-texto-medio); border-bottom: 2px solid var(--cor-borda); white-space: nowrap; font-size: 0.76rem; }
.tabela-ref td { padding: 6px 10px; border-bottom: 1px solid var(--cor-tabela-linha); color: #4a5a6a; }
.tabela-ref tr.ativo td { background: #eafaf1; font-weight: 600; color: var(--cor-texto); }
.tabela-ref td.centro { text-align: center; }
.tabela-ref td.dir, .tabela-ref th.dir { text-align: right; }
.tabela-ref td.dir { font-variant-numeric: tabular-nums; }
.tabela-ref tr.linha-diff { background: #fff5f5; }
.tabela-ref tr.linha-ausente { background: #fffbeb; }
.tabela-ref tr.linha-so-razao { background: #faf5ff; }
.tabela-ref tfoot td { font-weight: 700; background: var(--cor-tabela-header); border-top: 2px solid var(--cor-borda); }

.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 24px; }
.kpi { background: var(--cor-fundo); border-radius: 12px; padding: 14px; text-align: center; }
.kpi .kpi-valor { font-size: 1.6rem; font-weight: 700; line-height: 1; }
.kpi .kpi-label { font-size: 0.74rem; color: var(--cor-texto-leve); margin-top: 5px; font-weight: 500; }
.kpi-ok .kpi-valor { color: var(--cor-sucesso); }
.kpi-diff .kpi-valor { color: var(--cor-perigo); }
.kpi-ausente .kpi-valor { color: var(--cor-alerta); }
.kpi-total .kpi-valor { color: var(--cor-primaria); }
.kpi-so-razao .kpi-valor { color: #8e44ad; }

.filtro-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.filtro-tab { padding: 7px 14px; border-radius: 20px; font-size: 0.78rem; font-weight: 600; text-decoration: none; transition: all 0.2s; border: 2px solid var(--cor-borda); color: var(--cor-texto-medio); background: #fff; }
.filtro-tab:hover { border-color: var(--cor-primaria); color: var(--cor-primaria); }
.filtro-tab.ativo { background: var(--cor-primaria); color: #fff; border-color: var(--cor-primaria); }

.vazio { text-align: center; padding: 36px 20px; color: var(--cor-texto-leve); }
.vazio .icone-grande { font-size: 2.6rem; margin-bottom: 10px; }
.historico-topo { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.historico-topo .contador { font-size: 0.82rem; color: var(--cor-texto-leve); }
.triangulo-container { display: flex; justify-content: center; margin-top: 20px; }
.triangulo-container svg { max-width: 240px; width: 100%; height: auto; }

.flash { padding: 11px 16px; border-radius: var(--raio); margin-bottom: 18px; font-size: 0.85rem; font-weight: 500; text-align: center; }
.flash-success { background: #eafaf1; color: #27ae60; }
.flash-error { background: #fdedec; color: #e74c3c; }

.num-neg { color: var(--cor-perigo); }
.num-pos { color: var(--cor-sucesso); }
.resumo-rodape { margin-top: 18px; text-align: right; font-size: 0.82rem; color: var(--cor-texto-leve); }
.resumo-rodape strong { color: var(--cor-perigo); }
