html.deur-auth-page,
html.deur-auth-page body {
    height: 100%;
    margin: 0;
    overflow: hidden;
}

.deur-auth-page .footer {
    display: none;
}

.deur-auth-page .wrapper {
    min-height: 100%;
    height: 100%;
    overflow: hidden;
}

.deur-auth-page .wrapper > br.print_block {
    display: none !important;
}

.deur-auth-page .content {
    padding: 0;
    margin: 0;
    height: 100%;
    min-height: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: translateY(-20px);
}

.deur-auth {
    --deur-auth-teal: #BE347F;
    --deur-auth-teal-dark: #9A2D68;
    --deur-auth-teal-soft: #fdf2f8;
    --deur-auth-navy: #1e293b;
    --deur-auth-muted: #64748b;
    --deur-auth-border: #e2e8f0;
    --deur-auth-input-bg: #f8fafc;
    --deur-auth-radius: 12px;
    width: 100%;
    height: 100%;
    min-height: 0;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    background: linear-gradient(165deg, #f8f4f7 0%, #f8fafc 45%, #fdf2f8 100%);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    overflow: hidden;
}

.deur-auth__panel {
    width: 100%;
    max-width: 440px;
    background: #fff;
    border-radius: 20px;
    box-shadow: 0 24px 48px rgba(15, 23, 42, 0.08);
    padding: 2.25rem 2rem 2rem;
    border: 1px solid rgba(226, 232, 240, 0.9);
}

.deur-auth__eyebrow-wrap {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.deur-auth__eyebrow-line {
    width: 28px;
    height: 3px;
    border-radius: 999px;
    background: var(--deur-auth-teal);
}

.deur-auth__eyebrow {
    margin: 0;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--deur-auth-teal);
}

.deur-auth__title {
    margin: 0 0 0.5rem;
    font-size: 1.85rem;
    font-weight: 700;
    color: var(--deur-auth-navy);
    line-height: 1.2;
}

.deur-auth__lead {
    margin: 0 0 1.75rem;
    font-size: 0.95rem;
    color: var(--deur-auth-muted);
    line-height: 1.5;
}

.deur-auth__field {
    margin-bottom: 1.25rem;
}

.deur-auth__label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.45rem;
}

.deur-auth__label {
    display: block;
    margin: 0 0 0.45rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--deur-auth-navy);
}

.deur-auth__label-row .deur-auth__label {
    margin-bottom: 0;
}

.deur-auth__link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #5b8def;
    text-decoration: none;
}

.deur-auth__link:hover {
    color: #3b6fd4;
    text-decoration: underline;
}

.deur-auth__input-wrap {
    position: relative;
}

.deur-auth__input-wrap i.deur-auth__input-icon {
    position: absolute;
    left: 0.95rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: 0.95rem;
    pointer-events: none;
}

.deur-auth__input-wrap input {
    width: 100%;
    border: 1px solid var(--deur-auth-border);
    border-radius: var(--deur-auth-radius);
    background: var(--deur-auth-input-bg);
    padding: 0.8rem 2.75rem 0.8rem 2.65rem;
    font-size: 0.95rem;
    color: var(--deur-auth-navy);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.deur-auth__input-wrap input:focus {
    outline: none;
    border-color: var(--deur-auth-teal);
    box-shadow: 0 0 0 3px rgba(190, 52, 127, 0.18);
    background: #fff;
}

.deur-auth__input-wrap input.is-invalid {
    border-color: #ef4444;
}

.deur-auth__toggle-pass {
    position: absolute;
    right: 0.65rem;
    top: 50%;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: #94a3b8;
    padding: 0.35rem 0.5rem;
    cursor: pointer;
    line-height: 1;
}

.deur-auth__toggle-pass:hover {
    color: var(--deur-auth-muted);
}

.deur-auth__error {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.82rem;
    color: #dc2626;
    font-weight: 600;
}

.deur-auth__submit {
    width: 100%;
    margin-top: 0.5rem;
    border: none;
    border-radius: var(--deur-auth-radius);
    padding: 0.9rem 1.25rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(180deg, var(--deur-auth-teal) 0%, var(--deur-auth-teal-dark) 100%);
    box-shadow: 0 10px 24px rgba(190, 52, 127, 0.35);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: transform 0.12s ease, box-shadow 0.12s ease;
}

.deur-auth__submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(190, 52, 127, 0.4);
    color: #fff;
}

.deur-auth__submit:active {
    transform: translateY(0);
}

.deur-auth__secure {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    margin-top: 1.75rem;
    font-size: 0.78rem;
    color: #94a3b8;
}

.deur-auth__secure i {
    color: var(--deur-auth-teal);
    font-size: 0.95rem;
}

@keyframes deur-auth-panel-in {
    from {
        opacity: 0;
        transform: translateY(18px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes deur-auth-badge-in {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes deur-auth-fade-up {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes deur-auth-shake {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-6px); }
    40% { transform: translateX(6px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(4px); }
}

.deur-auth--codigo .deur-auth__panel--codigo {
    max-width: 480px;
    animation: deur-auth-panel-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.deur-auth__codigo-head {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    margin-bottom: 1.25rem;
}

.deur-auth__icon-badge {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--deur-auth-teal-soft);
    color: var(--deur-auth-teal);
    font-size: 1.15rem;
    border: 1px solid rgba(190, 52, 127, 0.22);
    animation: deur-auth-badge-in 0.5s cubic-bezier(0.22, 1, 0.36, 1) 0.08s both;
}

.deur-auth__eyebrow-wrap--tight {
    margin-bottom: 0.4rem;
}

.deur-auth__title--sm {
    font-size: 1.35rem;
    margin-bottom: 0.35rem;
}

.deur-auth__lead--sm {
    margin-bottom: 0;
    font-size: 0.88rem;
}

.deur-auth__notice {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    padding: 0.75rem 0.9rem;
    border-radius: 10px;
    font-size: 0.85rem;
    line-height: 1.45;
    margin-bottom: 0.85rem;
    animation: deur-auth-fade-up 0.45s ease-out both;
}

.deur-auth__notice--info {
    background: #e8f4fd;
    color: #0c4a6e;
    border: 1px solid #bae6fd;
    animation-delay: 0.12s;
}

.deur-auth__notice--mail {
    background: #f1f5f9;
    color: var(--deur-auth-muted);
    border: 1px solid var(--deur-auth-border);
    animation-delay: 0.18s;
}

.deur-auth__notice--mail strong {
    color: var(--deur-auth-navy);
    font-weight: 600;
}

.deur-auth__field--codigo {
    margin-bottom: 0.65rem;
    animation: deur-auth-fade-up 0.45s ease-out 0.22s both;
}

.deur-auth__code-input {
    width: 100%;
    box-sizing: border-box;
    border: 2px solid rgba(190, 52, 127, 0.35);
    border-radius: var(--deur-auth-radius);
    background: #fff;
    padding: 0.95rem 1rem;
    font-size: 1.65rem;
    font-weight: 600;
    letter-spacing: 0.42em;
    text-align: center;
    color: var(--deur-auth-navy);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.deur-auth__code-input::placeholder {
    color: #cbd5e1;
    font-weight: 500;
    letter-spacing: 0.35em;
}

.deur-auth__code-input:focus {
    outline: none;
    border-color: var(--deur-auth-teal);
    box-shadow: 0 0 0 4px rgba(190, 52, 127, 0.18);
    transform: translateY(-1px);
}

.deur-auth__code-input.is-invalid {
    border-color: #ef4444;
    animation: deur-auth-shake 0.4s ease;
}

.deur-auth__vigencia {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    margin: 0 0 1rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    color: #9a3412;
    font-size: 0.78rem;
    font-weight: 600;
    animation: deur-auth-fade-up 0.45s ease-out 0.28s both;
}

.deur-auth__codigo-form .deur-auth__submit {
    animation: deur-auth-fade-up 0.45s ease-out 0.34s both;
}

.deur-auth__reenviar-form {
    margin-top: 1rem;
    text-align: center;
    animation: deur-auth-fade-up 0.45s ease-out 0.4s both;
}

.deur-auth__reenviar {
    border: none;
    background: transparent;
    color: var(--deur-auth-teal-dark);
    font-size: 0.88rem;
    font-weight: 700;
    cursor: pointer;
    padding: 0.35rem 0.5rem;
    transition: color 0.15s ease, transform 0.15s ease;
}

.deur-auth__reenviar:hover {
    color: var(--deur-auth-teal);
    transform: translateY(-1px);
}

@media (prefers-reduced-motion: reduce) {
    .deur-auth--codigo .deur-auth__panel--codigo,
    .deur-auth__icon-badge,
    .deur-auth__notice,
    .deur-auth__field--codigo,
    .deur-auth__vigencia,
    .deur-auth__codigo-form .deur-auth__submit,
    .deur-auth__reenviar-form {
        animation: none;
    }

    .deur-auth__code-input:focus {
        transform: none;
    }
}

@media (max-width: 480px) {
    html.deur-auth-page--codigo,
    html.deur-auth-page--codigo body {
        overflow: auto;
        min-height: 100%;
        height: auto;
    }

    .deur-auth-page--codigo .wrapper {
        min-height: 100dvh;
        height: auto;
        overflow: visible;
    }

    .deur-auth-page--codigo .content {
        transform: none;
        min-height: 100dvh;
        height: auto;
        padding: 1.25rem 0 2rem;
        align-items: center;
        justify-content: center;
    }

    .deur-auth--codigo {
        min-height: calc(100dvh - 2.5rem);
        align-items: center;
        justify-content: center;
        padding: 1rem 1rem 1.5rem;
    }

    .deur-auth__panel {
        padding: 1.75rem 1.35rem 1.5rem;
    }

    .deur-auth__title {
        font-size: 1.55rem;
    }

    .deur-auth__codigo-head {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .deur-auth__eyebrow-wrap--tight {
        justify-content: center;
    }

    .deur-auth__code-input {
        font-size: 1.35rem;
        letter-spacing: 0.28em;
    }
}
