/* =========================================================
   TOKENS / BASE
   ========================================================= */
:root{
  /* Paleta base */
  --bg:#0b0f15;
  --panel:#111824;
  --panel-2:#0d1520;
  --card:#0c131f;
  --chip:#122133;
  --border:#213046;
  --border-2:#1c2a3e;
  --text:#e8edf4;
  --muted:#9aa6bb;
  --accent:#21c0ff;
  --accent-2:#19e3a0;
  --danger:#ff6b6b;

  --row:#0f1726;
  --row-zebra:#0c1422;

  --c-red:#ff6b6b;
  --c-orange:#ffb25e;
  --c-yellow:#ffd75e;
  --c-green:#2ecc71;

  --radius:18px;
  --radius-sm:12px;
  --shadow:0 10px 40px -18px rgba(0,0,0,.6);

  /* Layout (alinhado com Escalação Otimizada) */
  --container:1800px;
  --topbar-h:56px;

  /* Imagens */
  --brand-url:url("/assets/img/pavao-misterioso.png");
}

*{ box-sizing:border-box }
html,body{ height:100% }
body{
  margin:0; color:var(--text);
  background:
    radial-gradient(1200px 800px at 20% -10%, #122038 0%, transparent 60%),
    radial-gradient(800px 600px at 110% -20%, rgba(0,227,150,.08) 0%, transparent 60%),
    var(--bg);
  font:14px/1.5 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

/* aurora sutil */
body::before{
  content:""; position:fixed; inset:-25vh -25vw;
  background:
    radial-gradient(40% 30% at 15% 10%, rgba(33,192,255,.10) 0%, transparent 60%),
    radial-gradient(35% 25% at 85% 20%, rgba(25,227,160,.10) 0%, transparent 62%),
    radial-gradient(55% 35% at 60% 90%, rgba(33,192,255,.06) 0%, transparent 70%);
  filter:blur(34px); pointer-events:none; z-index:-1;
  animation:aurora 26s linear infinite alternate;
}
@keyframes aurora{ 0%{transform:translate3d(0,0,0)} 100%{transform:translate3d(-2vw,1.5vh,0)} }
@media (prefers-reduced-motion:reduce){ body::before{ animation:none } }

h1{ font-size:22px; margin:0 0 6px; letter-spacing:.3px }
.wrap{ max-width:var(--container); margin:28px auto 40px; padding:0 16px }

/* =========================================================
   PANELS / GRID
   ========================================================= */
.panel{
  background:linear-gradient(180deg, rgba(18,24,36,.92), rgba(12,19,32,.94));
  border:1px solid var(--border); border-radius:var(--radius);
  padding:16px; margin-bottom:16px; box-shadow:var(--shadow); backdrop-filter:blur(4px);
}
.panel:hover{ border-color:#2e3c55 }

.panel--halo{ position:relative; overflow:hidden; border:1px solid var(--border-2) }
.panel--halo::after{
  content:""; position:absolute; top:-60px; right:-60px; width:220px; height:220px; border-radius:50%;
  border:1px solid rgba(33,192,255,.25);
  box-shadow:0 0 0 28px rgba(33,192,255,.05) inset, 0 0 60px rgba(33,192,255,.06);
  pointer-events:none;
}

.row{ display:flex; flex-wrap:wrap; gap:12px }
.col{ flex:1 1 260px; min-width:260px }
.grid{ display:grid; grid-template-columns:1fr auto; gap:12px; align-items:center }

label{ display:block; margin:0 0 6px; color:var(--muted); font-weight:600 }

/* =========================================================
   INPUTS / BUTTONS / TOOLBAR
   ========================================================= */
input[type="file"]{
  display:block; width:100%; min-height:38px; padding:8px 10px;
  background:#0b0f17; border:1px solid var(--border); border-radius:12px; color:#e9eef8;
}

.btn{
  display:inline-flex; align-items:center; gap:8px; cursor:pointer;
  border:0; padding:10px 14px; border-radius:999px; font-weight:700;
  color:#061018; background:linear-gradient(180deg,#58d6ff,#39b8eb);
  transition:transform .06s, box-shadow .2s, filter .2s;
  box-shadow:0 8px 24px -12px rgba(33,192,255,.35);
}
.btn:hover{ filter:brightness(1.04) }
.btn:active{ transform:translateY(1px) }
.btn:disabled{ opacity:.55; cursor:not-allowed }
.btn.secondary{ color:#cfe3ff; background:linear-gradient(180deg,#1a2535,#162031); border:1px solid #2a3952; box-shadow:none }
.btn.ghost{ color:#c9d7ee; background:transparent; border:1px dashed #2a3952; box-shadow:none }
.btn.success{ color:#072016; background:linear-gradient(180deg,#00f0a8,#00bf82); box-shadow:0 8px 24px -12px rgba(0,227,150,.35) }
.btn.biaplus{
  color:#05221a; background:linear-gradient(180deg,#00f0a8,#00c68f);
  box-shadow:0 10px 26px -10px rgba(0,227,150,.4), 0 0 0 2px rgba(0,227,150,.16);
  border:1px solid rgba(0,227,150,.6);
}
.btn.biaplus.active{
  filter:brightness(1.03) saturate(1.08);
  box-shadow:0 10px 26px -8px rgba(0,227,150,.5), 0 0 0 3px rgba(0,227,150,.22);
}
.btn.toggle{ color:#cfe3ff; background:linear-gradient(180deg,#172337,#111b2b); border:1px solid #2a3952 }
.btn.toggle.active{
  color:#05111e; background:linear-gradient(180deg,#58d6ff,#39b8eb);
  border-color:rgba(33,192,255,.9);
  box-shadow:0 10px 26px -10px rgba(33,192,255,.4), 0 0 0 2px rgba(33,192,255,.16);
}

.toolbar{ display:flex; gap:10px; align-items:center; flex-wrap:wrap }
.toolbar .control{
  min-height:40px; padding:8px 12px; border-radius:12px;
  background:var(--card); border:1px solid var(--border); color:#e9eef8; box-shadow: inset 0 0 0 1px #0e1828;
}
.toolbar input[type="search"]{ width:220px; background:transparent; border:0; color:#fff; outline:none }
.toolbar.space{ justify-content:space-between }

.slider{ display:flex; align-items:center; gap:10px }
.slider input[type="range"]{ width:220px }

.hint{ font-size:12px; color:var(--muted) }
.muted{ color:var(--muted) }
.pill{ background:#0f1826; border:1px solid var(--border); border-radius:999px; padding:6px 10px }
code.k{ background:#111a28; border:1px solid var(--border); padding:1px 6px; border-radius:8px }

/* =========================================================
   CHIPS / BADGES
   ========================================================= */
.chips{ display:grid; grid-template-columns:repeat(10,auto); gap:12px }
.chip{
  display:inline-flex; align-items:center; gap:8px; justify-content:flex-start;
  background:var(--chip); color:#dbe2f1; border:1px solid var(--border);
  padding:8px 12px; border-radius:999px; font-weight:700; user-select:none; cursor:pointer;
  box-shadow:inset 0 0 0 1px #0e1828; transition:box-shadow .2s, transform .06s, border-color .2s;
}
.chip:hover{ box-shadow:inset 0 0 0 1px #2b3b58 }
.chip:active{ transform:translateY(1px) }
.chip.active{ border-color:rgba(33,192,255,.85); box-shadow:0 0 0 4px rgba(33,192,255,.08) }

#chips-pos-wrap{ position:relative; overflow-x:auto; padding:0 6px 4px }
#chips-pos{ display:flex; flex-wrap:nowrap; gap:12px; padding:4px 0; scrollbar-width:thin; scrollbar-color:#2a3a54 transparent }
#chips-pos::-webkit-scrollbar{ height:8px }
#chips-pos::-webkit-scrollbar-thumb{ background:#2a3a54; border-radius:999px }

.chips-status{ display:flex; gap:8px; flex-wrap:wrap; align-items:center }
.badge{
  display:inline-flex; align-items:center; gap:6px; padding:6px 12px; border-radius:999px;
  font-weight:800; font-size:12px; border:1px solid #1f2a3e; cursor:pointer; user-select:none;
  background:#0f1826; color:#d8e5fb;
}
.badge i{ width:8px; height:8px; border-radius:50%; background:#fff8; box-shadow:0 0 0 2px #0006 inset; display:inline-block }
.badge-provavel{ color:#c8ffdb; background:#0f2f1c; border-color:#2ecc71 }
.badge-duvida{ color:#fff3c2; background:#2b260a; border-color:#f1c40f }
.badge-suspenso{ color:#ffd6d6; background:#2a0d0d; border-color:#e74c3c }
.badge-contundido{ color:#ffe1c7; background:#2c1c08; border-color:#e67e22 }
.badge-nulo{ color:#cfd6e3; background:#121a28; border-color:#253349 }
.badge.active{ border-color:rgba(33,192,255,.8); box-shadow:0 0 0 4px rgba(33,192,255,.10); outline:2px solid rgba(33,192,255,.6); outline-offset:0 }

/* =========================================================
   TABELA
   ========================================================= */
.table-wrap{ overflow:auto; border-radius:calc(var(--radius) - 6px) }
table{
  width:100%; border-collapse:separate; border-spacing:0;
  background:var(--panel-2); border:1px solid var(--border-2);
  border-radius:calc(var(--radius) - 6px); overflow:hidden;
}
thead th{
  position:sticky; top:0; z-index:2;
  background:linear-gradient(180deg,#0f1b2a,#0b1421 78%);
  color:#b9c6da; text-align:left; padding:12px 10px; font-size:13px;
  cursor:pointer; user-select:none; border-bottom:1px solid #1f2b40; letter-spacing:.2px;
}
thead th:first-child{ border-top-left-radius:14px }
thead th:last-child{ border-top-right-radius:14px }
thead th .sort{ opacity:.65; margin-left:6px }

tbody td{ padding:12px 10px; border-bottom:1px solid #182235; color:#e6edf8 }
tbody tr:hover{ background:var(--row) }
tbody tr:nth-child(even){ background:var(--row-zebra) }

.right{ text-align:right }
.logo{ width:22px; height:22px; object-fit:contain; background:#0d1118; border-radius:6px; border:1px solid var(--border) }
td.club{ display:flex; align-items:center; gap:8px }

/* Cabeçalhos em duas linhas */
.table-wrap table thead th{
  white-space: normal;   /* quebra linha habilitada */
  line-height: 1.25;
  text-align: center;
}

.tag-status{ font-size:12px; padding:4px 8px; border-radius:999px; font-weight:800; border:1px solid transparent; display:inline-block }
.tag-provavel{ color:#c8ffdb; background:#10331c; border-color:#2ecc71 }
.tag-duvida{ color:#fff3c2; background:#2c2608; border-color:#f1c40f }
.tag-suspenso{ color:#ffd6d6; background:#2a0b0b; border-color:#e74c3c }
.tag-contundido{ color:#ffe1c7; background:#2b1a08; border-color:#e67e22 }
.tag-nulo{ color:#d6dde6; background:#1c212b; border-color:#95a5a6 }

/* Heatmap */
.c-red{ color:var(--c-red) } .c-orange{ color:var(--c-orange) }
.c-yellow{ color:var(--c-yellow) } .c-green{ color:var(--c-green) }

/* =========================================================
   DRAWER (colunas)
   ========================================================= */
.drawer-backdrop{ position:fixed; inset:0; background:rgba(0,0,0,.55); display:none; z-index:60 }
.drawer{
  position:absolute; top:0; right:0; height:100%; width:min(480px, 92vw);
  background:#0f1624; border-left:1px solid #28364f; box-shadow:-20px 0 60px rgba(0,0,0,.35);
  transform:translateX(100%); transition:transform .22s; border-top-left-radius:18px; border-bottom-left-radius:18px;
}
.drawer.open{ transform:translateX(0) }
.drawer-header{ display:flex; align-items:center; justify-content:space-between; padding:14px; border-bottom:1px solid #1f2a3e }
.drawer-header h2{ margin:0; font-size:18px }
.drawer-body{ padding:12px 14px; height:calc(100% - 58px); display:grid; grid-template-rows:auto auto 1fr auto; gap:10px }
.drawer .control{ background:#0e1522; border:1px solid #22314a; border-radius:12px; padding:8px 10px; min-height:38px }
.drawer input[type="search"]{ width:100%; background:transparent; color:#fff; border:0; outline:none }
.drawer-toolbar{ display:flex; gap:8px; flex-wrap:wrap }
.cols-sort{ list-style:none; margin:0; padding:0; overflow:auto; border:1px solid #22314a; border-radius:12px; background:#0c1220 }
.cols-sort li{ display:flex; align-items:center; gap:10px; padding:8px 10px; border-bottom:1px solid #141c2b; user-select:none }
.cols-sort li:last-child{ border-bottom:0 }
.drag-handle{ cursor:grab; font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,monospace; opacity:.7 }
.tag-mini{ margin-left:auto; font-size:11px; color:#9fb0c8; background:#0b1423; border:1px solid #1f2a3e; padding:2px 6px; border-radius:999px }
.cols-sort li.dragging{ opacity:.6; background:#0f1a2e }
.cols-sort li.drop-target{ outline:2px dashed #3fb7ff }

/* Acessibilidade */
:focus-visible{ outline:2px solid #3fb7ff; outline-offset:2px; border-radius:8px }

/* Scrollbars */
::-webkit-scrollbar{ width:10px; height:10px }
::-webkit-scrollbar-track{ background:transparent }
::-webkit-scrollbar-thumb{ background:#1f2c42; border-radius:10px }
::-webkit-scrollbar-thumb:hover{ background:#263852 }

/* Ações de clubes */
.clubs-actions{ display:flex; gap:8px; flex-wrap:wrap; margin:6px 0 10px }
.btn.micro{ padding:6px 10px; font-weight:800; font-size:12px }

/* força centralização só na tabela do dash */
.table-wrap table thead th.center-num,
.table-wrap table tbody td.num { 
  text-align: center !important;
}

/* BIA+ premium – tipografia */
.bia-cell{ text-align:center }
.bia-pill{
  font-weight:900; color:inherit; text-shadow:0 0 6px rgba(255,255,255,.2);
  letter-spacing:.3px; transition:transform .06s, text-shadow .2s;
}
.bia-pill:hover{ transform:scale(1.08); text-shadow:0 0 8px rgba(255,255,255,.35) }

/* =========================================================
   MOBILE (≤640px)
   ========================================================= */
@media (max-width:640px){
  .wrap{ padding:0 10px }
  .panel{ padding:12px }

  .toolbar.space{ flex-direction:column; align-items:stretch; gap:8px }
  .toolbar.space > div{ width:100% }
  .toolbar .control{ width:100% }
  .toolbar input[type="search"]{ width:100% }
  .slider{ width:100%; justify-content:space-between }
  .slider input[type="range"]{ width:100% }

  .toolbar .btn{ flex:1 1 0; justify-content:center; min-height:40px }
  .btn.toggle, .btn.biaplus{ width:100% }

  #chips{ display:flex; overflow-x:auto; gap:8px; padding:4px 2px 8px }
  #chips .chip{ flex:0 0 auto }
  #chips-pos-wrap{ padding:0 }
  #chips-pos{ gap:8px; padding:4px 0 }

  thead th{ font-size:12px; padding:10px 8px }
  tbody td{ padding:10px 8px }
  .logo{ width:18px; height:18px }

  #btn-expand, #btn-heatmap{ display:none }
}

/* =========================================================
   BRANDING (marca/água)
   ========================================================= */
.brand-mini{
  width:22px; height:22px; border-radius:50%;
  background:var(--brand-url) center/cover no-repeat;
  box-shadow:0 0 10px rgba(33,192,255,.25), inset 0 0 0 1px rgba(255,255,255,.06);
}
.brand-mark{
  position:fixed; right:2vw; bottom:4vh; z-index:0; pointer-events:none;
  width:min(18vmax,320px); aspect-ratio:1/1; opacity:.16;
  background:var(--brand-url) center/contain no-repeat;
  filter:drop-shadow(0 0 24px rgba(33,192,255,.12));
  animation:brandPulse 5.5s ease-in-out infinite; mix-blend-mode:screen;
}
@keyframes brandPulse{ 0%,100%{ transform:scale(1) rotate(0) } 50%{ transform:scale(1.04) rotate(2deg) } }

.panel--brand{ position:relative; overflow:hidden }
.panel--brand::before{
  content:""; position:absolute; inset:auto -40px -40px auto; width:220px; aspect-ratio:1;
  background:var(--brand-url) center/contain no-repeat; opacity:.10;
  filter:drop-shadow(0 0 18px rgba(33,192,255,.12)); transform:rotate(-8deg); pointer-events:none;
}
@media (max-width:640px){
  .brand-mark{ width:38vw; right:2vw; bottom:6vh; opacity:.14 }
  .panel--brand::before{ width:150px; opacity:.12 }
}

/* =========================================================
   TOPBAR (appbar) – vidro
   ========================================================= */
.appbar-wrap{
  position:sticky; top:0; z-index:50; padding:10px 16px 0 !important; /* sem padding-bottom */
  background:linear-gradient(180deg, rgba(10,16,22,.85), rgba(10,16,22,0));
}
.appbar{
  max-width:var(--container); margin:0 auto;
  height:56px; padding:0 14px; display:flex; align-items:center; gap:14px;
  border:1px solid #1a2a3f; border-radius:14px;
  background:linear-gradient(180deg,#0f1724,#0d1520);
  backdrop-filter:blur(6px);
  box-shadow:0 10px 30px rgba(0,0,0,.35), inset 0 0 0 1px rgba(255,255,255,.02);
}
.appbar .brand{ display:flex; align-items:center; gap:8px; margin-right:8px; white-space:nowrap; font-weight:800; color:#bfffe5 }
.appbar .brand img{ width:18px; height:18px; filter:drop-shadow(0 1px 4px rgba(125,211,252,.25)) }
.appbar .crumbs{
  display:flex; align-items:center; gap:8px; min-width:0; overflow:auto; white-space:nowrap; color:#a9c3dd;
}
.appbar .crumbs a{ color:#d7e9ff; text-decoration:none; padding:6px 8px; border-radius:10px }
.appbar .crumbs a:hover{ background:#122232 }
.appbar .crumbs a[aria-current="page"]{ background:#122232; color:#e9f3ff; font-weight:800 }
.appbar .sep{ width:6px; height:6px; border-radius:50%; background:#2b415a; opacity:.85 }
.appbar .actions{ margin-left:auto; display:flex; gap:8px }
.appbar .btn{
  height:34px; padding:0 12px; border-radius:10px; cursor:pointer;
  border:1px solid rgba(255,255,255,.06);
  background:linear-gradient(180deg,#143126,#122a22);
  color:#defeea; font-weight:700;
  box-shadow:0 0 0 1px rgba(46,229,157,.10), 0 8px 20px rgba(46,229,157,.14);
  transition:filter .12s, transform .05s, box-shadow .12s;
}
.appbar .btn:hover{ filter:brightness(1.07) }
.appbar .btn:active{ transform:translateY(1px) }
.appbar .btn--ghost{ background:linear-gradient(180deg,#122533,#0f2030); color:#d7efff; box-shadow:0 0 0 1px rgba(125,211,252,.10), 0 8px 18px rgba(125,211,252,.12) }

@media (max-width:768px){
  .appbar{ height:50px; border-radius:12px }
  .appbar .brand{ display:none }
  .appbar .crumbs{ font-size:13px }
  .appbar .btn span{ display:none }
}

/* Título com gradiente (se for usar) */
.topbar h1{
  margin:0; font-size:22px; font-weight:900; letter-spacing:.4px; white-space:nowrap;
  color:#58d6ff;
  background:linear-gradient(90deg,#58d6ff 0%,#19e3a0 80%);
  background-clip:text; -webkit-background-clip:text; -webkit-text-fill-color:transparent; color:transparent;
  text-shadow:0 0 18px rgba(33,192,255,.25); display:flex; align-items:center; gap:10px;
}
.topbar .badge{
  width:28px; height:28px; border-radius:50%;
  background:#0b111a var(--brand-url) center/cover no-repeat;
  box-shadow:0 0 0 2px rgba(33,192,255,.25), 0 0 14px rgba(33,192,255,.25);
  flex-shrink:0;
}


/* =========================================================
   LOADING OVERLAY (unificado)
   ========================================================= */
[hidden]{display:none!important}

/* Loader */
.load-overlay{position:fixed;inset:0;display:grid;place-items:center;
  background:rgba(5,10,16,.55);backdrop-filter:blur(2px);z-index:9999}
.load-box{min-width:min(520px,86vw);background:linear-gradient(180deg,#0f1721,#0d1520);
  border:1px solid #1a2b40;border-radius:14px;padding:14px 16px;box-shadow:0 20px 60px rgba(0,0,0,.45);
  color:#d7e9ff;display:flex;flex-direction:column;gap:10px}
.load-row{display:flex;align-items:center;gap:10px}
.load-spinner{width:20px;height:20px;border-radius:50%;border:3px solid rgba(125,211,252,.25);
  border-top-color:#22d3ee;animation:spin .8s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

.load-bar{height:8px;background:#0f2233;border-radius:999px;overflow:hidden}
#lb-fill,.load-bar>.load-fill{height:100%;width:0%;
  background:linear-gradient(90deg,rgba(125,211,252,.7),rgba(46,229,157,.9));
  box-shadow:0 0 8px rgba(46,229,157,.5);transition:width .35s ease}

/* Nada “vaza” durante o boot */
body.booting .brand-mark,
body.booting .float-cta,
body.booting .decor,
body.booting .whatsapp-btn{display:none!important}


/* =========================================================
   TIPOGRAFIA / LARGURA – DESKTOP AMPLO
   ========================================================= */
@media (min-width:1680px){
  :root{ --container:1760px }
  body{ font-size:15px }
  .panel{ padding:14px }
  .table-wrap #grid th, .table-wrap #grid td{ padding:10px 12px }
}
@media (min-width:1600px){
  .chips .chip{ transform:scale(1.04) }
  .toolbar .btn{ padding:10px 14px }
}




/* ordem e presença do CTA contam muito */
.hero .cta-buttons{ gap:14px; justify-content:center }
.hero .btn-assinar{ font-size:1.05rem; min-width:180px; padding:14px 26px; transform:translateY(0) scale(1.02) }
.hero .btn-assinar:hover{ transform:translateY(-2px) scale(1.05) }
.hero .btn-login{ opacity:.9 }

.hero-benefits-mini{
  display:flex; gap:10px 14px; flex-wrap:wrap; justify-content:center;
  margin:10px 0 4px; padding:0; list-style:none; color:#cfe3f7; font-weight:700;
}
.hero-benefits-mini li{
  padding:6px 10px; border-radius:999px;
  background:rgba(47,209,255,.08); border:1px solid rgba(125,211,252,.22);
  font-size:.9rem;
}
.hero-trust{
  margin:4px 0 0; font-size:.88rem; color:#9ec6db; opacity:.95
}

/* CTA fixo ao rolar */
.sticky-cta{
  position:fixed; left:50%; transform:translateX(-50%) translateY(120%);
  bottom:14px; z-index:30; display:flex; gap:10px; align-items:center;
  background:rgba(9,16,23,.9); border:1px solid rgba(125,211,252,.18);
  box-shadow:0 10px 26px rgba(0,0,0,.45); backdrop-filter:blur(8px);
  padding:10px 12px; border-radius:12px; transition:transform .25s ease;
}
.sticky-cta.show{ transform:translateX(-50%) translateY(0) }
.sticky-cta .btn-assinar{ padding:10px 18px; min-width:auto; font-size:.98rem }
.sticky-cta .tiny{ color:#9ec6db; font-size:.86rem; margin-left:6px }
@media (max-width:520px){
  .sticky-cta{ width:calc(100vw - 20px); bottom:10px }
  .sticky-cta .tiny{ display:none }
}
