/* ============================================
   PORTAL DO PACIENTE — REDESIGN COMPLETO
   ============================================ */

.pp-page { min-height:100vh; background:#f4f6f2; font-family:'Inter',sans-serif; }

/* TOPBAR */
.pp-topbar {
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 18px; gap:12px;
  background:linear-gradient(135deg,#141a12,#1e2a1b);
  box-shadow:0 2px 16px rgba(0,0,0,0.35);
}
.pp-brand { display:flex; align-items:center; gap:12px; min-width:0; flex:1; }
.pp-brand img { width:38px; height:38px; object-fit:contain; flex-shrink:0; filter:drop-shadow(0 2px 6px rgba(200,169,110,0.3)); }
.pp-brand > div { display:flex; flex-direction:column; min-width:0; }
.pp-label { color:rgba(200,169,110,0.75); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:0.8px; }
.pp-name { color:#fff; font-size:16px; font-weight:800; line-height:1.2; word-break:break-word; white-space:normal; }
.pp-menu-btn {
  flex-shrink:0; width:40px; height:40px;
  display:flex; align-items:center; justify-content:center;
  border-radius:10px; color:#c8a96e;
  background:rgba(200,169,110,0.12);
  border:1px solid rgba(200,169,110,0.2);
  transition:background 0.15s;
}
.pp-menu-btn:hover { background:rgba(200,169,110,0.22); }

/* MENU DESLIZANTE */
.pp-menu {
  position:fixed; top:0; right:-320px; bottom:0; z-index:200;
  width:min(300px,85vw); background:#1e2a1b;
  box-shadow:-6px 0 32px rgba(0,0,0,0.4);
  display:flex; flex-direction:column; gap:4px;
  padding:60px 12px 24px;
  transition:right 0.28s cubic-bezier(.4,0,.2,1);
  border-left:1px solid rgba(200,169,110,0.15);
}
.pp-menu--open { right:0; }
.pp-menu-backdrop {
  display:none; position:fixed; inset:0; z-index:199;
  background:rgba(0,0,0,0.5); backdrop-filter:blur(2px);
}
.pp-menu-backdrop--open { display:block; }
.pp-menu-item {
  display:flex; align-items:center; gap:14px;
  padding:16px 14px; border-radius:12px; text-align:left;
  color:#e8ede6; text-decoration:none;
  background:rgba(255,255,255,0.04);
  border:1px solid rgba(255,255,255,0.07);
  transition:background 0.15s;
  width:100%;
}
.pp-menu-item:hover { background:rgba(200,169,110,0.12); }
.pp-menu-icon { font-size:22px; flex-shrink:0; }
.pp-menu-item > div strong { display:block; font-size:14px; font-weight:700; color:#f0ece4; }
.pp-menu-item > div small { display:block; font-size:12px; color:rgba(200,169,110,0.65); margin-top:2px; }
.pp-menu-share { border-color:rgba(224,123,57,0.3); background:rgba(224,123,57,0.08); }
.pp-menu-share:hover { background:rgba(224,123,57,0.18); }
.pp-menu-share > div strong { color:#f0a070; }

/* CONTENT */
.pp-content { padding:14px; display:flex; flex-direction:column; gap:14px; max-width:520px; margin:0 auto; }

/* PLANO + STATUS */
.pp-plan-row { display:flex; align-items:center; gap:8px; flex-wrap:wrap; padding:2px 0; }
.pp-plan-badge {
  padding:5px 12px; border-radius:999px;
  background:linear-gradient(135deg,#1e2a1b,#2d4028);
  color:#c8a96e; font-size:12px; font-weight:800;
  border:1px solid rgba(200,169,110,0.3);
}
.pp-status-badge { padding:5px 12px; border-radius:999px; font-size:12px; font-weight:700; }
.pp-status--active { background:#e8f5e9; color:#2e7d32; border:1px solid #a5d6a7; }
.pp-status--tolerance { background:#fff8e1; color:#f57f17; border:1px solid #ffcc02; }
.pp-status--expired { background:#fce4ec; color:#c62828; border:1px solid #ef9a9a; }

/* CARDS BASE */
.pp-card {
  border-radius:16px; padding:18px;
  background:#fff;
  box-shadow:0 2px 12px rgba(20,26,18,0.08);
  border:1px solid rgba(0,0,0,0.07);
}
.pp-card-header { display:flex; align-items:center; gap:10px; margin-bottom:12px; }
.pp-card-icon { font-size:20px; flex-shrink:0; }
.pp-card-label { font-size:13px; font-weight:800; color:#263123; text-transform:uppercase; letter-spacing:0.5px; flex:1; }
.pp-refresh-btn { background:none; border:none; padding:5px; cursor:pointer; color:#b0bdb0; border-radius:50%; display:flex; align-items:center; justify-content:center; transition:color 0.2s; flex-shrink:0; }
.pp-refresh-btn:active { color:#465341; }
@keyframes pp-spin { from { transform:rotate(0deg); } to { transform:rotate(360deg); } }
.pp-refresh-spinning { animation:pp-spin 0.7s linear infinite; color:#465341 !important; }
.pp-card-sub { margin:0 0 14px; color:#5a6b5e; font-size:14px; line-height:1.6; }
.pp-card-arrow { font-size:13px; font-weight:700; color:#2d4028; }

/* PROXIMA CONSULTA — GOLD */
.pp-card--next {
  background:linear-gradient(135deg,#1e2a1b,#2d4028);
  border-color:rgba(200,169,110,0.3);
  box-shadow:0 8px 24px rgba(20,26,18,0.25);
}
.pp-card--next .pp-card-label { color:rgba(200,169,110,0.8); }
.pp-next-date { display:block; font-size:22px; font-weight:900; color:#c8a96e; line-height:1.2; }

/* AGENDAR / CTA — LARANJA */
.pp-card--cta { border-color:rgba(224,123,57,0.25); background:linear-gradient(180deg,#fff,#fff9f5); }
.pp-card--renewal { border-color:rgba(224,123,57,0.4); background:linear-gradient(180deg,#fff9f5,#fff); }
.pp-card--pending { border-color:rgba(180,180,180,0.3); background:#fafafa; }
.pp-cta-btn {
  width:100%; padding:14px; border-radius:12px;
  background:linear-gradient(135deg,#e07b39,#c56a2a);
  color:#fff; font-size:15px; font-weight:800;
  box-shadow:0 4px 16px rgba(224,123,57,0.35);
  transition:all 0.2s;
}
.pp-cta-btn:hover { transform:translateY(-1px); box-shadow:0 6px 20px rgba(224,123,57,0.45); }

/* INSTRUCOES — VERDE */
.pp-card--instructions {
  cursor:pointer;
  background:linear-gradient(135deg,#f0f7f0,#e8f5e9);
  border-color:rgba(45,64,40,0.2);
  transition:all 0.2s;
}
.pp-card--instructions:hover { border-color:rgba(45,64,40,0.4); box-shadow:0 4px 16px rgba(20,26,18,0.12); }
.pp-card--instructions .pp-card-label { color:#1e2a1b; }

/* RESUMO DO PLANO */
.pp-summary-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; margin-bottom:10px; }
.pp-summary-item { background:#f8faf6; border-radius:10px; padding:12px; border:1px solid #e8eee6; }
.pp-summary-item small { display:block; font-size:10px; font-weight:700; color:#8a9e87; text-transform:uppercase; letter-spacing:0.5px; margin-bottom:4px; }
.pp-summary-item strong { font-size:18px; font-weight:900; color:#263123; }
.pp-summary-item--highlight { background:linear-gradient(135deg,#1e2a1b,#2d4028); border-color:transparent; }
.pp-summary-item--highlight small { color:rgba(200,169,110,0.7); }
.pp-summary-item--highlight strong { color:#c8a96e; }

/* BONUS DE PRAZO */
.pp-tolerance-box {
  border-radius:12px; padding:14px;
  background:linear-gradient(135deg,#fffbef,#fff8e1);
  border:1px solid rgba(200,150,50,0.35);
  box-shadow:0 2px 8px rgba(200,150,50,0.1);
}
.pp-tolerance-top { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.pp-tolerance-icon { font-size:18px; flex-shrink:0; }
.pp-tolerance-top strong { font-size:13px; font-weight:800; color:#92610a; }
.pp-tolerance-desc { margin:0; font-size:13px; line-height:1.6; color:#7a5c1e; }
.pp-tolerance-desc strong { color:#92610a; font-weight:800; }

/* HISTORICO */
.pp-card--history .pp-card-header { margin-bottom:14px; }
.pp-history-agenda-btn {
  padding:6px 12px; border-radius:8px;
  background:#1e2a1b; color:#c8a96e;
  font-size:12px; font-weight:700;
  border:1px solid rgba(200,169,110,0.3);
}
.pp-history-list { display:flex; flex-direction:column; gap:8px; }
.pp-history-item {
  display:flex; align-items:center; gap:12px;
  padding:12px 14px; border-radius:12px;
  background:#f8faf6; border:1px solid #e8eee6;
  width:100%; text-align:left;
}
.pp-history-item--pending {
  background:linear-gradient(135deg,#fff9f5,#fff);
  border-color:rgba(224,123,57,0.2);
  cursor:pointer; transition:all 0.15s;
}
.pp-history-item--pending:hover { border-color:rgba(224,123,57,0.4); }
.pp-history-dot {
  width:32px; height:32px; flex-shrink:0;
  border-radius:50%; display:flex; align-items:center; justify-content:center; font-size:14px;
}
.pp-history-dot--done { background:#e8f5e9; }
.pp-history-dot--pending { background:#fff3e0; }
.pp-history-item > div { flex:1; min-width:0; }
.pp-history-item > div strong { display:block; font-size:13px; font-weight:700; color:#263123; }
.pp-history-item > div small { display:block; font-size:11px; color:#7a8e7a; margin-top:2px; }
.pp-history-change {
  flex-shrink:0; padding:5px 10px; border-radius:8px;
  background:#e07b39; color:#fff; font-size:11px; font-weight:700;
}
.pp-empty { color:#9aab98; font-size:14px; text-align:center; padding:12px 0; margin:0; }

/* LOADING / ERRO */
.pp-loading { display:flex; flex-direction:column; align-items:center; gap:16px; padding:60px 24px; color:#5a6b5e; }
.pp-spinner {
  width:40px; height:40px; border-radius:50%;
  border:3px solid rgba(200,169,110,0.2);
  border-top-color:#c8a96e;
  animation:pp-spin 0.8s linear infinite;
}
@keyframes pp-spin { to { transform:rotate(360deg); } }
.pp-error { padding:40px 24px; text-align:center; color:#7a8e7a; }


/* ============================================
   PAINEL DO AFILIADO — PREMIUM
   ============================================ */

.af-page { min-height:100vh; background:#0f1a0d; font-family:'Inter',sans-serif; }

/* TOPBAR */
.af-topbar {
  position:sticky; top:0; z-index:50;
  display:flex; align-items:center; justify-content:space-between;
  padding:12px 18px; gap:12px;
  background:linear-gradient(135deg,#0a110a,#141a12);
  border-bottom:1px solid rgba(200,169,110,0.2);
  box-shadow:0 2px 20px rgba(0,0,0,0.5);
}
.af-brand { display:flex; align-items:center; gap:12px; min-width:0; flex:1; }
.af-brand img { width:36px; height:36px; object-fit:contain; flex-shrink:0; filter:drop-shadow(0 2px 8px rgba(200,169,110,0.4)); }
.af-brand > div { display:flex; flex-direction:column; min-width:0; }
.af-label { color:rgba(200,169,110,0.6); font-size:10px; font-weight:700; text-transform:uppercase; letter-spacing:1px; }
.af-name { color:#fff; font-size:15px; font-weight:800; line-height:1.2; word-break:break-word; }
.af-topbar-right { display:flex; align-items:center; gap:10px; flex-shrink:0; }
.af-avatar {
  width:36px; height:36px; border-radius:50%;
  background:linear-gradient(135deg,#c8a96e,#a07840);
  color:#0f1a0d; font-size:13px; font-weight:900;
  display:flex; align-items:center; justify-content:center;
  flex-shrink:0;
}
.af-share-btn {
  display:flex; align-items:center; gap:6px;
  padding:8px 14px; border-radius:10px;
  background:rgba(200,169,110,0.15);
  border:1px solid rgba(200,169,110,0.3);
  color:#c8a96e; font-size:12px; font-weight:700;
  transition:all 0.15s;
}
.af-share-btn:hover { background:rgba(200,169,110,0.25); }

/* CONTENT */
.af-content { padding:16px; display:flex; flex-direction:column; gap:14px; max-width:560px; margin:0 auto; }

/* CUPOM */
.af-coupon-row { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }
.af-coupon-box {
  flex:1; min-width:160px;
  background:linear-gradient(135deg,#1a2a18,#243320);
  border:1px solid rgba(200,169,110,0.25);
  border-radius:14px; padding:14px 16px;
}
.af-coupon-label { display:block; font-size:10px; font-weight:700; color:rgba(200,169,110,0.6); text-transform:uppercase; letter-spacing:0.8px; margin-bottom:4px; }
.af-coupon-code { display:block; font-size:22px; font-weight:900; color:#c8a96e; letter-spacing:1px; }
.af-coupon-discount { display:block; font-size:12px; color:rgba(255,255,255,0.5); margin-top:4px; }
.af-coupon-demo-card { display:flex; flex-direction:column; gap:12px; background:rgba(200,169,110,0.08); border:1px solid rgba(200,169,110,0.18); border-radius:14px; padding:14px 16px; margin-top:12px; }
.af-coupon-demo-hint { font-size:12px; line-height:1.5; color:rgba(255,255,255,0.55); margin:0; }
.af-coupon-demo-card .af-agenda-btn { align-self:flex-start; }
.af-share-card--coupon .af-share-card-icon { font-size:20px; background:none; }
.af-agenda-btn {
  padding:12px 18px; border-radius:12px;
  background:linear-gradient(135deg,#e07b39,#c56a2a);
  color:#fff; font-size:13px; font-weight:800;
  box-shadow:0 4px 16px rgba(224,123,57,0.3);
  white-space:nowrap; transition:all 0.2s;
}
.af-agenda-btn:hover { transform:translateY(-1px); box-shadow:0 6px 20px rgba(224,123,57,0.4); }

/* FINANCEIRO */
.af-finance-grid { display:grid; grid-template-columns:1fr 1fr 1fr; gap:10px; }
.af-finance-card {
  border-radius:14px; padding:14px 12px;
  display:flex; flex-direction:column; gap:6px;
  border:1px solid rgba(255,255,255,0.06);
}
.af-finance-card small { font-size:11px; font-weight:700; color:rgba(255,255,255,0.5); }
.af-finance-card strong { font-size:16px; font-weight:900; line-height:1; }
.af-finance-card--main {
  background:linear-gradient(135deg,#1a2a18,#243320);
  border-color:rgba(200,169,110,0.3);
  grid-column:1 / -1;
}
.af-finance-card--main small { color:rgba(200,169,110,0.7); font-size:12px; }
.af-finance-card--main strong { font-size:28px; color:#c8a96e; }
.af-finance-card--confirmed { background:#0d1f14; }
.af-finance-card--confirmed strong { color:#4ade80; }
.af-finance-card--confirmed small { color:rgba(74,222,128,0.6); }
.af-finance-card--pending { background:#1a1208; }
.af-finance-card--pending strong { color:#fbbf24; }
.af-finance-card--pending small { color:rgba(251,191,36,0.6); }

/* CARDS SEÇÃO */
.af-card {
  border-radius:16px; padding:18px;
  background:#141f12;
  border:1px solid rgba(255,255,255,0.07);
  box-shadow:0 4px 20px rgba(0,0,0,0.3);
}
.af-card-header { display:flex; align-items:center; gap:10px; margin-bottom:16px; }
.af-card-icon { font-size:20px; flex-shrink:0; }
.af-card-label { font-size:13px; font-weight:800; color:rgba(255,255,255,0.7); text-transform:uppercase; letter-spacing:0.5px; flex:1; }
.af-card-count {
  padding:3px 10px; border-radius:999px;
  background:rgba(200,169,110,0.15);
  color:#c8a96e; font-size:12px; font-weight:700;
}

/* MÉTRICAS */
.af-metrics-grid { display:grid; grid-template-columns:repeat(2,1fr); gap:10px; }
.af-metric {
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.07);
  border-radius:12px; padding:14px; text-align:center;
  display:flex; flex-direction:column; align-items:center; gap:6px;
}
.af-metric-icon { font-size:22px; }
.af-metric strong { font-size:24px; font-weight:900; color:#fff; line-height:1; }
.af-metric small { font-size:11px; font-weight:600; color:rgba(255,255,255,0.45); }
.af-metric--green strong { color:#4ade80; }
.af-metric--gold strong { color:#c8a96e; }
.af-metric--blue strong { color:#60a5fa; }

/* LEADS */
.af-leads-list { display:flex; flex-direction:column; gap:12px; }
.af-lead-item {
  background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.07);
  border-radius:14px; padding:14px; display:flex; flex-direction:column; gap:12px;
}
.af-lead-main { display:flex; align-items:center; gap:12px; }
.af-lead-avatar {
  width:38px; height:38px; border-radius:50%; flex-shrink:0;
  background:linear-gradient(135deg,#2d4028,#1e2a1b);
  border:1px solid rgba(200,169,110,0.3);
  color:#c8a96e; font-size:15px; font-weight:900;
  display:flex; align-items:center; justify-content:center;
}
.af-lead-info { flex:1; min-width:0; }
.af-lead-info strong { display:block; color:#f0ece4; font-size:14px; font-weight:700; }
.af-lead-info small { display:block; color:rgba(255,255,255,0.4); font-size:12px; margin-top:2px; }
.af-lead-right { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.af-lead-status {
  padding:4px 10px; border-radius:999px; font-size:11px; font-weight:700;
  background:rgba(255,255,255,0.07); color:rgba(255,255,255,0.6);
}
.af-lead-status--scheduled { background:rgba(96,165,250,0.15); color:#60a5fa; }
.af-lead-status--attended { background:rgba(74,222,128,0.15); color:#4ade80; }
.af-lead-status--converted { background:rgba(200,169,110,0.2); color:#c8a96e; }
.af-lead-status--cancelled { background:rgba(248,113,113,0.15); color:#f87171; }
.af-pay-badge { padding:4px 10px; border-radius:999px; font-size:11px; font-weight:700; }
.af-pay--paid { background:rgba(74,222,128,0.15); color:#4ade80; }
.af-pay--pending { background:rgba(251,191,36,0.15); color:#fbbf24; }
.af-pay--cancelled { background:rgba(248,113,113,0.15); color:#f87171; }
.af-lead-values { display:flex; gap:12px; flex-wrap:wrap; }
.af-lead-values span { font-size:12px; color:rgba(255,255,255,0.4); }
.af-lead-values strong { color:rgba(255,255,255,0.75); font-weight:700; }
.af-renewal { color:rgba(96,165,250,0.7); font-size:11px; width:100%; }
.af-portal-btn {
  padding:7px 14px; border-radius:8px;
  background:linear-gradient(135deg,#1e2a1b,#2d4028);
  border:1px solid rgba(200,169,110,0.3);
  color:#c8a96e; font-size:12px; font-weight:700;
  transition:all 0.15s;
}
.af-portal-btn:hover { background:rgba(200,169,110,0.15); }
.af-portal-pending { font-size:11px; color:rgba(255,255,255,0.3); }

/* CARD COMPARTILHAR */
.af-share-card {
  width:100%; display:flex; align-items:center; gap:14px;
  padding:16px 18px; border-radius:16px;
  background:linear-gradient(135deg,#1a2a18,#243320);
  border:1px solid rgba(200,169,110,0.3);
  box-shadow:0 4px 20px rgba(0,0,0,0.35);
  text-align:left; transition:all 0.2s;
  cursor:pointer;
}
.af-share-card:hover { border-color:rgba(200,169,110,0.55); box-shadow:0 6px 28px rgba(200,169,110,0.18); transform:translateY(-1px); }
.af-share-card-icon {
  width:44px; height:44px; flex-shrink:0;
  border-radius:12px; display:flex; align-items:center; justify-content:center;
  background:rgba(200,169,110,0.18); color:#c8a96e;
}
.af-share-card-text { flex:1; min-width:0; }
.af-share-card-text strong { display:block; color:#f0ece4; font-size:14px; font-weight:800; }
.af-share-card-text small { display:block; color:rgba(200,169,110,0.6); font-size:12px; margin-top:3px; }
.af-share-card-arrow { font-size:18px; color:#c8a96e; flex-shrink:0; }

/* TIER CARD */
.af-tier-card { border-radius:14px; padding:16px; border:1px solid; }
.af-tier-card--junior { background:linear-gradient(135deg,#1a2a18,#1e2e1a); border-color:rgba(74,222,128,0.2); }
.af-tier-card--senior { background:linear-gradient(135deg,#1e1a0a,#2a240a); border-color:rgba(200,169,110,0.35); }
.af-tier-top { display:flex; align-items:center; justify-content:space-between; gap:10px; margin-bottom:10px; }
.af-tier-badge-pill { padding:5px 12px; border-radius:999px; font-size:12px; font-weight:800; }
.af-tier-badge-pill--junior { background:rgba(74,222,128,0.15); color:#4ade80; }
.af-tier-badge-pill--senior { background:rgba(200,169,110,0.2); color:#c8a96e; }
.af-tier-commission { font-size:20px; font-weight:900; color:#c8a96e; }
.af-tier-desc { font-size:13px; color:rgba(255,255,255,0.55); line-height:1.5; margin:0 0 12px; }
.af-tier-desc strong { color:rgba(255,255,255,0.85); }
.af-tier-progress-row { display:flex; align-items:center; gap:10px; }
.af-tier-progress-bar { flex:1; height:8px; border-radius:999px; background:rgba(255,255,255,0.1); overflow:hidden; }
.af-tier-progress-fill { height:100%; border-radius:999px; background:linear-gradient(90deg,#4ade80,#c8a96e); transition:width 0.4s; }
.af-tier-progress-label { font-size:12px; font-weight:700; color:rgba(255,255,255,0.5); flex-shrink:0; }
.af-tier-upgrade-btn { margin-top:12px; width:100%; padding:11px; border-radius:10px; background:linear-gradient(135deg,#c8a96e,#a07840); color:#0f1a0d; font-size:13px; font-weight:900; transition:all 0.2s; }
.af-tier-upgrade-btn:hover { opacity:0.9; }
.af-tier-table-btn { margin-top:12px; width:100%; padding:11px; border-radius:10px; background:rgba(255,255,255,0.08); border:1px solid rgba(255,255,255,0.14); color:rgba(255,255,255,0.85); font-size:13px; font-weight:800; transition:all 0.2s; }
.af-tier-table-btn:hover { background:rgba(255,255,255,0.14); }

/* COMMISSION TABLES MODAL (rendered inside the default light .modal-card) */
.modal-card:has(.af-commission-modal) { display:flex; flex-direction:column; max-height:90vh; overflow:hidden; }
.af-commission-modal { display:flex; flex-direction:column; min-height:0; flex:1; }
.af-commission-modal-header { display:flex; align-items:center; justify-content:space-between; gap:12px; flex-shrink:0; background:#fff; padding:18px 20px; border-bottom:1px solid #eef2f0; box-shadow:0 4px 8px -6px #0002; position:relative; z-index:2; }
.af-commission-modal-header h2 { margin:0; color:#172019; }
.af-commission-modal-header button { flex-shrink:0; }
.af-commission-modal-body { flex:1; min-height:0; overflow-y:auto; -webkit-overflow-scrolling:touch; overscroll-behavior:contain; touch-action:pan-y; padding:16px 20px 20px; display:flex; flex-direction:column; gap:14px; }
.af-commission-modal-sub { margin:0; font-size:13px; color:#5b6760; line-height:1.5; }
.af-commission-table-section h3 { font-size:14px; margin:0 0 8px; color:#172019; }
.af-comm-percent-pill { display:inline-block; padding:3px 10px; border-radius:999px; font-size:12px; font-weight:800; white-space:nowrap; }
.af-comm-percent-pill--junior { background:#dcfce7; color:#16856d; }
.af-comm-percent-pill--senior { background:#fdf1da; color:#a07840; }
.af-comm-table { display:flex; flex-direction:column; gap:8px; }
.af-comm-row { border:1px solid #e7ece9; border-radius:10px; padding:10px 12px; background:#fafcfb; }
.af-comm-row-plan { font-weight:800; font-size:13px; color:#172019; margin-bottom:8px; }
.af-comm-row-data { display:flex; flex-wrap:wrap; gap:10px 18px; }
.af-comm-row-cell { display:flex; flex-direction:column; gap:2px; min-width:72px; }
.af-comm-row-cell small { font-size:11px; color:#7a8b83; text-transform:uppercase; letter-spacing:.03em; }
.af-comm-row-cell span, .af-comm-row-cell strong { font-size:13px; color:#172019; word-break:break-word; }
@media (min-width: 640px) {
  .af-comm-row { display:flex; align-items:center; justify-content:space-between; gap:14px; }
  .af-comm-row-plan { margin-bottom:0; flex:1 1 160px; }
  .af-comm-row-data { flex:2 1 320px; justify-content:flex-end; }
  .af-comm-row-cell { align-items:flex-end; min-width:90px; }
}

/* PAINEL PIX */
.af-pix-panel { border-radius:14px; padding:16px; background:#141f12; border:1px solid rgba(255,255,255,0.07); }
.af-pix-header { display:flex; align-items:center; gap:8px; margin-bottom:12px; }
.af-pix-header span { font-size:18px; }
.af-pix-header strong { color:rgba(255,255,255,0.75); font-size:13px; font-weight:800; }
.af-pix-list { display:flex; flex-direction:column; gap:8px; }
.af-pix-item { display:flex; align-items:center; gap:10px; padding:10px 12px; border-radius:10px; background:rgba(255,255,255,0.04); border:1px solid rgba(255,255,255,0.07); }
.af-pix-item--active { border-color:rgba(74,222,128,0.3); background:rgba(74,222,128,0.06); }
.af-pix-info { flex:1; min-width:0; }
.af-pix-info small { display:block; font-size:10px; font-weight:700; color:rgba(255,255,255,0.4); text-transform:uppercase; letter-spacing:0.5px; }
.af-pix-info span { display:block; font-size:13px; font-weight:600; color:rgba(255,255,255,0.75); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.af-pix-prefer-btn { flex-shrink:0; padding:6px 12px; border-radius:8px; background:rgba(200,169,110,0.12); border:1px solid rgba(200,169,110,0.25); color:#c8a96e; font-size:11px; font-weight:700; }
.af-pix-active-badge { flex-shrink:0; font-size:12px; color:#4ade80; font-weight:700; }

/* ============================================
   PÁGINA CADASTRO AFILIADO — PÚBLICA
   ============================================ */
.ac-page { min-height:100vh; background:#f4f6f2; font-family:'Inter',sans-serif; }

.ac-topbar { display:flex; align-items:center; justify-content:space-between; padding:12px 18px; background:linear-gradient(135deg,#141a12,#1e2a1b); border-bottom:1px solid rgba(200,169,110,0.15); }
.ac-back { color:rgba(200,169,110,0.8); font-size:13px; font-weight:700; text-decoration:none; }
.ac-logo { width:32px; height:32px; object-fit:contain; filter:drop-shadow(0 2px 6px rgba(200,169,110,0.3)); }

.ac-hero { background:linear-gradient(135deg,#1e2a1b,#2d4028); padding:28px 20px 24px; text-align:center; }
.ac-hero-badge { display:inline-block; padding:6px 14px; border-radius:999px; background:rgba(200,169,110,0.15); border:1px solid rgba(200,169,110,0.3); color:#c8a96e; font-size:12px; font-weight:700; margin-bottom:14px; }
.ac-hero-title { font-size:26px; font-weight:900; color:#fff; line-height:1.2; margin:0 0 10px; }
.ac-hero-title span { color:#c8a96e; }
.ac-hero-sub { color:rgba(255,255,255,0.6); font-size:14px; line-height:1.6; margin:0; max-width:400px; margin:0 auto; }

.ac-content { padding:16px; max-width:560px; margin:0 auto; display:flex; flex-direction:column; gap:14px; }

/* TIERS */
.ac-tiers { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media(max-width:480px) { .ac-tiers { grid-template-columns:1fr; } }
.ac-tier { border-radius:16px; padding:16px; border:1px solid; }
.ac-tier--junior { background:linear-gradient(135deg,#f0faf2,#e8f5e9); border-color:rgba(45,64,40,0.2); }
.ac-tier--senior { background:linear-gradient(135deg,#fffbef,#fff3cc); border-color:rgba(200,150,50,0.3); opacity:0.85; }
.ac-tier-top { display:flex; align-items:center; justify-content:space-between; margin-bottom:10px; }
.ac-tier-badge { padding:4px 10px; border-radius:999px; font-size:11px; font-weight:800; }
.ac-tier-badge--junior { background:#e8f5e9; color:#2e7d32; }
.ac-tier-badge--senior { background:#fff3cc; color:#92610a; }
.ac-tier-percent { font-size:22px; font-weight:900; color:#263123; }
.ac-tier-desc { font-size:13px; color:#4a5e4a; line-height:1.5; margin:0 0 10px; }
.ac-tier-desc strong { color:#1e2a1b; }
.ac-tier-list { list-style:none; padding:0; margin:0; display:flex; flex-direction:column; gap:5px; }
.ac-tier-list li { font-size:12px; color:#4a5e4a; }

/* FORMULÁRIO */
.ac-form-card { background:#fff; border-radius:16px; padding:20px; box-shadow:0 2px 12px rgba(20,26,18,0.08); border:1px solid rgba(0,0,0,0.07); }
.ac-form-header { display:flex; align-items:center; gap:12px; margin-bottom:20px; padding-bottom:16px; border-bottom:1px solid #f0ede8; }
.ac-form-icon { font-size:24px; flex-shrink:0; }
.ac-form-header strong { display:block; font-size:15px; font-weight:800; color:#263123; }
.ac-form-header small { display:block; font-size:12px; color:#7a8e7a; margin-top:2px; }
.ac-form { display:flex; flex-direction:column; gap:14px; }
.ac-field-group { display:grid; grid-template-columns:1fr 1fr; gap:12px; }
@media(max-width:480px) { .ac-field-group { grid-template-columns:1fr; } }
.ac-label { display:flex; flex-direction:column; gap:5px; font-size:13px; font-weight:700; color:#263123; }
.ac-label--full { grid-column:1 / -1; }
.ac-label--pix-pref { margin-top:4px; }
.ac-required { color:#e07b39; }
.ac-optional { font-weight:400; color:#9aab98; font-size:11px; }
.ac-input { padding:10px 12px; border-radius:10px; border:1.5px solid #e0ddd6; font-size:14px; color:#263123; background:#fafaf8; transition:border-color 0.15s; width:100%; box-sizing:border-box; }
.ac-input:focus { outline:none; border-color:#2d4028; background:#fff; }
.ac-textarea { resize:vertical; min-height:80px; }
.ac-select { appearance:none; background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234a5e4a' stroke-width='1.5' fill='none'/%3E%3C/svg%3E"); background-repeat:no-repeat; background-position:right 12px center; }
.ac-input-prefix-wrap { position:relative; }
.ac-input-prefix { position:absolute; left:12px; top:50%; transform:translateY(-50%); font-size:14px; font-weight:700; color:#7a8e7a; pointer-events:none; }
.ac-input--with-prefix { padding-left:26px; }
.ac-field-hint { font-size:11px; color:#9aab98; font-weight:400; margin-top:2px; }
.ac-pix-section { background:#f8faf6; border-radius:12px; padding:14px; border:1px solid #e0ddd6; display:flex; flex-direction:column; gap:12px; }
.ac-pix-header { display:flex; align-items:center; gap:10px; }
.ac-pix-header span { font-size:20px; }
.ac-pix-header strong { display:block; font-size:14px; font-weight:800; color:#263123; }
.ac-pix-header small { display:block; font-size:12px; color:#7a8e7a; margin-top:2px; }
.ac-submit { padding:16px; border-radius:12px; background:linear-gradient(135deg,#2d4028,#1e2a1b); color:#c8a96e; font-size:15px; font-weight:900; box-shadow:0 4px 16px rgba(20,26,18,0.2); transition:all 0.2s; }
.ac-submit:hover:not(:disabled) { transform:translateY(-1px); box-shadow:0 6px 20px rgba(20,26,18,0.3); }
.ac-submit:disabled { opacity:0.6; }
.ac-success { display:flex; flex-direction:column; align-items:center; gap:12px; padding:30px 20px; text-align:center; }
.ac-success-icon { font-size:48px; }
.ac-success strong { font-size:18px; font-weight:900; color:#263123; }
.ac-success p { font-size:14px; color:#5a6b5e; line-height:1.6; margin:0; }

/* ADMIN — cards de solicitação de afiliado */
.affiliate-signup-section { }
.af-signup-card { background:#f8faf6; border:1px solid #e0ddd6; border-radius:12px; padding:14px; margin-bottom:10px; }
.af-signup-top { display:flex; gap:12px; justify-content:space-between; align-items:flex-start; margin-bottom:10px; }
.af-signup-top strong { display:block; font-size:14px; font-weight:800; color:#263123; }
.af-signup-top small { display:block; font-size:12px; color:#7a8e7a; margin-top:2px; }
.af-signup-sincerity { font-size:12px; color:#4a5e4a; font-style:italic; margin:6px 0 0; }
.af-signup-badge { padding:4px 10px; border-radius:999px; font-size:11px; font-weight:800; flex-shrink:0; }
.af-signup-badge--pending { background:#fff3cd; color:#856404; }
.af-signup-badge--approved { background:#d1fae5; color:#065f46; }
.af-signup-badge--rejected { background:#fee2e2; color:#991b1b; }
.af-signup-actions { display:flex; gap:8px; }
.affiliate-pix-info { display:block; font-size:11px; color:#5a6b5e; margin-top:2px; }

/* MENU PORTAL — botão afiliado */
.pp-menu-affiliate { border-color:rgba(200,169,110,0.3); background:rgba(200,169,110,0.08); }
.pp-menu-affiliate:hover { background:rgba(200,169,110,0.18); }
.pp-menu-affiliate > div strong { color:#c8a96e; }
.pp-menu-item--locked { opacity:0.5; filter:grayscale(0.6); border-color:rgba(255,255,255,0.12); background:rgba(255,255,255,0.04); cursor:not-allowed; }
.pp-menu-item--locked:hover { background:rgba(255,255,255,0.04); }
.pp-menu-item--locked > div strong { color:rgba(240,236,228,0.6); }
.pp-menu-item--locked > div small { color:rgba(200,169,110,0.4); }
.pp-menu-bonus { border-color:rgba(157,107,217,0.3); background:rgba(157,107,217,0.08); }
.pp-menu-bonus:hover { background:rgba(157,107,217,0.18); }
.pp-menu-bonus > div strong { color:#b794e6; }

/* COMISSÕES */
.af-commissions-list { display:flex; flex-direction:column; gap:10px; }
.af-commission-item {
  display:flex; align-items:center; gap:12px;
  background:rgba(255,255,255,0.03); border:1px solid rgba(255,255,255,0.06);
  border-radius:12px; padding:14px;
}
.af-comm-dot {
  width:10px; height:10px; border-radius:50%; flex-shrink:0;
  background:rgba(255,255,255,0.2);
}
.af-comm--expected .af-comm-dot, .af-comm--expected { color:#fbbf24; }
.af-comm--confirmed .af-comm-dot, .af-comm--confirmed { color:#60a5fa; }
.af-comm--paid .af-comm-dot, .af-comm--paid { color:#4ade80; }
.af-comm--cancelled .af-comm-dot, .af-comm--cancelled { color:#f87171; }
.af-comm--expected > .af-comm-dot { background:#fbbf24; }
.af-comm--confirmed > .af-comm-dot { background:#60a5fa; }
.af-comm--paid > .af-comm-dot { background:#4ade80; }
.af-comm--cancelled > .af-comm-dot { background:#f87171; }
.af-comm-info { flex:1; min-width:0; }
.af-comm-info strong { display:block; font-size:13px; font-weight:700; }
.af-comm-info small { display:block; font-size:11px; color:rgba(255,255,255,0.4); margin-top:2px; }
.af-comm-values { display:flex; flex-direction:column; gap:4px; text-align:right; }
.af-comm-values span { font-size:11px; color:rgba(255,255,255,0.4); }
.af-comm-values strong { font-size:12px; font-weight:700; color:rgba(255,255,255,0.75); }
