/* olvido_clave.css */
@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    background: url('../imagenes/fondo.jpg') center center / cover no-repeat fixed;
    display: flex;
    flex-direction: column;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-color: rgba(13, 71, 161, 0.62);
    z-index: 0;
}

/* ── Barra superior ── */
.barra-superior {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 3.2vw;
    background-color: #1565c0;
    display: flex;
    align-items: center;
    padding: 0 2vw;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.barra-izq {
    color: #fff;
    text-decoration: none;
    font-size: 0.97vw;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.3vw;
}

.barra-izq:hover {
    text-decoration: none;
    font-weight: 700;
}

.barra-izq .material-icons {
    font-size: 1.2vw;
}

/* ── Wrapper ── */
.login-wrapper {
    position: relative;
    z-index: 1;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 3.2vw;
}

/* ── Card ── */
.login-card {
    background: #fff;
    border-radius: 1vw;
    padding: 2.5vw 3vw;
    width: 30vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    gap: 1.2vw;
}

.card-logo {
    text-align: center;
}

.card-logo img {
    width: 10vw;
}

.card-titulo {
    font-size: 1.4vw;
    font-weight: 700;
    color: #1565c0;
    text-align: center;
}

.card-descripcion {
    font-size: 0.9vw;
    color: #555;
    text-align: center;
    line-height: 1.5;
}

.campo-grupo {
    display: flex;
    flex-direction: column;
    gap: 0.4vw;
}

.campo-grupo label {
    font-size: 0.85vw;
    font-weight: 500;
    color: #333;
}

.campo-input {
    border: 1.5px solid #cdd9f4;
    border-radius: 0.4vw;
    padding: 0.6vw 0.8vw;
    font-size: 1vw;
    font-family: 'Roboto', sans-serif;
    width: 100%;
    transition: border-color 0.2s;
    text-align: center;
}

.campo-input:focus {
    outline: none;
    border-color: #1565c0;
}

/* ── Mensaje error inline ── */
.mensaje-error-inline {
    background-color: rgba(255, 0, 0, 0.08);
    border: 1px solid #e57373;
    border-radius: 0.4vw;
    color: #c62828;
    font-size: 0.85vw;
    padding: 0.5vw 0.8vw;
    text-align: center;
    display: none;
}

.mensaje-error-inline.visible {
    display: block;
}

/* ── Botón ── */
.btn-enviar {
    background-color: #1565c0;
    color: #fff;
    border: none;
    border-radius: 0.5vw;
    padding: 0.7vw;
    font-size: 1vw;
    font-weight: 700;
    font-family: 'Roboto', sans-serif;
    cursor: pointer;
    width: 100%;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.btn-enviar:hover {
    background-color: #0d47a1;
    box-shadow: 0 4px 12px rgba(13,71,161,0.4);
}

/* ── Modal ── */
#modal-olvido {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
}

.fondo-error {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.5);
}

.cont-mensaje-error {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: 0.8vw;
    padding: 2vw 2.5vw;
    width: 28vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.8vw;
}

.error-titulo {
    font-size: 1.1vw;
    font-weight: 700;
    color: #1565c0;
}

.error-texto {
    font-size: 0.9vw;
    color: #333;
    line-height: 1.5;
}

.boton-modal {
    background-color: #1565c0;
    color: #fff;
    border-radius: 0.4vw;
    padding: 0.5vw 1.5vw;
    font-size: 0.9vw;
    font-weight: 700;
    cursor: pointer;
    display: inline-block;
    margin: 0 auto;
    transition: background-color 0.2s;
}

.boton-modal:hover {
    background-color: #0d47a1;
}

/* ── Éxito ── */
.exito-icono {
    text-align: center;
    color: #2e7d32;
}

.exito-icono .material-icons {
    font-size: 4vw;
}

/* ── Powered by ── */
.poweredby {
    position: relative;
    z-index: 1;
    text-align: center;
    padding: 1vw 0;
    font-size: 0.75vw;
    color: rgba(255,255,255,0.7);
}

.poweredby a {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
}

.poweredby a:hover {
    text-decoration: underline;
}

/* ── Responsive tablet ── */
@media (max-width: 1024px) {
    .barra-superior { height: 5vw; }
    .barra-izq { font-size: 1.6vw; }
    .barra-izq .material-icons { font-size: 2vw; }
    .login-wrapper { padding-top: 5vw; }
    .login-card { width: 50vw; padding: 3vw 4vw; gap: 2vw; }
    .card-logo img { width: 14vw; }
    .card-titulo { font-size: 2.2vw; }
    .card-descripcion { font-size: 1.4vw; }
    .campo-grupo label { font-size: 1.3vw; }
    .campo-input { font-size: 1.6vw; padding: 1vw; border-radius: 0.6vw; }
    .btn-enviar { font-size: 1.6vw; padding: 1vw; }
    .cont-mensaje-error { width: 50vw; }
    .error-titulo { font-size: 1.8vw; }
    .error-texto { font-size: 1.4vw; }
    .boton-modal { font-size: 1.4vw; padding: 0.8vw 2vw; }
    .poweredby { font-size: 1.2vw; padding: 1.5vw 0; }
    .exito-icono .material-icons { font-size: 6vw; }
}



/* ── Responsive móvil ── */
@media (max-width: 768px) {
    .barra-superior { height: 10vw; padding: 0 4vw; }
    .barra-izq { font-size: 3.5vw; }
    .barra-izq .material-icons { font-size: 4.5vw; }
    .login-wrapper { padding-top: 10vw; align-items: flex-start; padding-bottom: 4vw; }
    .login-card { width: 90vw; padding: 6vw 5vw; gap: 4vw; border-radius: 3vw; }
    .card-logo img { width: 28vw; }
    .card-titulo { font-size: 5vw; }
    .card-descripcion { font-size: 3.2vw; }
    .campo-grupo label { font-size: 3vw; }
    .campo-input { font-size: 3.5vw; padding: 2.5vw; border-radius: 1.5vw; }
    .btn-enviar { font-size: 3.8vw; padding: 2.5vw; border-radius: 2vw; }
    .cont-mensaje-error { width: 85vw; border-radius: 3vw; padding: 6vw; }
    .error-titulo { font-size: 4vw; }
    .error-texto { font-size: 3.2vw; }
    .boton-modal { font-size: 3.5vw; padding: 2vw 5vw; border-radius: 1.5vw; }
    .mensaje-error-inline { font-size: 3vw; }
    .poweredby { font-size: 2.5vw; padding: 3vw 0; }
    .exito-icono .material-icons { font-size: 14vw; }
}
