body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f4;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
}

.login-container {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    text-align: center;
    width: 300px;
}

.login-container img {
    width: 50px;
    margin-bottom: 20px;
}

.login-container h2 {
    margin-bottom: 20px;
    color: #333;
}

.login-container form div {
    margin-bottom: 15px;
    text-align: left;
}

.login-container form input[type="text"],
.login-container form input[type="password"] {
    width: 100%;
    padding: 10px;
    margin: 5px 0 10px 0;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.login-container form input[type="submit"] {
    width: 100%;
    padding: 10px;
    border: none;
    border-radius: 5px;
    background: #667eea;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

.login-container form input[type="submit"]:hover {
    background: #764ba2;
}

.login-container p {
    margin-top: 20px;
}

.login-container a {
    color: #667eea;
}

/* Contenedor principal */
.container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100%;
    max-width: 1700px;
    margin: 0 auto;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.header {
    background-color: #f1f1f1;
    padding: 10px;
    text-align: left;
    flex-shrink: 0;
}
.footer {
    background-color: #f1f1f1;
    padding: 10px;
    text-align: center;
    flex-shrink: 0;
    position: fixed;
    bottom: 0;
    width: 100%;
    box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.1);
}

.footer p {
    margin: 0;
    padding: 0;
    font-size: 14px;
    color: #666;
}

.footer a {
    color: #667eea;
    text-decoration: none;
    margin: 0 5px;
}

.footer a:hover {
    text-decoration: underline;
}

.main-content {
    margin-left: 40px;  /* Ajustar este valor según el ancho del sidebar */
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar izquierda */
.sidebar-left {
    position: fixed;
    left: 0;
    top: 0;
    height: 100%;
    width: 80px;
    background-color: #f7f7ff;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 20px;
    box-shadow: 2px 0 5px rgba(0, 0, 0, 0.1);
    z-index: 1;
    box-sizing: border-box;
}

.sidebar-left .menu-item {
    width: 60px;
    height: 60px;
    border: #0d277b60 solid 1px;
    margin-top: 10px;
    margin: 00px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: background-color 0.3s;
    cursor: pointer;
}

.sidebar-left .menu-item img {
    width: 30px;
    height: 30px;
    border-radius: 50%; /* Si quieres que los íconos sean redondos */
}

.sidebar-left .menu-item:hover {
    background-color: #e0e0e0;
}

.sidebar-left .menu-item.active {
    background-color: #dcd6f7;
}

/* Contenido principal */
.content {
    display: flex;
    flex: 1;
    padding: 20px;
    box-sizing: border-box;
    overflow: hidden;
    justify-content: space-between;
}

.content-left, .content-center, .content-right {
    background-color: #fff;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    flex: 1;
    margin: 0 10px;
    overflow-y: auto;
}

.content-left {
    max-width: 300px;
}

.content-right {
    max-width: 300px;
}

/* Estilos para la lista de chats */
.chat-list {
    max-height: calc(100vh - 200px);
    overflow-y: auto;
}

.chat-item {
    padding: 10px;
    margin-bottom: 10px;
    background-color: #f9f9f9;
    border-radius: 10px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.chat-item:hover {
    background-color: #e0e0e0;
}

.chat-item.active {
    background-color: #dcd6f7;
}

.chat-item img {
    margin-right: 10px;
    width: 40px; /* Ajustar el tamaño de los íconos aquí */
    height: 40px;
    object-fit: contain; /* Ajusta la imagen al contenedor */
}

.chat-item .chat-details {
    flex-grow: 1;
}

.chat-item .chat-time {
    white-space: nowrap;
}

.message-container {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px; /* Reducir el espacio entre mensajes */
}

.message {
    padding: 10px 20px; /* Ajustar el padding dentro del mensaje */
    border-radius: 10px;
    max-width: 80%;
    word-wrap: break-word;
    margin: 5px 0; /* Añadir un pequeño margen alrededor del mensaje */
    position: relative;
}

.message.received {
    align-self: flex-start;
    background-color: #e0e0e0;
}

.message.sent {
    align-self: flex-end;
    background-color: #007bff;
    color: #fff;
}

.timestamp {
    font-size: 0.8em;
    color: #666;
    margin-top: 2px;
}

.message.received .timestamp {
    align-self: flex-start; /* Alinea la fecha y hora de los mensajes recibidos a la izquierda */
}

.message.sent .timestamp {
    align-self: flex-end; /* Alinea la fecha y hora de los mensajes enviados a la derecha */
}

/* Estilos para la sección de detalles */
.chat-details-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.participant {
    display: flex;
    align-items: center;
    padding: 10px;
    border-bottom: 1px solid #ddd;
}

.participant-icon {
    width: 50px; /* Ajusta el tamaño del contenedor del ícono */
    height: 50px;
    margin-right: 15px; /* Ajusta el margen derecho del ícono */
    display: flex;
    align-items: center;
    justify-content: center;
}

.participant-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ajusta la imagen al contenedor */
    border-radius: 50%; /* Si quieres que los íconos sean redondos */
}

.participant-details {
    flex-grow: 1;
}

.participant-name {
    font-size: 14px; /* Ajustar el tamaño de la letra aquí */
    font-weight: bold;
}

.participant-id {
    color: #777;
    font-size: 14px; /* Ajustar el tamaño de la letra aquí */
}

.participant-created {
    font-size: 12px; /* Ajustar el tamaño de la letra aquí */
    color: #666;
}

.conversation-info {
    margin-top: 20px;
    border-top: 1px solid #ddd;
    padding-top: 10px;
    width: 100%;
}

.conversation-info div {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 12px; /* Ajustar el tamaño de la letra aquí */
}

.conversation-info img {
    width: 20px;
    height: 20px;
    margin-right: 10px;
}

/* Botón de cierre de sesión */
.logout-button {
    display: inline-block;
    padding: 10px 20px;
    margin: 10px 0;
    background-color: #ff4d4d;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-size: 16px;
    cursor: pointer;
}

.logout-button:hover {
    background-color: #e60000;
}

/* Mensajes flash */
.flash-message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
}

.flash-message.danger {
    background-color: #f8d7da;
    color: #721c24;
}

/* Estilos responsivos */
@media (max-width: 1700px) {
    .container {
        width: calc(100% - 120px);
    }

    .sidebar {
        width: 25%;
    }

    .chat-window {
        flex: 3;
    }

    .chat-details {
        width: 20%;
    }
}

.header {
    background-color: #f1f1f1;
    padding: 10px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1200px;
}

.info-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.info-text p {
    margin: 0;
    padding: 5px 0;
}

.bot-image {
    margin-left: 20px;
}

.bot-image img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 10px;
}

.header-info h3 {
    margin: 5px 0;
    font-weight: normal; /* Normal weight for content */
}

.header-info h3 span {
    font-weight: bold; /* Bold for titles */
}

.header-content img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin-top: 10px;
}

.error {
    color: red;
    font-size: 0.9em;
    margin-top: 5px;
}

.flash-message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 5px;
}

.flash-message.success {
    background-color: #d4edda;
    color: #155724;
}

.flash-message.danger {
    background-color: #f8d7da;
    color: #721c24;
}

.password-rules {
    color: #666;
    font-size: 0.9em;
    margin-top: 5px;
}

/* Estilos generales */
.leads-container {
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
    flex-grow: 1;
    overflow-y: auto;
    margin-bottom: 20px; /* Espacio para la paginación */
}

.leads-filters {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
}

#leads-search {
    width: 60%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

#leads-filter-status {
    width: 35%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 5px;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 20px;
}

.leads-table th, .leads-table td {
    border: 1px solid #ccc;
    padding: 10px;
    text-align: left;
}

.leads-table th {
    background-color: #f4f4f4;
}

.leads-table tbody tr:hover {
    background-color: #f9f9f9;
}

.leads-footer {
    text-align: center;
    font-style: italic;
    color: #777;
}

.details-row .details {
    padding: 10px;
    background-color: #f4f4f4;
}

.leads-table .edit-icon {
    cursor: pointer;
    color: #007bff;
    font-size: 1.2em;
    margin-left: 10px;
}

.edit-mode input, .edit-mode select {
    width: 100%;
    padding: 5px;
    box-sizing: border-box;
}


/* Modal de edición */
/* Estilos para el modal */
.modal {
    display: none; 
    position: fixed; 
    z-index: 1; 
    padding-top: 100px; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgb(0,0,0); 
    background-color: rgba(0,0,0,0.4); 
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    width: 80%;
    max-width: 600px; 
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
}

.close:hover,
.close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

/* Estilos para el formulario de edición */
.modal-content input,
.modal-content select,
.modal-content textarea {
    width: calc(100% - 22px);
    padding: 10px;
    margin: 5px 0 10px 0;
    display: block;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
}

.modal-content button {
    background-color: #4CAF50;
    color: white;
    padding: 14px 20px;
    margin: 8px 0;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.modal-content button:hover {
    background-color: #45a049;
}

/* leads.css */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
}

.form-actions .btn {
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    cursor: pointer;
    border-radius: 4px;
}

.form-actions .btn:hover {
    background-color: #0056b3;
}

.modal-content {
    width: 50%;
    margin: auto;
    padding: 20px;
    border: 1px solid #888;
    border-radius: 10px;
    background-color: white;
}

.table-wrapper {
    max-height: 70vh;
    overflow-y: auto;
    height: calc(100vh - 420px); /* Ajusta según sea necesario */
}

.pagination {
    display: flex;
    justify-content: center;
    margin-top: 10px;
}

.page-button {
    margin: 0 5px;
    padding: 5px 10px;
    border: 1px solid #ddd;
    background-color: #f1f1f1;
    cursor: pointer;
}

.page-button.active {
    background-color: #007bff;
    color: white;
    border-color: #007bff;
}

#user-info-item {
    display: none;
}
