* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #121212;
    color: #f0f0f0;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

header {
    background: #000000;
    color: #ffffff;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    border-bottom: 3px solid #00e5ff;
}

h1, h2, h3 {
    color: #ffffff;
}

.form-section, .table-section {
    background: #1e1e1e;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    border-left: 3px solid #00e5ff;
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
    color: #ffffff;
}

input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
select,
textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #333;
    background-color: #2d2d2d;
    color: #ffffff;
    border-radius: 4px;
    font-size: 16px;
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: #00e5ff;
    box-shadow: 0 0 5px rgba(0, 229, 255, 0.5);
}

textarea {
    resize: vertical;
    min-height: 100px;
}

/* Estilos para el campo de teléfono con prefijo */
.phone-input-container {
    display: flex;
    align-items: center;
}

.phone-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #333;
    border: 1px solid #444;
    border-right: none;
    border-radius: 4px 0 0 4px;
    padding: 0 10px;
    height: 38px;
    font-weight: bold;
    color: #fff;
}

.phone-with-prefix {
    border-radius: 0 4px 4px 0;
    width: 100%;
}

.btn-submit {
    background-color: #00e5ff;
    color: #000000;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
    font-weight: bold;
    width: 100%;
    transition: background-color 0.3s;
}

.btn-submit:hover {
    background-color: #00b8cc;
}

.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th, td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #333;
}

th {
    background-color: #000000;
    color: white;
    border-bottom: 2px solid #00e5ff;
}

tr:hover {
    background-color: #2a2a2a;
}

tr.expirada {
    background-color: rgba(244, 67, 54, 0.2);
}

tr.expirada:hover {
    background-color: rgba(244, 67, 54, 0.3);
}

.edit-btn, .delete-btn, .renew-btn {
    padding: 6px 12px;
    margin: 0 5px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    color: white;
    font-weight: bold;
}

.edit-btn {
    background-color: #00e5ff;
    color: #000;
}

.delete-btn {
    background-color: #f44336;
}

.renew-btn {
    background-color: #00e5ff;
    color: #000;
}

.edit-btn:hover {
    background-color: #00b8cc;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

.renew-btn:hover {
    background-color: #00b8cc;
}

.mensaje {
    padding: 10px;
    margin-bottom: 15px;
    border-radius: 4px;
    display: none;
}

.mensaje.exito {
    background-color: rgba(76, 175, 80, 0.2);
    color: #4CAF50;
    border: 1px solid #4CAF50;
    display: block;
}

.mensaje.error {
    background-color: rgba(244, 67, 54, 0.2);
    color: #f44336;
    border: 1px solid #f44336;
    display: block;
}

.search-container {
    margin-bottom: 20px;
}

#search-input {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #333;
    background-color: #2d2d2d;
    color: #fff;
    border-radius: 4px;
}

#search-input:focus {
    border-color: #00e5ff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 229, 255, 0.5);
}

@media (max-width: 768px) {
    .container {
        width: 95%;
        padding: 10px;
    }

    th, td {
        padding: 8px;
        font-size: 14px;
    }

    .edit-btn, .delete-btn, .renew-btn {
        padding: 4px 8px;
        font-size: 12px;
    }
}

.btn-logout {
    background-color: #f44336;
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    font-size: 14px;
    transition: background-color 0.3s;
}

.btn-logout:hover {
    background-color: #d32f2f;
}

.form-control {
    margin-bottom: 10px;
}

.is-invalid {
    border-color: #f44336;
}

.invalid-feedback {
    color: #f44336;
    font-size: 14px;
    margin-top: 5px;
}

form p {
    margin-top: 15px;
    text-align: center;
}

form p a {
    color: #00e5ff;
    text-decoration: none;
}

form p a:hover {
    text-decoration: underline;
    color: #00b8cc;
}

/* Estilos para usuarios */
.user-info {
    background-color: rgba(0, 229, 255, 0.1);
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 3px solid #00e5ff;
}

.user-info p {
    margin: 0;
    font-weight: bold;
}

/* Estilo para la paginación */
.pagination {
    display: flex;
    justify-content: center;
    list-style: none;
    margin-top: 20px;
}

.pagination li {
    margin: 0 5px;
}

.pagination a {
    padding: 8px 12px;
    border: 1px solid #333;
    color: #fff;
    background-color: #1e1e1e;
    text-decoration: none;
    border-radius: 4px;
}

.pagination a.active {
    background-color: #00e5ff;
    color: #000;
    border-color: #00e5ff;
}

.pagination a:hover:not(.active) {
    background-color: #2a2a2a;
}

/* Estilos para el contador de suscripciones */
.subscription-count {
    background-color: #000000;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    text-align: center;
    border-bottom: 2px solid #00e5ff;
}

.subscription-count span {
    font-weight: bold;
    font-size: 1.2em;
    color: #00e5ff;
}

/* Estilos para la gestión de servicios */
.select-container {
    display: flex;
    align-items: center;
}

.select-container select {
    flex-grow: 1;
    margin-right: 10px;
}

.btn-add-service {
    background-color: #00e5ff;
    color: #000;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    font-size: 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-weight: bold;
}

.btn-add-service:hover {
    background-color: #00b8cc;
}

.services-section {
    margin-top: 20px;
}

.services-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.services-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.service-item {
    display: flex;
    align-items: center;
    background-color: #2a2a2a;
    padding: 8px 12px;
    border-radius: 4px;
    border-left: 2px solid #00e5ff;
}

.service-name {
    margin-right: 10px;
    color: #fff;
}

.service-delete {
    background-color: transparent;
    color: #f44336;
    border: none;
    cursor: pointer;
    font-size: 16px;
    padding: 0 5px;
}

.service-delete:hover {
    color: #d32f2f;
}

.add-service-form {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.add-service-form input {
    flex-grow: 1;
    padding: 8px;
    border: 1px solid #333;
    background-color: #2d2d2d;
    color: #fff;
    border-radius: 4px;
}

.add-service-form input:focus {
    border-color: #00e5ff;
    outline: none;
}

.add-service-form button {
    width: auto;
}

/* Modal para confirmar eliminación */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
}

.modal-content {
    background-color: #1e1e1e;
    margin: 15% auto;
    padding: 20px;
    border-radius: 5px;
    width: 80%;
    max-width: 500px;
    border-left: 3px solid #00e5ff;
}

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

.close:hover {
    color: #00e5ff;
}

.modal-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.btn-delete {
    background-color: #f44336;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.btn-cancel {
    background-color: #555;
    color: white;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.btn-delete:hover {
    background-color: #d32f2f;
}

.btn-cancel:hover {
    background-color: #444;
}

/* Estilos para el enlace de WhatsApp */
.whatsapp-link {
    display: flex;
    align-items: center;
    color: #25D366;
    text-decoration: none;
    font-weight: bold;
}

.whatsapp-link:hover {
    text-decoration: underline;
}

.whatsapp-icon {
    margin-left: 5px;
    display: inline-block;
    width: 20px;
    height: 20px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path fill="%2325D366" d="M380.9 97.1C339 55.1 283.2 32 223.9 32c-122.4 0-222 99.6-222 222 0 39.1 10.2 77.3 29.6 111L0 480l117.7-30.9c32.4 17.7 68.9 27 106.1 27h.1c122.3 0 224.1-99.6 224.1-222 0-59.3-25.2-115-67.1-157zm-157 341.6c-33.2 0-65.7-8.9-94-25.7l-6.7-4-69.8 18.3L72 359.2l-4.4-7c-18.5-29.4-28.2-63.3-28.2-98.2 0-101.7 82.8-184.5 184.6-184.5 49.3 0 95.6 19.2 130.4 54.1 34.8 34.9 56.2 81.2 56.1 130.5 0 101.8-84.9 184.6-186.6 184.6zm101.2-138.2c-5.5-2.8-32.8-16.2-37.9-18-5.1-1.9-8.8-2.8-12.5 2.8-3.7 5.6-14.3 18-17.6 21.8-3.2 3.7-6.5 4.2-12 1.4-32.6-16.3-54-29.1-75.5-66-5.7-9.8 5.7-9.1 16.3-30.3 1.8-3.7.9-6.9-.5-9.7-1.4-2.8-12.5-30.1-17.1-41.2-4.5-10.8-9.1-9.3-12.5-9.5-3.2-.2-6.9-.2-10.6-.2-3.7 0-9.7 1.4-14.8 6.9-5.1 5.6-19.4 19-19.4 46.3 0 27.3 19.9 53.7 22.6 57.4 2.8 3.7 39.1 59.7 94.8 83.8 35.2 15.2 49 16.5 66.6 13.9 10.7-1.6 32.8-13.4 37.4-26.4 4.6-13 4.6-24.1 3.2-26.4-1.3-2.5-5-3.9-10.5-6.6z"></path></svg>');
    background-repeat: no-repeat;
    vertical-align: middle;
}

/* Estilos para el header mejorado */
header {
    background: #000000;
    color: #ffffff;
    padding: 1rem;
    margin-bottom: 2rem;
    border-radius: 5px;
    border-bottom: 3px solid #00e5ff;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
}

.logo-container {
    flex: 0 0 auto;
    margin-right: 15px;
    display: flex;
    align-items: center;
}

.header-logo {
    max-height: 100px; /* Aumentado de 60px a 100px */
    width: auto;
    border-radius: 5px;
    display: block; /* Asegura que la imagen se muestre correctamente */
}

.header-title {
    flex: 1 1 auto;
    text-align: center;
}

.header-title h1 {
    color: #ffffff;
    position: relative;
    display: inline-block;
}

.header-title h1:after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: #00e5ff;
}

.user-welcome {
    flex: 0 0 auto;
    text-align: right;
    margin-left: 15px;
}

/* Estilos del footer */
footer {
    flex-shrink: 0;
    background-color: #000000;
    text-align: center;
    padding: 20px 0;
    width: 100%;
    margin-top: auto;
    border-top: 3px solid #00e5ff;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding: 0 20px;
}

.footer-info {
    flex: 1;
}

footer p {
    margin: 0;
    color: #fff;
}

footer a {
    color: #00e5ff;
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
    color: #00b8cc;
}

.footer-line {
    height: 2px;
    background-color: #00e5ff;
    width: 50%;
    margin: 15px auto 0;
    opacity: 0.5;
}

/* Estilos para el botón de agregar usuario y la sección de tabla */
.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 20px;
}

.table-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-container {
    margin-bottom: 0;
}

.btn-add-user {
    background-color: #00e5ff;
    color: #000;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
    display: flex;
    align-items: center;
}

.btn-add-user::before {
    content: "+";
    margin-right: 5px;
    font-size: 18px;
    font-weight: bold;
}

.btn-add-user:hover {
    background-color: #00b8cc;
}

/* Estilos para el modal del formulario de suscripción */
.subscription-form-modal {
    width: 90%;
    max-width: 700px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    margin-top: 5%;
    background-color: #1e1e1e;
    border-left: 3px solid #00e5ff;
}

/* Estilos para el modal de servicios */
.services-form-modal {
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 25px;
    margin-top: 5%;
    background-color: #1e1e1e;
    border-left: 3px solid #00e5ff;
}

/* Ajustar estilos de servicios para modal */
.services-container {
    margin-top: 15px;
}

.services-list {
    background-color: #2a2a2a;
    border-radius: 4px;
    padding: 15px;
    min-height: 100px;
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
}

.services-list:empty::before {
    content: "No hay servicios agregados";
    display: block;
    color: #888;
    text-align: center;
    padding: 20px 0;
}

/* Estilos para mostrar/ocultar correos adicionales */
.email-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.email-list-item {
    margin-bottom: 3px;
}

.hidden-email {
    display: none;
}

.toggle-emails-btn {
    color: #00e5ff;
    background: none;
    border: none;
    padding: 5px 0;
    cursor: pointer;
    font-size: 14px;
    text-decoration: underline;
}

.toggle-emails-btn:hover {
    color: #00b8cc;
}

.emails-container {
    display: flex;
    flex-direction: column;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .logo-container, .header-title, .user-welcome {
        margin: 5px 0;
        text-align: center;
    }
    
    .header-logo {
        margin: 0 auto 10px;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .footer-info, .footer-links {
        text-align: center;
        width: 100%;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .table-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .table-actions {
        width: 100%;
        flex-direction: column;
        margin-top: 10px;
    }
    
    .search-container, .btn-add-user {
        width: 100%;
    }
    
    .subscription-form-modal {
        width: 95%;
        padding: 15px;
    }
}

/* Estilos para el login */
.login-container {
    max-width: 500px;
    margin: 0 auto;
}

/* Estilos adicionales para el formulario de login */
.form-section {
    border-top: 3px solid #00e5ff;
    border-left: none;
}

/* Clase para botones de acción principales */
.btn-primary {
    background-color: #00e5ff;
    color: #000;
}

.btn-primary:hover {
    background-color: #00b8cc;
}

/* Clase para los títulos de secciones */
.section-title {
    position: relative;
    padding-bottom: 10px;
    margin-bottom: 20px;
}

.section-title:after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 3px;
    background-color: #00e5ff;
}