/* Kzlyn — estilos do funil e componentes */
:root {
    --brand: #673de6;
    --brand-hover: #5a2fd4;
    --accent: #38bdf8;
    --surface: #ffffff;
    --border: #e2e8f0;
    --muted: #64748b;
    --page-bg: #f1f5f9;
}

.dark {
    --surface: #2a1f3d;
    --border: rgba(139, 92, 246, 0.35);
    --page-bg: #1a1225;
    --muted: #94a3b8;
}

body.funnel-page {
    background: var(--page-bg);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    color: #fff;
    background: var(--brand);
    transition: background 0.2s, box-shadow 0.2s, transform 0.15s;
    box-shadow: 0 10px 25px -5px rgba(103, 61, 230, 0.3);
    border: none;
    cursor: pointer;
    text-decoration: none;
}
.btn-primary:hover { background: var(--brand-hover); }
.btn-primary:disabled { opacity: 0.5; cursor: not-allowed; }

.btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 0.9375rem;
    border: 1px solid var(--border);
    background: var(--surface);
    color: #475569;
    transition: border-color 0.2s, background 0.2s;
    text-decoration: none;
    cursor: pointer;
}
.dark .btn-secondary { color: #e2e8f0; }
.btn-secondary:hover { border-color: var(--brand); }

.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.75rem;
    font-weight: 600;
    color: #fff;
    background: #22c55e;
    text-decoration: none;
    transition: background 0.2s;
}
.btn-whatsapp:hover { background: #16a34a; }

/* Bolinha flutuante WhatsApp */
.wpp-float {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    z-index: 9999;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-direction: row-reverse;
    text-decoration: none;
    filter: drop-shadow(0 8px 24px rgba(37, 211, 102, 0.45));
    transition: transform 0.2s ease, filter 0.2s ease;
}
.wpp-float:hover {
    transform: scale(1.04);
    filter: drop-shadow(0 12px 28px rgba(37, 211, 102, 0.55));
}
.wpp-float__btn {
    width: 3.75rem;
    height: 3.75rem;
    border-radius: 50%;
    background: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    animation: wpp-pulse 2.5s ease-in-out infinite;
}
.wpp-float__btn svg {
    width: 1.75rem;
    height: 1.75rem;
}
.wpp-float__label {
    background: #fff;
    color: #1e293b;
    font-size: 0.8125rem;
    font-weight: 600;
    padding: 0.625rem 1rem;
    border-radius: 1rem 1rem 0.25rem 1rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    border: 1px solid #e2e8f0;
    white-space: nowrap;
    position: relative;
}
.wpp-float__label::after {
    content: '';
    position: absolute;
    right: -6px;
    bottom: 14px;
    width: 12px;
    height: 12px;
    background: #fff;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    transform: rotate(-45deg);
}
.dark .wpp-float__label {
    background: #2a1f3d;
    color: #f1f5f9;
    border-color: rgba(139, 92, 246, 0.35);
}
.dark .wpp-float__label::after {
    background: #2a1f3d;
    border-color: rgba(139, 92, 246, 0.35);
}
@keyframes wpp-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.45); }
    50% { box-shadow: 0 0 0 12px rgba(37, 211, 102, 0); }
}
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.input {
    width: 100%;
    border-radius: 0.75rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--border);
    background: var(--surface);
    outline: none;
    font-size: 0.9375rem;
}
.input:focus {
    box-shadow: 0 0 0 3px rgba(103, 61, 230, 0.2);
    border-color: var(--brand);
}
.dark .input { color: #f8fafc; }

.input-icon-wrap {
    position: relative;
}
.icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    display: block;
}
.icon-lg {
    width: 2rem;
    height: 2rem;
}
.icon-inline {
    display: inline-block;
    vertical-align: -0.2em;
    margin-right: 0.125rem;
}
.text-emerald-600 .icon-inline { color: #059669; }
.text-rose-600 .icon-inline,
.text-rose-600.dark\:text-rose-400 .icon-inline { color: currentColor; }
.theme-toggle-btn .icon { color: currentColor; }
.input-icon-wrap .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.input-icon-wrap .input {
    padding-left: 2.75rem;
}
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.25rem;
    color: #94a3b8;
    background: transparent;
    border: none;
    cursor: pointer;
    border-radius: 0.375rem;
}
.icon-btn:hover { color: #fff; }
.icon-heading {
    color: var(--brand);
}
.success-icon-wrap {
    color: #d97706;
}

.badge-accent {
    display: inline-flex;
    font-size: 0.6875rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--brand);
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    background: rgba(103, 61, 230, 0.08);
    border: 1px solid rgba(103, 61, 230, 0.15);
}

.badge-kpanel {
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.12);
    padding: 0.2rem 0.5rem;
    border-radius: 0.375rem;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.25);
    animation: pulse-dot 2s infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* Busca de subdomínio */
.subdomain-bar {
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 1rem;
    overflow: hidden;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.06);
}
.dark .subdomain-bar { background: #231533; }
.subdomain-bar__row--input {
    display: flex;
    align-items: stretch;
    flex: 1;
    min-width: 0;
}
.subdomain-bar .sub-tag {
    display: flex;
    align-items: center;
    padding: 0 0.875rem;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--muted);
    background: #f8fafc;
    border-right: 1px solid var(--border);
    flex-shrink: 0;
}
.dark .subdomain-bar .sub-tag { background: #1a1225; }
.subdomain-bar__field {
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}
.subdomain-bar input {
    flex: 1;
    border: none;
    outline: none;
    padding: 0.875rem 1rem;
    font-size: 1rem;
    background: transparent;
    min-width: 0;
    width: 100%;
}
.dark .subdomain-bar input { color: #f1f5f9; }
.sub-suffix--inline {
    display: none;
    align-items: center;
    padding: 0 1rem;
    font-weight: 600;
    color: var(--muted);
    white-space: nowrap;
    font-size: 0.875rem;
    flex-shrink: 0;
}
.sub-suffix-mobile {
    display: block;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--muted);
    padding: 0.25rem 1rem 0;
    margin: 0;
}
.subdomain-bar .btn-verify {
    margin: 0.75rem;
    padding: 0.875rem 1.5rem;
    border-radius: 0.625rem;
    font-weight: 700;
    font-size: 1rem;
    color: #fff;
    background: var(--brand);
    border: none;
    cursor: pointer;
    width: calc(100% - 1.5rem);
    align-self: center;
}
.subdomain-bar .btn-verify:hover { background: var(--brand-hover); }

.suggestion-pill {
    display: inline-flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 0.5rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.8125rem;
    font-weight: 500;
    color: #475569;
    background: #fff;
    border: 1px solid var(--border);
    cursor: pointer;
    transition: border-color 0.2s, color 0.2s;
    max-width: 100%;
}
.suggestion-pill__name { font-weight: 600; color: #334155; }
.suggestion-pill__domain { color: var(--muted); font-size: 0.75rem; }
.suggestion-pill:hover {
    border-color: var(--brand);
}
.suggestion-pill:hover .suggestion-pill__name { color: var(--brand); }
.dark .suggestion-pill {
    background: #231533;
}
.dark .suggestion-pill__name { color: #e2e8f0; }

.feature-card h3 {
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--brand);
    margin-bottom: 0.5rem;
}

/* Card de preço (após verificar) */
.price-reveal {
    animation: slideUp 0.35s ease-out;
}
@keyframes slideUp {
    from { opacity: 0; transform: translateY(12px); }
    to { opacity: 1; transform: translateY(0); }
}
.price-card-link {
    display: block;
    text-decoration: none;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}
.price-card-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(103, 61, 230, 0.2);
}

/* Formulário centralizado */
.funnel-card {
    max-width: 28rem;
    margin: 0 auto;
    padding: 2rem;
}
.funnel-card-wide {
    max-width: 32rem;
    margin: 0 auto;
    padding: 2rem;
}

.label-upper {
    display: block;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.375rem;
}
.dark .label-upper { color: #94a3b8; }

.phone-row {
    display: flex;
    gap: 0.5rem;
}
.phone-row select {
    width: 7.5rem;
    flex-shrink: 0;
    border-radius: 0.75rem;
    padding: 0.875rem 0.5rem;
    border: 1px solid var(--border);
    background: var(--surface);
    font-size: 0.875rem;
}
.dark .phone-row select { color: #f8fafc; }
.phone-row .input-icon-wrap { flex: 1; }

/* Checkout tabs */
.pay-tabs {
    display: flex;
    gap: 0;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
}
.pay-tab {
    flex: 1;
    padding: 0.875rem 1rem;
    text-align: center;
    font-size: 0.8125rem;
    font-weight: 600;
    cursor: pointer;
    background: #fff;
    color: var(--muted);
    border: none;
    transition: background 0.2s, color 0.2s;
}
.dark .pay-tab { background: #231533; }
.pay-tab.active {
    background: var(--brand);
    color: #fff;
}
.pay-panel { display: none; }
.pay-panel.active { display: block; }

.qr-placeholder {
    width: 11rem;
    height: 11rem;
    margin: 0 auto 1rem;
    border: 2px dashed var(--border);
    border-radius: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--muted);
    text-align: center;
    line-height: 1.4;
}
.qr-placeholder--error {
    width: auto;
    max-width: 16rem;
    min-height: 8rem;
    height: auto;
    padding: 1rem;
}
.pix-qr-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 0 auto 0.5rem;
}
.pix-qr-image {
    width: 13.75rem;
    height: 13.75rem;
    max-width: 100%;
    object-fit: contain;
    border-radius: 0.75rem;
    border: 1px solid var(--border);
    background: #fff;
    padding: 0.5rem;
}

.pix-copy-box {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #1e293b;
    color: #e2e8f0;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
}
.pix-copy-box button {
    flex-shrink: 0;
    background: transparent;
    border: none;
    color: #94a3b8;
    cursor: pointer;
    padding: 0.25rem;
}
.pix-copy-box button:hover { color: #fff; }
.pix-copy-box span {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Success / análise */
.success-hero {
    max-width: 36rem;
    margin: 0 auto;
    text-align: center;
}
.success-top-line {
    height: 4px;
    border-radius: 4px 4px 0 0;
    background: linear-gradient(90deg, #fbbf24, #38bdf8, var(--brand));
}
.badge-waiting {
    display: inline-flex;
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.05em;
    color: #b45309;
    background: #fef3c7;
    border: 1px solid #fde68a;
}
.steps-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    text-align: left;
}
@media (max-width: 640px) {
    .steps-grid { grid-template-columns: 1fr; }
}
.step-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}
.step-num {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    background: rgba(103, 61, 230, 0.12);
    color: var(--brand);
    font-weight: 800;
    font-size: 0.8125rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.subdomain-code {
    display: inline-block;
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
    background: #1e293b;
    color: #f8fafc;
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
}

/* Página de planos (estilo carrinho) */
.plans-layout {
    display: grid;
    gap: 1.5rem;
    max-width: 56rem;
    margin: 0 auto;
}
@media (min-width: 1024px) {
    .plans-layout {
        grid-template-columns: 1fr 340px;
        align-items: start;
    }
}
.plans-badge {
    display: inline-block;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    background: var(--brand);
    color: #fff;
    padding: 0.25rem 0.625rem;
    border-radius: 0.25rem;
}
.plans-discount-pill {
    display: inline-flex;
    font-size: 0.6875rem;
    font-weight: 700;
    color: #fff;
    background: #7c3aed;
    padding: 0.25rem 0.625rem;
    border-radius: 9999px;
}
.plans-trust .icon {
    width: 1rem;
    height: 1rem;
}
.plans-summary {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
}
@media (max-width: 1023px) {
    .plans-sidebar { order: -1; }
}

.funnel-footer-badges span {
    display: inline-flex;
    font-size: 0.625rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    color: var(--accent);
    background: rgba(56, 189, 248, 0.1);
    padding: 0.25rem 0.625rem;
    border-radius: 0.375rem;
}

.subdomain-code--block {
    display: block;
    margin: 0.5rem auto;
    max-width: 100%;
    word-break: break-all;
    text-align: center;
}

/* ========== Mobile & touch ========== */
.site-body {
    -webkit-text-size-adjust: 100%;
    padding-bottom: calc(5rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 640px) {
    .subdomain-bar {
        flex-direction: row;
        align-items: stretch;
    }
    .sub-suffix-mobile { display: none; }
    .sub-suffix--inline { display: flex; }
    .subdomain-bar .btn-verify {
        width: auto;
        margin: 0.5rem;
        padding: 0 1.75rem;
        align-self: stretch;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    .subdomain-bar input {
        font-size: 1.125rem;
        padding: 1rem 1.25rem;
    }
}

@media (max-width: 639px) {
    .input,
    .subdomain-bar input,
    select {
        font-size: 16px; /* evita zoom automático no iOS */
    }

    .funnel-card,
    .funnel-card-wide {
        padding: 1.25rem;
        margin-left: 0;
        margin-right: 0;
    }

    .badge-accent {
        font-size: 0.625rem;
        padding: 0.35rem 0.75rem;
        line-height: 1.35;
    }

    .btn-primary,
    .btn-secondary,
    .btn-whatsapp {
        min-height: 48px;
        padding-top: 0.875rem;
        padding-bottom: 0.875rem;
    }

    .phone-row {
        flex-direction: column;
    }
    .phone-row select {
        width: 100%;
    }

    .pay-tabs {
        flex-direction: column;
    }
    .pay-tab {
        padding: 0.75rem;
        font-size: 0.75rem;
        line-height: 1.3;
    }

    .pix-copy-box {
        flex-wrap: wrap;
    }
    .pix-copy-box span {
        white-space: normal;
        word-break: break-all;
        flex: 1 1 100%;
        order: 1;
    }
    .pix-copy-box button {
        order: 2;
        margin-left: auto;
    }

    .success-hero .card .text-2xl {
        font-size: 1.375rem;
        line-height: 1.3;
    }

    .wpp-float {
        bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
        right: calc(1rem + env(safe-area-inset-right, 0px));
    }
    .wpp-float__btn {
        width: 3.5rem;
        height: 3.5rem;
    }
    .wpp-float__label {
        display: none;
    }
}

/* Tablet+ */
@media (min-width: 640px) and (max-width: 767px) {
    .suggestion-pill__domain { display: inline; }
}

/* Tabelas painel / admin — scroll horizontal suave */
.table-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.table-scroll table {
    min-width: 520px;
}

@media (max-width: 639px) {
    .admin-metrics {
        grid-template-columns: 1fr 1fr;
    }
    .admin-metrics .card:last-child {
        grid-column: 1 / -1;
    }
}
