/* =============================================================================
 * SISTEMA DE CONSULTA DE PRODUTOS POR CÓDIGO DE BARRAS
 * CSS Principal
 * ============================================================================= */

/* ====== SIDEBAR ====== */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: linear-gradient(180deg, #1a1a2e 0%, #16213e 100%);
    transition: width 0.3s ease;
}

.sidebar .nav-link {
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 2px;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.sidebar .nav-link:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateX(3px);
}

.sidebar .nav-link.active {
    background: rgba(13, 110, 253, 0.3);
    border-left: 3px solid #0d6efd;
}

.sidebar hr {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 10px 0;
}

/* ====== MAIN CONTENT ====== */
.main-content {
    min-height: 100vh;
    background: #f8f9fa;
}

/* ====== CARDS ====== */
.card {
    border-radius: 12px;
    transition: all 0.3s ease;
}

.card:hover {
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1) !important;
}

.card-header {
    border-radius: 12px 12px 0 0 !important;
    padding: 1rem 1.25rem;
}

/* ====== TABLES ====== */
.table th {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
    color: #6c757d;
}

.table td {
    vertical-align: middle;
    font-size: 0.9rem;
}

.table-hover tbody tr:hover {
    background: rgba(13, 110, 253, 0.03);
}

/* ====== FORMS ====== */
.form-control:focus, .form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.15);
}

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

.form-text {
    font-size: 0.75rem;
}

/* ====== BUTTONS ====== */
.btn {
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-sm {
    border-radius: 6px;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn-group .btn:hover {
    transform: none;
}

/* ====== BADGES ====== */
.badge {
    font-weight: 500;
    padding: 0.35em 0.65em;
}

/* ====== PROGRESS ====== */
.progress {
    border-radius: 10px;
    overflow: hidden;
}

/* ====== RESPONSIVE ====== */
@media (max-width: 991px) {
    .sidebar {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
    }
}

/* ====== ANIMATIONS ====== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.card, .alert, .modal-content {
    animation: fadeIn 0.3s ease;
}

/* ====== SCROLLBAR ====== */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a1a1a1;
}

/* ====== BARCODE INPUT ====== */
.barcode-input {
    font-family: 'Courier New', monospace;
    letter-spacing: 3px;
    font-size: 1.1rem;
}

/* ====== PRODUCT IMAGE ====== */
.product-thumb {
    width: 40px;
    height: 40px;
    object-fit: cover;
    border-radius: 8px;
}

/* ====== TOAST ====== */
.toast {
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

/* ====== FOOTER ====== */
.footer {
    font-size: 0.8rem;
}

/* ====== SWEETALERT OVERRIDE ====== */
.swal2-popup {
    border-radius: 15px !important;
    padding: 2rem !important;
}

.swal2-title {
    font-size: 1.3rem !important;
}

/* ====== DATATABLE OVERRIDE ====== */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter {
    margin-bottom: 1rem;
}

.dataTables_wrapper .dataTables_filter input {
    border-radius: 8px !important;
    border: 1px solid #ced4da !important;
    padding: 0.375rem 0.75rem !important;
}

.dataTables_wrapper .dataTables_info {
    font-size: 0.85rem;
    color: #6c757d;
}

/* ====== LOADING SPINNER ====== */
.spinner-border-lg {
    width: 3rem;
    height: 3rem;
}

/* ====== EMPTY STATE ====== */
.empty-state {
    padding: 3rem 1rem;
    text-align: center;
}

.empty-state i {
    font-size: 3rem;
    color: #dee2e6;
    margin-bottom: 1rem;
}

/* ====== PRINT ====== */
@media print {
    .sidebar, .navbar, .footer, .no-print {
        display: none !important;
    }
    .main-content {
        margin-left: 0 !important;
        padding: 0 !important;
    }
    .card {
        box-shadow: none !important;
        border: 1px solid #dee2e6 !important;
    }
}
