.contratacao-page {
    background: var(--gradient-hero);
    min-height: 100vh;
}

.contratacao-hero {
    padding: 56px 0 24px;
}

.contratacao-hero h1 {
    font-size: clamp(28px, 4vw, 3rem);
    font-weight: 900;
    line-height: 1.08;
    letter-spacing: -0.5px;
}

.contratacao-hero p {
    margin-top: 14px;
    color: var(--muted);
    font-weight: 700;
    font-size: 16px;
    line-height: 1.7;
    max-width: 78ch;
}

.contratacao-layout {
    display: grid;
    grid-template-columns: 1.15fr 0.85fr;
    gap: 20px;
    align-items: start;
}

.contratacao-card {
    background: var(--card);
    border: 1px solid var(--borda);
    border-radius: 18px;
    box-shadow: var(--shadow-card);
    padding: 24px;
}

.contratacao-card + .contratacao-card {
    margin-top: 18px;
}

.contratacao-card h2 {
    font-size: 22px;
    font-weight: 900;
    margin-bottom: 10px;
    letter-spacing: -0.3px;
}

.contratacao-card p {
    color: var(--muted);
    font-size: 15px;
    line-height: 1.7;
    font-weight: 600;
}

.section-label {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    padding: 8px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    background: var(--accent-bg);
    color: var(--accent-fg);
    border: 1px solid rgba(0, 114, 174, 0.15);
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-top: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group.full {
    grid-column: 1 / -1;
}

.form-group label {
    font-size: 13px;
    font-weight: 800;
    color: var(--texto);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    border: 1px solid rgba(2, 6, 23, 0.12);
    border-radius: 14px;
    background: #fff;
    color: var(--texto);
    padding: 13px 14px;
    font-size: 14px;
    font-weight: 700;
    outline: none;
    transition:
        border-color 0.2s,
        box-shadow 0.2s;
}

.form-group textarea {
    resize: vertical;
    min-height: 110px;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: rgba(0, 114, 174, 0.55);
    box-shadow: 0 0 0 4px rgba(0, 114, 174, 0.1);
}

.form-help {
    font-size: 12px;
    line-height: 1.5;
    font-weight: 700;
    color: var(--muted);
}

/* ERRO */
.form-help.erro {
    color: #b91c1c;
}

/* SUCESSO */
.form-help.ok {
    color: #15803d;
}

.trial-alert {
    margin-top: 16px;
    border-left: 4px solid var(--azul-claro);
    background: rgba(0, 114, 174, 0.06);
    border-radius: 14px;
    padding: 14px 16px;
}

.trial-alert p {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    line-height: 1.6;
}

.plano-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-top: 18px;
}

.plano-option {
    position: relative;
}

.plano-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.plano-box {
    display: block;
    height: 100%;
    border: 1px solid rgba(2, 6, 23, 0.08);
    border-radius: 18px;
    background: #fff;
    padding: 18px;
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        border-color 0.2s;
}

.plano-box:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-hover);
}

.plano-option input[type="radio"]:checked + .plano-box {
    border-color: rgba(0, 114, 174, 0.55);
    box-shadow:
        0 0 0 4px rgba(0, 114, 174, 0.1),
        var(--shadow-hover);
}

.plano-box.is-destaque {
    background: var(--gradient-primary);
    color: #fff;
    border-color: transparent;
}

.plano-box.is-destaque .plano-small,
.plano-box.is-destaque .plano-desc,
.plano-box.is-destaque .plano-list li {
    color: rgba(255, 255, 255, 0.92);
}

.plano-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.plano-title {
    font-size: 18px;
    font-weight: 900;
}

.plano-badge {
    padding: 6px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 900;
    background: rgba(0, 114, 174, 0.1);
    color: var(--azul-claro);
    border: 1px solid rgba(0, 114, 174, 0.16);

    white-space: nowrap;
    flex-shrink: 0; /* 🔥 impede de empurrar para fora */
}

.plano-box.is-destaque .plano-badge {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
    border-color: rgba(255, 255, 255, 0.18);
}

.plano-price {
    margin-top: 12px;
    display: flex;
    align-items: flex-end;
    gap: 6px;
}

.plano-price b {
    font-size: 30px;
    line-height: 1;
    font-weight: 900;
}

.plano-small {
    font-size: 13px;
    font-weight: 800;
    color: var(--muted);
    margin-bottom: 3px;
}

.plano-desc {
    margin-top: 10px;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.6;
}

.plano-list {
    list-style: none;
    margin-top: 14px;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.plano-list li {
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.5;
}

.url-group {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
}

.url-input-wrap {
    display: flex;
    align-items: stretch;
    border: 1px solid rgba(2, 6, 23, 0.12);
    border-radius: 14px;
    overflow: hidden;
    background: #fff;
}

.url-input-wrap input {
    border: 0;
    border-radius: 0;
    box-shadow: none !important;
}

.url-suffix {
    display: flex;
    align-items: center;
    padding: 0 14px;
    background: rgba(0, 114, 174, 0.06);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    border-left: 1px solid rgba(2, 6, 23, 0.08);
    white-space: nowrap;
}

.url-status {
    margin-top: 8px;
    font-size: 12px;
    font-weight: 800;
    min-height: 18px;
    padding: 6px 10px;
    border-radius: 8px;
    display: inline-block;
}

/* SUCESSO */
.url-status.ok {
    background: rgba(22, 163, 74, 0.08);
    color: #15803d;
}

/* ERRO */
.url-status.erro {
    background: rgba(220, 38, 38, 0.08);
    color: #b91c1c;
}

/* NEUTRO */
.url-status.neutro {
    color: var(--muted);
}

.modulos-box {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
    margin-top: 18px;
}

.modulo-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border: 1px solid rgba(2, 6, 23, 0.08);
    border-radius: 16px;
    padding: 14px;
    background: #fff;
}

.modulo-item input {
    margin-top: 2px;
    width: 18px;
    height: 18px;
    accent-color: var(--azul-claro);
}

.modulo-item strong {
    display: block;
    font-size: 14px;
    font-weight: 900;
    color: var(--texto);
}

.modulo-item span {
    display: block;
    margin-top: 4px;
    font-size: 13px;
    font-weight: 700;
    color: var(--muted);
    line-height: 1.55;
}

.resumo-card {
    position: sticky;
    top: 90px;
}

.resumo-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 18px;
}

.resumo-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    font-size: 14px;
    font-weight: 800;
    color: var(--texto);
}

.resumo-row span:last-child {
    text-align: right;
}

.resumo-row.muted {
    color: var(--muted);
}

.resumo-divider {
    height: 1px;
    background: var(--borda);
    margin: 10px 0;
}

.resumo-total {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-top: 10px;
}

.resumo-total strong {
    font-size: 16px;
    font-weight: 900;
    color: var(--texto);
}

.resumo-total b {
    font-size: 28px;
    line-height: 1;
    font-weight: 900;
    color: var(--azul-escuro);
}

.resumo-note {
    margin-top: 14px;
    font-size: 12px;
    line-height: 1.6;
    font-weight: 700;
    color: var(--muted);
}

.checkbox-line {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 18px;
}

.checkbox-line input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--azul-claro);
    flex-shrink: 0;
}

.checkbox-line label {
    font-size: 13px;
    line-height: 1.6;
    font-weight: 700;
    color: var(--muted);
}

.contratacao-actions {
    margin-top: 20px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.site-footer a {
    color: var(--azul-claro);
    text-decoration: none;
    font-weight: 800;
}

.site-footer a:hover {
    text-decoration: underline;
}

@media (max-width: 980px) {
    .contratacao-layout {
        grid-template-columns: 1fr;
    }

    .resumo-card {
        position: static;
    }

    .plano-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .form-grid,
    .url-group {
        grid-template-columns: 1fr;
    }

    .url-suffix {
        font-size: 12px;
    }
}

/* ========================= */
/* ERRO DE VALIDAÇÃO */
/* ========================= */

.input-error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1) !important;
}

.input-error:focus {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.15) !important;
}

/* ========================= */
/* ALERTA DE ERRO */
/* ========================= */

.alert-erro {
    border: 1px solid #fca5a5;
    background: #fee2e2;
    border-radius: 14px;
    padding: 16px;
}

.alert-erro h2 {
    color: #991b1b;
    margin-bottom: 8px;
}

.alert-erro ul {
    margin-top: 10px;
    padding-left: 18px;
    color: #7f1d1d;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.7;
}

.modulo-item {
    transition:
        transform 0.2s,
        box-shadow 0.2s,
        border-color 0.2s;
}

.modulo-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(0, 114, 174, 0.25);
}

.modulo-item {
    cursor: pointer;
}

.checkbox-line {
    cursor: pointer;
}

#btnVerificarUrl {
    white-space: nowrap;
}

#btnVerificarUrl:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.password-strength-wrap {
    margin-top: 8px;
}

.password-strength-bar {
    width: 100%;
    height: 8px;
    border-radius: 999px;
    background: #e5e7eb;
    overflow: hidden;
}

.password-strength-fill {
    height: 100%;
    width: 0%;
    border-radius: 999px;
    transition:
        width 0.25s ease,
        background-color 0.25s ease;
}

.password-strength-text {
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    color: #64748b;
}

/* ESTADO BASE */
.input-password {
    transition: all 0.2s ease;
}

/* FRACA (inválida) */
.input-password.fraca {
    border-color: #dc2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15) !important;
}

/* MÉDIA */
.input-password.media {
    border-color: #f59e0b !important;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.15) !important;
}

/* FORTE */
.input-password.forte {
    border-color: #16a34a !important;
    box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15) !important;
}

.password-checklist {
    margin-top: 10px;
    padding-left: 0;
    list-style: none;
    font-size: 12px;
    font-weight: 600;
}

.password-checklist li {
    margin-bottom: 4px;
    color: #94a3b8;
    transition: all 0.2s ease;
}

.password-checklist li.ok {
    color: #16a34a;
}

.password-checklist li.ok::before {
    content: "✔ ";
}

.password-checklist li:not(.ok)::before {
    content: "• ";
}

.campo-wrap {
    position: relative;
}

.campo-wrap input {
    padding-right: 50px;
}

.btn-toggle-senha {
    position: absolute;
    top: 50%;
    right: 10px;
    transform: translateY(-50%);
    border: none;
    background: transparent;
    color: var(--azul-claro);
    cursor: pointer;
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-toggle-senha:hover {
    background: rgba(0, 114, 174, 0.08);
}

.btn-toggle-senha i {
    font-size: 18px;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.btn-primary:disabled {
    background: linear-gradient(135deg, #94a3b8, #cbd5e1);
}

/* ========================= */
/* PLANOS - SELEÇÃO / RESPONSIVO */
/* ========================= */

.plano-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
}

.plano-option {
    min-width: 0;
}

.plano-box {
    position: relative;
    overflow: hidden;
}

/* Selecionado fica maior */
.plano-option:has(input[type="radio"]:checked) {
    grid-column: span 1;
}

.plano-option:has(input[type="radio"]:checked) .plano-box {
    min-height: 320px;
}

/* Não selecionado fica compacto */
.plano-option:not(:has(input[type="radio"]:checked)) .plano-box {
    min-height: 320px;
    opacity: 0.96;
}

/* NÃO selecionado = modo compacto */
.plano-option:not(:has(input[type="radio"]:checked)) .plano-box {
    padding: 16px;
}

/* Descrição reduzida */
.plano-option:not(:has(input[type="radio"]:checked)) .plano-desc {
    display: -webkit-box;
    -webkit-line-clamp: 1; /* 🔥 só 1 linha */
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Lista reduzida */
.plano-option:not(:has(input[type="radio"]:checked)) .plano-list {
    margin-top: 10px;
}

/* Só mostra os 2 primeiros itens */
.plano-option:not(:has(input[type="radio"]:checked))
    .plano-list
    li:nth-child(n + 3) {
    display: none;
}

/* Ajusta badge para não vazar */
.plano-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.plano-badge {
    flex-shrink: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Plano destacado não selecionado fica limpo */
.plano-option:not(:has(input[type="radio"]:checked)) .plano-badge {
    display: none;
}

/* Mobile: um plano embaixo do outro */
@media (max-width: 980px) {
    .plano-grid {
        grid-template-columns: 1fr;
    }

    .plano-option:has(input[type="radio"]:checked),
    .plano-option:not(:has(input[type="radio"]:checked)) {
        grid-column: span 1;
    }

    .plano-option:has(input[type="radio"]:checked) .plano-box,
    .plano-option:not(:has(input[type="radio"]:checked)) .plano-box {
        min-height: auto;
    }

    .plano-option:not(:has(input[type="radio"]:checked)) .plano-desc,
    .plano-option:not(:has(input[type="radio"]:checked)) .plano-list {
        display: none;
    }
}

/* deixa o preço mais compacto no não selecionado */
.plano-option:not(:has(input[type="radio"]:checked)) .plano-price b {
    font-size: 24px;
}

/* leve fade visual */
.plano-option:not(:has(input[type="radio"]:checked)) .plano-box {
    opacity: 0.92;
}

/* ========================= */
/* PLANOS - CONTRATAÇÃO */
/* ========================= */

.plano-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    align-items: stretch;
}

.plano-option {
    min-width: 0;
}

.plano-box {
    position: relative;
    overflow: hidden;
}

.plano-option:has(input[type="radio"]:checked) .plano-box {
    min-height: 320px;
}

.plano-option:not(:has(input[type="radio"]:checked)) .plano-box {
    min-height: 320px;
    opacity: 0.94;
}

.plano-option:not(:has(input[type="radio"]:checked)) .plano-desc {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.plano-option:not(:has(input[type="radio"]:checked))
    .plano-list
    li:nth-child(n + 3) {
    display: none;
}

.plano-check {
    font-weight: 900;
    margin-right: 6px;
}

.plano-head {
    width: 100%;
}

.plano-badge {
    flex-shrink: 0;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

@media (max-width: 980px) {
    .plano-grid {
        grid-template-columns: 1fr;
    }

    .plano-option:has(input[type="radio"]:checked) .plano-box,
    .plano-option:not(:has(input[type="radio"]:checked)) .plano-box {
        min-height: auto;
    }

    .plano-option:not(:has(input[type="radio"]:checked))
        .plano-list
        li:nth-child(n + 3) {
        display: list-item;
    }
}

/* ========================= */
/* PLANOS - SEM ESCONDER MÓDULOS */
/* ========================= */

.plano-option:not(:has(input[type="radio"]:checked))
    .plano-list
    li:nth-child(n + 3) {
    display: list-item !important;
}

.plano-option:not(:has(input[type="radio"]:checked)) .plano-desc,
.plano-option:not(:has(input[type="radio"]:checked)) .plano-list {
    display: flex !important;
}

.plano-list {
    display: flex !important;
    flex-direction: column;
    gap: 8px;
}

.plano-list li {
    display: flex !important;
    align-items: center;
    gap: 6px;
}

/* Corrige autocomplete do Google */
.pac-container {
    z-index: 9999 !important;
}

#lojEndereco {
    position: relative;
    z-index: 2;
}

input[readonly] {
    background: #f8fafc !important;
    color: #64748b;
    cursor: not-allowed;
}

.periodicidade-toggle {
    display: inline-flex;
    gap: 8px;
    padding: 6px;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    margin: 14px 0 18px;
}

.periodicidade-btn {
    border: 0;
    background: transparent;
    padding: 10px 18px;
    border-radius: 999px;
    font-weight: 800;
    color: #475569;
    cursor: pointer;
}

.periodicidade-btn small {
    display: block;
    font-size: 11px;
    font-weight: 700;
}

.periodicidade-btn.active {
    background: #002a5c;
    color: #fff;
}

.plano-economia {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 800;
    opacity: 0.85;
}

.preco-riscado {
    text-decoration: line-through;
    opacity: 0.6;
    margin-right: 6px;
}

.plano-economia {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    font-weight: 700;
    opacity: 0.9;
}

.url-sugestoes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.url-sugestao-btn {
    border: 1px solid #cbd5e1;
    background: #f8fafc;
    color: #0f172a;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.url-sugestao-btn:hover {
    background: #e0f2fe;
    border-color: #0072ae;
    color: #002a5c;
}
