/*
    Shared auth-shell styles derived from redesign_ui/mockup_login_revised.html.

    Scope for step 2.2:
    - define the redesign auth classes and exact visual treatment
    - do not wire current auth pages to these classes yet
*/

html.wn-auth-html,
body.wn-auth-body {
    height: 100%;
}

body.wn-auth-body {
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    background: var(--gray-50);
}

.wn-auth-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

.wn-auth-brand {
    flex: 1;
    background: linear-gradient(160deg, var(--wb-950) 0%, var(--wb-850) 40%, var(--wb-700) 100%);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 44px;
    position: relative;
    overflow: hidden;
}

.wn-auth-watermark-globe {
    position: absolute;
    bottom: -60px;
    left: -60px;
    width: 460px;
    height: 460px;
    opacity: 0.06;
}

.wn-auth-watermark-logo {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 600px;
    opacity: 0.15;
    filter: drop-shadow(0 16px 40px rgba(0, 0, 0, 0.18));
}

.wn-auth-top,
.wn-auth-hero,
.wn-auth-footer {
    position: relative;
    z-index: 1;
}

.wn-auth-top {
    margin-bottom: 10px;
}

.wn-auth-logo-wrap {
    background: var(--white);
    padding: 6px 14px;
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    margin-bottom: 10px;
}

.wn-auth-logo-wrap img {
    height: 32px;
    object-fit: contain;
}

.wn-auth-brand-logo {
    width: 220px;
    max-width: 100%;
    height: auto;
    display: block;
}

.wn-auth-tagline {
    font-size: 10px;
    color: var(--gold-400);
    letter-spacing: 2.5px;
    text-transform: uppercase;
    font-weight: 500;
    opacity: 0.9;
    margin-left: 4px;
}

.wn-auth-hero {
    margin-top: auto;
    margin-bottom: auto;
}

.wn-auth-hero-title {
    font-family: var(--font-display);
    font-size: 38px;
    font-weight: 600;
    color: var(--white);
    line-height: 1.22;
    margin-bottom: 18px;
}

.wn-auth-hero-title-accent {
    color: var(--gold-400);
}

.wn-auth-hero-desc {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.62);
    line-height: 1.72;
    max-width: 560px;
}

.wn-auth-return-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 11.5px;
    color: rgba(255, 255, 255, 0.5);
    text-decoration: none;
    transition: color 0.2s ease, gap 0.2s ease;
    margin-bottom: 16px;
}

.wn-auth-return-link:hover,
.wn-auth-return-link:focus {
    color: var(--gold-400);
    gap: 9px;
    text-decoration: none;
}

.wn-auth-return-link svg {
    width: 13px;
    height: 13px;
}

.wn-auth-copyright {
    font-size: 8.5px;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1.6;
    width: 100%;
    max-width: none;
    margin: 0;
}

.wn-auth-panel {
    width: var(--auth-panel-width);
    background: var(--white);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 48px 44px;
    box-shadow: -4px 0 24px rgba(0, 26, 51, 0.08);
    position: relative;
}

.wn-auth-panel-body {
    width: 100%;
}

.wn-auth-panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(180deg,
            transparent 0%,
            var(--gold-500) 25%,
            var(--gold-400) 50%,
            var(--gold-500) 75%,
            transparent 100%);
}

.wn-auth-form-header {
    margin-bottom: 32px;
}

.wn-auth-form-title {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 600;
    color: var(--wb-900);
    margin-bottom: 6px;
}

.wn-auth-form-subtitle {
    font-size: 13px;
    color: var(--gray-500);
}

.wn-auth-alert {
    padding: 10px 14px;
    border-radius: var(--radius-button);
    font-size: 12px;
    font-weight: 500;
    margin-bottom: 20px;
    display: none;
    align-items: center;
    gap: 8px;
}

.wn-auth-alert.is-visible {
    display: flex;
}

.wn-auth-alert.is-error {
    background: #FFF5F5;
    color: var(--red-500);
    border: 1px solid rgba(220, 53, 69, 0.15);
}

.wn-auth-alert.is-success {
    background: #F0FFF4;
    color: var(--green-500);
    border: 1px solid rgba(40, 167, 69, 0.15);
}

.wn-auth-alert svg {
    width: 14px;
    height: 14px;
    flex-shrink: 0;
}

.wn-auth-field {
    margin-bottom: 18px;
}

.wn-auth-label {
    display: block;
    font-size: 11px;
    font-weight: 600;
    color: var(--gray-700);
    letter-spacing: 0.3px;
    text-transform: uppercase;
    margin-bottom: 6px;
}

.wn-auth-input {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-button);
    font-size: 13.5px;
    font-family: var(--font-body);
    color: var(--gray-800);
    background: var(--gray-50);
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.wn-auth-input:focus {
    border-color: var(--wb-400);
    box-shadow: 0 0 0 3px rgba(0, 112, 192, 0.08);
    background: var(--white);
}

.wn-auth-input::placeholder {
    color: var(--gray-400);
}

.wn-auth-password-wrap {
    position: relative;
}

.wn-auth-input.has-toggle {
    padding-right: 42px;
}

.wn-auth-password-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 2px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.wn-auth-password-toggle svg {
    width: 16px;
    height: 16px;
    color: var(--gray-400);
    transition: color 0.2s ease;
}

.wn-auth-password-toggle:hover svg,
.wn-auth-password-toggle:focus svg {
    color: var(--wb-600);
}

.wn-auth-submit {
    width: 100%;
    padding: 12px;
    background: var(--wb-600);
    color: var(--white);
    border: none;
    border-radius: var(--radius-button);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.8px;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
    margin-top: 6px;
}

.wn-auth-submit:hover,
.wn-auth-submit:focus {
    background: var(--wb-700);
    box-shadow: 0 4px 14px rgba(0, 112, 192, 0.25);
    transform: translateY(-1px);
}

.wn-auth-submit:active {
    transform: translateY(0);
}

.wn-auth-form-footer {
    margin-top: 16px;
    text-align: center;
}

.wn-auth-forgot-link {
    font-size: 12px;
    color: var(--wb-600);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.wn-auth-forgot-link:hover,
.wn-auth-forgot-link:focus {
    color: var(--wb-700);
    text-decoration: underline;
}

.wn-auth-divider {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 24px 0;
}

.wn-auth-divider::before,
.wn-auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--gray-200);
}

.wn-auth-divider span {
    font-size: 10px;
    color: var(--gray-400);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.wn-auth-help-card {
    background: var(--wb-50);
    border: 1px solid var(--wb-100);
    border-radius: var(--radius-button);
    padding: 14px 16px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.wn-auth-help-icon {
    width: 28px;
    height: 28px;
    background: var(--white);
    border: 1px solid var(--wb-200);
    border-radius: 6px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.wn-auth-help-icon svg {
    width: 13px;
    height: 13px;
    color: var(--wb-600);
}

.wn-auth-help-text {
    font-size: 11px;
    color: var(--gray-600);
    line-height: 1.5;
}

.wn-auth-help-text a {
    color: var(--wb-600);
    text-decoration: none;
    font-weight: 600;
}

.wn-auth-help-text a:hover,
.wn-auth-help-text a:focus {
    text-decoration: underline;
}

.wn-auth-help-title {
    font-size: 11px;
    color: var(--wb-900);
    font-weight: 700;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.35px;
}

.wn-auth-requirements {
    margin: 0;
    padding-left: 18px;
}

.wn-auth-requirements li {
    font-size: 11px;
    color: var(--gray-600);
    line-height: 1.45;
    margin-bottom: 6px;
}

.wn-auth-requirements li:last-child {
    margin-bottom: 0;
}

.wn-auth-form {
    width: 100%;
}

.wn-auth-form .text-danger {
    display: block;
    margin-top: 6px;
    color: var(--red-500) !important;
    font-size: 12px;
    line-height: 1.35;
}

.wn-auth-action-row {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

.wn-auth-action-row .wn-auth-submit {
    flex: 1;
    margin-top: 0;
}

.wn-auth-secondary-link {
    flex: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    border: 1.5px solid var(--gray-300);
    border-radius: var(--radius-button);
    background: var(--white);
    color: var(--wb-800);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-decoration: none;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.wn-auth-secondary-link:hover,
.wn-auth-secondary-link:focus {
    border-color: var(--wb-300);
    color: var(--wb-900);
    background: var(--wb-50);
    text-decoration: none;
}

@keyframes wnAuthFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes wnAuthSlideInRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.wn-auth-animate-hero {
    animation: wnAuthFadeIn 0.5s ease 0.1s forwards;
    opacity: 0;
}

.wn-auth-animate-header {
    animation: wnAuthSlideInRight 0.4s ease 0.15s forwards;
    opacity: 0;
}

.wn-auth-animate-field-1 {
    animation: wnAuthSlideInRight 0.4s ease 0.2s forwards;
    opacity: 0;
}

.wn-auth-animate-field-2 {
    animation: wnAuthSlideInRight 0.4s ease 0.25s forwards;
    opacity: 0;
}

.wn-auth-animate-submit {
    animation: wnAuthSlideInRight 0.4s ease 0.3s forwards;
    opacity: 0;
}

@media (max-width: 1100px) {
    .wn-auth-brand {
        padding: 36px;
    }
}

@media (min-width: 1400px) {
    .wn-auth-panel {
        width: min(32vw, 520px);
        padding: 56px 52px;
    }

    .wn-auth-panel-body {
        max-width: 420px;
    }

    .wn-auth-tagline {
        font-size: 12px;
    }

    .wn-auth-hero-title {
        font-size: 46px;
    }

    .wn-auth-hero-desc {
        font-size: 18px;
    }

    .wn-auth-return-link {
        font-size: 13px;
    }

    .wn-auth-copyright {
        font-size: 9.5px;
    }

    .wn-auth-form-title {
        font-size: 30px;
    }

    .wn-auth-form-subtitle {
        font-size: 15px;
    }

    .wn-auth-alert {
        font-size: 13px;
    }

    .wn-auth-label {
        font-size: 12px;
    }

    .wn-auth-input {
        font-size: 15px;
    }

    .wn-auth-submit {
        font-size: 14px;
    }

    .wn-auth-forgot-link,
    .wn-auth-secondary-link {
        font-size: 13px;
    }

    .wn-auth-help-text,
    .wn-auth-help-title,
    .wn-auth-requirements li {
        font-size: 12px;
    }

    .wn-auth-form .text-danger {
        font-size: 13px;
    }

    .wn-auth-mfa-setup-title {
        font-size: 15px;
    }

    .wn-auth-mfa-setup-copy,
    .wn-auth-mfa-helper-copy {
        font-size: 13px;
    }

    .wn-auth-mfa-code-label {
        font-size: 11px;
    }

    .wn-auth-mfa-code-value {
        font-size: 17px;
    }

    .wn-auth-mfa-input {
        font-size: 20px;
    }
}

@media (min-width: 1800px) {
    .wn-auth-watermark-globe {
        width: 560px;
        height: 560px;
    }

    .wn-auth-watermark-logo {
        width: 700px;
    }

    .wn-auth-panel {
        width: min(38vw, 680px);
        padding: 68px 64px;
    }

    .wn-auth-panel-body {
        max-width: 520px;
    }

    .wn-auth-tagline {
        font-size: 13px;
    }

    .wn-auth-hero-title {
        font-size: 52px;
    }

    .wn-auth-hero-desc {
        font-size: 20px;
    }

    .wn-auth-return-link {
        font-size: 14px;
    }

    .wn-auth-copyright {
        font-size: 10px;
    }

    .wn-auth-form-title {
        font-size: 34px;
    }

    .wn-auth-form-subtitle {
        font-size: 16px;
    }

    .wn-auth-alert {
        font-size: 14px;
    }

    .wn-auth-label {
        font-size: 12.5px;
    }

    .wn-auth-input {
        font-size: 16px;
    }

    .wn-auth-submit {
        font-size: 15px;
    }

    .wn-auth-forgot-link,
    .wn-auth-secondary-link {
        font-size: 14px;
    }

    .wn-auth-help-text,
    .wn-auth-help-title,
    .wn-auth-requirements li {
        font-size: 12.5px;
    }

    .wn-auth-form .text-danger {
        font-size: 13.5px;
    }

    .wn-auth-mfa-setup-title {
        font-size: 16px;
    }

    .wn-auth-mfa-setup-copy,
    .wn-auth-mfa-helper-copy {
        font-size: 14px;
    }

    .wn-auth-mfa-code-label {
        font-size: 11.5px;
    }

    .wn-auth-mfa-code-value {
        font-size: 18px;
    }

    .wn-auth-mfa-input {
        font-size: 22px;
    }
}

@media (max-width: 980px) {
    body.wn-auth-body {
        display: block;
    }

    .wn-auth-shell {
        flex-direction: column;
    }

    .wn-auth-brand,
    .wn-auth-panel {
        width: 100%;
    }

    .wn-auth-brand {
        min-height: 420px;
        padding: 32px 24px;
    }

    .wn-auth-panel {
        padding: 36px 24px;
        box-shadow: none;
    }

    .wn-auth-panel::before {
        width: 100%;
        height: 2px;
        top: 0;
        left: 0;
        background: linear-gradient(90deg,
                transparent 0%,
                var(--gold-500) 25%,
                var(--gold-400) 50%,
                var(--gold-500) 75%,
                transparent 100%);
    }
}

@media (max-width: 700px) {
    .wn-auth-action-row {
        flex-direction: column;
    }

    .wn-auth-hero-title {
        font-size: 32px;
    }

    .wn-auth-watermark-globe {
        width: 280px;
        height: 280px;
    }

    .wn-auth-watermark-logo {
        width: 360px;
    }
}

.wn-auth-mfa-setup {
    background: linear-gradient(180deg, var(--wb-50) 0%, #f8fbff 100%);
    border: 1px solid var(--wb-100);
    border-radius: 16px;
    padding: 18px 18px 16px;
    margin-bottom: 22px;
}

.wn-auth-mfa-setup-header {
    margin-bottom: 14px;
}

.wn-auth-mfa-setup-title {
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: var(--wb-900);
    margin: 0 0 4px;
}

.wn-auth-mfa-setup-copy {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.55;
    margin: 0;
}

.wn-auth-mfa-qr-shell {
    display: flex;
    justify-content: center;
    align-items: center;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 14px;
    padding: 14px;
    margin-bottom: 14px;
}

.wn-auth-mfa-qr-image {
    width: 220px;
    max-width: 100%;
    height: auto;
    display: block;
}

.wn-auth-mfa-code-shell {
    background: var(--white);
    border: 1px dashed var(--wb-200);
    border-radius: 12px;
    padding: 12px 14px;
}

.wn-auth-mfa-code-label {
    display: block;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--gray-500);
    margin-bottom: 4px;
}

.wn-auth-mfa-code-value {
    display: block;
    color: var(--wb-900);
    font-size: 15px;
    font-weight: 700;
    letter-spacing: 0.04em;
    word-break: break-all;
}

.wn-auth-mfa-card {
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    background: linear-gradient(180deg, #fbfcfe 0%, var(--white) 100%);
    padding: 22px 20px 20px;
    display: flex;
    flex-direction: column;
}

.wn-auth-mfa-card-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--wb-50);
    border: 1px solid var(--wb-100);
    color: var(--wb-700);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    align-self: center;
}

.wn-auth-mfa-card-icon svg {
    width: 24px;
    height: 24px;
}

.wn-auth-mfa-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.wn-auth-mfa-help-trigger {
    border: none;
    background: transparent;
    color: var(--gray-400);
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: color 0.2s ease;
}

.wn-auth-mfa-help-trigger:hover,
.wn-auth-mfa-help-trigger:focus {
    color: var(--wb-600);
}

.wn-auth-mfa-help-trigger svg {
    width: 17px;
    height: 17px;
}

.wn-auth-mfa-input {
    text-align: center;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.32em;
}

.wn-auth-mfa-helper-copy {
    font-size: 12px;
    color: var(--gray-600);
    line-height: 1.55;
    margin: 0 0 18px;
    text-align: center;
}

@media (max-width: 700px) {
    .wn-auth-mfa-card,
    .wn-auth-mfa-setup {
        padding: 18px 16px;
    }

    .wn-auth-mfa-input {
        letter-spacing: 0.2em;
    }
}
