/* ==========================================================================
   ToqueTag — Gerador de QR Code
   Visual alinhado ao bio.toquetag.com.br (mesma paleta, tipografia Poppins,
   botões, cards, navegação, landing e painel). Os tokens abaixo são os mesmos
   do bio; os nomes antigos (--cor-*) continuam existindo como apelidos para
   não quebrar os estilos inline das páginas.
   ========================================================================== */

:root,
[data-theme="light"] {
    --color-bg: #F8F6F2;
    --color-bg-alt: #F1EDE6;
    --color-surface: #FFFFFF;
    --color-text: #1A1714;
    --color-text-muted: #6B6560;
    --color-border: #E8E4DD;
    --color-accent: #9B3FE0;
    --color-accent-hover: #7F2FC0;
    --color-accent-contrast: #FFFFFF;
    --color-accent-soft: rgba(155, 63, 224, 0.12);
    --color-accent-2: #D89A1E;
    --color-accent-2-light: #F5C542;
    --color-accent-2-contrast: #3A2A05;
    --color-success-bg: #E9F7EF;
    --color-success-text: #1E7A46;
    --color-error-bg: #FCEAEA;
    --color-error-text: #B3261E;
    --color-info-bg: #F3EAFB;
    --color-info-text: #6B2FA6;
    --color-warn-bg: #FFF4DC;
    --color-warn-text: #8A5A00;
    --shadow-card: 0 1px 3px rgba(26, 23, 20, 0.08), 0 1px 2px rgba(26, 23, 20, 0.04);
}

[data-theme="dark"] {
    --color-bg: #16130F;
    --color-bg-alt: #1E1A16;
    --color-surface: #241F1B;
    --color-text: #FFFFFF;
    --color-text-muted: #B8B0A6;
    --color-border: #362F28;
    --color-accent: #9B3FE0;
    --color-accent-hover: #B266EB;
    --color-accent-contrast: #FFFFFF;
    --color-accent-soft: rgba(178, 102, 235, 0.16);
    --color-accent-2: #D89A1E;
    --color-accent-2-light: #F5C542;
    --color-accent-2-contrast: #3A2A05;
    --color-success-bg: #14311F;
    --color-success-text: #6FD69A;
    --color-error-bg: #3A1616;
    --color-error-text: #F29999;
    --color-info-bg: #2A1F3A;
    --color-info-text: #C79DEE;
    --color-warn-bg: #3A2A05;
    --color-warn-text: #F5C542;
    --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Apelidos dos nomes antigos (usados em estilos inline nas páginas) */
:root, [data-theme="light"], [data-theme="dark"] {
    --cor-fundo: var(--color-bg);
    --cor-fundo-alt: var(--color-bg-alt);
    --cor-fundo-card: var(--color-surface);
    --cor-texto: var(--color-text);
    --cor-texto-suave: var(--color-text-muted);
    --cor-borda: var(--color-border);
    --cor-destaque: var(--color-accent);
    --cor-destaque-hover: var(--color-accent-hover);
    --cor-destaque-fraco: var(--color-accent-soft);
    --cor-dourado: var(--color-accent-2);
    --cor-sucesso: var(--color-success-text);
    --cor-sucesso-fundo: var(--color-success-bg);
    --cor-aviso: var(--color-warn-text);
    --cor-aviso-fundo: var(--color-warn-bg);
    --cor-erro: var(--color-error-text);
    --cor-erro-fundo: var(--color-error-bg);
    --sombra-card: var(--shadow-card);
    --raio: 12px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; max-width: 100%; overflow-x: hidden; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }

img, svg, video, iframe { max-width: 100%; }
input, select, textarea, button { max-width: 100%; }

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    font-size: 15px;
    line-height: 1.55;
    -webkit-font-smoothing: antialiased;
    transition: background-color .2s ease, color .2s ease;
}

a { color: var(--color-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-weight: 600; margin: 0 0 8px; line-height: 1.25; letter-spacing: -0.01em; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; margin-top: 24px; }
h3 { font-size: 1rem; margin-top: 16px; }
p { line-height: 1.7; }
ul { line-height: 1.8; padding-left: 20px; }
code { font-size: 0.85em; background: var(--color-border); padding: 1px 6px; border-radius: 6px; }

.container { max-width: 720px; margin: 0 auto; padding: 24px; }
.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; }

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 20px;
    border-radius: 10px;
    border: none;
    font-family: inherit;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    background: var(--color-accent);
    color: var(--color-accent-contrast);
    box-shadow: 0 2px 10px rgba(155, 63, 224, 0.28);
    transition: background-color .15s ease, transform .2s cubic-bezier(.34, 1.56, .64, 1), box-shadow .2s ease;
}
.btn:hover { text-decoration: none; background: var(--color-accent-hover); }
@media (prefers-reduced-motion: no-preference) {
    .btn:not(:disabled):hover { transform: translateY(-1px) scale(1.015); }
}
.btn:active { transform: scale(0.96); }
.btn:disabled { cursor: not-allowed; opacity: .6; }
.btn-primary { background: var(--color-accent); color: var(--color-accent-contrast); }
.btn-sm { padding: 8px 14px; font-size: 13px; }

.btn-secundario, .btn-ghost {
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    box-shadow: none;
}
.btn-secundario:hover, .btn-ghost:hover { background: var(--color-border); }
.btn-outline { background: transparent; border: 2px solid currentColor; color: inherit; box-shadow: none; }
.btn-outline:hover { background: rgba(155, 63, 224, 0.12); }
.btn-danger { background: var(--color-error-bg); color: var(--color-error-text); box-shadow: none; }
.btn-danger:hover { background: var(--color-error-text); color: #fff; }

/* --------------------------------------------------------------------------
   Formulários
   -------------------------------------------------------------------------- */
label {
    display: block;
    font-weight: 500;
    font-size: 13px;
    margin: 14px 0 6px;
    color: var(--color-text);
}
label:first-child { margin-top: 0; }

input[type="text"], input[type="url"], input[type="email"], input[type="password"],
input[type="tel"], input[type="date"], input[type="number"], select, textarea {
    width: 100%;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1.5px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    font-family: inherit;
    font-size: 14.5px;
    margin-bottom: 14px;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(155, 63, 224, 0.15);
}
input[readonly] { background: var(--color-bg); color: var(--color-text-muted); }
input[type="checkbox"] { accent-color: var(--color-accent); }

/* --------------------------------------------------------------------------
   Alertas (flash)
   -------------------------------------------------------------------------- */
.flash { padding: 12px 20px; text-align: center; font-size: 14px; font-weight: 500; }
.flash-sucesso { background: var(--color-success-bg); color: var(--color-success-text); }
.flash-erro { background: var(--color-error-bg); color: var(--color-error-text); }
.flash-aviso { background: var(--color-warn-bg); color: var(--color-warn-text); }
@media (prefers-reduced-motion: no-preference) {
    @keyframes flash-in {
        0% { opacity: 0; transform: translateY(-8px) scale(.98); }
        100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .flash { animation: flash-in .4s cubic-bezier(.34, 1.56, .64, 1) both; }
}

/* --------------------------------------------------------------------------
   Cards, selos, tabelas
   -------------------------------------------------------------------------- */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 20px;
}

.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}
/* Selo PRO dourado com coroa (igual ao do bio) */
.badge-pro {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .03em;
    background: linear-gradient(135deg, var(--color-accent-2-light), var(--color-accent-2));
    color: var(--color-accent-2-contrast);
    vertical-align: middle;
    box-shadow: 0 1px 5px rgba(216, 154, 30, 0.35);
}
.badge-disponivel, .badge-ativo { background: var(--color-success-bg); color: var(--color-success-text); }
.badge-em_uso { background: var(--color-info-bg); color: var(--color-info-text); }
.badge-pausado { background: var(--color-warn-bg); color: var(--color-warn-text); }
.badge-expirado, .badge-sem_link { background: var(--color-border); color: var(--color-text-muted); }

.plan-badge { font-size: 11px; font-weight: 700; padding: 4px 10px; border-radius: 999px; letter-spacing: .04em; }
.plan-badge-free { background: var(--color-border); color: var(--color-text-muted); }
.plan-badge-admin { background: var(--color-accent); color: #fff; }
.plan-badge-pro {
    background: linear-gradient(135deg, var(--color-accent-2-light), var(--color-accent-2));
    color: var(--color-accent-2-contrast);
    box-shadow: 0 1px 5px rgba(216, 154, 30, 0.4);
}

table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 11px 8px; border-bottom: 1px solid var(--color-border); font-size: 14px; }
th { color: var(--color-text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; }
tr:last-child td { border-bottom: none; }

.filtros { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filtros select, .filtros input { margin-bottom: 0; width: auto; }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat-box {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 18px 22px;
}
.stat-box .valor { display: block; font-size: 28px; font-weight: 700; color: var(--color-accent); line-height: 1.2; }
.stat-box .rotulo { font-size: 13px; color: var(--color-text-muted); margin-top: 2px; }

/* --------------------------------------------------------------------------
   Botões de ação (tabelas)
   -------------------------------------------------------------------------- */
.acao-grupo { display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.acao-btn {
    display: inline-flex;
    align-items: center;
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 12.5px;
    font-weight: 600;
    font-family: inherit;
    background: transparent;
    color: var(--color-text);
    border: 1px solid var(--color-border);
    cursor: pointer;
    white-space: nowrap;
    transition: background-color .15s ease, transform .2s cubic-bezier(.34, 1.56, .64, 1);
}
.acao-btn:hover { background: var(--color-border); text-decoration: none; }
.acao-btn-primario { background: var(--color-accent); color: #fff; border-color: var(--color-accent); }
.acao-btn-primario:hover { background: var(--color-accent-hover); }
.acao-separador { width: 1px; height: 18px; background: var(--color-border); margin: 0 4px; }

/* --------------------------------------------------------------------------
   Botão de alternar tema (claro/escuro): redondo, com sol/lua
   -------------------------------------------------------------------------- */
.theme-toggle {
    position: relative;
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    cursor: pointer;
    display: inline-flex; align-items: center; justify-content: center;
    color: var(--color-text);
    padding: 0;
    flex-shrink: 0;
}
.theme-toggle:hover { background: var(--color-border); text-decoration: none; }
.theme-toggle svg { width: 18px; height: 18px; }
.theme-toggle .icon-moon { display: none; }
[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
[data-theme="dark"] .theme-toggle .icon-moon { display: inline-flex; }

/* --------------------------------------------------------------------------
   Logo que troca sozinha conforme o tema
   -------------------------------------------------------------------------- */
.site-logo { display: inline-flex; align-items: center; }
.site-logo .site-logo-dark { display: none; }
[data-theme="dark"] .site-logo .site-logo-light { display: none; }
[data-theme="dark"] .site-logo .site-logo-dark { display: block; }
.logo-img { height: 34px; display: block; }
.logo-fallback { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; color: var(--color-text); }

/* --------------------------------------------------------------------------
   Modal de pré-visualização / exclusão
   -------------------------------------------------------------------------- */
.qr-modal-overlay {
    display: none;
    position: fixed; inset: 0;
    background: rgba(26, 23, 20, 0.55);
    backdrop-filter: blur(3px);
    align-items: center; justify-content: center;
    z-index: 1000;
    padding: 20px;
}
.qr-modal-overlay.aberto { display: flex; }
.qr-modal-caixa {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 28px;
    max-width: 360px;
    width: 100%;
    text-align: center;
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.3);
}
.qr-modal-caixa img {
    width: 220px; height: 220px;
    background: #fff;
    border-radius: 12px;
    padding: 12px;
    border: 1px solid var(--color-border);
    margin-bottom: 16px;
}
.qr-modal-caixa h3 { margin: 0 0 16px; }
.qr-modal-botoes { display: flex; gap: 8px; margin-top: 8px; }
.qr-modal-fechar {
    display: block; margin-top: 16px; font-size: 13px; font-family: inherit;
    color: var(--color-text-muted); cursor: pointer; background: none; border: none; width: 100%;
}
.qr-modal-fechar:hover { color: var(--color-text); }

/* Miniatura do QR na tabela */
.qr-thumb {
    width: 64px; height: 64px; background: #fff;
    border: 1px solid var(--color-border); border-radius: 8px; padding: 5px;
    cursor: pointer; transition: transform .2s cubic-bezier(.34, 1.56, .64, 1), border-color .15s ease;
}
.qr-thumb:hover { transform: scale(1.08); border-color: var(--color-accent); }
.qr-thumb-quebrado { opacity: 0.25; cursor: help; }
.qr-thumb-vazio {
    display: inline-flex; align-items: center; justify-content: center;
    width: 64px; height: 64px; background: var(--color-bg);
    border: 1px dashed var(--color-border); border-radius: 8px;
    font-size: 10px; color: var(--color-text-muted); font-weight: 700;
}
.qr-thumb-linha { display: flex; align-items: center; gap: 8px; }
.qr-icon-btn {
    width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px; border: 1px solid var(--color-border); background: transparent;
    color: var(--color-text); cursor: pointer; flex-shrink: 0;
}
.qr-icon-btn:hover { background: var(--color-border); }

/* Seleção múltipla */
.barra-selecao {
    display: none; align-items: center; justify-content: space-between;
    background: var(--color-info-bg); border: 1px solid var(--color-accent);
    border-radius: 10px; padding: 10px 16px; margin-bottom: 16px;
    font-size: 14px; color: var(--color-info-text); font-weight: 600;
}
.qr-checkbox { width: 16px; height: 16px; cursor: pointer; }

/* Tela de detalhe de 1 QR */
.qr-detalhe { display: flex; gap: 24px; align-items: flex-start; }
.qr-detalhe-imagem {
    flex-shrink: 0; width: 180px; height: 180px; background: #fff;
    border: 1px solid var(--color-border); border-radius: 12px; padding: 16px;
}
.qr-detalhe-conteudo { flex: 1; min-width: 0; }
@media (max-width: 600px) { .qr-detalhe { flex-direction: column; } }

.link-voltar {
    display: inline-block; margin-bottom: 14px; font-size: 13px; font-weight: 600; color: var(--color-text-muted);
}
.link-voltar:hover { color: var(--color-accent); text-decoration: none; }

/* --------------------------------------------------------------------------
   Autenticação: cartão único centralizado (mesmo padrão do bio)
   -------------------------------------------------------------------------- */
.auth-body { min-height: 100vh; position: relative; }
.auth-body .theme-toggle { position: fixed; top: 20px; right: 20px; z-index: 5; }
.auth-wrapper {
    width: 100%; min-height: 100vh;
    display: flex; align-items: center; justify-content: center; padding: 24px;
}
.auth-card {
    width: 100%; max-width: 400px; padding: 36px 32px;
    background: var(--color-surface); border: 1px solid var(--color-border);
    border-radius: 16px; box-shadow: var(--shadow-card);
}
.auth-logo { text-align: center; margin-bottom: 20px; }
.auth-logo .site-logo { justify-content: center; }
.auth-logo .logo-img { margin: 0 auto; }
.auth-title { text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -.01em; margin-top: 0; }
.auth-subtitle { text-align: center; color: var(--color-text-muted); font-size: 14px; margin: 0 0 20px; }
.auth-alt-link { text-align: center; font-size: 13px; margin: 20px 0 0; color: var(--color-text-muted); }
.auth-card form > .btn { border-radius: 999px; width: 100%; margin-top: 8px; padding: 13px 20px; }
@media (max-width: 480px) {
    .auth-wrapper { padding: 16px; }
    .auth-card { padding: 28px 20px; border-radius: 14px; }
}

/* Páginas legais */
.legal-card h1 { margin-top: 0; }
.legal-card h2 { font-size: 16px; margin: 28px 0 8px; }
.legal-card p, .legal-card li { color: var(--color-text-muted); font-size: 14px; line-height: 1.7; }
.legal-card ul { padding-left: 20px; margin: 8px 0; }

/* --------------------------------------------------------------------------
   Painel (cliente e admin): topbar + abas laterais, como no bio
   -------------------------------------------------------------------------- */
.dash-body { min-height: 100vh; }
.dash-topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 24px; background: var(--color-surface); border-bottom: 1px solid var(--color-border);
}
.dash-topbar-right { display: flex; align-items: center; gap: 10px; }
.dash-user { font-size: 13px; color: var(--color-text-muted); }

.dash-layout { display: flex; max-width: 1200px; margin: 0 auto; align-items: flex-start; }
.dash-layout-single { display: block; max-width: 960px; }
.dash-tabs {
    width: 224px; flex-shrink: 0; display: flex; flex-direction: column; gap: 2px;
    padding: 24px 12px; position: sticky; top: 0;
}
.dash-tab {
    display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 8px;
    color: var(--color-text); font-size: 14px; font-weight: 500; text-decoration: none !important;
    flex-shrink: 0; white-space: nowrap;
}
.dash-tab svg { width: 17px; height: 17px; flex-shrink: 0; stroke: currentColor; }
.dash-tab:hover { background: var(--color-border); }
.dash-tab.active { background: var(--color-accent); color: #fff; }
.dash-tabs-divider { height: 1px; background: var(--color-border); margin: 10px 4px; }

.dash-content { flex: 1; padding: 24px 24px 60px; min-width: 0; }
.dash-layout-single .dash-content { max-width: 960px; margin: 0 auto; }
.content-title { font-size: 22px; margin: 0 0 18px; }
.content-subtitle { color: var(--color-text-muted); font-size: 14px; margin-bottom: 20px; }

@media (prefers-reduced-motion: no-preference) {
    @keyframes dash-card-in {
        0% { opacity: 0; transform: translateY(14px) scale(.98); }
        100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .dash-content > .card, .dash-content > .stat-grid {
        animation: dash-card-in .45s cubic-bezier(.34, 1.56, .64, 1) both;
    }
    .dash-content > .card:nth-of-type(2) { animation-delay: .06s; }
    .dash-content > .card:nth-of-type(3) { animation-delay: .12s; }
    .dash-content > .card:nth-of-type(n+4) { animation-delay: .18s; }
}

@media (max-width: 820px) {
    .dash-layout { flex-direction: column; align-items: stretch; }
    .dash-tabs, .dash-content { min-width: 0; max-width: 100%; }
    .dash-tabs {
        width: 100%; flex-direction: row; overflow-x: auto; position: static; padding: 12px;
        -webkit-overflow-scrolling: touch; scroll-snap-type: x proximity;
    }
    .dash-tab { scroll-snap-align: start; }
    .dash-tabs-divider { width: 1px; height: auto; margin: 4px 6px; flex-shrink: 0; }
    .filtros { flex-direction: column; align-items: stretch; }
    .filtros select, .filtros input { width: 100%; }
    .grid-2-colunas { flex-direction: column; }
}
@media (max-width: 600px) {
    .dash-topbar { flex-wrap: wrap; row-gap: 8px; padding: 12px 16px; }
    .dash-topbar-right { flex-wrap: wrap; row-gap: 8px; justify-content: flex-end; }
    .dash-user { display: none; }
    .dash-content { padding: 16px 16px 48px; }
    .card { padding: 16px; }
}

/* Evita que tabelas largas (muitas colunas/ações) sejam cortadas pela borda
   da página — o scroll fica contido dentro do card, não na página inteira. */
.tabela-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -4px;
    padding: 0 4px;
}

/* Tabela responsiva: vira lista de cartões no celular */
@media (max-width: 700px) {
    .tabela-responsiva thead { display: none; }
    .tabela-responsiva, .tabela-responsiva tbody, .tabela-responsiva tr, .tabela-responsiva td {
        display: block; width: 100%;
    }
    .tabela-responsiva tr {
        border: 1px solid var(--color-border); border-radius: 12px;
        margin-bottom: 12px; padding: 12px; background: var(--color-surface);
    }
    .tabela-responsiva td {
        border-bottom: none; padding: 6px 0; display: flex;
        justify-content: space-between; align-items: center; gap: 12px; text-align: right;
    }
    .tabela-responsiva td[data-label]::before {
        content: attr(data-label); font-size: 11px; font-weight: 700; text-transform: uppercase;
        letter-spacing: 0.04em; color: var(--color-text-muted); text-align: left; flex-shrink: 0;
    }
    .tabela-responsiva td[data-label=""]::before,
    .tabela-responsiva td:not([data-label])::before { content: none; }
    .tabela-responsiva .acao-grupo { justify-content: flex-end; }
}

/* ==========================================================================
   Landing (página inicial) — mesma linguagem do bio.toquetag.com.br
   ========================================================================== */
.lp-body { font-size: 15px; line-height: 1.6; }

/* Navegação fixa com desfoque */
.lp-nav {
    position: sticky; top: 0; z-index: 50;
    background: color-mix(in srgb, var(--color-bg) 85%, transparent);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
}
.lp-nav .wrap { display: flex; align-items: center; justify-content: space-between; padding-top: 14px; padding-bottom: 14px; gap: 20px; }
.lp-nav-logo { display: inline-flex; }
.lp-nav-logo .logo-img { height: 42px; }
.lp-nav-links { display: flex; align-items: center; gap: 28px; }
.lp-nav-links a:not(.btn) { color: var(--color-text); font-weight: 500; font-size: 14px; opacity: .85; }
.lp-nav-links a:not(.btn):hover { opacity: 1; text-decoration: none; color: var(--color-accent); }
.lp-nav-actions { display: flex; align-items: center; gap: 14px; }
.lp-nav-login { font-weight: 600; font-size: 14px; }
.lp-nav-login:hover { border-color: var(--color-accent); color: var(--color-accent); text-decoration: none; }

@media (prefers-reduced-motion: no-preference) {
    @keyframes lp-hero-in {
        0% { opacity: 0; transform: translateY(22px) scale(.97); }
        60% { opacity: 1; }
        100% { opacity: 1; transform: translateY(0) scale(1); }
    }
    .lp-eyebrow, .lp-hero h1, .lp-hero p.lp-sub, .lp-hero-card, .lp-microtrust, .lp-phone-wrap {
        animation: lp-hero-in .7s cubic-bezier(.34, 1.56, .64, 1) both;
    }
    .lp-eyebrow { animation-delay: .02s; }
    .lp-hero h1 { animation-delay: .08s; }
    .lp-hero p.lp-sub { animation-delay: .16s; }
    .lp-hero-card { animation-delay: .24s; }
    .lp-microtrust { animation-delay: .3s; }
    .lp-phone-wrap { animation-delay: .18s; }
    .lp-phone { animation: lp-phone-float 4.5s ease-in-out infinite; }
}
@keyframes lp-phone-float {
    0%, 100% { transform: rotate(2deg) translateY(0); }
    50% { transform: rotate(2deg) translateY(-10px); }
}

/* Hero em degradê */
.lp-hero {
    padding: 76px 0 90px;
    background: linear-gradient(135deg, #F8F6F2 0%, #E8DCC8 30%, #D3A15C 55%, #B4728A 75%, #9B3FE0 100%);
    color: #1A1714; overflow: hidden;
}
[data-theme="dark"] .lp-hero {
    background: linear-gradient(135deg, #0D0A08 0%, #2E1A3D 25%, #5C1FC7 55%, #A0679C 80%, #C39A6E 100%);
    color: #FFFFFF;
}
.lp-hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.lp-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255,255,255,0.35); border: 1px solid rgba(255,255,255,0.5);
    padding: 7px 14px; border-radius: 999px; font-size: 13px; font-weight: 600; margin-bottom: 20px;
}
[data-theme="dark"] .lp-eyebrow { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.22); }
.lp-hero h1 { font-size: 44px; line-height: 1.15; max-width: 560px; margin-bottom: 16px; }
.lp-hero p.lp-sub { font-size: 17px; max-width: 470px; opacity: .9; margin-bottom: 28px; }

.lp-hero-card {
    max-width: 480px; padding: 24px; margin-bottom: 22px;
    background: var(--color-surface); color: var(--color-text);
    border: 1px solid rgba(255,255,255,0.5); border-radius: 16px;
    box-shadow: 0 16px 40px rgba(26, 23, 20, 0.18);
}
.lp-hero-card label { margin-top: 0; }
.lp-hero-card .btn { width: 100%; padding: 14px 20px; }
.lp-hero-card .lp-hero-note { font-size: 12.5px; color: var(--color-text-muted); margin: 14px 0 0; line-height: 1.55; }
.lp-microtrust { display: flex; flex-wrap: wrap; gap: 18px; font-size: 13px; opacity: .9; }
.lp-microtrust span { display: inline-flex; align-items: center; gap: 6px; }
.lp-microtrust svg { flex-shrink: 0; }

/* Mockup do celular com QR Code */
.lp-phone-wrap { display: flex; justify-content: center; }
.lp-phone {
    width: 260px; border-radius: 34px; background: #1A1714;
    padding: 12px; box-shadow: 0 24px 60px rgba(0,0,0,0.35); transform: rotate(2deg);
}
.lp-phone-screen {
    background: linear-gradient(160deg, #F3E6D8 0%, #E3B9CE 55%, #B47FE0 100%);
    border-radius: 24px; padding: 30px 18px 22px; text-align: center; min-height: 420px;
    display: flex; flex-direction: column; align-items: center;
}
.lp-phone-qr {
    width: 172px; height: 172px; background: #fff; border-radius: 18px; padding: 10px;
    box-shadow: 0 8px 22px rgba(0,0,0,0.18); margin-bottom: 18px;
}
.lp-phone-qr img { display: block; width: 100%; height: 100%; }
.lp-phone-name { width: 110px; height: 10px; border-radius: 6px; background: rgba(26,23,20,0.55); margin-bottom: 8px; }
.lp-phone-handle { width: 70px; height: 7px; border-radius: 6px; background: rgba(26,23,20,0.3); margin-bottom: 20px; }
.lp-phone-btn {
    width: 100%; background: rgba(255,255,255,0.85); border-radius: 12px; padding: 12px 14px; margin-bottom: 10px;
    display: flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; color: #1A1714;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.lp-phone-btn span.dot { width: 20px; height: 20px; border-radius: 50%; flex-shrink: 0; background: #9B3FE0; }
.lp-phone-btn.g span.dot { background: linear-gradient(135deg, #F5C542, #D89A1E); }

/* Seções */
.lp-section { padding: 88px 0; }
.lp-section-head { text-align: center; max-width: 600px; margin: 0 auto 52px; }
.lp-section-head .lp-kicker {
    color: var(--color-accent); font-weight: 700; font-size: 13px; text-transform: uppercase;
    letter-spacing: .06em; margin-bottom: 10px; display: block;
}
.lp-section-head h2 { font-size: 32px; margin: 0 0 12px; }
.lp-section-head p { color: var(--color-text-muted); font-size: 15.5px; margin: 0; }

.reveal {
    opacity: 0; transform: translateY(30px) scale(.95);
    transition: opacity .65s cubic-bezier(.34, 1.56, .64, 1), transform .65s cubic-bezier(.34, 1.56, .64, 1);
}
.reveal.is-visible { opacity: 1; transform: translateY(0) scale(1); }
@media (prefers-reduced-motion: reduce) {
    .reveal { transition: none; opacity: 1; transform: none; }
}

.lp-cta-mid .btn, .lp-cta-final .btn, .lp-plan-card .btn {
    transition: transform .25s cubic-bezier(.34, 1.56, .64, 1), box-shadow .25s ease, background-color .15s ease;
}
.lp-cta-mid .btn:hover, .lp-cta-final .btn:hover, .lp-plan-card .btn:hover { transform: translateY(-3px) scale(1.04); }
.lp-cta-mid .btn:active, .lp-cta-final .btn:active, .lp-plan-card .btn:active { transform: scale(.96); }
.lp-why-card, .lp-step, .lp-plan-card, .lp-usecase {
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1), box-shadow .3s ease;
}
.lp-why-card:hover, .lp-step:hover, .lp-usecase:hover { transform: translateY(-4px); box-shadow: 0 10px 28px rgba(26, 23, 20, 0.1); }

/* Como funciona */
.lp-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.lp-step { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 16px; padding: 30px 26px; box-shadow: var(--shadow-card); }
.lp-step-num {
    width: 38px; height: 38px; border-radius: 10px; background: var(--color-accent-soft); color: var(--color-accent);
    display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 16px; margin-bottom: 16px;
}
.lp-step h3 { font-size: 17px; margin: 0 0 8px; }
.lp-step p { color: var(--color-text-muted); font-size: 14.5px; margin: 0; }

/* Faixa de chamada no meio */
.lp-cta-mid { background: var(--color-surface); border-top: 1px solid var(--color-border); border-bottom: 1px solid var(--color-border); }
.lp-cta-mid .wrap { text-align: center; padding: 64px 24px; }
.lp-cta-mid h2 { font-size: 28px; max-width: 620px; margin: 0 auto 10px; }
.lp-cta-mid p { color: var(--color-text-muted); margin: 0 auto 26px; max-width: 560px; }

/* Recursos */
.lp-why-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.lp-why-card { text-align: center; padding: 10px; }
.lp-why-icon {
    width: 56px; height: 56px; border-radius: 16px; background: var(--color-accent-soft); color: var(--color-accent);
    display: flex; align-items: center; justify-content: center; margin: 0 auto 18px;
}
.lp-why-icon svg { width: 24px; height: 24px; }
.lp-why-card h3 { font-size: 17px; margin: 0 0 8px; }
.lp-why-card p { color: var(--color-text-muted); font-size: 14.5px; margin: 0; }

/* Onde usar */
.lp-usecases { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.lp-usecase {
    text-align: center; padding: 26px 16px; background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: 16px; box-shadow: var(--shadow-card);
}
.lp-usecase .lp-why-icon { margin-bottom: 14px; }
.lp-usecase strong { font-size: 14.5px; font-weight: 600; }

/* Planos */
.lp-plans-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; max-width: 860px; margin: 0 auto; }
.lp-plan-card { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 18px; padding: 34px 30px; box-shadow: var(--shadow-card); position: relative; }
.lp-plan-card.is-pro {
    border: 2px solid var(--color-accent);
    box-shadow: var(--shadow-card), 0 0 0 4px rgba(155, 63, 224, 0.10);
    background: linear-gradient(165deg, rgba(155, 63, 224, 0.12), var(--color-surface) 60%);
}
.lp-plan-badge {
    position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
    background: var(--color-accent); color: #fff; font-size: 12px; font-weight: 700;
    letter-spacing: .03em; padding: 6px 16px; border-radius: 999px; white-space: nowrap;
    box-shadow: 0 4px 12px rgba(155, 63, 224, 0.35);
}
.lp-plan-name { font-size: 14px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); font-weight: 700; margin: 0 0 6px; display: flex; align-items: center; gap: 8px; }
.lp-plan-price { font-size: 36px; font-weight: 800; margin-bottom: 2px; line-height: 1.15; }
.lp-plan-price span { font-size: 14px; font-weight: 500; color: var(--color-text-muted); }
.lp-plan-note { font-size: 13px; color: var(--color-text-muted); margin: 0 0 22px; }
.lp-plan-ctas { display: flex; flex-direction: column; gap: 8px; margin-bottom: 24px; }
.lp-plan-ctas .btn { width: 100%; padding: 14px 20px; }
.lp-plan-features { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 12px; }
.lp-plan-features li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.lp-plan-features li.off { color: var(--color-text-muted); }
.lp-plan-features svg { flex-shrink: 0; margin-top: 2px; }
.ic-sim { color: var(--color-accent); display: inline-flex; flex-shrink: 0; }
.ic-nao { color: var(--color-text-muted); opacity: .55; display: inline-flex; flex-shrink: 0; }

.lp-plans-foot { text-align: center; margin-top: 30px; }
.btn-comparar { display: inline-flex; align-items: center; gap: 8px; }
.btn-comparar .seta { transition: transform .25s ease; }
.btn-comparar[aria-expanded="true"] .seta { transform: rotate(180deg); }
.comparar-painel { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .4s ease; max-width: 860px; margin: 0 auto; }
.comparar-painel.aberto { grid-template-rows: 1fr; }
.comparar-interno { overflow: hidden; min-height: 0; }
.tabela-planos-wrap {
    margin-top: 22px; overflow-x: auto; background: var(--color-surface);
    border: 1px solid var(--color-border); border-radius: 16px; box-shadow: var(--shadow-card);
}
.tabela-planos { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 520px; }
.tabela-planos th, .tabela-planos td { padding: 13px 18px; text-align: left; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
.tabela-planos tbody tr:last-child td { border-bottom: none; }
.tabela-planos thead th { background: var(--color-bg); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--color-text-muted); }
.tabela-planos th:last-child, .tabela-planos td:last-child { background: var(--color-accent-soft); }
.tabela-planos thead th:last-child { color: var(--color-accent); }
.tabela-planos td:first-child { font-weight: 600; }
.tabela-planos td .ic-sim, .tabela-planos td .ic-nao { vertical-align: middle; }
.lp-plans-note { text-align: center; color: var(--color-text-muted); font-size: 13.5px; margin: 26px 0 0; }
@media (prefers-reduced-motion: reduce) {
    .comparar-painel, .btn-comparar .seta { transition: none !important; }
}

/* FAQ */
.lp-faq-list { max-width: 720px; margin: 0 auto; display: flex; flex-direction: column; gap: 12px; }
.lp-faq-item { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: 12px; overflow: hidden; }
.lp-faq-item summary {
    cursor: pointer; list-style: none; padding: 18px 22px; font-weight: 600; font-size: 15px;
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
}
.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary .chev { transition: transform .2s ease; flex-shrink: 0; color: var(--color-text-muted); }
.lp-faq-item[open] summary .chev { transform: rotate(180deg); }
.lp-faq-item p { margin: 0; padding: 0 22px 20px; color: var(--color-text-muted); font-size: 14.5px; }

/* CTA final */
.lp-cta-final {
    text-align: center;
    background: linear-gradient(135deg, #F8F6F2 0%, #E8DCC8 30%, #D3A15C 55%, #B4728A 75%, #9B3FE0 100%);
    color: #1A1714; padding: 90px 0;
}
[data-theme="dark"] .lp-cta-final {
    background: linear-gradient(135deg, #0D0A08 0%, #2E1A3D 25%, #5C1FC7 55%, #A0679C 80%, #C39A6E 100%);
    color: #FFFFFF;
}
.lp-cta-final h2 { font-size: 32px; max-width: 520px; margin: 0 auto 12px; }
.lp-cta-final p { max-width: 460px; margin: 0 auto 28px; opacity: .9; }
.lp-cta-final .btn { padding: 16px 30px; font-size: 15.5px; }

/* Rodapé (todas as páginas públicas) */
.lp-footer { padding: 44px 0 30px; border-top: 1px solid var(--color-border); margin-top: 24px; }
.lp-footer .wrap { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; }
.lp-footer-logo .logo-img { height: 30px; }
.lp-footer-links { display: flex; gap: 22px; font-size: 13.5px; flex-wrap: wrap; }
.lp-footer-links a { color: var(--color-text-muted); }
.lp-footer-links a:hover { color: var(--color-accent); text-decoration: none; }
.lp-footer-copy { font-size: 13px; color: var(--color-text-muted); width: 100%; text-align: center; margin: 10px 0 0; }
.lp-body .lp-footer { margin-top: 0; }

@media (max-width: 860px) {
    .lp-nav-links { display: none; }
    .lp-hero .wrap { grid-template-columns: 1fr; text-align: center; }
    .lp-hero h1, .lp-hero p.lp-sub { max-width: 100%; }
    .lp-hero-card { margin-left: auto; margin-right: auto; text-align: left; }
    .lp-microtrust { justify-content: center; }
    .lp-phone-wrap { margin-top: 10px; }
    .lp-steps, .lp-why-grid, .lp-plans-grid { grid-template-columns: 1fr; }
    .lp-usecases { grid-template-columns: repeat(2, 1fr); }
    .lp-section { padding: 60px 0; }
    .lp-hero { padding: 52px 0 60px; }
    .lp-hero h1 { font-size: 34px; }
    .lp-section-head h2 { font-size: 26px; }
}
@media (max-width: 480px) {
    .hide-xs { display: none; }
    .lp-nav .wrap { gap: 8px; }
    .lp-nav-actions { gap: 8px; }
    .lp-nav-logo .logo-img { height: 32px; }
    .lp-nav-actions .btn-sm { padding: 8px 12px; font-size: 13px; }
    .lp-hero h1 { font-size: 29px; }
    .lp-usecases { grid-template-columns: 1fr; }
}


/* --------------------------------------------------------------------------
   Ajustes mobile / responsividade
   -------------------------------------------------------------------------- */
html, body { max-width: 100%; overflow-x: clip; }
img, svg, video { max-width: 100%; }
.lp-why-pro { margin: -2px 0 8px; display: flex; justify-content: center; }

/* Gráfico de barras (painel admin) */
.grafico-barras { display: flex; align-items: stretch; gap: 6px; height: 190px; margin-top: 16px; }
.grafico-col { flex: 1; min-width: 0; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; }
.grafico-barra { width: 100%; background: linear-gradient(180deg, var(--color-accent), var(--color-accent-2)); border-radius: 4px 4px 0 0; min-height: 2px; }
.grafico-col { position: relative; }
.grafico-barra { flex: 0 0 auto; }
.grafico-valor { font-size: 10px; color: var(--color-text-muted); height: 14px; line-height: 14px; }
.grafico-rotulo { font-size: 10px; color: var(--color-text-muted); margin-top: 6px; height: 14px; line-height: 14px; white-space: nowrap; }
.tabela-simples { width: 100%; }
.form-inline { display: flex; gap: 8px; }
.form-inline input { flex: 1; min-width: 0; }
.td-link span { display: block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tabela-responsiva .td-link { max-width: 260px; }

@media (max-width: 700px) {
    /* rótulos alternados: cabem 7 datas em vez de 14 */
    .grafico-barras { gap: 3px; height: 160px; }
    .grafico-col-alt .grafico-rotulo { visibility: hidden; }
    .grafico-rotulo { font-size: 9px; }
    .grafico-valor { font-size: 9px; }

    .card table:not(.tabela-responsiva):not(.tabela-planos) { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .tabela-simples { display: table !important; }
    .tabela-simples th, .tabela-simples td { padding: 8px 6px; font-size: 13px; }

    .tabela-responsiva .td-link { max-width: 100%; }
    .tabela-responsiva .td-link span { max-width: 60vw; }
    .form-inline { flex-direction: column; }
    .form-inline .btn { width: 100%; }

    /* evita zoom automático do iOS ao focar em campos */
    input, select, textarea { font-size: 16px; }
    .btn, .acao-btn { min-height: 44px; }
    .acao-btn { display: inline-flex; align-items: center; justify-content: center; padding-left: 14px; padding-right: 14px; }
    .acao-grupo { flex-wrap: wrap; gap: 8px; }
    .content-title { font-size: 20px; }
    .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
    .stat-box { padding: 14px; }
    .stat-box .valor { font-size: 24px; }
    .modal-conteudo, .modal-box { max-width: calc(100vw - 24px); }
    .lp-cta-final, .lp-cta-mid { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 380px) {
    .stat-grid { grid-template-columns: 1fr; }
    .lp-hero h1 { font-size: 26px; }
}

/* ------------------------------------------------------------------ */
/* Personalização de QR Code — layout com abas (personalizar_qr.php)   */
/* ------------------------------------------------------------------ */
.pz-layout {
    display: flex;
    gap: 24px;
    flex-wrap: wrap;
    align-items: flex-start;
}
.pz-preview-card {
    flex: 0 0 240px;
    text-align: center;
    position: sticky;
    top: 16px;
}
.pz-preview-label {
    font-size: 13px;
    color: var(--color-text-muted);
    margin-top: 0;
}
.pz-preview-frame {
    background: #fff;
    border-radius: 14px;
    padding: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.pz-preview-frame img {
    width: 100%;
    max-width: 200px;
    height: auto;
    display: block;
}
.pz-preview-nota {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 10px 0 0;
}
.pz-form-card {
    flex: 1 1 340px;
    min-width: 300px;
}
.pz-tabs {
    display: flex;
    gap: 4px;
    border-bottom: 1.5px solid var(--color-border);
    margin-bottom: 18px;
    overflow-x: auto;
}
.pz-tab {
    background: none;
    border: none;
    padding: 10px 14px;
    font-size: 14px;
    font-weight: 600;
    color: var(--color-text-muted);
    cursor: pointer;
    border-bottom: 2.5px solid transparent;
    margin-bottom: -1.5px;
    white-space: nowrap;
}
.pz-tab.ativa {
    color: var(--color-text);
    border-bottom-color: var(--color-accent);
}
.pz-painel { padding-top: 2px; }
.pz-grupo-titulo {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-text);
    margin: 18px 0 8px;
}
.pz-grupo-titulo:first-child { margin-top: 0; }
.pz-swatch-grade {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.pz-swatch {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    border-radius: 12px;
    background: var(--color-bg-alt);
    color: var(--color-text-muted);
    cursor: pointer;
    border: 1.5px solid transparent;
    margin: 0;
}
.pz-swatch input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.pz-swatch:has(input:checked) {
    background: var(--color-text);
    color: var(--color-bg);
    border-color: var(--color-accent);
}
.pz-nota {
    font-size: 12px;
    color: var(--color-text-muted);
    margin: 8px 0 0;
}
.pz-cor-linha {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}
.pz-cor-swatch {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    cursor: pointer;
    display: block;
    border: 2px solid transparent;
    margin: 0;
    position: relative;
}
.pz-cor-swatch:has(input:checked) {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 2px var(--color-bg);
    outline: 2px solid var(--color-accent);
}
.pz-cor-swatch input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}
.pz-cor-custom {
    background: conic-gradient(from 180deg, #f00, #ff0, #0f0, #0ff, #00f, #f0f, #f00);
    display: flex;
    align-items: center;
    justify-content: center;
}
.pz-cor-custom input[type="color"] {
    width: 100%;
    height: 100%;
    padding: 0;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    opacity: 0;
    position: absolute;
    inset: 0;
}
.pz-opcoes-linha {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 6px;
}
.pz-opcao {
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 400;
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    margin: 0;
}
.pz-opcao input { width: auto; }
.pz-aviso {
    font-size: 12.5px;
    color: var(--color-warn-text);
    background: var(--color-warn-bg);
    border-radius: 10px;
    padding: 10px 12px;
    margin-top: 20px;
    line-height: 1.5;
}
@media (max-width: 700px) {
    .pz-preview-card { flex: 1 1 100%; position: static; }
    .pz-preview-frame img { max-width: 160px; }
}
