/* ========== RESET E VARIÁVEIS ==========
Baseado no curso "Build a Space Travel Website" - Kevin Powell */

:root {
    --ff-heading: 'Saira', sans-serif;
    --ff-body: 'Sitka', serif;

    --clr-bg: #f5e7ce;
    --clr-text: #2e2e2e;
    --clr-accent: #c85829;
    --clr-accent-dark: #a7461f;
    --clr-border: #ccc;
    --clr-shadow: rgba(0, 0, 0, 0.1);
    --clr-success: #868f54;

    --fs-400: 1rem;
    --fs-500: 1.25rem;
    --fs-600: 1.5rem;
    --fs-700: 2rem;
    --fs-800: 2.5rem;

    --radius: 6px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--ff-body);
    color: var(--clr-text);
    background: url('../img/background-art2.png') no-repeat center center fixed;
    background-size: cover;
    padding: 1rem;
    position: relative;
}

body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(245, 231, 206, 0.85);
    z-index: -1;
}

/* ========== HEADER ==========
        Com logo, título e ícones */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #f5e7ce;
    padding: 0.5rem 1rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.header-title {
    font-size: var(--fs-700);
    font-family: var(--ff-heading);
    color: #a7461f;
    text-align: center;
    flex-grow: 1;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;

}

.user-icon,
.menu-toggle {
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
}

/* UI Cleanup: Classes to replace inline styles */
.header-business-icon {
    font-size: 1.2rem;
    line-height: 1;
}

.nav-icon-consultorio,
.nav-icon-marca {
    font-size: 1.4rem;
    line-height: 1;
}

.logout-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 0.5rem 0;
    width: 100%;
    color: #c0392b;
}

.logout-icon {
    font-size: 1.4rem;
    line-height: 1;
}

/* ========== MAIN STRUCTURE ==========
        3 colunas: anúncio - conteúdo - anúncio */
.main-wrapper {
    display: flex;
    flex-direction: row;
    justify-content: space-between;
}

.main-content {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
}

.ad-desktopLeft {
    position: fixed;
    top: 150px;
    left: 50px;
    width: 160px;
    background-color: transparent;
    padding: 1rem;
    border-radius: var(--radius);
    color: #6a2b1b;
    z-index: 10;
}

.ad-desktopRight {
    position: fixed;
    top: 150px;
    right: 50px;
    width: 160px;
    background-color: transparent;
    padding: 1rem;
    border-radius: var(--radius);
    color: #6a2b1b;
    z-index: 10;
}

.ad-box {
    background-color: transparent;
    padding: 0.5rem;
    border-radius: var(--radius);
}

.ad-img {
    width: 30%;
    height: auto;
    display: block;
}

/* ========== BOX CENTRAL ==========
        content-shell: fundo leve com ícones verticais
        content-box: transparente com bordas */
.content-shell {
    flex-grow: 1;
    background-color: rgba(255, 255, 255, 0.6);
    border: 4px solid #a2b686;
    border-radius: 12px;
    max-width: 1500px;
    margin: 0 220px;
    padding: 1rem;
    display: flex;
    gap: 1rem;

    /* Configurações para forçar o limite de altura da página */
    height: 100dvh;
    min-height: 100vh;
}

/* ... icon-nav e navbar omitidos (não serão alterados) ... */

.icon-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: transparent;
    padding: 10px;
    justify-content: flex-start;
    padding-top: 10px;
    gap: 12px;

    /* Novas propriedades para rolagem */
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    overflow-x: hidden;
    scrollbar-width: thin;
    scrollbar-color: var(--clr-accent) transparent;
}

/* Custom scrollbar for better aesthetics */
.icon-nav::-webkit-scrollbar {
    width: 6px;
}

.icon-nav::-webkit-scrollbar-track {
    background: transparent;
}

.icon-nav::-webkit-scrollbar-thumb {
    background-color: var(--clr-accent);
    border-radius: 10px;
}

.site-navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 1rem;
    right: 5px;
    background-color: #fbe0b2;
    height: 62px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.1);
    position: relative;
    z-index: 10;
    top: -30px;
    flex-shrink: 0;
}

.content-box {
    flex-grow: 1;
    border: 3px solid #7c935c;
    background-color: transparent;
    padding: 1rem;
    border-radius: 8px;
    position: relative;

    /* Repassando a altura para o filho (como o chat-wrapper) */
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    /* Permite rolar o conteúdo quando for maior que a tela (ex: receitas longas) */
    overflow-x: hidden;

    /* Estilização suave da barra de rolagem para o content-box geral */
    scrollbar-width: thin;
    scrollbar-color: var(--clr-accent) transparent;
}

/* ========== MODAL ==========
        Sucesso / feedback */
.custom-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.custom-modal-content {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 10px var(--clr-shadow);
    text-align: center;
}

.custom-modal-content .btn {
    background-color: var(--clr-success);
}

/* ========== ANÚNCIOS FLUTUANTES ==========
        Com botão de fechar */
.floating-ad {
    position: fixed;
    left: 50%;
    background-color: transparent;
    transform: translateX(-50%);
    padding: 0;
    z-index: 100;
    height: 60px;
    line-height: 1.2;
    font-size: 1rem;
    padding-top: 0.5rem;
}

.floating-ad.top {
    top: 0;
}

.floating-ad.bottom {
    bottom: 70px;
}

.floating-ad .ad-content {
    position: relative;
    display: inline-block;
}

.floating-ad .ad-content img {
    display: block;
    max-width: none;
    height: auto;
}

.close-ad {
    position: absolute;
    top: 5px;
    right: 20px;
    font-weight: bold;
    cursor: pointer;
}

/* ========== TIPOGRAFIA ==========
        Hierarquia de textos */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--ff-heading);
    color: #5d5446;
    margin-bottom: 0.5rem;
}

p,
label,
input,
select,
textarea,
li {
    font-family: var(--ff-body);
    font-size: var(--fs-400);
}

/* ========== FORMULÁRIOS ==========
        Inputs e botões */
input,
select,
textarea {
    width: 100%;
    padding: 0.75rem;
    font-size: var(--fs-400);
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    margin-bottom: 1rem;
    transition: border-color 0.3s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--clr-accent);
    outline: none;
}

.btn {
    background-color: var(--clr-accent);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.btn:hover {
    background-color: var(--clr-accent-dark);
}

/* .page-header {
        background-color: #fbe0b2; 
        height: 62px;
        position: relative;
        z-index: 10;
    } */
*/ .logo {
    position: relative;
    top: 0;
    margin-left: 0.5rem;
    z-index: 10;
    max-width: 90px;
}


body {
    padding-top: 70px;
    /* espaço para o banner superior */
    padding-bottom: 70px;
    /* espaço para o banner inferior */
}

button,
.btn {
    background-color: #c85829;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 8px;
    /* 👈 ARREDONDAMENTO */
    font-size: 1rem;
    margin-top: 1px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

button:hover {
    background-color: #a7461f;
    transform: scale(1.03);
}

.top-right-button {
    position: absolute;
    top: 2rem;
    right: 3rem;
    z-index: 10;
}

#selectedIngredients li,
#selectedSeasonings li {
    background: #fff;
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.custom-modal-content {
    background-color: white;
    padding: 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.2);
}

.custom-modal-content button {
    background-color: #868f54;
    color: white;
}

.instruction-step {
    margin: 10px 0;
    padding: 8px;
    background: #f0f0f0;
    border-left: 3px solid #c85829;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.selected-item {
    background: #fff;
    padding: 8px;
    margin-bottom: 6px;
    border: 1px solid #ddd;
    border-radius: 5px;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.form-row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    justify-content: space-between;
    align-items: flex-end;
    padding-top: 0.25rem;
    /* ✅ sobe tudo levemente */
    padding-bottom: 1rem;
    /* mantém espaçamento inferior */
}

.form-row>div {
    flex: 1 1 30%;
    min-width: 200px;
    max-width: 32%;
}

.form-row label {
    min-height: 2.5rem;
    /* altura igual para todos os labels */
    display: inline-block;
    margin-bottom: -1rem;
}

.form-row label[for="finalTime"] {
    padding-top: 0rem;
}

.form-row select,
.form-row input {
    margin-top: 0rem;
    /* 🔧 ajuda a remover espaçamento extra do navegador */
}

.form-row button {
    align-self: flex-end;
    margin-bottom: 20px;
    /* Ajuste fino opcional */
}

input[type="text"],
input[type="number"],
input[type="url"],
select,
textarea {
    max-width: 600px;
    /* Limite de largura para desktop */
    width: 100%;
    margin-bottom: 1rem;
}

/* Ajuste visual mais bonito para labels alinhadas */
label {
    display: inline-block;
    margin-bottom: 0.4rem;
    font-weight: 500;
}

.form-section {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 0;
    align-items: flex-start;
}

.form-section>div {
    flex: 1 1 30%;
    min-width: 250px;
    max-width: 32%;
}

.form-section h2,
.section-title h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
    margin-bottom: 0.3rem;
    transform: translateY(30px);
    /* 🔥 chave para alinhar com a linha dos selects */
}

.form-section label {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    margin-right: 1.5rem;
    font-weight: 500;
    color: var(--text);
    white-space: nowrap;
}

.section-title {
    font-size: 1.2rem;
    font-weight: bold;
    margin-top: 2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
}

.diet-checkboxes {
    display: flex;
    flex-direction: column;
    justify-content: start;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* .diet-checkboxes {
        border: 5px solid var(--accent);
        padding: 0.5rem;
        border-radius: 10px;
        background-color: transparent;
    } */

/* .diet-options {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 0.5rem;
    } */
/* Adicione esta regra para estilizar o título da seção */
.filter-panel__diet-area>.filter-panel__label {
    color: var(--clr-accent-dark);
    font-weight: bold;
}

.diet-options {
    display: grid;
    grid-template-columns: repeat(2, auto);
    gap: 0.5rem 1rem;
    padding: 0.5rem;
    border-radius: 0.75rem;
    background-color: #f8f6ef;
    max-width: 30rem;
    font-size: 1rem;
    box-shadow: 0 0 3px rgba(0, 0, 0, 0.08);
    margin-bottom: 0.5rem;
}

/* .diet-options label {
        display: flex;
        align-items: center;
        gap: 0rem;
        font-weight: 500;
        margin-bottom: 0.5rem;
        color: #3b2d1a;
        cursor: pointer;
    } */

/* Modifique a regra .diet-options label */
.diet-options label {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    /* Aumenta um pouco o espaço entre a caixa e o texto */

    /* ALTERAÇÃO 1: Remove o destaque do texto das opções */
    font-weight: normal;
    /* Tira o negrito */
    color: var(--clr-text);
    /* Volta para a cor de texto padrão */

    margin-bottom: 0.2rem;
    cursor: pointer;

}

/* .diet-options input[type="checkbox"] {
        transform: scale(1.2);
        accent-color: #c85a2e;
        cursor: pointer;
        margin-top: 15px;
    } */

/* Modifique a regra .diet-options input[type="checkbox"] */
.diet-options input[type="checkbox"] {
    transform: scale(1.2);
    accent-color: #c85a2e;
    cursor: pointer;
    margin-top: 0;
    /* Remove a margem que estava desalinhando */

    /* ALTERAÇÃO 2: Move a checkbox para a frente do texto */
    order: -1;
}


.logo-img {
    max-height: 120px;
    margin-top: 0px;
    width: auto;
    vertical-align: middle;
    filter: drop-shadow(0px 3px 5px rgba(0, 0, 0, 0.2));
}

.page-title {
    font-size: 1.5rem;
    /* menor no mobile */
    margin-top: 1rem;
    text-align: center;
    font-family: var(--ff-heading);
    color: #a7461f;
    text-align: center;
    flex-grow: 1;
    line-height: 1.2;
    margin-bottom: 0.5rem;

    display: flex;
    gap: 0.3em;
    justify-content: center;
    flex-wrap: wrap;
    text-align: center;

}

.page-title span {
    white-space: nowrap;
}

.mobile-only {
    display: none;
}

/* CHAT STYLES */
.chat-wrapper {
    background: transparent;
    border: 3px solid #a2b686;
    border-radius: 12px;
    padding: 1rem;
    max-width: 800px;
    margin: 0 auto;

    /* Configuração Flex para manter o input sempre no rodapé e forçar scroll */
    display: flex;
    flex-direction: column;
    height: calc(100dvh - 200px);
    min-height: calc(100vh - 200px);
}

#chat-box {
    display: flex;
    flex-direction: column;
    background-color: transparent;
    backdrop-filter: blur(3px);
    padding: 10px;

    /* A Mágica do Scroll Interno */
    flex-grow: 1;
    overflow-y: auto;

    /* Estilização suave da barra de rolagem */
    scrollbar-width: thin;
    scrollbar-color: var(--clr-accent) transparent;
}

/* Scrollbar personalizada para Webkit (Chrome/Edge/Safari) */
#chat-box::-webkit-scrollbar {
    width: 8px;
}

#chat-box::-webkit-scrollbar-track {
    background: transparent;
}

#chat-box::-webkit-scrollbar-thumb {
    background-color: var(--clr-accent);
    border-radius: 10px;
}

/* Container do Input que fica grudado no fundo */
.chat-input-row {
    max-width: 95%;
    padding: 2px 3px;
    margin: 2px 3px;
    display: inline-block;
    position: relative;
    font-size: 0.95rem;
    word-wrap: break-word;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Mensagens do usuário (à direita) */
.chat-message.user {
    align-self: flex-end;
    background-color: #dcf8c6;
    /* verde claro */
    color: #000;
    border-radius: 18px 18px 0 18px;
    text-align: left;
    margin-left: auto;
    margin-right: 2px;
}

/* Mensagens do assistente (à esquerda) */
.chat-message.assistant {
    align-self: flex-start;
    background-color: rgba(255, 255, 255, 0.8);
    color: #000;
    border-radius: 18px 18px 18px 0;
    text-align: left;
    margin-left: 2px;
    margin-right: auto;
}

.chat-message.assistant img.chat-avatar {
    width: 32px;
    height: auto;
    border-radius: 8px;
    margin-top: 4px;
}

.chat-message.system {
    background: #efefef;
    font-style: italic;
    text-align: center;
}

.chat-input-row {
    display: flex;
    gap: 0.5rem;
}

#chat-input {
    flex: 1;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid #ccc;
    border-radius: 6px;
}

#send-chat-button {
    padding: 0.75rem 1.25rem;
    background-color: var(--clr-accent);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.chat-footer {
    text-align: right;
    margin-top: 0.5rem;
}

#end-chat-button {
    background: #ccc;
    color: #333;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
}

.icon:hover {
    filter: brightness(1.2);
    cursor: pointer;
    transform: scale(1.05);
    transition: all 0.2s ease-in-out;
}

/* ========== PRODUCTION HIERARCHY ========== */
.production {
    border: 2px solid #e0e0e0;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 10px;
    background-color: #fffbf2;
    /* Light creamy background to distinguish from main page */
    position: relative;
    /* For absolute positioning of delete button if needed */
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.production input.production-title {
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--clr-accent-dark);
    margin-bottom: 15px;
    border-bottom: 2px solid var(--clr-accent);
    background: transparent;
}

.btn-delete {
    background-color: #d9534f;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    margin-left: 10px;
    transition: background-color 0.2s;
}

.btn-delete:hover {
    background-color: #c9302c;
}

.steps-container {
    margin-top: 10px;
    margin-bottom: 10px;
    padding-left: 10px;
    border-left: 3px solid #e0e0e0;
}

.instruction-step {
    position: relative;
    padding-right: 40px;
    /* Space for delete button */
}

.instruction-step .btn-delete {
    position: absolute;
    right: 5px;
    top: 50%;
    transform: translateY(-50%);
}


.icon-nav a img:hover {
    filter: brightness(1.2);
    transform: scale(1.05);
    transition: all 0.2s ease;
    cursor: pointer;
}

/* ========== ESTILOS FINAIS DO PAINEL DE FILTRO E ÍCONES ========== */

/* 1. Remove o fundo branco do ícone DENTRO do painel de filtros */
#filterContainer.side-panel h2 img.icon {
    background: none !important;
}

/* 2. Posiciona o painel de filtro corretamente e estiliza o fundo */
/* #filterContainer.side-panel {
    display: none;
    position: fixed;
    left: 100px; Posição correta: 80px da nav + 20px de espaço */
/* width: 320px;
    background-color: rgba(245, 231, 206, 0.95); var(--clr-bg) com transparência */
/* border: 1px solid var(--clr-accent-dark);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 20px;
    border-radius: 8px;
    transform: translateY(-50%);
    max-height: 95vh;
    overflow-y: auto; */
/* } */

#filterContainer.side-panel {
    display: none;
    position: fixed;
    left: 75px;
    width: 320px;
    background-color: rgba(245, 231, 206, 0.95);
    border: 1px solid var(--clr-accent-dark);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    z-index: 999;
    padding: 10px;
    border-radius: 8px;
    /* ALTERAÇÃO 1: Remova a linha abaixo para evitar conflito com o JavaScript */
    /* transform: translateY(-50%); */

    max-height: 95vh;
    overflow-y: auto;
}

/* Remove a altura mínima das listas de tags quando vazias */
#filterContainer ul:empty {
    display: none;
}

#filterContainer.side-panel.visible {
    display: block;
}

/* 3. Restaura a seta (e sua borda) para um visual profissional */
#filterContainer.side-panel::before {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border-width: 11px;
    border-style: solid;
    border-color: transparent var(--clr-bg) transparent transparent;
    /* Seta com a cor do fundo */
    z-index: 1;
}

#filterContainer.side-panel::after {
    content: '';
    position: absolute;
    top: 50%;
    right: 100%;
    transform: translateY(-50%);
    border-width: 12px;
    border-style: solid;
    border-color: transparent var(--clr-accent-dark) transparent transparent;
    /* Borda da seta */
    z-index: 0;
}

/* 4. Estiliza os títulos (labels) dentro do painel */
#filterContainer.side-panel label {
    color: var(--clr-accent-dark);
    font-weight: bold;
}



/* ALTERAÇÃO 2: Adicione esta nova regra para corrigir o espaçamento */
#filterContainer.side-panel .form-row {
    margin-bottom: -2 !important;
    /* Diminui o espaço e usa !important para garantir a prioridade */
}

.icon-nav .icon {
    width: 46px;
    height: 46px;
    margin: 8px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.4rem;
    text-decoration: none;
    color: inherit;
    background: none;
    border: none;

}

#toggleFilterButton .icon {
    width: 53px;
    /* Tamanho final desejado, ex: 62px */
    height: 53px;
    /* Tamanho final desejado, ex: 62px */
    max-width: none;
    /* Adicione esta linha para remover o limite */
}

/* ========== ESTILOS DEDICADOS PARA O PAINEL DE FILTRO ========== */

/* Define o espaçamento vertical compacto para as linhas do formulário no filtro */
.filter-panel__form-row {
    margin-bottom: 0.75rem;
    /* Este agora vai funcionar! */
}

/* Oculta as listas de ingredientes/temperos selecionados quando estiverem vazias, economizando espaço */
#filterContainer ul:empty {
    display: none;
}

.filter-panel__section {
    margin-top: 5px;
}

/* Reutiliza o estilo das tags, mas para uma lista */
.selected-items-dropdown li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #eee;
}

.selected-items-dropdown li:last-child {
    border-bottom: none;
}

/* ========== ESTILOS PARA DROPDOWN DE ITENS SELECIONADOS ========== */
.selected-items-container {
    position: relative;
    display: flex;
    /* Alinha o campo e o botão na mesma linha */
    margin-bottom: 1rem;
}

.selected-items-display {
    display: none;
    flex-grow: 1;
    /* Faz o campo de texto ocupar o espaço disponível */
    background-color: #fff;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius) 0 0 var(--radius);
    /* Arredonda cantos esquerdos */
    padding: 0.6rem;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5;
    /* Alinha verticalmente com o botão */
}

/* .selected-items-trigger {
    width: 100%;
    background-color: #fff;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 0.6rem;
    text-align: left;
    font-family: var(--ff-body);
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    line-height: 1.5;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
} */

/* .selected-items-trigger {
    width: 100%; 
    flex-shrink: 0;
    border: 1px solid var(--clr-border);
    border-left: none;
    background-color: #f0f0f0;
    border-radius: 0 var(--radius) var(--radius) 0; 
    cursor: pointer;
    font-size: 0.7rem;
} */

.selected-items-trigger {
    width: 100%;
    background-color: #fff;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 0.6rem;

    text-align: left;
    font-family: var(--ff-body);
    font-size: 0.9rem;
    cursor: pointer;

    /* === CORREÇÕES === */
    color: var(--clr-text);
    /* Garante que o texto seja escuro e legível */
    display: block;
    /* Muda para block para controlar melhor o texto interno */
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    position: relative;
    /* Necessário para posicionar a seta */
    padding-right: 2rem;
    /* Cria espaço à direita para a seta não sobrepor o texto */
}

/* Restaura a seta indicadora no botão de itens selecionados */
.selected-items-trigger::after {
    content: '▼';
    font-size: 0.7rem;
    color: #888;

    position: absolute;
    right: 0.75rem;
    /* Distância da borda direita */
    top: 50%;
    /* Centraliza verticalmente */
    transform: translateY(-50%);
    /* Ajuste fino da centralização vertical */
}

.selected-items-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    /* Posiciona o dropdown abaixo da caixa */
    left: 0;
    width: 100%;
    background-color: #fff;
    border: 1px solid var(--clr-border);
    z-index: 10;
    max-height: 150px;
    overflow-y: auto;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);

}

.selected-items-dropdown.visible {
    display: block;
}

.selected-items-dropdown ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

/* .selected-items-dropdown li {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #eee;
} */

.selected-items-dropdown li button {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-weight: bold;
}


/* ========== AJUSTES FINAIS E CONSOLIDADOS DE ALINHAMENTO DO FILTRO ========== */

/* 1. Alinha os itens da BUSCA DE INGREDIENTES */
/* #ingredientDropdownList li,
#seasoningDropdownList li {
    display: flex;
    align-items: center;    
    justify-content: flex-start; 
    gap: 0.5rem;
    padding-left: 0.5rem;
    position: relative; 
} */

/* 2. Corrige a posição da CHECKBOX da busca com posicionamento relativo */
/* #ingredientDropdownList li input[type="checkbox"],
#seasoningDropdownList li input[type="checkbox"] {
    position: relative;
    top: -20px; 
    margin-top: 0 !important; 
    left: -60px !important;
} */

/* 3. Define um layout de GRADE RÍGIDO para as opções de Dieta */
#recipeDiet.filter-panel__diet-options {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* 3 colunas de largura idêntica */
    gap: 0.5rem;
    align-items: center;
}

/* 4. Estiliza cada OPÇÃO DE DIETA para alinhamento e texto corretos */
#recipeDiet.filter-panel__diet-options label {
    display: flex;
    align-items: center;
    /* Centraliza verticalmente */
    justify-content: flex-start;
    gap: 0.4rem;
    font-size: 0.85rem;
    white-space: nowrap;
    color: var(--clr-text);
    font-weight: normal;
}

/* 5. Remove qualquer margem conflitante da checkbox da Dieta */
#recipeDiet.filter-panel__diet-options input[type="checkbox"] {
    margin-top: 13px !important;
    margin-left: -13px;
}

#recipeDiet.filter-panel__diet-options label:first-child {
    margin-left: 5px;
    justify-self: start;

}

#recipeDiet.filter-panel__diet-options {
    justify-self: start;
    margin-left: 5%;
    gap: 1.5rem;

}

/* Garante que o texto dos ingredientes não quebre a linha */
/* .dropdown li span {
    white-space: nowrap;

} */

#ingredientDropdownList li span,
#seasoningDropdownList li span {
    position: relative;
    /* Permite o ajuste fino da posição */
    top: -30px;
    /* Move o texto 4 pixels para cima */
    white-space: nowrap;
}

/* Move o ícone de sinônimo (ⓘ) junto com o texto do ingrediente */
#ingredientDropdownList li span span,
#seasoningDropdownList li span span {
    position: relative;
    top: 0px;
}

/* Aproxima o título "Dieta" das suas opções */
.filter-panel__diet-area>.filter-panel__label {
    margin-bottom: 5px;
}

.icon-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    gap: 8px; /* Aumentado para melhor respiro */
    width: 100%;
    padding: 5px 0;
    transition: background-color 0.2s ease;
}

.icon-title {
    font-size: 0.85rem; /* Ajustado para caber melhor na lateral */
    font-weight: 500;
    font-family: var(--ff-body);
    color: var(--clr-text);
    text-align: center;
    word-wrap: break-word;
    max-width: 90px;
    line-height: 1.1;
}

#end-chat-button {
    display: none;
}


/* ========== RESPONSIVO ==========
        Mobile First */
@media (max-width: 767px) {

    input[type="text"],
    input[type="number"],
    input[type="url"],
    select,
    textarea {
        max-width: 100%;
    }

    .main-wrapper {
        flex-direction: column;
        margin: 0;
    }

    .top-right-button {
        margin-top: 1.5rem;
    }

    .ad-desktopLeft,
    .ad-desktopRight {
        display: none !important;
    }

    .content-shell {
        margin: 0;
        /* Remove as margens de 220px e adiciona um pequeno respiro */
        padding: 0.6rem;
    }

    .content-box {
        padding: 0rem;
    }

    .section-title {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }


    .form-row>div {
        max-width: 100%;
    }

    .form-section h2,
    .section-title h3 {
        transform: none;
        margin-bottom: 0.5rem;
    }


    .form-row button {
        align-self: center;
        margin-bottom: 1rem;
    }

    .form-row select,
    .form-row input {
        width: 100%;
        margin-left: 0;
    }

    .form-row {
        /* flex-direction: column; */
        gap: 0.5rem;
        justify-content: left;
        flex-wrap: wrap;
    }

    #recipe-name-row {
        margin-top: -1.5rem;
        /* ou ajuste fino: -1rem até -2rem */
        margin-bottom: 0.1rem;
        /* se quiser manter um leve espaço inferior */
    }

    .btn {
        margin-top: 1rem;
        margin-bottom: 2rem;
    }

    .page-title {
        font-size: 1.5rem;
        /* menor no mobile */
        margin-top: 1rem;
        text-align: center;
        font-family: var(--ff-heading);
        color: #a7461f;
        text-align: center;
        flex-grow: 1;
        margin-left: 10px;

        flex-direction: column;
        gap: 0;
        line-height: 1.2;
    }

    /* .logo-header {
            max-width: 80px;
            position: absolute;
            top: 0.5rem;
            left: 0.5rem;
        } */

    .logo {
        position: relative;
        top: 0;
        left: auto;
        margin: 0 auto;
        display: block;
        z-index: 5;
    }

    .logo img {
        max-width: 90px;
        height: auto;
        margin-top: 5px;
        /* Reduzir o tamanho */
    }

    .top-right-button {
        position: relative !important;
        /* ✅ evita sobreposição */
        top: auto;
        right: auto;
        text-align: center;
        margin-bottom: 0.5rem;
    }



    #novo-ingrediente {
        margin-bottom: 0.5rem;
        align-self: flex-start;
    }

    .section-title {
        font-size: 1rem;
        line-height: 1.2;
        margin-bottom: 0.3rem;
    }

    .dashboard-tabs {
        overflow-x: auto;
        white-space: nowrap;
        /* Estilização suave da barra de rolagem no mobile */
        scrollbar-width: thin;
        scrollbar-color: var(--clr-accent) transparent;
        padding-bottom: 5px;
        /* Evita cortar a borda inferior das abas ativas */
        display: flex;
        flex-wrap: nowrap;
    }

    .dashboard-tabs::-webkit-scrollbar {
        height: 4px;
    }

    .dashboard-tabs::-webkit-scrollbar-thumb {
        background-color: var(--clr-accent);
        border-radius: 4px;
    }

    #toggle-sidebar {
        position: relative;
        top: 15px;
        left: 15px;
        font-size: 1.3rem;
        cursor: pointer;
        z-index: 100;
        background-color: transparent;
        /* border-radius: 5px; */
        border: none;
        padding: 0;
        margin: 0;
        /* box-shadow: 0 0 5px rgba(0,0,0,0.2); */
        transform: translateX(-100%);

    }

    #mobile-sidebar {
        position: relative;
        top: 60px;
        left: 0;
        width: 220px;
        background-color: #fff9f1;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
        z-index: 99;
        padding: 20px;
        display: none;
    }

    #mobile-sidebar ul {
        list-style: none;
        padding: 0;
        margin: 0;
    }

    #mobile-sidebar li {
        margin-bottom: 15px;
    }

    #mobile-sidebar a {
        text-decoration: none;
        color: #643f27;
        font-weight: bold;
    }

    .visible {
        display: block !important;
    }

    .hidden {
        display: none !important;
    }


    /* .mobile-only {
            display: block !important;
            position: fixed;
            left: 0;
            top: 80px;
            z-index: 1001;
            background: #f4f1e9;
            padding: 6px 8px;
            border-radius: 0 8px 8px 0;
            cursor: pointer;
            font-size: 20px;
        } */

    .mobile-only {
        display: block !important;
    }

    .sidebar-left {
        transform: translateX(-100%);
        transition: transform 0.3s ease-in-out;
    }

    .sidebar-left.open {
        transform: translateX(0%);
    }

    .navbar-brand {
        display: flex;
        align-items: center;
        gap: 8px;
        padding: 0.5rem 1rem;
        padding-top: 0px
    }



    .logo-img {
        max-height: 90px;
        width: auto;
        vertical-align: middle;
        margin-top: 22px;
    }

    /* .icon-nav {
            position: fixed;
            top: 60px;
            left: 0;
            height: 100%;
            background-color: #f4f1e9;  
            transform: translateX(-100%);
            transition: transform 0.3s ease-in-out;
            z-index: 1000;
            padding-top: 20px;
            box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
            display: none;
        } */

    /* .icon-nav {
            transform: translateX(0); 
            position: relative;
            background: none;
            padding: 0;
            margin-left: 0.5rem;
            height: auto;
            width: auto;
        } */

    .icon-nav {
        display: none;
        flex-direction: column;
        align-items: center;
        background-color: transparent;
        padding: 10px;
        gap: 12px;
    }

    /* .icon-nav .icon {
            width: 32px;
            height: 32px;
            text-align: center;
            font-size: 1.4rem;
            line-height: 32px;
            background: none;
            border: none;
            padding: 0;
            color: inherit;
            cursor: pointer;
        } */


    .icon-nav .icon {
        width: 56px;
        height: 56px;
        margin: 8px 0;
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.4rem;
        text-decoration: none;
        color: inherit;
        background: none;
        border: none;
    }

    .icon-nav.hidden {
        display: none;
        /* Esconde via classe, mas mantém no fluxo do layout */
    }

    /* #sidebar-toggle {
            display: block;
            position: absolute;
            left: 0;
            top: 10rem;
            background-color: transparent;
            border: none;
            font-size: 2rem;
            z-index: 10;
        } */

    /* #sidebar-toggle {
            position: relative;
            top: 0;
            left: 0;
            background: none;
            padding: 0;
            font-size: 1.3rem;
            margin-bottom: 10px;
            z-index: 1;
            align-self: flex-start;
            margin-left: -4px;
        } */

    .icon-nav.visible {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: relative;
        left: 0;
        top: 0px;
        background-color: transparent;
        z-index: 999;
        padding: 10px 0;
        border-radius: 0 6px 6px 0;
        width: 80px; /* Aumentado conforme solicitado */
        max-height: calc(100vh - 150px);
        overflow-y: auto;
    }

    .icon-nav.open {
        transform: translateX(0%);
    }

    #sidebar-toggle {
        position: fixed;
        top: 140px;
        left: 20px;
        background: transparent;
        /* padding: 0px 0px; */
        /* border-radius: 0 8px 8px 0; */
        font-size: 20px;
        z-index: 100;
        cursor: pointer;
        /* box-shadow: 2px 2px 5px rgba(0,0,0,0.1); */
    }

    /* 
        #sidebar-toggle {
            position: absolute;
            top: 80px; 
            left: 0px;
            font-size: 1.2rem;
            background-color: transparent;
            padding: 4px;
            z-index: 1001;
            cursor: pointer;
            color: #333; 
        } */

    #sidebar-toggle.active span {
        transform: rotate(180deg);
    }

    #sidebar-toggle span {
        font-size: 1.2rem;
        color: #444;
        /* background: #fff8ee; */
        padding: 4px;
        /* border-radius: 50%; */
        /* box-shadow: 0 0 2px rgba(0,0,0,0.2); */
        position: relative;
        left: -6px;
        /* encosta mais na borda verde */
    }


    /* .icon-nav.open ~ #sidebar-toggle span {
            transform: rotate(180deg); vira a seta para a esquerda
        } */

    .icon-nav a img {
        max-width: 36px;
        margin: 10px 0;
    }

    .header-right {
        display: none !important;
        /* esconde ícones duplicados no topo */
    }


    .icon-nav .icon.mobile-only {
        display: flex;
        justify-content: center;
        align-items: center;
        font-size: 1.6rem;
        background: none;
        border: none;
        width: 56px;
        height: 56px;
        margin: 10px 0;
        padding: 0;
        color: inherit;
        cursor: pointer;
    }

    /* #menu-icon-mobile,
        #user-icon-mobile {
            display: none;
        } */

    #menu-icon-mobile,
    #user-icon-mobile {
        margin: 10px 0;
        /* width: 46px;
            height: 46px; */
        font-size: 1.4rem;
        text-align: center;
        background: none;
        border: none;
        padding: 0;
        color: inherit;
    }

    #recipeName {
        margin-top: -50px;
    }

    .close-popup {
        position: absolute;
        top: 10px;
        right: 15px;
        background: transparent;
        border: none;
        font-size: 1.5rem;
        color: #b23c3c;
        font-weight: bold;
        cursor: pointer;
        z-index: 1000;
    }


    /* Crie esta NOVA REGRA para definir o tamanho da IMAGEM do ícone */
    /* Esta regra única e super específica vai resolver o problema */
    #user-icon-mobile img.icon {
        width: 60px !important;
        /* Define a largura exata */
        height: 60px !important;
        /* Define a altura exata */
        max-width: none !important;
        /* Remove qualquer limite de largura máxima */
    }

    /* Opcional: Você pode limpar a regra antiga para evitar conflitos, 
        deixando-a responsável apenas pelo espaçamento (margin). */
    #menu-icon-mobile,
    #user-icon-mobile {
        margin: 10px 0 25px 0;
        /* Aumenta margem inferior para dar espaço ao texto sem sobrepor */
        padding: 0;
        height: auto !important;
        /* Libera a altura fixa para exibir imagem e texto sem estourar o layout */
    }


    /* #menu-icon-mobile,
        #user-icon-mobile,
        #sidebar-toggle {
            display: none !important;
        } */

}


/* ========== ÍCONES E LOGOS ==========
        Padronização de tamanhos */
.icon {
    width: 46px;
    height: 46px;
    object-fit: contain;
    vertical-align: middle;
}

.logo {
    width: 120px;
    height: auto;
}

/* ==========================================================================
   PATCH DE RECUPERAÇÃO DE UI (Header, Sidebar e Dropdown)
   ========================================================================== */

/* 1. CORREÇÃO DO ÍCONE DO HEADER (Estava estourado) */
.header-user-icon {
    width: 32px !important;
    height: 32px !important;
    object-fit: contain;
    vertical-align: middle;
    filter: none !important;
    /* Remove filtro verde se houver */
    border-radius: 50%;
    /* Opcional: deixa redondinho se for avatar */
}

.user-icon-link {
    text-decoration: none;
    margin-left: 15px;
    display: inline-flex;
    align-items: center;
}

/* 2. SEPARADOR DA SIDEBAR */
.nav-separator {
    width: 60%;
    height: 1px;
    background-color: #dcdcdc;
    margin: 10px auto;
    display: block;
}

/* 3. CORREÇÃO DE COR DO ÍCONE MOBILE */
#user-icon-mobile img,
#user-icon-mobile.icon {
    filter: none !important;
    /* Garante a cor original */
}

/* 4. DROPDOWN DE BUSCA (TYPEAHEAD) - O Layout "Perfeito" */
/* Aplica-se à lista ul que aparece ao digitar ingredientes */
ul.dropdown-menu,
.typeahead-dropdown {
    position: absolute;
    background-color: #fff;
    border: 1px solid #c85829;
    /* Borda cor de acento */
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);

    /* Comportamento de Tamanho */
    max-height: 250px;
    /* Limite de altura com scroll */
    overflow-y: auto;
    /* Scroll vertical */
    width: max-content;
    /* LARGURA INTELIGENTE: Adapta ao texto */
    min-width: 100%;
    /* No mínimo a largura do input */
    max-width: 90vw;
    /* Não estourar a tela no mobile */

    z-index: 10000;
    /* Sempre no topo */
    padding: 0;
    margin-top: 2px;
    list-style: none;
}

/* Itens da Lista */
ul.dropdown-menu li,
.typeahead-dropdown li {
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    color: #5d4037;
    font-size: 0.95rem;
    display: block;
    background-color: #fff;
    text-align: left;
}

/* Hover nos itens */
ul.dropdown-menu li:hover,
.typeahead-dropdown li:hover {
    background-color: #fcefe9;
    /* Cor de fundo suave no hover */
    color: #a7461f;
}

/* Scrollbar Bonita (Webkit) */
ul.dropdown-menu::-webkit-scrollbar {
    width: 8px;
}

ul.dropdown-menu::-webkit-scrollbar-track {
    background: #f1f1f1;
}

ul.dropdown-menu::-webkit-scrollbar-thumb {
    background: #c85829;
    border-radius: 4px;
}

/* ============================================================
   PATCH FINAL: CORREÇÃO DOS DROPDOWNS (IDs #form...)
   ============================================================ */

/* 1. O Container da Lista (Target no ID correto com 'form' no prefixo) */
#formIngredientDropdownList,
#formSeasoningDropdownList {
    position: absolute;
    z-index: 9999;
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #c85829;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);

    /* Reset agressivo de lista para remover bolinhas */
    list-style: none !important;
    list-style-type: none !important;
    padding: 0 !important;
    margin: 0 !important;

    max-height: 250px;
    overflow-y: auto;
    display: none;
    /* JS controla o display block, mas inicia oculto */
}

/* 2. O Item da Lista (Flexbox para alinhar Checkbox e Texto) */
#formIngredientDropdownList li,
#formSeasoningDropdownList li {
    display: flex !important;
    align-items: center !important;
    /* Centraliza verticalmente */
    justify-content: flex-start !important;

    padding: 8px 12px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    background-color: #fff;

    /* Remove qualquer marcador de lista herdado */
    list-style: none !important;
}

/* 3. O Checkbox */
#formIngredientDropdownList li input[type="checkbox"],
#formSeasoningDropdownList li input[type="checkbox"] {
    margin: 0 10px 0 0 !important;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    cursor: pointer;
}

/* 4. O Wrapper de Texto (.item-info identificado no print) */
.item-info {
    display: flex;
    flex-direction: column;
    /* Nome em cima, sinônimos embaixo */
    justify-content: center;
    line-height: 1.2;
}

/* 5. Estilo dos Textos Internos */
.item-name {
    font-weight: 500;
    color: #5d4037;
    font-size: 0.95rem;
}

.item-synonyms {
    font-size: 0.8rem;
    color: #888;
    margin-top: 2px;
}

/* 6. Hover */
#formIngredientDropdownList li:hover,
#formSeasoningDropdownList li:hover {
    background-color: #fff3e0;
}

/* ==========================================================================
   DASHBOARD STYLES (Refactored from dashboard.html)
   ========================================================================== */
.dashboard-container {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--clr-border);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--clr-bg);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--clr-accent);
}

.profile-info h1 {
    font-size: var(--fs-700);
    margin: 0;
    color: var(--clr-accent-dark);
}

.profile-info p {
    margin: 0.2rem 0;
    color: var(--clr-text);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    background-color: var(--clr-accent);
    color: white;
}

.badge-business {
    background-color: var(--clr-success);
}

.badge-pending {
    background-color: #ccc;
}

.dashboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--clr-border);
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-family: var(--ff-heading);
    font-size: var(--fs-500);
    cursor: pointer;
    color: var(--clr-text);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 6px 6px 0 0;
    margin: 0;
    transform: none !important;
}

.tab-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: none;
}

.tab-btn.active {
    color: var(--clr-accent);
    border-bottom-color: var(--clr-accent);
    font-weight: bold;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.recipe-card {
    background: white;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: transform 0.2s;
    text-align: center;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px var(--clr-shadow);
    border-color: var(--clr-accent);
}

.recipe-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.recipe-card h3 {
    font-size: var(--fs-400);
    margin-bottom: 0.5rem;
    color: var(--clr-accent-dark);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #777;
}

.settings-form {
    max-width: 500px;
}

.action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.add-recipe-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: bold;
}

@media (min-width: 600px) {
    .add-recipe-btn {
        width: auto;
        padding: 0.5rem 1.5rem;
    }
}

/* UTILITY CLASSES EXTRACTED FROM DASHBOARD INLINE STYLES */
.mt-10px {
    margin-top: 10px;
}

.btn-pantry-dashboard {
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--clr-accent);
    color: white;
    border-radius: var(--radius);
}

.icon-inverted {
    filter: brightness(0) invert(1);
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.placeholder-img-style {
    height: 120px;
    background: #eee;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between-mb1 {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.list-unstyled {
    list-style: none;
}

.product-item {
    background: white;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-column-gap {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card-white-padded {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-title-bordered-mb15 {
    margin-top: 0;
    color: var(--clr-accent-dark);
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title-bordered-mb1 {
    margin-top: 0;
    color: var(--clr-accent-dark);
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-label-bold {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #444;
}

.form-error-msg {
    color: red;
    font-size: .85rem;
    margin-top: .25rem;
}

.avatar-preview-container {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-preview-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--clr-accent);
}

.avatar-preview-text {
    font-size: 0.85rem;
    color: #666;
}

.info-callout {
    color: #666;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--clr-accent);
    font-size: 0.9rem;
}

.mb-2rem {
    margin-bottom: 2rem;
}

.btn-large-bold {
    padding: 0.9rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: var(--radius);
}

/* ==========================================================================
   PANTRY STYLES (Refactored from pantry.html)
   ========================================================================== */
.pantry-container {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--clr-border);
    max-width: 800px;
    margin: 0 auto;
}

.pantry-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid var(--clr-bg);
    padding-bottom: 1rem;
}

.pantry-header h1 {
    color: var(--clr-accent-dark);
    margin: 0;
}

.pantry-search-box {
    margin-bottom: 2rem;
}

.pantry-search-box input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.pantry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ingredient-item {
    background: white;
    border: 2px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    user-select: none;
}

.ingredient-item:hover {
    border-color: var(--clr-accent);
    background-color: var(--clr-bg);
}

.ingredient-item.in-pantry {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: var(--clr-success, #4CAF50);
    color: var(--clr-accent-dark);
    font-weight: bold;
}

.ingredient-item.in-pantry::before {
    content: '✓ ';
    color: var(--clr-success, #4CAF50);
}

.pantry-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* UTILITY CLASSES EXTRACTED FROM PANTRY INLINE STYLES */
.pantry-search-label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.pantry-grid-title {
    margin-bottom: 1rem;
    color: var(--clr-accent-dark);
}

.text-red {
    color: red !important;
}

.pantry-empty-state {
    grid-column: 1/-1;
    text-align: center;
    color: #666;
}

/* UTILITY CLASSES EXTRACTED FROM RECIPE FILTER INLINE STYLES */
.btn-pantry-filter {
    margin-bottom: 12px;
    background-color: #fff;
    color: var(--clr-accent-dark);
    border: 2px solid var(--clr-accent);
}

.btn-pantry-icon {
    vertical-align: middle;
    margin-right: 8px;
}


/* ==========================================================================
   DASHBOARD STYLES (Refactored from dashboard.html)
   ========================================================================== */
.dashboard-container {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--clr-border);
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--clr-bg);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--clr-accent);
}

.profile-info h1 {
    font-size: var(--fs-700);
    margin: 0;
    color: var(--clr-accent-dark);
}

.profile-info p {
    margin: 0.2rem 0;
    color: var(--clr-text);
}

.badge {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    background-color: var(--clr-accent);
    color: white;
}

.badge-business {
    background-color: var(--clr-success);
}

.badge-pending {
    background-color: #ccc;
}

.dashboard-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--clr-border);
}

.tab-btn {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-family: var(--ff-heading);
    font-size: var(--fs-500);
    cursor: pointer;
    color: var(--clr-text);
    border-bottom: 3px solid transparent;
    transition: all 0.3s ease;
    border-radius: 6px 6px 0 0;
    margin: 0;
    transform: none !important;
}

.tab-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    transform: none;
}

.tab-btn.active {
    color: var(--clr-accent);
    border-bottom-color: var(--clr-accent);
    font-weight: bold;
}

.tab-content {
    display: none;
    animation: fadeIn 0.5s;
}

.tab-content.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
}

.recipe-card {
    background: white;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 1rem;
    transition: transform 0.2s;
    text-align: center;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 10px var(--clr-shadow);
    border-color: var(--clr-accent);
}

.recipe-card img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
}

.recipe-card h3 {
    font-size: var(--fs-400);
    margin-bottom: 0.5rem;
    color: var(--clr-accent-dark);
}

.empty-state {
    text-align: center;
    padding: 2rem;
    color: #777;
}

.settings-form {
    max-width: 500px;
}

.action-bar {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1.5rem;
}

.add-recipe-btn {
    width: 100%;
    text-align: center;
    padding: 0.75rem;
    font-size: 1.1rem;
    font-weight: bold;
}

@media (min-width: 600px) {
    .add-recipe-btn {
        width: auto;
        padding: 0.5rem 1.5rem;
    }
}

/* UTILITY CLASSES EXTRACTED FROM DASHBOARD INLINE STYLES */
.mt-10px {
    margin-top: 10px;
}

.btn-pantry-dashboard {
    text-decoration: none;
    padding: 0.5rem 1rem;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--clr-accent);
    color: white;
    border-radius: var(--radius);
}

.icon-inverted {
    filter: brightness(0) invert(1);
}

.btn-small {
    font-size: 0.8rem;
    padding: 0.3rem 0.6rem;
}

.placeholder-img-style {
    height: 120px;
    background: #eee;
    border-radius: var(--radius);
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.flex-between-mb1 {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.list-unstyled {
    list-style: none;
}

.product-item {
    background: white;
    padding: 1rem;
    margin-bottom: 0.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--clr-border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-column-gap {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.card-white-padded {
    background: white;
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.card-title-bordered-mb15 {
    margin-top: 0;
    color: var(--clr-accent-dark);
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1.5rem;
}

.card-title-bordered-mb1 {
    margin-top: 0;
    color: var(--clr-accent-dark);
    border-bottom: 2px solid #eee;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

.grid-2-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.form-label-bold {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #444;
}

.form-error-msg {
    color: red;
    font-size: .85rem;
    margin-top: .25rem;
}

.avatar-preview-container {
    margin-top: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.avatar-preview-img {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--clr-accent);
}

.avatar-preview-text {
    font-size: 0.85rem;
    color: #666;
}

.info-callout {
    color: #666;
    margin-bottom: 1.5rem;
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border-left: 4px solid var(--clr-accent);
    font-size: 0.9rem;
}

.mb-2rem {
    margin-bottom: 2rem;
}

.btn-large-bold {
    padding: 0.9rem;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: var(--radius);
}

/* ==========================================================================
   PANTRY STYLES (Refactored from pantry.html)
   ========================================================================== */
.pantry-container {
    background-color: rgba(255, 255, 255, 0.8);
    border-radius: var(--radius);
    padding: 2rem;
    border: 1px solid var(--clr-border);
    max-width: 800px;
    margin: 0 auto;
}

.pantry-header {
    margin-bottom: 2rem;
    text-align: center;
    border-bottom: 2px solid var(--clr-bg);
    padding-bottom: 1rem;
}

.pantry-header h1 {
    color: var(--clr-accent-dark);
    margin: 0;
}

.pantry-search-box {
    margin-bottom: 2rem;
}

.pantry-search-box input {
    width: 100%;
    padding: 0.8rem;
    border: 1px solid var(--clr-border);
    border-radius: var(--radius);
    font-size: 1rem;
}

.pantry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.ingredient-item {
    background: white;
    border: 2px solid var(--clr-border);
    border-radius: var(--radius);
    padding: 0.8rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    font-weight: 500;
    user-select: none;
}

.ingredient-item:hover {
    border-color: var(--clr-accent);
    background-color: var(--clr-bg);
}

.ingredient-item.in-pantry {
    background-color: rgba(76, 175, 80, 0.1);
    border-color: var(--clr-success, #4CAF50);
    color: var(--clr-accent-dark);
    font-weight: bold;
}

.ingredient-item.in-pantry::before {
    content: '✓ ';
    color: var(--clr-success, #4CAF50);
}

.pantry-loading {
    text-align: center;
    padding: 2rem;
    color: #666;
    font-style: italic;
}

/* UTILITY CLASSES EXTRACTED FROM PANTRY INLINE STYLES */
.pantry-search-label {
    font-weight: bold;
    display: block;
    margin-bottom: 0.5rem;
}

.pantry-grid-title {
    margin-bottom: 1rem;
    color: var(--clr-accent-dark);
}

.text-red {
    color: red !important;
}

.pantry-empty-state {
    grid-column: 1/-1;
    text-align: center;
    color: #666;
}

/* UTILITY CLASSES EXTRACTED FROM RECIPE FILTER INLINE STYLES */
.btn-pantry-filter {
    margin-bottom: 12px;
    background-color: #fff;
    color: var(--clr-accent-dark);
    border: 2px solid var(--clr-accent);
}

.btn-pantry-icon {
    vertical-align: middle;
    margin-right: 8px;
}


/* =========================================================
   BLINDAGEM DO LAYOUT DO CHAT (UI LIMPA E ISOLADA)
   ========================================================= */

/* 1. O Contêiner Pai: Rompe o "plástico filme" e força largura total */
main.content-box {
    flex: 1 1 100% !important;
    width: 100% !important;
    max-width: none !important;
    display: flex !important;
    flex-direction: column !important;
}

/* 2. O Balão Histórico: Expande e cria a barra de rolagem interna */
#chat-box {
    width: 100% !important;
    flex-grow: 1 !important;
    height: auto !important;
    /* Remove os 700px fixos que você testou */
    overflow-y: auto !important;
    margin-right: 10px;
}

/* 3. A Linha do Input: Força a esticar de ponta a ponta na base */
.chat-input-row {
    width: 100% !important;
    display: flex !important;
    gap: 1rem !important;
    padding-top: 1rem !important;
    ;
}

/* 4. O Campo de Texto: Mata a restrição global de 600px */
#chat-input {
    flex-grow: 1 !important;
    width: 100% !important;
    max-width: none !important;
    /* A regra de ouro que solta as amarras */
}

/* 5. A Mensagem: Permite que textos da IA fiquem mais largos e legíveis */
.chat-message.assistant,
.chat-message.user {
    max-width: 90% !important;
}

/* =========================================
   DIÁRIO ALIMENTAR - UX / SAAS PREMIUM REFACTOR
   ========================================= */

/* Diary Container */
.diary {
    background: #faf8f4;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #eaeaea;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.03);
}

.diary__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.diary__title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: #2e2e2e;
    font-weight: 700;
}

.diary__premium-badge {
    background-color: #fdf5d3;
    color: #8f6e00;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.35rem 0.75rem;
    border-radius: 50px;
    letter-spacing: 0.5px;
    border: 1px solid #f7e69f;
    box-shadow: 0 2px 4px rgba(235, 200, 50, 0.15);
}

.diary__date-input {
    width: auto;
    border-radius: 8px;
    border-color: #ddd;
    color: #555;
}

/* Actions (Report Link) */
.diary__actions {
    text-align: right;
    margin-bottom: 2rem;
}

.diary__report-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    border: 2px solid var(--clr-success);
    color: var(--clr-success);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.2s ease;
    background-color: transparent;
}

.diary__report-link:hover {
    background-color: var(--clr-success);
    color: #ffffff;
    box-shadow: 0 4px 8px rgba(134, 143, 84, 0.2);
    transform: translateY(-1px);
}

/* Log Input Area */
.log-input-area {
    display: flex;
    gap: 1rem;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    position: relative;
    background: #f8f9fa;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #edf2f7;
}

.log-input-area__group {
    flex: 1;
    min-width: 150px;
}

.log-input-area__group--search {
    flex: 2;
    min-width: 250px;
    position: relative;
}

.log-input-area__group--quantity {
    display: none;
    /* JS toggles this */
}

.log-input-area__label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #4a5568;
    font-size: 0.9rem;
}

.log-input-area__quantity-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

.log-input-area__quantity-wrapper input {
    flex: 1;
    min-width: 60px;
    width: 100%;
}

.log-input-area__quantity-wrapper .btn {
    white-space: nowrap;
    flex-shrink: 0;
}

*/ .log-input-area__btn-add {
    background-color: var(--clr-success);
    border-radius: 8px;
    padding: 0.6rem 1.2rem;
    height: 100%;
}

.log-input-area__btn-add:hover {
    background-color: #6a743c;
}

.log-input-area__dropdown {
    display: none;
    /* JS toggles */
    position: absolute;
    z-index: 1000;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    list-style: none;
    padding: 0;
    margin: 0;
    margin-top: 0.5rem;
}

/* Segmented Control Tabs */
.diary-tabs-container {
    width: 100%;
    margin-bottom: 0.5rem;
}

.diary-tabs {
    display: flex;
    background-color: #f1f5f9;
    padding: 4px;
    border-radius: 8px;
    width: 100%;
}

.diary-tab {
    flex: 1;
    text-align: center;
    padding: 0.6rem 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: #64748b;
    border: none;
    background: transparent;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.diary-tab:not([disabled]):hover {
    color: #334155;
}

.diary-tab.active {
    background-color: #ffffff;
    color: #0f172a;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.diary-tab[disabled] {
    cursor: not-allowed;
    opacity: 0.5;
}

.diary-tab-content {
    display: none;
}

.diary-tab-content.active {
    display: contents;
}

/* Staging Area */
.staging-area {
    display: none;
    /* JS toggles */
    margin-bottom: 2rem;
    background: #fdfaf6;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid rgba(200, 88, 41, 0.15);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.02);
}

.staging-area__title {
    margin-top: 0;
    margin-bottom: 1rem;
    color: var(--clr-accent-dark);
    font-weight: 700;
    font-size: 1.1rem;
}

.staging-area__list {
    list-style: none;
    padding: 0;
    margin-bottom: 1.5rem;
}

.staging-area__actions {
    text-align: right;
}

.staging-area__btn-save {
    background: var(--clr-accent);
    color: white;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    letter-spacing: 0.5px;
    box-shadow: 0 4px 10px rgba(200, 88, 41, 0.3);
    border: none;
    transition: all 0.3s ease;
}

.staging-area__btn-save:hover {
    box-shadow: 0 6px 15px rgba(200, 88, 41, 0.4);
    transform: translateY(-2px);
    background: var(--clr-accent-dark);
}

/* Meal Cards */
.meal-card {
    background: #ffffff;
    border: 1px solid #eaeaea;
    border-left: 6px solid var(--clr-accent);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.meal-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.meal-card__header {
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 1rem;
    margin-bottom: 1rem;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 1.25rem;
    font-weight: 700;
    color: #334155;
}

.meal-card__list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.meal-card__item {
    padding: 0.8rem 0;
    border-bottom: 1px solid #f8fafc;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: background-color 0.2s;
}

.meal-card__item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.meal-card__food-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.meal-card__food-name {
    color: #0f172a;
    font-weight: 600;
    font-size: 1rem;
}

.meal-card__food-qty {
    color: #64748b;
    font-size: 0.9rem;
    background: #f1f5f9;
    padding: 0.2rem 0.6rem;
    border-radius: 6px;
    font-weight: 500;
}

.meal-card__food-cals {
    font-size: 0.95rem;
    color: #475569;
    font-weight: 600;
}

.meal-card__empty {
    color: #94a3b8;
    font-size: 0.95rem;
    font-style: italic;
    margin: 0;
    text-align: center;
    padding: 1rem 0;
}

/* Daily Goals (Macros) */
.daily-goals {
    margin-top: 2rem;
    background-color: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.04);
}

.daily-goals__title {
    margin-top: 0;
    margin-bottom: 2rem;
    text-align: center;
    color: #1e293b;
    font-weight: 700;
    font-size: 1.4rem;
}

.daily-goals__macro-group {
    margin-bottom: 2rem;
}

.daily-goals__macro-group--prominent {
    background: #f8fafc;
    padding: 1.5rem;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    margin-top: 2rem;
}

.daily-goals__macro-group--prominent .daily-goals__macro-name {
    font-size: 1.25rem;
    color: #1e293b;
}

.daily-goals__macro-group--prominent .daily-goals__progress-track {
    height: 16px;
}

.daily-goals__macro-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.6rem;
    align-items: flex-end;
}

.daily-goals__macro-name {
    font-weight: 600;
    color: #334155;
    font-size: 1.1rem;
}

.daily-goals__macro-values {
    font-size: 0.95rem;
    color: #64748b;
    font-weight: 500;
}

.daily-goals__macro-current {
    color: #0f172a;
    font-weight: 700;
    font-size: 1.1rem;
}

.daily-goals__macro-target {
    color: #94a3b8;
}

.daily-goals__progress-track {
    background-color: #f1f5f9;
    border-radius: 50px;
    height: 12px;
    overflow: hidden;
    width: 100%;
}

.daily-goals__progress-fill {
    height: 100%;
    border-radius: 50px;
    transition: width 1s cubic-bezier(0.4, 0, 0.2, 1);
}

.daily-goals__progress-fill--kcal {
    background: linear-gradient(90deg, #3b82f6, #2563eb);
}

.daily-goals__macros-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem 1.5rem;
}

@media (max-width: 600px) {
    .daily-goals__macros-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.daily-goals__progress-fill--protein {
    background-color: #10b981;
}

.daily-goals__progress-fill--carbs {
    background-color: #f59e0b;
}

.daily-goals__progress-fill--fat {
    background-color: #ef4444;
}

.daily-goals__progress-fill--fiber {
    background-color: #8b5cf6;
}

.daily-goals__progress-fill--sodium {
    background-color: #64748b;
}

.daily-goals__secondary-goals {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.daily-goals__macro-item .daily-goals__macro-name {
    font-size: 0.95rem;
}

.daily-goals__macro-item .daily-goals__macro-values {
    font-size: 0.85rem;
}

/* ═══════════════════════════════════════════
   SISTEMA DE ATIVIDADES — Missão 1 (MET)
   ═══════════════════════════════════════════ */

/* Barra de Saldo Calórico */
.activity-balance-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    background: linear-gradient(135deg, #fff7ed, #fef3c7);
    border: 1px solid #fde68a;
    border-radius: 16px;
    padding: 1rem 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 4px 12px rgba(234, 179, 8, 0.1);
}

.activity-balance-bar__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    min-width: 100px;
    justify-content: center;
    text-align: center;
}

.activity-balance-bar__emoji {
    font-size: 1.8rem;
    line-height: 1;
}

.activity-balance-bar__label {
    font-size: 0.75rem;
    color: #92400e;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.activity-balance-bar__value {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e293b;
}

.activity-balance-bar__item--burn .activity-balance-bar__value {
    color: #dc2626;
}

.activity-balance-bar__item--available .activity-balance-bar__value {
    color: #16a34a;
}

.activity-balance-bar__operator {
    font-size: 1.5rem;
    font-weight: 800;
    color: #d97706;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .activity-balance-bar {
        gap: 0.25rem;
        padding: 0.75rem;
    }

    .activity-balance-bar__value {
        font-size: 0.95rem;
    }

    .activity-balance-bar__emoji {
        font-size: 1.3rem;
    }
}

/* Botão Gatilho do Modal */
.btn-activity-trigger {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border: none;
    border-radius: 12px;
    padding: 0.8rem 1.5rem;
    font-weight: 700;
    font-size: 1rem;
    letter-spacing: 0.3px;
    transition: all 0.25s ease;
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.35);
}

.btn-activity-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(249, 115, 22, 0.45);
    background: linear-gradient(135deg, #ea580c, #c2410c);
    color: white;
}

/* Modal de Atividades */
.activity-modal {
    border-radius: 20px;
    overflow: hidden;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.activity-modal__header {
    background: linear-gradient(135deg, #f97316, #ea580c);
    color: white;
    border-bottom: none;
    padding: 1.25rem 1.5rem;
}

.activity-modal__header .modal-title {
    font-weight: 700;
    font-size: 1.2rem;
}

.activity-modal__header .btn-close {
    filter: invert(1) brightness(2);
}

.activity-modal__select,
.activity-modal__duration {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 0.65rem 1rem;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.activity-modal__select:focus,
.activity-modal__duration:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    outline: none;
}

.activity-modal__preview {
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    padding: 0.85rem 1.1rem;
    font-weight: 600;
    color: #c2410c;
    font-size: 0.95rem;
    text-align: center;
    min-height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.activity-modal__feedback {
    border-radius: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
}

.activity-modal__footer {
    border-top: 1px solid #f1f5f9;
    padding: 1rem 1.5rem;
}

.btn-save-activity {
    background: linear-gradient(135deg, #f97316, #dc2626);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.65rem 1.5rem;
    font-weight: 700;
    transition: all 0.25s;
}

.btn-save-activity:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
}

.btn-save-activity:disabled {
    opacity: 0.6;
    transform: none;
}

/* Lista de Atividades do Dia */
.activities-log {
    background: linear-gradient(135deg, #fff7ed, #fef9f0);
    border: 1px solid #fed7aa;
    border-left: 5px solid #f97316;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.08);
}

.activities-log__title {
    margin: 0 0 1rem;
    font-size: 1.1rem;
    font-weight: 700;
    color: #c2410c;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.activities-log__list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
}

.activities-log__item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid rgba(253, 186, 116, 0.4);
    gap: 0.5rem;
    transition: background 0.15s;
}

.activities-log__item:last-child {
    border-bottom: none;
}

.activities-log__info {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
    min-width: 0;
}

.activities-log__name {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.95rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.activities-log__meta {
    font-size: 0.8rem;
    color: #94a3b8;
}

.activities-log__right {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

.activities-log__burn {
    font-weight: 700;
    color: #dc2626;
    font-size: 0.9rem;
    white-space: nowrap;
}

.activities-log__delete {
    background: none;
    border: 1.5px solid #fca5a5;
    color: #ef4444;
    border-radius: 6px;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1rem;
    line-height: 1;
    transition: all 0.2s;
    flex-shrink: 0;
}

.activities-log__delete:hover {
    background-color: #fef2f2;
    border-color: #ef4444;
}

.activities-log__total {
    margin: 0;
    font-size: 0.9rem;
    color: #64748b;
    text-align: right;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(253, 186, 116, 0.5);
}

.activities-log__total strong {
    color: #dc2626;
}

/* BOTÕES DE SUGESTÃO DA IA NO CHAT */
.ai-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 10px;
}

.ai-option-btn {
    background: #fff;
    border: 2px solid var(--clr-accent);
    color: var(--clr-text);
    border-radius: 8px;
    padding: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.ai-option-btn:hover {
    background: var(--clr-bg);
    transform: translateY(-2px);
    border-color: var(--clr-accent-dark);
}

/* ─────────────────────────────────────────────
   Card Inline de Atividades (substitui o Modal)
   ───────────────────────────────────────────── */
.activity-inline-card {
    background: linear-gradient(135deg, #fff7ed, #fef9f0);
    border: 1px solid #fed7aa;
    border-left: 5px solid #f97316;
    border-radius: 16px;
    padding: 1.25rem 1.5rem;
    margin: 0.75rem 0 1.25rem;
    box-shadow: 0 6px 16px rgba(249, 115, 22, 0.08);
}

.activity-inline-card__title {
    margin: 0 0 1rem;
    font-size: 1rem;
    font-weight: 700;
    color: #c2410c;
}

.activity-inline-card__row {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
    align-items: center;
}

.activity-inline__select {
    flex: 3;
    min-width: 180px;
    border-radius: 10px;
    border: 1.5px solid #fed7aa;
    font-size: 0.9rem;
    height: 42px;
    background: white;
}

.activity-inline__select:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    outline: none;
}

/* Wrapper HH : MM */
.activity-duration-wrap {
    display: flex;
    align-items: center;
    gap: 4px;
    flex-shrink: 0;
}

.activity-inline__hhmm {
    width: 56px;
    border-radius: 10px;
    border: 1.5px solid #fed7aa;
    font-size: 1rem;
    font-weight: 700;
    height: 42px;
    text-align: center;
    padding: 0 4px;
    -moz-appearance: textfield;
    appearance: textfield;
}

.activity-inline__hhmm::-webkit-inner-spin-button,
.activity-inline__hhmm::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.activity-inline__hhmm:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    outline: none;
}

.activity-duration-sep {
    font-size: 1.4rem;
    font-weight: 800;
    color: #f97316;
    line-height: 1;
    user-select: none;
}

.activity-inline__duration {
    flex: 1;
    min-width: 90px;
    max-width: 120px;
    border-radius: 10px;
    border: 1.5px solid #fed7aa;
    font-size: 0.9rem;
    height: 42px;
    text-align: center;
}

.activity-inline__duration:focus {
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.15);
    outline: none;
}

.activity-inline__btn-add {
    background: #f97316;
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0 1.2rem;
    height: 42px;
    font-weight: 700;
    font-size: 0.9rem;
    white-space: nowrap;
    transition: all 0.2s;
    flex-shrink: 0;
}

.activity-inline__btn-add:hover {
    background: #ea580c;
    color: white;
    transform: translateY(-1px);
}

.activity-inline__preview {
    margin-top: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: #c2410c;
}

/* Staging area (lista de atividades a confirmar) */
.activity-staging {
    margin-top: 1rem;
    padding-top: 0.75rem;
    border-top: 1px dashed #fed7aa;
}

.activity-staging__list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.75rem;
}

.activity-staging__item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgba(253, 186, 116, 0.35);
    font-size: 0.9rem;
}

.activity-staging__item:last-child {
    border-bottom: none;
}

.activity-staging__item-name {
    font-weight: 600;
    color: #1e293b;
    flex: 1;
}

.activity-staging__item-info {
    color: #94a3b8;
    font-size: 0.8rem;
    white-space: nowrap;
}

.activity-staging__item-remove {
    background: none;
    border: 1.5px solid #fca5a5;
    color: #ef4444;
    border-radius: 6px;
    width: 22px;
    height: 22px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    flex-shrink: 0;
    transition: all 0.15s;
}

.activity-staging__item-remove:hover {
    background: #fef2f2;
    border-color: #ef4444;
}

.activity-staging__footer {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.activity-staging__btn-save {
    background: linear-gradient(135deg, #16a34a, #15803d);
    color: white;
    border: none;
    border-radius: 10px;
    padding: 0.6rem 1.4rem;
    font-weight: 700;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.activity-staging__btn-save:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    color: white;
}

.activity-staging__btn-save:disabled {
    opacity: 0.6;
    transform: none;
    cursor: wait;
}

.activity-staging__msg {
    font-size: 0.85rem;
    color: #dc2626;
    font-weight: 600;
}

@media (max-width: 480px) {
    .activity-inline-card__row {
        flex-direction: column;
    }

    .activity-inline__select,
    .activity-inline__duration {
        max-width: 100%;
        min-width: 0;
        width: 100%;
    }

    .activity-inline__btn-add {
        width: 100%;
    }
}
/* ========== INSTITUCIONAL ========== */
.institutional-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 1rem;
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: 12px;
    border: 2px solid #a2b686;
}

.prose h1 {
    color: var(--clr-accent-dark);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
    border-bottom: 2px solid var(--clr-bg);
    padding-bottom: 0.5rem;
}

.legal-text {
    line-height: 1.6;
    color: var(--clr-text);
    font-size: 1.1rem;
    text-align: justify;
}

.legal-text p {
    margin-bottom: 1rem;
}

/* Divisor para o menu */
.nav-divider {
    width: 80%;
    height: 1px;
    background-color: var(--clr-border);
    margin: 10px 0;
}

/* Esconder links institucionais da barra lateral no mobile */
@media (max-width: 767px) {
    .institutional-links-sidebar,
    .institutional-links-separator {
        display: none !important;
    }
}

/* Dropdown Institucional Mobile-First */
.menu-mobile-container {
    position: relative !important;
    width: 100%;
    display: block !important;
    text-align: center;
}

.institutional-dropdown {
    display: none !important;
    position: absolute !important;
    top: 20px !important; /* Alinhado com o topo do ícone no content-shell */
    left: 75px !important; /* À direita da barra lateral de ícones */
    background-color: #ffffff !important;
    border: 2px solid var(--clr-accent) !important;
    border-radius: 8px;
    box-shadow: 0px 8px 16px rgba(0,0,0,0.2);
    z-index: 10000;
    min-width: 170px;
    padding: 0;
    margin: 0;
}

.institutional-dropdown.show {
    display: block !important;
    animation: fadeInSlide 0.2s ease-out;
}

.institutional-dropdown a {
    display: block !important;
    padding: 12px 16px;
    text-decoration: none !important;
    color: #333333 !important; /* Cor sólida para garantir visibilidade */
    font-family: var(--ff-body);
    font-size: 0.95rem;
    font-weight: bold;
    border-bottom: 1px solid #eeeeee;
    text-align: left;
    transition: background-color 0.2s;
}

.institutional-dropdown a:last-child {
    border-bottom: none;
}

.institutional-dropdown a:hover {
    background-color: var(--clr-bg);
    color: var(--clr-accent-dark) !important;
}

@keyframes fadeInSlide {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 768px) {
    .institutional-container {
        padding: 1rem;
        margin: 0 0.5rem;
    }
    
    .prose h1 {
        font-size: 1.5rem;
    }
}
