/* Estilos del overlay de contraseña Artmateria */

/* Bloqueo de scroll cuando el overlay está activo */
body.apg-locked {
    overflow: hidden;
}

/* Contenedor principal del overlay */
.apg-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* Fondo semitransparente */
.apg-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.78);
    backdrop-filter: blur(4px);
}

/* Tarjeta centrada */
.apg-card {
    position: relative;
    max-width: 420px;
    width: 100%;
    background: rgb(0, 60, 117); /* Azul corporativo */
    border-radius: 1.5rem;
    padding: 2.2rem 2rem 2rem;
    box-shadow:
        0 18px 45px rgba(0, 0, 0, 0.55),
        0 0 0 1px rgba(255, 255, 255, 0.04);
    color: #ffffff;
    text-align: left;
}

/* Logo redondo */
.apg-logo-circle {
    width: 54px;
    height: 54px;
    border-radius: 999px;
    background: rgb(196, 174, 137); /* Dorado corporativo */
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.2rem;
    box-shadow: 0 7px 16px rgba(0, 0, 0, 0.35);
}

.apg-logo-letter {
    font-weight: 700;
    font-size: 1.4rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #003c75;
}

/* Título y textos */
.apg-title {
    margin: 0 0 0.35rem;
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.apg-subtitle {
    margin: 0 0 1.6rem;
    font-size: 0.98rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.9);
}

/* Formulario */
.apg-form {
    margin: 0 0 1.1rem;
}

.apg-label {
    display: block;
    margin-bottom: 0.35rem;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.8);
}

/* Campo + botón en una línea */
.apg-field-wrapper {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.apg-input {
    flex: 1;
    border-radius: 999px;
    border: 1px solid rgba(196, 174, 137, 0.6);
    background: rgba(0, 0, 0, 0.16);
    padding: 0.65rem 0.9rem;
    font-size: 0.95rem;
    color: #ffffff;
    outline: none;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.apg-input::placeholder {
    color: rgba(255, 255, 255, 0.45);
}

.apg-input:focus {
    border-color: rgb(196, 174, 137);
    box-shadow: 0 0 0 1px rgba(196, 174, 137, 0.4);
    background: rgba(0, 0, 0, 0.25);
}

/* Botón */
.apg-button {
    border-radius: 999px;
    border: none;
    padding: 0.68rem 1.35rem;
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    cursor: pointer;
    background: rgb(196, 174, 137);
    color: #003c75;
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
    white-space: nowrap;
}

.apg-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
    background: rgb(204, 183, 149);
}

.apg-button:active {
    transform: translateY(0);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.5);
}

/* Error */
.apg-error {
    min-height: 1.2rem;
    margin: 0.35rem 0 0;
    font-size: 0.8rem;
    color: #ffb3b3;
    opacity: 0;
    transform: translateY(-3px);
    transition: opacity 0.18s ease, transform 0.18s ease;
}

.apg-error.apg-error-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Nota */
.apg-hint {
    margin: 0;
    font-size: 0.8rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.7);
}

.apg-link {
    color: rgb(196, 174, 137);
    text-decoration: none;
    border-bottom: 1px solid rgba(196, 174, 137, 0.4);
    padding-bottom: 1px;
}

.apg-link:hover {
    border-bottom-color: rgba(196, 174, 137, 0.8);
}

/* Ocultar overlay cuando está desbloqueado */
.apg-overlay.apg-hidden {
    display: none;
}

/* Responsive */
@media (max-width: 480px) {
    .apg-card {
        padding: 1.7rem 1.4rem 1.6rem;
        border-radius: 1.2rem;
    }

    .apg-title {
        font-size: 1.25rem;
    }

    .apg-field-wrapper {
        flex-direction: column;
        align-items: stretch;
    }

    .apg-button {
        width: 100%;
        text-align: center;
        justify-content: center;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
