/* styles-login-register.css */

/* Estilo para el fondo con degradado */
body {
    margin: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom, #87CEFA, #FFFFFF);
    font-family: 'Arial', sans-serif;
}

/* Navbar */
.navbar {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2000;
    display: flex;
    gap: 0.25rem;
    background-color: rgba(55, 65, 81, 0.5); /* bg-gray-900/50 */
    backdrop-filter: blur(5px); /* backdrop-blur-md */
    padding: 0.125rem 1rem; /* px-4 py-0.5 */
    border-radius: 9999px; /* rounded-full */
    font-size: 1.25rem; /* text-xl */
    align-items: center;
}

.nav-link {
    padding: 0.125rem 1rem; /* py-0.5 px-4 */
    border-radius: 9999px; /* rounded-full */
    transition: color 0.3s ease-in-out;
    text-decoration: none;
    color: white;
}

.nav-link:hover {
    color: #38bdf8; /* hover:text-sky-300 */
}

/* Contenedor principal */
.container {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    width: 100%;
}

/* Panel de login */
.login-panel {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
    text-align: center;
    transform: scale(0.8);
    opacity: 0;
    animation: fadeIn 1s forwards;
}

.login-panel h2 {
    margin-bottom: 20px;
    font-size: 24px;
    color: #333;
}



/* Estilo para inputs, botones y selectores */
input[type="number"] {
    -moz-appearance: textfield; /* Elimina las flechas en Firefox */
    -webkit-appearance: none; /* Elimina las flechas en Safari y Chrome */
    appearance: none; /* Asegura compatibilidad con navegadores modernos */
    width: 100%; /* Ajusta el ancho del campo */
    padding: 10px; /* Espaciado interno */
    font-size: 16px; /* Tamaño del texto */
    border: 1px solid #ccc; /* Borde */
    border-radius: 4px; /* Bordes redondeados */
    box-sizing: border-box; /* Asegura que el padding no afecte el ancho total */
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none; /* Elimina las flechas en navegadores basados en WebKit */
    margin: 0; /* Evita cualquier espacio extra */
}

.login-panel input[type="text"],
.login-panel input[type="password"],
.login-panel input[type="email"],
.login-panel select,
.login-panel button {
    width: 100%; /* Asegura que el ancho sea del 100% */
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 16px;
    background-color: #fff;
    box-sizing: border-box; /* Incluye padding y borde en el ancho total */
}

/* Estilo para selectores múltiples */
.login-panel select[multiple] {
    height: 100px;
    overflow: auto;
}

/* Botón de registro */
.login-panel button {
    background-color: #3498db;
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.login-panel button:hover {
    background-color: #2980b9;
}


/* Contenedor del selector (Delegaciones y Marcas) */
.delegacion-container, .marca-container {
    display: flex;
    align-items: center;
    justify-content: space-around;
    margin: 20px 0;
}

/* Estilo para cada lista (Delegaciones y Marcas) */
.delegacion-list, .marca-list {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.delegacion-list select, .marca-list select {
    width: 200px;
    height: 150px;
    border: 1px solid #ccc;
    border-radius: 5px;
    padding: 5px;
    background: white;
}

/* Etiquetas de los select */
.delegacion-list label, .marca-list label {
    margin-bottom: 10px;
    font-weight: bold;
    color: #333;
}

/* Botones para mover Delegaciones y Marcas */
.delegacion-buttons, .marca-buttons {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 10px;
}

/* Botones de acción */
.delegacion-buttons button, .marca-buttons button {
    padding: 5px 10px;
    font-size: 18px;
    cursor: pointer;
    border: none;
    background-color: #3498db;
    color: white;
    border-radius: 5px;
    transition: 0.3s ease;
}

.delegacion-buttons button:hover, .marca-buttons button:hover {
    background-color: #2980b9;
}


/* Ajustes específicos para la página de registro */
.register-panel {
    max-width: 400px; /* Hacemos el panel de registro más compacto */
    padding: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow-y: auto; /* Agregamos el scroll vertical */
    max-height: 90vh; /* Limitamos la altura para que el contenido no se salga */
    scrollbar-width: thin; /* Para navegadores que soportan esta propiedad */
    scrollbar-color: #2980b9 transparent; /* Color personalizado para el scroll */
}

/* Personalización del scroll en navegadores basados en WebKit */
.register-panel::-webkit-scrollbar {
    width: 8px;
}

.register-panel::-webkit-scrollbar-thumb {
    background-color: #2980b9;
    border-radius: 10px;
}

.register-panel::-webkit-scrollbar-track {
    background-color: transparent;
}

/* Estilo para inputs y selectores en el panel de registro */
.register-panel input[type="text"],
.register-panel input[type="password"],
.register-panel input[type="email"],
.register-panel select {
    width: 100%;
    padding: 8px;
    margin: 5px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    font-size: 14px;
    box-sizing: border-box; /* Asegura que el padding y el border no afecten al ancho */
}

/* Estilo específico para selectores múltiples */
.register-panel select[multiple] {
    height: 100px;
    overflow: auto;
}

/* Ajustes para listas de delegación */
.register-panel .delegacion-list select {
    width: 150px;
    height: 120px;
}

/* Botones para mover delegaciones */
.register-panel .delegacion-buttons button {
    padding: 5px 8px;
    font-size: 14px;
}

#errorMessage {
    background-color: #f8d7da;
    color: #842029;
    border: 1px solid #f5c2c7;
    padding: 10px;
    margin-top: 10px;
    border-radius: 5px;
    font-size: 14px;
}
#errorMessage::before {
    content: "⚠️";
    font-size: 18px;
}

/* Estilos para el modal */
.modal {
    display: none; /* Inicialmente oculto */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    justify-content: center;
    align-items: center;
}

.modal-content {
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
}

.modal button {
    background-color: #4CAF50;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
}

.modal button:hover {
    background-color: #45a049;
}

/* Estilos para los botones de acción */
.action-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    background-color: #007BFF;
    color: white;
    cursor: pointer;
    font-size: 16px;
}

.btn:hover {
    background-color: #0056b3;
}

/* Estilo para la barra de fortaleza */
.password-strength-bar {
    width: 100%;
    height: 5px;
    background-color: #ddd;
    margin-top: 10px;
}
.password-strength-bar div {
    height: 100%;
}
.strength-weak {
    background-color: red;
}
.strength-medium {
    background-color: orange;
}
.strength-strong {
    background-color: green;
}

/* Panel de administración */
.admin-panel {
    background-color: rgba(255, 255, 255, 0.9);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    width: 90%;
    max-width: 1200px;
    overflow-x: auto;
}

.admin-panel h2 {
    margin-bottom: 20px;
    font-size: 28px;
    text-align: center;
    color: #333;
}

/* Estilo de la tabla */
.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.user-table th, .user-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.user-table th {
    background-color: #3498db;
    color: white;
    font-size: 16px;
}

.user-table tr:nth-child(even) {
    background-color: #f4f6f7;
}

.user-table tr:hover {
    background-color: #f1f1f1;
}

.user-table td {
    font-size: 14px;
}

.user-table .btn-view {
    padding: 6px 12px;
    background-color: #2980b9;
    color: white;
    border-radius: 5px;
    text-decoration: none;
    font-size: 14px;
}

.user-table .btn-view:hover {
    background-color: #21618c;
}
/* Animaciones */
@keyframes fadeIn {
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Medios - Estilo responsive para pantallas pequeñas */
@media screen and (max-width: 768px) {
    /* Panel de administración */
    .admin-panel {
        padding: 20px;
        width: 100%;
        max-width: none;
    }

    .admin-panel h2 {
        font-size: 24px;
    }

    /* Tabla responsiva */
    .user-table {
        font-size: 12px;
        overflow-x: scroll;
    }

    .user-table th, .user-table td {
        padding: 8px;
    }

    /* Botón de ver configuración */
    .user-table .btn-view {
        padding: 5px 10px;
        font-size: 12px;
    }

    /* Botones de acción */
    .action-buttons {
        flex-direction: column;
        gap: 10px;
    }

    .btn {
        width: 100%;
        padding: 12px;
        font-size: 14px;
    }
}

/* Medios - Para dispositivos más pequeños */
@media screen and (max-width: 480px) {
    .user-table {
        font-size: 10px;
    }

    .user-table th, .user-table td {
        padding: 6px;
    }

    /* Botón de ver configuración */
    .user-table .btn-view {
        font-size: 10px;
        padding: 4px 8px;
    }

    .btn {
        font-size: 12px;
    }
}