body {
    background-color: #0a1128;
    color: #ffffff;
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Centrado del contenido */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: calc(100vh - 160px);
    padding: 80px 20px;
    margin: 0 auto;
    overflow-y: auto;
    position: relative;
    width: 100%;
    max-width: 1200px;
}

/* Tarjeta de login/registro */
.login-card {
    background-color: #1e293b;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 0 15px rgba(0, 255, 255, 0.08);
    width: 100%;
    max-width: 420px;
    margin: 20px auto;
    position: relative;
}

/* Scroll personalizado */
.login-wrapper::-webkit-scrollbar {
    width: 8px;
}

.login-wrapper::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
}

.login-wrapper::-webkit-scrollbar-thumb {
    background: rgba(56, 189, 248, 0.5);
    border-radius: 4px;
}

.login-wrapper::-webkit-scrollbar-thumb:hover {
    background: rgba(56, 189, 248, 0.7);
}

/* Título */
.login-card h2 {
    text-align: center;
    margin-bottom: 25px;
    color: #38bdf8;
    font-size: 1.7rem;
}

/* Campos */
.form-field {
    margin-bottom: 20px;
}

form input[type="text"],
form input[type="password"],
form input[type="email"],
form select {
    width: 100%;
    padding: 12px;
    margin-top: 8px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
}

form input:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

form label {
    font-weight: 600;
    color: #f1f5f9;
    display: block;
    margin-bottom: 5px;
}

/* Mensajes de error */
.error-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 5px;
}

.help-text {
    color: #94a3b8;
    font-size: 0.875rem;
    margin-top: 5px;
    display: block;
}

/* Mensajes del sistema */
.messages {
    margin-bottom: 20px;
}

.alert {
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.1);
    border: 1px solid #22c55e;
    color: #22c55e;
}

.alert-error {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    color: #ef4444;
}

/* Link de registro */
.link-registro {
    color: #60a5fa;
    text-decoration: none;
    display: inline-block;
    margin-top: 10px;
}

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

.btn-iniciar-sesion {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(90deg, #22c55e, #16a34a);
    border: none;
    border-radius: 8px;
    color: white;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 4px 10px rgba(34, 197, 94, 0.3);
}

.btn-iniciar-sesion:hover {
    transform: scale(1.03);
    box-shadow: 0 6px 15px rgba(34, 197, 94, 0.5);
}

/* Estilos específicos para el formulario de registro */
.error-messages {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #1e293b;
    padding: 15px;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-width: 300px;
    z-index: 1000;
}

.error-messages .error-message {
    padding: 8px 12px;
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid #ef4444;
    border-radius: 6px;
    margin-bottom: 8px;
}

.error-messages .error-message:last-child {
    margin-bottom: 0;
}

/* Media queries para responsividad */
@media (max-width: 768px) {
    .login-wrapper {
        padding: 60px 15px;
    }

    .login-card {
        padding: 30px 20px;
    }
}

@media (max-height: 600px) {
    .login-wrapper {
        padding: 40px 15px;
    }
}

/* Grupo de input con botón de mostrar contraseña */
.input-group {
    position: relative;
    display: flex;
    align-items: center;
}

.input-group input {
    padding-right: 40px; /* Espacio para el botón */
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s ease;
}

.toggle-password:hover {
    color: #38bdf8;
}

.toggle-password:focus {
    outline: none;
    color: #38bdf8;
}

.toggle-password i {
    font-size: 1.1rem;
}

/* Asegurarse que el input de contraseña tenga el mismo ancho */
.password-input {
    width: 100%;
}

/* Secciones del formulario */
.form-section {
    margin-bottom: 30px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-section h3 {
    color: #38bdf8;
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Filas de formulario */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 15px;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* Campos de selección */
select {
    width: 100%;
    padding: 12px;
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid #334155;
    border-radius: 8px;
    color: white;
    font-size: 1rem;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 16px;
    padding-right: 35px;
}

select:focus {
    outline: none;
    border-color: #38bdf8;
    box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

/* Ajustes para la tarjeta de login en el registro */
.login-card {
    max-width: 600px;
    margin: 20px auto;
}
