/* 4Brand App — page-specific styles */

/* === botões .btn-4b — sistema ÚNICO de botões do app (#132; completado no #499/#498 F1) ===
   Serve <button> E <a>: min-height 44px (touch target), inline-flex + gap pro ícone (sem margin inline),
   text-decoration none. Variantes: -primary -secondary -ghost -danger -success · tamanho -sm · :disabled · .is-loading */
    /* #548 F1 (Nova Era): pill, 3 níveis — primário DOURADO com texto noite (um por tela), secundário contorno
       azul, ghost só texto; IA = azul com ícone dourado; perigo = contorno. Mesma altura/raio em todos. */
    .btn-4b { padding: 10px 22px; border-radius: var(--radius-pill); font-size: 15px; font-weight: 600; line-height: 1.2; border: 2px solid transparent; cursor: pointer; transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s, color .18s, border-color .18s; font-family: var(--font-body); display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; box-sizing: border-box; text-decoration: none; white-space: nowrap; }
    .btn-4b:hover { text-decoration: none; }
    .btn-4b:active:not(:disabled) { transform: translateY(1px) scale(.99); }
    .btn-4b-primary { background: var(--brand-gold); color: var(--night-900); box-shadow: var(--glow-gold); }
    .btn-4b-primary:hover { background: var(--gold-400); transform: translateY(-1px); color: var(--night-900); box-shadow: 0 12px 32px rgba(212,168,75,.45); }
    .btn-4b-secondary { background: transparent; color: var(--brand-blue); border-color: var(--brand-blue); }
    .btn-4b-secondary:hover { background: var(--brand-blue); color: #fff; }
    .btn-4b-ghost { background: transparent; color: var(--brand-blue); padding-left: 14px; padding-right: 14px; }
    .btn-4b-ghost:hover { background: rgba(45,74,124,.08); }
    .btn-4b-danger { background: transparent; color: var(--err); border-color: currentColor; }
    .btn-4b-danger:hover { background: var(--err); color: #fff; }
    .btn-4b-success { background: var(--brand-green-soft); color: #fff; }
    .btn-4b-success:hover { background: var(--brand-green); }
    /* #505 (F3-L2): botão de IA copiloto ÚNICO — "Preencher/Melhorar com IA 4Brand" (regra da casa em todo campo
       de texto livre). Fica abaixo do campo que ajuda, por isso carrega o margin-top. Estados: :disabled e .is-loading
       vêm do .btn-4b. Nova Era: azul sólido, ícone dourado — a IA é a "energia" do campo. */
    .btn-4b-ai { background: linear-gradient(120deg, var(--brand-blue) 0%, var(--brand-blue-light) 100%); color: #fff; font-size: 14px; font-weight: 600; padding: 8px 16px; margin-top: 8px; }
    .btn-4b-ai:hover:not(:disabled) { box-shadow: 0 8px 24px rgba(45,74,124,.35); transform: translateY(-1px); }
    .btn-4b-ai i { color: var(--brand-gold); }
    .btn-4b-sm { padding: 6px 16px; font-size: 14px; min-height: 40px; }
    @media (pointer: coarse) { .btn-4b-sm { min-height: 44px; } } /* touch: alvo de 44px sempre */
    /* #501: <button disabled> já bloqueia o clique nativamente — sem pointer-events aqui, senão o cursor
       not-allowed some. Só o <a aria-disabled> (que não tem disabled nativo) precisa do pointer-events. */
    .btn-4b:disabled, .btn-4b[aria-disabled="true"] { opacity: .55; cursor: not-allowed; transform: none; }
    .btn-4b[aria-disabled="true"] { pointer-events: none; }
    .btn-4b.is-loading { position: relative; color: transparent !important; pointer-events: none; }
    .btn-4b.is-loading::after { content: ''; position: absolute; inset: 0; margin: auto; width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(45,74,124,.25); border-top-color: var(--brand-blue); animation: btn4b-spin .7s linear infinite; } /* #501: inset+margin auto centraliza de verdade (antes ficava na posição estática) */
    .btn-4b-success.is-loading::after, .btn-4b-ai.is-loading::after { border-color: rgba(255,255,255,.35); border-top-color: #fff; }
    .btn-4b-primary.is-loading::after { border-color: rgba(7,14,29,.25); border-top-color: var(--night-900); } /* spinner escuro sobre o dourado */
    @keyframes btn4b-spin { to { transform: rotate(360deg); } }

/* === brands === */
    .brands-page { max-width: 800px; margin: 0 auto; }
    .brands-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
    .brands-header h1 { font-family: var(--font-title); font-size: 24px; font-weight: 800; color: var(--ink); } /* #552: título de página padrão (24/800/ink) */
    .brands-grid { display: flex; flex-direction: column; gap: 12px; margin-bottom: 32px; }
    .brand-card { display: flex; align-items: center; gap: 16px; padding: var(--card-pad, 20px); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); transition: all 0.2s var(--ease-smooth); } /* #548 F1-4 */
    .brand-card:hover { border-color: var(--blue-300); box-shadow: var(--shadow-night); transform: translateY(-2px); }
    .brand-avatar { width: 48px; height: 48px; border-radius: var(--radius-md); background: linear-gradient(135deg, var(--brand-blue), var(--brand-blue-light)); color: white; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 18px; flex-shrink: 0; }
    .brand-avatar.personal { background: linear-gradient(135deg, var(--brand-gold), var(--brand-gold-light)); }
    .brand-info { flex: 1; min-width: 0; }
    .brand-name { font-family: 'Poppins', 'Poppins Fallback', sans-serif; font-size: 16px; font-weight: 700; color: var(--text-primary); }
    .brand-sector { font-size: 13px; color: var(--text-light); margin-top: 2px; }
    .brand-desc { font-size: 13px; color: var(--text-secondary); margin-top: 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .brand-actions { display: flex; gap: 8px; flex-shrink: 0; }
    .brand-actions button { padding: 8px 16px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 600; border: 2px solid transparent; cursor: pointer; transition: all 0.2s var(--ease-smooth); min-height: 44px; min-width: 44px; } /* #513: no desktop eram 32px de altura (mobile já tinha 44 pelo flex:1); o ícone "Excluir" tinha 39px de largura */
    .brand-edit { color: var(--brand-blue); background: transparent; border-color: var(--brand-blue); } /* #548: secundário (contorno azul) */
    .brand-edit:hover { background: var(--brand-blue); color: #fff; }

    .form-actions { display: flex; gap: 12px; margin-top: 20px; }
    /* #548 F1: mesma linguagem do .btn-4b (pill, dourado primário, contorno azul secundário) */
    .form-btn { padding: 10px 22px; border: 2px solid transparent; border-radius: var(--radius-pill); font-size: 15px; font-weight: 600; cursor: pointer; transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s, color .18s; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; gap: 9px; } /* #513: "Nova marca" era 41px */
    .form-btn-primary { background: var(--brand-gold); color: var(--night-900); box-shadow: var(--glow-gold); }
    .form-btn-primary:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(212,168,75,.45); }
    .form-btn-secondary { background: transparent; color: var(--brand-blue); border-color: var(--brand-blue); }
    .form-btn-secondary:hover { background: var(--brand-blue); color: #fff; }

    .alert { padding: 12px 16px; border-radius: var(--radius-md); font-size: 14px; margin-bottom: 20px; display: none; animation: msgIn 0.3s var(--ease-smooth); }
    .alert.show { display: block; }
    .alert-success { background: rgba(34,197,94,0.1); color: #16a34a; border: 1px solid rgba(34,197,94,0.2); }
    .alert-error { background: rgba(239,68,68,0.1); color: #dc2626; border: 1px solid rgba(239,68,68,0.2); }

    /* #548 F1-4: estado vazio = impacto (azul-noite, display, ícone dourado) — mesma linguagem do .dash-empty */
    .empty-state { text-align: center; padding: 56px 24px; background: var(--night-bg); background-color: #0B1428; /* fallback sólido: se o token --night-bg não chegar (CSS de tokens antigo em cache/PWA, caso Firefox da cliente do Alex 29/09), a superfície continua azul-noite em vez de branco com texto branco */ color: #fff; border: 0; border-radius: var(--radius-xl); position: relative; overflow: hidden; }
    .empty-state > i { display: block; font-size: 36px; color: var(--brand-gold); margin: 0 auto 16px; } /* só o ícone-herói: o seletor antigo (.empty-state i) pegava o ícone DENTRO dos botões — 36px dourado sobre dourado = "sumia" (Isaque 14/09) */
    .empty-state .empty-btn i { font-size: 1em; color: inherit; margin: 0; }
    /* Estado vazio = primeiro passo do usuário: rótulo de etapa + trilha do que vem depois (Isaque 14/09) */
    .empty-eyebrow { display: inline-flex; align-items: center; gap: 8px; font: 600 12px/1 var(--font-body); letter-spacing: .12em; text-transform: uppercase; color: var(--gold-400); padding: 9px 14px; border: 1px solid rgba(232,195,106,.5); border-radius: var(--radius-pill); margin-bottom: 18px; }
    .empty-eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--brand-gold); box-shadow: 0 0 12px var(--brand-gold); }
    .empty-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 760px; margin: 32px auto 0; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.12); text-align: left; }
    .empty-step { display: flex; gap: 12px; align-items: flex-start; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: var(--radius-lg); padding: 14px; }
    .empty-step.now { border-color: rgba(212,168,75,.55); background: rgba(212,168,75,.10); }
    .empty-step-n { width: 30px; height: 30px; border-radius: 50%; flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; font-family: var(--font-display); font-size: 17px; font-weight: 800; background: rgba(255,255,255,.12); color: #fff; }
    .empty-step.now .empty-step-n { background: var(--brand-gold); color: var(--night-900); box-shadow: var(--glow-gold); }
    .empty-step b { display: block; font-size: 14px; font-weight: 700; color: #fff; margin-bottom: 2px; }
    .empty-step span { font-size: 12.5px; color: rgba(255,255,255,.72); line-height: 1.45; }
    @media (max-width: 640px) { .empty-steps { grid-template-columns: 1fr; gap: 8px; margin-top: 24px; } .empty-step { padding: 12px; } }
    .empty-state h3 { font-family: var(--font-display); font-size: clamp(28px, 4vw, 40px); font-weight: 800; text-transform: uppercase; letter-spacing: -0.01em; line-height: 0.95; color: #fff; margin-bottom: 10px; }
    .empty-state p { font-size: 15px; color: rgba(255,255,255,.78); margin-bottom: 24px; max-width: 440px; margin-left: auto; margin-right: auto; }
    .empty-state .empty-btn-secondary { color: #fff; border-color: rgba(255,255,255,.7); }
    .empty-state .empty-btn-secondary:hover { background: #fff; color: var(--brand-blue); }
    .empty-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
    .empty-btn { display: inline-flex; align-items: center; justify-content: center; gap: 9px; padding: 10px 22px; min-height: 44px; border-radius: var(--radius-pill); font-size: 15px; font-weight: 600; text-decoration: none; border: 2px solid transparent; cursor: pointer; transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s, color .18s; }
    .empty-btn-primary { background: var(--brand-gold); color: var(--night-900); box-shadow: var(--glow-gold); }
    .empty-btn-primary:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(212,168,75,.45); }
    .empty-btn-secondary { background: transparent; color: var(--brand-blue); border-color: var(--brand-blue); }
    .empty-btn-secondary:hover { background: var(--brand-blue); color: #fff; }

    @keyframes msgIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

    @media (max-width: 768px) { .brand-card { flex-wrap: wrap; } .brand-actions { width: 100%; } .brand-actions button { flex: 1; } }
    @media (max-width: 480px) { .brands-page { padding: 0; } .brand-form { padding: 20px; } .form-actions { flex-direction: column; } .form-btn { width: 100%; text-align: center; } }

/* === billing === */
    .billing-page { max-width: 640px; margin: 0 auto; }
    .billing-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--card-pad, 20px); margin-bottom: 20px; box-shadow: var(--shadow-night); } /* #548 F1-4 */
    .billing-card h2 { font-family: 'Poppins', 'Poppins Fallback', sans-serif; font-size: 18px; font-weight: 700; margin-bottom: 16px; color: var(--text-primary); }
    .billing-status { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 12px; border-radius: 8px; font-size: 12px; font-weight: 600; letter-spacing: .02em; margin-bottom: 16px; } /* #548 F1-7: badge = retângulo 8px, ponto/ícone + palavra */
    .billing-status.active { background: #E3F5EC; color: var(--ok); }
    .billing-status.free { background: #EEF1F6; color: var(--ink-2); }
    .billing-info { font-size: 14px; color: var(--text-secondary); line-height: 1.7; }
    .billing-info strong { color: var(--text-primary); }
    .billing-actions { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
    .billing-btn { padding: 10px 22px; min-height: 44px; border-radius: var(--radius-pill); font-size: 15px; font-weight: 600; border: 2px solid transparent; cursor: pointer; text-decoration: none; text-align: center; display: inline-flex; align-items: center; justify-content: center; gap: 9px; transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s, color .18s; }
    .billing-btn-primary { background: var(--brand-gold); color: var(--night-900); box-shadow: var(--glow-gold); }
    .billing-btn-primary:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(212,168,75,.45); }
    .billing-btn-secondary { background: transparent; color: var(--brand-blue); border-color: var(--brand-blue); }
    .billing-btn-secondary:hover { background: var(--brand-blue); color: #fff; }

    .plan-card { background: var(--bg-primary); border: 2px solid var(--brand-gold); border-radius: var(--radius-xl); padding: 36px; text-align: center; position: relative; box-shadow: 0 12px 40px rgba(212,168,75,0.12); }
    .plan-badge { position: absolute; top: -12px; left: 50%; transform: translateX(-50%); background: var(--brand-gold); color: white; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; padding: 6px 20px; border-radius: var(--radius-full); }
    .plan-name { font-family: 'Poppins', 'Poppins Fallback', sans-serif; font-size: 20px; font-weight: 700; color: var(--text-primary); margin-top: 8px; }
    .plan-price { font-size: 48px; font-weight: 800; color: var(--brand-blue); margin: 12px 0 4px; }
    .plan-price span { font-size: 18px; font-weight: 600; }
    .plan-period { font-size: 14px; color: var(--text-light); margin-bottom: 24px; }
    .plan-features { list-style: none; padding: 0; text-align: left; margin-bottom: 28px; }
    .plan-features li { display: flex; align-items: center; gap: 10px; padding: 10px 0; font-size: 14px; color: var(--text-secondary); border-bottom: 1px solid var(--border-color); }
    .plan-features li:last-child { border-bottom: none; }
    .plan-features li i { color: var(--brand-gold); font-size: 14px; flex-shrink: 0; }

    .quota-bar { margin-top: 16px; }
    .quota-label { font-size: 13px; color: var(--text-light); margin-bottom: 6px; }
    .quota-track { height: 6px; background: var(--bg-secondary); border-radius: 3px; overflow: hidden; }
    .quota-fill { height: 100%; border-radius: 3px; transition: width 0.3s; }
    .quota-fill.green { background: #34d399; }
    .quota-fill.amber { background: #f59e0b; }
    .quota-fill.red { background: #ef4444; }

    /* #199: grade de uso (usado × disponível por serviço) + histórico de pagamentos */
    .usage-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 8px; }
    @media (max-width: 600px) { .usage-grid { grid-template-columns: 1fr; } }
    .usage-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md, 12px); padding: 14px 16px; }
    .usage-card.locked { opacity: .65; }
    .usage-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; gap: 8px; }
    .usage-label { font-size: 13px; font-weight: 600; color: var(--text-primary); }
    .usage-num { font-size: 12px; color: var(--text-secondary); white-space: nowrap; }
    .pro-pill { display: inline-flex; align-items: center; height: 20px; font-size: 10px; font-weight: 700; background: var(--brand-gold); color: var(--night-900); padding: 0 8px; border-radius: 6px; text-transform: uppercase; letter-spacing: .06em; } /* #548: Pro = dourado sólido */
    .usage-bar { height: 6px; background: var(--border-color); border-radius: 999px; overflow: hidden; }
    .usage-fill { height: 100%; border-radius: 999px; transition: width .4s; }
    .usage-fill.green { background: #34d399; } .usage-fill.amber { background: #f59e0b; } .usage-fill.red { background: #ef4444; }
    .pay-history { list-style: none; padding: 0; margin: 0; }
    .pay-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border-color); font-size: 13px; }
    .pay-row:last-child { border-bottom: none; }
    .pay-date { color: var(--text-secondary); white-space: nowrap; }
    .pay-desc { flex: 1; color: var(--text-primary); }
    .pay-amt { font-weight: 700; color: var(--text-primary); white-space: nowrap; }

    @media (max-width: 480px) { .billing-card { padding: 24px; } .plan-card { padding: 28px 20px; } .plan-price { font-size: 40px; } }

/* === dashboard === */
        /* Notification Dropdown */
        .dash-notif-wrapper {
            position: relative;
        }

        .dash-notif-dropdown {
            display: none;
            position: absolute;
            top: calc(100% + 8px);
            right: 0;
            width: 320px;
            background: var(--bg-primary);
            border: 1px solid var(--border-color);
            border-radius: var(--radius-lg);
            box-shadow: var(--shadow-xl);
            z-index: 200;
            overflow: hidden;
        }

        .dash-notif-dropdown.show {
            display: block;
        }

        .dash-notif-header {
            padding: 16px 20px;
            border-bottom: 1px solid var(--border-color);
            font-size: 14px;
            font-weight: 700;
            color: var(--text-primary);
        }

        .dash-notif-empty {
            padding: 40px 20px;
            text-align: center;
        }

        .dash-notif-empty i {
            font-size: 32px;
            color: var(--border-color);
            margin-bottom: 12px;
        }

        .dash-notif-empty p {
            font-size: 14px;
            color: var(--text-light);
            margin: 0;
        }

        @media (max-width: 480px) {
            .dash-notif-dropdown {
                width: 280px;
                right: -8px;
            }
        }

    /* #364 — sino in-app: badge, lista, itens read/unread (desenho Fabiano) */
    .dash-header-btn { position: relative; }
    .notif-badge { position: absolute; top: -2px; right: -2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #e0245e; color: #fff; font-size: 10px; font-weight: 800; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--bg-primary, #fff); }
    .dash-notif-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
    .notif-readall { background: none; border: none; color: var(--brand-blue); font-size: 12px; font-weight: 600; cursor: pointer; padding: 2px 4px; }
    .notif-list { list-style: none; margin: 0; padding: 0; max-height: 60vh; overflow-y: auto; }
    .notif-item { display: flex; gap: 10px; align-items: flex-start; padding: 12px 16px; border-bottom: 1px solid var(--border-color); text-decoration: none; color: inherit; transition: background .12s; }
    .notif-item:hover { background: rgba(45,74,124,.04); }
    .notif-item.unread { background: rgba(45,74,124,.06); }
    .notif-item.unread::before { content: ''; position: absolute; left: 6px; width: 7px; height: 7px; border-radius: 50%; background: var(--brand-blue); margin-top: 5px; }
    .notif-item.unread { padding-left: 22px; position: relative; }
    .ni-ic { font-size: 18px; flex: none; line-height: 1.2; }
    .ni-body { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
    .ni-body b { font-size: 13.5px; color: var(--text-primary); font-weight: 700; }
    .ni-txt { font-size: 12.5px; color: var(--text-secondary); line-height: 1.4; }
    .ni-when { font-size: 11px; color: var(--text-light); margin-top: 2px; }
    @media (max-width: 560px) {
        .dash-notif-dropdown { position: fixed; top: 60px; left: 8px; right: 8px; width: auto; max-height: 70vh; }
        .notif-item { min-height: 44px; }
    }

/* === login === */
    /* Tema canônico das telas de auth (escuro/gradiente) — antes duplicado inline em
       login/register/forgot/reset (#132). Register sobrescreve .auth-btn p/ dourado inline. */
    .auth-page { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 20px; background: var(--night-bg); background-color: #0B1428; /* fallback sólido: se o token --night-bg não chegar (CSS de tokens antigo em cache/PWA, caso Firefox da cliente do Alex 29/09), a superfície continua azul-noite em vez de branco com texto branco */ } /* #552: azul-noite com luz, igual ao hero da home */
    /* sprint 21/10: com o aviso de cookies aberto o body ganha padding-bottom; sem isto a faixa abaixo do cartão ficava cinza (#F5F5F5) no login, cadastro e senha */
    .auth-page { flex-direction: column; gap: 12px; } /* #912: seletor de idioma acima do cartão; com um filho só, a centralização é a mesma de antes */
    .auth-lang { width: 100%; max-width: 400px; display: flex; justify-content: flex-end; min-height: 44px; } /* altura reservada no HTML do servidor: sem layout shift */
    body:has(> .auth-page) { background-color: var(--night-900, #0B1428); }
    .auth-card { width: 100%; max-width: 400px; background: #fff; border-radius: 20px; padding: 36px 28px; box-shadow: 0 16px 48px rgba(0,0,0,.15); }
    .auth-logo { text-align: center; margin-bottom: 20px; }
    .auth-logo img { height: 30px; }
    .auth-title { font-family: 'Poppins', 'Poppins Fallback', sans-serif; font-size: 20px; font-weight: 700; color: var(--text-primary); text-align: center; margin-bottom: 4px; }
    .auth-subtitle { text-align: center; color: var(--text-light); font-size: 13px; margin-bottom: 24px; line-height: 1.5; }
    .auth-field { margin-bottom: 14px; }
    .auth-field label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 6px; }
    .auth-field input { width: 100%; min-height: 48px; padding: 12px 16px; border: 1.5px solid var(--line); border-radius: var(--radius-md); font-size: 16px; font-family: var(--font-body); color: var(--ink); background: var(--paper); outline: none; transition: border-color .15s, box-shadow .15s; box-sizing: border-box; } /* #548 F1-3 */
    .auth-field input:hover { border-color: var(--blue-300); }
    .auth-field input:focus { border-color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(45,74,124,.14); }
    .auth-field input::placeholder { color: var(--ink-3); }
    /* Olho de ver senha (login/registro/reset) — shared/js/auth_password.js */
    .auth-pass { position: relative; }
    .auth-pass input { padding-right: 50px; }
    /* #512 (L4): olho com 44×44 (era 34 — abaixo do alvo mínimo de toque); o input reserva 50px à direita */
    .auth-eye { position: absolute; top: 50%; right: 3px; transform: translateY(-50%); width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; background: none; border: none; border-radius: 8px; color: var(--text-light, #9aa4b2); cursor: pointer; font-size: 15px; padding: 0; }
    .auth-eye:hover, .auth-eye:focus-visible { color: var(--brand-blue); }
    /* #548 F1: primário dourado (a "luz" da tela de entrada), pill, Poppins mantido */
    .auth-btn { width: 100%; padding: 13px 20px; min-height: 48px; border: 2px solid transparent; border-radius: var(--radius-pill); background: var(--brand-gold); color: var(--night-900); font-family: 'Poppins', 'Poppins Fallback', sans-serif; font-size: 15px; font-weight: 700; cursor: pointer; transition: transform .18s var(--ease-out), box-shadow .18s var(--ease-out), background .18s; margin-top: 4px; box-shadow: var(--glow-gold); }
    .auth-btn:hover { background: var(--gold-400); transform: translateY(-1px); box-shadow: 0 12px 32px rgba(212,168,75,.45); }
    .auth-btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }
    .auth-forgot { text-align: right; margin: -8px 0 16px; font-size: 12px; }
    .auth-forgot a { color: var(--brand-blue); text-decoration: none; font-weight: 500; display: inline-block; padding: 8px 0 8px 16px; margin: -8px 0; } /* sprint 21/10: toque de 31 px sem mexer no layout (não chega no campo de senha) */
    .auth-forgot a:hover { text-decoration: underline; }
    .auth-divider { text-align: center; color: var(--text-light); font-size: 12px; margin: 16px 0; position: relative; }
    .auth-divider::before, .auth-divider::after { content: ''; position: absolute; top: 50%; width: calc(50% - 16px); height: 1px; background: var(--border-color); }
    .auth-divider::before { left: 0; }
    .auth-divider::after { right: 0; }
    .auth-magic { display: flex; align-items: center; justify-content: center; gap: 9px; width: 100%; padding: 11px 20px; min-height: 48px; border: 2px solid var(--brand-blue); border-radius: var(--radius-pill); font-size: 14px; font-weight: 600; color: var(--brand-blue); text-decoration: none; transition: all .18s; background: transparent; } /* #548: secundário */
    .auth-magic:hover { background: var(--brand-blue); color: #fff; }
    /* #512 (L4): bloco duplicado de .auth-switch removido (o segundo já vencia: 24px/14px, card 32/24) */
    .auth-switch { text-align: center; margin-top: 24px; font-size: 14px; color: var(--text-light); }
    .auth-switch a { color: var(--brand-blue); font-weight: 600; text-decoration: none; }
    .auth-switch a:hover { text-decoration: underline; }
    /* #512 (L4): links em texto corrido (Entrar / Termos / Privacidade) com alvo de 44px sem mudar o
       visual — padding vertical compensado por margem negativa, não altera a altura da linha. */
    .auth-switch a, .auth-legal a { display: inline-block; padding: 13px 4px; margin: -13px -4px; }
    @media (max-width: 480px) { .auth-card { padding: 32px 24px; border-radius: 16px; } .auth-title { font-size: 20px; } }

    /* ===== Indique e ganhe / Afiliados (#80) ===== */
    .aff-wrap { max-width: var(--app-max-md, 1100px); margin: 0 auto; } /* #552: era 720px (ilha no meio do monitor); página de leitura usa a largura média */
    .aff-hero { background: linear-gradient(135deg, var(--brand-blue), #3a5a94); color: #fff; border-radius: var(--radius-lg, 18px); padding: 28px 24px; text-align: center; box-shadow: 0 10px 30px rgba(45,74,124,.28); }
    .aff-hero h2 { font-family: 'Poppins', 'Poppins Fallback', sans-serif; font-size: 22px; font-weight: 800; margin-bottom: 6px; } /* #514: era h1 (2º h1 da página) */
    .aff-hero p { font-size: 14px; opacity: .92; margin-bottom: 20px; line-height: 1.5; }
    /* #226 — frase-âncora de posicionamento (parceria) */
    .aff-hero .aff-anchor { font-size: 13.5px; font-style: italic; opacity: .92; margin: -2px 0 14px; line-height: 1.5; }
    .aff-hero .aff-anchor strong { color: var(--brand-gold, #D4A84B); font-style: normal; }
    .aff-linkbox { display: flex; gap: 8px; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.25); border-radius: var(--radius-md, 12px); padding: 8px 8px 8px 14px; align-items: center; }
    .aff-linkbox input { flex: 1; background: transparent; border: none; color: #fff; font-size: 14px; font-weight: 600; outline: none; min-width: 0; min-height: 44px; } /* #513: toque pra selecionar o link */
    .aff-linkbox input::selection { background: rgba(255,255,255,.3); }
    .aff-copy { background: var(--brand-gold); color: var(--night-900); border: none; border-radius: var(--radius-pill); padding: 10px 18px; font-weight: 700; font-size: 14px; cursor: pointer; white-space: nowrap; transition: transform .12s, background .18s; min-height: 44px; } /* #513: alvo 44px · #548: primário dourado */
    .aff-copy:hover { transform: translateY(-1px); background: var(--gold-400); }
    .aff-code { font-size: 13px; opacity: .9; margin-top: 12px; }
    .aff-code strong { background: rgba(255,255,255,.18); padding: 3px 10px; border-radius: 8px; letter-spacing: 1px; }
    /* #195: compartilhamento — botão nativo (Web Share) + canais na ordem BR + QR ancorado */
    .aff-share-native { display: inline-flex; align-items: center; gap: 9px; margin-top: 16px; padding: 12px 28px; min-height: 44px; border: 2px solid rgba(255,255,255,.75); border-radius: var(--radius-pill); background: transparent; color: #fff; font-family: 'Inter', 'Inter Fallback', sans-serif; font-weight: 700; font-size: 14px; cursor: pointer; transition: transform .12s, background .18s, color .18s; } /* #548: secundário sobre escuro */
    .aff-share-native:hover { background: #fff; color: var(--brand-blue); }
    .aff-share-native:hover { transform: translateY(-2px); }
    .aff-channels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: 16px; }
    @media (max-width: 560px) { .aff-channels { grid-template-columns: repeat(3, 1fr); } }
    .aff-ch { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px; padding: 10px 4px; border: none; border-radius: 12px; text-decoration: none; color: #fff; font-family: 'Inter', 'Inter Fallback', sans-serif; font-weight: 600; font-size: 11px; cursor: pointer; transition: transform .12s; }
    .aff-ch:hover { transform: translateY(-2px); }
    .aff-ch i { font-size: 20px; }
    .aff-ch span { line-height: 1; }
    .aff-ch.wa { background: #25D366; color: var(--night-900); } /* #554: branco no verde WhatsApp dava 2:1 */
    .aff-ch.ig { background: linear-gradient(45deg, #f09433, #e6683c 30%, #dc2743 50%, #cc2366 75%, #bc1888); }
    .aff-ch.fb { background: #1565C0; } /* #554: era #1877F2 (4.2:1 com texto branco 11px); 5.6:1 */
    .aff-ch.tt { background: #010101; }
    .aff-ch.x  { background: #111; }
    .aff-ch.mail { background: rgba(255,255,255,.20); border: 1px solid rgba(255,255,255,.32); }
    /* QR num card próprio, ancorado (não mais solto) */
    .aff-qr-card { display: flex; align-items: center; gap: 14px; margin-top: 18px; background: #fff; padding: 14px 16px; border-radius: 14px; text-align: left; }
    .aff-qr-card img { display: block; width: 96px; height: 96px; flex-shrink: 0; }
    .aff-qr-txt { display: flex; flex-direction: column; gap: 3px; }
    .aff-qr-txt strong { font-size: 14px; color: var(--text-primary, #3D3D3D); font-family: 'Poppins', 'Poppins Fallback', sans-serif; }
    .aff-qr-txt span { font-size: 12px; color: var(--text-secondary, #6b7280); line-height: 1.35; }
    /* #122: FAQ (accordion nativo <details>) */
    .aff-faq { display: flex; flex-direction: column; gap: 8px; }
    .aff-faq details { background: #fff; border: 1px solid var(--border-color); border-radius: 12px; overflow: hidden; }
    .aff-faq summary { padding: 14px 16px; font-weight: 600; font-size: 14px; color: var(--text-primary); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
    .aff-faq summary::-webkit-details-marker { display: none; }
    .aff-faq summary::after { content: "+"; font-size: 18px; color: var(--text-light); line-height: 1; }
    .aff-faq details[open] summary::after { content: "\2212"; }
    .aff-faq details p { padding: 0 16px 14px; font-size: 13px; color: var(--text-secondary); line-height: 1.55; margin: 0; }

    /* #102: player de áudio custom (narração e futuros conteúdos de áudio) */
    .audio-player { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border-color); border-radius: 14px; padding: 10px 14px; margin-bottom: 12px; }
    .audio-player .ap-audio { display: none; }
    .ap-play { flex-shrink: 0; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--brand-blue); color: #fff; font-size: 15px; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: transform .12s; }
    .ap-play:hover { transform: scale(1.05); }
    .ap-play:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 2px; }
    .ap-main { flex: 1; min-width: 0; }
    .ap-seek { width: 100%; -webkit-appearance: none; appearance: none; height: 5px; border-radius: 3px; background: #e6e9ef; outline: none; cursor: pointer; }
    .ap-seek::-webkit-slider-thumb { -webkit-appearance: none; width: 14px; height: 14px; border-radius: 50%; background: var(--brand-blue); cursor: pointer; }
    .ap-seek::-moz-range-thumb { width: 14px; height: 14px; border: none; border-radius: 50%; background: var(--brand-blue); cursor: pointer; }
    .ap-seek:focus-visible { outline: 2px solid var(--brand-blue); outline-offset: 3px; }
    .ap-time { display: flex; justify-content: space-between; font-size: 11px; color: var(--text-secondary); margin-top: 5px; }
    .ap-dl { flex-shrink: 0; width: 44px; height: 44px; border-radius: 10px; background: #F5F5F5; color: var(--brand-blue); display: flex; align-items: center; justify-content: center; text-decoration: none; font-size: 14px; }
    .ap-dl:hover { background: #e9edf3; }
    .aff-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 24px 0; }
    @media (max-width: 620px) { .aff-steps { grid-template-columns: 1fr; } }
    .aff-step { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--card-pad, 20px); text-align: center; }
    .aff-step .n { width: 36px; height: 36px; border-radius: 50%; background: var(--brand-gold); color: var(--night-900); font-family: var(--font-display); font-size: 20px; font-weight: 800; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; } /* #548: número em display dourado */
    .aff-step p { font-size: 13px; color: var(--text-secondary); line-height: 1.45; }
    .aff-section-title { font-family: 'Poppins', 'Poppins Fallback', sans-serif; font-size: 16px; font-weight: 700; color: var(--text-primary); margin: 24px 0 12px; }
    .aff-invited { display: flex; flex-direction: column; gap: 10px; }
    .aff-invitee { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md, 12px); padding: 12px 16px; }
    .aff-invitee .ini { width: 40px; height: 40px; border-radius: 50%; background: var(--brand-blue); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex-shrink: 0; }
    .aff-invitee .meta { flex: 1; min-width: 0; }
    .aff-invitee .nm { font-weight: 600; color: var(--text-primary); font-size: 14px; }
    .aff-invitee .dt { font-size: 12px; color: var(--text-light); }
    /* Hint de valor da indicação no cadastro (#83) */
    .aff-badge { display: inline-flex; align-items: center; gap: 6px; height: 24px; font-size: 11px; font-weight: 700; padding: 0 9px; border-radius: 7px; white-space: nowrap; letter-spacing: .02em; } /* #548 F1-7 */
    .aff-badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
    .aff-badge.on { background: #E3F5EC; color: var(--ok); }
    .aff-badge.off { background: #EEF1F6; color: var(--ink-2); }
    .aff-badge.trial { background: #FBEFD9; color: var(--brand-gold-ink); } /* teste grátis: não é venda */
    .aff-soon { background: var(--bg-primary); border: 1px dashed var(--border-color); border-radius: var(--radius-md, 12px); padding: 18px; font-size: 13px; color: var(--text-secondary); display: flex; align-items: center; gap: 10px; }
    .aff-soon i { color: var(--brand-gold); font-size: 18px; }
    .aff-soon-empty { border-style: dashed; }
    /* #80: carteira + extrato de comissões (dados internos) */
    .aff-balance { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
    .aff-balance.two { grid-template-columns: repeat(2, 1fr); } /* aprovação instantânea: sem card "Pendente" quando 0 */
    .aff-bal-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px 12px; text-align: center; }
    .aff-bal-card .lbl { display: block; font-size: 11px; color: var(--ink-3); font-weight: 600; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 4px; }
    .aff-bal-card strong { font-family: var(--font-display); font-size: 28px; font-weight: 800; color: var(--ink); line-height: 1; } /* #548: número em display */
    .aff-bal-card.total { background: var(--night-800); border-color: var(--night-800); }
    .aff-bal-card.total .lbl { color: var(--gold-400); }
    .aff-bal-card.total strong { color: #fff; }
    .aff-bal-card.pending strong { color: #b26a00; }
    .aff-commissions { display: flex; flex-direction: column; gap: 8px; }
    .aff-comm-row { display: flex; align-items: center; gap: 12px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-md, 12px); padding: 12px 16px; }
    .aff-comm-row .meta { flex: 1; min-width: 0; }
    .aff-comm-row .nm { font-weight: 600; color: var(--text-primary); font-size: 14px; }
    .aff-comm-row .dt { font-size: 12px; color: var(--text-light); }
    .aff-comm-row .amt { font-family: 'Poppins', 'Poppins Fallback', sans-serif; font-weight: 700; color: #2e7d32; white-space: nowrap; }
    .aff-badge.st-pending { background: #FBEFD9; color: var(--warn); }
    .aff-badge.st-approved { background: #E6EDF8; color: var(--brand-blue); }
    .aff-badge.st-paid { background: #E3F5EC; color: var(--ok); }
    /* #169: saque via Pix */
    .aff-badge.st-requested { background: #FBEFD9; color: var(--warn); }
    .aff-badge.st-processing { background: #E6EDF8; color: var(--brand-blue); }
    .aff-badge.st-failed { background: #FCE8E6; color: var(--err); }
    .aff-badge.st-open { background: #EEF1F6; color: var(--ink-2); } /* #294: ajuste/clawback em aberto */
    .aff-badge.st-reversed { background: #FCE8E6; color: var(--err); } /* #294: estorno */
    .aff-payout { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: var(--card-pad, 20px); box-shadow: var(--shadow-night); }
    .aff-payout-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
    .aff-payout-top .lbl { display: block; font-size: 11px; color: var(--text-light); font-weight: 600; text-transform: uppercase; letter-spacing: .3px; }
    .aff-payout-bal { font-family: var(--font-display); font-size: 34px; font-weight: 800; line-height: 1; color: var(--brand-blue); } /* #548: saldo em display */
    .aff-payout-btn { padding: 10px 22px; min-height: 44px; border: 2px solid transparent; border-radius: var(--radius-pill); background: var(--brand-gold); color: var(--night-900); font-size: 15px; font-weight: 700; cursor: pointer; white-space: nowrap; transition: all .18s; box-shadow: var(--glow-gold); } /* #548: primário dourado */
    .aff-payout-btn:hover:not(:disabled) { transform: translateY(-1px); background: var(--gold-400); box-shadow: 0 12px 32px rgba(212,168,75,.45); }
    .aff-payout-btn:disabled { opacity: .45; cursor: not-allowed; }
    .aff-payout-hint { margin-top: 10px; font-size: 12px; color: var(--text-secondary); display: flex; align-items: center; gap: 6px; }
    .aff-payout-hint i { color: var(--brand-gold); }
    .aff-auto-note { margin-top: 12px; padding: 12px 14px; background: rgba(45,74,124,.06); border: 1px solid rgba(45,74,124,.15); border-radius: 12px; font-size: 12.5px; line-height: 1.5; color: var(--text-secondary); display: flex; gap: 10px; align-items: flex-start; }
    .aff-auto-note i { color: var(--brand-blue); font-size: 16px; margin-top: 1px; flex-shrink: 0; }
    .aff-auto-note strong { color: var(--text-primary); }
    .aff-pix { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border-color); }
    .aff-pix label { display: block; font-size: 14px; font-weight: 600; color: var(--ink); margin-bottom: 8px; }
    .aff-pix-row { display: flex; gap: 8px; flex-wrap: wrap; }
    .aff-pix-row select { padding: 10px 40px 10px 14px; min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--radius-md); font-size: 15px; background: var(--paper); color: var(--ink); appearance: none; -webkit-appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' fill='none' stroke='%232D4A7C' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 8 5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; } /* #548 F1-3 */
    .aff-pix-row input { flex: 1; min-width: 160px; padding: 10px 14px; min-height: 48px; border: 1.5px solid var(--line); border-radius: var(--radius-md); font-size: 15px; color: var(--ink); background: var(--paper); }
    .aff-pix-row input:hover, .aff-pix-row select:hover { border-color: var(--blue-300); }
    .aff-pix-row input:focus, .aff-pix-row select:focus { outline: none; border-color: var(--brand-blue); box-shadow: 0 0 0 4px rgba(45,74,124,.14); }
    .aff-pix-save { padding: 10px 20px; min-height: 44px; border: 2px solid var(--brand-blue); border-radius: var(--radius-pill); background: transparent; color: var(--brand-blue); font-size: 14px; font-weight: 700; cursor: pointer; transition: background .18s, color .18s; } /* #548: secundário */
    .aff-pix-save:hover { background: var(--brand-blue); color: #fff; }
    @media (max-width: 480px) { .aff-payout-btn { width: 100%; } .aff-pix-row input { min-width: 100%; } .aff-pix-save { width: 100%; } }
    @media (max-width: 480px) { .aff-bal-card strong { font-size: 14px; } .aff-bal-card { padding: 12px 8px; } }

    /* Marca incompleta — o que falta (#114) */
    .brand-missing { font-size: 12px; color: var(--warn); background: #FBEFD9; border-radius: 8px; padding: 5px 10px; margin-top: 6px; display: inline-flex; align-items: center; gap: 6px; flex-wrap: wrap; } /* #548 F1-7 */
    .brand-missing a { color: var(--brand-blue); font-weight: 700; text-decoration: none; cursor: pointer; }
    .brand-missing a:hover { text-decoration: underline; }
    /* #152: barra de completude da marca */
    .brand-progress { height: 6px; background: var(--border-color); border-radius: 999px; overflow: hidden; margin: 8px 0 4px; }
    .brand-progress-fill { height: 100%; background: linear-gradient(90deg, var(--brand-blue), #3D5A8C); border-radius: 999px; transition: width .4s ease; }
    .brand-progress.complete .brand-progress-fill { background: linear-gradient(90deg, #4caf50, #43a047); }
    .brand-progress-label { font-size: 11px; color: var(--text-light); font-weight: 600; }

    /* Seletor de estilo da imagem + nudge de engajamento (#115) */
    .style-chips { display: flex; flex-wrap: wrap; gap: 7px; }
    /* #548 F1-7: chip = pill 44px, borda fria, ativo azul sólido (manifesto) */
    .style-chip { display: inline-flex; align-items: center; gap: 7px; min-height: 44px; background: var(--paper); border: 1.5px solid var(--line); color: var(--ink-2); font-size: 14px; font-weight: 600; font-family: inherit; line-height: 1.2; -webkit-appearance: none; appearance: none; padding: 8px 16px; border-radius: var(--radius-pill); cursor: pointer; transition: all .15s; user-select: none; }
    .style-chip:hover { border-color: var(--blue-300); color: var(--brand-blue); }
    .style-chip.active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
    .post-nudge { margin-top: 12px; font-size: 12px; color: var(--text-secondary); background: rgba(212,168,75,.08); border: 1px solid rgba(212,168,75,.2); border-radius: 10px; padding: 10px 14px; display: flex; align-items: flex-start; gap: 8px; line-height: 1.45; text-align: left; }
    .post-nudge i { color: var(--brand-gold); margin-top: 2px; }

    /* Imagens de referência do Bônus (#115 p2) */
    .ref-drop { display: inline-flex; align-items: center; gap: 9px; padding: 10px 18px; min-height: 44px; border: 2px dashed var(--blue-300); border-radius: var(--radius-pill); color: var(--brand-blue); font-weight: 600; font-size: 14px; cursor: pointer; transition: border-color .15s, background .15s; } /* #548 F1-3: área de anexo = terciário tracejado */
    .ref-drop:hover { border-color: var(--brand-blue); background: rgba(45,74,124,.06); }
    .paste-hint { font-weight: 500; font-size: 12.5px; color: var(--gray-600, #5b6475); } /* #1025 Ctrl+V; some na tela de toque */
    .paste-hint--block { display: block; margin-top: 8px; }
    @media (hover: none) and (pointer: coarse) { .paste-hint { display: none; } }
    .ref-thumbs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
    .ref-thumb { position: relative; width: 64px; height: 64px; border-radius: 10px; overflow: hidden; border: 1px solid var(--border-color); }
    .ref-thumb img { width: 100%; height: 100%; object-fit: cover; }
    .ref-thumb button { position: absolute; top: 2px; right: 2px; width: 20px; height: 20px; border: none; border-radius: 50%; background: rgba(0,0,0,.6); color: #fff; font-size: 14px; line-height: 1; cursor: pointer; display: flex; align-items: center; justify-content: center; }

/* Tema dos modais SweetAlert2: shared/css/4brand_swal.css (carregado pelo head.php depois do vendor). */
