:root {
    --sp-navy-950: #08172a;
    --sp-navy-900: #0f2744;
    --sp-navy-800: #16375e;
    --sp-blue-600: #2367a7;
    --sp-blue-500: #2f7fc3;
    --sp-cyan-400: #4bc2d6;
    --sp-slate-900: #182536;
    --sp-slate-700: #475569;
    --sp-slate-600: #64748b;
    --sp-slate-400: #94a3b8;
    --sp-slate-300: #cbd5e1;
    --sp-slate-200: #e2e8f0;
    --sp-slate-100: #f1f5f9;
    --sp-slate-50: #f8fafc;
    --sp-white: #ffffff;
    --sp-danger: #b42318;
    --sp-danger-bg: #fef3f2;
    --sp-success: #067647;
    --sp-success-bg: #ecfdf3;
    --sp-radius: 18px;
    --sp-shadow: 0 24px 70px rgba(15, 39, 68, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
    background: var(--sp-slate-50);
}

body {
    margin: 0;
    min-width: 320px;
    min-height: 100vh;
    font-family:
        Inter,
        ui-sans-serif,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    color: var(--sp-slate-900);
    background: var(--sp-slate-50);
    -webkit-font-smoothing: antialiased;
}

button,
input {
    font: inherit;
}

a {
    color: inherit;
}

.sp-auth__shell {
    display: grid;
    grid-template-columns: minmax(420px, 0.92fr) minmax(520px, 1.08fr);
    min-height: 100vh;
}

.sp-auth__brand {
    position: relative;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 52px 58px 42px;
    color: var(--sp-white);
    background:
        radial-gradient(
            circle at 82% 18%,
            rgba(75, 194, 214, 0.20),
            transparent 26%
        ),
        radial-gradient(
            circle at 15% 85%,
            rgba(47, 127, 195, 0.28),
            transparent 34%
        ),
        linear-gradient(
            145deg,
            var(--sp-navy-950) 0%,
            var(--sp-navy-900) 48%,
            var(--sp-navy-800) 100%
        );
}

.sp-auth__brand::before,
.sp-auth__brand::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    pointer-events: none;
}

.sp-auth__brand::before {
    top: -160px;
    right: -190px;
    width: 470px;
    height: 470px;
}

.sp-auth__brand::after {
    right: -70px;
    bottom: -230px;
    width: 520px;
    height: 520px;
}

.sp-brand {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 15px;
}

.sp-brand__mark {
    display: grid;
    width: 50px;
    height: 50px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--sp-cyan-400);
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: 15px;
    background: rgba(255, 255, 255, 0.07);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.sp-brand__mark svg {
    width: 31px;
    height: 31px;
}

.sp-brand__name {
    font-size: 22px;
    font-weight: 750;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.sp-brand__tagline {
    margin-top: 5px;
    color: rgba(255, 255, 255, 0.66);
    font-size: 12px;
    font-weight: 500;
    letter-spacing: 0.035em;
}

.sp-auth__brand-copy {
    position: relative;
    z-index: 1;
    width: min(100%, 560px);
    margin: auto 0;
    padding: 80px 0;
}

.sp-auth__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--sp-cyan-400);
    font-size: 12px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sp-auth__eyebrow::before {
    width: 24px;
    height: 2px;
    content: "";
    border-radius: 999px;
    background: currentColor;
}

.sp-auth__brand-copy h1 {
    margin: 24px 0 22px;
    font-size: clamp(38px, 4.2vw, 62px);
    font-weight: 760;
    line-height: 1.04;
    letter-spacing: -0.045em;
}

.sp-auth__brand-copy p {
    max-width: 510px;
    margin: 0;
    color: rgba(255, 255, 255, 0.68);
    font-size: 16px;
    line-height: 1.75;
}

.sp-auth__brand-footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    color: rgba(255, 255, 255, 0.46);
    font-size: 12px;
}

.sp-auth__separator {
    color: rgba(255, 255, 255, 0.22);
}

.sp-auth__content {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px;
    background:
        radial-gradient(
            circle at 95% 0%,
            rgba(47, 127, 195, 0.07),
            transparent 28%
        ),
        var(--sp-slate-50);
}

.sp-auth__card {
    width: min(100%, 460px);
    padding: 42px;
    border: 1px solid rgba(203, 213, 225, 0.72);
    border-radius: var(--sp-radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--sp-shadow);
}

.sp-auth__mobile-brand {
    display: none;
}

.sp-auth__content-footer {
    width: min(100%, 460px);
    margin-top: 24px;
    color: var(--sp-slate-400);
    font-size: 11px;
    text-align: center;
}

.sp-card__eyebrow {
    margin: 0 0 8px;
    color: var(--sp-blue-600);
    font-size: 11px;
    font-weight: 750;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.sp-card__title {
    margin: 0;
    color: var(--sp-navy-900);
    font-size: 30px;
    font-weight: 760;
    line-height: 1.16;
    letter-spacing: -0.035em;
}

.sp-card__description {
    margin: 12px 0 30px;
    color: var(--sp-slate-600);
    font-size: 14px;
    line-height: 1.65;
}

.sp-form {
    display: grid;
    gap: 21px;
}

.sp-field {
    display: grid;
    gap: 8px;
}

.sp-field__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.sp-label {
    color: var(--sp-slate-700);
    font-size: 13px;
    font-weight: 650;
}

.sp-input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;
    color: var(--sp-slate-900);
    border: 1px solid var(--sp-slate-300);
    border-radius: 10px;
    outline: none;
    background: var(--sp-white);
    transition:
        border-color 150ms ease,
        box-shadow 150ms ease,
        background-color 150ms ease;
}

.sp-input::placeholder {
    color: var(--sp-slate-400);
}

.sp-input:hover {
    border-color: #aebdce;
}

.sp-input:focus {
    border-color: var(--sp-blue-500);
    box-shadow: 0 0 0 4px rgba(47, 127, 195, 0.12);
}

.sp-input[aria-invalid="true"] {
    border-color: #e17b73;
}

.sp-error {
    margin: 0;
    color: var(--sp-danger);
    font-size: 12px;
    line-height: 1.45;
}

.sp-link {
    color: var(--sp-blue-600);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
}

.sp-link:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sp-button {
    display: inline-flex;
    width: 100%;
    min-height: 49px;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
    cursor: pointer;
    color: var(--sp-white);
    border: 0;
    border-radius: 10px;
    background:
        linear-gradient(
            135deg,
            var(--sp-blue-600),
            var(--sp-navy-800)
        );
    box-shadow: 0 8px 18px rgba(35, 103, 167, 0.18);
    font-size: 14px;
    font-weight: 700;
    transition:
        transform 120ms ease,
        box-shadow 120ms ease,
        filter 120ms ease;
}

.sp-button:hover {
    filter: brightness(1.05);
    box-shadow: 0 10px 22px rgba(35, 103, 167, 0.24);
}

.sp-button:active {
    transform: translateY(1px);
}

.sp-button:focus-visible,
.sp-link:focus-visible {
    outline: 3px solid rgba(47, 127, 195, 0.24);
    outline-offset: 3px;
}

.sp-alert {
    margin: 0 0 22px;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: 12px;
    line-height: 1.55;
}

.sp-alert--success {
    color: var(--sp-success);
    border: 1px solid #abefc6;
    background: var(--sp-success-bg);
}

.sp-alert--error {
    color: var(--sp-danger);
    border: 1px solid #fecdca;
    background: var(--sp-danger-bg);
}

.sp-card__footer {
    margin: 26px 0 0;
    color: var(--sp-slate-500);
    font-size: 11px;
    line-height: 1.55;
    text-align: center;
}

@media (max-width: 980px) {
    .sp-auth__shell {
        grid-template-columns: 1fr;
    }

    .sp-auth__brand {
        display: none;
    }

    .sp-auth__content {
        min-height: 100vh;
        padding: 34px 22px;
    }

    .sp-auth__mobile-brand {
        display: flex;
        width: min(100%, 460px);
        align-items: center;
        gap: 12px;
        margin-bottom: 24px;
    }

    .sp-auth__mobile-brand .sp-brand__mark {
        color: var(--sp-blue-600);
        border-color: var(--sp-slate-200);
        background: var(--sp-white);
    }

    .sp-auth__mobile-brand strong,
    .sp-auth__mobile-brand span {
        display: block;
    }

    .sp-auth__mobile-brand strong {
        color: var(--sp-navy-900);
        font-size: 18px;
        line-height: 1.2;
    }

    .sp-auth__mobile-brand span {
        margin-top: 4px;
        color: var(--sp-slate-500);
        font-size: 11px;
    }

    .sp-brand__mark--small {
        width: 44px;
        height: 44px;
        border-radius: 13px;
    }

    .sp-brand__mark--small svg {
        width: 27px;
        height: 27px;
    }
}

@media (max-width: 560px) {
    .sp-auth__content {
        justify-content: flex-start;
        padding: 26px 16px;
    }

    .sp-auth__card {
        padding: 30px 22px;
        border-radius: 15px;
        box-shadow: 0 16px 45px rgba(15, 39, 68, 0.11);
    }

    .sp-card__title {
        font-size: 27px;
    }

    .sp-field__header {
        align-items: flex-start;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

.sp-tenant-list {
    display: grid;
    gap: 12px;
}

.sp-tenant-list form {
    margin: 0;
}

.sp-tenant {
    display: flex;
    width: 100%;
    align-items: center;
    gap: 14px;
    padding: 14px;
    cursor: pointer;
    color: var(--sp-slate-900);
    border: 1px solid var(--sp-slate-200);
    border-radius: 12px;
    background: var(--sp-white);
    text-align: left;
    transition:
        border-color 140ms ease,
        box-shadow 140ms ease,
        transform 140ms ease;
}

.sp-tenant:hover {
    border-color: #a9c8e4;
    box-shadow: 0 8px 20px rgba(15, 39, 68, 0.08);
    transform: translateY(-1px);
}

.sp-tenant:focus-visible {
    outline: 3px solid rgba(47, 127, 195, 0.20);
    outline-offset: 2px;
}

.sp-tenant__icon {
    display: grid;
    width: 42px;
    height: 42px;
    flex: 0 0 auto;
    place-items: center;
    color: var(--sp-blue-600);
    border-radius: 10px;
    background: #edf6fc;
    font-size: 15px;
    font-weight: 750;
}

.sp-tenant__body {
    display: grid;
    min-width: 0;
    flex: 1;
    gap: 4px;
}

.sp-tenant__body strong {
    overflow: hidden;
    font-size: 13px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.sp-tenant__body small {
    color: var(--sp-slate-600);
    font-size: 11px;
}

.sp-tenant__arrow {
    flex: 0 0 auto;
    color: var(--sp-slate-400);
    font-size: 20px;
}

.sp-secondary-action {
    margin-top: 26px;
    text-align: center;
}

.sp-link-button {
    padding: 4px;
    cursor: pointer;
    color: var(--sp-blue-600);
    border: 0;
    background: transparent;
    font-size: 12px;
    font-weight: 650;
}

.sp-link-button:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.sp-link-button:focus-visible {
    outline: 3px solid rgba(47, 127, 195, 0.20);
    outline-offset: 3px;
}

.sp-state-icon {
    display: grid;
    width: 48px;
    height: 48px;
    margin-bottom: 22px;
    place-items: center;
    color: #b54708;
    border: 1px solid #fedf89;
    border-radius: 13px;
    background: #fffaeb;
    font-size: 22px;
    font-weight: 750;
}

.sp-info-box {
    display: grid;
    gap: 5px;
    margin: -5px 0 25px;
    padding: 14px;
    color: var(--sp-slate-600);
    border: 1px solid var(--sp-slate-200);
    border-radius: 10px;
    background: var(--sp-slate-50);
    font-size: 12px;
    line-height: 1.55;
}

.sp-info-box strong {
    color: var(--sp-slate-700);
    font-size: 12px;
}

.sp-info-box span {
    display: block;
}

/* Emblema oficial do Soul Process */
.sp-brand__emblem {
    display: block;
    width: 64px;
    height: 64px;
    flex: 0 0 auto;
    border-radius: 50%;
    box-shadow:
        0 0 0 3px rgba(255, 255, 255, 0.14),
        0 10px 24px rgba(3, 14, 28, 0.35);
}

.sp-brand__emblem--small {
    width: 44px;
    height: 44px;
    box-shadow: 0 0 0 2px var(--sp-slate-200);
}

a.sp-button {
    text-decoration: none;
}

/* ---- Login do Gerenciamento ---- */

.sp-auth--gestao .sp-auth__eyebrow {
    color: #f07a1c;
}

.sp-auth--gestao .sp-card__eyebrow {
    color: #c95f0c;
}

.sp-auth--gestao .sp-auth__brand {
    box-shadow: inset 0 4px 0 #f07a1c;
}

.sp-auth--gestao .sp-button {
    background: #0b2a4a;
}

.sp-auth--gestao .sp-button:hover {
    background: #144a80;
}

/* ---- Instalar como aplicativo ---- */

.sp-app-install {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #d9e3ee;
    border-left: 4px solid #f07a1c;
    border-radius: 12px;
    background: #f4f7fb;
}

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

.sp-app-install img {
    flex: 0 0 auto;
    border-radius: 10px;
}

.sp-app-install div {
    display: grid;
    flex: 1;
    gap: 2px;
    min-width: 0;
}

.sp-app-install strong {
    color: #0b2a4a;
    font-size: 13px;
}

.sp-app-install span {
    color: #4e6178;
    font-size: 12px;
    line-height: 1.45;
}

.sp-app-install__botao {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 0 16px;
    border: 0;
    border-radius: 9px;
    color: #ffffff;
    background: #0b2a4a;
    font-weight: 700;
    cursor: pointer;
}

.sp-app-install__botao:hover {
    background: #144a80;
}

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

.sp-versao {
    margin-left: 6px;
    padding-left: 8px;
    border-left: 1px solid currentColor;
    opacity: 0.8;
}
