/* ============================================
   estilo.css
   Estética: profesional, limpia y con un toque
   musical (pentagrama sutil de fondo), pensada
   para acompañar la línea visual de
   practicamusica.es
   ============================================ */

:root {
    --azul-principal: #1f3a5f;   /* Azul profundo, tipo pizarra/partitura */
    --azul-claro: #3f6a9f;
    --dorado: #d4a537;           /* Acento cálido, tipo clave de sol */
    --gris-texto: #3a3a3a;
    --gris-suave: #6b6b6b;
    --fondo: #f4f6f9;
    --blanco: #ffffff;
    --rojo-error: #b3392c;
    --sombra: rgba(31, 58, 95, 0.15);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Poppins', Arial, Helvetica, sans-serif;
    color: var(--gris-texto);
    background-color: var(--fondo);
    /* Pentagrama sutil de fondo, hecho solo con CSS */
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 38px,
        rgba(31, 58, 95, 0.06) 39px,
        rgba(31, 58, 95, 0.06) 40px
    );
    padding: 20px;
}

.tarjeta-login {
    background: var(--blanco);
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--sombra);
    padding: 40px 32px;
    text-align: center;
    position: relative;
    border-top: 5px solid var(--dorado);
}

.tarjeta-login .icono-clave {
    font-size: 42px;
    color: var(--azul-principal);
    margin-bottom: 8px;
    display: block;
}

.tarjeta-login h1 {
    font-size: 22px;
    color: var(--azul-principal);
    margin: 0 0 4px;
}

.tarjeta-login p.subtitulo {
    font-size: 14px;
    color: var(--gris-suave);
    margin: 0 0 28px;
}

.campo {
    text-align: left;
    margin-bottom: 20px;
}

.campo label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--azul-principal);
    margin-bottom: 6px;
}

.campo input[type="email"],
.campo select {
    width: 100%;
    padding: 12px 14px;
    font-size: 15px;
    font-family: inherit;
    border: 1.5px solid #d7dde5;
    border-radius: 10px;
    background-color: var(--fondo);
    color: var(--gris-texto);
    transition: border-color 0.2s, box-shadow 0.2s;
}

.campo input[type="email"]:focus,
.campo select:focus {
    outline: none;
    border-color: var(--azul-claro);
    box-shadow: 0 0 0 3px rgba(63, 106, 159, 0.18);
}

.boton-entrar {
    width: 100%;
    padding: 13px;
    font-size: 15px;
    font-weight: 600;
    color: var(--blanco);
    background-color: var(--azul-principal);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.boton-entrar:hover {
    background-color: var(--azul-claro);
}

.boton-entrar:active {
    transform: scale(0.98);
}

.boton-entrar:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* --- Pantalla de error (sustituye a la tarjeta durante 5s) --- */

.tarjeta-error {
    display: none;
    background: var(--blanco);
    width: 100%;
    max-width: 400px;
    border-radius: 16px;
    box-shadow: 0 10px 30px var(--sombra);
    padding: 40px 32px;
    text-align: center;
    border-top: 5px solid var(--rojo-error);
}

.tarjeta-error.visible {
    display: block;
}

.tarjeta-login.oculta {
    display: none;
}

.tarjeta-error .icono-error {
    font-size: 40px;
    margin-bottom: 12px;
    display: block;
}

.tarjeta-error h2 {
    font-size: 18px;
    color: var(--rojo-error);
    margin: 0 0 10px;
}

.tarjeta-error p {
    font-size: 14px;
    color: var(--gris-texto);
    line-height: 1.5;
    margin: 0 0 18px;
}

.barra-tiempo {
    height: 4px;
    width: 100%;
    background: #eee;
    border-radius: 4px;
    overflow: hidden;
}

.barra-tiempo span {
    display: block;
    height: 100%;
    width: 100%;
    background: var(--rojo-error);
    animation: vaciar 5s linear forwards;
}

@keyframes vaciar {
    from { width: 100%; }
    to { width: 0%; }
}

.pie {
    margin-top: 22px;
    font-size: 12px;
    color: var(--gris-suave);
}
