/* ══════════════════════════════════════════════════════════════════════════
   billing.css — assinatura, trial, planos, checkout, "Meu Plano", avisos de
   limite e os avisos globais do header (banner de trial, atalho de admin).
   Usa SÓ os tokens do design-system.css (--surface, --text-*, --border-*),
   então dark e light saem do mesmo código; os ajustes de light no fim são
   só o que token não resolve (gradientes e sombras).
   ══════════════════════════════════════════════════════════════════════════ */

.afy-billing { max-width: 1180px; margin: 0 auto; }
.afy-billing *, .afy-billing *::before, .afy-billing *::after { box-sizing: border-box; }

/* ── Cabeçalho das páginas de billing ──────────────────────────────────── */
.afy-page-title { display:flex; flex-direction:column; gap:6px; margin-bottom:22px; }
.afy-page-title h1 {
    margin:0; font-size:clamp(24px, 4.6vw, 30px); font-weight:800; letter-spacing:-0.6px;
    color:var(--text-primary);
}
.afy-page-title h1 em { font-style:normal; color:var(--accent-red); }
.afy-page-title p { margin:0; color:var(--text-secondary); font-size:14px; line-height:1.55; max-width:640px; }

/* ── Faixa de estado atual ─────────────────────────────────────────────── */
.afy-status-strip {
    display:flex; align-items:center; gap:14px; flex-wrap:wrap;
    padding:14px 18px; margin-bottom:26px; border-radius:var(--radius-lg, 16px);
    background:var(--surface); border:1px solid var(--border-subtle); box-shadow:var(--shadow-sm);
}
.afy-status-strip .afy-status-ico {
    width:38px; height:38px; flex-shrink:0; border-radius:11px; display:flex; align-items:center; justify-content:center;
    background:rgba(239,68,68,.10); color:var(--accent-red); border:1px solid rgba(239,68,68,.22);
}
.afy-status-strip .afy-status-ico svg { width:18px; height:18px; }
.afy-status-strip .afy-status-copy { flex:1 1 220px; min-width:0; }
.afy-status-strip strong { display:block; color:var(--text-primary); font-size:14.5px; }
.afy-status-strip span { color:var(--text-secondary); font-size:13px; line-height:1.5; }
.afy-status-strip.is-ok .afy-status-ico { background:rgba(16,185,129,.10); color:#10b981; border-color:rgba(16,185,129,.25); }
.afy-status-strip.is-warn .afy-status-ico { background:rgba(245,158,11,.10); color:#f59e0b; border-color:rgba(245,158,11,.25); }

/* ── Pílulas de estado ─────────────────────────────────────────────────── */
.afy-pill {
    display:inline-flex; align-items:center; gap:6px; padding:3px 10px; border-radius:999px;
    font-size:11.5px; font-weight:700; letter-spacing:.2px; white-space:nowrap;
    background:rgba(148,163,184,.12); color:var(--text-secondary); border:1px solid rgba(148,163,184,.25);
}
.afy-pill::before { content:''; width:6px; height:6px; border-radius:50%; background:currentColor; opacity:.9; }
.afy-pill.ok    { background:rgba(16,185,129,.12); color:#10b981; border-color:rgba(16,185,129,.30); }
.afy-pill.warn  { background:rgba(245,158,11,.12); color:#f59e0b; border-color:rgba(245,158,11,.30); }
.afy-pill.bad   { background:rgba(239,68,68,.12);  color:#ef4444; border-color:rgba(239,68,68,.30); }
.afy-pill.info  { background:rgba(99,102,241,.12); color:#818cf8; border-color:rgba(99,102,241,.30); }

/* ── Grade de planos ───────────────────────────────────────────────────── */
.afy-plans-grid {
    display:grid; gap:18px; align-items:stretch;
    grid-template-columns:repeat(auto-fit, minmax(min(270px, 100%), 1fr));
    margin-bottom:28px;
}
.afy-plan {
    position:relative; display:flex; flex-direction:column; gap:18px;
    padding:26px 22px 22px; border-radius:var(--radius-xl, 20px);
    background:var(--surface); border:1px solid var(--border-subtle); box-shadow:var(--shadow-card);
    transition:border-color var(--transition-normal, .2s), box-shadow var(--transition-normal, .2s), transform var(--transition-normal, .2s);
    min-width:0;
}
.afy-plan:hover { border-color:var(--border-hover); }
.afy-plan.is-highlight {
    border-color:rgba(239,68,68,.45);
    background:
        radial-gradient(120% 60% at 50% -10%, rgba(239,68,68,.10), transparent 60%),
        var(--surface);
    box-shadow:var(--shadow-card), 0 0 0 1px rgba(239,68,68,.12), 0 18px 48px -20px rgba(239,68,68,.35);
}
.afy-plan.is-current { border-color:rgba(16,185,129,.45); }
.afy-plan-badge {
    position:absolute; top:-12px; left:50%; transform:translateX(-50%);
    padding:5px 12px; border-radius:999px; font-size:11.5px; font-weight:800; letter-spacing:.3px; white-space:nowrap;
    background:var(--btn-primario); color:#fff; box-shadow:0 6px 18px rgba(185,28,28,.35);
}
.afy-plan-badge.is-current { background:linear-gradient(180deg,#10b981,#059669); box-shadow:0 6px 18px rgba(16,185,129,.30); }
.afy-plan-head h2 { margin:0 0 4px; font-size:18px; font-weight:800; color:var(--text-primary); letter-spacing:-.2px; }
.afy-plan-head p { margin:0; color:var(--text-secondary); font-size:13px; line-height:1.5; min-height:1.5em; }
.afy-price { display:flex; align-items:baseline; gap:6px; flex-wrap:wrap; }
.afy-price strong { font-size:clamp(30px, 6vw, 36px); font-weight:800; letter-spacing:-1px; color:var(--text-primary); line-height:1; white-space:nowrap; }
.afy-price span { color:var(--text-secondary); font-size:14px; font-weight:600; }
.afy-plan-limits { display:grid; grid-template-columns:1fr 1fr; gap:10px; }
.afy-limit-box {
    padding:11px 12px; border-radius:12px; min-width:0;
    background:var(--surface-subtle, rgba(255,255,255,.025)); border:1px solid var(--border-subtle);
}
.afy-limit-box small { display:flex; align-items:center; gap:6px; color:var(--text-secondary); font-size:11.5px; font-weight:600; }
.afy-limit-box small svg { width:13px; height:13px; flex-shrink:0; }
.afy-limit-box b { display:block; margin-top:4px; font-size:17px; color:var(--text-primary); font-weight:800; }
.afy-limit-box b em { font-style:normal; font-size:12px; font-weight:600; color:var(--text-secondary); margin-left:3px; }
.afy-features { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:9px; flex:1; }
.afy-features li { display:flex; align-items:flex-start; gap:9px; font-size:13.5px; color:var(--text-primary); line-height:1.4; }
.afy-features li svg { width:16px; height:16px; flex-shrink:0; margin-top:1px; }
.afy-features li.on svg { color:#10b981; }
.afy-features li.off { color:var(--text-muted); }
.afy-features li.off svg { color:var(--text-muted); opacity:.7; }
.afy-plan-cta { display:flex; flex-direction:column; gap:8px; }

/* Botões próprios (mesma linguagem do .btn-ig, sem depender do !important dele) */
.afy-btn {
    display:inline-flex; align-items:center; justify-content:center; gap:8px;
    min-height:44px; padding:11px 18px; border-radius:var(--radius-md, 12px);
    font-size:14px; font-weight:700; text-decoration:none; cursor:pointer; white-space:nowrap;
    border:1px solid transparent; transition:filter .16s, transform .16s, box-shadow .16s, background .16s, border-color .16s;
    font-family:inherit; line-height:1.1;
}
.afy-btn svg { width:16px; height:16px; flex-shrink:0; }
.afy-btn-primary { background:var(--btn-primario); color:#fff; border-color:var(--btn-primario-borda, rgba(239,68,68,.35)); box-shadow:var(--btn-primario-shadow, 0 4px 18px rgba(185,28,28,.35)); }
.afy-btn-primary:hover { filter:brightness(1.08); transform:translateY(-1px); }
.afy-btn-ghost { background:var(--surface-subtle, rgba(255,255,255,.04)); color:var(--text-primary); border-color:var(--border-subtle); }
.afy-btn-ghost:hover { border-color:var(--border-hover); background:var(--surface-hover); }
.afy-btn-block { width:100%; }
.afy-btn[disabled], .afy-btn.is-disabled { opacity:.55; cursor:not-allowed; transform:none; filter:none; box-shadow:none; }
.afy-btn.is-loading { pointer-events:none; opacity:.8; }
.afy-btn:focus-visible { outline:2px solid var(--border-focus, rgba(239,68,68,.65)); outline-offset:2px; }
.afy-btn-current { background:rgba(16,185,129,.10); color:#10b981; border-color:rgba(16,185,129,.35); cursor:default; }

/* ── Mensagens (erro/aviso) ────────────────────────────────────────────── */
.afy-notice {
    display:flex; align-items:flex-start; gap:12px; padding:14px 16px; border-radius:14px;
    border:1px solid var(--border-subtle); background:var(--surface); color:var(--text-primary);
    font-size:13.5px; line-height:1.55; margin-bottom:18px;
}
.afy-notice > svg, .afy-notice > i { width:18px; height:18px; flex-shrink:0; margin-top:1px; }
.afy-notice .afy-notice-body { flex:1; min-width:0; }
.afy-notice .afy-notice-body strong { display:block; margin-bottom:2px; }
.afy-notice .afy-notice-body p { margin:0; color:var(--text-secondary); }
.afy-notice .afy-notice-actions { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.afy-notice.danger { border-color:rgba(239,68,68,.35); background:linear-gradient(0deg, rgba(239,68,68,.06), rgba(239,68,68,.06)), var(--surface); }
.afy-notice.danger > svg, .afy-notice.danger > i { color:#ef4444; }
.afy-notice.warn { border-color:rgba(245,158,11,.35); background:linear-gradient(0deg, rgba(245,158,11,.06), rgba(245,158,11,.06)), var(--surface); }
.afy-notice.warn > svg, .afy-notice.warn > i { color:#f59e0b; }
.afy-notice.info { border-color:rgba(99,102,241,.32); background:linear-gradient(0deg, rgba(99,102,241,.06), rgba(99,102,241,.06)), var(--surface); }
.afy-notice.info > svg, .afy-notice.info > i { color:#818cf8; }
.afy-notice.ok { border-color:rgba(16,185,129,.35); background:linear-gradient(0deg, rgba(16,185,129,.06), rgba(16,185,129,.06)), var(--surface); }
.afy-notice.ok > svg, .afy-notice.ok > i { color:#10b981; }
.afy-notice[hidden] { display:none; }

/* ── Como funciona ─────────────────────────────────────────────────────── */
.afy-steps { display:grid; gap:12px; grid-template-columns:repeat(auto-fit, minmax(min(220px,100%),1fr)); }
.afy-step { display:flex; gap:12px; align-items:flex-start; padding:16px; border-radius:14px; background:var(--surface); border:1px solid var(--border-subtle); }
.afy-step b {
    width:28px; height:28px; flex-shrink:0; border-radius:9px; display:flex; align-items:center; justify-content:center;
    background:rgba(239,68,68,.10); color:var(--accent-red); font-size:13px; border:1px solid rgba(239,68,68,.22);
}
.afy-step strong { display:block; color:var(--text-primary); font-size:13.5px; margin-bottom:2px; }
.afy-step span { color:var(--text-secondary); font-size:12.5px; line-height:1.5; }
.afy-section-label { font-size:12px; font-weight:800; letter-spacing:.6px; text-transform:uppercase; color:var(--text-muted); margin:0 0 12px; }

/* ── Checkout (aguardando pagamento) ───────────────────────────────────── */
.afy-checkout { max-width:620px; margin:10px auto 0; }
.afy-checkout-card {
    padding:30px 26px; border-radius:var(--radius-xl, 20px); text-align:center;
    background:var(--surface); border:1px solid var(--border-subtle); box-shadow:var(--shadow-card);
}
.afy-checkout-ico {
    width:64px; height:64px; margin:0 auto 16px; border-radius:20px; display:flex; align-items:center; justify-content:center;
    background:rgba(245,158,11,.10); color:#f59e0b; border:1px solid rgba(245,158,11,.28);
}
.afy-checkout-ico svg { width:28px; height:28px; }
.afy-checkout-card.is-paid .afy-checkout-ico { background:rgba(16,185,129,.10); color:#10b981; border-color:rgba(16,185,129,.30); }
.afy-checkout-card.is-expired .afy-checkout-ico, .afy-checkout-card.is-missing .afy-checkout-ico { background:rgba(239,68,68,.10); color:#ef4444; border-color:rgba(239,68,68,.28); }
.afy-checkout-card h1 { margin:0 0 8px; font-size:clamp(20px, 5vw, 24px); font-weight:800; color:var(--text-primary); }
.afy-checkout-card > p { margin:0 auto 20px; color:var(--text-secondary); font-size:14px; line-height:1.6; max-width:460px; }
.afy-checkout-summary {
    display:grid; grid-template-columns:repeat(3, minmax(0,1fr)); gap:10px; margin:0 0 20px; text-align:left;
}
.afy-checkout-summary > div { padding:12px 14px; border-radius:12px; background:var(--surface-subtle, rgba(255,255,255,.025)); border:1px solid var(--border-subtle); min-width:0; }
.afy-checkout-summary small { display:block; color:var(--text-muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.afy-checkout-summary b { display:block; margin-top:5px; color:var(--text-primary); font-size:15px; overflow-wrap:anywhere; }
.afy-checkout-actions { display:flex; gap:10px; justify-content:center; flex-wrap:wrap; margin-bottom:18px; }
.afy-checkout-meta { display:flex; align-items:center; justify-content:center; gap:8px; color:var(--text-muted); font-size:12px; }
.afy-live-dot { width:8px; height:8px; border-radius:50%; background:#f59e0b; box-shadow:0 0 0 0 rgba(245,158,11,.55); animation:afyPulse 1.8s ease-out infinite; }
.afy-checkout-card.is-paid .afy-live-dot, .afy-checkout-card.is-expired .afy-live-dot, .afy-checkout-card.is-missing .afy-live-dot, .afy-live-dot.is-paused { animation:none; background:var(--text-muted); }
@keyframes afyPulse { 0% { box-shadow:0 0 0 0 rgba(245,158,11,.55); } 70% { box-shadow:0 0 0 9px rgba(245,158,11,0); } 100% { box-shadow:0 0 0 0 rgba(245,158,11,0); } }
.afy-secure-note {
    display:flex; gap:12px; align-items:flex-start; text-align:left; margin-top:16px; padding:14px 16px; border-radius:14px;
    background:var(--surface); border:1px solid var(--border-subtle); color:var(--text-secondary); font-size:13px; line-height:1.55;
}
.afy-secure-note svg { width:18px; height:18px; flex-shrink:0; color:#10b981; margin-top:1px; }
.afy-secure-note strong { color:var(--text-primary); }

/* ── Meu Plano (profile) ───────────────────────────────────────────────── */
.afy-myplan { display:flex; flex-direction:column; gap:16px; }
.afy-myplan-top { display:flex; align-items:flex-start; justify-content:space-between; gap:12px; flex-wrap:wrap; }
.afy-myplan-top h4 { margin:0; font-size:20px; font-weight:800; color:var(--text-primary); }
.afy-myplan-top .afy-myplan-price { color:var(--text-secondary); font-size:13px; margin-top:2px; }
.afy-kv { display:grid; grid-template-columns:repeat(auto-fit, minmax(min(180px,100%),1fr)); gap:10px; }
.afy-kv > div { padding:12px 14px; border-radius:12px; background:var(--surface-subtle, rgba(255,255,255,.025)); border:1px solid var(--border-subtle); min-width:0; }
.afy-kv small { display:block; color:var(--text-muted); font-size:11px; font-weight:700; text-transform:uppercase; letter-spacing:.4px; }
.afy-kv b { display:block; margin-top:5px; color:var(--text-primary); font-size:14.5px; overflow-wrap:anywhere; }
.afy-kv b em { font-style:normal; font-weight:600; font-size:12px; color:var(--text-secondary); }
.afy-usage { display:flex; flex-direction:column; gap:12px; }
.afy-usage-row { margin-bottom:6px; }
.afy-usage-row { display:flex; justify-content:space-between; gap:10px; font-size:13px; color:var(--text-secondary); }
.afy-usage-row b { color:var(--text-primary); }
.afy-bar { height:7px; border-radius:999px; background:var(--surface-sunken, rgba(255,255,255,.06)); overflow:hidden; border:1px solid var(--border-subtle); }
.afy-bar > span { display:block; height:100%; border-radius:inherit; background:linear-gradient(90deg,#b91c1c,#ef4444); width:0; transition:width .5s ease; }
.afy-bar.is-near > span { background:linear-gradient(90deg,#d97706,#f59e0b); }
.afy-bar.is-full > span { background:linear-gradient(90deg,#991b1b,#dc2626); }
.afy-bar.is-unlimited > span { background:linear-gradient(90deg,#059669,#10b981); width:100%; opacity:.35; }
.afy-actions { display:flex; gap:10px; flex-wrap:wrap; }

/* Dispositivos */
.afy-devices { list-style:none; margin:0; padding:0; display:flex; flex-direction:column; gap:10px; }
.afy-device {
    display:flex; align-items:center; gap:12px; padding:12px 14px; border-radius:12px;
    background:var(--surface-subtle, rgba(255,255,255,.025)); border:1px solid var(--border-subtle);
    transition:opacity .25s, transform .25s;
}
.afy-device.is-current { border-color:rgba(16,185,129,.35); }
.afy-device.is-gone { opacity:0; transform:translateX(8px); }
.afy-device-ico { width:36px; height:36px; border-radius:10px; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:var(--surface); border:1px solid var(--border-subtle); color:var(--text-secondary); }
.afy-device-ico svg { width:17px; height:17px; }
.afy-device-copy { flex:1; min-width:0; }
.afy-device-copy strong { display:flex; align-items:center; gap:8px; flex-wrap:wrap; color:var(--text-primary); font-size:13.5px; }
.afy-device-copy small { display:block; color:var(--text-secondary); font-size:12px; margin-top:2px; overflow-wrap:anywhere; }
.afy-device .afy-btn { min-height:36px; padding:8px 12px; font-size:12.5px; }
.afy-btn-danger-ghost { background:transparent; color:#ef4444; border-color:rgba(239,68,68,.35); }
.afy-btn-danger-ghost:hover { background:rgba(239,68,68,.08); }

/* ── Limite de contas (accounts.php / tiktok.php) ──────────────────────── */
.afy-usage-chip {
    display:inline-flex; align-items:center; gap:8px; flex-wrap:wrap; margin-top:8px;
    padding:6px 12px; border-radius:999px; font-size:12.5px; font-weight:600;
    background:var(--surface); border:1px solid var(--border-subtle); color:var(--text-secondary);
}
.afy-usage-chip b { color:var(--text-primary); }
.afy-usage-chip.is-near { border-color:rgba(245,158,11,.4); }
.afy-usage-chip.is-full { border-color:rgba(239,68,68,.45); }
.afy-limit-card {
    display:flex; gap:16px; align-items:flex-start; flex-wrap:wrap;
    padding:18px 20px; margin-bottom:20px; border-radius:16px;
    background:linear-gradient(0deg, rgba(239,68,68,.05), rgba(239,68,68,.05)), var(--surface);
    border:1px solid rgba(239,68,68,.32); box-shadow:var(--shadow-sm);
}
.afy-limit-card.is-info { background:linear-gradient(0deg, rgba(99,102,241,.05), rgba(99,102,241,.05)), var(--surface); border-color:rgba(99,102,241,.30); }
.afy-limit-card-ico { width:42px; height:42px; border-radius:12px; flex-shrink:0; display:flex; align-items:center; justify-content:center; background:rgba(239,68,68,.10); color:#ef4444; }
.afy-limit-card.is-info .afy-limit-card-ico { background:rgba(99,102,241,.12); color:#818cf8; }
.afy-limit-card-ico svg { width:20px; height:20px; }
.afy-limit-card-body { flex:1 1 240px; min-width:0; }
.afy-limit-card-body strong { display:block; color:var(--text-primary); font-size:15px; margin-bottom:4px; }
.afy-limit-card-body p { margin:0; color:var(--text-secondary); font-size:13.5px; line-height:1.55; overflow-wrap:anywhere; }
.afy-limit-facts { display:flex; gap:8px; flex-wrap:wrap; margin-top:10px; }
.afy-limit-facts span { padding:5px 10px; border-radius:9px; font-size:12.5px; color:var(--text-secondary); background:var(--surface-subtle, rgba(255,255,255,.03)); border:1px solid var(--border-subtle); }
.afy-limit-facts span b { color:var(--text-primary); }
.afy-limit-card-cta { display:flex; align-items:center; gap:8px; flex-wrap:wrap; align-self:center; }

/* Card de recurso bloqueado (InstaZip / TikZip / TikTok / Campanhas) */
.afy-gate {
    max-width:560px; margin:36px auto; text-align:center; padding:36px 28px; border-radius:var(--radius-xl, 20px);
    background:var(--surface); border:1px solid var(--border-subtle); box-shadow:var(--shadow-card);
}
.afy-gate-ico { width:58px; height:58px; margin:0 auto 16px; border-radius:18px; display:flex; align-items:center; justify-content:center; background:rgba(239,68,68,.10); color:var(--accent-red); border:1px solid rgba(239,68,68,.25); }
.afy-gate-ico svg { width:26px; height:26px; }
.afy-gate h2 { margin:0 0 8px; font-size:19px; font-weight:800; color:var(--text-primary); }
.afy-gate p { margin:0 auto 20px; color:var(--text-secondary); font-size:14px; line-height:1.6; max-width:420px; }
.afy-gate .afy-actions { justify-content:center; }

/* ── Header: banner do trial ───────────────────────────────────────────── */
.afy-trial-banner {
    display:flex; align-items:center; gap:10px; flex-wrap:wrap;
    padding:9px 14px; margin:0 0 14px; border-radius:12px;
    background:var(--surface); border:1px solid var(--border-subtle); box-shadow:var(--shadow-sm);
    color:var(--text-secondary); font-size:13px; line-height:1.4;
}
.afy-trial-banner svg { width:16px; height:16px; flex-shrink:0; color:var(--accent-red); }
.afy-trial-banner strong { color:var(--text-primary); font-weight:700; }
.afy-trial-banner .afy-tb-text { flex:1 1 200px; min-width:0; }
.afy-trial-banner a {
    margin-left:auto; color:var(--text-primary); font-weight:700; font-size:12.5px; text-decoration:none; white-space:nowrap;
    padding:5px 10px; border-radius:8px; border:1px solid var(--border-subtle); background:var(--surface-subtle, rgba(255,255,255,.03));
    transition:border-color .16s, background .16s;
}
.afy-trial-banner a:hover { border-color:var(--border-hover); }
.afy-trial-banner.is-warn svg { color:#f59e0b; }
.afy-trial-banner.is-warn { border-color:rgba(245,158,11,.30); }
.afy-trial-banner.is-info svg { color:#818cf8; }

/* ── Header: atalho de Administração (só SUPER_ADMIN) ─────────────────── */
.afy-admin-shortcut {
    display:inline-flex; align-items:center; gap:9px; margin-right:8px;
    padding:4px 12px 4px 6px; min-height:44px; border-radius:12px; text-decoration:none;
    background:rgba(18,18,28,0.75); backdrop-filter:blur(16px); -webkit-backdrop-filter:blur(16px);
    border:1px solid rgba(255,255,255,0.09); box-shadow:0 4px 20px rgba(0,0,0,0.35);
    color:#f8fafc; transition:border-color .2s ease, transform .2s ease, box-shadow .2s ease;
}
.afy-admin-shortcut:hover { border-color:rgba(239,68,68,.45); transform:translateY(-1px); box-shadow:0 6px 24px rgba(0,0,0,.4), 0 0 14px rgba(239,68,68,.15); }
.afy-admin-shortcut .afy-adm-ico {
    width:34px; height:34px; border-radius:8px; display:inline-flex; align-items:center; justify-content:center;
    background:rgba(239,68,68,.12); border:1px solid rgba(239,68,68,.30); font-size:15px;
}
.afy-admin-shortcut .afy-adm-copy { display:flex; flex-direction:column; line-height:1.15; }
.afy-admin-shortcut .afy-adm-copy strong { font-size:12.5px; font-weight:700; }
.afy-admin-shortcut .afy-adm-copy small { font-size:11px; color:#94a3b8; }
body.afy-leaving .main-content { opacity:0; transform:translateY(4px); transition:opacity .22s ease, transform .22s ease; }
@media (max-width: 560px) {
    .afy-admin-shortcut .afy-adm-copy small { display:none; }
    .afy-admin-shortcut { padding-right:10px; }
}

/* ── Overlay de fim de acesso ──────────────────────────────────────────── */
.afy-lock-overlay {
    position:fixed; inset:0; z-index:99999; display:flex; align-items:center; justify-content:center; padding:20px;
    background:rgba(5,5,8,.80); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
}
.afy-lock-card {
    width:100%; max-width:440px; text-align:center; padding:30px 26px; border-radius:18px;
    background:var(--surface-elevated, #13101d); border:1px solid var(--border-subtle); box-shadow:var(--shadow-xl, 0 20px 48px rgba(0,0,0,.8));
}
.afy-lock-card .afy-gate-ico { margin-bottom:14px; }
.afy-lock-card h2 { margin:0 0 8px; font-size:19px; font-weight:800; color:var(--text-primary); }
.afy-lock-card p { margin:0 0 10px; color:var(--text-secondary); font-size:14px; line-height:1.6; }
.afy-lock-card .afy-lock-sub { font-size:12.5px; color:var(--text-muted); margin-bottom:20px; }
.afy-lock-card .afy-actions { justify-content:center; }

/* ── Tema claro: só o que token não cobre ──────────────────────────────── */
html[data-theme="light"] .afy-admin-shortcut { background:#ffffff; border-color:#e2e8f0; box-shadow:0 4px 16px rgba(0,0,0,0.06); color:#0f172a; }
html[data-theme="light"] .afy-admin-shortcut .afy-adm-copy small { color:#64748b; }
html[data-theme="light"] .afy-admin-shortcut .afy-adm-ico { background:#fff5f5; border-color:#fecaca; }
html[data-theme="light"] .afy-lock-overlay { background:rgba(244,246,249,.78); }
html[data-theme="light"] .afy-plan.is-highlight { box-shadow:var(--shadow-card), 0 0 0 1px rgba(220,38,38,.10), 0 18px 40px -22px rgba(220,38,38,.28); }
html[data-theme="light"] .afy-pill.info { color:#4f46e5; }
html[data-theme="light"] .afy-notice.info > svg, html[data-theme="light"] .afy-notice.info > i,
html[data-theme="light"] .afy-limit-card.is-info .afy-limit-card-ico { color:#4f46e5; }
html[data-theme="light"] .afy-pill.ok, html[data-theme="light"] .afy-features li.on svg,
html[data-theme="light"] .afy-btn-current { color:#059669; }
html[data-theme="light"] .afy-pill.warn { color:#b45309; }
html[data-theme="light"] .afy-pill.bad { color:#dc2626; }

/* ── Telas estreitas ───────────────────────────────────────────────────── */
@media (max-width: 560px) {
    .afy-checkout-card { padding:24px 16px; }
    .afy-checkout-summary { grid-template-columns:1fr; }
    .afy-plan { padding:24px 16px 18px; }
    .afy-limit-card { padding:16px; }
    .afy-limit-card-cta { width:100%; }
    .afy-limit-card-cta .afy-btn { flex:1; }
    .afy-checkout-actions .afy-btn { width:100%; }
    .afy-trial-banner a { margin-left:0; }
    .afy-gate { padding:28px 18px; margin:20px auto; }
}

@media (prefers-reduced-motion: reduce) {
    .afy-plan, .afy-btn, .afy-device, .afy-bar > span, .afy-admin-shortcut, body.afy-leaving .main-content { transition:none !important; }
    .afy-btn-primary:hover, .afy-admin-shortcut:hover { transform:none; }
    .afy-live-dot { animation:none; }
}

/* Ícones inline dentro dos cards do perfil */
.pf-card-icon svg { width:15px; height:15px; }
#meu-plano { scroll-margin-top:20px; }
.afy-usage-chip svg { width:14px; height:14px; flex-shrink:0; }
.accounts-hero-subtitle + .afy-usage-chip, .page-header .afy-usage-chip { align-self:flex-start; }
@media (max-width: 560px) {
    .afy-device { flex-wrap:wrap; }
    .afy-device-copy { flex:1 1 calc(100% - 48px); }
    .afy-device .afy-btn { width:100%; }
}
.afy-notice a, .afy-limit-card a:not(.afy-btn) { color:var(--text-primary); text-decoration:underline; text-underline-offset:2px; }

/* ── Pop-up de recurso pago (InstaZip/TikZip) — 2026-10 ─────────────────── */
.afy-modal-x { position:absolute; top:12px; right:12px; width:34px; height:34px; border-radius:10px; display:flex; align-items:center; justify-content:center;
    background:transparent; border:1px solid var(--border-subtle); color:var(--text-secondary); cursor:pointer; }
.afy-modal-x:hover { color:var(--text-primary); border-color:var(--text-muted); }
.afy-modal-x svg { width:16px; height:16px; }
.afy-premium-feature { display:flex; flex-direction:column; gap:8px; margin:0 0 20px; padding:14px 16px; border-radius:14px; text-align:left;
    background:var(--surface-2, rgba(255,255,255,.03)); border:1px solid var(--border-subtle); }
.afy-premium-feature[hidden] { display:none; }
.afy-premium-feature strong { color:var(--text-primary); font-size:15px; }
.afy-premium-feature span { color:var(--text-secondary); font-size:13.5px; line-height:1.55; }
.afy-premium-feature .afy-premium-benefit { color:var(--accent-red); font-weight:600; font-size:13px; }
html[data-theme="light"] .afy-premium-feature { background:#f8fafc; }
.afy-checkout-expiry { display:flex; align-items:center; justify-content:center; gap:6px; font-size:13px; color:var(--text-secondary); margin-top:-4px; }
.afy-checkout-expiry svg { width:15px; height:15px; color:var(--warning, #f59e0b); }
.afy-admin-shortcut .afy-adm-ico svg { width:18px; height:18px; }

/* Moeda (2026-10-02): seletor BRL/USD e aviso de preço sem oferta na moeda. */
.afy-currency-switch { display:inline-flex; align-items:center; gap:6px; margin-top:14px; padding:4px; border-radius:12px; border:1px solid var(--border-subtle); background:var(--surface-subtle, rgba(255,255,255,.04)); flex-wrap:wrap; }
.afy-currency-switch > span { font-size:12px; font-weight:700; color:var(--text-secondary); padding:0 8px; }
.afy-cur-btn { appearance:none; border:none; cursor:pointer; padding:7px 14px; border-radius:9px; font:700 12.5px 'Inter', system-ui, sans-serif; color:var(--text-secondary); background:transparent; }
.afy-cur-btn.is-on { color:#fff; background:linear-gradient(135deg, var(--primary, #980406), var(--secondary, #6366f1)); }
.afy-cur-btn:focus-visible { outline:2px solid #a78bfa; outline-offset:2px; }
.afy-price-note { margin:-4px 0 10px; font-size:12px; color:var(--text-secondary); }
.afy-btn-link { background:none !important; border:none !important; box-shadow:none !important; color:var(--text-secondary); text-decoration:underline; text-underline-offset:3px; margin-top:6px; }

/* ── Stripe Global (2026-10-08): dicas dos botões e PIX dentro do Autofy ── */
.afy-pay-hint { display:block; margin:-2px 0 4px; font-size:11.5px; line-height:1.35; color:var(--text-secondary, #94a3b8); text-align:center; }
.afy-pix { display:grid; grid-template-columns:minmax(0, 220px) 1fr; gap:20px; align-items:center; margin:18px 0 6px; text-align:left; }
.afy-pix-qr { background:#fff; border-radius:14px; padding:12px; width:100%; max-width:220px; aspect-ratio:1 / 1; display:flex; align-items:center; justify-content:center; }
.afy-pix-qr img { width:100%; height:auto; display:block; }
.afy-pix-code { width:100%; min-height:86px; resize:none; font:12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; padding:10px 12px; border-radius:10px;
                border:1px solid var(--glass-border, rgba(255,255,255,.12)); background:rgba(255,255,255,.04); color:inherit; word-break:break-all; }
.afy-pix-actions { display:flex; gap:8px; flex-wrap:wrap; align-items:center; margin-top:8px; }
.afy-pix-msg { font-size:12px; color:var(--success, #22c55e); }
.afy-pix-timer { font-variant-numeric:tabular-nums; font-weight:700; }
.afy-pix ol { margin:10px 0 0; padding-left:18px; font-size:12.5px; color:var(--text-secondary, #94a3b8); }
@media (max-width: 640px) { .afy-pix { grid-template-columns:1fr; justify-items:center; text-align:center; } .afy-pix-actions { justify-content:center; } }

/* ── Escolha PIX × cartão (08/10/2026) ── */
.afy-btn-cta { font-size:15px; padding-top:14px; padding-bottom:14px; }
.afy-noscroll { overflow:hidden; }
.afy-paychoice { position:fixed; inset:0; z-index:100000; display:flex; align-items:center; justify-content:center; padding:16px;
                 background:rgba(5,5,10,.72); backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px); }
.afy-paychoice[hidden] { display:none; }
.afy-paychoice-box { position:relative; width:100%; max-width:460px; border-radius:20px; padding:28px 24px 20px;
                     background:linear-gradient(180deg, rgba(30,20,28,.98), rgba(14,12,20,.98)); border:1px solid rgba(220,38,38,.35);
                     box-shadow:0 30px 80px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.03) inset; }
.afy-paychoice-box h3 { margin:0 0 4px; font-size:20px; }
.afy-paychoice-plan { margin:0 0 18px; color:var(--text-secondary, #94a3b8); font-size:13.5px; }
.afy-paychoice-x { position:absolute; top:10px; right:12px; width:34px; height:34px; border-radius:10px; border:0; background:transparent;
                   color:inherit; font-size:24px; line-height:1; cursor:pointer; opacity:.7; }
.afy-paychoice-x:hover { opacity:1; background:rgba(255,255,255,.06); }
.afy-paychoice-opts { display:grid; gap:10px; }
.afy-paychoice-opt { display:flex; gap:14px; align-items:center; width:100%; text-align:left; padding:16px; border-radius:14px; cursor:pointer;
                     color:inherit; font:inherit; background:rgba(255,255,255,.035); border:1px solid rgba(255,255,255,.10);
                     transition:border-color .15s, background .15s, transform .15s; }
.afy-paychoice-opt:hover, .afy-paychoice-opt:focus-visible { border-color:rgba(220,38,38,.6); background:rgba(220,38,38,.08); transform:translateY(-1px); outline:none; }
.afy-paychoice-opt[disabled] { opacity:.6; cursor:default; transform:none; }
.afy-paychoice-opt strong { display:block; font-size:15.5px; }
.afy-paychoice-opt small { display:block; margin-top:2px; font-size:12.5px; color:var(--text-secondary, #94a3b8); line-height:1.4; }
.afy-paychoice-ico { flex:0 0 44px; height:44px; border-radius:12px; display:flex; align-items:center; justify-content:center; }
.afy-paychoice-ico svg { width:20px; height:20px; }
.afy-paychoice-ico.is-pix { background:rgba(50,188,173,.15); color:#32bcad; }
.afy-paychoice-ico.is-card { background:rgba(99,102,241,.15); color:#818cf8; }
.afy-paychoice-safe { display:flex; gap:6px; align-items:center; justify-content:center; margin:16px 0 0; font-size:12px; color:var(--text-secondary, #94a3b8); }
.afy-paychoice-safe svg { width:14px; height:14px; }
[data-theme="light"] .afy-paychoice-box { background:#fff; color:#0f172a; border-color:#fecaca; }
[data-theme="light"] .afy-paychoice-opt { background:#f8fafc; border-color:#e2e8f0; }

/* ── Checkout embutido do Stripe (08/10/2026) ── */
.afy-co { display:grid; grid-template-columns:minmax(0, 1fr) minmax(0, 1.1fr); max-width:1080px; margin:8px auto 24px; border-radius:24px; overflow:hidden;
          border:1px solid rgba(220,38,38,.28); box-shadow:0 30px 80px rgba(0,0,0,.45); background:rgba(12,10,18,.92); }
.afy-co-summary { position:relative; padding:34px 34px 30px; background:
          radial-gradient(120% 80% at 0% 0%, rgba(220,38,38,.22), transparent 60%),
          radial-gradient(90% 70% at 100% 100%, rgba(99,102,241,.16), transparent 60%), rgba(18,12,20,.95); }
.afy-co-back { display:inline-block; margin-bottom:22px; font-size:13px; color:var(--text-secondary, #94a3b8); text-decoration:none; }
.afy-co-back:hover { color:inherit; }
.afy-co-brand { display:flex; align-items:center; gap:10px; font-weight:800; font-size:18px; margin-bottom:26px; }
.afy-co-brand img { border-radius:10px; }
.afy-co-kicker { margin:0; text-transform:uppercase; letter-spacing:.12em; font-size:11.5px; font-weight:700; color:#f87171; }
.afy-co-summary h1 { margin:4px 0 10px; font-size:30px; line-height:1.15; }
.afy-co-price { display:flex; align-items:baseline; gap:6px; margin-bottom:22px; }
.afy-co-price strong { font-size:42px; letter-spacing:-.02em; line-height:1; }
.afy-co-price span { color:var(--text-secondary, #94a3b8); font-size:15px; }
.afy-co-limits { display:grid; grid-template-columns:1fr 1fr; gap:10px; margin-bottom:20px; }
.afy-co-limits div { padding:12px 14px; border-radius:14px; background:rgba(255,255,255,.04); border:1px solid rgba(255,255,255,.08); font-size:13px; color:var(--text-secondary, #94a3b8); }
.afy-co-limits small { display:block; font-size:11.5px; margin-bottom:2px; }
.afy-co-limits b { font-size:20px; color:var(--text-primary, #fff); }
.afy-co-features { list-style:none; margin:0 0 24px; padding:0; display:grid; gap:9px; font-size:14px; }
.afy-co-features li { display:flex; gap:10px; align-items:center; }
.afy-co-features svg { width:16px; height:16px; color:#22c55e; flex:0 0 16px; }
.afy-co-trust { display:grid; gap:8px; padding-top:18px; border-top:1px solid rgba(255,255,255,.08); font-size:12.5px; color:var(--text-secondary, #94a3b8); }
.afy-co-trust span { display:flex; gap:8px; align-items:center; }
.afy-co-trust svg { width:14px; height:14px; flex:0 0 14px; }
.afy-co-pay { padding:26px; background:#ffffff; display:flex; }
.afy-co-frame { flex:1; min-height:560px; border-radius:16px; }
.afy-co-loading { display:flex; gap:8px; align-items:center; justify-content:center; height:100%; min-height:300px; color:#475569; font-size:14px; }
@media (max-width: 900px) {
  .afy-co { grid-template-columns:1fr; border-radius:18px; }
  .afy-co-summary { padding:24px 20px; }
  .afy-co-summary h1 { font-size:24px; }
  .afy-co-price strong { font-size:34px; }
  .afy-co-pay { padding:14px; }
  .afy-co-frame { min-height:480px; }
}
[data-theme="light"] .afy-co { background:#fff; border-color:#fecaca; box-shadow:0 20px 50px rgba(15,23,42,.12); }
[data-theme="light"] .afy-co-summary { background:linear-gradient(160deg, #fff1f2, #eef2ff); color:#0f172a; }
[data-theme="light"] .afy-co-limits div { background:#fff; border-color:#e2e8f0; }
[data-theme="light"] .afy-co-limits b { color:#0f172a; }
