/* QUALITY LIFE — submenu e cadastro de afiliados no superadmin */
.tb-aff-submenu{margin:-4px 0 8px 42px;display:grid;gap:3px;border-left:1px solid rgba(148,163,184,.22);padding-left:10px}.tb-aff-submenu a{display:flex;align-items:center;gap:7px;border-radius:10px;padding:7px 10px;color:#9fb7d6;text-decoration:none;font-size:13px;font-weight:700;line-height:1.2}.tb-aff-submenu a span{font-size:14px;color:#5d8cff}.tb-aff-submenu a:hover,.tb-aff-submenu a.active{background:rgba(37,99,235,.16);color:#fff}.tb-aff-register-action{background:#16a34a!important;box-shadow:0 12px 25px rgba(22,163,74,.16)!important}.tb-aff-form{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.tb-aff-form label{display:grid;gap:7px;color:#475569;text-transform:uppercase;font-size:12px;letter-spacing:.06em;font-weight:900}.tb-aff-form input,.tb-aff-form select{width:100%;border:1px solid #dbe3ef;border-radius:14px;padding:12px 13px;background:#f8fafc;color:#0f172a;min-height:46px;font-size:14px}.tb-aff-form input:focus,.tb-aff-form select:focus{outline:3px solid rgba(37,99,235,.16);border-color:#2563eb;background:#fff}.tb-aff-register-card{max-width:1180px}.tb-aff-register-footer{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin-top:18px}.tb-aff-result{display:block;width:100%;min-height:46px;margin-top:14px;padding:14px;border-radius:16px;border:1px solid #dbe3ef;background:#f8fafc;color:#0f172a;white-space:pre-wrap;overflow:auto}.tb-aff-toast strong{display:block}.tb-aff-toast small{display:block;margin-top:4px;color:rgba(255,255,255,.78)}.tb-aff-btn.loading::after{content:"";width:12px;height:12px;border:2px solid currentColor;border-right-color:transparent;border-radius:50%;display:inline-block;animation:tbAffSpin .8s linear infinite}@keyframes tbAffSpin{to{transform:rotate(360deg)}}
@media(max-width:980px){.tb-aff-form{grid-template-columns:1fr 1fr}}@media(max-width:640px){.tb-aff-form{grid-template-columns:1fr}.tb-aff-submenu{margin-left:28px}.tb-aff-register-footer .tb-aff-btn{width:100%}}

/* v2: submenu sempre ancorado logo abaixo de Vendas de Afiliados. */
.tb-aff-submenu{width:calc(100% - 46px);box-sizing:border-box}.tb-aff-submenu a.active{background:rgba(37,99,235,.20)!important;color:#fff!important}


.tb-aff-secret-box{margin-top:18px;padding:16px;border:1px solid rgba(59,130,246,.35);background:rgba(37,99,235,.08);border-radius:18px;display:grid;gap:12px}.tb-aff-secret-box[hidden]{display:none!important}.tb-aff-secret-box strong{display:block;color:#0f172a;font-weight:800}.tb-aff-secret-box small{color:#64748b}.tb-aff-secret-row{display:flex;gap:10px;align-items:center}.tb-aff-secret-row input{flex:1;min-width:0;border:1px solid #bfdbfe;border-radius:12px;padding:12px 14px;font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;font-size:13px;background:#fff;color:#0f172a}.tb-aff-secret-help code{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace;color:#1d4ed8}@media(max-width:720px){.tb-aff-secret-row{flex-direction:column;align-items:stretch}}


/* v8: cadastro/edição de afiliado alinhado ao padrão premium do dashboard */
.tb-aff-register-shell-v8{
  width:100%;
  max-width:1480px;
  padding:28px;
  box-sizing:border-box;
}
.tb-aff-register-shell-v8 .tb-aff-page-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  margin:-8px 0 22px;
  padding:26px 28px;
  border:1px solid rgba(96,165,250,.18);
  border-radius:28px;
  background:
    radial-gradient(circle at 85% 20%, rgba(37,99,235,.35), transparent 28%),
    linear-gradient(135deg,#07111f 0%,#0f1e37 58%,#102b5f 100%);
  box-shadow:0 22px 60px rgba(2,6,23,.16);
  overflow:hidden;
  position:relative;
}
.tb-aff-register-shell-v8 .tb-aff-page-hero:after{
  content:"";
  position:absolute;
  inset:auto -70px -110px auto;
  width:260px;
  height:260px;
  border-radius:999px;
  background:rgba(59,130,246,.18);
  filter:blur(8px);
  pointer-events:none;
}
.tb-aff-register-shell-v8 .tb-aff-hero-copy,
.tb-aff-register-shell-v8 .tb-aff-hero-actions{position:relative;z-index:1;}
.tb-aff-register-shell-v8 .tb-aff-eyebrow,
.tb-aff-register-shell-v8 .tb-aff-section-tag{
  display:inline-flex;
  width:max-content;
  align-items:center;
  gap:6px;
  border-radius:999px;
  padding:6px 10px;
  background:rgba(37,99,235,.10);
  color:#1d4ed8;
  font-size:11px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.tb-aff-register-shell-v8 .tb-aff-eyebrow{
  background:rgba(147,197,253,.14);
  color:#bfdbfe;
  margin-bottom:10px;
}
.tb-aff-register-shell-v8 .tb-aff-page-hero h1{
  color:#fff!important;
  font-size:clamp(28px,3vw,42px);
  line-height:1.02;
  margin:0;
  letter-spacing:-.045em;
}
.tb-aff-register-shell-v8 .tb-aff-page-hero p{
  color:#b8c7dc!important;
  max-width:760px;
  margin:10px 0 0;
  font-size:15px;
  line-height:1.6;
}
.tb-aff-register-shell-v8 .tb-aff-hero-actions .tb-aff-btn.secondary{
  background:rgba(255,255,255,.96)!important;
  color:#07111f!important;
  border-color:rgba(255,255,255,.60)!important;
}
.tb-aff-register-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 340px;
  gap:18px;
  align-items:start;
}
.tb-aff-register-shell-v8 .tb-aff-register-card,
.tb-aff-register-shell-v8 .tb-aff-register-aside{
  max-width:none;
  border-radius:26px;
  border:1px solid rgba(226,232,240,.96);
  background:linear-gradient(180deg,#fff 0%,#fbfdff 100%);
  box-shadow:0 22px 55px rgba(15,23,42,.08);
}
.tb-aff-register-shell-v8 .tb-aff-title-premium{
  padding-bottom:16px;
  margin-bottom:18px;
  border-bottom:1px solid rgba(226,232,240,.9);
}
.tb-aff-register-shell-v8 .tb-aff-title-premium h2{
  margin:9px 0 4px;
  color:#07111f;
  font-size:22px;
  letter-spacing:-.025em;
}
.tb-aff-register-shell-v8 .tb-aff-form-premium{
  gap:16px;
}
.tb-aff-register-shell-v8 .tb-aff-form-premium label{
  color:#334155;
}
.tb-aff-register-shell-v8 .tb-aff-form-premium input,
.tb-aff-register-shell-v8 .tb-aff-form-premium select{
  min-height:50px;
  border-color:#d8e1ef;
  background:#f8fbff;
  font-weight:700;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.8);
}
.tb-aff-register-shell-v8 .tb-aff-form-premium input:focus,
.tb-aff-register-shell-v8 .tb-aff-form-premium select:focus{
  outline:4px solid rgba(37,99,235,.13);
  background:#fff;
  box-shadow:0 0 0 1px rgba(37,99,235,.18), 0 12px 24px rgba(37,99,235,.08);
}
.tb-aff-register-aside{
  position:sticky;
  top:18px;
  padding:20px!important;
}
.tb-aff-register-aside h3{
  margin:12px 0 8px;
  font-size:20px;
  color:#07111f;
  letter-spacing:-.025em;
}
.tb-aff-register-aside p{
  margin:0 0 14px;
  color:#64748b;
  font-size:14px;
  line-height:1.55;
}
.tb-aff-register-aside ul{
  list-style:none;
  display:grid;
  gap:10px;
  padding:0;
  margin:0;
}
.tb-aff-register-aside li{
  position:relative;
  padding:10px 10px 10px 34px;
  border:1px solid rgba(226,232,240,.85);
  border-radius:14px;
  background:#f8fafc;
  color:#334155;
  font-size:13px;
  line-height:1.35;
  font-weight:700;
}
.tb-aff-register-aside li:before{
  content:"✓";
  position:absolute;
  left:10px;
  top:9px;
  display:grid;
  place-items:center;
  width:18px;
  height:18px;
  border-radius:999px;
  background:#dcfce7;
  color:#166534;
  font-size:12px;
  font-weight:900;
}
.tb-aff-register-shell-v8 .tb-aff-result:empty{display:none;}
.tb-aff-register-shell-v8 .tb-aff-result{
  border-color:#c7d7fe;
  background:#eef4ff;
  color:#1e3a8a;
  font-weight:700;
}
@media(max-width:1120px){
  .tb-aff-register-layout{grid-template-columns:1fr;}
  .tb-aff-register-aside{position:static;}
}
@media(max-width:760px){
  .tb-aff-register-shell-v8{padding:18px;}
  .tb-aff-register-shell-v8 .tb-aff-page-hero{display:grid;padding:22px;border-radius:24px;}
  .tb-aff-register-shell-v8 .tb-aff-hero-actions{justify-content:flex-start;}
  .tb-aff-register-shell-v8 .tb-aff-hero-actions .tb-aff-btn{width:100%;}
}

/* v9 definitivo: remove o visual escuro da área de cadastro/edição de afiliado.
   A tela passa a seguir o padrão claro do dashboard do Superadmin. */
.tb-aff-register-shell-v9{
  width:100%;
  max-width:1480px;
  margin:0 auto;
  padding:28px;
  box-sizing:border-box;
  color:#0f172a;
  background:transparent!important;
}
.tb-aff-register-shell-v9 .tb-aff-page-hero{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  margin:0 0 22px!important;
  padding:0!important;
  border:0!important;
  border-radius:0!important;
  background:transparent!important;
  box-shadow:none!important;
  overflow:visible!important;
}
.tb-aff-register-shell-v9 .tb-aff-page-hero:after{display:none!important;content:none!important;}
.tb-aff-register-shell-v9 .tb-aff-page-hero h1{
  color:#0f172a!important;
  font-size:clamp(32px,3.5vw,44px)!important;
  line-height:1.05!important;
  margin:0!important;
  letter-spacing:-.045em!important;
}
.tb-aff-register-shell-v9 .tb-aff-page-hero p{
  color:#64748b!important;
  max-width:820px!important;
  margin:9px 0 0!important;
  font-size:16px!important;
  line-height:1.58!important;
}
.tb-aff-register-shell-v9 .tb-aff-eyebrow{
  background:#eff6ff!important;
  color:#1d4ed8!important;
  border:1px solid #dbeafe!important;
  margin-bottom:10px!important;
}
.tb-aff-register-shell-v9 .tb-aff-hero-actions .tb-aff-btn.secondary{
  background:#fff!important;
  color:#0f172a!important;
  border-color:#dbe3ef!important;
  box-shadow:none!important;
}
.tb-aff-register-shell-v9 .tb-aff-register-card,
.tb-aff-register-shell-v9 .tb-aff-register-aside{
  background:#fff!important;
  border:1px solid #e2e8f0!important;
  box-shadow:0 18px 42px rgba(15,23,42,.06)!important;
}
.tb-aff-register-shell-v9 .tb-aff-title-premium h2,
.tb-aff-register-shell-v9 .tb-aff-register-aside h3{color:#0f172a!important;}
.tb-aff-register-shell-v9 .tb-aff-register-aside p,
.tb-aff-register-shell-v9 .tb-aff-register-aside li{color:#334155!important;}
@media(max-width:760px){.tb-aff-register-shell-v9{padding:18px}.tb-aff-register-shell-v9 .tb-aff-page-hero{display:grid!important}.tb-aff-register-shell-v9 .tb-aff-hero-actions{justify-content:flex-start}.tb-aff-register-shell-v9 .tb-aff-hero-actions .tb-aff-btn{width:100%;}}
