/* General Body and Link Styles */
body {
    background-color: #121212;
    color: #ffffff;
}

a {
    color: #9eab05;
}

a:hover {
    color: #c4d107;
}

/* Navbar Styles */
.navbar {
    background-color: #1f1f1f;
    border-bottom: 1px solid #9eab05;
}

.navbar .navbar-brand,
.navbar .nav-link {
    color: #9eab05;
}

.navbar .nav-link:hover {
    color: #c4d107;
}

/* Button Styles */
.btn-primary {
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
    color: #ffffff !important;
    border-radius: 6px; /* Added a slight border-radius for modern look, adjust as needed */
}

.btn-primary:hover {
    background-color: #0b5ed7 !important;
    border-color: #0a58ca !important;
}

.btn-secondary {
    background-color: #464646a1;
    border-color: #6e7b04;
    color: #ffffff;
    border-radius: 6px; /* Added a slight border-radius */
}

.btn-secondary:hover {
    background-color: #495057; /* Adjusted hover for consistency */
    border-color: #495057; /* Adjusted hover for consistency */
    color: #fff;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
    border-radius: 6px; /* Added a slight border-radius */
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
    border-radius: 6px; /* Added a slight border-radius */
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    border-radius: 6px; /* Added a slight border-radius */
}

.btn-danger:hover {
    background-color: #c82333;
    border-color: #bd2130;
}

/* List Group Styles */
.list-group-item {
    background-color: #1f1f1f;
    color: #ffffff;
    border-color: #343a40;
}

.list-group-item a {
    color: #9eab05;
}

/* Form Control Styles */
.form-control {
    background-color: #2c2c2c;
    color: #ffffff;
    border: 1px solid #9eab05;
    border-radius: 6px; /* Apply consistent border-radius */
    padding: 6px 10px; /* Added consistent padding */
}

.form-control:focus {
    border-color: #c4d107;
    box-shadow: 0 0 0 0.2rem rgba(158, 171, 5, 0.25);
}

input.form-control,
select.form-control,
textarea.form-control {
    background: #23272b;
    color: #fff;
    border: 1px solid #495057;
    border-radius: 6px;
    font-size: 0.9rem;
    padding: 6px 10px;
}

input.form-control:focus,
select.form-control:focus,
textarea.form-control:focus {
    background: #23272b;
    color: #fff;
    border-color: #ffc107;
    box-shadow: 0 0 0 0.25rem rgba(255, 193, 7, 0.25);
}

input.form-control:disabled,
select.form-control:disabled {
    background-color: #212529;
    color: #adb5bd;
    opacity: 1;
    -webkit-text-fill-color: #adb5bd;
    cursor: not-allowed;
}

/* Date Input Styles */
input[type="date"] {
    background-color: #343a40;
    border-color: #454d55;
    color: #fff;
}

input[type="date"]::-webkit-calendar-picker-indicator {
    filter: invert(1);
}

/* Card Styles */
.card {
    background-color: #1f1f1f;
    color: #ffffff;
    border: 1px solid #9eab05;
    border-radius: 8px; /* Added for consistency */
}

/* Table Styles */
.table {
    color: #ffffff;
}

.table thead {
    background-color: #343a40;
    color: #9eab05;
}

.table tbody tr {
    background-color: #1f1f1f;
}

.table tbody tr:hover {
    background-color: #2a2a2a;
}

/* Alert Styles */
.alert {
    background-color: #2c2c2c;
    border-color: #9eab05;
    color: #ffffff;
    border-radius: 8px; /* Added for consistency */
}

/* Footer Styles */
footer {
    background-color: #1f1f1f;
    color: #9eab05;
    padding: 1rem;
    text-align: center;
}

footer a {
    color: #9eab05;
}

footer a:hover {
    color: #c4d107;
}

/* Accordion Styles */
.accordion-item {
    background-color: #1f1f1f;
    color: #ffffff;
    border: 1px solid #343a40;
}

.accordion-button {
    background-color: #2c2c2c;
    color: #ffffff;
    border: none;
}

.accordion-button:not(.collapsed) {
    background-color: #343a40;
    color: #9eab05;
}

.accordion-button:hover {
    background-color: #3b3b3b;
}

.accordion-body {
    background-color: #2c2c2c;
    color: #ffffff;
}

/* Modal Styles */
.modal-content {
    background-color: #1f1f1f;
    color: #ffffff;
    border-radius: 8px;
}

.modal-header,
.modal-footer {
    border-color: #343a40; /* Original color */
}

.btn-close {
    background-color: #ffffff;
    border-radius: 50%;
}

.btn-close:hover {
    background-color: #9eab05;
}

.btn-close-white {
    filter: invert(1) grayscale(100%) brightness(200%);
}

/* Custom Box Styles */
.custom-box {
    width: 60px;
    height: 60px;
    border: 2px solid #9eab05;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin: 5px;
    font-size: 0.75rem;
    color: white;
    text-align: center;
}

.custom-title {
    font-size: 0.6rem;
    font-weight: bold;
    margin-bottom: 2px;
}

.custom-content {
    font-size: 1.2rem;
    font-weight: bold;
}

.custom-box[style*="width: 50%;"] {
    width: 50%;
}

/* Pagination Styles */
.pagination .page-link {
    background-color: #343a40;
    border-color: #454d55;
    color: #fff;
}

.pagination .page-item.active .page-link {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.pagination .page-link:hover {
    background-color: #495057;
    border-color: #6c757d;
    color: #fff;
}

.pagination .page-item.disabled .page-link {
    background-color: #343a40;
    border-color: #454d55;
    color: #6c757d;
}

/* Select2 Styles */
.select2-container--default .select2-selection--single {
    background-color: #343a40;
    border-color: #454d55;
    color: #fff;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #fff;
}

.select2-dropdown {
    background-color: #343a40;
    border-color: #454d55;
}

.select2-container--default .select2-results__option {
    background-color: #343a40;
    color: #fff;
}

.select2-container--default .select2-results__option[aria-selected=true] {
    background-color: #6c757d;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #495057;
    color: #fff;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #343a40;
    border-color: #454d55;
    color: #fff;
}

/* Utility and Custom Component Styles */
.container-fluid {
    padding-top: 10px !important;
    padding-bottom: 10px !important;
}

.text-white {
    color: #fff !important;
}

.info-cuadro {
    background: #495057;
    border-radius: 6px;
    padding: 4px 6px;
    text-align: center;
    font-size: 0.75rem;
    color: #fff;
    word-break: break-word;
    flex-grow: 1;
    min-width: 0;
}

.info-cuadro .titulo {
    color: #adb5bd;
    font-size: 0.65rem;
    margin-bottom: 1px;
}

.full-width-box {
    background: #495057;
    border-radius: 6px;
    padding: 6px 10px;
    margin-bottom: 6px;
    font-size: 0.8rem;
    color: #fff;
}

#resumen-lotes-box {
    background-color: #198754;
    margin-top: 10px;
}

.full-width-box .titulo {
    color: #adb5bd;
    font-size: 0.7rem;
    margin-bottom: 2px;
}

.full-width-box strong {
    color: #ffc107;
    margin-right: 5px;
}

.full-width-box ul {
    list-style: none;
    padding: 0;
    margin-top: 2px;
}

.full-width-box li {
    margin-bottom: 2px;
    display: flex;
    align-items: center;
    font-size: 0.7rem;
    padding: 2px 0;
    gap: 5px;
}

.full-width-box li .corregir-btn {
    background: none;
    border: none;
    color: #ffc107;
    cursor: pointer;
    font-size: 0.7rem;
    margin-left: auto;
    padding: 0;
    text-decoration: underline;
    white-space: nowrap;
}

.full-width-box li .corregir-btn:hover {
    color: #fff;
}

.full-width-box li .delete-btn {
    background: none;
    border: none;
    color: #dc3545;
    cursor: pointer;
    font-size: 0.9rem;
    margin-right: 5px;
    padding: 0;
    font-weight: bold;
}

.full-width-box li .delete-btn:hover {
    color: #ff7675;
}

.item-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 6px;
    margin-top: 10px;
    margin-bottom: 6px;
}

.ubicacion-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 6px;
    margin-bottom: 10px;
}

.form-label {
    font-weight: 500;
    color: #fff;
    font-size: 0.85rem;
    margin-bottom: 4px;
}

.invalid-feedback {
    color: #ff7675;
    display: none;
    margin-top: 0.25rem;
    font-size: 0.8em;
}

/* Summary Modal Body Styles */
.summary-modal-body ul {
    list-style: none;
    padding-left: 0;
}

.summary-modal-body li {
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.summary-modal-body strong {
    color: #ffc107;
}

.summary-modal-body .summary-total {
    font-size: 1.1rem;
    font-weight: bold;
    margin-top: 10px;
    border-top: 1px solid #495057;
    padding-top: 10px;
}

/* Media Queries */
@media (max-width: 767.98px) {
    .card.bg-dark,
    .card.bg-dark .card-body,
    .card.bg-dark .row > div,
    .card.bg-dark .fw-bold,
    .card.bg-dark strong,
    .card.bg-dark .small {
        background-color: #23272b !important;
        color: #fff !important;
        border-color: #444 !important;
    }
    .btn-warning {
        color: #212529 !important;
    }
    .card.bg-dark .text-muted,
    .card.bg-dark .small.text-muted {
        color: #e0e0e0 !important;
    }
}