:root {
    --nia-ink: #11194a;
    --nia-indigo: #21166f;
    --nia-purple: #4c2aa3;
    --nia-pink: #e5127d;
    --nia-muted: #707895;
    --nia-border: #e5e8f2;
    --nia-surface: #ffffff;
}

.admin-auth-page {
    min-height: 100vh;
    min-height: 100dvh;
    padding: clamp(12px, 2.5vh, 30px);
    display: flex;
    align-items: center;
    justify-content: center;
    background:
        radial-gradient(circle at 10% 10%, rgba(229, 18, 125, .13), transparent 30%),
        radial-gradient(circle at 92% 84%, rgba(76, 42, 163, .18), transparent 34%),
        #f4f6fc;
    font-family: "Poppins", sans-serif;
    color: var(--nia-ink);
}

.admin-auth-shell {
    width: min(1080px, calc(100vw - 32px), 72vw);
    height: min(660px, calc(100vh - 32px));
    height: min(660px, calc(100dvh - 32px));
    min-height: 0;
    display: grid;
    grid-template-columns: minmax(300px, .88fr) minmax(400px, 1.12fr);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 28px;
    background: var(--nia-surface);
    box-shadow: 0 28px 75px rgba(24, 20, 81, .16);
}

.admin-auth-brand {
    position: relative;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: clamp(28px, 5vh, 56px) clamp(28px, 4vw, 48px) clamp(24px, 4vh, 42px);
    overflow: hidden;
    background:
        linear-gradient(145deg, rgba(17, 25, 74, .98), rgba(48, 25, 123, .97) 60%, rgba(124, 22, 116, .96));
    color: #fff;
}

.admin-auth-brand::before,
.admin-auth-brand::after {
    content: "";
    position: absolute;
    border: 1px solid rgba(255, 255, 255, .13);
    border-radius: 50%;
    pointer-events: none;
}

.admin-auth-brand::before {
    width: 430px;
    height: 430px;
    right: -220px;
    top: -155px;
}

.admin-auth-brand::after {
    width: 540px;
    height: 540px;
    left: -360px;
    bottom: -230px;
}

.admin-auth-brand > * {
    position: relative;
    z-index: 1;
}

.admin-auth-logo-frame {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: min(380px, 100%);
    margin: 0 0 clamp(26px, 4.5vh, 44px);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
}

/* Soft brand glow so the logo lifts off the gradient panel */
.admin-auth-logo-frame::before {
    content: "";
    position: absolute;
    z-index: 0;
    inset: -28% -12%;
    background:
        radial-gradient(ellipse at 22% 50%, rgba(229, 18, 125, .28), transparent 58%),
        radial-gradient(ellipse at 78% 55%, rgba(124, 92, 255, .22), transparent 62%);
    filter: blur(14px);
    pointer-events: none;
}

.admin-auth-logo {
    position: relative;
    z-index: 1;
    display: block;
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    filter: drop-shadow(0 10px 22px rgba(6, 8, 50, .45));
}

.admin-auth-kicker {
    margin-bottom: 14px;
    color: #f5a0ce;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
}

.admin-auth-brand h1 {
    max-width: 340px;
    margin: 0 0 14px;
    color: #fff;
    font-size: clamp(26px, 3vw, 38px);
    font-weight: 600;
    line-height: 1.16;
}

.admin-auth-brand p {
    max-width: 350px;
    margin: 0;
    color: rgba(255, 255, 255, .73);
    font-size: 14px;
    line-height: 1.8;
}

.admin-auth-points {
    display: grid;
    gap: 11px;
    margin: clamp(22px, 4vh, 34px) 0 0;
}

.admin-auth-point {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    color: rgba(255, 255, 255, .85);
    font-size: 12px;
    line-height: 1.5;
}

.admin-auth-point span {
    color: inherit;
}

.admin-auth-point i {
    flex: 0 0 27px;
    width: 27px;
    height: 27px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: rgba(229, 18, 125, .2);
    color: #ffb2d8;
}

.admin-auth-brand-footer {
    margin-top: 22px;
    color: rgba(255, 255, 255, .45);
    font-size: 11px;
    letter-spacing: .03em;
}

.admin-auth-card {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(28px, 5vh, 58px) clamp(28px, 5vw, 68px);
    background: #fff;
}

.admin-auth-card--recovery .admin-auth-card-header,
.admin-auth-card--recovery .admin-auth-form {
    width: 100%;
    max-width: 430px;
    margin-right: auto;
    margin-left: auto;
}

.admin-auth-card--recovery .admin-auth-back {
    align-self: center;
}

.admin-auth-card--recovery .admin-auth-captcha {
    max-width: 100%;
    overflow-x: auto;
}

.admin-auth-card-header {
    margin-bottom: clamp(20px, 3.5vh, 30px);
}

.admin-auth-card-header .eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--nia-pink);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
}

.admin-auth-card-header h2 {
    margin: 0 0 10px;
    color: var(--nia-ink);
    font-size: clamp(26px, 3vw, 34px);
    font-weight: 600;
    line-height: 1.2;
}

.admin-auth-card-header p {
    margin: 0;
    color: var(--nia-muted);
    font-size: 13px;
    line-height: 1.7;
}

.admin-auth-form .form-group {
    margin-bottom: 18px;
}

.admin-auth-form label {
    display: block;
    margin-bottom: 9px;
    color: var(--nia-ink);
    font-size: 12px;
    font-weight: 600;
}

.admin-auth-form .form-control {
    min-height: 48px;
    padding: 10px 15px;
    border: 1px solid var(--nia-border);
    border-radius: 11px;
    color: var(--nia-ink);
    background: #fbfcff;
    box-shadow: none;
    font-size: 13px;
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.admin-auth-form .form-control:focus {
    border-color: var(--nia-purple);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(76, 42, 163, .1);
}

.admin-auth-form .input-with-icon {
    position: relative;
}

.admin-auth-form .input-with-icon .form-control {
    padding-left: 43px;
}

.admin-auth-form .input-with-icon > i {
    position: absolute;
    z-index: 2;
    top: 15px;
    left: 16px;
    color: #969cb5;
}

.admin-auth-form .input-with-icon .password-toggle {
    position: absolute;
    z-index: 2;
    top: 7px;
    right: 9px;
    width: 34px;
    height: 34px;
    border: 0;
    border-radius: 8px;
    color: #8b91ab;
    background: transparent;
}

.admin-auth-form .input-with-icon .password-toggle:hover {
    color: var(--nia-purple);
    background: #f0effa;
}

.admin-auth-form .has-toggle .form-control {
    padding-right: 50px;
}

.admin-auth-link {
    color: var(--nia-purple);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.admin-auth-link:hover {
    color: var(--nia-pink);
}

.admin-auth-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .25rem;
    min-height: 48px;
    border: 0;
    border-radius: 11px;
    background: linear-gradient(100deg, var(--nia-indigo), var(--nia-pink));
    box-shadow: 0 10px 20px rgba(76, 42, 163, .2);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    transition: transform .2s ease, box-shadow .2s ease;
}

.admin-auth-card button[type="submit"].is-loading {
    cursor: wait;
    pointer-events: none;
    opacity: .78;
    transform: none;
}

.admin-auth-submit__spinner {
    display: inline-block;
    width: 1em;
    height: 1em;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: admin-auth-spin .7s linear infinite;
    vertical-align: -.15em;
}

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

@media (prefers-reduced-motion: reduce) {
    .admin-auth-submit__spinner {
        animation: none;
    }
}

.admin-auth-submit:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 13px 24px rgba(76, 42, 163, .28);
}

.admin-auth-back {
    display: inline-flex;
    gap: 7px;
    align-items: center;
    justify-content: center;
    margin-top: 22px;
    color: var(--nia-muted);
    font-size: 12px;
    text-decoration: none;
}

.admin-auth-back:hover {
    color: var(--nia-purple);
}

.admin-auth-note {
    display: flex;
    gap: 9px;
    align-items: flex-start;
    margin-top: 16px;
    padding: 10px 13px;
    border: 1px solid #eceef6;
    border-radius: 10px;
    color: var(--nia-muted);
    background: #fafbfe;
    font-size: 11px;
    line-height: 1.55;
}

.admin-auth-note i {
    margin-top: 2px;
    color: var(--nia-pink);
}

.admin-auth-feedback {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    margin: 0 auto 18px;
    padding: 11px 13px;
    border: 1px solid;
    border-radius: 11px;
    font-size: 12px;
    line-height: 1.5;
}

.admin-auth-feedback > i {
    flex: 0 0 auto;
    margin-top: 2px;
    font-size: 15px;
}

.admin-auth-feedback strong {
    display: block;
    margin-bottom: 2px;
    font-size: 11px;
    font-weight: 700;
}

.admin-auth-feedback p {
    margin: 0;
    color: inherit;
    font-size: inherit;
    line-height: inherit;
}

.admin-auth-feedback--error {
    border-color: #f3bfd0;
    color: #a42349;
    background: #fff4f7;
}

.admin-auth-feedback--warning {
    border-color: #f4d39b;
    color: #95621b;
    background: #fff9ed;
}

.admin-auth-feedback--success {
    border-color: #b7e3ce;
    color: #18794e;
    background: #effbf4;
}

.admin-auth-field-error {
    margin-top: 6px;
    color: #b4234f;
    font-size: 11px;
    line-height: 1.45;
}

.admin-auth-form .form-control.is-invalid {
    border-color: #e45b7b;
    background: #fff8fa;
    box-shadow: 0 0 0 3px rgba(228, 91, 123, .1);
}

.admin-auth-form .form-control.is-invalid:focus {
    border-color: #c83e62;
    box-shadow: 0 0 0 4px rgba(228, 91, 123, .16);
}

.admin-auth-code-inputs.has-error .admin-auth-code-box {
    border-color: #e45b7b;
    background: #fff8fa;
}

.admin-auth-code {
    text-align: center;
    letter-spacing: .42em;
    font-size: 24px !important;
    font-weight: 700;
}

.admin-auth-code-hint {
    margin-top: 9px;
    color: var(--nia-muted);
    font-size: 11px;
    line-height: 1.6;
}

.admin-auth-timer {
    display: inline-block;
    margin-top: 9px;
    color: var(--nia-pink);
    font-size: 12px;
    font-weight: 600;
}

.admin-auth-check {
    margin-top: -10px;
    margin-bottom: 22px;
    color: var(--nia-muted);
    font-size: 11px;
    line-height: 1.6;
}

.admin-auth-captcha {
    margin-bottom: 20px;
}

@media (max-width: 980px) {
    .admin-auth-page {
        padding: 14px;
    }

    .admin-auth-shell {
        width: 100%;
        height: auto;
        min-height: 0;
        grid-template-columns: 1fr;
        border-radius: 20px;
    }

    .admin-auth-brand {
        min-height: 260px;
        padding: 30px 28px;
    }

    .admin-auth-brand h1,
    .admin-auth-brand p,
    .admin-auth-points {
        display: none;
    }

    .admin-auth-logo-frame {
        width: min(300px, 100%);
        margin: 0 auto 18px;
    }

    .admin-auth-logo {
        width: 100%;
        height: auto;
    }

    .admin-auth-brand-footer {
        margin-top: 10px;
    }

    .admin-auth-card {
        padding: 38px 26px 42px;
    }
}

@media (max-height: 620px) and (min-width: 981px) {
    .admin-auth-page {
        padding: 10px 16px;
    }

    .admin-auth-shell {
        height: calc(100vh - 20px);
        height: calc(100dvh - 20px);
    }

    .admin-auth-brand {
        padding: 24px 32px 18px;
    }

    .admin-auth-logo-frame {
        width: min(300px, 100%);
        margin-bottom: 18px;
    }

    .admin-auth-logo {
        width: 100%;
        height: auto;
    }

    .admin-auth-kicker {
        margin-bottom: 7px;
        font-size: 10px;
    }

    .admin-auth-brand h1 {
        margin-bottom: 10px;
        font-size: 30px;
    }

    .admin-auth-brand p {
        font-size: 12px;
        line-height: 1.55;
    }

    .admin-auth-points {
        gap: 8px;
        margin-top: 20px;
    }

    .admin-auth-point {
        gap: 8px;
        font-size: 11px;
    }

    .admin-auth-point i {
        flex-basis: 22px;
        width: 22px;
        height: 22px;
    }

    .admin-auth-brand-footer {
        margin-top: 16px;
        font-size: 10px;
    }

    .admin-auth-card {
        padding: 24px 54px;
    }

    .admin-auth-card--recovery .admin-auth-card-header,
    .admin-auth-card--recovery .admin-auth-form {
        max-width: 100%;
    }

    .admin-auth-card-header {
        margin-bottom: 18px;
    }

    .admin-auth-card-header .eyebrow {
        margin-bottom: 7px;
        font-size: 10px;
    }

    .admin-auth-card-header h2 {
        margin-bottom: 7px;
        font-size: 27px;
    }

    .admin-auth-card-header p {
        font-size: 12px;
        line-height: 1.5;
    }

    .admin-auth-form .form-group {
        margin-bottom: 14px;
    }

    .admin-auth-form label {
        margin-bottom: 6px;
        font-size: 11px;
    }

    .admin-auth-form .form-control {
        min-height: 42px;
        padding-top: 8px;
        padding-bottom: 8px;
        font-size: 12px;
    }

    .admin-auth-form .input-with-icon > i {
        top: 12px;
    }

    .admin-auth-form .input-with-icon .password-toggle {
        top: 4px;
    }

    .admin-auth-submit {
        min-height: 42px;
    }

    .admin-auth-note {
        margin-top: 12px;
        padding: 8px 10px;
        font-size: 10px;
    }

    .admin-auth-feedback {
        margin-bottom: 14px;
        padding: 9px 10px;
        font-size: 11px;
    }

    .admin-auth-field-error {
        margin-top: 5px;
        font-size: 10px;
    }
}