/* Sistema de Control de Insumos - Estilos Personalizados */

:root {
    --primary: #667eea;
    --success: #28a745;
    --danger: #dc3545;
    --warning: #ffc107;
    --info: #17a2b8;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
    scrollbar-gutter: stable;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1030 !important;
    height: 56px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1) !important;
}

.navbar-brand {
    font-weight: 700;
    color: white !important;
}

/* Sidebar */
.sidebar {
    position: fixed;
    left: 0;
    top: 56px;
    bottom: 0;
    width: 250px;
    background-color: #f8f9fa;
    border-right: 1px solid #dee2e6;
    overflow-y: auto;
    z-index: 999;
}

.sidebar-menu {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.sidebar-header {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.sidebar-header i {
    font-size: 1.25rem;
}

.sidebar .list-group {
    border: none;
    padding-top: 0.5rem;
}

.sidebar .nav-link {
    color: #495057;
    padding: 0.75rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: auto;
    line-height: 1.5;
}

.nav-link {
    color: #495057;
    padding: 0.75rem 1.5rem;
    border-left: 3px solid transparent;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    height: auto;
    line-height: 1.5;
}

.nav-link i {
    margin-right: 0.5rem;
    width: 1.25rem;
    text-align: center;
}

.sidebar .nav-link:hover {
    background-color: #e9ecef;
    border-left-color: #667eea;
}

.sidebar .nav-link.active {
    background-color: #e7f1ff;
    border-left-color: #667eea;
    color: #667eea;
    font-weight: 600;
}

.nav-link:hover {
    background-color: #e9ecef;
    border-left-color: #667eea;
}

.nav-link.active {
    background-color: #e7f1ff;
    border-left-color: #667eea;
    color: #667eea;
    font-weight: 600;
}

.nav-link hr {
    margin: 0.5rem 0;
    opacity: 0.5;
}

/* Main Content */
.main-content {
    margin-left: 250px;
    margin-top: 56px;
    padding: 30px;
    min-height: calc(100vh - 56px);
}

/* Cards */
.card {
    border: none;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-weight: 600;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    border-left: 4px solid #667eea;
}

.stat-card.success {
    border-left-color: #28a745;
}

.stat-card.danger {
    border-left-color: #dc3545;
}

.stat-card.warning {
    border-left-color: #ffc107;
}

.stat-card h5 {
    color: #6c757d;
    margin-bottom: 10px;
    font-size: 0.9rem;
    text-transform: uppercase;
}

.stat-card h2 {
    color: #667eea;
    margin: 0;
    font-weight: 700;
}

.stat-card.success h2 {
    color: #28a745;
}

.stat-card.danger h2 {
    color: #dc3545;
}

.stat-card.warning h2 {
    color: #ffc107;
}

/* Tables */
.table {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead th {
    background-color: #f8f9fa;
    border-top: none;
    color: #495057;
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85rem;
}

.table tbody tr:hover {
    background-color: #f8f9fa;
}

.table tbody td {
    border-top: 1px solid #dee2e6;
    vertical-align: middle;
}

/* Buttons */
.btn {
    border-radius: 6px;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
    color: white;
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.85rem;
}

/* Forms */
.form-control {
    border-radius: 6px;
    border: 1px solid #ced4da;
    padding: 0.6rem 0.75rem;
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

/* Pagination */
.pagination {
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.pagination .page-link {
    border: none;
    color: #667eea;
}

.pagination .page-link:hover {
    background-color: #e7f1ff;
    color: #764ba2;
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

/* Alerts */
.alert {
    border-radius: 6px;
    border: none;
    padding: 1rem;
}

.alert-info {
    background-color: #e7f1ff;
    color: #004085;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

/* Bootstrap Utility Classes Override */
.bg-primary {
    background-color: #667eea !important;
}

.bg-success {
    background-color: #28a745 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-info {
    background-color: #17a2b8 !important;
}

.text-white {
    color: white !important;
}

.text-dark {
    color: #212529 !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        width: 100%;
        position: relative;
        top: 0;
        height: auto;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
    }

    .main-content {
        margin-left: 0;
        margin-top: 0;
        padding: 15px;
    }

    .navbar {
        position: relative;
    }

    .stat-card {
        margin-bottom: 15px;
    }
}

@media (max-width: 576px) {
    .main-content {
        padding: 10px;
    }

    .card {
        margin-bottom: 15px;
    }

    .table {
        font-size: 0.85rem;
    }

    .btn-sm {
        padding: 0.3rem 0.6rem;
        font-size: 0.75rem;
    }
}

.form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Dropdown Icons */
.dropdown-item i {
    margin-right: 0.5rem;
    width: 1rem;
    display: inline-block;
    text-align: center;
    vertical-align: -0.125em;
    font-size: 1rem;
}

.dropdown-item i.bi {
    font-size: 1rem;
    color: #495057;
}

.dropdown-menu .dropdown-item i.bi {
    font-size: 1rem;
    color: #495057;
    margin-right: 0.5rem;
}

/* Alerts */
.alert {
    border: none;
    border-radius: 8px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    color: #0c5460;
}

/* Badges */
.badge {
    padding: 8px 12px;
    border-radius: 6px;
    font-weight: 500;
}

.badge-primary {
    background-color: #667eea;
    color: white;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #212529;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

/* Modal */
.modal-content {
    border: none;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px 8px 0 0;
}

.modal-title {
    font-weight: 600;
}

/* Utilities */
.text-muted {
    color: #6c757d;
}

.text-success {
    color: #28a745;
}

.text-danger {
    color: #dc3545;
}

.text-warning {
    color: #ffc107;
}

.text-info {
    color: #17a2b8;
}

.bg-light {
    background-color: #f8f9fa !important;
}

.border-bottom {
    border-bottom: 1px solid #dee2e6 !important;
}

.shadow-sm {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075) !important;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar,
    .col-md-2,
    .col-md-3 {
        position: relative;
        top: 0;
        width: 100%;
        height: auto;
    }

    .col-md-9 {
        margin-left: 0;
        width: 100%;
    }

    .main-content {
        margin-left: 0;
        padding: 15px;
    }
}
