* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fondo principal con imagen de portada */
body {
    font-family: 'Nunito', sans-serif;
    min-height: 100vh;
    background-image: url("../../imageness/fondoComi.jpeg");
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    position: relative;
}

/* Capa encima del fondo para mejorar contraste del formulario */
.overlay {
    position: fixed;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255, 231, 170, 0.9) 0%,
        rgba(255, 224, 172, 0.9) 100%
    );
    backdrop-filter: blur(1px);
    z-index: 0;
}

/* Tarjeta central del login */
.login-wrapper {
    width: 150%;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
    position: relative;
    z-index: 1;
}

.login-card {
    width: 100%;
    max-width: 430px;
    background: rgba(255, 248, 240, 0.88);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(157, 105, 52, 0.18);
    border-radius: 28px;
    padding: 36px 30px;
    box-shadow: 0 20px 45px rgba(157, 105, 52, 0.18);
    animation: aparecer 0.8s ease;
    position: relative;
}

@media (max-width: 768px) {
    .login-card { padding: 30px 24px; }
    .login-header h1 { font-size: 1.8rem; }
}

@keyframes aparecer {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.97);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.logo-login {
width: 250px;
height: auto;
display: block;
margin: 0 auto 12px auto;
filter: drop-shadow(0 8px 15px rgba(0,0,0,0.15));
}

.login-header h1 {
    color: #9D6934;
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
}

.login-header p {
    color: #7b5330;
    font-size: 0.98rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
    position: relative;
}

.campo {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.campo label {
    font-size: 0.96rem;
    font-weight: 700;
    color: #9D6934;
    display: flex;
    align-items: center;
    gap: 8px;
}

.campo input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #EDBCA8;
    border-radius: 16px;
    background: rgba(255, 253, 248, 0.96);
    font-size: 1rem;
    color: #5f3a1f;
    outline: none;
    transition: all 0.25s ease;
}

.campo input:focus {
    border-color: #9D6934;
    box-shadow: 0 0 0 4px rgba(157, 105, 52, 0.12);
    transform: translateY(-1px);
}

.campo input::placeholder {
    color: #b88b66;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    padding-right: 52px;
}

.toggle-password {
    position: absolute;
    top: 50%;
    right: 14px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #9D6934;
    font-size: 1.1rem;
    cursor: pointer;
    transition: color 0.2s ease, transform 0.2s ease;
}

.toggle-password:hover {
    color: #C21514;
    transform: translateY(-50%) scale(1.06);
}

.btn-login {
    margin-top: 8px;
    border: none;
    border-radius: 14px;
    background: linear-gradient(75deg, #C21514, #9D6934);
    color: #fff;
    padding: 11px 14px;
    font-size: 0.92rem;
    font-weight: 500;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.28s ease, left 0.12s ease, top 0.12s ease;
    box-shadow: 0 12px 24px rgba(194, 21, 20, 0.22);
    position: relative;
    overflow: hidden;
    width: fit-content;
    min-width: 180px;
    align-self: center;
}

.btn-login:hover {
    box-shadow: 0 16px 28px rgba(194, 21, 20, 0.28);
}

.btn-login:active {
    transform: scale(0.98);
}

.btn-login.locked {
    position: relative;
}

.btn-login.ready:hover {
    transform: translateY(-2px);
}

.btn-text,
.btn-loader {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
}

.btn-loader {
    display: none;
}

.btn-login.loading .btn-text {
    display: none;
}

.btn-login.loading .btn-loader {
    display: flex;
}

/* Mensajes de estado debajo del boton */
.mensaje {
    margin-top: 18px;
    text-align: center;
    font-size: 0.96rem;
    font-weight: 700;
    min-height: 24px;
}

.mensaje.error {
    color: #C21514;
}

.mensaje.warning {
    color: #b26c00;
}

.mensaje.success {
    color: #2e7d32;
}

.registro-link {
    text-align: center;
    margin-top: 18px;
    color: #7b5330;
    font-size: 0.95rem;
}

.registro-link a {
    color: #C21514;
    text-decoration: none;
    font-weight: 800;
}

.registro-link a:hover {
    text-decoration: underline;
}

/* Ajustes para pantallas pequenas */
@media (max-width: 480px) {
    .login-card {
        padding: 28px 20px;
        border-radius: 22px;
    }

    .login-header h1 {
        font-size: 1.7rem;
    }

    .logo-login {
height: 70px;
    margin-bottom: 1rem;
    }
}