/* =====================================================================
   WebNest — account login
   Centred card on a soft backdrop, matching a clean corporate login:
   minimal fields, an eye toggle, a human check, and an alternate-action bar.
   ===================================================================== */

.authx {
    min-height: calc(100vh - var(--nav-h));
    display: grid;
    place-items: center;
    padding: clamp(1.5rem, 1rem + 3vw, 3.5rem) 1.25rem;
    background:
        radial-gradient(900px 460px at 12% 0%, rgba(47, 99, 246, .10), transparent 62%),
        radial-gradient(760px 420px at 92% 100%, rgba(255, 148, 22, .10), transparent 58%),
        linear-gradient(180deg, #f7f9fc, #eef2f8);
    position: relative;
    overflow: hidden;
}

/* faint circuit-style watermark, like the reference backdrop */
.authx::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 18% 22%, rgba(47, 99, 246, .10) 0 3px, transparent 4px),
        radial-gradient(circle at 82% 30%, rgba(47, 99, 246, .08) 0 4px, transparent 5px),
        radial-gradient(circle at 30% 78%, rgba(255, 148, 22, .10) 0 3px, transparent 4px),
        radial-gradient(circle at 70% 84%, rgba(47, 99, 246, .08) 0 5px, transparent 6px);
    pointer-events: none;
    opacity: .9;
}

.authx__card {
    position: relative;
    width: 100%;
    max-width: 430px;
    background: #fff;
    border: 1px solid var(--ink-100);
    border-radius: 0;
    box-shadow: 0 4px 10px rgba(15, 23, 41, .06), 0 18px 44px -18px rgba(15, 23, 41, .22);
    overflow: hidden;
    animation: authx-in .3s cubic-bezier(.22, .61, .36, 1) both;
}

@keyframes authx-in {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

/* the card's inner padding lives here so the footer bar can be flush */
.authx__card > *:not(.authx__foot) {
    padding-inline: 1.75rem;
}
.authx__card > *:first-child { padding-top: 1.75rem; }

/* ---------------------------------------------------------- brand row */
.authx__brand {
    display: flex;
    align-items: center;
    gap: .55rem;
    margin-bottom: 1.5rem;
    padding-top: 1.75rem;
}
.authx__mark {
    width: 34px; height: 34px;
    flex: none;
    display: grid; place-items: center;
    border-radius: 0;
    background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
    color: #fff;
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .03em;
    box-shadow: 0 6px 16px -8px rgba(47, 99, 246, .8);
}
.authx__name {
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: var(--ink-900);
}
.authx__name span { color: var(--brand-600); margin-left: .3rem; }

/* ---------------------------------------------------------- headings */
.authx__title {
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -.01em;
    margin: 0 0 .3rem;
    color: var(--ink-900);
}
.authx__sub {
    font-size: .9rem;
    color: var(--ink-500);
    margin: 0 0 1.25rem;
}
.authx__rule {
    border: 0;
    border-top: 1px solid var(--ink-100);
    margin: 0 0 1.5rem;
}

/* ------------------------------------------------------------ alerts */
.authx__alert {
    display: flex;
    align-items: flex-start;
    gap: .6rem;
    font-size: .86rem;
    border-radius: 0;
    padding: .7rem .85rem;
    margin-bottom: 1.15rem;
    border: 1px solid transparent;
    line-height: 1.5;
}
.authx__alert svg { flex: none; margin-top: .15rem; }
.authx__alert--ok  { background: var(--success-bg); border-color: var(--success-br); color: var(--success-fg); }
.authx__alert--bad { background: var(--danger-bg);  border-color: var(--danger-br);  color: var(--danger-fg); }
/* Informational: shown when the visitor was bounced here from a protected page.
   Brand-tinted rather than a warning — nothing is wrong with their account. */
.authx__alert--info { background: var(--brand-50); border-color: var(--ink-100); color: var(--brand-700); }

/* ------------------------------------------------------------ fields */
.authx__field { margin-bottom: 1.15rem; }
.authx__field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: var(--ink-700);
    margin-bottom: .4rem;
}
.authx__labelrow {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: .4rem;
}
.authx__labelrow label { margin-bottom: 0; }
.authx__forgot { font-size: .8rem; font-weight: 600; color: var(--brand-600); }
.authx__forgot:hover { text-decoration: underline; }

.authx__field input {
    width: 100%;
    font: inherit;
    font-size: .93rem;
    padding: .68rem .85rem;
    color: var(--ink-900);
    background: #fff;
    border: 1px solid var(--ink-200);
    border-radius: 0;
    transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.authx__field input::placeholder { color: var(--ink-300); }
.authx__field input:focus {
    outline: none;
    border-color: var(--brand-400);
    box-shadow: 0 0 0 3px rgba(47, 99, 246, .14);
}
.authx__field input.input-validation-error {
    border-color: var(--danger-br);
    background: #fffafa;
}

/* password + eye toggle */
.authx__pass { position: relative; display: flex; }
.authx__pass input { padding-right: 2.9rem; }
.authx__eye {
    position: absolute;
    right: 1px; top: 1px; bottom: 1px;
    width: 2.6rem;
    display: grid;
    place-items: center;
    border: 0;
    border-left: 1px solid var(--ink-100);
    background: transparent;
    color: var(--ink-400);
    cursor: pointer;
    border-radius: 0;
    transition: color .16s var(--ease), background-color .16s var(--ease);
}
.authx__eye:hover { color: var(--ink-700); background: var(--ink-50); }
.authx__eye svg { width: 17px; height: 17px; }

.authx__err {
    display: block;
    font-size: .8rem;
    font-weight: 600;
    color: var(--danger-fg);
    margin-top: .35rem;
}
.authx__err:empty { display: none; }

/* ------------------------------------------------------- remember me */
.authx__check {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-size: .89rem;
    color: var(--ink-700);
    cursor: pointer;
    margin-bottom: 1.15rem;
    user-select: none;
}
.authx__check input {
    width: 17px; height: 17px;
    accent-color: var(--brand-600);
    cursor: pointer;
    flex: none;
}

/* ----------------------------------------------------------- captcha */
/* honeypot — off-screen, never focusable by hand */
.authx__trap {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}

/* ------------------------------------------------------------ submit */
.authx__submit {
    width: 100%;
    font: inherit;
    font-size: .98rem;
    font-weight: 700;
    padding: .82rem 1rem;
    margin-top: 1.25rem;
    border: 0;
    border-radius: 0;
    background: var(--brand-600);
    color: #fff;
    cursor: pointer;
    transition: background-color .16s var(--ease), box-shadow .16s var(--ease), transform .16s var(--ease);
}
.authx__submit:hover {
    background: var(--brand-700);
    box-shadow: 0 10px 24px -12px rgba(47, 99, 246, .8);
}
.authx__submit:active { transform: translateY(1px); }
.authx__submit:disabled { opacity: .7; cursor: default; }

.authx__hint {
    font-size: .78rem;
    color: var(--ink-400);
    text-align: center;
    margin: .85rem 0 1.5rem;
}
.authx__hint code {
    font-family: var(--font-mono);
    font-size: .74rem;
    background: var(--ink-50);
    border: 1px solid var(--ink-100);
    border-radius: 0;
    padding: .05rem .3rem;
}

/* ------------------------------------------------- footer action bar */
.authx__foot {
    padding: .95rem 1.75rem;
    background: var(--ink-50);
    border-top: 1px solid var(--ink-100);
    text-align: center;
    font-size: .89rem;
    color: var(--ink-600);
}
.authx__foot a { font-weight: 700; }

@media (max-width: 480px) {
    .authx__card > *:not(.authx__foot) { padding-inline: 1.25rem; }
    .authx__foot { padding-inline: 1.25rem; }
    .authx__sum-input { width: 100%; }
}

/* ------------------------------------------- human check (sum + box) */
.authx__captcha {
    display: block;
    padding: .95rem 1rem;
    background: #fafbfd;
    border: 1px solid var(--ink-200);
    border-radius: 0;
    margin-bottom: .4rem;
    cursor: text;
}
.authx__captcha.has-error { border-color: var(--danger-br); background: #fffafa; }

.authx__captcha-head {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding-bottom: .7rem;
    margin-bottom: .85rem;
    border-bottom: 1px dashed var(--ink-200);
}
.authx__captcha-icon {
    width: 26px; height: 26px; flex: none;
    display: grid; place-items: center;
    border-radius: 0;
    background: var(--brand-50);
    color: var(--brand-600);
}
.authx__captcha-title {
    font-size: .82rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--ink-600);
}
.authx__captcha-badge {
    margin-left: auto;
    font-size: .62rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--brand-700);
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    padding: .14rem .42rem;
    border-radius: 0;
}

/* the sum itself: large, spaced, unmistakable */
.authx__captcha-sum {
    display: flex;
    align-items: center;
    gap: .7rem;
    flex-wrap: wrap;
}
.authx__sum-num {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -.02em;
    color: var(--ink-900);
    line-height: 1;
}
.authx__sum-op {
    font-size: 1.55rem;
    font-weight: 800;
    line-height: 1;
    color: var(--brand-600);
    background: var(--brand-50);
    border: 1px solid var(--brand-100);
    border-radius: 0;
    width: 34px; height: 34px;
    display: grid; place-items: center;
}
.authx__sum-eq {
    font-size: 1.55rem;
    font-weight: 700;
    color: var(--ink-400);
    line-height: 1;
}

.authx__sum-input {
    width: 88px;
    margin-left: auto;
    font: inherit;
    font-size: 1.4rem;
    font-weight: 800;
    text-align: center;
    letter-spacing: .04em;
    padding: .5rem .6rem;
    border: 2px solid var(--brand-300);
    border-radius: 0;
    background: #fff;
    color: var(--ink-900);
}
.authx__sum-input::placeholder { color: var(--ink-300); font-weight: 700; }
.authx__sum-input:focus {
    outline: none;
    border-color: var(--brand-500);
    box-shadow: 0 0 0 4px rgba(47, 99, 246, .16);
}
.authx__sum-input.input-validation-error { border-color: var(--danger-br); background: #fffafa; }

.authx__captcha-hint {
    margin: .8rem 0 0;
    font-size: .8rem;
    color: var(--ink-400);
}