/* Paleta profesional Castella Sagarra */
:root{
    --azul:#062A4F;
    --azul-profundo:#0B3A67;
    --amarillo:#F2B705;
    --gris:#F5F7FA;
    --superficie:#FFFFFF;
    --borde:#D9E1EA;
    --texto:#1F2937;
    --rojo:#B42318;
    --rojo-suave:#FEF2F2;
}

*{
    box-sizing:border-box;
    font-family:Arial,sans-serif;
}

html{
    scroll-behavior:smooth;
}

body{
    margin:0;
    background:#F5F7FA;
    color:#1F2937;
    min-height:100vh;
    min-height:100dvh;
    display:flex;
    justify-content:center;
    align-items:center;
    padding:24px;
    overflow-x:hidden;
}

.login-container{
    width:100%;
    max-width:420px;
    background:#fff;
    padding:35px;
    border-radius:15px;
    box-shadow:0 10px 30px rgba(0,0,0,.2);
    border:1px solid #D9E1EA;
}

.logo{
    display:flex;
    align-items:center;
    justify-content:center;
    margin-bottom:25px;
}

.logo img{
    width:60px;
    height:60px;
    object-fit:contain;
    flex:0 0 auto;
    margin-right:10px;
}

.logo h2{
    margin:0;
    font-size:22px;
    color:#062A4F;
    line-height:1.1;
    overflow-wrap:anywhere;
}

.logo span{
    display:block;
    font-size:11px;
    letter-spacing:2px;
    color:#062A4F;
}

h3{
    text-align:center;
    margin:0 0 20px;
    color:#062A4F;
    font-size:18px;
}

input{
    width:100%;
    min-height:50px;
    margin-bottom:15px;
    border:1px solid #D9E1EA;
    border-radius:10px;
    padding:0 12px;
    font-size:15px;
    background:#fff;
    color:#1F2937;
    outline:none;
    transition:border-color .18s ease, box-shadow .18s ease;
}

input:focus{
    border-color:var(--azul-profundo);
    box-shadow:0 0 0 3px rgba(11,58,103,.12);
}

button{
    width:100%;
    min-height:50px;
    border:none;
    border-radius:10px;
    background:var(--azul-profundo);
    color:#fff;
    font-weight:bold;
    font-size:15px;
    cursor:pointer;
    transition:background .2s ease, color .2s ease, transform .12s ease;
}

button:hover{
    background:var(--azul);
    color:#fff;
}

button:active{
    transform:translateY(1px);
}

.error{
    background:#FEF2F2;
    color:#B42318;
    padding:10px;
    border-radius:8px;
    margin-bottom:15px;
    font-size:14px;
    text-align:center;
    line-height:1.4;
    overflow-wrap:anywhere;
}

label{
    display:block;
    margin-bottom:8px;
    font-size:14px;
    font-weight:bold;
}

.auth-description,
.auth-note{
    line-height:1.55;
    font-size:14px;
    margin:0 0 20px;
}

.auth-note{
    color:#526173;
    font-size:13px;
    margin-top:20px;
}

.auth-links{
    margin:22px 0 0;
    text-align:center;
    font-size:14px;
    line-height:1.5;
}

.auth-links a{
    color:var(--azul-profundo);
    text-underline-offset:3px;
}

.auth-help{
    color:#526173;
    font-size:13px;
    line-height:1.5;
    margin:0 0 20px;
}

.auth-help ul{
    padding-left:20px;
    margin:0;
}

.error ul{
    list-style:none;
    padding:0;
    margin:0;
}

.auth-button{
    display:flex;
    align-items:center;
    justify-content:center;
    min-height:50px;
    padding:12px;
    border-radius:10px;
    background:var(--azul-profundo);
    color:#fff;
    font-size:15px;
    font-weight:bold;
    text-align:center;
    text-decoration:none;
}

.auth-button:hover{
    background:var(--azul);
}

button:focus-visible,
a:focus-visible{
    outline:3px solid var(--amarillo);
    outline-offset:3px;
}

@media(max-width:600px){
    body{
        align-items:flex-start;
        padding:18px 14px;
    }

    .login-container{
        max-width:none;
        padding:26px 18px;
        border-radius:14px;
        box-shadow:0 8px 22px rgba(0,0,0,.14);
    }

    .logo{
        gap:9px;
        margin-bottom:22px;
    }

    .logo img{
        width:52px;
        height:52px;
        margin-right:0;
    }

    .logo span{
        font-size:10px;
        letter-spacing:1.5px;
    }

    .logo h2{
        font-size:18px;
    }

    h3{
        font-size:17px;
        margin-bottom:18px;
    }

    input,
    button{
        min-height:48px;
        font-size:14px;
    }
}

@media(max-width:380px){
    .login-container{
        padding:22px 14px;
    }

    .logo{
        align-items:flex-start;
    }

    .logo img{
        width:46px;
        height:46px;
    }

    .logo h2{
        font-size:16px;
    }

    .logo span{
        font-size:9px;
        letter-spacing:1.2px;
    }
}

@media(max-height:520px) and (orientation:landscape){
    body{
        align-items:flex-start;
        padding-top:14px;
        padding-bottom:14px;
    }

    .login-container{
        padding:20px;
    }

    .logo{
        margin-bottom:14px;
    }

    h3{
        margin-bottom:14px;
    }
}

@media(prefers-reduced-motion:reduce){
    *,
    *::before,
    *::after{
        scroll-behavior:auto !important;
        animation-duration:.01ms !important;
        animation-iteration-count:1 !important;
        transition-duration:.01ms !important;
    }
}
