/* Reset básico e fontes */
* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    padding-top: 70px; /* Espaço para header fixo */
    padding-bottom: 80px; /* Espaço para footer */

    /* --- IMAGEM DE FUNDO --- */
    background-image: url('anotar-pesos-medidas.jpg'); /* << Coloque o nome correto da sua imagem */
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    background-color: #f4f7f6;
}

/* --- CABEÇALHO --- */
.header-compact { background-color: #007bff; padding: 10px 20px; position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2); }
.header-compact-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; justify-content: center; gap: 15px; }
.header-logo { height: 40px; width: auto; flex-shrink: 0; }
.header-compact-text { text-align: center; }
.header-compact-text h1 { font-size: 1.4em; color: #ffffff; margin: 0; font-weight: 600; line-height: 1.2; }
.header-compact-text p { font-size: 0.9em; color: #ffff00; margin: 0; line-height: 1.2; font-weight: 500; }


/* --- CONTAINER PRINCIPAL --- */
.container {
     max-width: 900px; /* *** LARGURA VOLTOU PARA A MAIOR *** */
     margin: 20px auto;
     padding: 0 15px;
     display: grid;
     gap: 25px;
}

/* Estilo para centralizar texto */
.text-center { text-align: center; }


/* TÍTULO INTERNO (Caixa Azul) */
.internal-title-box { background-color: #0056b3; color: white; padding: 0.9rem 1.5rem; text-align: center; border-radius: 8px; box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); margin-top: 10px; }
.internal-title-box h2 { font-size: 1.6em; font-weight: 600; margin: 0; color: white; border: none; padding: 0; }


/* --- CARDS (EFEITO VIDRO NO APP PRINCIPAL) --- */
/* Mantém efeito vidro para cards QUE NÃO são a seção de informação */
.card:not(.info-section) {
    background-color: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 25px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(16px);       /* efeito vidro blur(8px)    */
    -webkit-backdrop-filter: blur(8px);
}
/* Ajusta h2 e labels dentro dos cards com efeito vidro */
.card:not(.info-section) h2 { color: #003d7a; border-bottom: 1px solid rgba(255, 255, 255, 0.4); padding-bottom: 10px; margin-bottom: 18px; }
.card:not(.info-section) label { color: #222; font-weight: bold; }


/* --- ESTILOS ESPECÍFICOS PARA A SEÇÃO DE INFORMAÇÕES (SEM VIDRO) --- */
/* Aplicado ao .info-section.card em pesos-medidas.html */
.info-section.card {
    backdrop-filter: none; /* Remove o blur */
    -webkit-backdrop-filter: none;
    background-color: #fff3cd; /* *** Funda padrão da caixa Disclaimer *** */
    border: 1px solid #ffeeba; /* Borda similar ao Disclaimer */
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    /* Ajusta cores de texto e títulos para contrastar com fundo amarelo claro */
    color: #584400; /* Cor de texto escura similar ao Disclaimer */
}

.info-section.card h2,
.info-section.card h3,
.info-section.card h4 {
     color: #856404; /* Cor de títulos similar ao Disclaimer */
     margin-bottom: 8px;
     border-bottom: none; /* Remove borda dos h2 dentro da info-section */
     padding-bottom: 0;
}
.info-section.card h4 { margin-top: 20px; /* Espaço maior entre itens principais */ font-size: 1.1em; font-weight: bold;}


/* Estilo para os ícones */
.info-item .info-icon {
    width: 20px; /* Tamanho do ícone do título do item */
    height: 20px;
    vertical-align: middle; /* Alinha com o texto */
    margin-right: 8px; /* Espaço após o ícone */
    fill: #856404; /* Cor do ícone similar aos títulos */
}
.info-item .list-icon {
    width: 16px; /* Tamanho dos ícones da lista */
    height: 16px;
    vertical-align: middle;
    margin-right: 8px;
    fill: #28a745; /* Cor verde para os checks */
}

/* Espaçamento entre itens da lista */
.info-section.card ul li {
    margin-bottom: 8px; /* Espaço maior entre itens da lista */
    display: flex; /* Permite alinhar ícone e texto */
    align-items: flex-start; /* Alinha no topo se o texto quebrar */
}
.info-section.card ul { margin-left: 0; padding-left: 25px; /* Indenta a lista */ }


/* Estilo para a lista de Fontes */
.info-section .sources-list {
    margin-left: 0;
    padding-left: 25px;
    font-size: 0.85em;
    color: #555; /* Cor padrão para texto menos importante */
    margin-top: 10px; /* Espaço após o título de fontes */
}
.info-section .sources-list li {
     margin-bottom: 4px; /* Menos espaço entre fontes */
}


/* Disclaimer (Estilo mantido, mas agora dentro da info-section sem vidro) */
.info-section .disclaimer {
    background-color: #fff3cd; /* Garante fundo, embora o pai já tenha */
    border-left: 5px solid #ffc107;
    padding: 15px 20px;
    border-radius: 5px;
    margin-top: 30px; /* Mais espaço acima do disclaimer */
    /* Remove estilos de vidro se herdados */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    /* Cores de texto já definidas no .info-section.card */
    color: #584400;
}
.info-section .disclaimer h3{ color: #856404; font-size: 1.1em; margin-bottom: 10px; }
.info-section .disclaimer p { font-size: 0.95em; margin-bottom: 10px; line-height: 1.5; color: #584400; }
.info-section .disclaimer strong { color: #382d00; font-weight: bold;}


/* Estilo para o BOTÃO de link na página principal */
.card .btn-primary.learn-more-btn {
    display: inline-block;
    width: auto;
    margin-top: 15px;
    padding: 12px 20px;
    font-size: 1rem;
    text-decoration: none;
}

/* Estilo para o BOTÃO VOLTAR na página de informações */
.btn-secondary {
    background-color: #6c757d; /* Cinza */
    color: white;
    padding: 10px 18px;
    font-size: 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
    text-decoration: none; /* Remove sublinhado */
    display: inline-block; /* Para que se ajuste ao conteúdo */
    width: auto;
}
.btn-secondary:hover {
    background-color: #5a6268;
    transform: translateY(-1px);
}


/* Placeholder Adsense */
.adsense-placeholder { min-height: 90px; display: flex; align-items: center; justify-content: center; border: 1px dashed rgba(0, 0, 0, 0.3); background-color: rgba(255, 255, 255, 0.3); }
.adsense-placeholder p { color: #333; font-weight: 500;}


/* Formulário */
.form-section form { display: grid; gap: 15px; }
.form-group { display: flex; flex-direction: column; }
.form-group input[type="datetime-local"], .form-group input[type="number"], .form-group input[type="month"], .form-group select { padding: 10px; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 5px; font-size: 1rem; width: 100%; background-color: rgba(255, 255, 255, 0.5); }
.form-group input::placeholder { color: #555;}
.form-group input:focus, .form-group select:focus { outline: none; border-color: #0056b3; box-shadow: 0 0 6px rgba(0, 86, 179, 0.4); background-color: rgba(255, 255, 255, 0.7); }

/* Botões */
.btn { padding: 10px 18px; font-size: 1rem; border: none; border-radius: 5px; cursor: pointer; transition: background-color 0.2s ease, transform 0.1s ease; text-align: center; display: block; width: 100%; margin-top: 10px; }
.btn-primary { background-color: #0056b3; color: white; font-weight: 500;}
.btn-primary:hover { background-color: #003d7a; transform: translateY(-1px); }

.filter-controls .btn-primary { width: auto; display: inline-block; margin-top: 0; padding: 9px 15px; height: 38px; }
.btn-delete { background-color: #e74c3c; color: white; padding: 3px 7px; font-size: 0.9em; border: none; border-radius: 4px; cursor: pointer; transition: background-color 0.2s ease, transform 0.1s ease; vertical-align: middle; display: inline-block; width: auto; margin-top: 0; font-weight: bold; }
.btn-delete:hover { background-color: #c03d2b; transform: translateY(-1px); }


/* Filtros */
.history-section .filter-controls { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px; margin-bottom: 18px; padding-bottom: 15px; border-bottom: 1px solid rgba(0, 0, 0, 0.1); }
.history-section .filter-controls > div { flex: 1 1 auto; min-width: 120px; }
.history-section .filter-controls label { margin-right: 3px; font-size: 0.9em; display: block; margin-bottom: 3px; color: #222; font-weight: bold;}
.history-section .filter-controls select, .history-section .filter-controls input { padding: 8px 10px; font-size: 0.95em; width: 100%; border: 1px solid rgba(0, 0, 0, 0.2); border-radius: 4px; background-color: rgba(255, 255, 255, 0.5); }


/* TABELA DE HISTÓRICO */
#historico-tabela-container { max-height: 450px; overflow: auto; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 6px; margin-top: 15px; }
#historico-tabela { width: 100%; border-collapse: collapse; font-size: 0.9em; min-width: 800px; background-color: rgba(255, 255, 255, 0.1); }
#historico-tabela th, #historico-tabela td { border: 1px solid rgba(0, 0, 0, 0.15); padding: 9px 12px; text-align: left; vertical-align: middle; white-space: nowrap; }
#historico-tabela th { background-color: rgba(255, 255, 255, 0.3); font-weight: 600; position: sticky; top: 0; z-index: 1; backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);}
#historico-tabela tbody tr:nth-child(even) { background-color: rgba(255, 255, 255, 0.05); }
#historico-tabela tbody tr:hover { background-color: rgba(0, 123, 255, 0.1); }
#historico-tabela td:nth-child(2), #historico-tabela td:nth-child(3), #historico-tabela td:nth-child(5), #historico-tabela td:nth-child(7) { text-align: right; }
#historico-tabela td:nth-child(4), #historico-tabela td:nth-child(9) { text-align: center; }
#historico-tabela td:nth-child(6), #historico-tabela td:nth-child(8) { text-align: center; }

/* Estilo Discreto Avaliação */
#historico-tabela td.imc-status-cell,
#historico-tabela td.circ-status-cell { font-size: 0.9em; text-align: center; border-left-width: 4px; border-left-style: solid; padding-left: 8px; background-color: transparent !important; }
.imc-status-abaixo, .imc-status-pre { border-left-color: #ffc107; }
.imc-status-normal { border-left-color: #28a745; }
.imc-status-obesidade1 { border-left-color: #fd7e14; }
.imc-status-obesidade2 { border-left-color: #dc3545; }
.imc-status-obesidade3 { border-left-color: #c82333; }
.circ-status-otima { border-left-color: #28a745; }
.circ-status-atencao { border-left-color: #ffc107; }


/* Gráficos */
.chart-section { padding-bottom: 15px; min-height: 300px; }
#weightChart, #circumferenceChart { max-width: 100%; height: 280px !important; margin-top: 15px; }


/* --- RODAPÉ NOVO --- */
.tool-footer { background-color: #343a40; padding: 15px 20px; text-align: center; font-size: 0.9em; color: #adb5bd; position: fixed; bottom: 0; left: 0; width: 100%; z-index: 999; }
.tool-footer-links { margin-bottom: 8px; }
.tool-footer-links a { color: #dee2e6; text-decoration: none; margin: 0 10px; transition: color 0.2s ease; }
.tool-footer-links a:hover { color: #ffffff; text-decoration: underline; }
.tool-footer > div { margin-top: 5px; }


/* Responsividade */
@media (max-width: 992px) { /* Novo breakpoint baseado na largura do container */
    .container { max-width: 700px; /* Volta para largura menor antes */ }
}

@media (max-width: 800px) {
    body { padding-top: 60px; }
    .header-compact-text h1 { font-size: 1.2em; }
    .header-compact-text p { font-size: 0.8em; }
    .header-logo { height: 35px; }
    .internal-title-box h2 { font-size: 1.4em;}
    #historico-tabela { min-width: 700px; }
}

@media (max-width: 600px) {
     .container { max-width: none; width: 100%; padding: 0 12px; gap: 20px;} /* Ocupa largura total */
     .card { padding: 18px;}
     .card h2 { font-size: 1.2em;}
     .internal-title-box { padding: 0.7rem 1rem; }
     .internal-title-box h2 { font-size: 1.3em;}
     .btn { padding: 10px 15px; font-size: 0.95rem; }
     .filter-controls{ flex-direction: column; align-items: stretch; }
     .filter-controls > div, .filter-controls button { width: 100%; }
     .filter-controls > * { margin-bottom: 10px; }
     .filter-controls button { height: auto; }

     #historico-tabela { font-size: 0.85em; min-width: 650px; }
     #historico-tabela th, #historico-tabela td { padding: 7px 9px; }

     #weightChart, #circumferenceChart { height: 240px !important; }
     .tool-footer { font-size: 0.85em; padding: 12px 15px; }
     body { padding-bottom: 75px; }
}

@media (max-width: 480px) {
    body { padding-top: 55px; }
    .header-compact-content { gap: 10px;}
    .header-compact-text h1 { font-size: 1.1em; }
    .header-logo { height: 30px; }
    .internal-title-box { padding: 0.6rem 0.8rem; }
    .internal-title-box h2 { font-size: 1.2em;}
     #historico-tabela { font-size: 0.78em; min-width: 600px; }
     #historico-tabela th, #historico-tabela td { padding: 6px 7px; }
     .btn-delete { padding: 3px 5px; font-size: 0.8em;}
     #weightChart, #circumferenceChart { height: 220px !important; }
     .tool-footer-links a { margin: 0 5px;}
}