.agro-stack { display: grid; gap: 15px; }
.agro-form { max-width: 840px; }
.agro-span { grid-column: 1 / -1; }
.agro-table { overflow-x: auto; }
.agro-nowrap { white-space: nowrap; }
.agro-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.agro-top { margin-top: 14px; }
.agro-muted { color: var(--muted); }
.agro-inline { display: inline; }

.agro-nav-badge {
    margin-left: auto;
    min-width: 20px;
    height: 20px;
    padding: 0 6px;
    border-radius: 999px;
    background: #15803d;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#submenus a { display: flex; align-items: center; gap: 8px; }

.agro-state {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 650;
    white-space: nowrap;
    background: #dcfce7;
    color: #166534;
}
.agro-state.planificada { background: #f1f5f9; color: #475569; }
.agro-state.sembrada { background: #e0f2fe; color: #0369a1; }
.agro-state.en_curso { background: #fef3c7; color: #92400e; }
.agro-state.cosechada { background: #dcfce7; color: #166534; }
.agro-state.cerrada { background: #dbeafe; color: #1d4ed8; }
.agro-state.bajo { background: #fee2e2; color: #991b1b; }
.agro-state.cosecha { background: #dcfce7; color: #166534; }
.agro-state.venta_granos { background: #dbeafe; color: #1d4ed8; }
.agro-state.venta_hacienda { background: #fef3c7; color: #92400e; }

.agro-facts dt, .agro-balance dt { color: var(--muted); font-size: 13px; }
.agro-facts dd, .agro-balance dd { margin: 3px 0 0; font-weight: 600; overflow-wrap: anywhere; }
.agro-balance {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 24px;
    border-top: 1px solid var(--line);
    padding: 12px 0 0;
    margin-bottom: 0;
}
.agro-total { text-align: right; font-size: 18px; font-weight: 700; }

.agro-form textarea {
    display: block;
    width: 100%;
    margin-top: 4px;
    padding: 8px 10px;
    resize: vertical;
    font: inherit;
    color: var(--ink);
    background: white;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
}

.agro-print main { max-width: 820px; margin: auto; padding: 20px; }
.agro-print-nav { margin-bottom: 16px; }
@media print {
    body.agro-print { background: white; color: #000; }
    .agro-print .panel { border: 0; box-shadow: none; padding: 0; }
    .agro-print-nav { display: none; }
}
