/* ==========================================================================
   Setupay — Admin Authentication Theme
   Self-contained. No Bootstrap / Metronic required.
   Palette sampled from the Setupay logo.
   ========================================================================== */

:root {
    /* Brand core */
    --sp-navy: #0d1b3e;
    --sp-navy-700: #142a5c;
    --sp-blue: #1155f0;
    --sp-blue-600: #0f4ad6;
    --sp-blue-400: #4b86ff;
    --sp-green: #12a350;
    --sp-green-400: #22c46b;
    /* Surfaces */
    --sp-bg: #f4f7fc;
    --sp-card: #ffffff;
    --sp-line: #e4eaf5;
    --sp-line-soft: #eef2fa;
    /* Text */
    --sp-text: #0d1b3e;
    --sp-muted: #6b7a99;
    --sp-faint: #9aa8c2;
    /* States */
    --sp-danger: #e0325b;
    --sp-danger-bg: #fdeef2;
    --sp-warn: #d98518;
    --sp-warn-bg: #fdf5e8;
    --sp-ok: #12a350;
    --sp-ok-bg: #e9f8ef;
    /* Shape */
    --sp-radius: 14px;
    --sp-radius-lg: 22px;
    --sp-shadow: 0 24px 60px -18px rgba(13, 27, 62, .22);
    --sp-shadow-sm: 0 4px 14px -4px rgba(13, 27, 62, .12);
    --sp-ring: 0 0 0 4px rgba(17, 85, 240, .14);
    --sp-font: "Plus Jakarta Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html, body {
    height: 100%;
}

body {
    margin: 0;
    font-family: var(--sp-font);
    font-size: 15px;
    line-height: 1.55;
    color: var(--sp-text);
    background: var(--sp-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--sp-blue);
    text-decoration: none;
}

    a:hover {
        color: var(--sp-blue-600);
    }

/* ==========================================================================
   Layout
   ========================================================================== */

.sp-shell {
    display: flex;
    min-height: 100vh;
    width: 100%;
}

/* ---------- Left / brand panel ---------- */

.sp-brand {
    position: relative;
    flex: 0 0 46%;
    max-width: 680px;
    padding: 48px 56px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: #fff;
    background: radial-gradient(1100px 620px at 12% 8%, rgba(18, 163, 80, .55) 0%, rgba(18, 163, 80, 0) 58%), radial-gradient(900px 700px at 92% 88%, rgba(17, 85, 240, .75) 0%, rgba(17, 85, 240, 0) 60%), linear-gradient(150deg, #0b1836 0%, #10275e 42%, #0f3fb0 100%);
}

/* soft moving orbs */
.sp-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: .55;
    pointer-events: none;
}

.sp-orb--a {
    width: 380px;
    height: 380px;
    top: -90px;
    left: -110px;
    background: #12a350;
    animation: sp-float 18s ease-in-out infinite;
}

.sp-orb--b {
    width: 460px;
    height: 460px;
    bottom: -160px;
    right: -140px;
    background: #1155f0;
    animation: sp-float 22s ease-in-out infinite reverse;
}

.sp-orb--c {
    width: 240px;
    height: 240px;
    top: 42%;
    right: 12%;
    background: #4b86ff;
    opacity: .30;
    animation: sp-float 26s ease-in-out infinite;
}

@keyframes sp-float {
    0%, 100% {
        transform: translate3d(0, 0, 0) scale(1);
    }

    50% {
        transform: translate3d(24px, -30px, 0) scale(1.08);
    }
}

/* speed-dash motif borrowed from the logo mark */
.sp-dashes {
    position: absolute;
    right: -30px;
    top: 44px;
    width: 340px;
    height: 130px;
    opacity: .13;
    background-image: linear-gradient(90deg, #fff 0 96px, transparent 96px), linear-gradient(90deg, #fff 0 54px, transparent 54px), linear-gradient(90deg, #fff 0 126px, transparent 126px), linear-gradient(90deg, #fff 0 40px, transparent 40px);
    background-size: 340px 9px;
    background-position: 0 0, 70px 28px, 24px 56px, 140px 84px;
    background-repeat: no-repeat;
    border-radius: 99px;
    pointer-events: none;
}

/* lift real content above the decorative layers (orbs stay absolute) */
.sp-brand__logo,
.sp-brand__body,
.sp-brand__foot {
    position: relative;
    z-index: 2;
}

    .sp-brand__logo img {
        height: 46px;
        width: auto;
        display: block;
        /* logo artwork is dark navy → invert to read on the gradient */
        filter: brightness(0) invert(1);
    }

.sp-brand__body {
    margin: auto 0;
    padding: 40px 0;
}

.sp-brand__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .10em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .20);
    backdrop-filter: blur(6px);
}

    .sp-brand__eyebrow .sp-dot {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: #2ee07c;
        box-shadow: 0 0 0 4px rgba(46, 224, 124, .22);
    }

.sp-brand__title {
    margin: 26px 0 16px;
    font-size: clamp(30px, 3.4vw, 46px);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -.02em;
}

    .sp-brand__title span {
        background: linear-gradient(90deg, #7ef2b0 0%, #8fc0ff 100%);
        -webkit-background-clip: text;
        background-clip: text;
        color: transparent;
    }

.sp-brand__lead {
    max-width: 44ch;
    margin: 0 0 34px;
    font-size: 16.5px;
    color: rgba(255, 255, 255, .80);
}

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

    .sp-features li {
        display: flex;
        align-items: flex-start;
        gap: 13px;
        font-size: 14.5px;
        color: rgba(255, 255, 255, .90);
    }

    .sp-features .sp-tick {
        flex: 0 0 auto;
        width: 24px;
        height: 24px;
        margin-top: 1px;
        border-radius: 8px;
        display: grid;
        place-items: center;
        background: rgba(46, 224, 124, .18);
        border: 1px solid rgba(46, 224, 124, .34);
    }

        .sp-features .sp-tick svg {
            width: 13px;
            height: 13px;
            stroke: #4ef195;
        }

.sp-stats {
    display: flex;
    gap: 34px;
    margin-top: 42px;
    padding-top: 26px;
    border-top: 1px solid rgba(255, 255, 255, .14);
}

    .sp-stats b {
        display: block;
        font-size: 22px;
        font-weight: 800;
        letter-spacing: -.01em;
    }

    .sp-stats span {
        font-size: 12px;
        letter-spacing: .06em;
        text-transform: uppercase;
        color: rgba(255, 255, 255, .62);
    }

.sp-brand__foot {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .55);
}

/* ---------- Right / form panel ---------- */

.sp-panel {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    padding: 32px 24px;
    background: radial-gradient(700px 380px at 100% 0%, #eaf1ff 0%, rgba(234, 241, 255, 0) 70%), var(--sp-bg);
}

.sp-panel__top {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    font-size: 13px;
    color: var(--sp-muted);
}

.sp-env {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    color: var(--sp-navy);
    background: #fff;
    border: 1px solid var(--sp-line);
    box-shadow: var(--sp-shadow-sm);
}

    .sp-env i {
        width: 7px;
        height: 7px;
        border-radius: 50%;
        background: var(--sp-ok);
        box-shadow: 0 0 0 3px rgba(18, 163, 80, .16);
    }

.sp-panel__center {
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 28px 0;
}

.sp-card {
    width: 100%;
    max-width: 460px;
    background: var(--sp-card);
    border: 1px solid var(--sp-line);
    border-radius: var(--sp-radius-lg);
    box-shadow: var(--sp-shadow);
    padding: 42px 40px 34px;
    position: relative;
    overflow: hidden;
    animation: sp-rise .5s cubic-bezier(.22, 1, .36, 1) both;
}

    .sp-card::before {
        content: "";
        position: absolute;
        inset: 0 0 auto 0;
        height: 4px;
        background: linear-gradient(90deg, var(--sp-green) 0%, var(--sp-blue) 55%, var(--sp-navy) 100%);
    }

@keyframes sp-rise {
    from {
        opacity: 0;
        transform: translateY(14px);
    }

    to {
        opacity: 1;
        transform: none;
    }
}

.sp-card__mark {
    display: none; /* shown on mobile only */
    margin: 0 auto 18px;
    height: 40px;
}

.sp-card__head {
    margin-bottom: 26px;
}

    .sp-card__head h1 {
        margin: 0 0 6px;
        font-size: 26px;
        font-weight: 800;
        letter-spacing: -.02em;
    }

    .sp-card__head p {
        margin: 0;
        font-size: 14.5px;
        color: var(--sp-muted);
    }

/* ---------- Alerts ---------- */

.sp-alert {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 13px 15px;
    border-radius: var(--sp-radius);
    font-size: 13.5px;
    font-weight: 500;
    margin-bottom: 20px;
    border: 1px solid transparent;
    animation: sp-rise .28s ease both;
}

    .sp-alert svg {
        flex: 0 0 auto;
        width: 17px;
        height: 17px;
        margin-top: 1px;
    }

.sp-alert--error {
    background: var(--sp-danger-bg);
    border-color: #f8d3dd;
    color: #a81b3f;
}

.sp-alert--warn {
    background: var(--sp-warn-bg);
    border-color: #f6e2c2;
    color: #96601a;
}

.sp-alert--ok {
    background: var(--sp-ok-bg);
    border-color: #c8ecd7;
    color: #0c7a3c;
}

.sp-alert[hidden] {
    display: none;
}

/* ---------- Fields ---------- */

.sp-field {
    margin-bottom: 18px;
}

.sp-field__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
    color: var(--sp-navy);
}

    .sp-field__label a {
        font-size: 12.5px;
        font-weight: 600;
    }

.sp-input {
    position: relative;
    display: flex;
    align-items: center;
    background: #f7f9fd;
    border: 1.5px solid var(--sp-line);
    border-radius: var(--sp-radius);
    transition: border-color .18s, box-shadow .18s, background .18s;
}

    .sp-input:focus-within {
        background: #fff;
        border-color: var(--sp-blue);
        box-shadow: var(--sp-ring);
    }

    .sp-input.is-invalid {
        border-color: var(--sp-danger);
        background: #fff;
    }

        .sp-input.is-invalid:focus-within {
            box-shadow: 0 0 0 4px rgba(224, 50, 91, .13);
        }

.sp-input__icon {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 46px;
    height: 52px;
    color: var(--sp-faint);
    transition: color .18s;
}

.sp-input:focus-within .sp-input__icon {
    color: var(--sp-blue);
}

.sp-input__icon svg {
    width: 18px;
    height: 18px;
}

.sp-input input {
    flex: 1 1 auto;
    width: 100%;
    height: 52px;
    padding: 0 6px 0 0;
    border: 0;
    outline: 0;
    background: transparent;
    font: inherit;
    font-size: 15px;
    font-weight: 500;
    color: var(--sp-text);
    letter-spacing: .01em;
}

    .sp-input input::placeholder {
        color: var(--sp-faint);
        font-weight: 400;
    }

    .sp-input input:-webkit-autofill {
        -webkit-text-fill-color: var(--sp-text);
        -webkit-box-shadow: 0 0 0 1000px #f7f9fd inset;
    }

.sp-input__btn {
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    width: 46px;
    height: 52px;
    border: 0;
    background: transparent;
    color: var(--sp-faint);
    cursor: pointer;
    border-radius: 0 var(--sp-radius) var(--sp-radius) 0;
    transition: color .15s;
}

    .sp-input__btn:hover {
        color: var(--sp-blue);
    }

    .sp-input__btn svg {
        width: 18px;
        height: 18px;
    }

.sp-error {
    display: block;
    margin-top: 6px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--sp-danger);
}

    .sp-error[hidden] {
        display: none;
    }

/* password strength / caps hint */
.sp-hint {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-top: 8px;
    font-size: 12px;
    font-weight: 600;
    color: var(--sp-warn);
}

    .sp-hint[hidden] {
        display: none;
    }

    .sp-hint svg {
        width: 14px;
        height: 14px;
    }

/* ---------- Row: remember + meta ---------- */

.sp-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 4px 0 22px;
}

.sp-check {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--sp-muted);
    cursor: pointer;
    user-select: none;
}

    .sp-check input {
        appearance: none;
        -webkit-appearance: none;
        width: 19px;
        height: 19px;
        margin: 0;
        border: 1.5px solid var(--sp-line);
        border-radius: 6px;
        background: #fff;
        cursor: pointer;
        position: relative;
        transition: all .16s;
    }

        .sp-check input:checked {
            background: var(--sp-blue);
            border-color: var(--sp-blue);
        }

            .sp-check input:checked::after {
                content: "";
                position: absolute;
                left: 6px;
                top: 2.5px;
                width: 4px;
                height: 9px;
                border: solid #fff;
                border-width: 0 2px 2px 0;
                transform: rotate(42deg);
            }

        .sp-check input:focus-visible {
            box-shadow: var(--sp-ring);
        }

/* ---------- Button ---------- */

.sp-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    height: 54px;
    padding: 0 20px;
    border: 0;
    border-radius: var(--sp-radius);
    font: inherit;
    font-size: 15.5px;
    font-weight: 700;
    letter-spacing: .01em;
    color: #fff;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    background: linear-gradient(100deg, var(--sp-navy) 0%, var(--sp-blue) 60%, #1f7ef5 100%);
    background-size: 180% 100%;
    background-position: 0% 50%;
    box-shadow: 0 14px 26px -12px rgba(17, 85, 240, .70);
    transition: background-position .45s ease, transform .12s ease, box-shadow .2s ease;
}

    .sp-btn:hover:not(:disabled) {
        background-position: 100% 50%;
        box-shadow: 0 18px 32px -12px rgba(17, 85, 240, .80);
    }

    .sp-btn:active:not(:disabled) {
        transform: translateY(1px);
    }

    .sp-btn:focus-visible {
        outline: 0;
        box-shadow: var(--sp-ring), 0 14px 26px -12px rgba(17, 85, 240, .6);
    }

    .sp-btn:disabled {
        opacity: .70;
        cursor: not-allowed;
    }

    .sp-btn svg {
        width: 17px;
        height: 17px;
    }

.sp-spinner {
    width: 17px;
    height: 17px;
    border: 2.2px solid rgba(255, 255, 255, .35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sp-spin .65s linear infinite;
}

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

/* ---------- Location / security strip ---------- */

.sp-secure {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px dashed var(--sp-line);
}

.sp-chip {
    display: flex;
    align-items: center;
    gap: 11px;
    width: 100%;
    padding: 11px 14px;
    border-radius: var(--sp-radius);
    background: #f7f9fd;
    border: 1px solid var(--sp-line-soft);
    font-size: 12.5px;
    color: var(--sp-muted);
    transition: all .2s;
}

    .sp-chip + .sp-chip {
        margin-top: 9px;
    }

.sp-chip__ico {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    background: #e9eefc;
    color: var(--sp-blue);
}

    .sp-chip__ico svg {
        width: 15px;
        height: 15px;
    }

.sp-chip__txt {
    flex: 1 1 auto;
    min-width: 0;
}

    .sp-chip__txt b {
        display: block;
        font-size: 12.5px;
        font-weight: 700;
        color: var(--sp-navy);
        margin-bottom: 1px;
    }

    .sp-chip__txt span {
        display: block;
        font-size: 11.5px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

.sp-chip__state {
    flex: 0 0 auto;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    padding: 4px 9px;
    border-radius: 999px;
    background: #eef2fa;
    color: var(--sp-faint);
}

.sp-chip.is-pending .sp-chip__state {
    background: #fdf5e8;
    color: var(--sp-warn);
}

.sp-chip.is-ok {
    border-color: #cfeedd;
    background: #f4fbf7;
}

    .sp-chip.is-ok .sp-chip__ico {
        background: #dcf3e6;
        color: var(--sp-ok);
    }

    .sp-chip.is-ok .sp-chip__state {
        background: #dcf3e6;
        color: var(--sp-ok);
    }

.sp-chip.is-off .sp-chip__ico {
    background: #fdeef2;
    color: var(--sp-danger);
}

.sp-chip.is-off .sp-chip__state {
    background: #fdeef2;
    color: var(--sp-danger);
}

.sp-retry {
    border: 0;
    background: transparent;
    padding: 0;
    font: inherit;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--sp-blue);
    cursor: pointer;
    text-decoration: underline;
}

.sp-panel__foot {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 12.5px;
    color: var(--sp-faint);
}

    .sp-panel__foot a {
        color: var(--sp-muted);
        font-weight: 600;
    }

        .sp-panel__foot a:hover {
            color: var(--sp-blue);
        }

    .sp-panel__foot .sep {
        opacity: .5;
    }

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1100px) {
    .sp-brand {
        flex-basis: 42%;
        padding: 40px 40px;
    }

    .sp-card {
        padding: 38px 32px 30px;
    }
}

@media (max-width: 900px) {
    .sp-shell {
        flex-direction: column;
    }

    .sp-brand {
        display: none;
    }

    .sp-card__mark {
        display: block;
    }

    .sp-panel {
        min-height: 100vh;
        background: radial-gradient(900px 420px at 50% -10%, #e6eeff 0%, rgba(230, 238, 255, 0) 70%), var(--sp-bg);
    }

    .sp-panel__top {
        justify-content: center;
    }

    .sp-card {
        padding: 34px 24px 28px;
        border-radius: 18px;
    }

    .sp-card__head {
        text-align: center;
    }
}

@media (max-width: 420px) {
    .sp-card {
        padding: 28px 18px 24px;
        box-shadow: none;
        border-radius: 16px;
    }

    .sp-card__head h1 {
        font-size: 22px;
    }

    .sp-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
}

/* ==========================================================================
   Dark mode
   ========================================================================== */

@media (prefers-color-scheme: dark) {
    :root[data-sp-theme="auto"] {
        --sp-bg: #070d1d;
        --sp-card: #0e1730;
        --sp-line: #1d2a4a;
        --sp-line-soft: #16223f;
        --sp-text: #e8eefc;
        --sp-muted: #8ea0c4;
        --sp-faint: #5f7098;
    }

        :root[data-sp-theme="auto"] .sp-input {
            background: #101c38;
        }

            :root[data-sp-theme="auto"] .sp-input:focus-within {
                background: #13203f;
            }

        :root[data-sp-theme="auto"] .sp-chip {
            background: #101c38;
        }

        :root[data-sp-theme="auto"] .sp-chip__ico {
            background: #16254a;
        }

        :root[data-sp-theme="auto"] .sp-env {
            background: #0e1730;
            color: #e8eefc;
        }

        :root[data-sp-theme="auto"] .sp-check input {
            background: #101c38;
        }

        :root[data-sp-theme="auto"] .sp-card__mark {
            filter: brightness(0) invert(1);
        }
}

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