:root{
  --bg:#0A0A0A;
  --card:#141414;
  --muted:#1f1f1f;
  --text:#FFFFFF;
  --text-2:#CFCFCF;
  --accent:#FF6A00;
  --accent-2:#ff8330;
  --border:#222;
  --glass: rgba(20,20,20,0.75);
  --shadow: 0 6px 20px rgba(0,0,0,.35);
  --glow: 0 0 0px rgba(255,106,0,0), 0 0 0px rgba(255,131,48,0);
}

body .afl-form,
body .afl-dashboard{ color:var(--text); }

/* ====== WRAP AUTH (mantido com visual moderno) ====== */
.afl-auth-wrap{ position:relative; isolation:isolate; margin:16px 0; }
.afl-auth-wrap::before,
.afl-auth-wrap::after{
  content:""; position:absolute; inset:auto; width:220px; height:220px; border-radius:50%;
  filter: blur(60px); z-index:-1; opacity:.35; animation: afl-float 14s ease-in-out infinite;
}
.afl-auth-wrap::before{ left:-40px; top:-30px; background: radial-gradient(60% 60% at 40% 40%, rgba(255,106,0,.55), transparent 60%); }
.afl-auth-wrap::after{ right:-50px; bottom:-40px; background: radial-gradient(60% 60% at 60% 60%, rgba(255,131,48,.45), transparent 60%); animation-delay: 4s; }
@keyframes afl-float{ 0%{transform:translateY(0) translateX(0)} 50%{transform:translateY(-12px) translateX(6px)} 100%{transform:translateY(0) translateX(0)} }

.afl-alert{ padding:12px 14px; border-radius:10px; margin-bottom:12px; border:1px solid var(--border); background:linear-gradient(180deg, #101010, #0c0c0c); box-shadow: var(--shadow); }
.afl-alert-ok{ border-color:#214d2a; background:linear-gradient(180deg, #132116, #0d1910); color:#c9ffd7; }
.afl-alert-err{ border-color:#4d2121; background:linear-gradient(180deg, #211313, #190d0d); color:#ffd0d0; }

/* ====== GRID AUTH ====== */
.afl-auth-grid{ display:grid; grid-template-columns: 1fr 1fr; gap:16px; }
@media (max-width: 900px){ .afl-auth-grid{ grid-template-columns:1fr; } }

/* ====== CARD/FORM ====== */
.afl-card{
  background: var(--glass); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  border:1px solid rgba(255,255,255,.06); border-radius:16px; box-shadow: var(--shadow);
  overflow:hidden; transform: translateZ(0); transition: transform .25s ease, box-shadow .25s ease;
}
.afl-card:hover{ transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.45); }

.afl-form { padding:18px; }
.afl-form h3.afl-title { margin:0 0 8px; color:var(--text); letter-spacing:.2px; }
.afl-form .afl-sub{ margin:0 0 14px; color:var(--text-2); font-size:14px; }
.afl-card-head{ display:flex; flex-direction:column; gap:6px; margin-bottom:10px; }

.afl-badge{
  align-self:flex-start; font-size:12px; font-weight:700; letter-spacing:.4px;
  padding:6px 10px; border-radius:999px; background: linear-gradient(90deg, rgba(255,106,0,.25), rgba(255,131,48,.18));
  color:#ffd5bf; border:1px solid rgba(255,106,0,.25);
}
.afl-badge-alt{ background: linear-gradient(90deg, rgba(255,131,48,.25), rgba(255,106,0,.18)); color:#ffe2cf; border-color: rgba(255,131,48,.28); }

.afl-field{ margin:0 0 10px; position:relative; }
.afl-form label{ display:block; margin:0 0 6px; color:var(--text-2); font-size:13px; }
.afl-form input[type=text],
.afl-form input[type=email],
.afl-form input[type=password]{
  width:100%; padding:12px 44px 12px 12px; border:1px solid var(--muted); border-radius:10px;
  background:#0f0f0f; color:var(--text); transition: border-color .2s ease, box-shadow .2s ease; box-shadow: var(--glow);
}
.afl-form input:focus{ outline:none; border-color: rgba(255,106,0,.55); box-shadow: 0 0 0 3px rgba(255,106,0,.15), 0 0 24px rgba(255,106,0,.08); }

.afl-has-toggle .afl-toggle-pwd{
  position:absolute; right:8px; top:30px; width:34px; height:34px; display:grid; place-items:center;
  border-radius:8px; border:1px solid var(--muted); background:#121212; color:var(--text-2);
  cursor:pointer; transition: transform .15s ease, border-color .2s ease, color .2s ease;
}
.afl-has-toggle .afl-toggle-pwd:hover{ transform: translateY(-1px); border-color: var(--accent); color: var(--accent); }

.afl-row{ display:flex; align-items:center; justify-content:space-between; gap:10px; margin:6px 0 10px; }
.afl-check{ display:flex; align-items:center; gap:8px; color:var(--text-2); font-size:13px; }
.afl-link{ color:var(--accent-2); text-decoration:none; font-size:13px; }
.afl-link:hover{ text-decoration:underline; }

.afl-actions{ margin-top:10px; }
.afl-btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:12px 16px; border-radius:12px; border:1px solid var(--border);
  background: linear-gradient(180deg, #1a1a1a, #151515);
  color:var(--text); font-weight:700; letter-spacing:.2px;
  cursor:pointer; transition: transform .1s ease, box-shadow .2s ease, border-color .2s ease;
}
.afl-btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 20px rgba(0,0,0,.35); border-color:#2b2b2b; }
.afl-btn:active{ transform: translateY(0); box-shadow:none; }

.afl-btn-accent{
  color:#000; border-color: rgba(255,106,0,.75);
  background: radial-gradient(80% 150% at 20% 20%, rgba(255,141,62,.55), transparent 55%), linear-gradient(180deg, var(--accent), var(--accent-2));
}
.afl-btn-accent:hover{ border-color:#ff9e54; box-shadow: 0 8px 24px rgba(255,106,0,.25); }
.afl-btn-glow{ animation: afl-pulse 2.6s ease-in-out infinite; }
@keyframes afl-pulse{ 0%{box-shadow:0 0 0 rgba(255,106,0,0)} 50%{box-shadow:0 0 18px rgba(255,106,0,.32)} 100%{box-shadow:0 0 0 rgba(255,106,0,0)} }

.afl-grid-2{ display:grid; grid-template-columns: 1fr 1fr; gap:10px; }
@media (max-width: 700px){ .afl-grid-2{ grid-template-columns:1fr; } }

/* ====== DASHBOARD ====== */
.afl-dashboard h3{ margin:0 0 10px; }

.afl-dashboard .afl-cards { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:12px; margin:12px 0 18px; }
.afl-dashboard .afl-card { background:var(--card); border:1px solid var(--muted); border-radius:12px; padding:12px; }
.afl-dashboard .afl-kpi-label { font-size:12px; color:var(--text-2); }
.afl-dashboard .afl-kpi-value { font-size:18px; font-weight:700; color:var(--text); }

@media (max-width: 900px){
  .afl-dashboard .afl-cards { grid-template-columns:repeat(2,minmax(0,1fr)); }
}
@media (max-width: 520px){
  .afl-dashboard .afl-cards { grid-template-columns:1fr; }
  .afl-dashboard .afl-kpi-label{ font-size:11px; }
  .afl-dashboard .afl-kpi-value{ font-size:16px; }
}

/* Link de afiliado */
.afl-linkbox {
  display:flex; gap:8px; align-items:center;
  background:var(--card); border:1px solid var(--muted); border-radius:10px;
  padding:10px; margin:10px 0 14px; color:var(--text);
}
.afl-linkbox code { display:block; word-break:break-all; color:var(--text-2); }
.afl-linkbox button { padding:6px 10px; border-radius:8px; border:1px solid var(--muted); background:#121212; color:var(--text); cursor:pointer; }
.afl-linkbox button:hover { border-color:var(--accent); color:var(--accent); }

/* Abas */
.afl-tabs { display:flex; gap:6px; margin:10px 0 14px; flex-wrap:wrap; }
.afl-tab {
  background:#121212; color:var(--text-2); border:1px solid var(--muted);
  padding:8px 12px; border-radius:10px; cursor:pointer; font-weight:600;
  transition: background .2s ease, color .2s ease, transform .12s ease;
}
.afl-tab:hover{ transform: translateY(-1px); }
.afl-tab.active { color:#000; background:var(--accent); border-color:var(--accent); }

/* ====== ÚLTIMAS VENDAS (cards compactos) ====== */
.afl-sales{
  margin:8px 0 16px;
}
.afl-sales h4{ margin:6px 0 10px; color:var(--text); }
.afl-sales-grid{
  display:grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap:10px;
}
@media (max-width: 1000px){ .afl-sales-grid{ grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 520px){ .afl-sales-grid{ grid-template-columns: 1fr; } }

.afl-sale{
  background:var(--card); border:1px solid var(--muted); border-radius:12px; padding:10px;
}
.afl-sale .afl-sale-row{ display:flex; align-items:center; justify-content:space-between; gap:8px; margin-bottom:6px; }
.afl-sale .afl-sale-label{ color:var(--text-2); font-size:12px; }
.afl-sale .afl-sale-value{ color:var(--text); font-weight:700; font-size:16px; }
.afl-sale .afl-sale-status{ font-size:12px; font-weight:700; padding:4px 8px; border-radius:999px; background:#121212; border:1px solid var(--muted); text-transform:uppercase; letter-spacing:.4px; }

.afl-sales-actions{ margin-top:8px; display:flex; justify-content:flex-end; }
.afl-see-all{ text-decoration:none; }

@media (max-width: 520px){
  .afl-sale .afl-sale-value{ font-size:15px; }
}

/* ====== TABELA PADRÃO ====== */
.afl-table-wrap { overflow:auto; }
.afl-table { width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--muted); border-radius:12px; overflow:hidden; }
.afl-table th, .afl-table td { padding:10px 12px; border-bottom:1px solid var(--muted); text-align:left; color:var(--text); font-size:14px; }
.afl-table thead th { background:#0f0f0f; font-weight:600; color:var(--text-2); }

@media (max-width: 700px){
  .afl-table th, .afl-table td { padding:8px 10px; font-size:12.5px; }
}

/* ====== “Total do mês” ====== */
.afl-month-total{
  margin:12px 0 4px; padding:12px; border-radius:12px;
  background:linear-gradient(180deg, #151515, #111); border:1px solid var(--muted);
}
.afl-month-total .afl-month-title{ color:var(--text-2); font-size:12px; margin:0 0 6px; }
.afl-month-total .afl-month-value{ color:var(--text); font-weight:800; font-size:18px; }

@media (max-width: 520px){
  .afl-month-total .afl-month-value{ font-size:16px; }
}
