/* ========================================================
   ASSESSORIA FLYTO · PÁGINA SEM DOBRA SFX
   Identidade Visual Oficial Flyto
   ======================================================== */

:root {
    --grafite: #111616;
    --grafite-2: #171d1d;
    --grafite-3: #1f2727;
    --grafite-card: rgba(23, 29, 29, 0.85);
    --neon: #6BEA57;
    --neon-hover: #58db44;
    --verde-texto: #277E1B;
    --claro: #F6F7F7;
    --branco: #FFFFFF;
    --cinza: #9AA6A6;
    --cinza-claro: #C4CCCC;
    --cinza-escuro: #4A5757;
    --erro: #E5484D;
    --erro-bg: rgba(229, 72, 77, 0.12);
    --linha-escura: rgba(255, 255, 255, 0.08);
    --linha-neon: rgba(107, 234, 87, 0.35);
    
    --f-titulo: "Big Shoulders Display", "Arial Narrow", -apple-system, sans-serif;
    --f-texto: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
    
    --raio-sm: 8px;
    --raio-md: 12px;
    --raio-lg: 18px;
    --raio-pill: 999px;
    --ease: cubic-bezier(.2, .8, .2, 1);
}

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--grafite);
    color: var(--branco);
    font-family: var(--f-texto);
    font-size: 15px;
    line-height: 1.4;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* Sem dobra (Above the fold): ocupa a tela inteira sem scroll vertical em telas padrão */
body.sem-dobra {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 100vh;
    min-height: 100svh;
    max-height: 100vh;
    overflow-y: hidden;
}

/* Fallback para telas muito baixas (ex: celular deitado menor que 560px) */
@media (max-height: 580px) {
    body.sem-dobra {
        overflow-y: auto;
        max-height: none;
    }
}

::selection {
    background: var(--neon);
    color: var(--grafite);
}

/* Fundo com Grade e Efeito de Luz / Glow */
.fundo-ambiente {
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.grade-linhas {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(var(--linha-escura) 1px, transparent 1px),
        linear-gradient(90deg, var(--linha-escura) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 35%, transparent 75%);
    mask-image: radial-gradient(ellipse 80% 65% at 50% 30%, #000 35%, transparent 75%);
}

.brilho-topo {
    position: absolute;
    top: -140px;
    left: 50%;
    transform: translateX(-50%);
    width: 680px;
    height: 480px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(107, 234, 87, 0.16) 0%, rgba(107, 234, 87, 0.04) 45%, transparent 70%);
    filter: blur(35px);
}

/* Container Principal */
.app-container {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 960px;
    margin: 0 auto;
    padding: clamp(8px, 1.6vh, 18px) clamp(14px, 3.5vw, 28px);
    display: flex;
    flex-direction: column;
    height: 100%;
    justify-content: space-between;
}

/* Cabeçalho */
.topo-flyto {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-bottom: clamp(4px, 1vh, 10px);
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: opacity 0.2s var(--ease);
}

.logo-link:hover {
    opacity: 0.85;
}

.logo-img {
    height: clamp(26px, 3.6vh, 34px);
    width: auto;
    object-fit: contain;
}

.tag-topo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(107, 234, 87, 0.1);
    border: 1px solid rgba(107, 234, 87, 0.28);
    color: var(--neon);
    font-size: clamp(11px, 1.4vh, 12px);
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--raio-pill);
    letter-spacing: 0.02em;
    text-transform: uppercase;
    white-space: nowrap;
}

.tag-topo .ponto-vivo {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon);
    box-shadow: 0 0 8px var(--neon);
    animation: pulsoPonto 2s infinite ease-in-out;
}

@keyframes pulsoPonto {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.4; transform: scale(0.8); }
}

/* Seção Central / Hero */
.conteudo-central {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin: auto 0;
    width: 100%;
}

.badge-sfx {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--linha-escura);
    color: var(--cinza-claro);
    font-size: clamp(11px, 1.3vh, 12px);
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--raio-pill);
    margin-bottom: clamp(6px, 1.2vh, 10px);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.badge-sfx svg {
    color: var(--neon);
}

.quebra-desktop {
    display: inline;
}

@media (max-width: 600px) {
    .quebra-desktop {
        display: none;
    }
}

.titulo-principal {
    font-family: var(--f-titulo);
    font-weight: 900;
    font-size: clamp(26px, 4.4vw, 48px);
    line-height: 1.0;
    letter-spacing: -0.01em;
    text-transform: uppercase;
    color: var(--branco);
    width: 100%;
    max-width: 820px;
    margin-bottom: clamp(4px, 1vh, 8px);
    overflow-wrap: break-word;
    word-break: normal;
}

.titulo-principal .destaque-neon {
    color: var(--neon);
    position: relative;
    display: inline-block;
    text-shadow: 0 0 20px rgba(107, 234, 87, 0.35);
}

.subtitulo {
    font-size: clamp(12.5px, 1.5vh, 14.5px);
    color: var(--cinza-claro);
    max-width: 640px;
    margin-bottom: clamp(10px, 1.8vh, 16px);
    font-weight: 400;
    line-height: 1.4;
}

/* Card de Captura */
.card-captura {
    width: 100%;
    max-width: 520px;
    background: var(--grafite-card);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--linha-escura);
    border-radius: var(--raio-lg);
    padding: clamp(14px, 2.2vh, 22px);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}

.card-captura.em-foco {
    border-color: var(--linha-neon);
    box-shadow: 0 16px 40px -10px rgba(0, 0, 0, 0.7), 0 0 24px -8px rgba(107, 234, 87, 0.2);
}

/* Campo de Input */
.grupo-input {
    text-align: left;
    margin-bottom: clamp(6px, 1.2vh, 10px);
}

.rotulo-input {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--cinza-claro);
    margin-bottom: 5px;
    letter-spacing: 0.02em;
}

.rotulo-dica {
    font-size: 11px;
    font-weight: 500;
    color: var(--cinza);
}

.caixa-input {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--grafite-2);
    border: 1.5px solid var(--linha-escura);
    border-radius: var(--raio-md);
    transition: all 0.22s var(--ease);
    overflow: hidden;
    width: 100%;
}

.caixa-input:hover {
    border-color: rgba(255, 255, 255, 0.16);
}

.caixa-input.focado {
    border-color: var(--neon);
    background: #141b1b;
    box-shadow: 0 0 0 3px rgba(107, 234, 87, 0.18);
}

.caixa-input.invalido {
    border-color: var(--erro);
    background: #191415;
    box-shadow: 0 0 0 3px rgba(229, 72, 77, 0.18);
}

.caixa-input.valido {
    border-color: var(--neon);
    background: #121914;
    box-shadow: 0 0 0 3px rgba(107, 234, 87, 0.25);
}

.icone-prefixo {
    display: flex;
    align-items: center;
    gap: 6px;
    padding-left: 14px;
    padding-right: 9px;
    color: var(--cinza);
    font-size: 13px;
    font-weight: 700;
    border-right: 1px solid var(--linha-escura);
    user-select: none;
    flex-shrink: 0;
}

.icone-prefixo svg {
    color: var(--neon);
}

.input-whatsapp {
    width: 100%;
    min-width: 0;
    flex: 1;
    min-height: clamp(42px, 5.2vh, 48px);
    background: transparent;
    border: none;
    outline: none;
    color: var(--branco);
    font-family: var(--f-texto);
    font-size: clamp(15px, 1.8vh, 17px);
    font-weight: 700;
    padding: 0 14px;
    letter-spacing: 0.04em;
}

.input-whatsapp::placeholder {
    color: var(--cinza-escuro);
    font-weight: 500;
    letter-spacing: normal;
}

.icone-status {
    padding-right: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.icone-status .badge-valido {
    display: none;
    color: var(--neon);
}

.icone-status .badge-invalido {
    display: none;
    color: var(--erro);
}

.caixa-input.valido .icone-status .badge-valido {
    display: block;
}

.caixa-input.invalido .icone-status .badge-invalido {
    display: block;
}

/* Mensagem de Feedback de Validação */
.msg-validacao {
    min-height: 16px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 4px;
}

.msg-validacao.erro {
    color: var(--erro);
}

.msg-validacao.sucesso {
    color: var(--neon);
}

/* Checkbox de Autorização */
.grupo-autorizacao {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    text-align: left;
    margin-bottom: clamp(10px, 1.8vh, 14px);
    user-select: none;
    cursor: pointer;
}

.custom-checkbox {
    position: relative;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 1px;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 0;
    left: 0;
    height: 18px;
    width: 18px;
    background-color: var(--grafite-2);
    border: 1.5px solid var(--linha-escura);
    border-radius: 5px;
    transition: all 0.2s var(--ease);
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--neon);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--neon);
    border-color: var(--neon);
}

.checkmark::after {
    content: "";
    position: absolute;
    display: none;
    width: 4.5px;
    height: 9px;
    border: solid var(--grafite);
    border-width: 0 2.2px 2.2px 0;
    transform: rotate(45deg);
    top: 2px;
}

.custom-checkbox input:checked ~ .checkmark::after {
    display: block;
}

.rotulo-autorizacao {
    font-size: clamp(11.5px, 1.3vh, 12.5px);
    color: var(--cinza-claro);
    line-height: 1.35;
    cursor: pointer;
}

.rotulo-autorizacao strong {
    color: var(--branco);
}

/* Área de Ações e Botões */
.acoes-container {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Botão Padrão Flyto */
.botao {
    --b-fundo: var(--neon);
    --b-texto: var(--grafite);
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: clamp(44px, 5.5vh, 52px);
    padding: 0 24px;
    border: 0;
    border-radius: var(--raio-pill);
    background: var(--b-fundo);
    color: var(--b-texto);
    font-family: var(--f-texto);
    font-weight: 800;
    font-size: clamp(14px, 1.6vh, 16px);
    text-decoration: none;
    letter-spacing: -0.01em;
    cursor: pointer;
    transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), background 0.2s, opacity 0.3s var(--ease), max-height 0.4s var(--ease);
    overflow: hidden;
    isolation: isolate;
    width: 100%;
}

/* Efeito Sheen Flyto */
.botao::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(110deg, transparent 30%, rgba(255, 255, 255, 0.45) 50%, transparent 70%);
    transform: translateX(-120%);
    transition: transform 0.7s var(--ease);
}

.botao:hover:not(:disabled)::after {
    transform: translateX(120%);
}

.botao:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 10px 28px -8px rgba(107, 234, 87, 0.55);
}

.botao:active:not(:disabled) {
    transform: translateY(0);
}

/* BOTÃO 1: LIBERAR ACESSO 🔓 */
/* Começa recolhido/oculto e surge com animação quando o WhatsApp for válido */
.btn-liberar-container {
    overflow: hidden;
    transition: max-height 0.35s var(--ease), opacity 0.3s var(--ease), margin 0.35s var(--ease);
    max-height: 0;
    opacity: 0;
    pointer-events: none;
    margin: 0;
}

.btn-liberar-container.visivel {
    max-height: 64px;
    opacity: 1;
    pointer-events: auto;
    margin-bottom: 2px;
}

.btn-liberar {
    background: var(--neon);
    color: var(--grafite);
}

.btn-liberar.carregando {
    pointer-events: none;
    opacity: 0.9;
}

.btn-liberar.sucesso {
    background: #4ade80;
    color: var(--grafite);
}

/* Spinner */
.spinner-icone {
    display: none;
    width: 18px;
    height: 18px;
    border: 2.5px solid rgba(17, 22, 22, 0.25);
    border-top-color: var(--grafite);
    border-radius: 50%;
    animation: girar 0.8s linear infinite;
}

.btn-liberar.carregando .spinner-icone {
    display: inline-block;
}

@keyframes girar {
    to { transform: rotate(360deg); }
}

/* BOTÃO 2: DRIVE SFX (ESTADO INICIAL: CINZA BLOQUEADO) */
.btn-drive {
    background: #1c2424;
    color: #687575;
    border: 1px solid rgba(255, 255, 255, 0.08);
    cursor: not-allowed;
    box-shadow: none;
    transition: all 0.4s var(--ease);
    user-select: none;
}

.btn-drive::after {
    display: none;
}

.btn-drive .status-cadeado {
    font-size: 14px;
}

/* BOTÃO 2: DRIVE SFX (ESTADO LIBERADO: VERDE CHAMATIVO, PULSANDO) */
.btn-drive.liberado {
    background: var(--neon) !important;
    color: var(--grafite) !important;
    border: none !important;
    cursor: pointer !important;
    opacity: 1 !important;
    box-shadow: 0 0 25px rgba(107, 234, 87, 0.65), 0 8px 24px -6px rgba(107, 234, 87, 0.8) !important;
    animation: pulsoChamativo 1.8s infinite ease-in-out !important;
}

.btn-drive.liberado::after {
    display: block;
}

.btn-drive.liberado:hover {
    transform: translateY(-2px) scale(1.02) !important;
    box-shadow: 0 0 35px rgba(107, 234, 87, 0.95), 0 12px 30px -4px rgba(107, 234, 87, 0.9) !important;
    background: #73f75e !important;
}

@keyframes pulsoChamativo {
    0%, 100% {
        box-shadow: 0 0 18px rgba(107, 234, 87, 0.55), 0 6px 20px -4px rgba(107, 234, 87, 0.65);
        transform: scale(1);
    }
    50% {
        box-shadow: 0 0 38px rgba(107, 234, 87, 0.95), 0 12px 30px -4px rgba(107, 234, 87, 0.9);
        transform: scale(1.02);
    }
}

/* Banner de Sucesso */
.aviso-sucesso {
    display: none;
    margin-top: 10px;
    padding: 8px 14px;
    background: rgba(107, 234, 87, 0.12);
    border: 1px solid rgba(107, 234, 87, 0.35);
    border-radius: var(--raio-md);
    color: var(--neon);
    font-size: 12px;
    font-weight: 700;
    align-items: center;
    gap: 8px;
    text-align: left;
    animation: fadeIn 0.35s var(--ease);
}

.aviso-sucesso.visivel {
    display: flex;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Chips / Features */
.features-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 6px 10px;
    margin-top: clamp(8px, 1.4vh, 14px);
}

.chip-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: clamp(10.5px, 1.2vh, 12px);
    font-weight: 600;
    color: var(--cinza);
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--linha-escura);
    padding: 3px 10px;
    border-radius: var(--raio-pill);
}

.chip-item .icone-verde {
    color: var(--neon);
    font-weight: 800;
}

/* Rodapé */
.rodape-flyto {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: clamp(6px, 1.2vh, 12px);
    border-top: 1px solid var(--linha-escura);
    font-size: clamp(10.5px, 1.2vh, 12px);
    color: var(--cinza-escuro);
}

.rodape-flyto a {
    color: var(--cinza);
    text-decoration: none;
    transition: color 0.2s;
}

.rodape-flyto a:hover {
    color: var(--neon);
}

.btn-painel-admin {
    background: transparent;
    border: none;
    color: var(--cinza-escuro);
    font-size: 11.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 8px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-painel-admin:hover {
    color: var(--cinza-claro);
    background: rgba(255, 255, 255, 0.05);
}

/* Modal Administrativo */
.modal-admin {
    position: fixed;
    inset: 0;
    z-index: 100;
    background: rgba(10, 14, 14, 0.88);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    animation: fadeIn 0.25s ease;
}

.modal-admin.aberto {
    display: flex;
}

.modal-conteudo {
    width: 100%;
    max-width: 680px;
    background: var(--grafite-2);
    border: 1px solid var(--linha-escura);
    border-radius: var(--raio-lg);
    padding: 24px;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.8);
    display: flex;
    flex-direction: column;
    max-height: 85vh;
}

.modal-cabecalho {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--linha-escura);
    padding-bottom: 14px;
    margin-bottom: 16px;
}

.modal-titulo {
    font-family: var(--f-titulo);
    font-size: 24px;
    color: var(--neon);
    text-transform: uppercase;
}

.modal-fechar {
    background: transparent;
    border: none;
    color: var(--cinza);
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
}

.modal-fechar:hover {
    color: var(--branco);
}

.tabela-leads-container {
    overflow-y: auto;
    margin-bottom: 16px;
    flex: 1;
    border: 1px solid var(--linha-escura);
    border-radius: var(--raio-sm);
}

.tabela-leads {
    width: 100%;
    border-collapse: collapse;
    font-size: 12.5px;
    text-align: left;
}

.tabela-leads th {
    background: var(--grafite);
    color: var(--neon);
    padding: 8px 12px;
    border-bottom: 1px solid var(--linha-escura);
    font-weight: 700;
}

.tabela-leads td {
    padding: 8px 12px;
    border-bottom: 1px solid var(--linha-escura);
    color: var(--cinza-claro);
}

.modal-acoes {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.btn-exportar-excel {
    background: #107c41;
    color: #fff;
    border: none;
    padding: 8px 18px;
    border-radius: var(--raio-pill);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.btn-exportar-excel:hover {
    background: #149c52;
}

.btn-copiar-numeros {
    background: rgba(255, 255, 255, 0.08);
    color: var(--branco);
    border: 1px solid var(--linha-escura);
    padding: 8px 16px;
    border-radius: var(--raio-pill);
    font-weight: 600;
    font-size: 12.5px;
    cursor: pointer;
    transition: background 0.2s;
}

/* Responsividade Mobile */
@media (max-width: 520px) {
    .app-container {
        padding: 8px 12px;
    }

    .topo-flyto {
        justify-content: space-between;
        gap: 6px;
    }

    .logo-img {
        height: 24px;
        max-width: 85px;
    }

    .tag-topo {
        font-size: 10px;
        padding: 3px 8px;
        gap: 5px;
    }

    .badge-sfx {
        font-size: 10.5px;
        padding: 3px 10px;
        margin-bottom: 6px;
    }

    .titulo-principal {
        font-size: clamp(22px, 6.5vw, 30px);
        line-height: 1.0;
        word-break: break-word;
        overflow-wrap: break-word;
    }

    .subtitulo {
        font-size: 12px;
        line-height: 1.35;
        margin-bottom: 10px;
    }

    .card-captura {
        padding: 12px;
        border-radius: var(--raio-md);
    }

    .rotulo-input {
        font-size: 10.5px;
    }

    .rotulo-dica {
        font-size: 10px;
    }

    .input-whatsapp {
        min-height: 40px;
        font-size: 14.5px;
    }

    .rotulo-autorizacao {
        font-size: 11px;
    }

    .features-chips {
        gap: 4px 6px;
        margin-top: 8px;
    }

    .chip-item {
        font-size: 10px;
        padding: 2px 7px;
    }

    .rodape-flyto {
        flex-direction: column;
        gap: 3px;
        text-align: center;
        font-size: 10.5px;
        padding-top: 6px;
    }
}
