/* Custom Styles for Supplier Management System */

/* Login Screen Styles */
#loginScreen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
}

#loginScreen.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Custom navbar background color */
.navbar-custom {
    background-color: #2c3e50 !important;
    /* Cor do Menu principal. */
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: #f8f9fa;
}

.navbar-brand {
    font-weight: 600;
}

.navbar-logo {
    height: 30px;
    width: 30px;
    object-fit: contain;
}

.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: 1px solid rgba(0, 0, 0, 0.125);
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid rgba(0, 0, 0, 0.125);
    font-weight: 600;
}

.table th {
    font-weight: 600;
    border-top: none;
}

.table td {
    vertical-align: middle;
}

.btn {
    border-radius: 0.375rem;
    font-weight: 500;
}

.btn-sm {
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

.nav-link {
    font-weight: 500;
}

.nav-link.active {
    font-weight: 600;
}

/* Supplier Search Dropdown */
.supplier-search-container {
    position: relative;
}

.supplier-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 0.375rem 0.375rem;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1050;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.supplier-dropdown .dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    color: #212529;
    text-decoration: none;
    display: block;
    transition: background-color 0.15s ease-in-out;
}

.supplier-dropdown .dropdown-item:hover {
    background-color: #e9ecef;
}

.supplier-dropdown .dropdown-item.selected {
    background-color: #007bff;
    color: white;
}

.supplier-dropdown .dropdown-item.text-muted {
    color: #6c757d !important;
    cursor: default;
}

.supplier-dropdown .dropdown-item.text-muted:hover {
    background-color: transparent;
}

/* Dashboard Cards */
.bg-info {
    background-color: #0dcaf0 !important;
}

.bg-success {
    background-color: #198754 !important;
}

.bg-warning {
    background-color: #ffc107 !important;
}

.bg-danger {
    background-color: #dc3545 !important;
}

/* Status badges */
.badge-category-vendas {
    background-color: #0d6efd;
}

.badge-category-entrega {
    background-color: #198754;
}

.badge-category-financeiro {
    background-color: #ffc107;
    color: #000;
}

.badge-category-fiscal {
    background-color: #dc3545;
}

/* Loading animation */
.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Modal improvements */
.modal-content {
    border: none;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.modal-footer {
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

/* Form improvements */
.form-control:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-select:focus {
    border-color: #86b7fe;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .container-fluid {
        padding-left: 15px;
        padding-right: 15px;
    }

    .table-responsive {
        font-size: 0.875rem;
    }

    .btn-group .btn {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* Animation for section transitions */
.section-content {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Status indicators */
.status-online {
    color: #198754;
}

.status-offline {
    color: #dc3545;
}

.status-loading {
    color: #ffc107;
}

/* Table row hover effect */
.table-hover tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.025);
}

/* Action buttons */
.btn-action {
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    margin-right: 0.25rem;
}

.btn-outline-primary:hover {
    color: #fff;
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-outline-warning:hover {
    color: #000;
    background-color: #ffc107;
    border-color: #ffc107;
}

.btn-outline-danger:hover {
    color: #fff;
    background-color: #dc3545;
    border-color: #dc3545;
}