/* AgroGestión Venezuela - Custom CSS System */

:root {
    --ag-primary: #1b4332;
    --ag-primary-hover: #2d6a4f;
    --ag-secondary: #52b788;
    --ag-accent: #d4a373;
    --ag-dark: #1e293b;
    --ag-light: #f8fafc;
    --ag-card-bg: #ffffff;
    --ag-border: #e2e8f0;
    --ag-sidebar-width: 260px;
}

body {
    font-family: 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f1f5f9;
    color: #334155;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Sidebar Styling */
#sidebar {
    width: var(--ag-sidebar-width);
    background-color: var(--ag-primary);
    color: #ffffff;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 1040;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    max-height: 100vh;
}

/* Sidebar Custom Scrollbar */
#sidebar::-webkit-scrollbar {
    width: 6px;
}
#sidebar::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.1);
}
#sidebar::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}
#sidebar::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

#sidebar .sidebar-header {
    padding: 1.25rem 1.5rem;
    background-color: var(--ag-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 10;
}

#sidebar .sidebar-brand {
    font-weight: 700;
    font-size: 1.2rem;
    color: #ffffff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#sidebar .nav-link {
    color: rgba(255, 255, 255, 0.8);
    padding: 0.75rem 1.5rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

#sidebar .nav-link:hover, 
#sidebar .nav-link.active {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--ag-accent);
}

#sidebar .nav-link i {
    font-size: 1.2rem;
}

/* Sidebar Overlay for Mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1030;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.show {
    display: block;
}

/* Main Content Area */
#main-content {
    margin-left: var(--ag-sidebar-width);
    flex: 1;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}

/* Navbar Top */
.navbar-top {
    background-color: #ffffff;
    border-bottom: 1px solid var(--ag-border);
    padding: 0.75rem 1.5rem;
}

/* Cards & Widgets */
.ag-card {
    background: var(--ag-card-bg);
    border: 1px solid var(--ag-border);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.ag-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.stat-card {
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.stat-icon.bovine { background-color: #e0f2fe; color: #0284c7; }
.stat-icon.swine { background-color: #fce7f3; color: #db2777; }
.stat-icon.broiler { background-color: #fef3c7; color: #d97706; }
.stat-icon.layer { background-color: #dcfce7; color: #16a34a; }
.stat-icon.alert { background-color: #fee2e2; color: #dc2626; }

/* Login Page Styling */
.login-body {
    background: linear-gradient(135deg, #1b4332 0%, #2d6a4f 50%, #081c15 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-card {
    width: 100%;
    max-width: 440px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.login-card .card-header {
    background-color: var(--ag-primary);
    color: white;
    padding: 2rem 1.5rem;
    text-align: center;
    border-bottom: none;
}

/* Badges */
.badge-role {
    font-size: 0.85rem;
    padding: 0.4em 0.8em;
    border-radius: 20px;
}

/* Footer */
footer {
    background-color: #ffffff;
    border-top: 1px solid var(--ag-border);
    padding: 1rem 1.5rem;
    margin-top: auto;
    font-size: 0.9rem;
    color: #64748b;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    #sidebar {
        margin-left: calc(-1 * var(--ag-sidebar-width));
    }
    #sidebar.show {
        margin-left: 0;
    }
    #main-content {
        margin-left: 0;
    }
}


/* ===== Ola 1: aretes por color ===== */
.arete {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: 3.2rem; padding: .3rem .6rem; border-radius: .6rem;
    font-weight: 800; font-size: 1.05rem; letter-spacing: .02em;
    border: 2px solid rgba(0,0,0,.25); box-shadow: inset 0 -2px 0 rgba(0,0,0,.12);
    font-variant-numeric: tabular-nums; line-height: 1.2;
}
.arete-lg { min-width: 4.5rem; font-size: 1.6rem; padding: .45rem .9rem; }
.arete-sin { background: #e9ecef; color: #495057; font-size: .85rem; }
.color-dot { display: inline-block; width: 1rem; height: 1rem; border-radius: 50%; border: 2px solid rgba(0,0,0,.25); vertical-align: -2px; }

/* Botones grandes de elección (grupo, color, sexo, tipo) pensados para el dedo */
.chip-choices { display: flex; flex-wrap: wrap; gap: .5rem; }
.chip-choices input[type=radio] { position: absolute; opacity: 0; pointer-events: none; }
.chip-choices label {
    display: inline-flex; align-items: center; gap: .45rem; cursor: pointer;
    padding: .65rem 1rem; border-radius: .75rem; border: 2px solid #ced4da;
    background: #fff; font-weight: 600; min-height: 3rem; user-select: none;
}
.chip-choices input[type=radio]:checked + label { border-color: #1b4332; box-shadow: 0 0 0 .2rem rgba(27,67,50,.25); background: #f1f8f4; }
.chip-choices input[type=radio]:focus-visible + label { outline: 3px solid #2a9d4b; }

.btn-campo { min-height: 3.25rem; font-size: 1.1rem; font-weight: 700; }
.accion-grande { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .35rem;
    min-height: 7rem; border-radius: 1rem; font-size: 1.15rem; font-weight: 700; text-decoration: none; }
.accion-grande i { font-size: 2rem; }
.fila-animal { display: flex; align-items: center; gap: .75rem; padding: .7rem .25rem; border-bottom: 1px solid #eef0f2; color: inherit; text-decoration: none; }
.fila-animal:hover { background: #f8faf9; }
.fila-animal .meta { font-size: .85rem; color: #6c757d; }
