html,
body {
    height: 100%;
    font-family: 'DM Sans', sans-serif;
    -webkit-font-smoothing: antialiased;
}

/* ── Página / composição geral ── */
.sp__lg__page {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
    background-color: #0F2038;
}

/* Foto de fundo full-bleed. Troque o url() no HTML pela imagem final */
.sp__lg__bg {
    position: absolute;
    inset: 0;
    background-color: #16314F;
    background-image:
        radial-gradient(circle at 20% 30%, rgba(13, 124, 219, .35) 0%, transparent 55%),
        radial-gradient(circle at 80% 70%, rgba(26, 58, 92, .55) 0%, transparent 55%);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 0;
}

/* Véu escuro para garantir legibilidade do texto branco sobre a foto */
.sp__lg__scrim {
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg,
            rgba(8, 20, 36, .72) 0%,
            rgba(8, 20, 36, .55) 35%,
            rgba(8, 20, 36, .30) 60%,
            rgba(8, 20, 36, .12) 100%);
    z-index: 1;
}

.sp__lg__layout {
    position: relative;
    z-index: 2;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    padding: 40px clamp(24px, 5vw, 80px);
}

/* ── Lado esquerdo: discurso do produto ── */
.sp__lg__hero {
    flex: 1;
    max-width: 560px;
    color: #fff;
}

.sp__lg__hero-eyebrow {
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #9FC7EE;
    margin-bottom: 14px;
}

.sp__lg__hero-title {
    font-family: 'Playfair Display', serif;
    font-size: 2em;
    font-weight: 700;
    line-height: 1.22;
    letter-spacing: -.4px;
    margin: 0 0 26px;
    color: white;
    text-shadow: 0 2px 18px rgba(0, 0, 0, .25);
}

.sp__lg__hero-list {
    list-style: none;
    margin: 0 0 32px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.sp__lg__hero-list li {
    font-size: 15px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, .95);
}

.sp__lg__hero-list li i {
    color: #34D399;
    font-size: 16px;
}

.sp__lg__hero-badge {
    display: inline-block;
    border: 1px solid rgba(255, 255, 255, .35);
    background: rgba(255, 255, 255, .08);
    backdrop-filter: blur(6px);
    border-radius: 4px;
    padding: 14px 18px;
    max-width: 360px;
}

.sp__lg__hero-badge-title {
    font-size: 13.5px;
    font-weight: 700;
    color: #fff;
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.sp__lg__hero-badge-title i {
    color: #9FC7EE;
}

.sp__lg__hero-badge-text {
    font-size: 12.5px;
    color: rgba(255, 255, 255, .82);
    line-height: 1.5;
}

/* ── Coluna do login (flutuante, à direita) ── */
.sp__lg__login-col {
    flex: 0 0 auto;
    width: 100%;
    max-width: 420px;
}

.sp__lg__install-box {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 16px;
    padding: 22px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    margin-bottom: 20px;
}

.sp__lg__install-btn {
    background: #fff;
    color: #667eea;
    border: none;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: all 0.3s;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.sp__lg__install-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.sp__lg__install-btn:active {
    transform: translateY(0);
}

/* ── Card principal — flutuante, cantos arredondados ── */
.sp__lg__card {
    width: 100%;
    background: #ffffff;
    border-radius: 20px;
    box-shadow:
        0 1px 2px rgba(0, 0, 0, .04),
        0 30px 60px rgba(5, 15, 30, .35);
    overflow: hidden;
    animation: sp__lg__rise 500ms cubic-bezier(.22, .68, 0, 1.2) both;
}

.sp__lg__card-top-bar {
    height: 4px;
    background: linear-gradient(90deg, #1A3A5C 0%, #0D7CDB 60%, #1A3A5C 100%);
}

.sp__lg__card-body {
    padding: 38px 38px 32px;
}

/* ── Brand ── */
.sp__lg__brand {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 10px;
}

.sp__lg__brand-tagline {
    font-size: 10px;
    font-weight: 500;
    color: #8A97A8;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    margin-top: 3px;
}

/* ── Cabeçalho do form ── */
.sp__lg__form-header {
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #EDF0F5;
}

.sp__lg__form-subtitle {
    font-size: 13.5px;
    color: #8A97A8;
    margin-top: 6px;
    line-height: 1.55;
    font-weight: 400;
}

/* ── Formulário ── */
.sp__lg__form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.sp__lg__field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.sp__lg__label {
    font-size: 11px;
    font-weight: 600;
    color: #5A6A7E;
    text-transform: uppercase;
    letter-spacing: .9px;
}

.sp__lg__input-wrap {
    position: relative;
}

.sp__lg__input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #B0BAC8;
    font-size: 13px;
    pointer-events: none;
    transition: color 200ms ease;
}

.sp__lg__input {
    width: 100%;
    height: 46px;
    border: 1.5px solid #DDE3EC;
    border-radius: 10px;
    background: #F8FAFC;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    color: #1C2B40;
    padding: 0 44px 0 42px;
    outline: none;
    transition: border-color 200ms ease, box-shadow 200ms ease, background 200ms ease;
}

.sp__lg__input::placeholder {
    color: #B0BAC8;
    font-style: italic;
    font-size: 13px;
}

.sp__lg__input:hover:not(:focus) {
    border-color: #B0BAC8;
}

.sp__lg__input:focus {
    border-color: #0D7CDB;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 124, 219, .12);
}

.sp__lg__input-wrap:focus-within .sp__lg__input-icon {
    color: #0D7CDB;
}

.sp__lg__input-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: #B0BAC8;
    font-size: 13px;
    cursor: pointer;
    transition: color 180ms ease;
    padding: 4px;
}

.sp__lg__input-toggle:hover {
    color: #5A6A7E;
}

.sp__lg__field--error .sp__lg__input {
    border-color: #C0392B;
    background: #FDF5F5;
}

.sp__lg__field--error .sp__lg__input:focus {
    box-shadow: 0 0 0 3px rgba(192, 57, 43, .10);
}

.sp__lg__field--error .sp__lg__input-icon {
    color: #C0392B;
}

.sp__lg__field-error-msg {
    display: none;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: #C0392B;
    font-weight: 500;
}

.sp__lg__field--error .sp__lg__field-error-msg {
    display: flex;
}

.sp__lg__options-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: -4px;
}

.sp__lg__checkbox-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.sp__lg__checkbox-wrap input[type="checkbox"] {
    appearance: none;
    width: 16px;
    height: 16px;
    border: 1.5px solid #DDE3EC;
    border-radius: 4px;
    background: #F8FAFC;
    cursor: pointer;
    position: relative;
    flex-shrink: 0;
    transition: border-color 180ms ease, background 180ms ease;
}

.sp__lg__checkbox-wrap input[type="checkbox"]:checked {
    background: #1A3A5C;
    border-color: #1A3A5C;
}

.sp__lg__checkbox-wrap input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 4.5px;
    width: 4px;
    height: 8px;
    border: 2px solid #fff;
    border-top: none;
    border-left: none;
    transform: rotate(45deg);
}

.sp__lg__checkbox-label {
    font-size: 13px;
    color: #5A6A7E;
    user-select: none;
}

.sp__lg__link {
    font-size: 13px;
    color: #0D7CDB;
    font-weight: 500;
    cursor: pointer;
    transition: color 180ms ease;
    text-decoration: none;
}

.sp__lg__link:hover {
    color: #0A6BBF;
    text-decoration: underline;
}

/* Alerta global */
.sp__lg__alert {
    display: none;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    background: #FDF0EF;
    border: 1px solid rgba(192, 57, 43, .2);
    border-left: 3px solid #C0392B;
    border-radius: 8px;
    font-size: 13px;
    color: #C0392B;
    line-height: 1.5;
    animation: sp__lg__fadeIn 220ms ease;
}

.sp__lg__alert--active {
    display: flex;
}

.sp__lg__alert i {
    font-size: 14px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Botão principal */
.sp__lg__btn-primary {
    height: 48px;
    background: #1A3A5C;
    color: #fff;
    border: none;
    border-radius: 10px;
    font-family: 'DM Sans', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: .2px;
    transition: background 200ms ease, box-shadow 200ms ease, transform 80ms ease;
    position: relative;
    overflow: hidden;
    margin-top: 4px;
}

.sp__lg__btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, .06) 0%, transparent 60%);
}

.sp__lg__btn-primary:hover {
    background: #14304f;
    box-shadow: 0 6px 20px rgba(26, 58, 92, .30);
}

.sp__lg__btn-primary:active {
    transform: translateY(1px);
}

.sp__lg__btn-primary--loading {
    pointer-events: none;
    background: #2a5480;
}

.sp__lg__btn-spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .25);
    border-top-color: #fff;
    border-radius: 50%;
    animation: sp__lg__spin 650ms linear infinite;
}

.sp__lg__btn-primary--loading .sp__lg__btn-spinner {
    display: block;
}

.sp__lg__btn-primary--loading .sp__lg__btn-label {
    opacity: .75;
}

.sp__lg__btn-primary--loading .sp__lg__btn-arrow {
    display: none;
}

/* ── Rodapé do card ── */
.sp__lg__card-footer {
    padding: 18px 24px 20px;
    background: #F8FAFC;
    border-top: 1px solid #EDF0F5;
    text-align: center;
}

.sp__lg__footer-note {
    font-size: 12px;
    color: #8A97A8;
    line-height: 1.6;
}

.sp__lg__footer-note a {
    color: #0D7CDB;
    font-weight: 500;
    text-decoration: none;
}

.sp__lg__footer-note a:hover {
    text-decoration: underline;
}

/* ── Animações ── */
@keyframes sp__lg__spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes sp__lg__rise {
    from {
        opacity: 0;
        transform: translateY(18px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes sp__lg__fadeIn {
    from {
        opacity: 0;
        transform: translateY(-3px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ── Popup de seleção de empresa ── */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
}

.popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    padding: 30px 25px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    z-index: 999;
    border-radius: 16px;
    text-align: center;
}

.popup-content h3 {
    margin-bottom: 20px;
    font-size: 20px;
    font-weight: 700;
}

.companies-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.companies-list .company-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    padding: 15px 18px;
    border: 1px solid #ddd;
    background: #f9f9f9;
    cursor: pointer;
    transition: all 0.2s;
    border-radius: 10px;
}

.companies-list .company-card:hover {
    background: #4CAF50;
    color: #fff;
    border-color: #4CAF50;
}

.company-card .company-name {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 4px;
}

.company-card .company-code {
    font-size: 14px;
    color: #555;
    margin-bottom: 2px;
}

.company-card .company-status {
    font-size: 13px;
    color: #888;
    text-transform: uppercase;
    font-weight: 500;
}

/* ── Responsivo ── */
@media (max-width: 980px) {
    .sp__lg__hero {
        display: none;
    }

    .sp__lg__layout {
        justify-content: center;
    }

    .sp__lg__login-col {
        max-width: 420px;
    }
}

@media (max-width: 480px) {
    .sp__lg__layout {
        padding: 24px 16px;
    }

    .sp__lg__card-body {
        padding: 30px 24px 26px;
    }
}