* {
    box-sizing: border-box;
    font-family: 'Segoe UI', sans-serif;
}

/* Fondo con imagen */
body {
    min-height: 100vh;
    margin: 0;
    background: url('../img/login-bg.png') center / cover no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Capa difuminada */
.login-container {
    width: 100%;
    height: 100%;
    backdrop-filter: blur(8px);
    background: rgba(0,0,0,0.35);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Caja login */
.login-box {
    width: 100%;
    max-width: 380px;
    padding: 2.5rem;
    background: rgba(255,255,255,0.12);
    border-radius: 18px;
    backdrop-filter: blur(20px);
    box-shadow: 0 25px 45px rgba(0,0,0,0.4);
    color: white;
    animation: zoomIn 0.8s ease;
}

/* Animación entrada */
@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.85);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.login-box h2 {
    text-align: center;
    margin-bottom: 1.8rem;
}

/* Inputs */
.input-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.input-group input {
    width: 100%;
    padding: 12px 10px;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255,255,255,0.4);
    color: white;
    font-size: 16px;
    outline: none;
}

.input-group label {
    position: absolute;
    top: 50%;
    left: 10px;
    color: rgba(255,255,255,0.7);
    font-size: 14px;
    pointer-events: none;
    transform: translateY(-50%);
    transition: 0.3s ease;
}

/* Label animado */
.input-group input:focus + label,
.input-group input:valid + label {
    top: -8px;
    font-size: 12px;
    color: #38bdf8;
}

/* Botón */
button {
    width: 100%;
    padding: 12px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: white;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(56,189,248,0.45);
}

/* Error */
.error {
    background: rgba(239,68,68,0.2);
    border: 1px solid rgba(239,68,68,0.6);
    color: #fecaca;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    margin-bottom: 1rem;
    animation: shake 0.4s;
}

@keyframes shake {
    0% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    50% { transform: translateX(5px); }
    75% { transform: translateX(-5px); }
    100% { transform: translateX(0); }
}
