body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #121212;
    color: #e0e0e0;
    font-family: 'Arial', sans-serif;
}

small {
    font-size: .875em;
    color: #e0e0e0;
}

.credit-note {
    font-size: .875em;
    color: #e0e0e0;
}

.form-control, .form-select {
    background-color: #1e1e1e;
    color: #e0e0e0 !important;
    border: 1px solid #242323;
}

.form-control::placeholder {
    color: #b3b3b3;
    opacity: 1;
}

.form-control {
    color: #e0e0e0;
}

.form-control:focus {
    color: #e0e0e0;
    background-color: #1e1e1e;
    border-color: #007bff;
    outline: none;
}

/* Index */

.hero-section {
    background-image: url('../img/Coral final.png');
    background-size: cover;
    background-position: center;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: flex-end;
    position: relative;
    z-index: 1;
}

.overlay {
    background-color: rgba(0, 0, 0, 0.6);
    padding: 2rem;
    text-align: center;
    border-radius: 10px;
    margin-bottom: 5vh;
    width: 90%;
    max-width: 50rem;
}

.h1-index {
    color: #ffffff;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
}

.p-index {
    color: #ffffff;
    font-size: 1.2rem;
    margin-bottom: 2rem;
}

/* Sidebar */

.body-base {
    display: flex;
    height: 100vh;
    margin: 0;
    font-family: 'Poppins', Arial, sans-serif;
    overflow: hidden;
    background-color: #f8f8f8;
}
#sidebar {
    width: 250px;
    background-color: #333333;
    color: #e0e0e0;
    padding: 20px;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
    max-height: 100vh;
    overflow-y: auto;
}
#sidebar.hidden {
    width: 0;
    padding: 0;
    overflow: hidden;
}
#sidebar h4 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    text-align: center;
    color: #b0b0b0;
    font-weight: 600;
}
#sidebar img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: block;
    margin: 0 auto 20px;
    border: 3px solid #b0b0b0;
}
#sidebar .list-group-item {
    background: none;
    border: none;
    padding: 10px 0;
    transition: background-color 0.3s ease, transform 0.2s ease;
    font-size: 1rem;
    color: #e0e0e0;
}
#sidebar .list-group-item:hover {
    background-color: #4d4d4d;
    color: #ffffff;
    transform: translateX(5px);
    border-radius: 5px;
}
#sidebar .btn-link {
    color: #e0e0e0;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border-radius: 5px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}
#sidebar .btn-link:hover {
    color: #ffffff;
}

#sidebar .btn-link i {
    margin-right: 10px;
    font-size: 1.2rem;
}
#content {
    flex: 1;
    background-color: #121212;
    transition: margin-left 0.3s ease;
}
#content.sidebar-hidden {
    margin-left: 0;
}
#toggle-sidebar {
    position: absolute;
    top: 15px;
    left: 15px;
    background-color: #333333;
    border: none;
    color: #e0e0e0;
    border-radius: 10px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    z-index: 999;
}
#toggle-sidebar:hover {
    background-color: #4d4d4d;
    transform: scale(1.1);
}

/* Login */

.login-body{
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #121212; /* Fondo oscuro */
    color: #e0e0e0; /* Texto claro */
    font-family: 'Poppins', Arial, sans-serif;
}

.alert {
    background-color: #d9534f;
    color: #ffffff;
    border: none;
}

.login-card {
    width: 100%;
    max-width: 400px;
    padding: 20px;
    border: 1px solid #333;
    border-radius: 8px;
    background: #1e1e1e;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.login-title {
    font-size: 1.5rem;
    font-weight: bold;
    margin-bottom: 20px;
    text-align: center;
    color: #ffffff;
}

/* Cajas */

.container-cajas {
    max-height: 80vh;
    overflow-y: auto;
}

/* Cajas */

.container-gastos {
    max-height: 80vh;
    overflow-y: auto;
}

/* Pacientes */

.container-pac {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.pacientes-container{
    max-height: 80vh;
    overflow-y: auto;
}

/* Historia Clinica */

.historia-clinica-cont{
    max-height: 90vh;
    overflow-y: auto;
}

/* Liquidaciones List */

.container-liq {
    max-width: 1200px;
    margin: auto;
    padding: 20px;
}

.liquidaciones-container {
    max-height: 80vh;
    overflow-y: auto;
}

.nueva-liq {
    max-height: 90vh;
    overflow-y: auto;
}

/* Liquidaciones */

.eliq-container {
    max-height: 90vh;
    overflow-y: auto;
}

/* Tarjetas */
.card {
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 12px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.5);
}

.card .card-title {
    font-size: 1.3rem;
    color: #f4f4f4;
    font-weight: 700;
}

.card .card-text {
    color: #b3b3b3;
}

.card .list-unstyled {
    color: #b3b3b3;
    margin-bottom: 10px;
}

.badge {
    font-size: 0.9rem;
    padding: 5px 12px;
    border-radius: 5px;
}

.bg-highlight {
    background-color: #ff6f61;
    color: #fff;
}

.btn-custom {
    font-size: 0.95rem;
    padding: 10px 15px;
    border-radius: 8px;
    text-transform: uppercase;
    font-weight: 600;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

/* Botón principal */
.btn-primary {
    background: linear-gradient(135deg, #1e2cec, #1e7eec);
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background: linear-gradient(135deg, #1e7eec, #1e2cec);
    transform: scale(1.05);
}

/* Botón eliminar */
.btn-danger {
    background: linear-gradient(135deg, #d32f2f, #f44336);
    color: #fff;
    border: none;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    transform: scale(1.05);
}

.btn-custom:hover {
    box-shadow: 0 6px 12px rgba(255, 255, 255, 0.2);
}

/* Botón secundario */
.btn-secondary {
    background: linear-gradient(135deg, #6c757d, #adb5bd);
    color: #fff;
    border: none;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, #adb5bd, #6c757d);
    transform: scale(1.05);
}

/* Botón de advertencia */
.btn-warning {
    background: linear-gradient(135deg, #ff8b07, #ffca2c);
    color: #fff;
    border: none;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ff8b07, #ffc107);
    transform: scale(1.05);
    color: #fff;
}

/* Evo */

.btn-evo{
    color: #6c757d;
    border: none;
}

.date-evo{
    color: #6c757d;
}

/* Modal */

.modal-content {
    background-color: #1e1e1e;
    color: #e0e0e0;
}

.modal-header {
    border-bottom: 1px solid #333;
}

.modal-title {
    color: #ffffff;
}

.btn-close-white {
    filter: invert(1);
}

.modal-body .form-control {
    background-color: #2a2a2a;
    color: #e0e0e0;
    border: 1px solid #333;
}

.modal-body .form-control::placeholder {
    color: #b3b3b3;
}

.modal-body .form-control:focus {
    background-color: #2a2a2a;
    border-color: #007bff;
    outline: none;
}

/* Chat Box */

.chat-box {
    height: 25rem;
    overflow-y: scroll;
    border: 1px solid #121212;
    padding: 15px;
    background-color: #202325;
}

.mensaje p {
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: pre-wrap;
}

/* Medical Record */

.img-thumbnail {
    margin: 5px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: transform 0.2s;
}

.img-thumbnail:hover {
    transform: scale(1.05);
}

.list-group-item {
    background-color: #202325;
    border-color: #121212;
    color: #ffffff;
}

.list-group-item:hover {
    background-color: #6c757d;
}

/* Calendar */

.calendar {
    max-height: 90vh;
    overflow-y: auto;
}

#calendar a{
    color: #ffffff;
    text-decoration: none;
}

/* Liquidations */

.select2-container--default .select2-selection--single {
    height: calc(2.25rem + 2px);
    border: 1px solid #444;
    border-radius: 0.25rem;
}

.select2-container--default .select2-selection--single .select2-selection__rendered {
    color: #ffffff !important;
    line-height: 2.25rem;
}

.select2-container--default .select2-selection--single .select2-selection__arrow {
    height: 100%;
    color: #ffffff;
}

.select2-container--default .select2-selection--single {
    background-color: #1e1e1e;
}

.select2-container--default .select2-results__option {
    color: #ffffff;
    background-color: #2c2c2c;
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #007bff;
    color: #ffffff !important;
}

.select2-container--default .select2-results {
    background-color: #2c2c2c;
    color: #ffffff;
}

.select2-container--default .select2-search--dropdown .select2-search__field {
    background-color: #1e1e1e;
    color: #ffffff;
    border: 1px solid #444;
}

.select2-container--default .select2-search--dropdown .select2-search__field:focus {
    border-color: #007bff;
}

.select2-container--open .select2-dropdown--below {
    background-color: #2c2c2c;
    border: none;
}

.select2-container--open {
    z-index: 2000;
}

/* Media Queries */
@media (max-width: 768px) {
    h1 {
        font-size: 2rem;
    }

    p {
        font-size: 1rem;
    }

    .btn {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .container {
        padding: 0 15px;
    }

    .input-group {
        flex-direction: column;
    }

    .input-group .form-control,
    .input-group .form-select,
    .input-group .btn {
        width: 100%;
        margin-bottom: 10px;
    }

    .card-title {
        font-size: 1.1rem;
    }

    .chat-box {
        height: 25rem;
    }

    #sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        z-index: 1000;
        transition: all 0.3s ease;
    }

    #sidebar.hidden {
        transform: translateX(-100%);
    }

    #content {
        margin-left: 0;
    }

    #toggle-sidebar {
        z-index: 1001;
    }
}

@media (max-width: 480px) {
    h1 {
        font-size: 1.5rem;
    }

    p {
        font-size: 0.9rem;
    }

    .btn {
        font-size: 0.8rem;
    }

    .overlay {
        margin-bottom: 3vh;
    }
    .chat-box{
        height: 20rem;
    }
}

/* Scrollbar */
* {
    scrollbar-width: thin;
    scrollbar-color: #555 #1e1e1e;
}
  
*::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}
  
*::-webkit-scrollbar-thumb {
    background: #555;
    border-radius: 5px;
}
  
*::-webkit-scrollbar-thumb:hover {
    background: #777;
}
  
*::-webkit-scrollbar-track {
    background: #1e1e1e;
    border-radius: 5px;
}

*::-webkit-scrollbar-button {
    display: none;
}
  
  