/* SitePilot CPMS login — full-bleed construction hero + floating form card */
.sp-login {
    --sp-teal: #0088a8;
    --sp-teal-bright: #00a8cc;
    --sp-teal-deep: #0a2540;
    --sp-ink: #0a2540;
    --sp-muted: #5a6c7d;
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #061a31;
    color: #fff;
}

.sp-login__stage {
    position: absolute;
    inset: 0;
    z-index: 0;
}

.sp-login__stage-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    display: block;
}

.sp-login__stage-shade {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(100deg, rgba(6, 26, 49, 0.92) 0%, rgba(10, 37, 64, 0.78) 38%, rgba(18, 58, 92, 0.55) 62%, rgba(6, 26, 49, 0.72) 100%),
        linear-gradient(180deg, rgba(6, 26, 49, 0.25) 0%, transparent 35%, rgba(6, 26, 49, 0.65) 100%);
}

.sp-login__shell {
    position: relative;
    z-index: 1;
    flex: 1;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
    padding: 1.35rem 1.15rem 0.75rem;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
}

.sp-login__hero {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    min-width: 0;
}

.sp-login__brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
}

.sp-login__mark {
    width: 2.85rem;
    height: 2.85rem;
    flex-shrink: 0;
    display: grid;
    place-items: center;
    clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
    background: linear-gradient(145deg, #00a8cc, #0088a8);
    font-family: "Oxygen", "Inter", sans-serif;
    font-weight: 800;
    font-size: 1.2rem;
    color: #fff;
    letter-spacing: -0.04em;
}

.sp-login__product {
    margin: 0;
    font-family: "Oxygen", "Inter", sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.1;
}

.sp-login__product em {
    font-style: normal;
    color: var(--sp-teal-bright);
}

.sp-login__product-sub {
    margin: 0.2rem 0 0;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    opacity: 0.82;
}

.sp-login__hero-copy {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.sp-login__tagline {
    margin: 0;
    font-family: "Oxygen", "Inter", sans-serif;
    font-size: clamp(1.85rem, 3.4vw, 2.75rem);
    font-weight: 800;
    letter-spacing: -0.035em;
    line-height: 1.12;
    max-width: 15ch;
}

.sp-login__tagline span {
    color: var(--sp-teal-bright);
}

.sp-login__lead {
    margin: 0;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.95rem;
    line-height: 1.55;
    max-width: 36rem;
    opacity: 0.92;
}

.sp-login__features {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    display: grid;
    gap: 0.8rem;
    max-width: 34rem;
}

.sp-login__features li {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.8rem;
    align-items: flex-start;
}

.sp-login__feature-icon {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(45, 212, 191, 0.16);
    color: #4dd0e1;
    font-size: 0.95rem;
}

.sp-login__features strong {
    display: block;
    font-family: "Oxygen", "Inter", sans-serif;
    font-size: 0.92rem;
    font-weight: 800;
    margin-bottom: 0.12rem;
}

.sp-login__features li span:last-child {
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.8rem;
    line-height: 1.4;
    opacity: 0.82;
}

.sp-login__stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
    margin-top: auto;
    padding: 0.85rem 0.7rem;
    border-radius: 0.85rem;
    background: rgba(4, 16, 20, 0.55);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
}

.sp-login__stats > div {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.15rem;
}

.sp-login__stats i {
    color: var(--sp-teal-bright);
    font-size: 0.95rem;
}

.sp-login__stats strong {
    font-family: "Oxygen", "Inter", sans-serif;
    font-size: 1.05rem;
    font-weight: 800;
}

.sp-login__stats span {
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.62rem;
    opacity: 0.78;
    line-height: 1.25;
}

.sp-login__form-side {
    display: flex;
    align-items: center;
    justify-content: center;
}

.sp-login__form-wrap {
    width: 100%;
    max-width: 420px;
    animation: sp-login-rise 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.sp-login__footer {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.65rem 1.25rem;
    padding: 0.85rem 1.25rem 1rem;
    max-width: 1280px;
    width: 100%;
    margin: 0 auto;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(4, 14, 18, 0.35);
    backdrop-filter: blur(6px);
}

.sp-login__trust {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem 1.1rem;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.74rem;
    opacity: 0.9;
}

.sp-login__trust li {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.sp-login__trust i {
    color: var(--sp-teal-bright);
}

.sp-login__legal {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1rem;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.7);
}

.sp-login__legal nav {
    display: flex;
    gap: 0.85rem;
}

.sp-login__legal a {
    color: rgba(255, 255, 255, 0.78);
    text-decoration: none;
}

.sp-login__legal a:hover {
    color: #fff;
    text-decoration: underline;
}

/* Form card */
.sp-card {
    width: 100%;
    background: #fff;
    border-radius: 1.15rem;
    padding: 1.75rem 1.55rem 1.4rem;
    border: 1px solid rgba(15, 23, 42, 0.06);
    box-shadow: 0 22px 48px -18px rgba(0, 0, 0, 0.45);
    color: var(--sp-ink);
}

.sp-card__icon {
    width: 3rem;
    height: 3rem;
    margin: 0 auto 0.95rem;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: rgba(13, 148, 136, 0.1);
    color: var(--sp-teal);
    font-size: 1.3rem;
}

.sp-card__header {
    text-align: center;
    margin-bottom: 1.25rem;
}

.sp-card__title {
    margin: 0 0 0.4rem;
    font-family: "Oxygen", "Inter", sans-serif;
    font-size: 1.3rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--sp-ink);
}

.sp-card__title span {
    color: var(--sp-teal);
}

.sp-card__subtitle {
    margin: 0;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.86rem;
    line-height: 1.5;
    color: var(--sp-muted);
}

.sp-card__form {
    display: flex;
    flex-direction: column;
    gap: 0.95rem;
}

.sp-field {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.sp-field__label {
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.8rem;
    font-weight: 600;
    color: #334155;
}

.sp-field__control {
    position: relative;
    display: flex;
    align-items: center;
}

.sp-field__leading,
.sp-field__trailing {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    z-index: 1;
}

.sp-field__leading {
    left: 0.9rem;
    font-size: 1rem;
    pointer-events: none;
}

.sp-field__trailing {
    right: 0.35rem;
    width: 2.25rem;
    height: 2.25rem;
    border: 0;
    background: transparent;
    border-radius: 0.4rem;
    display: grid;
    place-items: center;
    cursor: pointer;
}

.sp-field__trailing:hover {
    color: var(--sp-teal-deep);
    background: rgba(13, 148, 136, 0.08);
}

.sp-field__input {
    width: 100%;
    border: 1px solid #d7e0e8;
    border-radius: 0.65rem;
    padding: 0.78rem 2.6rem 0.78rem 2.55rem;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.95rem;
    color: var(--sp-ink);
    background: #f8fafc;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.sp-field__input:focus {
    outline: none;
    background: #fff;
    border-color: var(--sp-teal);
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.16);
}

.sp-field__error,
.sp-card__errors {
    margin: 0;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.8rem;
    color: #b91c1c;
}

.sp-card__errors ul {
    margin: 0;
    padding-left: 1.1rem;
}

.sp-card__row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.sp-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.84rem;
    color: #475569;
    cursor: pointer;
}

.sp-remember__input {
    width: 1rem;
    height: 1rem;
    accent-color: var(--sp-teal);
}

.sp-forgot {
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.84rem;
    font-weight: 600;
    color: var(--sp-teal);
    text-decoration: none;
}

.sp-forgot:hover {
    text-decoration: underline;
}

.sp-alert {
    padding: 0.7rem 0.85rem;
    border-radius: 0.55rem;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.85rem;
    line-height: 1.45;
}

.sp-alert--ok {
    background: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.sp-alert--err {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.sp-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    width: 100%;
    padding: 0.88rem 1.2rem;
    border: 0;
    border-radius: 0.65rem;
    background: linear-gradient(135deg, #0a2540 0%, #00a8cc 100%);
    color: #fff;
    font-family: "Oxygen", "Inter", sans-serif;
    font-size: 1rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, filter 0.2s ease, opacity 0.2s ease;
}

.sp-submit:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.sp-submit:disabled {
    opacity: 0.72;
    cursor: not-allowed;
    transform: none;
}

.sp-or {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #94a3b8;
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.78rem;
}

.sp-or::before,
.sp-or::after {
    content: "";
    flex: 1;
    height: 1px;
    background: #e2e8f0;
}

.sp-help {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1rem;
    border-radius: 0.65rem;
    border: 1.5px solid rgba(13, 148, 136, 0.45);
    background: #fff;
    color: var(--sp-teal-deep);
    font-family: "Inter", "Oxygen", sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    text-decoration: none;
}

.sp-help:hover {
    background: rgba(13, 148, 136, 0.06);
    border-color: var(--sp-teal);
}

@keyframes sp-login-rise {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 992px) {
    .sp-login__shell {
        grid-template-columns: minmax(0, 1.25fr) minmax(380px, 0.85fr);
        align-items: stretch;
        gap: 2rem;
        padding: 1.75rem 1.75rem 1rem;
        min-height: calc(100dvh - 4.25rem);
    }

    .sp-login__hero {
        justify-content: space-between;
        padding: 0.35rem 0 0.5rem;
    }

    .sp-login__stats {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        padding: 0.95rem 0.85rem;
    }

    .sp-login__form-side {
        align-items: center;
        justify-content: flex-end;
    }
}

/* Company picker on same layout */
.sp-login:has(.company-choose) .sp-login__hero,
.sp-login:has(.company-choose) .sp-login__footer {
    display: none;
}

.sp-login:has(.company-choose) .sp-login__shell {
    grid-template-columns: 1fr;
    max-width: 1040px;
    min-height: 100dvh;
    padding: 2rem 1.25rem;
}

.sp-login:has(.company-choose) .sp-login__form-wrap {
    max-width: none;
}

.sp-login:has(.company-choose) .sp-login__form-side {
    justify-content: center;
}

@media (prefers-reduced-motion: reduce) {
    .sp-login__form-wrap {
        animation: none;
    }
}
