* {
    box-sizing: border-box;
}

:root {
    --verde-escuro: #052e16;
    --verde: #166534;
    --verde-claro: #22c55e;
    --verde-soft: #dcfce7;
    --texto: #0f172a;
    --muted: #64748b;
    --borda: #e2e8f0;
    --fundo: #f1f5f9;
    --branco: #ffffff;
    --sombra: 0 18px 48px rgba(15, 23, 42, 0.08);
}

body {
    margin: 0;
    font-family: "Segoe UI", Arial, sans-serif;
}

/* LOGIN */

.login-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 15% 20%, rgba(34, 197, 94, 0.22), transparent 28%),
        radial-gradient(circle at 90% 15%, rgba(250, 204, 21, 0.16), transparent 24%),
        linear-gradient(135deg, #052e16 0%, #14532d 48%, #365314 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 255, 255, 0.97);
    border: 1px solid rgba(220, 252, 231, 0.85);
    border-radius: 28px;
    padding: 32px;
    box-shadow: 0 28px 80px rgba(0, 0, 0, 0.30);
}

.login-logo {
    width: 68px;
    height: 68px;
    border-radius: 23px;
    background: linear-gradient(135deg, #14532d, #22c55e);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 35px;
    margin: 0 auto 16px;
    box-shadow: 0 18px 36px rgba(34, 197, 94, 0.28);
}

.login-card h1 {
    margin: 0;
    text-align: center;
    color: #052e16;
    font-size: 27px;
    font-weight: 950;
}

.login-card p {
    margin: 8px 0 22px;
    text-align: center;
    color: #64748b;
    font-weight: 750;
}

.login-card form {
    display: grid;
    gap: 10px;
}

.login-card label {
    color: #334155;
    font-size: 13px;
    font-weight: 950;
}

.login-card input {
    width: 100%;
    height: 50px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    padding: 0 14px;
    color: #0f172a;
    font-size: 15px;
    font-weight: 800;
    outline: none;
}

.login-card input:focus {
    border-color: #22c55e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.login-card button {
    height: 52px;
    margin-top: 8px;
    border: none;
    border-radius: 16px;
    background: linear-gradient(135deg, #166534, #22c55e);
    color: #ffffff;
    font-size: 15px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.24);
}

.login-info {
    margin-top: 18px;
    padding: 13px;
    border-radius: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    text-align: center;
    font-size: 13px;
    font-weight: 800;
}

.alerta {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 14px;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

.alerta.erro {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

/* APP */

.app-body {
    min-height: 100vh;
    background:
        radial-gradient(circle at 82% 6%, rgba(34, 197, 94, 0.10), transparent 26%),
        radial-gradient(circle at 25% 95%, rgba(250, 204, 21, 0.10), transparent 30%),
        var(--fundo);
    color: var(--texto);
    display: grid;
    grid-template-columns: 292px minmax(0, 1fr);
}

.sidebar-agro {
    min-height: 100vh;
    padding: 22px;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.24), transparent 34%),
        linear-gradient(180deg, #052e16 0%, #14532d 58%, #064e3b 100%);
    color: #ffffff;
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
}

.sidebar-marca {
    display: grid;
    grid-template-columns: 56px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    margin-bottom: 26px;
}

.sidebar-logo {
    width: 56px;
    height: 56px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.22);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    box-shadow: 0 16px 34px rgba(0, 0, 0, 0.20);
}

.sidebar-marca strong {
    display: block;
    font-size: 17px;
    font-weight: 950;
    line-height: 1.15;
}

.sidebar-marca span {
    display: block;
    margin-top: 4px;
    color: #bbf7d0;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.3;
}

.sidebar-menu {
    display: grid;
    gap: 8px;
}

.sidebar-menu a {
    min-height: 48px;
    padding: 0 14px;
    border-radius: 16px;
    color: #dcfce7;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 14px;
    font-weight: 900;
    transition:
        background 0.16s ease,
        color 0.16s ease,
        transform 0.16s ease;
}

.sidebar-menu a span {
    width: 28px;
    height: 28px;
    border-radius: 11px;
    background: rgba(255, 255, 255, 0.11);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sidebar-menu a.ativo,
.sidebar-menu a:hover {
    background: rgba(255, 255, 255, 0.16);
    color: #ffffff;
    transform: translateX(2px);
}

.sidebar-rodape {
    margin-top: auto;
    display: grid;
    gap: 12px;
}

.sidebar-status {
    min-height: 42px;
    padding: 0 13px;
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.11);
    border: 1px solid rgba(255, 255, 255, 0.13);
    display: flex;
    align-items: center;
    gap: 9px;
    color: #dcfce7;
    font-size: 12px;
    font-weight: 900;
}

.status-bolinha {
    width: 9px;
    height: 9px;
    border-radius: 999px;
    background: #22c55e;
    box-shadow: 0 0 0 6px rgba(34, 197, 94, 0.14);
}

.btn-sair {
    min-height: 44px;
    border-radius: 15px;
    background: rgba(127, 29, 29, 0.22);
    border: 1px solid rgba(254, 202, 202, 0.20);
    color: #fee2e2;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 950;
}

.app-main {
    min-width: 0;
    padding: 26px;
}

.topbar-agro {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.12), transparent 34%),
        #ffffff;
    border: 1px solid var(--borda);
    border-radius: 26px;
    padding: 22px;
    box-shadow: var(--sombra);
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 22px;
}

.topbar-etiqueta {
    display: inline-flex;
    min-height: 28px;
    padding: 0 11px;
    border-radius: 999px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 12px;
    font-weight: 950;
    align-items: center;
    margin-bottom: 9px;
}

.topbar-agro h1 {
    margin: 0;
    color: #0f172a;
    font-size: 31px;
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.035em;
}

.topbar-agro p {
    margin: 7px 0 0;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

.usuario-box {
    min-width: 180px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 10px 13px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.usuario-box span {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: #dcfce7;
    color: #166534;
    display: flex;
    align-items: center;
    justify-content: center;
}

.usuario-box strong {
    display: block;
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
}

.usuario-box small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
    text-transform: capitalize;
}

.hero-agro {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    gap: 18px;
    margin-bottom: 22px;
    padding: 24px;
    border-radius: 28px;
    background:
        radial-gradient(circle at 88% 18%, rgba(250, 204, 21, 0.18), transparent 28%),
        linear-gradient(135deg, #052e16 0%, #14532d 52%, #166534 100%);
    color: #ffffff;
    box-shadow: 0 22px 54px rgba(20, 83, 45, 0.22);
    overflow: hidden;
    position: relative;
}

.hero-agro::after {
    content: "🌾";
    position: absolute;
    right: 26px;
    bottom: -20px;
    font-size: 150px;
    line-height: 1;
    opacity: 0.08;
    transform: rotate(-8deg);
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.20);
    color: #dcfce7;
    align-items: center;
    font-size: 12px;
    font-weight: 950;
    margin-bottom: 14px;
}

.hero-agro h2 {
    margin: 0;
    max-width: 720px;
    font-size: 32px;
    line-height: 1.08;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.hero-agro p {
    margin: 13px 0 0;
    max-width: 760px;
    color: #dcfce7;
    line-height: 1.55;
    font-size: 15px;
    font-weight: 760;
}

.hero-resumo {
    position: relative;
    z-index: 1;
    align-self: stretch;
    border-radius: 22px;
    padding: 18px;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.18);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.hero-resumo span {
    color: #bbf7d0;
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.hero-resumo strong {
    display: block;
    margin-top: 7px;
    font-size: 22px;
    font-weight: 950;
}

.hero-resumo small {
    display: block;
    margin-top: 7px;
    color: #dcfce7;
    font-size: 12px;
    font-weight: 800;
}

.cards-resumo {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 22px;
}

.card-resumo {
    background: #ffffff;
    border: 1px solid var(--borda);
    border-radius: 24px;
    padding: 18px;
    box-shadow: var(--sombra);
    position: relative;
    overflow: hidden;
}

.card-resumo::before {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 6px;
    background: #22c55e;
}

.card-resumo.azul::before {
    background: #2563eb;
}

.card-resumo.verde::before {
    background: #16a34a;
}

.card-resumo.laranja::before {
    background: #f97316;
}

.card-resumo.roxo::before {
    background: #7c3aed;
}

.card-resumo.escuro::before {
    background: #0f172a;
}

.card-icone {
    width: 42px;
    height: 42px;
    border-radius: 15px;
    background: #f0fdf4;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 13px;
    font-size: 21px;
}

.card-resumo span {
    display: block;
    color: var(--muted);
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.card-resumo strong {
    display: block;
    margin-top: 7px;
    color: #0f172a;
    font-size: 29px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.card-resumo small {
    display: block;
    margin-top: 8px;
    color: #94a3b8;
    font-size: 12px;
    font-weight: 800;
}

.grid-importar {
    display: grid;
    grid-template-columns: minmax(320px, 440px) minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.nota-importacao {
    margin-top: 16px;
    padding: 13px 14px;
    border-radius: 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.45;
}

.resultado-importacao {
    margin-top: 18px;
}

@media (max-width: 900px) {
    .grid-importar {
        grid-template-columns: 1fr;
    }
}

.grid-inferior {
    display: grid;
    grid-template-columns: minmax(0, 1.35fr) minmax(320px, 0.65fr);
    gap: 16px;
}

.painel-bloco {
    background: #ffffff;
    border: 1px solid var(--borda);
    border-radius: 26px;
    padding: 22px;
    box-shadow: var(--sombra);
}

.painel-bloco.destaque {
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.10), transparent 30%),
        #ffffff;
}

.bloco-topo {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 18px;
}

.bloco-etiqueta {
    display: block;
    color: #16a34a;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
    margin-bottom: 5px;
}

.bloco-topo h3 {
    margin: 0;
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
}

.badge-verde {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 950;
}

.lista-passos {
    display: grid;
    gap: 11px;
}

.lista-passos div {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    column-gap: 12px;
    align-items: center;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.lista-passos div span {
    grid-row: span 2;
    width: 38px;
    height: 38px;
    border-radius: 14px;
    background: linear-gradient(135deg, #166534, #22c55e);
    color: #ffffff;
    font-weight: 950;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lista-passos strong {
    display: block;
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
}

.lista-passos small {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
}

.calculos-lista {
    display: grid;
    gap: 10px;
}

.calculos-lista div {
    min-height: 44px;
    padding: 0 14px;
    border-radius: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #14532d;
    display: flex;
    align-items: center;
    font-weight: 900;
    font-size: 14px;
}

@media (max-width: 1100px) {
    .cards-resumo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .grid-inferior,
    .hero-agro {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 860px) {
    .app-body {
        grid-template-columns: 1fr;
    }

    .sidebar-agro {
        position: relative;
        min-height: auto;
    }

    .sidebar-menu {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .topbar-agro {
        flex-direction: column;
        align-items: flex-start;
    }

    .topbar-direita,
    .usuario-box {
        width: 100%;
    }
}

@media (max-width: 560px) {
    .app-main {
        padding: 14px;
    }

    .sidebar-agro {
        padding: 16px;
    }

    .sidebar-menu {
        grid-template-columns: 1fr;
    }

    .cards-resumo {
        grid-template-columns: 1fr;
    }

    .hero-agro {
        padding: 20px;
        border-radius: 24px;
    }

    .hero-agro h2 {
        font-size: 26px;
    }

    .topbar-agro h1 {
        font-size: 26px;
    }
}

/* SAFRAS */

.cards-resumo-simples {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mensagens-area {
    margin-bottom: 18px;
}

.alerta.ok {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.grid-cadastro-lista {
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.form-agro {
    display: grid;
    gap: 14px;
}

.campo-form {
    display: grid;
    gap: 7px;
}

.campo-form label {
    color: #334155;
    font-size: 13px;
    font-weight: 950;
}

.campo-form input,
.campo-form select,
.campo-form textarea {
    width: 100%;
    min-height: 48px;
    border-radius: 15px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    padding: 0 14px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    outline: none;
}

.campo-form textarea {
    min-height: 100px;
    padding-top: 12px;
    resize: vertical;
}

.campo-form input:focus,
.campo-form select:focus,
.campo-form textarea:focus {
    border-color: #22c55e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.form-duas-colunas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-principal {
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #166534, #22c55e);
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.22);
}

.btn-secundario {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 950;
}

.tabela-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
}

.tabela-agro {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    min-width: 820px;
}

.tabela-agro thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 13px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    white-space: nowrap;
}

.tabela-agro tbody td {
    padding: 13px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    vertical-align: middle;
    text-align: center;
}

.tabela-agro thead th:first-child,
.tabela-agro tbody td:first-child {
    width: 185px;
    text-align: left;
}

.tabela-parcelas thead th:first-child,
.tabela-parcelas tbody td:first-child {
    width: 150px;
    text-align: left;
}

.tabela-parcelas thead th:nth-child(2),
.tabela-parcelas tbody td:nth-child(2) {
    width: 165px;
    text-align: center;
}

.tabela-parcelas thead th:nth-child(3),
.tabela-parcelas tbody td:nth-child(3) {
    width: 135px;
    text-align: center;
}

.tabela-parcelas thead th:nth-child(4),
.tabela-parcelas tbody td:nth-child(4) {
    width: 115px;
    text-align: center;
}

.tabela-parcelas thead th:nth-child(5),
.tabela-parcelas tbody td:nth-child(5) {
    width: 110px;
    text-align: center;
}

.tabela-parcelas thead th:nth-child(6),
.tabela-parcelas tbody td:nth-child(6) {
    width: 110px;
    text-align: center;
}

.tabela-parcelas thead th:nth-child(7),
.tabela-parcelas tbody td:nth-child(7) {
    width: 145px;
    text-align: center;
}

.tabela-parcelas thead th:nth-child(8),
.tabela-parcelas tbody td:nth-child(8) {
    width: 210px;
    text-align: center;
}

.tabela-colheitas thead th:first-child,
.tabela-colheitas tbody td:first-child {
    width: 155px;
    text-align: left;
}

.tabela-colheitas thead th:nth-child(2),
.tabela-colheitas tbody td:nth-child(2) {
    width: 160px;
    text-align: center;
}

.tabela-colheitas thead th:nth-child(3),
.tabela-colheitas tbody td:nth-child(3) {
    width: 115px;
    text-align: center;
}

.tabela-colheitas thead th:nth-child(4),
.tabela-colheitas tbody td:nth-child(4) {
    width: 115px;
    text-align: center;
}

.tabela-colheitas thead th:nth-child(5),
.tabela-colheitas tbody td:nth-child(5) {
    width: 120px;
    text-align: center;
}

.tabela-colheitas thead th:nth-child(6),
.tabela-colheitas tbody td:nth-child(6) {
    width: 105px;
    text-align: center;
}

.tabela-colheitas thead th:nth-child(7),
.tabela-colheitas tbody td:nth-child(7) {
    width: 145px;
    text-align: center;
}

.tabela-colheitas thead th:nth-child(8),
.tabela-colheitas tbody td:nth-child(8) {
    width: 210px;
    text-align: center;
}

.btn-ver-obs {
    min-height: 32px;
    padding: 0 11px;
    border: 0;
    border-radius: 999px;
    background: #0f766e;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 950;
    cursor: pointer;
    white-space: nowrap;
}

.btn-ver-obs:hover {
    filter: brightness(1.05);
}

.modal-obs-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.58);
    backdrop-filter: blur(5px);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 18px;
}

.modal-obs-overlay.ativo {
    display: flex;
}

.modal-obs-card {
    width: 100%;
    max-width: 560px;
    background: #ffffff;
    border-radius: 24px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 28px 90px rgba(15, 23, 42, 0.35);
    overflow: hidden;
}

.modal-obs-topo {
    padding: 18px 20px;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.16), transparent 34%),
        #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
}

.modal-obs-topo span {
    display: block;
    color: #16a34a;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.modal-obs-topo strong {
    display: block;
    margin-top: 4px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
}

.modal-obs-topo button {
    width: 36px;
    height: 36px;
    border: 0;
    border-radius: 999px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 24px;
    font-weight: 900;
    line-height: 1;
    cursor: pointer;
}

.modal-obs-conteudo {
    padding: 20px;
    color: #334155;
    font-size: 15px;
    font-weight: 750;
    line-height: 1.55;
    white-space: pre-wrap;
    max-height: 55vh;
    overflow-y: auto;
}

.filtro-painel-geral {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 16px;
    align-items: end;
}

.form-filtro-painel {
    margin: 0;
}

.painel-filtro-info {
    min-height: 74px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 34%),
        #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.painel-filtro-info span {
    color: #16a34a;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.painel-filtro-info strong {
    margin-top: 4px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
}

.painel-filtro-info small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

@media (max-width: 900px) {
    .filtro-painel-geral {
        grid-template-columns: 1fr;
    }
}

.bloco-filtro-resumo {
    margin-bottom: 18px;
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 16px;
    align-items: end;
}

.form-filtro-resumo {
    margin: 0;
}

.resumo-safra-titulo {
    min-height: 74px;
    border-radius: 20px;
    background:
        radial-gradient(circle at top right, rgba(34, 197, 94, 0.14), transparent 34%),
        #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.resumo-safra-titulo span {
    color: #16a34a;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .05em;
}

.resumo-safra-titulo strong {
    margin-top: 4px;
    color: #0f172a;
    font-size: 20px;
    font-weight: 950;
}

.resumo-safra-titulo small {
    margin-top: 3px;
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.grid-relatorios {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.texto-relatorio {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 14px;
    font-weight: 800;
    line-height: 1.55;
}

.btn-relatorio-excel,
.btn-relatorio-pdf {
    min-height: 42px;
    padding: 0 15px;
    border-radius: 999px;
    border: 0;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
}

.btn-relatorio-excel {
    background: linear-gradient(135deg, #166534, #22c55e);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(34, 197, 94, 0.20);
}

.btn-relatorio-pdf {
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    color: #ffffff;
    box-shadow: 0 12px 26px rgba(220, 38, 38, 0.18);
}

.btn-relatorio-excel.bloqueado,
.btn-relatorio-pdf:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

@media (max-width: 900px) {
    .grid-relatorios {
        grid-template-columns: 1fr;
    }
}

.btn-exportar-pdf {
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.18);
}

.btn-exportar-resumo {
    width: fit-content;
    margin-top: 10px;
    min-height: 36px;
    padding: 0 13px;
    border-radius: 999px;
    background: linear-gradient(135deg, #166534, #22c55e);
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 950;
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.18);
}

.btn-exportar-resumo:hover {
    filter: brightness(1.04);
}

.cards-resumo-resumo {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tabela-resumo thead th:first-child,
.tabela-resumo tbody td:first-child {
    width: 145px;
    text-align: left;
}

.tabela-resumo thead th:nth-child(2),
.tabela-resumo tbody td:nth-child(2) {
    width: 130px;
    text-align: center;
}

.tabela-resumo thead th:nth-child(3),
.tabela-resumo tbody td:nth-child(3) {
    width: 115px;
    text-align: center;
}

.tabela-resumo thead th:nth-child(4),
.tabela-resumo tbody td:nth-child(4),
.tabela-resumo thead th:nth-child(5),
.tabela-resumo tbody td:nth-child(5),
.tabela-resumo thead th:nth-child(6),
.tabela-resumo tbody td:nth-child(6) {
    width: 115px;
    text-align: center;
}

.tabela-resumo thead th:nth-child(7),
.tabela-resumo tbody td:nth-child(7),
.tabela-resumo thead th:nth-child(8),
.tabela-resumo tbody td:nth-child(8) {
    width: 130px;
    text-align: center;
}

.tabela-resumo thead th:nth-child(9),
.tabela-resumo tbody td:nth-child(9) {
    width: 120px;
    text-align: center;
}

.badge-resumo-status {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.badge-resumo-status.colhida {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.badge-resumo-status.parcial {
    background: #fef3c7;
    border: 1px solid #fde68a;
    color: #92400e;
}

.badge-resumo-status.pendente {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

@media (max-width: 900px) {
    .bloco-filtro-resumo {
        grid-template-columns: 1fr;
    }

    .cards-resumo-resumo {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .cards-resumo-resumo {
        grid-template-columns: 1fr;
    }
}

.status-ponto {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    display: inline-block;
    flex: 0 0 auto;
}

.status-ponto.verde {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.status-ponto.amarelo {
    background: #f59e0b;
    box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.14);
}

.status-ponto.vermelho {
    background: #ef4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.14);
}

.btn-colhido-detalhe {
    min-height: 30px;
    padding: 0 11px;
    border: 0;
    border-radius: 999px;
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    cursor: pointer;
    white-space: nowrap;
}

.btn-colhido-detalhe:hover {
    background: #bbf7d0;
    transform: translateY(-1px);
}

.detalhe-colheita-hidden {
    display: none;
}

.texto-tabela-secundario {
    display: block;
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 850;
}

.aviso-card {
    padding: 16px;
    border-radius: 18px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
}

.aviso-card strong {
    display: block;
    font-size: 15px;
    font-weight: 950;
}

.aviso-card span {
    display: block;
    margin-top: 5px;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.tabela-agro thead th:nth-child(2),
.tabela-agro tbody td:nth-child(2) {
    width: 130px;
    text-align: center;
}

.tabela-agro thead th:nth-child(3),
.tabela-agro tbody td:nth-child(3) {
    width: 130px;
    text-align: center;
}

.tabela-agro thead th:nth-child(4),
.tabela-agro tbody td:nth-child(4) {
    width: 105px;
    text-align: center;
}

.tabela-agro thead th:nth-child(5),
.tabela-agro tbody td:nth-child(5) {
    width: 120px;
    text-align: center;
}

.tabela-agro thead th:nth-child(6),
.tabela-agro tbody td:nth-child(6) {
    width: 115px;
    text-align: center;
}

.tabela-agro thead th:nth-child(7),
.tabela-agro tbody td:nth-child(7) {
    width: 210px;
    text-align: center;
}

.tabela-agro tbody tr:hover td {
    background: #f8fafc;
}

.tabela-agro tbody tr:last-child td {
    border-bottom: 0;
}

.tabela-agro td strong {
    color: #0f172a;
    font-weight: 950;
}

.linha-inativa td {
    opacity: 0.62;
}

.badge-status {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.badge-status.ativo {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.badge-status.inativo {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #64748b;
}

.acoes-tabela {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: wrap;
}

.acoes-tabela form {
    margin: 0;
}

.btn-tabela {
    min-height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 950;
    cursor: pointer;
    white-space: nowrap;
}

.btn-tabela.editar {
    background: #2563eb;
}

.btn-tabela.desativar {
    background: #f97316;
}

.btn-tabela.ativar {
    background: #16a34a;
}

.btn-tabela.excluir {
    background: #dc2626;
}

.vazio-card {
    min-height: 260px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 24px;
}

.vazio-card div {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 14px;
}

.vazio-card strong {
    display: block;
    color: #0f172a;
    font-size: 17px;
    font-weight: 950;
}

.vazio-card span {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1050px) {
    .grid-cadastro-lista {
        grid-template-columns: 1fr;
    }

    .cards-resumo-simples {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .form-duas-colunas {
        grid-template-columns: 1fr;
    }
}

/* SAFRAS */

.cards-resumo-simples {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.mensagens-area {
    margin-bottom: 18px;
}

.alerta.ok {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.grid-cadastro-lista {
    display: grid;
    grid-template-columns: 390px minmax(0, 1fr);
    gap: 16px;
    align-items: start;
}

.form-agro {
    display: grid;
    gap: 14px;
}

.campo-form {
    display: grid;
    gap: 7px;
}

.campo-form label {
    color: #334155;
    font-size: 13px;
    font-weight: 950;
}

.campo-form input,
.campo-form select,
.campo-form textarea {
    width: 100%;
    min-height: 48px;
    border-radius: 15px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    padding: 0 14px;
    color: #0f172a;
    font-size: 14px;
    font-weight: 800;
    outline: none;
}

.campo-form textarea {
    min-height: 100px;
    padding-top: 12px;
    resize: vertical;
}

.campo-form input:focus,
.campo-form select:focus,
.campo-form textarea:focus {
    border-color: #22c55e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.form-duas-colunas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.btn-principal {
    min-height: 50px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #166534, #22c55e);
    color: #ffffff;
    font-size: 14px;
    font-weight: 950;
    cursor: pointer;
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.22);
}

.btn-secundario {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 12px;
    font-weight: 950;
}

.tabela-wrapper {
    width: 100%;
    overflow-x: auto;
    border-radius: 18px;
    border: 1px solid #e2e8f0;
}

.tabela-agro {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    min-width: 820px;
    table-layout: fixed;
}

.tabela-agro thead th {
    background: #f8fafc;
    color: #334155;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: .04em;
    padding: 13px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    white-space: nowrap;
}

.tabela-agro tbody td {
    padding: 13px 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    font-size: 13px;
    font-weight: 800;
    vertical-align: middle;
    text-align: center;
}

.tabela-agro tbody tr:hover td {
    background: #f8fafc;
}

.tabela-agro tbody tr:last-child td {
    border-bottom: 0;
}

.tabela-agro td strong {
    color: #0f172a;
    font-weight: 950;
}

.linha-inativa td {
    opacity: 0.62;
}

.badge-status {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.badge-status.ativo {
    background: #dcfce7;
    border: 1px solid #86efac;
    color: #166534;
}

.badge-status.inativo {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #64748b;
}

.acoes-tabela {
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.acoes-tabela form {
    margin: 0;
}

.btn-tabela {
    min-height: 32px;
    padding: 0 10px;
    border: 0;
    border-radius: 999px;
    color: #ffffff;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    font-size: 11px;
    font-weight: 950;
    cursor: pointer;
    white-space: nowrap;
}

.btn-tabela.editar {
    background: #2563eb;
}

.btn-tabela.desativar {
    background: #f97316;
}

.btn-tabela.ativar {
    background: #16a34a;
}

.vazio-card {
    min-height: 260px;
    border-radius: 20px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    text-align: center;
    padding: 24px;
}

.vazio-card div {
    width: 62px;
    height: 62px;
    border-radius: 22px;
    background: #dcfce7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px;
    margin-bottom: 14px;
}

.vazio-card strong {
    display: block;
    color: #0f172a;
    font-size: 17px;
    font-weight: 950;
}

.vazio-card span {
    display: block;
    margin-top: 6px;
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
}

@media (max-width: 1050px) {
    .grid-cadastro-lista {
        grid-template-columns: 1fr;
    }

    .cards-resumo-simples {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .form-duas-colunas {
        grid-template-columns: 1fr;
    }
}

.modal-obs-html {
    white-space: normal;
}

.historico-colheita-modal {
    display: grid;
    gap: 16px;
}

.historico-colheita-resumo {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.historico-colheita-resumo div {
    padding: 12px;
    border-radius: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
}

.historico-colheita-resumo span,
.historico-colheita-grid span,
.historico-colheita-obs span {
    display: block;
    margin-bottom: 4px;
    color: #64748b;
    font-size: 11px;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.historico-colheita-resumo strong {
    color: #14532d;
    font-size: 14px;
    font-weight: 950;
}

.historico-colheita-lista {
    display: grid;
    gap: 12px;
}

.historico-colheita-card {
    padding: 14px;
    border-radius: 18px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.historico-colheita-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding-bottom: 10px;
    margin-bottom: 12px;
    border-bottom: 1px solid #e2e8f0;
}

.historico-colheita-topo span {
    color: #15803d;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.historico-colheita-topo strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
}

.historico-colheita-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.historico-colheita-grid div {
    padding: 10px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
}

.historico-colheita-grid strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
}

.historico-colheita-obs {
    margin-top: 12px;
    padding: 12px;
    border-radius: 14px;
    background: #fffbeb;
    border: 1px solid #fde68a;
}

.historico-colheita-obs p {
    margin: 0;
    color: #78350f;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.45;
}

@media (max-width: 700px) {
    .historico-colheita-resumo,
    .historico-colheita-grid {
        grid-template-columns: 1fr;
    }

    .historico-colheita-topo {
        align-items: flex-start;
        flex-direction: column;
    }
}

.tabela-resumo thead th:last-child,
.tabela-resumo tbody td:last-child {
    width: 7%;
    text-align: center;
    white-space: nowrap;
}

.tabela-resumo .badge-resumo-status {
    min-height: 24px;
    padding: 0 8px;
    font-size: 10px;
    gap: 5px;
}

.tabela-resumo .status-ponto {
    width: 7px;
    height: 7px;
}

.configuracoes-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.badge-tipo-usuario {
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    white-space: nowrap;
}

.badge-tipo-usuario.administrador {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.badge-tipo-usuario.operador {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

.badge-tipo-usuario.visualizador {
    background: #dcfce7;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.tabela-usuarios thead th:first-child,
.tabela-usuarios tbody td:first-child {
    width: 26%;
    text-align: left;
}

.tabela-usuarios thead th:nth-child(2),
.tabela-usuarios tbody td:nth-child(2) {
    width: 22%;
    text-align: center;
}

.tabela-usuarios thead th:nth-child(3),
.tabela-usuarios tbody td:nth-child(3) {
    width: 16%;
    text-align: center;
}

.tabela-usuarios thead th:nth-child(4),
.tabela-usuarios tbody td:nth-child(4) {
    width: 16%;
    text-align: center;
}

.tabela-usuarios thead th:nth-child(5),
.tabela-usuarios tbody td:nth-child(5) {
    width: 20%;
    text-align: center;
}

.badge-admin-principal {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.filtros-resumo {
    padding: 18px;
}

.form-filtros-resumo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 14px;
    align-items: end;
}

.btn-aplicar-filtros {
    min-height: 48px;
    padding: 0 16px;
    border: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, #166534, #22c55e);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    cursor: pointer;
    white-space: nowrap;
    box-shadow: 0 10px 22px rgba(34, 197, 94, 0.18);
}

.resumo-filtro-status {
    min-height: 48px;
    padding: 8px 14px;
    border-radius: 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    white-space: nowrap;
}

.resumo-filtro-status span,
.resumo-filtro-status small {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.resumo-filtro-status strong {
    color: #166534;
    font-size: 18px;
    font-weight: 950;
}

.btn-limpar-filtros {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 16px;
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

.btn-limpar-filtros:hover {
    background: #fecaca;
}

.tabela-resumo-variedades thead th:first-child,
.tabela-resumo-variedades tbody td:first-child {
    width: 22%;
    text-align: left;
}

.tabela-resumo-variedades thead th:nth-child(2),
.tabela-resumo-variedades tbody td:nth-child(2) {
    width: 10%;
    text-align: center;
}

.tabela-resumo-variedades thead th:nth-child(3),
.tabela-resumo-variedades tbody td:nth-child(3),
.tabela-resumo-variedades thead th:nth-child(4),
.tabela-resumo-variedades tbody td:nth-child(4),
.tabela-resumo-variedades thead th:nth-child(5),
.tabela-resumo-variedades tbody td:nth-child(5),
.tabela-resumo-variedades thead th:nth-child(6),
.tabela-resumo-variedades tbody td:nth-child(6),
.tabela-resumo-variedades thead th:nth-child(7),
.tabela-resumo-variedades tbody td:nth-child(7) {
    width: 13.6%;
    text-align: center;
}

@media (max-width: 900px) {
    .form-filtros-resumo {
        grid-template-columns: 1fr;
    }

    .resumo-filtro-status,
    .btn-limpar-filtros {
        width: 100%;
    }
}

.resumo-tabs-card {
    margin-bottom: 18px;
    padding: 14px 14px 0;
    border-radius: 22px 22px 0 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.resumo-tabs-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.resumo-tabs-topo span {
    color: #15803d;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.resumo-tabs-topo strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
}

.resumo-tabs {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    overflow-x: auto;
}

.resumo-tab {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 16px 16px 0 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: 0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
}

.resumo-tab:hover {
    background: #ecfdf5;
    color: #166534;
}

.resumo-tab.ativo {
    min-height: 48px;
    background: linear-gradient(135deg, #166534, #22c55e);
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 -8px 22px rgba(34, 197, 94, 0.18);
}

.resumo-exportacoes-grid {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

@media (max-width: 700px) {
    .resumo-tabs-card {
        border-radius: 18px 18px 0 0;
        padding: 12px 12px 0;
    }

    .resumo-tabs-topo {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .resumo-tab {
        min-height: 38px;
        padding: 0 14px;
        font-size: 11px;
    }

    .resumo-tab.ativo {
        min-height: 43px;
    }
}

.ranking-resumo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ranking-card {
    min-height: 130px;
    padding: 18px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.ranking-card span {
    color: #15803d;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ranking-card strong {
    color: #0f172a;
    font-size: 24px;
    font-weight: 950;
    line-height: 1;
}

.ranking-card small {
    color: #475569;
    font-size: 13px;
    font-weight: 850;
}

.tabela-pendentes thead th:first-child,
.tabela-pendentes tbody td:first-child,
.tabela-mes-colheita thead th:first-child,
.tabela-mes-colheita tbody td:first-child {
    text-align: left;
}

@media (max-width: 900px) {
    .ranking-resumo-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 650px) {
    .ranking-resumo-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   RESUMO - ABAS PREMIUM
========================================================= */

.resumo-tabs-card {
    margin-bottom: 18px;
    padding: 14px 14px 0;
    border-radius: 22px 22px 0 0;
    background: #ffffff;
    border: 1px solid #dbeafe;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.resumo-tabs-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.resumo-tabs-topo span {
    color: #15803d;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.resumo-tabs-topo strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
}

.resumo-tabs {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    overflow-x: auto;
}

.resumo-tab {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 16px 16px 0 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: 0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.18s ease;
}

.resumo-tab:hover {
    background: #ecfdf5;
    color: #166534;
    transform: translateY(-1px);
}

.resumo-tab.ativo {
    min-height: 49px;
    background: linear-gradient(135deg, #14532d, #22c55e);
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 -8px 22px rgba(34, 197, 94, 0.18);
}

/* =========================================================
   VISÃO GERAL - PROGRESSO
========================================================= */

.resumo-progresso-card {
    margin-top: 16px;
}

.resumo-progresso-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 14px;
}

.resumo-progresso-topo h3 {
    margin: 2px 0 0;
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.resumo-progresso-topo strong {
    color: #166534;
    font-size: 26px;
    font-weight: 950;
}

.resumo-progresso-barra {
    height: 18px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.12);
}

.resumo-progresso-barra div {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25);
}

.resumo-progresso-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.resumo-progresso-info span {
    padding: 7px 10px;
    border-radius: 999px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}

/* =========================================================
   PENDENTES / PARCIAIS
========================================================= */

.tabela-pendentes tbody tr.linha-pendente-pendente {
    background: #fff1f2;
}

.tabela-pendentes tbody tr.linha-pendente-parcial {
    background: #fffbeb;
}

.tabela-pendentes tbody tr.linha-pendente-pendente td:nth-child(7) {
    color: #991b1b;
    font-weight: 950;
}

.tabela-pendentes tbody tr.linha-pendente-parcial td:nth-child(7) {
    color: #92400e;
    font-weight: 950;
}

.tabela-pendentes thead th:first-child,
.tabela-pendentes tbody td:first-child {
    text-align: left;
}

/* =========================================================
   POR MÊS
========================================================= */

.cards-mes-colheita {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.card-mes-colheita {
    padding: 16px;
    border-radius: 22px;
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border: 1px solid #bbf7d0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
    display: grid;
    gap: 8px;
}

.card-mes-colheita span {
    color: #15803d;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.card-mes-colheita strong {
    color: #0f172a;
    font-size: 24px;
    font-weight: 950;
}

.card-mes-colheita div {
    display: grid;
    gap: 4px;
}

.card-mes-colheita small {
    color: #475569;
    font-size: 12px;
    font-weight: 850;
}

/* =========================================================
   RANKING
========================================================= */

.ranking-resumo-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
}

.ranking-card {
    position: relative;
    min-height: 148px;
    padding: 18px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
    overflow: hidden;
}

.ranking-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 14px;
    bottom: 14px;
    width: 6px;
    border-radius: 0 999px 999px 0;
    background: #22c55e;
}

.ranking-icone {
    width: 38px;
    height: 38px;
    border-radius: 16px;
    background: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
}

.ranking-card span {
    color: #64748b;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.ranking-card strong {
    color: #0f172a;
    font-size: 24px;
    font-weight: 950;
    line-height: 1;
}

.ranking-card small {
    color: #475569;
    font-size: 13px;
    font-weight: 850;
    line-height: 1.35;
}

.ranking-card.destaque-verde::before {
    background: #22c55e;
}

.ranking-card.destaque-laranja::before {
    background: #f97316;
}

.ranking-card.destaque-azul::before {
    background: #2563eb;
}

.ranking-card.destaque-vermelho::before {
    background: #dc2626;
}

.ranking-card.destaque-roxo::before {
    background: #7c3aed;
}

.ranking-card.destaque-cinza::before {
    background: #64748b;
}

/* =========================================================
   EXPORTAÇÕES
========================================================= */

.resumo-exportacoes-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.card-exportacao {
    min-height: 150px;
    padding: 20px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
    transition: 0.18s ease;
}

.card-exportacao:hover {
    transform: translateY(-2px);
}

.card-exportacao div {
    width: 44px;
    height: 44px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
}

.card-exportacao strong {
    color: #0f172a;
    font-size: 19px;
    font-weight: 950;
}

.card-exportacao span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.4;
}

.card-exportacao.excel {
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border-color: #bbf7d0;
}

.card-exportacao.excel div {
    background: #dcfce7;
}

.card-exportacao.pdf {
    background: linear-gradient(135deg, #fef2f2, #ffffff);
    border-color: #fecaca;
}

.card-exportacao.pdf div {
    background: #fee2e2;
}

/* =========================================================
   RESPONSIVO
========================================================= */

@media (max-width: 950px) {
    .ranking-resumo-grid,
    .cards-mes-colheita {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .resumo-exportacoes-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .ranking-resumo-grid,
    .cards-mes-colheita {
        grid-template-columns: 1fr;
    }

    .resumo-tabs-card {
        border-radius: 18px 18px 0 0;
        padding: 12px 12px 0;
    }

    .resumo-tabs-topo {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .resumo-tab {
        min-height: 38px;
        padding: 0 14px;
        font-size: 11px;
    }

    .resumo-tab.ativo {
        min-height: 43px;
    }

    .resumo-progresso-topo {
        align-items: flex-start;
        flex-direction: column;
    }
}

/* =========================================================
   CONFIGURAÇÕES - ABAS
========================================================= */

.config-tabs-card {
    margin-bottom: 18px;
    padding: 14px 14px 0;
    border-radius: 22px 22px 0 0;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.08);
}

.config-tabs-topo {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.config-tabs-topo span {
    color: #15803d;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.config-tabs-topo strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
}

.config-tabs {
    display: flex;
    align-items: flex-end;
    gap: 6px;
    overflow-x: auto;
}

.config-tab {
    min-height: 42px;
    padding: 0 18px;
    border-radius: 16px 16px 0 0;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-bottom: 0;
    color: #475569;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
    transition: 0.18s ease;
}

.config-tab:hover {
    background: #ecfdf5;
    color: #166534;
    transform: translateY(-1px);
}

.config-tab.ativo {
    min-height: 49px;
    background: linear-gradient(135deg, #14532d, #22c55e);
    border-color: #16a34a;
    color: #ffffff;
    box-shadow: 0 -8px 22px rgba(34, 197, 94, 0.18);
}

/* =========================================================
   CONFIGURAÇÕES - PERFIL / USUÁRIOS / LOGS
========================================================= */

.aviso-config,
.texto-ajuda-config {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #475569;
    font-size: 12px;
    font-weight: 800;
}

.badge-usuario-comum,
.badge-admin-principal,
.texto-protegido {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.badge-usuario-comum {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.badge-admin-principal {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.texto-protegido {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #64748b;
}

.tabela-config-usuarios thead th:first-child,
.tabela-config-usuarios tbody td:first-child {
    width: 26%;
    text-align: left;
}

.tabela-config-usuarios thead th:nth-child(2),
.tabela-config-usuarios tbody td:nth-child(2) {
    width: 20%;
    text-align: center;
}

.tabela-config-usuarios thead th:nth-child(3),
.tabela-config-usuarios tbody td:nth-child(3) {
    width: 16%;
    text-align: center;
}

.tabela-config-usuarios thead th:nth-child(4),
.tabela-config-usuarios tbody td:nth-child(4) {
    width: 16%;
    text-align: center;
}

.tabela-config-usuarios thead th:nth-child(5),
.tabela-config-usuarios tbody td:nth-child(5) {
    width: 22%;
    text-align: center;
}

.tabela-config-logs thead th:first-child,
.tabela-config-logs tbody td:first-child {
    width: 16%;
    text-align: center;
}

.tabela-config-logs thead th:nth-child(2),
.tabela-config-logs tbody td:nth-child(2) {
    width: 16%;
    text-align: center;
}

.tabela-config-logs thead th:nth-child(3),
.tabela-config-logs tbody td:nth-child(3) {
    width: 18%;
    text-align: center;
}

.tabela-config-logs thead th:nth-child(4),
.tabela-config-logs tbody td:nth-child(4) {
    width: 34%;
    text-align: left;
}

.tabela-config-logs thead th:nth-child(5),
.tabela-config-logs tbody td:nth-child(5) {
    width: 16%;
    text-align: center;
}

@media (max-width: 650px) {
    .config-tabs-card {
        border-radius: 18px 18px 0 0;
        padding: 12px 12px 0;
    }

    .config-tabs-topo {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .config-tab {
        min-height: 38px;
        padding: 0 14px;
        font-size: 11px;
    }

    .config-tab.ativo {
        min-height: 43px;
    }
}

/* =========================================================
   CONFIGURAÇÕES - BACKUP
========================================================= */

.backup-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.card-backup-config {
    min-height: 165px;
    padding: 20px;
    border-radius: 24px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 14px 30px rgba(15, 23, 42, 0.07);
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 9px;
    text-decoration: none;
    transition: 0.18s ease;
}

.card-backup-config:hover {
    transform: translateY(-2px);
}

.card-backup-config div {
    width: 46px;
    height: 46px;
    border-radius: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 23px;
}

.card-backup-config strong {
    color: #0f172a;
    font-size: 19px;
    font-weight: 950;
}

.card-backup-config span {
    color: #64748b;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.45;
}

.card-backup-config.banco {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-color: #bfdbfe;
}

.card-backup-config.banco div {
    background: #dbeafe;
}

.card-backup-config.excel {
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border-color: #bbf7d0;
}

.card-backup-config.excel div {
    background: #dcfce7;
}

@media (max-width: 700px) {
    .backup-config-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   BACKUP - STATUS DE SEGURANÇA
========================================================= */

.backup-status-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 16px;
}

.backup-status-card {
    padding: 16px;
    border-radius: 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.06);
    display: grid;
    gap: 6px;
}

.backup-status-card span {
    color: #64748b;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.backup-status-card strong {
    color: #0f172a;
    font-size: 18px;
    font-weight: 950;
}

.backup-status-card small {
    color: #475569;
    font-size: 12px;
    font-weight: 850;
}

.backup-status-card.banco {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-color: #bfdbfe;
}

.backup-status-card.excel {
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border-color: #bbf7d0;
}

@media (max-width: 700px) {
    .backup-status-grid {
        grid-template-columns: 1fr;
    }
}

.btn-pdf-filtrado {
    min-height: 48px;
    padding: 0 16px;
    border-radius: 16px;
    background: linear-gradient(135deg, #7f1d1d, #dc2626);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
    white-space: nowrap;
    box-shadow: 0 10px 22px rgba(220, 38, 38, 0.18);
}

.btn-pdf-filtrado:hover {
    transform: translateY(-1px);
}

/* =========================================================
   PAINEL INICIAL PREMIUM
========================================================= */

.painel-filtro-safra {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.painel-safra-info {
    min-width: 220px;
    padding: 12px 14px;
    border-radius: 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    display: grid;
    gap: 2px;
}

.painel-safra-info span {
    color: #15803d;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.painel-safra-info strong {
    color: #0f172a;
    font-size: 15px;
    font-weight: 950;
}

.painel-safra-info small {
    color: #64748b;
    font-size: 12px;
    font-weight: 800;
}

.painel-hero-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: 16px;
    margin-bottom: 18px;
}

.painel-hero-card {
    min-height: 190px;
    padding: 20px;
    border-radius: 26px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 16px 34px rgba(15, 23, 42, 0.08);
}

.painel-hero-card.progresso {
    background: linear-gradient(135deg, #f0fdf4, #ffffff);
    border-color: #bbf7d0;
}

.painel-hero-card.ultima {
    background: linear-gradient(135deg, #eff6ff, #ffffff);
    border-color: #bfdbfe;
}

.painel-hero-topo {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 18px;
}

.painel-hero-topo span {
    color: #15803d;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.painel-hero-topo h3 {
    margin: 4px 0 0;
    color: #0f172a;
    font-size: 21px;
    font-weight: 950;
}

.painel-hero-topo strong {
    color: #166534;
    font-size: 34px;
    font-weight: 950;
    line-height: 1;
}

.painel-hero-icone {
    width: 50px;
    height: 50px;
    border-radius: 20px;
    background: #dbeafe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
}

.painel-progresso-barra {
    height: 20px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(15, 23, 42, 0.12);
}

.painel-progresso-barra div {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(135deg, #16a34a, #22c55e);
    box-shadow: 0 8px 20px rgba(34, 197, 94, 0.25);
}

.painel-progresso-info {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 14px;
}

.painel-progresso-info span {
    padding: 8px 10px;
    border-radius: 999px;
    background: #ffffff;
    border: 1px solid #dbeafe;
    color: #334155;
    font-size: 12px;
    font-weight: 850;
}

.ultima-colheita-dados {
    display: grid;
    gap: 8px;
}

.ultima-colheita-dados strong {
    color: #0f172a;
    font-size: 28px;
    font-weight: 950;
    line-height: 1;
}

.ultima-colheita-dados span {
    color: #1d4ed8;
    font-size: 14px;
    font-weight: 900;
}

.ultima-colheita-dados small {
    color: #475569;
    font-size: 13px;
    font-weight: 850;
}

.ultima-colheita-vazio {
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    color: #64748b;
    font-weight: 850;
}

.cards-painel-inicial {
    margin-bottom: 18px;
}

.painel-destaques-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.painel-ranking-mini {
    display: grid;
    gap: 12px;
}

.painel-ranking-item {
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: grid;
    gap: 5px;
}

.painel-ranking-item span {
    color: #15803d;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.painel-ranking-item strong {
    color: #0f172a;
    font-size: 19px;
    font-weight: 950;
}

.painel-ranking-item small {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.painel-ranking-item.alerta {
    background: #fff7ed;
    border-color: #fed7aa;
}

.painel-ranking-item.alerta span {
    color: #c2410c;
}

.btn-ver-mais-painel {
    min-height: 36px;
    padding: 0 12px;
    border-radius: 999px;
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 950;
    text-decoration: none;
}

.painel-alertas-lista {
    display: grid;
    gap: 10px;
}

.painel-alerta-item {
    padding: 12px 14px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #e2e8f0;
}

.painel-alerta-item div {
    display: grid;
    gap: 3px;
}

.painel-alerta-item strong {
    color: #0f172a;
    font-size: 14px;
    font-weight: 950;
}

.painel-alerta-item span {
    color: #64748b;
    font-size: 12px;
    font-weight: 850;
}

.painel-alerta-item small {
    min-height: 26px;
    padding: 0 9px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 950;
}

.painel-alerta-item.parcial {
    background: #fffbeb;
    border-color: #fde68a;
}

.painel-alerta-item.parcial small {
    background: #fef3c7;
    color: #92400e;
}

.painel-alerta-item.pendente {
    background: #fff1f2;
    border-color: #fecdd3;
}

.painel-alerta-item.pendente small {
    background: #fee2e2;
    color: #991b1b;
}

.painel-alerta-vazio {
    padding: 18px;
    border-radius: 18px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #166534;
    font-size: 13px;
    font-weight: 900;
    text-align: center;
}

@media (max-width: 950px) {
    .painel-hero-grid,
    .painel-destaques-grid {
        grid-template-columns: 1fr;
    }

    .painel-filtro-safra {
        align-items: stretch;
        flex-direction: column;
    }

    .painel-safra-info {
        min-width: 0;
    }
}

/* =========================================================
   DUPLICAR SAFRA
========================================================= */

.btn-tabela.duplicar {
    background: #7c3aed;
}

.duplicar-safra-alerta {
    background: linear-gradient(135deg, #f5f3ff, #ffffff);
    border-color: #ddd6fe;
}

.duplicar-safra-alerta h3 {
    margin: 4px 0 6px;
    color: #0f172a;
    font-size: 22px;
    font-weight: 950;
}

.duplicar-safra-alerta p {
    margin: 0;
    color: #475569;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.5;
}

.duplicar-safra-info {
    margin-top: 14px;
    padding: 14px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: grid;
    gap: 4px;
}

.duplicar-safra-info strong {
    color: #0f172a;
    font-size: 13px;
    font-weight: 950;
}

.duplicar-safra-info span {
    color: #475569;
    font-size: 13px;
    font-weight: 800;
}


/* =========================================================
   SAFRA FINALIZADA / ABERTA
========================================================= */

.badge-safra-status {
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
}

.badge-safra-status.aberta {
    background: #dcfce7;
    border: 1px solid #bbf7d0;
    color: #166534;
}

.badge-safra-status.finalizada {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
}

.btn-tabela.finalizar {
    background: #475569;
}

.btn-tabela.reabrir {
    background: #16a34a;
}

/* =========================================================
   TABELA SAFRAS - AJUSTE DE AÇÕES
========================================================= */

.tabela-safras {
    table-layout: fixed;
}

.tabela-safras thead th:last-child,
.tabela-safras tbody td:last-child {
    min-width: 260px;
    width: 260px;
    text-align: center;
}

.tabela-safras .acoes-tabela {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    flex-wrap: nowrap;
}

.tabela-safras .acoes-tabela form {
    margin: 0;
    display: inline-flex;
}

.tabela-safras .btn-tabela {
    min-width: 72px;
    padding-left: 10px;
    padding-right: 10px;
    white-space: nowrap;
}

.tabela-safras .btn-tabela.excluir {
    min-width: 72px;
}

/* =========================================================
   SAFRAS - CORREÇÃO FINAL DA COLUNA AÇÕES
========================================================= */

.tabela-wrapper {
    overflow-x: auto;
}

.tabela-safras {
    table-layout: fixed;
    min-width: 1180px;
}

.tabela-safras thead th:last-child,
.tabela-safras tbody td:last-child {
    width: 290px;
    min-width: 290px;
    text-align: center;
}

.tabela-safras .acoes-tabela {
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: nowrap !important;
    white-space: nowrap;
}

.tabela-safras .acoes-tabela form {
    margin: 0;
    padding: 0;
    display: inline-flex;
    flex: 0 0 auto;
}

.tabela-safras .btn-tabela {
    min-width: 64px;
    height: 32px;
    padding: 0 9px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 950;
    white-space: nowrap;
    flex: 0 0 auto;
}

.tabela-safras .btn-tabela.duplicar {
    min-width: 72px;
}

.tabela-safras .btn-tabela.finalizar {
    min-width: 74px;
}

.tabela-safras .btn-tabela.excluir {
    min-width: 66px;
}

/* =========================================================
   LOGIN PREMIUM - SISTEMA AGRO SAFRA
========================================================= */

.login-body {
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.26), transparent 34%),
        radial-gradient(circle at bottom right, rgba(20, 83, 45, 0.22), transparent 32%),
        linear-gradient(135deg, #ecfdf5 0%, #f8fafc 45%, #e2e8f0 100%);
    color: #0f172a;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.login-page {
    width: min(1120px, calc(100% - 32px));
    min-height: 100vh;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    align-items: center;
    gap: 28px;
}

.login-visual {
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-visual-card {
    width: 100%;
    min-height: 520px;
    padding: 38px;
    border-radius: 34px;
    background:
        linear-gradient(135deg, rgba(20, 83, 45, 0.96), rgba(22, 101, 52, 0.94)),
        radial-gradient(circle at top right, rgba(187, 247, 208, 0.3), transparent 34%);
    color: #ffffff;
    box-shadow: 0 28px 70px rgba(15, 23, 42, 0.22);
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.login-visual-card::before {
    content: "";
    position: absolute;
    width: 260px;
    height: 260px;
    right: -80px;
    top: -80px;
    border-radius: 999px;
    background: rgba(187, 247, 208, 0.16);
}

.login-visual-card::after {
    content: "";
    position: absolute;
    width: 180px;
    height: 180px;
    left: -60px;
    bottom: -50px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.login-logo-grande {
    width: 76px;
    height: 76px;
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 38px;
    margin-bottom: 22px;
    position: relative;
    z-index: 1;
}

.login-visual-card span {
    color: #bbf7d0;
    font-size: 12px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    position: relative;
    z-index: 1;
}

.login-visual-card h1 {
    max-width: 560px;
    margin: 10px 0 14px;
    color: #ffffff;
    font-size: 42px;
    line-height: 1.05;
    font-weight: 950;
    letter-spacing: -0.04em;
    position: relative;
    z-index: 1;
}

.login-visual-card p {
    max-width: 540px;
    margin: 0;
    color: #dcfce7;
    font-size: 15px;
    font-weight: 700;
    line-height: 1.6;
    position: relative;
    z-index: 1;
}

.login-beneficios {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 34px;
    position: relative;
    z-index: 1;
}

.login-beneficios div {
    padding: 14px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(187, 247, 208, 0.18);
    backdrop-filter: blur(10px);
}

.login-beneficios strong {
    display: block;
    margin-bottom: 5px;
    color: #ffffff;
    font-size: 13px;
    font-weight: 950;
}

.login-beneficios small {
    color: #dcfce7;
    font-size: 11px;
    font-weight: 750;
    line-height: 1.35;
}

.login-card {
    width: 100%;
    padding: 30px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    border: 1px solid rgba(226, 232, 240, 0.95);
    box-shadow: 0 24px 60px rgba(15, 23, 42, 0.16);
    backdrop-filter: blur(14px);
}

.login-card-topo {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.login-logo {
    width: 54px;
    height: 54px;
    border-radius: 20px;
    background: linear-gradient(135deg, #14532d, #22c55e);
    box-shadow: 0 12px 28px rgba(34, 197, 94, 0.25);
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 27px;
    flex: 0 0 auto;
}

.login-card-topo span {
    color: #15803d;
    font-size: 11px;
    font-weight: 950;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.login-card-topo h2 {
    margin: 2px 0 0;
    color: #0f172a;
    font-size: 30px;
    line-height: 1;
    font-weight: 950;
    letter-spacing: -0.04em;
}

.login-subtexto {
    margin: 0 0 18px;
    color: #64748b;
    font-size: 13px;
    font-weight: 750;
    line-height: 1.5;
}

.login-alertas {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.login-form {
    display: grid;
    gap: 14px;
}

.login-campo {
    display: grid;
    gap: 7px;
}

.login-campo label {
    color: #334155;
    font-size: 12px;
    font-weight: 950;
}

.login-campo input {
    width: 100%;
    min-height: 48px;
    box-sizing: border-box;
    padding: 0 14px;
    border-radius: 16px;
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    outline: none;
    font-size: 14px;
    font-weight: 800;
    transition: 0.18s ease;
}

.login-campo input:focus {
    border-color: #22c55e;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.14);
}

.login-senha-wrap {
    position: relative;
}

.login-senha-wrap input {
    padding-right: 52px;
}

.btn-ver-senha-login {
    position: absolute;
    top: 50%;
    right: 7px;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    border: 0;
    border-radius: 13px;
    background: #e2e8f0;
    color: #0f172a;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-login {
    min-height: 50px;
    margin-top: 4px;
    border: 0;
    border-radius: 17px;
    background: linear-gradient(135deg, #14532d, #22c55e);
    color: #ffffff;
    box-shadow: 0 14px 30px rgba(34, 197, 94, 0.25);
    font-size: 14px;
    font-weight: 950;
    cursor: pointer;
    transition: 0.18s ease;
}

.btn-login:hover,
.btn-instalar-login:hover {
    transform: translateY(-1px);
}

.btn-instalar-login {
    width: 100%;
    min-height: 46px;
    margin-top: 12px;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    background: #f0fdf4;
    color: #166534;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 950;
    cursor: pointer;
}

.login-rodape {
    margin-top: 18px;
    padding: 13px;
    border-radius: 18px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: grid;
    gap: 3px;
    text-align: center;
}

.login-rodape span {
    color: #0f172a;
    font-size: 12px;
    font-weight: 950;
}

.login-rodape small {
    color: #64748b;
    font-size: 11px;
    font-weight: 750;
}

@media (max-width: 950px) {
    .login-page {
        min-height: auto;
        padding: 26px 0;
        grid-template-columns: 1fr;
    }

    .login-visual-card {
        min-height: auto;
        padding: 28px;
    }

    .login-visual-card h1 {
        font-size: 32px;
    }

    .login-beneficios {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 560px) {
    .login-page {
        width: min(100% - 20px, 1120px);
        padding: 16px 0;
        gap: 16px;
    }

    .login-visual {
        display: none;
    }

    .login-card {
        padding: 22px;
        border-radius: 24px;
    }

    .login-card-topo h2 {
        font-size: 26px;
    }
}

/* =========================================================
   LOGIN - CORREÇÃO BOTÃO VER SENHA
========================================================= */

.login-card .login-senha-wrap {
    position: relative;
}

.login-card .login-senha-wrap input {
    padding-right: 58px;
}

.login-card .login-senha-wrap .btn-ver-senha-login {
    position: absolute;
    top: 50%;
    right: 8px;
    transform: translateY(-50%);

    width: 38px;
    min-width: 38px;
    height: 38px;
    min-height: 38px;

    padding: 0;
    margin: 0;

    border: 0;
    border-radius: 13px;

    background: #dcfce7;
    color: #166534;
    box-shadow: none;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 14px;
    line-height: 1;
    cursor: pointer;
}

.login-card .login-senha-wrap .btn-ver-senha-login:hover {
    background: #bbf7d0;
    transform: translateY(-50%);
}

/* =========================================================
   LOGIN - WALLPAPER DE FUNDO
========================================================= */

.login-body {
    position: relative;
    min-height: 100vh;
    background:
        linear-gradient(
            135deg,
            rgba(6, 30, 18, 0.72),
            rgba(20, 83, 45, 0.50),
            rgba(15, 23, 42, 0.62)
        ),
        url("/static/img/login-wallpaper.jpg") center center / cover no-repeat fixed;
}

.login-body::before {
    content: "";
    position: fixed;
    inset: 0;
    background:
        radial-gradient(circle at top left, rgba(34, 197, 94, 0.24), transparent 32%),
        radial-gradient(circle at bottom right, rgba(255, 255, 255, 0.16), transparent 28%);
    pointer-events: none;
    z-index: 0;
}

.login-page {
    position: relative;
    z-index: 1;
}

.login-card {
    background: rgba(255, 255, 255, 0.91);
}

.login-visual-card {
    background:
        linear-gradient(135deg, rgba(20, 83, 45, 0.88), rgba(22, 101, 52, 0.82)),
        radial-gradient(circle at top right, rgba(187, 247, 208, 0.28), transparent 34%);
    backdrop-filter: blur(8px);
}

/* =========================================================
   LOGIN - BOTÃO FIXO INSTALAR APP
========================================================= */

.btn-instalar-app-fixo {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;

    border: 0;
    border-radius: 999px;
    padding: 13px 18px;

    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;

    font-size: 14px;
    font-weight: 950;
    letter-spacing: -0.2px;

    box-shadow: 0 16px 36px rgba(22, 101, 52, 0.35);
    cursor: pointer;
}

.btn-instalar-app-fixo:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 46px rgba(22, 101, 52, 0.42);
}

.btn-instalar-app-fixo[hidden] {
    display: none !important;
}

@media (max-width: 700px) {
    .btn-instalar-app-fixo {
        left: 16px;
        right: 16px;
        bottom: 14px;
        width: auto;
        padding: 14px 18px;
        font-size: 14px;
    }
}

/* =========================================================
   LOGIN - BOTÃO FIXO INSTALAR APP
========================================================= */

.btn-instalar-app-fixo {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 9999;

    border: 0;
    border-radius: 999px;
    padding: 13px 18px;

    background: linear-gradient(135deg, #16a34a, #15803d);
    color: #ffffff;

    font-size: 14px;
    font-weight: 950;
    letter-spacing: -0.2px;

    box-shadow: 0 16px 36px rgba(22, 101, 52, 0.35);
    cursor: pointer;
}

.btn-instalar-app-fixo:hover {
    transform: translateY(-1px);
    box-shadow: 0 20px 46px rgba(22, 101, 52, 0.42);
}

@media (max-width: 700px) {
    .btn-instalar-app-fixo {
        left: 16px;
        right: 16px;
        bottom: 14px;
        width: auto;
        padding: 14px 18px;
        font-size: 14px;
    }
}