body { margin: 0; font-family: 'Segoe UI', sans-serif; background: #eef7f0; }

/* MODO ESCURO */
body.dark { background: #0d1f0e; color: #e0f2e0; }
body.dark .card { background: #1a2e1a; color: #e0f2e0; box-shadow: 0 10px 25px rgba(0,0,0,0.4); }
body.dark nav { background: #0a1a0a; }
body.dark footer { background: #0a1a0a; }
body.dark .sim-input { background: #1a2e1a; color: #e0f2e0; border-color: #2e7d32; }
body.dark .sustentabilidade-links a { background: #1a3320; color: #81c784; }
body.dark .sustentabilidade-links a:hover { background: #1f4028; }
body.dark #toggle-dark { background: #81c784; color: #0d1f0e; }

#toggle-dark {
    position: fixed; bottom: 20px; left: 20px;
    background: #1b5e20; color: white;
    border: none; border-radius: 50px; padding: 10px 16px;
    cursor: pointer; font-size: 18px; z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: 0.3s;
}
#toggle-dark:hover { transform: scale(1.1); }

/* CHATBOT */
#btn-chatbot {
    position: fixed; bottom: 20px; right: 20px;
    background: #2e7d32; color: white;
    border: none; border-radius: 50px; padding: 10px 16px;
    cursor: pointer; font-size: 20px; z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    transition: 0.3s;
}
#btn-chatbot:hover { transform: scale(1.1); }
#chat-overlay {
    display: none; position: fixed; bottom: 80px; right: 20px;
    width: 360px; max-height: 520px; background: white;
    border-radius: 18px; box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    z-index: 1001; flex-direction: column; overflow: hidden;
    border: 1px solid #c8e6c9;
}
#chat-overlay.aberto { display: flex; }
body.dark #chat-overlay { background: #1a2e1a; border-color: #2e7d32; }
#chat-header {
    background: #1b5e20; color: white; padding: 14px 18px;
    font-weight: bold; font-size: 15px;
    display: flex; justify-content: space-between; align-items: center;
}
#chat-header button { background: none; border: none; color: white; font-size: 18px; cursor: pointer; padding: 0; }
#chat-mensagens {
    flex: 1; overflow-y: auto; padding: 14px;
    display: flex; flex-direction: column; gap: 10px; max-height: 360px;
}
.chat-msg { max-width: 85%; padding: 10px 14px; border-radius: 14px; font-size: 13.5px; line-height: 1.6; }
.chat-msg.bot { background: #e8f5e9; color: #1b2e1b; align-self: flex-start; border-bottom-left-radius: 4px; }
.chat-msg.user { background: #1b5e20; color: white; align-self: flex-end; border-bottom-right-radius: 4px; }
body.dark .chat-msg.bot { background: #1f3d1f; color: #e0f2e0; }
.chat-msg.loading { opacity: 0.6; font-style: italic; }
#chat-input-area {
    display: flex; gap: 8px; padding: 12px;
    border-top: 1px solid #c8e6c9; background: #f9fbe7;
}
body.dark #chat-input-area { background: #0f1f0f; border-color: #2e7d32; }
#chat-input {
    flex: 1; padding: 9px 12px; border-radius: 20px;
    border: 1px solid #a5d6a7; outline: none; font-size: 13px;
    background: white; color: #1b2e1b;
}
body.dark #chat-input { background: #1a2e1a; color: #e0f2e0; border-color: #2e7d32; }
#chat-send {
    background: #1b5e20; color: white; border: none;
    border-radius: 50%; width: 36px; height: 36px;
    font-size: 16px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}
#chat-send:hover { background: #2e7d32; }
@media (max-width: 600px) {
    #chat-overlay { width: calc(100vw - 20px); right: 10px; bottom: 75px; }
    #toggle-dark { bottom: 75px; left: 15px; }
    #btn-chatbot { bottom: 75px; right: 15px; }
}

/* ===== MENU ACESSIBILIDADE / DALTONISMO ===== */
#acesso-wrap {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 9999;
    font-family: 'Segoe UI', sans-serif;
}
#acesso-btn {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #fff;
    color: #1b5e20;
    border: 2px solid #1b5e20;
    border-radius: 30px;
    padding: 7px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 3px 12px rgba(0,0,0,0.18);
    transition: background 0.2s, color 0.2s;
    white-space: nowrap;
    letter-spacing: 0.01em;
}
#acesso-btn:hover { background: #1b5e20; color: #fff; }
#acesso-btn svg { flex-shrink: 0; }
body.dark #acesso-btn { background: #1a2e1a; color: #81c784; border-color: #81c784; }
body.dark #acesso-btn:hover { background: #2e7d32; color: #fff; }

#acesso-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    min-width: 230px;
    background: #fff;
    border: 1.5px solid #c8e6c9;
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(0,0,0,0.18);
    overflow: hidden;
}
body.dark #acesso-menu { background: #1a2e1a; border-color: #2e7d32; }

.acesso-titulo {
    padding: 9px 16px 6px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #888;
}
body.dark .acesso-titulo { color: #66bb6a; }

.acesso-item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 16px;
    font-size: 13.5px;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #1b2e1b;
    transition: background 0.15s;
    font-family: inherit;
}
.acesso-item:hover { background: #f1f8f1; }
body.dark .acesso-item { color: #c8e6c9; }
body.dark .acesso-item:hover { background: #223322; }
.acesso-item.ativo { background: #e8f5e9; font-weight: 700; color: #1b5e20; }
body.dark .acesso-item.ativo { background: #1f3d1f; color: #81c784; }
.acesso-item .dot {
    width: 14px; height: 14px; border-radius: 50%;
    border: 2px solid #ccc; flex-shrink: 0;
}
.acesso-item.ativo .dot { border-color: #1b5e20; background: #1b5e20; }
body.dark .acesso-item.ativo .dot { border-color: #81c784; background: #81c784; }
.acesso-sep { height: 1px; background: #e8f5e9; margin: 2px 0; }
body.dark .acesso-sep { background: #2e3d2e; }

/* AMOSTRAS DE COR */
.acesso-swatch {
    display: flex; gap: 3px; margin-left: auto;
}
.acesso-swatch span {
    width: 10px; height: 10px; border-radius: 50%;
    display: inline-block;
}

@media (max-width: 480px) {
    #acesso-wrap { top: 8px; left: 8px; }
    #acesso-btn { font-size: 12px; padding: 6px 12px; }
    #acesso-menu { min-width: 200px; }
}
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.page.active .card {
    animation: fadeInUp 0.4s ease both;
}

/* FUNDO DE LOGIN CORRIGIDO */
#tela-login {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: #1b5e20 url('café.w.png') no-repeat center center fixed;
    background-size: cover;
    z-index: 2000;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    box-sizing: border-box;
}

.login-box {
    /* margin:auto no eixo principal (vertical) centraliza quando cabe
       na tela e, quando o conteúdo é maior que a tela, deixa tudo
       normalmente rolável (sem cortar o topo, como acontecia antes) */
    margin: auto;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(15px);
    padding: 40px; border-radius: 20px;
    text-align: center; width: 320px;
    max-width: 100%;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Em telas estreitas, o botão de acessibilidade fica fixo no canto
   superior esquerdo — reserva um respiro no topo para ele nunca
   cobrir o título "Acesso Zênit". */
@media (max-width: 600px) {
    #tela-login { padding-top: 56px; }
}
.login-box h2 { color: white; text-shadow: 1px 1px 4px rgba(0,0,0,0.6); margin-bottom: 20px; }
.login-box input { display: block; width: 90%; margin: 15px auto; padding: 12px; border: none; border-radius: 8px; outline: none; }

/* ===== ABAS ENTRAR / CRIAR CONTA ===== */
.login-tabs {
    display: flex; gap: 6px; background: rgba(0,0,0,0.25);
    border-radius: 10px; padding: 4px; margin-bottom: 18px;
}
.login-tab {
    flex: 1; background: transparent; color: rgba(255,255,255,0.75);
    padding: 9px 8px; border-radius: 8px; font-weight: 600; font-size: 13px;
    box-shadow: none;
}
.login-tab:hover { background: rgba(255,255,255,0.08); }
.login-tab.ativo { background: #ffffff; color: #1b5e20; }

.login-outlook-nota {
    color: rgba(255,255,255,0.85);
    font-size: 12px;
    line-height: 1.5;
    margin: 12px auto 0;
    max-width: 280px;
}

.login-divider {
    display: flex; align-items: center; text-align: center;
    color: rgba(255,255,255,0.7); font-size: 12px; margin: 18px 0 8px;
}
.login-divider::before, .login-divider::after {
    content: ""; flex: 1; height: 1px; background: rgba(255,255,255,0.3);
}
.login-divider span { padding: 0 10px; }

.login-form { margin-top: 4px; }

header {
   
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
    url('girassol.png');
    background-size: cover; background-position: center;
    color: white; text-align: center; padding: 90px 20px;
    position: relative;
}
header h1 { font-size: 45px; margin: 0; }

#info-usuario-canto {
    position: absolute; top: 10px; right: 15px;
    font-size: 12px; text-align: right;
    background: rgba(0,0,0,0.3); padding: 5px 10px; border-radius: 20px;
}

/* ===== NAV DESKTOP — GRUPOS COM DROPDOWN ===== */
nav {
    display: flex;
    justify-content: center;
    align-items: center;
    background: #1b5e20;
    gap: 4px;
    padding: 0 16px;
    position: relative;
    z-index: 500;
}

/* link direto */
nav > a {
    color: white;
    padding: 13px 14px;
    text-decoration: none;
    font-weight: bold;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
    white-space: nowrap;
}
nav > a:hover { background: rgba(255,255,255,0.15); border-radius: 6px; }

/* grupo dropdown */
.nav-grupo {
    position: relative;
}
.nav-grupo > .nav-grupo-btn {
    color: white;
    padding: 13px 14px;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    user-select: none;
    transition: background 0.2s;
    border-radius: 6px;
}
.nav-grupo > .nav-grupo-btn:hover,
.nav-grupo:hover > .nav-grupo-btn { background: rgba(255,255,255,0.15); }

.nav-grupo-btn .chevron {
    font-size: 9px;
    opacity: 0.75;
    transition: transform 0.2s;
}
.nav-grupo:hover .chevron { transform: rotate(180deg); }

/* dropdown panel */
.nav-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 2px);
    left: 0;
    background: #1b5e20;
    border-radius: 0 10px 10px 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
    min-width: 190px;
    overflow: hidden;
    z-index: 600;
}
.nav-grupo:hover .nav-dropdown { display: block; }

.nav-dropdown a {
    display: flex;
    align-items: center;
    gap: 9px;
    color: white;
    text-decoration: none;
    padding: 11px 16px;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.15s;
    white-space: nowrap;
}
.nav-dropdown a:hover { background: rgba(255,255,255,0.15); }
.nav-dropdown a .dd-icon { font-size: 15px; }

body.dark .nav-dropdown { background: #0a1a0a; }
body.dark nav { background: #0a1a0a; }

.container { padding: 20px; }
.card {
    background: white; padding: 20px; margin: 15px 0;
    border-radius: 15px; box-shadow: 0 10px 25px rgba(0,0,0,0.1);
    transition: 0.3s;
}
.card:hover { transform: translateY(-6px); }

.grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); 
    gap: 20px; 
}

img { width: 100%; height: 200px; object-fit: cover; border-radius: 12px; }
.metric { text-align: center; font-size: 20px; }
button { padding: 10px 15px; border: none; background: #43a047; color: white; border-radius: 8px; cursor: pointer; font-weight: bold; }
button:hover { background: #2e7d32; }
.page { display: none; }
.active { display: block; }
footer { text-align: center; padding: 15px; background: #2e7d32; color: white; }

.sim-input { width: 100%; padding: 8px; margin: 5px 0 10px 0; border: 1px solid #ddd; border-radius: 8px; box-sizing: border-box; }
.tech-info { border-left: 4px solid #43a047; padding-left: 15px; list-style: none; padding-top: 5px; line-height: 1.8; }
.tech-info b { color: #1b5e20; }

.cronograma-item { border-bottom: 2px solid #eef7f0; padding: 10px 0; }
.cronograma-item b { color: #1b5e20; display: block; margin-bottom: 5px; }

.sustentabilidade-links { margin-top: 25px; padding-top: 15px; border-top: 2px solid #eef7f0; }
.sustentabilidade-links a { 
    display: block; 
    color: #2e7d32; 
    text-decoration: none; 
    margin: 12px 0; 
    font-weight: bold;
    padding: 10px;
    background: #f0fdf4;
    border-radius: 8px;
    border-left: 4px solid #1b5e20;
}
.sustentabilidade-links a:hover { background: #dcfce7; }

/* CRONOGRAMA VISUAL */
.crono-visual { width: 100%; border-collapse: collapse; margin-top: 15px; font-size: 12px; }
.crono-visual th { background: #1b5e20; color: white; padding: 6px 4px; text-align: center; }
.crono-visual td { padding: 5px 4px; text-align: center; border: 1px solid #eef7f0; }
.crono-barra { border-radius: 4px; height: 18px; display: block; }
.crono-plantio { background: #81c784; }
.crono-colheita { background: #f9a825; }
.crono-florada { background: #64b5f6; }
.crono-legenda { display: flex; gap: 15px; margin-top: 8px; font-size: 12px; flex-wrap: wrap; }
.crono-legenda span { display: flex; align-items: center; gap: 5px; }
.crono-legenda .dot { width: 14px; height: 14px; border-radius: 3px; display: inline-block; }

/* PRAGAS */
.praga-card { border-left: 4px solid #e53935; padding: 10px 15px; margin: 8px 0; background: #fff8f8; border-radius: 8px; }
body.dark .praga-card { background: #2a1a1a; }
.praga-card b { color: #c62828; }

/* CALCULADORA DE CUSTO */
.custo-resultado { margin-top: 15px; padding: 15px; background: #f0fdf4; border-radius: 10px; border-left: 4px solid #43a047; font-size: 15px; line-height: 2; }
body.dark .custo-resultado { background: #1a3320; }

/* DIÁRIO AGRÍCOLA */
.diario-nota {
    background: #f0fdf4;
    border-left: 4px solid #43a047;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 12px;
    position: relative;
}
body.dark .diario-nota { background: #1a3320; }
.diario-nota-data {
    font-size: 11px;
    color: #888;
    margin-bottom: 6px;
    font-weight: 600;
    letter-spacing: 0.03em;
}
body.dark .diario-nota-data { color: #81c784; }
.diario-nota-texto {
    font-size: 14px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}
.diario-btn-excluir {
    position: absolute;
    top: 10px; right: 12px;
    background: none;
    border: none;
    color: #e53935;
    font-size: 16px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 6px;
    line-height: 1;
    font-weight: bold;
    transition: background 0.15s;
}
.diario-btn-excluir:hover { background: #fff0f0; }
body.dark .diario-btn-excluir:hover { background: #3a1a1a; }
.diario-vazio {
    text-align: center;
    color: #aaa;
    font-size: 14px;
    padding: 30px 0;
    border: 2px dashed #c8e6c9;
    border-radius: 10px;
    margin-top: 8px;
}
body.dark .diario-vazio { border-color: #2e5c2e; color: #66bb6a; }

/* CLIMA */
.clima-box { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.clima-temp { font-size: 48px; font-weight: bold; color: #1b5e20; }
.clima-info { font-size: 14px; line-height: 1.8; }
body.dark .clima-temp { color: #81c784; }

/* ========== MOBILE NAV BOTTOM BAR ========== */
#mobile-nav { display: none; }
#drawer-extra { display: none; }

@media (max-width: 600px) {
    .grid { grid-template-columns: 1fr; }
    header h1 { font-size: 28px; }
    header { padding: 60px 15px 50px; }
    .crono-visual { font-size: 10px; }

    nav:not(#mobile-nav) { display: none !important; }

    #mobile-nav {
        display: flex;
        position: fixed;
        bottom: 0; left: 0; right: 0;
        background: #1b5e20;
        z-index: 999;
        justify-content: space-around;
        align-items: center;
        padding: 8px 0 10px;
        box-shadow: 0 -3px 12px rgba(0,0,0,0.25);
    }
    #mobile-nav a {
        color: white;
        text-decoration: none;
        display: flex;
        flex-direction: column;
        align-items: center;
        font-size: 10px;
        gap: 3px;
        flex: 1;
        opacity: 0.85;
        transition: opacity 0.2s;
    }
    #mobile-nav a:hover { opacity: 1; }
    #mobile-nav a span.icon { font-size: 20px; }

    #btn-menu-extra {
        display: flex;
        flex-direction: column;
        align-items: center;
        color: white;
        font-size: 10px;
        gap: 3px;
        flex: 1;
        cursor: pointer;
        background: none;
        border: none;
        padding: 0;
        opacity: 0.85;
    }
    #btn-menu-extra span.icon { font-size: 20px; }

    #drawer-extra {
        display: none;
        position: fixed;
        bottom: 62px; left: 0; right: 0;
        background: #1b5e20;
        z-index: 998;
        padding: 12px 15px 16px;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.3);
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
    }
    #drawer-extra.aberto { display: flex; }
    #drawer-extra a {
        color: white;
        text-decoration: none;
        font-size: 13px;
        font-weight: bold;
        background: rgba(255,255,255,0.15);
        padding: 8px 14px;
        border-radius: 20px;
        transition: background 0.2s;
    }
    #drawer-extra a:hover { background: rgba(255,255,255,0.25); }

    .container { padding-bottom: 80px; }
    footer { margin-bottom: 62px; }
}

/* ============================================================
   OTIMIZAÇÕES MOBILE — ZÊNIT
   ============================================================ */

/* 1. Prevenir rolagem horizontal */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}
*, *::before, *::after {
    box-sizing: border-box;
}

/* 2. Área mínima de toque para todos os botões/links */
button, a, [role="button"] {
    min-height: 44px;
    min-width: 44px;
}

/* 3. Login — formulário mobile-first */
.login-box {
    width: calc(100% - 32px);
    max-width: 380px;
    padding: 28px 20px;
    margin: auto;
}
.login-box h2 { font-size: 20px; margin-bottom: 14px; }
.login-box .login-tabs { margin-bottom: 14px; }
.login-box .login-divider { margin: 14px 0 6px; }
.login-box input {
    width: 100%;
    font-size: 16px; /* evita zoom automático no iOS */
    padding: 13px 12px;
    margin: 10px auto;
    border-radius: 10px;
    box-sizing: border-box;
}
.login-box button {
    width: 100%;
    padding: 14px;
    font-size: 16px;
    border-radius: 10px;
    margin-top: 8px;
}

/* 4. Container geral */
.container {
    padding: 16px;
    width: 100%;
    box-sizing: border-box;
}

/* 5. Cards */
.card {
    width: 100%;
    box-sizing: border-box;
    overflow: hidden; /* evita overflow interno quebrando layout */
}

/* 6. Imagens responsivas */
img {
    max-width: 100%;
    height: auto;
}

/* 7. Tabelas: scroll horizontal no próprio elemento */
.crono-visual,
table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
}

/* 8. Inputs gerais */
input, select, textarea {
    font-size: 16px; /* iOS não faz zoom com 16px */
    max-width: 100%;
    box-sizing: border-box;
}
.sim-input {
    font-size: 16px;
}

/* 9. Chat overlay — melhor no mobile */
@media (max-width: 600px) {
    #chat-overlay {
        width: 100vw;
        right: 0;
        left: 0;
        bottom: 0;
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
    }

    /* Floating buttons — não sobrepor menu inferior */
    #toggle-dark {
        bottom: 76px;
        left: 12px;
        padding: 12px 16px;
        min-height: 44px;
    }
    #btn-chatbot {
        bottom: 76px;
        right: 12px;
        padding: 12px 16px;
        min-height: 44px;
    }

    /* Menu de acessibilidade — não cobrir conteúdo */
    #acesso-wrap {
        top: 6px;
        left: 6px;
    }
    #acesso-btn {
        font-size: 12px;
        padding: 8px 12px;
        min-height: 44px;
    }
    #acesso-menu {
        min-width: min(260px, calc(100vw - 20px));
    }

    /* Header */
    header {
        padding: 70px 16px 40px;
    }
    header h1 {
        font-size: 26px;
    }
    header p {
        font-size: 13px;
    }
    #info-usuario-canto {
        font-size: 11px;
        max-width: 55%;
        word-break: break-word;
    }

    /* Mobile nav — área de toque confortável */
    #mobile-nav {
        padding: 6px 0 env(safe-area-inset-bottom, 8px);
        height: auto;
        min-height: 60px;
    }
    #mobile-nav a,
    #btn-menu-extra {
        min-height: 52px;
        padding: 6px 4px;
        font-size: 10px;
        gap: 2px;
    }
    #mobile-nav a span.icon,
    #btn-menu-extra span.icon {
        font-size: 22px;
    }

    /* Drawer extra — botões maiores e mais acessíveis */
    #drawer-extra {
        bottom: 60px;
        padding: 16px 12px 20px;
        gap: 10px;
    }
    #drawer-extra a {
        font-size: 14px;
        padding: 10px 16px;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    /* Container com espaço para o nav inferior */
    .container {
        padding: 12px 12px 80px;
    }
    footer {
        margin-bottom: 62px;
        font-size: 13px;
    }

    /* Grid sempre em coluna única no mobile */
    .grid {
        grid-template-columns: 1fr !important;
    }

    /* Dashboard — forçar coluna única */
    [style*="grid-template-columns:1fr 1fr"] {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    /* Tipografia legível */
    body {
        font-size: 15px;
    }
    .card h2, .card h3 {
        font-size: 18px;
    }
    .card p, .card li {
        font-size: 14px;
        line-height: 1.7;
    }

    /* Calculadora e simulador — inputs full width */
    .sim-input,
    input[type="number"],
    input[type="text"],
    input[type="email"],
    input[type="password"],
    textarea,
    select {
        width: 100%;
    }

    /* Botões de ação — full width em telas pequenas */
    .card > button,
    section button:not(.diario-btn-excluir):not(#chat-send):not(#toggle-dark):not(#btn-chatbot):not(#acesso-btn) {
        width: 100%;
        font-size: 15px;
        padding: 13px 16px;
    }

    /* Métricas do dashboard */
    .metric {
        font-size: 16px;
    }

    /* Resultado da calculadora */
    .custo-resultado {
        font-size: 14px;
        line-height: 1.9;
    }

    /* Temperatura do clima */
    .clima-temp {
        font-size: 40px;
    }
    .clima-box {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
}

/* Dispositivos muito pequenos (< 360px) */
@media (max-width: 360px) {
    header h1 { font-size: 22px; }
    #mobile-nav a, #btn-menu-extra { font-size: 9px; }
    #mobile-nav a span.icon, #btn-menu-extra span.icon { font-size: 19px; }
}

/* ============================================================
   SEÇÃO ANIMAIS DO CAMPO — estilos isolados (prefixo animais-)
   ============================================================ */
#animais { padding: 0; }

.animais-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px 96px;
    font-family: 'Segoe UI', sans-serif;
}

/* Hero */
.animais-hero {
    padding: 48px 0 36px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
}
.animais-hero-badge {
    flex-shrink: 0;
    width: 54px; height: 54px;
    background: #1a5c1a;
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
    font-size: 26px;
    box-shadow: 0 4px 12px rgba(46,125,50,.35);
    margin-top: 4px;
}
.animais-hero-eyebrow {
    font-size: 11px; font-weight: 700;
    letter-spacing: 1.6px; text-transform: uppercase;
    color: #2e7d32; margin-bottom: 5px;
}
.animais-hero-title {
    font-size: clamp(24px, 5vw, 36px);
    font-weight: 800; color: #0f2b0f;
    line-height: 1.2; letter-spacing: -0.5px;
    margin-bottom: 8px;
}
.animais-hero-subtitle {
    font-size: 15px; color: #4a5e52;
    max-width: 540px; line-height: 1.7;
}
body.dark .animais-hero-title { color: #e0f2e0; }
body.dark .animais-hero-subtitle { color: #a5c9a8; }
body.dark .animais-hero-eyebrow { color: #66bb6a; }

/* Divider */
.animais-divider {
    height: 1px;
    background: linear-gradient(90deg, #66bb6a 0%, transparent 100%);
    margin-bottom: 40px;
    opacity: .4;
}

/* Section */
.animais-section { margin-bottom: 52px; }

.animais-section-header {
    display: flex; align-items: center; gap: 10px;
    margin-bottom: 22px;
}
.animais-section-icon { font-size: 22px; line-height: 1; }
.animais-section-label {
    font-size: 17px; font-weight: 700;
    color: #1a5c1a; letter-spacing: -0.2px;
}
body.dark .animais-section-label { color: #66bb6a; }
.animais-section-line {
    flex: 1; height: 2px;
    background: #e8f5e9; border-radius: 2px;
}
body.dark .animais-section-line { background: #1f3d1f; }

/* Grid */
.animais-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 18px;
}

/* Card */
.animais-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 2px 8px rgba(15,43,15,.06), 0 8px 24px rgba(15,43,15,.06);
    overflow: hidden;
    display: flex; flex-direction: column;
    border: 1px solid #dce8dc;
    transition: transform .25s cubic-bezier(.22,.68,0,1.2), box-shadow .25s ease;
}
.animais-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(15,43,15,.12), 0 20px 48px rgba(15,43,15,.10);
}
body.dark .animais-card { background: #1a2e1a; border-color: #2e5c2e; }

/* Card photo */
.animais-card-photo {
    position: relative; height: 200px;
    overflow: hidden; background: #c8d8c8;
}
.animais-card-photo img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s ease;
    border-radius: 0;
}
.animais-card:hover .animais-card-photo img { transform: scale(1.06); }
.animais-card-photo::after {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(8,22,8,.82) 100%);
    pointer-events: none;
}
.animais-card-photo-title {
    position: absolute; bottom: 0; left: 0; right: 0;
    padding: 24px 16px 12px; z-index: 1;
}
.animais-card-photo-title h3 {
    font-size: 17px; font-weight: 700;
    color: #fff; line-height: 1.25;
    text-shadow: 0 1px 6px rgba(0,0,0,.4);
    margin: 0;
}

/* Card body */
.animais-card-body {
    padding: 16px 16px 18px;
    flex: 1; display: flex; flex-direction: column; gap: 12px;
}
.animais-card-desc {
    font-size: 13.5px; color: #4a5e52; line-height: 1.65;
    padding-left: 10px;
    border-left: 3px solid #66bb6a;
    margin: 0;
}
body.dark .animais-card-desc { color: #a5c9a8; }

/* Info blocks */
.animais-info-block {
    border-radius: 10px;
    padding: 11px 13px;
    display: flex; flex-direction: column; gap: 5px;
}
.animais-info-block p { font-size: 13px; line-height: 1.6; margin: 0; padding-left: 20px; }
.animais-feed { background: #fff8f2; border: 1px solid #ffe5cc; }
.animais-health { background: #fff5f5; border: 1px solid #ffdede; }
body.dark .animais-feed { background: #2a1e10; border-color: #4a3010; }
body.dark .animais-health { background: #2a1010; border-color: #4a2020; }

.animais-info-block-head {
    display: flex; align-items: center; gap: 6px;
}
.animais-info-block-icon { font-size: 14px; flex-shrink: 0; }
.animais-info-block-label {
    font-size: 10.5px; font-weight: 800;
    letter-spacing: 1px; text-transform: uppercase;
}
.animais-feed .animais-info-block-label { color: #e65100; }
.animais-health .animais-info-block-label { color: #b71c1c; }

/* Mobile */
@media (max-width: 600px) {
    .animais-wrap { padding: 0 12px 80px; }
    .animais-hero { padding: 32px 0 24px; gap: 12px; }
    .animais-hero-badge { width: 44px; height: 44px; font-size: 20px; border-radius: 12px; }
    .animais-hero-title { font-size: 22px; }
    .animais-grid { grid-template-columns: 1fr; gap: 14px; }
    .animais-card-photo { height: 175px; }
    .animais-section { margin-bottom: 40px; }
}

@media (prefers-reduced-motion: reduce) {
    .animais-card, .animais-card-photo img { transition: none !important; }
}

/* ============================================================
   SEÇÃO ABAG — estilos isolados (prefixo abag-)
   ============================================================ */
#abag { padding: 0; }

.abag-wrap {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 20px 96px;
}

/* Hero */
.abag-hero {
    padding: 44px 0 32px;
    display: flex;
    align-items: flex-start;
    gap: 16px;
}
.abag-hero-badge {
    flex-shrink: 0;
    width: 52px; height: 52px;
    background: #003c82;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 14px rgba(0,60,130,.35);
    margin-top: 3px;
}
.abag-eyebrow {
    font-size: 11px; font-weight: 700;
    letter-spacing: 1.5px; text-transform: uppercase;
    color: #003c82; margin-bottom: 4px;
}
.abag-title {
    font-size: clamp(26px, 6vw, 38px);
    font-weight: 800; color: #001f4d;
    line-height: 1.15; letter-spacing: -0.5px;
    margin: 0 0 8px;
}
.abag-subtitle {
    font-size: 14.5px; color: #4a5e72;
    max-width: 520px; line-height: 1.7; margin: 0;
}
body.dark .abag-title { color: #c8dcf8; }
body.dark .abag-subtitle { color: #8aaac8; }
body.dark .abag-eyebrow { color: #6699cc; }

/* Divider */
.abag-divider {
    height: 1px;
    background: linear-gradient(90deg, #003c82 0%, transparent 100%);
    margin-bottom: 36px;
    opacity: .3;
}

/* Card principal */
.abag-card-main {
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 4px 16px rgba(0,40,100,.08), 0 12px 40px rgba(0,40,100,.06);
    border: 1px solid #d0dff0;
    overflow: hidden;
    margin-bottom: 28px;
}
body.dark .abag-card-main { background: #0d1a2e; border-color: #1a3055; }

.abag-img-wrap {
    position: relative;
    height: 240px;
    background: #c5d8ee;
    overflow: hidden;
}
.abag-img-wrap img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}
.abag-card-main:hover .abag-img-wrap img { transform: scale(1.04); }
.abag-img-badge {
    position: absolute;
    bottom: 12px; left: 14px;
    background: #003c82;
    color: #fff;
    font-size: 12px; font-weight: 700;
    letter-spacing: 0.8px; text-transform: uppercase;
    padding: 5px 12px;
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,.3);
}

.abag-card-body {
    padding: 22px 22px 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.abag-card-title {
    font-size: 19px; font-weight: 700;
    color: #001f4d; margin: 0;
}
body.dark .abag-card-title { color: #c8dcf8; }
.abag-card-desc {
    font-size: 14px; color: #4a5e72;
    line-height: 1.7; margin: 0;
    padding-left: 12px;
    border-left: 3px solid #003c82;
}
body.dark .abag-card-desc { color: #8aaac8; }

/* Tags */
.abag-info-row {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.abag-tag {
    background: #e8f0fb;
    color: #003c82;
    font-size: 12px; font-weight: 600;
    padding: 4px 11px;
    border-radius: 20px;
    border: 1px solid #c0d0ee;
}
body.dark .abag-tag { background: #0d2040; color: #7aaae0; border-color: #1a3a60; }

/* Botão de link principal */
.abag-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #003c82;
    color: #fff !important;
    font-size: 14px; font-weight: 700;
    padding: 13px 22px;
    border-radius: 12px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: background .2s, transform .15s;
    width: fit-content;
    min-height: 44px;
}
.abag-btn:hover { background: #002a5c; transform: translateY(-2px); }

/* Grid info */
.abag-grid-info {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 32px;
}
.abag-info-card {
    background: #fff;
    border-radius: 14px;
    padding: 18px 16px;
    border: 1px solid #d0dff0;
    box-shadow: 0 2px 8px rgba(0,40,100,.05);
    display: flex; flex-direction: column; gap: 6px;
}
body.dark .abag-info-card { background: #0d1a2e; border-color: #1a3055; }
.abag-info-icon { font-size: 26px; line-height: 1; }
.abag-info-card h4 {
    font-size: 15px; font-weight: 700;
    color: #001f4d; margin: 0;
}
body.dark .abag-info-card h4 { color: #c8dcf8; }
.abag-info-card p {
    font-size: 13px; color: #4a5e72;
    line-height: 1.6; margin: 0;
}
body.dark .abag-info-card p { color: #8aaac8; }

/* CTA */
.abag-cta-wrap {
    background: linear-gradient(135deg, #003c82 0%, #00529c 100%);
    border-radius: 16px;
    padding: 28px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
}
.abag-cta-text {
    font-size: 14px; color: rgba(255,255,255,.9);
    font-weight: 500; margin: 0;
    flex: 1; min-width: 200px;
}
.abag-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #003c82 !important;
    font-size: 14px; font-weight: 800;
    padding: 13px 20px;
    border-radius: 12px;
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px;
    transition: transform .15s, box-shadow .15s;
    box-shadow: 0 4px 12px rgba(0,0,0,.2);
}
.abag-cta-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,0,0,.25); }

/* Mobile */
@media (max-width: 600px) {
    .abag-wrap { padding: 0 12px 80px; }
    .abag-hero { padding: 28px 0 20px; }
    .abag-hero-badge { width: 44px; height: 44px; font-size: 20px; }
    .abag-title { font-size: 24px; }
    .abag-img-wrap { height: 195px; }
    .abag-card-body { padding: 16px; gap: 12px; }
    .abag-grid-info { grid-template-columns: 1fr; }
    .abag-cta-wrap { flex-direction: column; text-align: center; }
    .abag-cta-btn { width: 100%; justify-content: center; }
    .abag-btn { width: 100%; justify-content: center; }
}

/* Banner Seja um Parceiro — ABAG */
.abag-parceiro-wrap {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8ff 100%);
    border: 1px solid #c0d8c0;
    border-left: 5px solid #003c82;
    border-radius: 16px;
    padding: 22px 22px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}
body.dark .abag-parceiro-wrap {
    background: linear-gradient(135deg, #0d1f10 0%, #0d1a2e 100%);
    border-color: #1a3a1a;
    border-left-color: #4a90d9;
}
.abag-parceiro-left {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 1;
    min-width: 200px;
}
.abag-parceiro-icon {
    font-size: 32px;
    flex-shrink: 0;
}
.abag-parceiro-title {
    font-size: 17px;
    font-weight: 800;
    color: #001f4d;
    margin: 0 0 4px;
    line-height: 1.2;
}
body.dark .abag-parceiro-title { color: #c8dcf8; }
.abag-parceiro-sub {
    font-size: 13px;
    color: #4a6060;
    margin: 0;
    line-height: 1.5;
}
body.dark .abag-parceiro-sub { color: #8aaac8; }
.abag-parceiro-btn {
    display: inline-flex;
    align-items: center;
    background: #003c82;
    color: #fff !important;
    font-size: 13.5px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 12px;
    text-decoration: none;
    white-space: nowrap;
    min-height: 44px;
    transition: background .2s, transform .15s;
    box-shadow: 0 3px 10px rgba(0,60,130,.3);
}
.abag-parceiro-btn:hover { background: #002a5c; transform: translateY(-2px); }

@media (max-width: 600px) {
    .abag-parceiro-wrap { flex-direction: column; align-items: flex-start; }
    .abag-parceiro-btn { width: 100%; justify-content: center; }
}
