/* ============================================
   AGRO ELSNER - CSS GLOBAL COMPARTILHADO
   ============================================ */

/* --- CSS Custom Properties (Paleta Petrol-Teal) --- */
:root {
    --petrol: #13547a;
    --petrol-dark: #0d3d5c;
    --teal: #80d0c7;
    --teal-light: #b8e6e0;
    --gradient-main: linear-gradient(135deg, #13547a 0%, #80d0c7 100%);
    --gradient-danger: linear-gradient(135deg, #FF9966 0%, #FF5E62 100%);
    --gradient-success: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
    --gradient-warning: linear-gradient(135deg, #F7971E 0%, #FFD200 100%);
    --gradient-info: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --bg-body: #f0f2f5;
    --bg-card: #ffffff;
    --text-primary: #2c3e50;
    --text-secondary: #555;
    --text-muted: #7f8c8d;
    --border-light: #eee;
    --shadow-card: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.1);
    --radius-card: 18px;
    --radius-pill: 50px;
    --radius-btn: 12px;
    --font-main: 'Montserrat', sans-serif;
    --transition: all 0.3s ease;
}

/* --- Base --- */
body {
    background: var(--bg-body);
    font-family: var(--font-main);
    color: var(--text-primary);
}

/* --- Hero Header (Petrol Gradient) --- */
.hero-header {
    background: var(--gradient-main);
    padding: 30px 0 80px 0;
    color: white;
    border-radius: 0 0 30px 30px;
    margin-bottom: -50px;
}
.hero-header h2, .hero-header h3 {
    font-weight: 800;
}

/* --- Content Card --- */
.content-card {
    background: var(--bg-card);
    border-radius: var(--radius-card);
    padding: 30px;
    box-shadow: var(--shadow-card);
}

/* --- Botões Padrão --- */
.btn-petrol {
    background: var(--gradient-main);
    border: none;
    color: white;
    font-weight: 700;
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    transition: var(--transition);
    box-shadow: 0 4px 15px rgba(19, 84, 122, 0.2);
}
.btn-petrol:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(19, 84, 122, 0.3);
    color: white;
    opacity: 0.95;
}
.btn-danger-grad {
    background: var(--gradient-danger);
    border: none;
    color: white;
    font-weight: 700;
    border-radius: var(--radius-pill);
    padding: 10px 24px;
    transition: var(--transition);
}
.btn-danger-grad:hover {
    transform: translateY(-2px);
    color: white;
    opacity: 0.95;
}

/* --- Botão Navegação (Voltar, etc) --- */
.btn-nav-standard {
    background: rgba(255,255,255,0.15);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: var(--radius-pill);
    padding: 8px 20px;
    font-weight: 600;
    font-size: 0.85rem;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-nav-standard:hover {
    background: rgba(255,255,255,0.25);
    color: white;
    transform: translateY(-1px);
}

/* --- Botões de Ícone (Ação em tabelas) --- */
.btn-icon {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: white;
    transition: var(--transition);
    text-decoration: none;
    border: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    cursor: pointer;
}
.btn-icon:hover {
    transform: translateY(-2px);
    opacity: 0.95;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    color: white;
}
.btn-icon-petrol { background: var(--gradient-main); }
.btn-icon-danger { background: var(--gradient-danger); }
.btn-icon-success { background: var(--gradient-success); }

/* --- Menu Cards --- */
.menu-card {
    display: block;
    background: white;
    border-radius: var(--radius-card);
    padding: 22px 20px;
    text-decoration: none;
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
    border-left: 6px solid var(--petrol);
}
.menu-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    color: var(--text-primary);
}
.menu-card .card-title {
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 4px;
}
.menu-card .card-subtitle {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* --- KPI Cards (Relatórios) --- */
.kpi-card {
    background: white;
    border-radius: 14px;
    padding: 18px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    text-align: center;
    transition: var(--transition);
}
.kpi-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}
.kpi-card .kpi-valor {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--petrol);
}
.kpi-card .kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

/* --- Tabelas --- */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    color: #888;
    border-bottom: 2px solid var(--border-light);
    font-weight: 700;
}
.table td {
    vertical-align: middle;
}

/* --- Breadcrumbs --- */
.breadcrumb-agro {
    background: transparent;
    padding: 0;
    margin: 0 0 15px 0;
    font-size: 0.82rem;
}
.breadcrumb-agro .breadcrumb-item a {
    color: var(--petrol);
    text-decoration: none;
    font-weight: 600;
}
.breadcrumb-agro .breadcrumb-item a:hover {
    text-decoration: underline;
}
.breadcrumb-agro .breadcrumb-item.active {
    color: var(--text-muted);
    font-weight: 500;
}
.breadcrumb-agro .breadcrumb-item + .breadcrumb-item::before {
    content: "\f054";
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 0.6rem;
    color: #ccc;
    vertical-align: middle;
}

/* --- Toast Container --- */
.toast-container-agro {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 99999;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast-agro {
    pointer-events: auto;
    min-width: 300px;
    max-width: 450px;
    padding: 14px 20px;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    font-size: 0.88rem;
    box-shadow: 0 8px 30px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.35s ease;
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.toast-agro.toast-success { background: linear-gradient(135deg, #11998e, #38ef7d); }
.toast-agro.toast-error { background: linear-gradient(135deg, #FF5E62, #FF9966); }
.toast-agro.toast-warning { background: linear-gradient(135deg, #F7971E, #FFD200); color: #333; }
.toast-agro.toast-info { background: var(--gradient-main); }
.toast-agro .toast-close {
    margin-left: auto;
    cursor: pointer;
    opacity: 0.7;
    font-size: 1.1rem;
    background: none;
    border: none;
    color: inherit;
}
.toast-agro .toast-close:hover { opacity: 1; }

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* --- Empty States --- */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}
.empty-state i {
    font-size: 3rem;
    opacity: 0.25;
    margin-bottom: 15px;
}
.empty-state p {
    font-size: 0.9rem;
    margin: 0;
}

/* --- Loading Spinner --- */
.spinner-petrol {
    color: var(--petrol);
}

/* --- Focus Visible (Acessibilidade) --- */
:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 2px;
}
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 2px;
}

/* --- Print --- */
@media print {
    .hero-header, .btn-nav-standard, .btn-petrol, .no-print, .toast-container-agro { display: none !important; }
    .content-card { box-shadow: none; padding: 0; }
    body { background: white; }
}

/* --- Responsivo --- */
@media (max-width: 991px) {
    .hero-header { padding: 20px 0 60px 0; border-radius: 0 0 20px 20px; }
    .hero-header h2 { font-size: 1.2rem; }
    .content-card { padding: 15px; border-radius: 12px; }
}
@media (max-width: 576px) {
    .hero-header { padding: 15px 0 50px 0; }
    .hero-header .d-flex { flex-direction: column; gap: 10px; text-align: center; }
    .kpi-card .kpi-valor { font-size: 1.2rem; }
}
