/* ==========================================================================
   Modern auth screen (login / register / password reset)
   Namespaced with .wn- so it never collides with the vendor auth.css theme.
   ========================================================================== */

.wn-auth {
    --wn-ink: #0f172a;
    --wn-muted: #64748b;
    --wn-line: #e2e8f0;
    --wn-surface: #ffffff;
    --wn-primary: #4f46e5;
    --wn-primary-dark: #4338ca;
    --wn-accent: #22c55e;
    --wn-danger: #e11d48;
    --wn-radius: 18px;
    --wn-shadow: 0 24px 60px -24px rgba(15, 23, 42, .35);
}

.wn-auth,
.wn-auth body {
    margin: 0;
}

body.wn-auth {
    min-height: 100vh;
    background: #f6f7fb;
    color: var(--wn-ink);
    font-family: 'Inter', 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

.wn-shell {
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    min-height: 100vh;
}

/* --------------------------------------------------------------------------
   Brand panel
   -------------------------------------------------------------------------- */
.wn-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 48px 56px;
    overflow: hidden;
    color: #fff;
    background: linear-gradient(135deg, #1e1b4b 0%, #312e81 45%, #4338ca 100%);
    isolation: isolate;
}

.wn-brand::after {
    /* fine grain so the large gradient does not band on wide screens */
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    opacity: .35;
    background-image: radial-gradient(rgba(255, 255, 255, .12) 1px, transparent 1px);
    background-size: 22px 22px;
}

.wn-orb {
    position: absolute;
    z-index: -2;
    border-radius: 50%;
    filter: blur(70px);
    opacity: .55;
    will-change: transform;
    animation: wn-float 18s ease-in-out infinite;
}

.wn-orb--1 {
    width: 420px;
    height: 420px;
    top: -120px;
    left: -110px;
    background: #6366f1;
}

.wn-orb--2 {
    width: 360px;
    height: 360px;
    bottom: -140px;
    right: -80px;
    background: var(--wn-accent);
    animation-delay: -6s;
    animation-duration: 22s;
}

.wn-orb--3 {
    width: 300px;
    height: 300px;
    top: 45%;
    left: 40%;
    background: #a855f7;
    animation-delay: -12s;
    animation-duration: 26s;
}

@keyframes wn-float {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    33%      { transform: translate3d(40px, -30px, 0) scale(1.08); }
    66%      { transform: translate3d(-30px, 26px, 0) scale(.94); }
}

.wn-brand__logo {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    transition: transform .25s ease;
}

.wn-brand__logo:hover {
    transform: translateY(-2px);
}

.wn-brand__logo img {
    max-height: 92px;
    width: auto;
    /* The mark ships on a light background; lift it off the gradient instead of boxing it. */
    filter: drop-shadow(0 10px 22px rgba(2, 6, 23, .45));
}

.wn-brand__body {
    max-width: 460px;
}

.wn-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    margin-bottom: 22px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #c7d2fe;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
}

.wn-brand__eyebrow .wn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--wn-accent);
    box-shadow: 0 0 0 0 rgba(34, 197, 94, .7);
    animation: wn-pulse 2.4s ease-out infinite;
}

@keyframes wn-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(34, 197, 94, .65); }
    70%  { box-shadow: 0 0 0 10px rgba(34, 197, 94, 0); }
    100% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0); }
}

.wn-brand__title {
    font-size: clamp(30px, 3vw, 44px);
    line-height: 1.15;
    font-weight: 700;
    margin: 0 0 16px;
    letter-spacing: -.02em;
}

.wn-brand__text {
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 30px;
    color: rgba(226, 232, 240, .82);
}

.wn-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 14px;
}

.wn-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 15px;
    color: rgba(241, 245, 249, .92);
}

.wn-features .wn-check {
    flex: 0 0 26px;
    width: 26px;
    height: 26px;
    display: grid;
    place-items: center;
    border-radius: 9px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
}

.wn-features svg {
    width: 14px;
    height: 14px;
    stroke: var(--wn-accent);
}

.wn-brand__foot {
    display: flex;
    align-items: center;
    gap: 22px;
    font-size: 13px;
    color: rgba(199, 210, 254, .75);
}

.wn-brand__foot span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
}

.wn-brand__foot svg {
    width: 15px;
    height: 15px;
    stroke: currentColor;
}

/* --------------------------------------------------------------------------
   Form panel
   -------------------------------------------------------------------------- */
.wn-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
    position: relative;
    background:
        radial-gradient(900px 520px at 110% -10%, #e0e7ff 0%, transparent 62%),
        radial-gradient(760px 460px at -10% 110%, #d1fae5 0%, transparent 58%),
        #f8fafc;
}

.wn-panel::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: .5;
    background-image:
        linear-gradient(rgba(148, 163, 184, .12) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, .12) 1px, transparent 1px);
    background-size: 38px 38px;
    mask-image: radial-gradient(60% 60% at 50% 50%, #000 0%, transparent 100%);
    -webkit-mask-image: radial-gradient(60% 60% at 50% 50%, #000 0%, transparent 100%);
}

.wn-panel > * {
    position: relative;
}

.wn-card {
    width: 100%;
    max-width: 440px;
    padding: 40px 38px 34px;
    background: rgba(255, 255, 255, .86);
    backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 26px;
    box-shadow: var(--wn-shadow);
}

.wn-card__logo {
    display: none;
    margin-bottom: 24px;
}

.wn-card__logo img {
    max-height: 64px;
    width: auto;
}

.wn-card h1 {
    font-size: 27px;
    font-weight: 700;
    letter-spacing: -.02em;
    margin: 0 0 6px;
    color: var(--wn-ink);
}

.wn-card__sub {
    font-size: 14.5px;
    color: var(--wn-muted);
    margin: 0 0 28px;
}

/* Reveal-on-load, staggered */
.wn-reveal {
    opacity: 0;
    transform: translateY(14px);
    animation: wn-rise .6s cubic-bezier(.22, 1, .36, 1) forwards;
}

.wn-reveal:nth-child(1) { animation-delay: .05s; }
.wn-reveal:nth-child(2) { animation-delay: .1s; }
.wn-reveal:nth-child(3) { animation-delay: .15s; }
.wn-reveal:nth-child(4) { animation-delay: .2s; }
.wn-reveal:nth-child(5) { animation-delay: .25s; }
.wn-reveal:nth-child(6) { animation-delay: .3s; }
.wn-reveal:nth-child(7) { animation-delay: .35s; }

@keyframes wn-rise {
    to { opacity: 1; transform: none; }
}

/* Fields ------------------------------------------------------------------ */
.wn-field {
    margin-bottom: 18px;
}

.wn-field__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 8px;
}

.wn-field__label a {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--wn-primary);
    text-decoration: none;
    transition: color .2s ease;
}

.wn-field__label a:hover {
    color: var(--wn-primary-dark);
    text-decoration: underline;
}

.wn-input {
    position: relative;
    display: flex;
    align-items: center;
}

.wn-input__icon {
    position: absolute;
    left: 15px;
    display: grid;
    place-items: center;
    pointer-events: none;
    color: #94a3b8;
    transition: color .2s ease;
}

.wn-input__icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.wn-auth .wn-input input {
    width: 100%;
    height: 52px;
    padding: 0 46px;
    font-size: 15px;
    color: var(--wn-ink);
    background: #fff;
    border: 1.5px solid var(--wn-line);
    border-radius: 14px;
    outline: none;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.wn-auth .wn-input input::placeholder {
    color: #aab4c4;
}

.wn-auth .wn-input input:hover {
    border-color: #cbd5e1;
}

.wn-auth .wn-input input:focus {
    border-color: var(--wn-primary);
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .14);
}

.wn-input input:focus ~ .wn-input__icon,
.wn-input:focus-within .wn-input__icon {
    color: var(--wn-primary);
}

.wn-input__toggle {
    position: absolute;
    right: 8px;
    width: 36px;
    height: 36px;
    display: grid;
    place-items: center;
    border: 0;
    padding: 0;
    border-radius: 10px;
    background: transparent;
    color: #94a3b8;
    cursor: pointer;
    transition: color .2s ease, background .2s ease;
}

.wn-input__toggle:hover {
    color: var(--wn-primary);
    background: #eef2ff;
}

.wn-input__toggle svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
}

.wn-input__toggle .wn-eye-off { display: none; }
.wn-input__toggle.is-visible .wn-eye { display: none; }
.wn-input__toggle.is-visible .wn-eye-off { display: block; }

/* Remember me ------------------------------------------------------------- */
.wn-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
}

.wn-check-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    color: #475569;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.wn-check-label input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.wn-check-label .wn-box {
    width: 19px;
    height: 19px;
    border-radius: 6px;
    border: 1.5px solid #cbd5e1;
    background: #fff;
    display: grid;
    place-items: center;
    transition: all .2s ease;
}

.wn-check-label .wn-box svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
    opacity: 0;
    transform: scale(.6);
    transition: all .2s ease;
}

.wn-check-label input:checked + .wn-box {
    background: var(--wn-primary);
    border-color: var(--wn-primary);
}

.wn-check-label input:checked + .wn-box svg {
    opacity: 1;
    transform: none;
}

.wn-check-label input:focus-visible + .wn-box {
    box-shadow: 0 0 0 4px rgba(79, 70, 229, .16);
}

/* Submit ------------------------------------------------------------------ */
.wn-auth .wn-submit {
    position: relative;
    width: 100%;
    height: 52px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 14px;
    font-size: 15px;
    font-weight: 600;
    color: #fff;
    cursor: pointer;
    overflow: hidden;
    background: linear-gradient(135deg, #4f46e5 0%, #6366f1 50%, #7c3aed 100%);
    box-shadow: 0 12px 26px -10px rgba(79, 70, 229, .75);
    transition: transform .2s ease, box-shadow .2s ease, filter .2s ease;
}

.wn-auth .wn-submit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-20deg);
    transition: left .6s ease;
}

.wn-auth .wn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 34px -12px rgba(79, 70, 229, .85);
}

.wn-auth .wn-submit:hover::before {
    left: 130%;
}

.wn-auth .wn-submit:active {
    transform: translateY(0);
}

.wn-submit svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    transition: transform .2s ease;
}

.wn-submit:hover svg {
    transform: translateX(3px);
}

.wn-submit .wn-spinner {
    display: none;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: #fff;
    border-radius: 50%;
    animation: wn-spin .7s linear infinite;
}

.wn-submit.is-loading {
    pointer-events: none;
    filter: saturate(.85);
}

.wn-submit.is-loading .wn-submit__label,
.wn-submit.is-loading svg {
    display: none;
}

.wn-submit.is-loading .wn-spinner {
    display: block;
}

@keyframes wn-spin {
    to { transform: rotate(360deg); }
}

/* Footer links ------------------------------------------------------------ */
.wn-foot {
    margin-top: 24px;
    text-align: center;
    font-size: 14px;
    color: var(--wn-muted);
}

.wn-foot a {
    font-weight: 600;
    color: var(--wn-primary);
    text-decoration: none;
    transition: color .2s ease;
}

.wn-foot a:hover {
    color: var(--wn-primary-dark);
    text-decoration: underline;
}

.wn-divider {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 26px 0 16px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #94a3b8;
}

.wn-divider::before,
.wn-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--wn-line), transparent);
}

.wn-demo {
    display: flex;
    gap: 12px;
}

.wn-demo a {
    flex: 1;
    height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border-radius: 12px;
    border: 1.5px solid var(--wn-line);
    background: #fff;
    font-size: 14px;
    font-weight: 600;
    color: #475569;
    text-decoration: none;
    transition: all .2s ease;
}

.wn-demo a:hover {
    border-color: var(--wn-primary);
    color: var(--wn-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -12px rgba(79, 70, 229, .8);
}

/* Errors / alerts --------------------------------------------------------- */
.wn-card .wn-error {
    list-style: none;
    display: block;
    margin: 7px 0 0;
    padding: 0;
    font-size: 12.5px;
    font-weight: 500;
    color: var(--wn-danger);
}

.wn-card .wn-error li + li {
    margin-top: 3px;
}

.wn-card .alert {
    position: relative;
    border: 1px solid transparent;
    border-radius: 14px;
    padding: 13px 42px 13px 16px;
    font-size: 14px;
    margin-bottom: 20px;
}

/* Bootstrap CSS is not loaded on this page, so the dismiss button needs its own look. */
.wn-card .alert .btn-close {
    position: absolute;
    top: 50%;
    right: 12px;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 7px;
    cursor: pointer;
    background: transparent
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath stroke='%23475569' stroke-width='2' stroke-linecap='round' d='M4 4l8 8M12 4l-8 8'/%3E%3C/svg%3E")
        center / 11px no-repeat;
    opacity: .6;
    transition: opacity .2s ease, background-color .2s ease;
}

.wn-card .alert .btn-close:hover {
    opacity: 1;
    background-color: rgba(15, 23, 42, .06);
}

.wn-card .alert-danger {
    color: #9f1239;
    background: #fff1f2;
    border-color: #fecdd3;
}

.wn-card .alert-success {
    color: #065f46;
    background: #ecfdf5;
    border-color: #a7f3d0;
}

.wn-card .alert-warning {
    color: #854d0e;
    background: #fefce8;
    border-color: #fde68a;
}

.wn-captcha {
    margin-bottom: 18px;
    display: flex;
    justify-content: center;
    transform-origin: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
    .wn-brand { padding: 40px 40px; }
    .wn-shell { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 991.98px) {
    .wn-shell {
        grid-template-columns: 1fr;
    }

    .wn-brand {
        display: none;
    }

    .wn-panel {
        min-height: 100vh;
        padding: 32px 18px;
    }

    .wn-card {
        max-width: 470px;
        padding: 34px 26px 28px;
    }

    .wn-card__logo {
        display: flex;
        justify-content: center;
    }
}

@media (max-width: 400px) {
    .wn-card { padding: 28px 20px 24px; }
    .wn-card h1 { font-size: 23px; }
    .wn-demo { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    .wn-auth *,
    .wn-auth *::before,
    .wn-auth *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
    }

    .wn-reveal { opacity: 1; transform: none; }
}
