/* styles.css */

/* Estilos básicos para el cuerpo */
body {
    font-family: 'Montserrat', sans-serif;
    background-color: #f7f7f7;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    /* height: 100vh; Centra verticalmente en toda la pantalla */
}

/* Contenedor principal */
.container {
    width: 100%;
    /*max-width: 800px; /* Limita el ancho del formulario */
    margin: 0 auto;
    box-sizing: border-box;
}

/* Sección del formulario */
.section {
    background-color: #fff;
    padding: 20px;
    border-radius: 8px;
   
    text-align: center;
}

/* Estilo para los grupos de formulario */
.form-group {
    margin-bottom: 15px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
    color: #333;
}
/* Estilo para el badge de mensajes no leídos */
        .unread-badge {
            background-color: #dc3545;
            color: #fff;
            font-size: 12px;
            font-weight: 600;
            padding: 2px 8px;
            border-radius: 10px;
            margin-left: 5px;
            position: relative;
            top: -5px;
        }

.form-group input[type="text"],
.form-group input[type="password"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc; /* Borde gris claro */
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 14px;
}

/* Botón de submit */
button.submit {
    background-color: #EC681C; /* Color naranja del tema */
    color: #ffffff;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

button.submit:hover {
    background-color: #d15a17; /* Color más oscuro al pasar el mouse */
}

/* Estilo para el enlace de registro */
.section p {
    margin-top: 15px;
    font-size: 14px;
    color: #333;
}

.section a {
    color: #EC681C;
    text-decoration: none;
}

.section a:hover {
    text-decoration: underline;
}

/* Espaciado vertical */
.section br {
    line-height: 1.5em;
}

/* Mensajes de error o éxito */
.error {
    color: red;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

.success {
    color: green;
    text-align: center;
    margin-top: 10px;
    font-size: 14px;
}

/* Estilos para el resto del sistema (manteniendo compatibilidad con dashboards) */

/* Header */
.header {
    background-color: #ececec;
    padding: 20px;
    border-bottom: 2px solid #ddd;
    position: relative;
    z-index: 1;
    width: 100%;
    box-sizing: border-box;
}

/* Línea naranja en la parte inferior del header (44% del ancho, alineada a la derecha) */
.header::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 44%;
    height: 4px;
    background-color: #EC681C;
}

/* Contenedor para los botones (línea superior) */
.header-buttons {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin-bottom: 15px;
}

/* Contenedor para el logo y el mensaje de bienvenida (línea inferior) */
.header-top {
    display: flex;
    align-items: center;
    position: relative;
    width: 100%;
    padding-left: 200px;
    box-sizing: border-box;
}

.header .logo img {
    position: absolute;
    left: 0;
    bottom: 20px;
    margin-left: 50px;
}

.header .welcome-text {
    flex: 1;
    text-align: center;
}

.header .welcome-text h1 {
    color: #333;
    font-size: 1.8em;
    margin: 0;
    font-weight: 700;
    font-family: 'Nunito Sans', sans-serif;
}

.header .welcome-text .welcome-message {
    color: #333;
    font-size: 1.2em;
    margin-top: 5px;
    font-weight: 500;
}

.subtitle {
    color: #333;
    text-align: center;
    font-size: 0.9em;
    margin: 20px 0;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

h2 {
    color: #EC681C;
    font-size: 1.2em;
    margin-top: 20px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

th, td {
    padding: 10px;
    border: 1px solid #EC681C;
    text-align: left;
}

th {
    background-color: #EC681C;
    color: #ffffff;
}

tr:nth-child(even) {
    background-color: #f2f2f2;
}

a, button {
    color: #EC681C;
    text-decoration: none;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 16px;
}

a:hover, button:hover {
    text-decoration: underline;
}

button {
    /*padding: 10px 20px;*/
    border: 1px solid #EC681C;
    border-radius: 4px;
}

/* Estilo para los grupos de formulario en otras páginas */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    font-weight: bold;
    margin-bottom: 5px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="file"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #EC681C;
    border-radius: 4px;
    box-sizing: border-box;
}

textarea {
    height: 100px;
    resize: vertical;
}

.section {
    margin-bottom: 30px;
    position: relative;
    padding: 0 20px;
    box-sizing: border-box;
    border: 1px solid #333333;
}

.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.action-button {
    background-color: transparent;
    color: #333;
    padding: 12px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    transition: transform 0.1s ease;
}

.action-button:hover {
    transform: scale(1.05);
    text-decoration: none;
}

.action-button:hover::after {
    content: '';
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    width: 20%;
    height: 2px;
    background-color: #EC681C;
}

.action-button i {
    font-size: 18px;
}

.content-section {
    display: none;
    margin-top: 20px;
    padding: 15px 20px;
    border: none;
    border-radius: 4px;
    background-color: #fff;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
    width: 80%;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.content-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Estilo para los botones de la parte superior derecha */
.top-right-buttons {
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-right-button {
    background-color: #f5f5f5;
    color: #000000;
    padding: 8px 15px;
    border: 1px solid #EC681C;
    border-radius: 20px;
    font-size: 14px;
    font-weight: bold;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease, color 0.3s ease;
    position: relative;
}

.top-right-button i {
    color: #EC681C;
}

.top-right-button:hover {
    background-color: #EC681C;
    color: #ffffff;
    text-decoration: none;
}

.top-right-button:hover i {
    color: #ffffff;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: #ff4d4d;
    color: #ffffff;
    font-size: 12px;
    padding: 2px 6px;
    border-radius: 50%;
}

/* Estilo para el botón de eliminar */
.delete-button {
    background-color: #ff4d4d;
    color: #ffffff;
    padding: 5px 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: background-color 0.3s ease;
}

.delete-button:hover {
    background-color: #cc0000;
    text-decoration: none;
}

/* Estilo para la foto de perfil */
.profile-photo {
    max-width: 150px;
    max-height: 150px;
    border-radius: 50%;
    margin-bottom: 10px;
}

/* Estilo para el formulario de perfil en dos columnas */
.profile-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.profile-form .form-group {
    margin-bottom: 15px;
}

.profile-form .full-width {
    grid-column: span 2;
}

/* Estilo para el botón de cerrar (cruz) */
.close-button {
    position: absolute;
    top: 10px;
    right: 20px;
    background: none;
    border: none;
    font-size: 24px;
    color: #EC681C;
    cursor: pointer;
    transition: color 0.3s ease;
}

.close-button:hover {
    color: #d15a17;
}

/* Estilo para el chat */
.chat-container {
    display: flex;
    flex-direction: column;
    height: 400px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #f9f9f9;
    padding: 10px;
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chat-message {
    display: flex;
    flex-direction: column;
    max-width: 70%;
}

.chat-message.user-message {
    align-self: flex-end;
    align-items: flex-end;
}

.chat-message.admin-message {
    align-self: flex-start;
    align-items: flex-start;
}

.message-content {
    background-color: #EC681C;
    color: #ffffff;
    padding: 10px 15px;
    border-radius: 15px;
    position: relative;
    word-wrap: break-word;
}

.user-message .message-content {
    background-color: #EC681C;
    border-bottom-right-radius: 5px;
}

.admin-message .message-content {
    background-color: #333;
    border-bottom-left-radius: 5px;
}

.message-sender {
    font-size: 12px;
    font-weight: bold;
    margin-bottom: 5px;
    color: #555;
}

.message-text {
    margin: 0;
    font-size: 14px;
}

.message-time {
    font-size: 10px;
    color: #aaa;
    margin-top: 5px;
    display: block;
}

.message-status {
    font-size: 10px;
    color: #aaa;
    margin-top: 5px;
    display: block;
}

.mark-read-button {
    font-size: 12px;
    color: #EC681C;
    padding: 5px 10px;
    border: none;
    background: none;
    cursor: pointer;
}

.mark-read-button:hover {
    text-decoration: underline;
}

.chat-container form {
    position: sticky;
    bottom: 0;
    background-color: #fff;
    padding: 10px;
    border-top: 1px solid #ddd;
}

.chat-container .form-group {
    margin-bottom: 0;
}

.chat-container textarea {
    height: 60px;
    resize: none;
}

.chat-container .submit {
    margin-top: 10px;
    width: 100%;
}

/* Estilo para el historial tipo log */
.activity-log {
    list-style: none;
    padding: 0;
    margin: 0;
    border-left: 2px solid #EC681C;
    width: 100%;
}

.log-entry {
    padding: 10px 15px;
    position: relative;
    margin-bottom: 10px;
    background-color: #fff;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.log-entry:before {
    content: '';
    position: absolute;
    left: -8px;
    top: 50%;
    transform: translateY(-50%);
    width: 12px;
    height: 12px;
    background-color: #EC681C;
    border-radius: 50%;
}

.log-date {
    font-weight: bold;
    color: #555;
    margin-right: 10px;
}

/* Estilo para formularios de descargo y otros formularios */
.descargo-form {
    max-width: 80%;
    margin: 40px auto;
    padding: 30px;
    background-color: #fff;
    border: 1px solid #EC681C;
    border-radius: 8px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.descargo-input,
.descargo-select,
.descargo-textarea {
    padding: 10px;
    font-size: 14px;
    border: 1px solid #ccc;
    border-radius: 5px;
    box-sizing: border-box;
    width: 100%;
    grid-column: span 1;
}

.descargo-textarea {
    grid-column: 1 / -1;
    resize: vertical;
    min-height: 120px;
}

.descargo-file-buttons {
    grid-column: 1 / -1;
    display: flex;
    gap: 10px;
    justify-content: flex-start;
}

.descargo-btn {
    padding: 10px 15px;
    background-color: #eee;
    border: 1px solid #ccc;
    border-radius: 25px;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.descargo-btn i {
    color: #EC681C;
}

.descargo-submit {
    margin-top: 20px;
    background-color: #EC681C;
    color: white;
    border: none;
    font-weight: 600;
    padding: 12px;
    border-radius: 25px;
    cursor: pointer;
    grid-column: 1 / -1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    font-size: 16px;
}

.descargo-submit:hover {
    background-color: #d15a17;
}

/* Estilos para el administrador */
.table-container {
    overflow-x: auto;
    margin-top: 20px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.pending-users-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    font-family: 'Nunito Sans', sans-serif;
}

.pending-users-table th,
.pending-users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.pending-users-table th {
    background-color: #EC681C;
    color: #ffffff;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 14px;
    position: sticky;
    top: 0;
    z-index: 1;
}

.pending-users-table tbody tr {
    transition: background-color 0.3s ease;
}

.pending-users-table tbody tr:nth-child(even) {
    background-color: #f8f9fa;
}

.pending-users-table tbody tr:hover {
    background-color: #f1f1f1;
}

.pending-users-table td {
    font-size: 14px;
    color: #333;
}

.approve-button {
    padding: 6px 10px;
    background-color: #28a745;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.approve-button:hover {
    background-color: #218838;
}

.reject-button {
    padding: 6px 10px;
    background-color: #dc3545;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.reject-button:hover {
    background-color: #c82333;
}

/* Estilo para la barra lateral de mensajes del administrador */
.messaging-container {
    display: flex;
    width: 100%;
    height: 600px;
}

.sidebar {
    width: 30%;
    background-color: #f5f5f5;
    border-right: 1px solid #ddd;
    overflow-y: auto;
    padding: 10px;
}

.contribuyente-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contribuyente-list li {
    padding: 10px;
    border-bottom: 1px solid #ddd;
    transition: background-color 0.3s ease;
}

.contribuyente-list li a {
    text-decoration: none;
    color: #333;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.contribuyente-list li.selected {
    background-color: #EC681C;
}

.contribuyente-list li.selected a {
    color: #ffffff;
}

.contribuyente-list li:hover {
    background-color: #e0e0e0;
}

.chat-area {
    width: 70%;
    display: flex;
    flex-direction: column;
    padding: 20px;
}

.chat-search {
    margin-bottom: 10px;
}

.chat-search input[type="text"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #EC681C;
    border-radius: 4px;
    box-sizing: border-box;
}

/* Responsividad */
@media (max-width: 768px) {
    .container {
        max-width: 100%;
        padding: 10px;
    }

    .section {
        padding: 15px;
    }

    .form-group input[type="text"],
    .form-group input[type="password"] {
        font-size: 12px;
    }

    button.submit {
        font-size: 14px;
        padding: 8px 16px;
    }

    .section p {
        font-size: 12px;
    }

    .action-buttons {
        flex-direction: column;
        align-items: center;
    }

    .action-button {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }

    table, th, td {
        font-size: 14px;
    }

    .top-right-buttons {
        gap: 10px;
    }

    .top-right-button {
        font-size: 12px;
        padding: 6px 10px;
    }

    .profile-form {
        grid-template-columns: 1fr;
    }

    .profile-form .full-width {
        grid-column: span 1;
    }

    .descargo-form {
        grid-template-columns: 1fr;
    }

    .close-button {
        font-size: 20px;
        top: 5px;
        right: 20px;
    }

    .header {
        padding: 10px;
    }

    .header-top {
        flex-direction: column;
        gap: 10px;
        padding-left: 0;
    }

    .header .welcome-text {
        text-align: center;
    }

    .header .welcome-text h1 {
        font-size: 1.5em;
    }

    .header .welcome-text .welcome-message {
        font-size: 1em;
    }

    .header-buttons {
        justify-content: center;
        margin-bottom: 10px;
    }

    .header .logo img {
        position: static;
        margin-left: 20px;
    }

    .messaging-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
        max-height: 200px;
    }

    .chat-area {
        width: 100%;
    }

    .table-container {
        overflow-x: auto;
    }

    .pending-users-table {
        min-width: 800px;
    }

    .pending-users-table thead {
        display: none;
    }

    .pending-users-table tbody tr {
        display: block;
        margin-bottom: 15px;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 10px;
        background-color: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .pending-users-table tbody tr:nth-child(even) {
        background-color: #fff;
    }

    .pending-users-table tbody tr:hover {
        background-color: #f8f9fa;
    }

    .pending-users-table td {
        display: flex;
        justify-content: space-between;
        padding: 8px 10px;
        border-bottom: 1px solid #f0f0f0;
        font-size: 14px;
    }

    .pending-users-table td:last-child {
        border-bottom: none;
    }

    .pending-users-table td:before {
        content: attr(data-label);
        font-weight: 700;
        color: #EC681C;
        margin-right: 10px;
    }
}