/* 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;
    }
}

