﻿.table-container {
    background: white;
    border-radius: 10px;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    padding: 20px;
}

.table th {
    background-color: #007bff;
    color: white;
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    border: none;
}

.table td {
    vertical-align: middle;
    cursor: pointer;
    transition: background-color 0.2s;
    border: 1px solid #dee2e6;
}

    .table td:hover {
        background-color: #f8f9fa;
    }

.editable-cell {
    position: relative;
}

    .editable-cell.editing {
        background-color: #fff3cd !important;
        border: 2px solid #ffc107 !important;
    }

.edit-input {
    width: 100%;
    border: none;
    background: transparent;
    padding: 8px;
    font-size: 14px;
    outline: none;
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.success-flash {
    background-color: #d4edda !important;
    animation: flashSuccess 1s ease-in-out;
}

.error-flash {
    background-color: #f8d7da !important;
    animation: flashError 1s ease-in-out;
}

@keyframes flashSuccess {
    0% {
        background-color: #d4edda;
    }

    50% {
        background-color: #c3e6cb;
    }

    100% {
        background-color: #d4edda;
    }
}

@keyframes flashError {
    0% {
        background-color: #f8d7da;
    }

    50% {
        background-color: #f5c6cb;
    }

    100% {
        background-color: #f8d7da;
    }
}

.page-header {
    text-align: center;
    color: #333;
}

.status-badge {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 1000;
    display: none;
}

.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.empty-state {
    text-align: center;
    padding: 50px;
    color: #6c757d;
}

.loading-spinner {
    display: none;
    text-align: center;
    padding: 20px;
}

/* Search Styles - Thêm vào CSS hiện có */
.search-container {
    background: white;
    border-radius: 8px;
    padding: 5px;
}

    .search-container .input-group {
        box-shadow: 0 2px 5px rgba(0,0,0,0.1);
        border-radius: 6px;
        overflow: hidden;
    }

    .search-container .form-control {
        border: none;
        padding: 12px 15px;
        font-size: 14px;
    }

        .search-container .form-control:focus {
            box-shadow: none;
            border-color: #007bff;
        }

    .search-container .input-group-text {
        background-color: #f8f9fa;
        border: none;
        color: #6c757d;
    }

    .search-container #clearSearch {
        border: none;
        background-color: #f8f9fa;
        color: #6c757d;
        transition: all 0.2s;
    }

        .search-container #clearSearch:hover {
            background-color: #e9ecef;
            color: #495057;
        }

#searchInfo {
    font-size: 14px;
    white-space: nowrap;
}

/* Responsive */
@media (max-width: 768px) {
    .search-container .col-md-4 {
        margin-top: 10px;
    }

    #searchInfo {
        text-align: center;
        width: 100%;
    }
}

/* Highlight search results */
.search-highlight {
    background-color: #fff3cd;
    padding: 2px 4px;
    border-radius: 3px;
    font-weight: 500;
}

/* Modal Form Styles */
#addWarehouseModal .modal-content {
    border: none;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
}

#addWarehouseModal .modal-header {
    border-radius: 15px 15px 0 0;
    border-bottom: none;
    padding: 20px 25px;
}

#addWarehouseModal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}

#addWarehouseModal .modal-body {
    padding: 25px;
}

#addWarehouseModal .modal-footer {
    border-top: none;
    padding: 20px 25px;
    border-radius: 0 0 15px 15px;
}

#addWarehouseModal .form-label {
    color: #495057;
    margin-bottom: 8px;
}

#addWarehouseModal .form-control,
#addWarehouseModal .form-select {
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 12px 15px;
    font-size: 14px;
    transition: all 0.3s ease;
}

#addWarehouseModal .form-control:focus,
#addWarehouseModal .form-select:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

#addWarehouseModal .form-control.is-invalid,
#addWarehouseModal .form-select.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

#addWarehouseModal .invalid-feedback {
    font-size: 12px;
    margin-top: 5px;
}

#addWarehouseModal .form-text {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
}

#addWarehouseModal .btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

#addWarehouseModal .btn-primary {
    background: linear-gradient(135deg, #007bff, #0056b3);
    border: none;
    box-shadow: 0 4px 15px rgba(0, 123, 255, 0.3);
}

#addWarehouseModal .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 123, 255, 0.4);
}

#addWarehouseModal .btn-secondary {
    background: linear-gradient(135deg, #6c757d, #545b62);
    border: none;
    box-shadow: 0 4px 15px rgba(108, 117, 125, 0.3);
}

#addWarehouseModal .btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.4);
}

#addWarehouseModal .btn:disabled {
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

/* Toast Notification Styles */
.toast-container {
    z-index: 9999;
}

.toast {
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.15);
    border: none;
}

.toast-body {
    font-weight: 500;
    padding: 15px 20px;
}

/* Responsive Modal */
@media (max-width: 768px) {
    #addWarehouseModal .modal-dialog {
        margin: 10px;
    }
    
    #addWarehouseModal .modal-body {
        padding: 20px;
    }
    
    #addWarehouseModal .modal-footer {
        padding: 15px 20px;
    }
    
    #addWarehouseModal .row .col-md-6 {
        margin-bottom: 15px;
    }
}

/* Animation for modal */
#addWarehouseModal.fade .modal-dialog {
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

#addWarehouseModal.show .modal-dialog {
    transform: scale(1);
}

/* Form validation styles */
#addWarehouseForm.was-validated .form-control:invalid,
#addWarehouseForm.was-validated .form-select:invalid {
    border-color: #dc3545;
}

#addWarehouseForm.was-validated .form-control:valid,
#addWarehouseForm.was-validated .form-select:valid {
    border-color: #28a745;
}

/* Icon styles in form */
#addWarehouseModal .form-label i {
    margin-right: 8px;
    color: #007bff;
}

/* Loading spinner in button */
#btnSubmitWarehouse .fa-spinner {
    margin-right: 8px;
}
