/* ============ CSDM // CONTROL — tactical dark console ============ */
:root {
  --bg:        #080a0e;
  --bg-2:      #0b0e13;
  --panel:     #0f131a;
  --panel-2:   #141923;
  --line:      #1c2330;
  --line-2:    #283142;
  --text:      #e7ecf3;
  --dim:       #8b95a7;
  --faint:     #565f70;

  --accent:    #ff7a18;   /* amber / fire */
  --accent-2:  #ffb24d;
  --accent-dk: #c4560a;

  --slate:     #6b7585;   /* pendente */
  --blue:      #4aa3ff;   /* em análise / baixando */
  --green:     #34d399;   /* analisada */
  --amber:     #ffbb3d;   /* inválida */
  --red:       #ff5f5f;   /* erro */

  --r: 4px;
  --shadow: 0 18px 50px -18px rgba(0,0,0,.8);
  --ease: cubic-bezier(.2,.7,.2,1);
  --mono: 'JetBrains Mono', ui-monospace, monospace;
  --ui: 'Chakra Petch', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--ui);
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 82% -8%, rgba(255,122,24,.10), transparent 60%),
    radial-gradient(900px 700px at -5% 110%, rgba(74,163,255,.07), transparent 55%),
    linear-gradient(180deg, var(--bg-2), var(--bg));
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
/* faint tactical grid + grain */
body::before {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 0%, #000 30%, transparent 90%);
}
.grain {
  position: fixed; inset: 0; z-index: 0; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.035'/%3E%3C/svg%3E");
}

/* ---------------- app layout: sidebar + content ---------------- */
.app { display: flex; min-height: 100vh; position: relative; z-index: 1; }
.app[hidden] { display: none; }
.sidebar {
  width: 250px; flex: none; height: 100vh; position: sticky; top: 0;
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, rgba(14,18,24,.97), rgba(9,11,15,.97));
  border-right: 1px solid var(--line);
  padding: 22px 16px 18px;
  animation: slidein-l .5s var(--ease) both;
}
.side-brand { display: flex; align-items: center; gap: 12px; padding: 4px 6px 18px; border-bottom: 1px solid var(--line); }
.side-brand .brand-name { text-transform: uppercase; font-size: 18px; }
.brand-name em { color: var(--accent); font-style: normal; }
.side-nav { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.nav-section { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.8px; text-transform: uppercase; color: var(--faint); padding: 4px 10px 10px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: var(--r);
  color: var(--dim); text-decoration: none; font-weight: 500; font-size: 14px; letter-spacing: .3px;
  border: 1px solid transparent; position: relative; transition: .16s var(--ease);
}
.nav-item svg { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.nav-item:hover { color: var(--text); background: var(--panel); }
.nav-item.active { color: var(--accent-2); background: rgba(255,122,24,.1); border-color: rgba(255,122,24,.22); }
.nav-item.active::before { content: ""; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
.side-foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.side-status { display: flex; align-items: center; gap: 9px; padding: 9px 11px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); font-family: var(--mono); font-size: 10.5px; color: var(--dim); }
.side-status .host { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.side-ver { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.5px; color: var(--faint); text-align: center; }
.content { flex: 1; min-width: 0; height: 100vh; overflow-y: auto; }
.view { max-width: 1280px; margin: 0 auto; padding: 26px 30px 70px; animation: drop .4s var(--ease) both; }
.view[hidden] { display: none; }
.view-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 22px; flex-wrap: wrap; }
.view-head h1 { font-size: 23px; font-weight: 700; letter-spacing: .5px; margin: 0; text-transform: uppercase; }
.view-head h1 b { color: var(--accent); }
.view-sub { font-family: var(--mono); font-size: 10.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); margin: 7px 0 0; }
.view-head .hud { margin: 0; }
.form-panel { padding: 26px 28px; max-width: 640px; }
.form-panel .modal-hint { margin-top: 0; margin-bottom: 20px; }
@keyframes slidein-l { from { opacity: 0; transform: translateX(-14px); } }
@media (max-width: 860px) {
  .sidebar { width: 62px; padding: 18px 9px; }
  .side-brand { justify-content: center; padding: 4px 0 14px; }
  .side-brand .brand-text, .nav-item > span, .nav-section, .side-status .host, .side-ver { display: none; }
  .nav-item { justify-content: center; padding: 11px 0; }
  .nav-item.active::before { left: -9px; }
  .view { padding: 20px 16px 60px; }
}

::-webkit-scrollbar { width: 11px; height: 11px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-corner { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #36425a; background-clip: content-box; }

/* ---------------- top bar ---------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 28px;
  padding: 16px 26px;
  background: linear-gradient(180deg, rgba(10,13,18,.92), rgba(10,13,18,.74));
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  animation: drop .5s var(--ease) both;
}
.brand { display: flex; align-items: center; gap: 13px; }
.crosshair { width: 34px; height: 34px; flex: none; overflow: visible; }
.crosshair circle, .crosshair line, .crosshair path { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
/* cadeira de rodas: a RODA gira (animateTransform no SVG); cubo com glow âmbar */
.wc-hub { fill: var(--accent); stroke: none; filter: drop-shadow(0 0 4px var(--accent)); }
.wc-body { stroke-width: 1.7; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-weight: 700; font-size: 19px; letter-spacing: 1.5px; }
.brand-name i { color: var(--accent); font-style: normal; margin: 0 1px; }
.brand-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 2px; color: var(--faint); text-transform: uppercase; margin-top: 5px; }

.hud { display: flex; gap: 8px; margin-left: 6px; }
.hud-cell {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  min-width: 62px; padding: 8px 10px 7px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  position: relative; overflow: hidden;
}
.hud-cell::before { content:""; position:absolute; left:0; top:0; bottom:0; width:2px; background: var(--line-2); }
.hud-num { font-family: var(--mono); font-weight: 700; font-size: 18px; letter-spacing: -.5px; }
.hud-lbl { font-size: 9px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); }
.c-slate { color: var(--slate); } .c-blue { color: var(--blue); } .c-green { color: var(--green); }
.c-amber { color: var(--amber); } .c-red { color: var(--red); }

.top-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.sftp-chip {
  display: flex; align-items: center; gap: 9px; padding: 8px 13px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 100px;
  font-family: var(--mono); font-size: 11px; color: var(--dim); cursor: default;
}
.dot-ring { width: 8px; height: 8px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 0 rgba(52,211,153,.6); animation: ring 2.4s ease-out infinite; }
.dot-ring.off { background: var(--red); animation: none; box-shadow: none; }

.icon-btn {
  width: 38px; height: 38px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  color: var(--dim); cursor: pointer; transition: .18s var(--ease);
}
.icon-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.icon-btn:hover { color: var(--accent); border-color: var(--accent-dk); background: var(--panel-2); }

/* ---------------- stage / toolbar ---------------- */
.stage { position: relative; z-index: 1; max-width: 1320px; margin: 0 auto; padding: 26px 26px 70px; }
.toolbar { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 20px; animation: drop .5s var(--ease) .06s both; }
.actions { display: flex; gap: 10px; }

.btn {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--ui); font-weight: 600; font-size: 13px; letter-spacing: .6px;
  padding: 11px 17px; border-radius: var(--r); border: 1px solid transparent;
  cursor: pointer; transition: .18s var(--ease); white-space: nowrap; text-transform: uppercase;
}
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.btn-fire svg { fill: currentColor; stroke: none; }
.btn-primary { background: var(--panel-2); color: var(--text); border-color: var(--line-2); }
.btn-primary:hover { border-color: var(--accent); color: #fff; background: #1a212d; }
.btn-fire {
  background: linear-gradient(180deg, var(--accent-2), var(--accent));
  color: #1a0f02; border-color: var(--accent-dk);
  box-shadow: 0 6px 22px -8px rgba(255,122,24,.6), inset 0 1px 0 rgba(255,255,255,.3);
}
.btn-fire:hover { filter: brightness(1.08); box-shadow: 0 8px 28px -6px rgba(255,122,24,.75), inset 0 1px 0 rgba(255,255,255,.4); }
.btn-ghost { background: transparent; color: var(--dim); border-color: var(--line-2); }
.btn-ghost:hover { color: var(--text); border-color: var(--accent-dk); }
.btn-danger { background: linear-gradient(180deg, #f2555a, #d23b40); color: #fff; border-color: #d23b40; box-shadow: 0 6px 18px -8px rgba(210,59,64,.6); }
.btn-danger:hover { filter: brightness(1.07); }
.btn:disabled { opacity: .5; cursor: progress; }
.btn.loading svg { animation: spin .9s linear infinite; }

.filters { display: flex; gap: 6px; flex-wrap: wrap; }
.chip {
  font-family: var(--ui); font-size: 12px; font-weight: 500; letter-spacing: .4px;
  padding: 8px 13px; border-radius: 100px; cursor: pointer; transition: .16s var(--ease);
  background: var(--panel); border: 1px solid var(--line); color: var(--dim);
}
.chip:hover { color: var(--text); border-color: var(--line-2); }
.chip.is-active { background: rgba(255,122,24,.12); border-color: var(--accent); color: var(--accent-2); }

.tool-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.last-sync { font-family: var(--mono); font-size: 10.5px; letter-spacing: .3px; color: var(--faint); white-space: nowrap; }
.auto { display: flex; align-items: center; gap: 8px; cursor: pointer; user-select: none; }
.auto input { display: none; }
.auto .track { width: 38px; height: 20px; border-radius: 100px; background: var(--panel); border: 1px solid var(--line-2); position: relative; transition: .2s var(--ease); }
.auto .thumb { position: absolute; top: 2px; left: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--faint); transition: .2s var(--ease); }
.auto input:checked + .track { background: rgba(52,211,153,.15); border-color: var(--green); }
.auto input:checked + .track .thumb { left: 20px; background: var(--green); box-shadow: 0 0 8px rgba(52,211,153,.7); }
.auto-lbl { font-family: var(--mono); font-size: 11px; color: var(--dim); text-transform: uppercase; letter-spacing: 1px; }

/* ---------------- panel + corners ---------------- */
.panel { position: relative; background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.corner { position: absolute; width: 12px; height: 12px; border: 1.5px solid var(--accent); opacity: .55; pointer-events: none; }
.corner.tl { top: -1px; left: -1px; border-right: 0; border-bottom: 0; }
.corner.tr { top: -1px; right: -1px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: -1px; left: -1px; border-right: 0; border-top: 0; }
.corner.br { bottom: -1px; right: -1px; border-left: 0; border-top: 0; }

.table-panel { animation: drop .5s var(--ease) .12s both; }
.table-scroll { overflow-x: auto; }
table.demos { width: 100%; border-collapse: collapse; table-layout: fixed; min-width: 720px; }
.demos thead th {
  position: sticky; top: 0; z-index: 2;
  text-align: left; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 1.5px;
  text-transform: uppercase; color: var(--faint);
  padding: 14px 12px; background: rgba(12,15,21,.96); backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line-2);
}
.demos tbody td { padding: 13px 12px; border-bottom: 1px solid rgba(28,35,48,.6); font-size: 13.5px; vertical-align: middle; overflow: hidden; }
.demos tbody tr { transition: background .14s var(--ease); cursor: pointer; }
.demos tbody tr:hover { background: rgba(255,122,24,.045); }
.demos tbody tr:last-child td { border-bottom: 0; }
.c-id { width: 40px; } .c-map { width: 88px; } .c-status { width: 118px; }
.c-rounds { width: 64px; } .c-size { width: 80px; } .c-date { width: 108px; } .c-act { width: 182px; }
.demos thead th[data-sort] { cursor: pointer; user-select: none; transition: color .15s var(--ease); }
.demos thead th[data-sort]:hover { color: var(--dim); }
.demos thead th[data-sort]::after { content: '↕'; margin-left: 6px; font-size: 10px; opacity: .3; }
.demos thead th.sort-asc::after { content: '↑'; opacity: 1; color: var(--accent-2); }
.demos thead th.sort-desc::after { content: '↓'; opacity: 1; color: var(--accent-2); }

.td-id { font-family: var(--mono); color: var(--faint); font-size: 12px; }
.demo-name { display: flex; flex-direction: column; gap: 3px; min-width: 0; max-width: 100%; }
.demo-file { font-family: var(--mono); font-size: 12.5px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.demo-teams { font-size: 11px; color: var(--dim); letter-spacing: .3px; }
.demo-teams b { color: var(--text); font-weight: 600; }
.map-tag { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; color: var(--accent-2); background: rgba(255,122,24,.08); border: 1px solid rgba(255,122,24,.2); padding: 3px 8px; border-radius: 3px; text-transform: uppercase; }
.td-rounds { font-family: var(--mono); font-weight: 700; font-size: 14px; }
.td-rounds .low { color: var(--amber); } .td-rounds .mut { color: var(--faint); font-weight: 400; }
.td-size { font-family: var(--mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; }
.td-date { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

/* status pill */
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: 100px; font-size: 11px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; border: 1px solid; white-space: nowrap; }
.pill .pdot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.s-pend  { color: var(--slate); border-color: rgba(107,117,133,.4); background: rgba(107,117,133,.1); }
.pill.s-baix  { color: var(--blue);  border-color: rgba(74,163,255,.4);  background: rgba(74,163,255,.1); }
.pill.s-run   { color: var(--blue);  border-color: rgba(74,163,255,.45); background: rgba(74,163,255,.12); }
.pill.s-ok    { color: var(--green); border-color: rgba(52,211,153,.4);  background: rgba(52,211,153,.1); }
.pill.s-inv   { color: var(--amber); border-color: rgba(255,187,61,.4);  background: rgba(255,187,61,.1); }
.pill.s-err   { color: var(--red);   border-color: rgba(255,95,95,.4);   background: rgba(255,95,95,.1); }
.pill.s-ign   { color: var(--faint); border-color: var(--line-2);        background: rgba(120,130,150,.08); }
.pill.s-run .pdot, .pill.s-baix .pdot { animation: blink 1s steps(2,start) infinite; box-shadow: 0 0 7px currentColor; }
tr.active-row { background: rgba(74,163,255,.06) !important; }
tr.active-row td:first-child { box-shadow: inset 3px 0 0 var(--blue); }

/* row action buttons */
.row-acts { display: flex; gap: 6px; flex-wrap: nowrap; justify-content: flex-end; }
.mini { font-family: var(--ui); font-size: 11px; font-weight: 600; letter-spacing: .4px; text-transform: uppercase; padding: 6px 10px; border-radius: 3px; border: 1px solid var(--line-2); background: var(--panel); color: var(--dim); cursor: pointer; transition: .15s var(--ease); }
.mini:hover { color: var(--text); border-color: var(--accent-dk); }
.mini.go { color: var(--accent-2); border-color: rgba(255,122,24,.35); }
.mini.go:hover { background: rgba(255,122,24,.12); color: #fff; border-color: var(--accent); }
.mini.ic { padding: 5px 6px; }
.mini.ic svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; display: block; }
.mini.ic:hover { color: var(--green); border-color: rgba(52,211,153,.4); }
.mini.ic.go { color: var(--accent-2); border-color: rgba(255,122,24,.35); }
.mini.ic.go:hover { color: #fff; background: rgba(255,122,24,.14); border-color: var(--accent); }
.mini:disabled { opacity: .4; cursor: not-allowed; }

.empty { text-align: center; padding: 70px 20px; color: var(--dim); }
.empty-mark { font-size: 46px; color: var(--line-2); margin-bottom: 12px; }

/* ---------------- modals ---------------- */
.modal-root { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 24px; }
.modal-root[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(4,6,9,.72); backdrop-filter: blur(4px); animation: fade .2s ease; }
.modal-card { position: relative; z-index: 1; width: 100%; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2); border-radius: 7px; box-shadow: var(--shadow); animation: pop .26s var(--ease); max-height: 88vh; overflow: auto; }
.detail-card { max-width: 860px; padding: 28px; }
.sftp-card { max-width: 540px; padding: 28px; }
.confirm-card { max-width: 440px; padding: 26px 28px; }
.confirm-card .form-actions { margin-top: 22px; }
.modal-x { position: absolute; top: 14px; right: 14px; width: 30px; height: 30px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--panel); color: var(--dim); cursor: pointer; font-size: 13px; transition: .15s var(--ease); z-index: 3; }
.modal-x:hover { color: var(--red); border-color: var(--red); }
.modal-title { font-size: 20px; font-weight: 600; letter-spacing: .5px; margin: 0 0 4px; }
.modal-title b { color: var(--accent); }
.modal-hint { color: var(--faint); font-size: 12px; margin: 0 0 20px; }

/* SFTP form */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field.span2 { grid-column: span 2; }
.field label { font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); }
.field label i { color: var(--faint); text-transform: none; font-style: normal; letter-spacing: 0; }
.field input { font-family: var(--mono); font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--line-2); border-radius: 4px; padding: 11px 12px; transition: .15s var(--ease); }
.field input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255,122,24,.12); }
/* seleção de hora (chips) */
.hour-pick { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.hour-chip { font-family: var(--mono); font-size: 12px; letter-spacing: .5px; padding: 9px 15px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg); color: var(--dim); cursor: pointer; transition: .15s var(--ease); }
.hour-chip:hover { border-color: var(--accent); color: var(--text); }
.hour-chip.is-on { border-color: var(--accent); color: var(--accent); background: rgba(255,122,24,.1); box-shadow: 0 0 0 2px rgba(255,122,24,.12); }
.hour-pick .hour-other { width: auto; flex: 0 0 auto; border-color: var(--accent); }

/* formato do mix (MD1 / MD3 / MD5) */
.fmt-pick { display: flex; flex-wrap: wrap; gap: 9px; }
.fmt-chip { display: inline-flex; flex-direction: column; align-items: center; gap: 2px; font-family: var(--mono); font-size: 13px; font-weight: 600; letter-spacing: .5px; padding: 8px 17px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg); color: var(--dim); cursor: pointer; transition: .15s var(--ease); }
.fmt-chip i { font-style: normal; font-size: 8.5px; font-weight: 400; letter-spacing: .3px; color: var(--faint); text-transform: uppercase; }
.fmt-chip:hover { border-color: var(--accent); color: var(--text); }
.fmt-chip.is-on { border-color: var(--accent); color: var(--accent); background: rgba(255,122,24,.1); box-shadow: 0 0 0 2px rgba(255,122,24,.12); }
.fmt-chip.is-on i { color: var(--accent-2); }
.mix-fmt-tag { font-family: var(--mono); font-size: 10px; font-weight: 600; letter-spacing: 1px; color: var(--accent-2); background: rgba(255,122,24,.08); border: 1px solid rgba(255,122,24,.28); border-radius: 3px; padding: 3px 8px; }
.mix-fmt-edit { display: flex; align-items: center; gap: 7px; margin-top: 11px; flex-wrap: wrap; }
.mix-fmt-lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); margin-right: 2px; }
.fmt-chip.mini-fmt { flex-direction: row; padding: 5px 13px; font-size: 11.5px; }

/* ===================== Enquete de mapas ===================== */
.poll-link { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--panel); border: 1px solid var(--line-2); border-radius: 6px; padding: 11px 14px; margin-bottom: 16px; }
.poll-link-lbl { font-family: var(--mono); font-size: 9.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); }
.poll-link-input { flex: 1 1 220px; min-width: 120px; font-family: var(--mono); font-size: 12px; color: var(--accent-2); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }
.poll-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 11px; margin-top: 12px; }
.poll-pick-section + .poll-pick-section { margin-top: 22px; }
.poll-pick-section .map-section-head { margin-bottom: 0; }
.poll-pick { position: relative; display: flex; align-items: center; gap: 9px; padding: 8px; border: 1px solid var(--line-2); border-radius: 6px; background: var(--bg); cursor: pointer; transition: .15s var(--ease); }
.poll-pick:hover { border-color: var(--line-2); }
.poll-pick:has(input:checked) { border-color: var(--accent); background: rgba(255,122,24,.07); }
.poll-pick input { accent-color: var(--accent); width: 16px; height: 16px; flex: 0 0 auto; }
.poll-pick-thumb { width: 46px; height: 30px; border-radius: 3px; overflow: hidden; background: #0c0f15; flex: 0 0 auto; }
.poll-pick-thumb img { width: 100%; height: 100%; object-fit: cover; }
.poll-pick-name { font-size: 13px; font-weight: 600; }
.poll-pick-name i { color: var(--faint); font-style: normal; font-size: 10px; font-weight: 400; }
.poll-progress { font-family: var(--mono); font-size: 12px; color: var(--dim); letter-spacing: .5px; }
.poll-progress b { color: var(--accent); }
.poll-ranking { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.poll-rank-row { display: grid; grid-template-columns: minmax(110px, 1.2fr) 3fr auto; align-items: center; gap: 12px; }
.poll-rank-row.is-chosen .poll-rank-name { color: var(--green); }
.poll-rank-name { font-size: 13px; font-weight: 600; }
.tiebreak-tag { font-family: var(--mono); font-style: normal; font-size: 9px; letter-spacing: .5px; text-transform: uppercase; color: var(--accent-2); border: 1px solid rgba(255,122,24,.3); border-radius: 3px; padding: 1px 5px; margin-left: 6px; }
.poll-rank-bar { height: 9px; background: var(--bg); border-radius: 100px; overflow: hidden; }
.poll-rank-bar span { display: block; height: 100%; background: linear-gradient(90deg, rgba(255,122,24,.6), var(--accent)); border-radius: 100px; }
.poll-rank-row.is-chosen .poll-rank-bar span { background: linear-gradient(90deg, rgba(52,211,153,.55), var(--green)); }
.poll-rank-votes { font-family: var(--mono); font-size: 13px; font-weight: 700; color: var(--text); min-width: 22px; text-align: right; }
.poll-sub { font-family: var(--mono); font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); margin: 20px 0 0; }
.chosen-maps { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.chosen-map { position: relative; display: flex; align-items: center; gap: 11px; padding: 9px 14px 9px 9px; border: 1px solid rgba(52,211,153,.35); background: rgba(52,211,153,.07); border-radius: 7px; }
.chosen-rank { font-family: var(--mono); font-size: 11px; font-weight: 700; color: var(--green); width: 20px; height: 20px; display: flex; align-items: center; justify-content: center; border: 1px solid rgba(52,211,153,.4); border-radius: 50%; }
.chosen-map-thumb { width: 64px; height: 40px; border-radius: 4px; overflow: hidden; background: #0c0f15; flex: 0 0 auto; }
.chosen-map-thumb img { width: 100%; height: 100%; object-fit: cover; }
.chosen-map-info { display: flex; flex-direction: column; gap: 2px; }
.chosen-map-name { font-size: 15px; font-weight: 700; letter-spacing: .3px; }
.chosen-map-votes { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.pp-list { display: flex; flex-direction: column; gap: 9px; margin-top: 12px; }
.pp-row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.pp-row:last-child { border-bottom: 0; padding-bottom: 0; }
.pp-name { font-size: 13px; font-weight: 600; min-width: 120px; }
.pp-maps { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.pp-map { font-family: var(--mono); font-size: 10.5px; letter-spacing: .3px; color: var(--accent-2); background: rgba(255,122,24,.08); border: 1px solid rgba(255,122,24,.22); border-radius: 3px; padding: 2px 8px; }
.pp-pending { font-family: var(--mono); font-size: 11px; color: var(--faint); font-style: normal; }
.poll-actions { margin-top: 16px; display: flex; justify-content: flex-end; gap: 12px; flex-wrap: wrap; }
.poll-vote-btn { margin-top: 16px; }
/* votação aberta (admin): contagens + votos por player lado a lado */
.poll-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.poll-grid .form-panel { max-width: none; margin: 0; }
@media (max-width: 980px) { .poll-grid { grid-template-columns: 1fr; } }

/* countdown */
.mix-countdown { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2); border-radius: 8px; padding: 16px 20px; margin-bottom: 18px; }
.cd-lbl { font-family: var(--mono); font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; color: var(--faint); }
.cd-seg { display: inline-flex; flex-direction: column; align-items: center; min-width: 46px; }
.cd-seg b { font-family: var(--mono); font-size: 26px; font-weight: 700; color: var(--accent); line-height: 1; }
.cd-seg i { font-family: var(--mono); font-style: normal; font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); margin-top: 4px; }
.cd-live { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; text-transform: uppercase; color: var(--green); font-weight: 600; }

/* tela pública do mix */
.pub-mix { display: flex; flex-direction: column; gap: 18px; max-width: 780px; margin: 0 auto; }
.pub-mix > .pub-mix-head, .pub-mix > .mix-countdown { margin: 0; }
.pub-mix .form-panel { max-width: none; }
.pub-players { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 8px 18px; margin-top: 12px; }
.pub-player { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: 13.5px; }
.pub-player b { font-family: var(--mono); font-weight: 500; color: var(--accent-2); }
.pub-mix-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.pub-mix-head h1 { font-size: 26px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin: 0; }

/* votação pública */
.vote-step .mix-sub-title { margin-bottom: 14px; }
.vote-as { color: var(--accent); font-size: 13px; margin-left: 6px; }
.vote-players { display: flex; flex-wrap: wrap; gap: 10px; }
.vote-player { font-family: var(--ui); font-size: 14px; font-weight: 600; padding: 11px 18px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--bg); color: var(--text); cursor: pointer; transition: .15s var(--ease); }
.vote-player:hover { border-color: var(--accent); color: var(--accent); transform: translateY(-1px); }
.vote-maps { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
.vote-map { position: relative; display: flex; flex-direction: column; padding: 0; border: 1px solid var(--line-2); border-radius: 7px; overflow: hidden; background: var(--bg); color: var(--text); cursor: pointer; transition: .15s var(--ease); }
.vote-map:hover { border-color: var(--accent); transform: translateY(-2px); }
.vote-map.sel { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,122,24,.35); }
.vote-map-thumb { aspect-ratio: 16/10; background: #0c0f15; }
.vote-map-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.vote-map-name { font-size: 14px; font-weight: 600; padding: 9px 11px; color: var(--text); text-align: center; background: var(--panel); border-top: 1px solid var(--line); }
.vote-map.sel .vote-map-name { color: var(--accent-2); }
.vote-check { position: absolute; top: 8px; right: 8px; width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #1a1205; font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center; opacity: 0; transform: scale(.6); transition: .15s var(--ease); }
.vote-map.sel .vote-check { opacity: 1; transform: scale(1); }
.vote-foot { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 18px; }
.vote-counter { font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--accent); }

/* ---------------- Mapas ---------------- */
.map-section { margin-bottom: 28px; }
.map-section:last-child { margin-bottom: 0; }
.map-section-head { display: flex; align-items: center; gap: 11px; margin: 0 0 15px; padding-bottom: 10px; border-bottom: 1px solid var(--line); }
.map-section-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 auto; }
.map-section-dot.on { background: var(--green); box-shadow: 0 0 8px rgba(52,211,153,.7); }
.map-section-dot.off { background: var(--faint); }
.map-section-title { font-size: 13px; font-weight: 700; letter-spacing: 1.8px; text-transform: uppercase; margin: 0; }
.map-section-title.on { color: var(--green); }
.map-section-title.off { color: var(--dim); }
.map-section-count { font-family: var(--mono); font-size: 10.5px; color: var(--faint); border: 1px solid var(--line-2); border-radius: 100px; padding: 1px 9px; }
.map-section-empty { font-family: var(--mono); font-size: 11.5px; letter-spacing: .5px; color: var(--faint); padding: 4px 2px 2px; }
.map-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 16px; }
.map-card { position: relative; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line); border-radius: 8px; overflow: hidden; transition: .16s var(--ease); }
.map-card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 12px 30px -18px rgba(0,0,0,.85); }
.map-card.is-off { opacity: .6; }
.map-thumb { position: relative; aspect-ratio: 16 / 10; background: #0c0f15; }
.map-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.map-thumb .map-noimg { display: none; position: absolute; inset: 0; align-items: center; justify-content: center; color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; }
.map-thumb.noimg .map-noimg { display: flex; }
.map-state { position: absolute; top: 9px; left: 9px; font-family: var(--mono); font-size: 9px; letter-spacing: 1px; text-transform: uppercase; padding: 3px 8px; border-radius: 3px; border: 1px solid; backdrop-filter: blur(3px); }
.map-state.on { color: var(--green); border-color: rgba(52,211,153,.45); background: rgba(52,211,153,.14); }
.map-state.off { color: var(--faint); border-color: var(--line-2); background: rgba(8,10,14,.6); }
.map-card-body { padding: 12px 13px 13px; display: flex; flex-direction: column; gap: 11px; }
.map-name { font-size: 15px; font-weight: 600; letter-spacing: .3px; }
.map-card-actions { display: flex; gap: 7px; flex-wrap: wrap; }
.mini.danger:hover { border-color: var(--red); color: var(--red); }
/* upload + preview no modal de mapa */
.map-upload-row { display: flex; align-items: center; gap: 14px; }
.file-btn { cursor: pointer; }
.map-preview { width: 132px; height: 80px; flex: 0 0 auto; border: 1px solid var(--line-2); border-radius: 5px; background: #0c0f15; overflow: hidden; display: flex; align-items: center; justify-content: center; }
.map-preview img { width: 100%; height: 100%; object-fit: cover; }
.map-preview-empty { font-family: var(--mono); font-size: 9.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); text-align: center; padding: 0 6px; }
.map-active { cursor: pointer; }
.form-actions { grid-column: span 2; display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.test-out { grid-column: span 2; font-family: var(--mono); font-size: 12px; padding: 12px 14px; border-radius: 4px; border: 1px solid var(--line-2); background: var(--bg); }
.test-out.ok { border-color: rgba(52,211,153,.4); color: var(--green); }
.test-out.bad { border-color: rgba(255,95,95,.4); color: var(--red); }

/* detail header */
.dh { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 22px; padding-right: 30px; }
.dh-main { flex: 1; min-width: 0; }
.dh-file { font-family: var(--mono); font-size: 13px; color: var(--dim); word-break: break-all; margin-bottom: 10px; }
.dh-meta { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kv { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.kv b { color: var(--text); }
.detail-note { font-family: var(--mono); font-size: 12.5px; line-height: 1.6; padding: 14px 16px; border-radius: 5px; border: 1px solid var(--line-2); background: var(--bg); color: var(--dim); }
.detail-note.inv { border-color: rgba(255,187,61,.35); color: var(--amber); }
.detail-note.err { border-color: rgba(255,95,95,.35); color: #ffb0b0; }
.detail-log { margin-top: 12px; }
.detail-log summary { cursor: pointer; font-size: 12px; color: var(--faint); letter-spacing: .5px; text-transform: uppercase; }
.detail-log pre { margin: 10px 0 0; font-family: var(--mono); font-size: 11px; line-height: 1.5; color: var(--dim); background: var(--bg); border: 1px solid var(--line); border-radius: 4px; padding: 12px; max-height: 260px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* scoreboard */
.sb-banner { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,122,24,.14), rgba(255,122,24,.02)); border: 1px solid rgba(255,122,24,.25); margin-bottom: 20px; }
.sb-map { font-size: 22px; font-weight: 700; letter-spacing: 2px; text-transform: uppercase; }
.sb-win { font-family: var(--mono); font-size: 12px; color: var(--accent-2); margin-left: auto; }
.sb-win b { color: #fff; }
.team-block { margin-bottom: 18px; }
.team-head { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; padding: 0 4px; }
.team-name { font-weight: 700; font-size: 14px; letter-spacing: .6px; }
.team-head.win .team-name { color: var(--green); }
.team-tag { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--faint); }
.team-head.win .team-tag { color: var(--green); border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.08); }
table.sb { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sb th, .sb td { width: 58px; }
.sb th:first-child, .sb td:first-child { width: auto; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb th { text-align: right; font-family: var(--mono); font-weight: 500; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); padding: 7px 9px; border-bottom: 1px solid var(--line); }
.sb th:first-child { text-align: left; }
.sb td { text-align: right; font-family: var(--mono); font-size: 13px; padding: 9px; border-bottom: 1px solid rgba(28,35,48,.5); }
.sb td:first-child { text-align: left; font-family: var(--ui); font-weight: 500; color: var(--text); }
.sb tr:last-child td { border-bottom: 0; }
.sb .rating { font-weight: 700; }
.sb .rating.hi { color: var(--green); } .sb .rating.lo { color: var(--red); }
.sb .mvp { color: var(--accent-2); }

/* ---------------- toasts ---------------- */
.toasts { position: fixed; top: 18px; right: 18px; z-index: 90; display: flex; flex-direction: column; gap: 10px; max-width: 360px; }
.toast { display: flex; gap: 11px; align-items: flex-start; padding: 13px 15px; border-radius: 5px; background: var(--panel-2); border: 1px solid var(--line-2); border-left: 3px solid var(--accent); box-shadow: var(--shadow); animation: slide-in .3s var(--ease); }
.toast.out { animation: slide-out .3s var(--ease) forwards; }
.toast.ok { border-left-color: var(--green); }
.toast.bad { border-left-color: var(--red); }
.toast.info { border-left-color: var(--blue); }
.toast-body { font-size: 13px; line-height: 1.4; }
.toast-body b { display: block; font-weight: 600; margin-bottom: 2px; letter-spacing: .3px; }
.toast-body span { color: var(--dim); font-family: var(--mono); font-size: 11.5px; }

/* ---------------- área pública ---------------- */
.pub { position: relative; z-index: 1; min-height: 100vh; display: flex; flex-direction: column; }
.pub[hidden] { display: none; }
.pub-top {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 16px 30px; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(10,13,18,.92), rgba(10,13,18,.6)); backdrop-filter: blur(12px);
  position: sticky; top: 0; z-index: 20;
}
.pub-top .brand { text-decoration: none; color: var(--text); }
.pub-main { flex: 1; }
.pub-main #pub-content { max-width: 1200px; margin: 0 auto; padding: 30px; animation: drop .4s var(--ease) both; }
.pub-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 24px; gap: 16px; }
.pub-head h1 { font-size: 26px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin: 0; }
.pub-head h1 b { color: var(--accent); }
.pub-count { font-family: var(--mono); font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.pub-loading, .pub-empty { text-align: center; color: var(--dim); padding: 70px 20px; font-family: var(--mono); font-size: 13px; }
.pub-empty a { color: var(--accent-2); }
.date-group { margin-bottom: 28px; }
.date-head { display: flex; align-items: center; gap: 12px; margin: 0 2px 14px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.date-head::before { content: ""; width: 7px; height: 7px; background: var(--accent); border-radius: 1px; box-shadow: 0 0 8px var(--accent); flex: none; }
.date-label { font-family: var(--mono); font-weight: 700; font-size: 15px; letter-spacing: 1px; color: var(--text); }
.date-count { font-family: var(--mono); font-size: 10.5px; letter-spacing: .5px; text-transform: uppercase; color: var(--faint); margin-left: auto; }
.match-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(312px, 1fr)); gap: 14px; }
.match-card {
  position: relative; display: block; text-decoration: none; color: var(--text);
  background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line);
  border-radius: 6px; padding: 16px 18px; transition: .18s var(--ease); overflow: hidden;
}
.match-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-2); transition: .18s var(--ease); }
.match-card:hover { border-color: var(--line-2); transform: translateY(-2px); box-shadow: 0 12px 30px -16px rgba(0,0,0,.8); }
.match-card:hover::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.mc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.mc-date { font-family: var(--mono); font-size: 11px; color: var(--faint); }
.mc-score { display: flex; align-items: center; gap: 10px; }
.mc-team { flex: 1; font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.mc-team.right { text-align: right; }
.mc-team.win { color: var(--green); }
.mc-vs { font-family: var(--mono); font-weight: 700; font-size: 18px; color: var(--text); white-space: nowrap; }
.mc-vs i { color: var(--faint); font-style: normal; margin: 0 2px; }
.mc-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); font-family: var(--mono); font-size: 10.5px; letter-spacing: .6px; text-transform: uppercase; color: var(--faint); }
.match-card:hover .mc-foot { color: var(--accent-2); }
.pub-back { display: inline-flex; align-items: center; gap: 6px; font-family: var(--mono); font-size: 12px; color: var(--dim); text-decoration: none; margin-bottom: 20px; transition: .15s var(--ease); }
.pub-back:hover { color: var(--accent-2); }
.pub-match-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; padding: 16px 20px; border-radius: 6px; background: linear-gradient(90deg, rgba(255,122,24,.13), rgba(255,122,24,.02)); border: 1px solid rgba(255,122,24,.22); margin-bottom: 22px; }

/* ---------------- nav pública + rankings ---------------- */
.pub-nav { display: flex; gap: 2px; margin-left: 20px; }
.pub-nav a { font-family: var(--ui); font-weight: 500; font-size: 13.5px; letter-spacing: .3px; color: var(--dim); text-decoration: none; padding: 9px 15px; border-radius: var(--r); position: relative; transition: .15s var(--ease); }
.pub-nav a:hover { color: var(--text); }
.pub-nav a.active { color: var(--accent-2); }
.pub-nav a.active::after { content: ""; position: absolute; left: 15px; right: 15px; bottom: 3px; height: 2px; background: var(--accent); border-radius: 2px; box-shadow: 0 0 8px var(--accent); }
.pub-admin-btn { margin-left: auto; }

.rk-tabs { display: flex; gap: 8px; margin-bottom: 4px; }
.rk-tab { font-family: var(--ui); font-weight: 600; font-size: 13px; letter-spacing: .4px; padding: 9px 16px; border-radius: var(--r); border: 1px solid var(--line); background: var(--panel); color: var(--dim); text-decoration: none; transition: .15s var(--ease); }
.rk-tab span { font-family: var(--mono); font-size: 9.5px; color: var(--faint); text-transform: uppercase; letter-spacing: .5px; margin-left: 6px; }
.rk-tab:hover { color: var(--text); border-color: var(--line-2); }
.rk-tab.active { background: rgba(255,122,24,.12); border-color: var(--accent); color: var(--accent-2); }
.rk-tab.active span { color: var(--accent-2); }
.rk-sub { font-family: var(--mono); font-size: 11.5px; color: var(--faint); margin: 14px 2px 16px; }
.rk-panel { padding: 0; overflow: hidden; }
table.rk { width: 100%; border-collapse: collapse; min-width: 640px; }
.rk thead th { text-align: right; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); padding: 14px 16px; border-bottom: 1px solid var(--line-2); background: rgba(12,15,21,.96); position: sticky; top: 0; }
.rk thead th:nth-child(2) { text-align: left; }
.rk th.rk-pos { text-align: center; width: 56px; }
.rk td { text-align: right; font-family: var(--mono); font-size: 13.5px; padding: 12px 16px; border-bottom: 1px solid rgba(28,35,48,.5); }
.rk tbody tr { transition: background .14s var(--ease); }
.rk tbody tr:hover { background: rgba(255,122,24,.04); }
.rk tbody tr:last-child td { border-bottom: 0; }
.rk td.rk-pos { text-align: center; font-weight: 700; color: var(--faint); }
.rk td.rk-pos.top { color: var(--accent-2); }
.rk td.rk-name { text-align: left; font-family: var(--ui); font-weight: 600; color: var(--text); }
.rk td.rk-mut { color: var(--faint); }
.rk td.rating { font-weight: 700; }
.rk .rating.hi { color: var(--green); }
.rk .rating.lo { color: var(--red); }
.rk-inel { margin-top: 34px; }
.rk-inel .pub-head { margin-bottom: 12px; }
.inel-title { font-size: 19px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; margin: 0; }
.inel-title b { color: var(--accent); }
.rk.inel thead th:first-child { text-align: left; }
.rk.inel thead th:nth-child(2) { text-align: right; }
.rk td.inel-falta { color: var(--accent-2); font-weight: 700; }

/* ---------------- login ---------------- */
.login-screen { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-screen[hidden] { display: none; }
.login-card { position: relative; width: 100%; max-width: 380px; background: linear-gradient(180deg, var(--panel-2), var(--panel)); border: 1px solid var(--line-2); border-radius: 8px; padding: 32px 30px; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 14px; animation: pop .3s var(--ease); }
.login-brand { display: flex; align-items: center; gap: 11px; justify-content: center; }
.login-brand .brand-name { font-size: 19px; text-transform: uppercase; }
.login-title { text-align: center; font-family: var(--mono); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--faint); margin: 0 0 8px; }
.login-card .field { gap: 6px; }
.login-submit { justify-content: center; margin-top: 6px; }
.login-err { font-family: var(--mono); font-size: 12px; color: var(--red); border: 1px solid rgba(255,95,95,.35); background: rgba(255,95,95,.07); border-radius: 4px; padding: 9px 12px; text-align: center; }
.login-back { text-align: center; font-family: var(--mono); font-size: 11px; color: var(--faint); text-decoration: none; margin-top: 2px; }
.login-back:hover { color: var(--dim); }

/* admin: itens extras do rodapé */
.nav-item.ghost-item { font-size: 13px; padding: 9px 12px; color: var(--faint); }
.nav-item.ghost-item:hover { color: var(--text); background: var(--panel); }
.nav-item.as-btn { width: 100%; background: none; cursor: pointer; font-family: var(--ui); text-align: left; }
.nav-item.as-btn:hover { color: var(--red); }

/* ---------------- admin: Mix ---------------- */
.mix-sub-title { font-size: 14px; font-weight: 600; letter-spacing: .5px; text-transform: uppercase; margin: 0 0 16px; color: var(--text); }
.mix-count { font-family: var(--mono); font-size: 12px; color: var(--accent-2); margin-left: 6px; }
.mix-new { max-width: none; margin-bottom: 24px; }
.mix-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 12px; }
.mix-card { position: relative; display: flex; flex-direction: column; gap: 12px; text-decoration: none; color: var(--text); background: linear-gradient(180deg, var(--panel), var(--bg-2)); border: 1px solid var(--line); border-radius: 6px; padding: 16px 18px; transition: .18s var(--ease); }
.mix-card::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--line-2); transition: .18s var(--ease); }
.mix-card:hover { border-color: var(--line-2); transform: translateY(-2px); }
.mix-card:hover::before { background: var(--accent); box-shadow: 0 0 12px var(--accent); }
.mix-card-main { display: flex; flex-direction: column; gap: 5px; }
.mix-name { font-weight: 600; font-size: 15px; }
.mix-when { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.mix-card-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mix-card-tags { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.mix-card-actions { display: flex; align-items: center; gap: 7px; flex: 0 0 auto; }
.mix-card-link { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; flex: 0 0 auto; border-radius: 5px; border: 1px solid var(--line-2); background: var(--panel); color: var(--dim); cursor: pointer; transition: .15s var(--ease); }
.mix-card-link:hover { color: var(--accent); border-color: var(--accent); transform: translateY(-1px); }
.mix-card-link svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.mix-link-top { margin-top: 2px; }
.mix-done-section { margin-top: 28px; }

/* step Partidas: cards de partida (selecionáveis / associadas) */
.matches-panel { max-width: none; }
.match-pick-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; margin-top: 16px; }
.match-pick { position: relative; display: block; border: 1px solid var(--line-2); border-radius: 7px; background: var(--bg); cursor: pointer; transition: .15s var(--ease); text-decoration: none; color: var(--text); }
.match-pick:hover { border-color: var(--accent); transform: translateY(-2px); }
.match-pick input { position: absolute; opacity: 0; pointer-events: none; }
.match-pick:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(255,122,24,.3); }
.mp-check { position: absolute; top: 9px; right: 9px; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid var(--line-2); display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: transparent; transition: .15s var(--ease); }
.match-pick:has(input:checked) .mp-check { background: var(--accent); border-color: var(--accent); color: #1a1205; }
.mp-card-body { padding: 13px 15px; }
.mp-card-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 11px; padding-right: 26px; }
.mp-card-date { font-family: var(--mono); font-size: 10.5px; color: var(--faint); }
.mp-card-score { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 8px; }
.mp-team { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mp-team.right { text-align: right; }
.mp-card-score b { font-family: var(--mono); font-size: 15px; color: var(--accent-2); white-space: nowrap; }
.mix-players-badge { font-family: var(--mono); font-size: 11px; color: var(--accent-2); }
.mix-status { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); border: 1px solid var(--line-2); border-radius: 3px; padding: 2px 7px; }
.mix-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; align-items: start; }
.mix-grid .form-panel { max-width: none; }
.add-row { display: flex; gap: 8px; margin-bottom: 12px; }
.mix-select, .mix-input { font-family: var(--mono); font-size: 13px; color: var(--text); background: var(--bg); border: 1px solid var(--line-2); border-radius: 4px; padding: 10px 11px; flex: 1; min-width: 0; }
.mix-input.rating-in { flex: 0 0 92px; }
.mix-select:focus, .mix-input:focus { outline: none; border-color: var(--accent); }
.add-row .btn { flex: none; }
.ac-wrap { position: relative; display: block; }
.ac-wrap .mix-input { width: 100%; }
.ac-menu { position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 30; background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 5px; box-shadow: var(--shadow); max-height: 282px; overflow-y: auto; padding: 4px; }
.ac-menu[hidden] { display: none; }
.ac-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%; text-align: left; background: none; border: 0; border-radius: 4px; padding: 9px 11px; cursor: pointer; color: var(--text); font-family: var(--ui); transition: background .12s var(--ease); }
.ac-item:hover { background: rgba(255,122,24,.1); }
.ac-name { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-meta { font-family: var(--mono); font-size: 11px; color: var(--faint); flex: none; }
.ac-empty { padding: 12px; font-family: var(--mono); font-size: 12px; color: var(--faint); text-align: center; }
.mp-src { font-family: var(--mono); font-size: 9.5px; letter-spacing: .5px; text-transform: uppercase; padding: 2px 7px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--faint); }
.mp-src.existing { color: var(--blue); border-color: rgba(74,163,255,.3); }
.mp-src.manual { color: var(--amber); border-color: rgba(255,187,61,.3); }
.mix-players td { padding: 9px 12px; }
.balance-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.balance-head .mix-sub-title { margin-bottom: 0; }
.balance-err { font-family: var(--mono); font-size: 12.5px; color: var(--amber); border: 1px solid rgba(255,187,61,.35); background: rgba(255,187,61,.06); border-radius: 5px; padding: 12px 14px; margin-top: 8px; }
.variation { border: 1px solid var(--line); border-radius: 6px; padding: 12px 14px; margin-top: 12px; background: var(--bg-2); }
.var-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.var-title { font-weight: 600; font-size: 13px; letter-spacing: .5px; text-transform: uppercase; color: var(--accent-2); }
.var-diff { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.var-teams { display: grid; grid-template-columns: 1fr auto 1fr; gap: 10px; align-items: start; }
.var-team { background: var(--panel); border: 1px solid var(--line); border-radius: 5px; padding: 9px 11px; }
.var-team-head { display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--dim); padding-bottom: 7px; margin-bottom: 6px; border-bottom: 1px solid var(--line); }
.var-team-head b { font-family: var(--mono); color: var(--green); }
.var-player { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; padding: 3px 0; }
.var-player b { font-family: var(--mono); font-weight: 500; color: var(--dim); }
.var-vs { align-self: center; font-family: var(--mono); font-size: 11px; color: var(--faint); letter-spacing: 1px; }
.var-actions { display: flex; align-items: center; gap: 10px; }
.mix-right { display: flex; flex-direction: column; gap: 16px; }
.mix-right .form-panel { max-width: none; }
.chosen-panel { border-color: rgba(52,211,153,.3); }
.chosen-panel.editing { border-color: var(--accent); }
.chosen-actions { display: flex; align-items: center; gap: 7px; }
.var-player.swap { width: 100%; padding: 5px 8px; margin: 1px 0; background: transparent; border: 1px solid transparent; border-radius: 4px; color: var(--text); font-family: inherit; font-size: 12.5px; cursor: pointer; transition: .12s var(--ease); }
.var-player.swap:hover { border-color: var(--line-2); background: var(--panel); }
.var-player.swap.sel { border-color: var(--accent); background: rgba(255,122,24,.16); box-shadow: 0 0 0 1px rgba(255,122,24,.3); }
.var-player.swap b { color: var(--dim); }
.chosen-tag { font-family: var(--mono); font-size: 9.5px; color: var(--green); border: 1px solid rgba(52,211,153,.4); background: rgba(52,211,153,.08); border-radius: 3px; padding: 2px 7px; text-transform: uppercase; letter-spacing: .5px; margin-left: 8px; }
.variation.chosen { border-color: rgba(52,211,153,.3); background: rgba(52,211,153,.05); }
.mix-head-right { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.step-badge { font-family: var(--mono); font-size: 10px; letter-spacing: .5px; text-transform: uppercase; padding: 4px 9px; border-radius: 3px; border: 1px solid var(--line-2); color: var(--dim); white-space: nowrap; }
.step-badge.s1 { color: var(--slate); border-color: rgba(107,117,133,.4); background: rgba(107,117,133,.1); }
.step-badge.s2 { color: var(--amber); border-color: rgba(255,187,61,.4); background: rgba(255,187,61,.1); }
.step-badge.s3 { color: var(--blue); border-color: rgba(74,163,255,.4); background: rgba(74,163,255,.1); }
.step-badge.s4 { color: var(--green); border-color: rgba(52,211,153,.4); background: rgba(52,211,153,.1); }
.stepper { display: flex; align-items: stretch; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }
.stepper-item { display: flex; align-items: center; gap: 11px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 8px 18px 8px 10px; cursor: pointer; font-family: var(--ui); transition: .16s var(--ease); }
.stepper-item:hover { border-color: var(--line-2); }
.stepper-item.active { border-color: var(--accent); background: rgba(255,122,24,.1); }
.stepper-item.done { border-color: rgba(52,211,153,.28); }
.stepper-item.done.active { border-color: var(--accent); }
.step-mark { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--line-2); color: var(--faint); font-size: 12px; font-weight: 700; transition: .16s var(--ease); }
.stepper-item.done .step-mark { border-color: var(--green); background: rgba(52,211,153,.14); color: var(--green); }
.step-body { display: flex; flex-direction: column; gap: 1px; line-height: 1.15; }
.step-name { font-size: 13px; font-weight: 600; letter-spacing: .4px; color: var(--text); }
.stepper-item.active .step-name { color: var(--accent-2); }
.step-status { font-family: var(--mono); font-size: 8.5px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }
.stepper-item.done .step-status { color: var(--green); }
/* formato no step Configurações */
.cfg-fmt-row { margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--line); }
.cfg-fmt-lbl { display: block; font-size: 11px; letter-spacing: 1px; text-transform: uppercase; color: var(--dim); margin-bottom: 9px; }
.cfg-fmt-lbl i { color: var(--faint); text-transform: none; font-style: normal; letter-spacing: 0; font-size: 10px; }
.mix-soon { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 54px 24px; max-width: none; }
.soon-mark { font-size: 40px; color: var(--line-2); margin-bottom: 12px; }
#mix-new-btn svg { stroke-width: 2; }
@media (max-width: 900px) { .mix-grid { grid-template-columns: 1fr; } }

/* ---------------- animations ---------------- */
@keyframes drop { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .35; } }
@keyframes blink { 50% { opacity: .25; } }
@keyframes ring { 0% { box-shadow: 0 0 0 0 rgba(52,211,153,.5); } 70% { box-shadow: 0 0 0 7px rgba(52,211,153,0); } 100% { box-shadow: 0 0 0 0 rgba(52,211,153,0); } }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.985); } }
@keyframes slide-in { from { opacity: 0; transform: translateX(30px); } }
@keyframes slide-out { to { opacity: 0; transform: translateX(30px); } }
@keyframes rowin { from { opacity: 0; transform: translateY(6px); } }
tbody tr { animation: rowin .35s var(--ease) both; }

@media (max-width: 920px) {
  .hud { display: none; }
  .topbar { gap: 16px; }
  .tool-right { width: 100%; }
}

/* ============ área pública: link de jogador + perfil ============ */
.player-link { color: var(--text); text-decoration: none; border-bottom: 1px dotted transparent; transition: .15s var(--ease); }
.player-link:hover { color: var(--accent-2); border-bottom-color: var(--accent-dk); }
.rk-name .player-link { font-weight: 600; }

/* cabeçalho do perfil do jogador */
.player-head {
  display: flex; align-items: center; gap: 18px; position: relative;
  background: linear-gradient(180deg, var(--panel-2), var(--panel));
  border: 1px solid var(--line-2); border-radius: 7px; padding: 18px 22px; margin: 4px 0 16px;
}
.ph-avatar {
  width: 60px; height: 60px; flex: 0 0 60px; border-radius: 12px;
  display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 22px;
  color: var(--accent-2); background: rgba(255,122,24,.1); border: 1px solid rgba(255,122,24,.25);
}
.ph-avatar.hi { color: var(--green); background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.28); }
.ph-avatar.lo { color: var(--red); background: rgba(255,95,95,.1); border-color: rgba(255,95,95,.28); }
.ph-id { flex: 1; min-width: 0; }
.ph-id h1 { margin: 0; font-size: 26px; letter-spacing: .3px; }
.ph-sub { font-family: var(--mono); font-size: 11px; color: var(--dim); letter-spacing: .3px; }
.ph-sub b { color: var(--text); }
.ph-rating { display: flex; flex-direction: column; align-items: flex-end; text-align: right; }
.ph-rating span { font-family: var(--mono); font-weight: 700; font-size: 30px; letter-spacing: -1px; color: var(--text); line-height: 1; }
.ph-rating.hi span { color: var(--green); }
.ph-rating.lo span { color: var(--red); }
.ph-rating i { font-style: normal; font-family: var(--mono); font-size: 9px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--faint); margin-top: 5px; }

/* grade de stats agregadas */
.player-stats { display: grid; grid-template-columns: repeat(9, 1fr); gap: 10px; margin-bottom: 22px; }
.ps-stat {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r);
  padding: 12px 8px; text-align: center; position: relative; overflow: hidden;
}
.ps-stat::before { content:""; position:absolute; left:0; top:0; bottom:0; width:2px; background: var(--line-2); }
.ps-val { display: block; font-family: var(--mono); font-weight: 700; font-size: 18px; letter-spacing: -.5px; color: var(--text); }
.ps-val.win { color: var(--green); }
.ps-val.loss { color: var(--red); }
.ps-lbl { display: block; font-size: 8.5px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--faint); margin-top: 5px; }
.player-mh-head { margin-top: 6px; }

/* tabela do histórico do jogador (linhas clicáveis) */
.player-matches tbody tr { cursor: pointer; }
.player-matches tbody tr:hover { background: rgba(255,122,24,.07); }
.player-matches tbody tr:focus-visible { outline: 1px solid var(--accent-dk); outline-offset: -1px; }
.player-matches td { white-space: nowrap; }
.pm-date { font-family: var(--mono); font-size: 11.5px; color: var(--dim); }
.pm-kda { font-family: var(--mono); }
.pm-kda i { color: var(--faint); font-style: normal; margin: 0 1px; }
.pm-pos { color: var(--green); }
.pm-neg { color: var(--red); }
.pm-res b { font-weight: 700; }
.pm-res span { font-family: var(--mono); font-size: 11px; color: var(--dim); margin-left: 6px; }
.pm-res.win b { color: var(--green); }
.pm-res.loss b { color: var(--red); }
.pm-res.tie b { color: var(--amber); }
.pm-mvp { text-align: center; }

/* modal do placar público (reusa .detail-card) */
.match-modal-content .pub-back { display: none; }

@media (max-width: 760px) {
  .player-stats { grid-template-columns: repeat(3, 1fr); }
  .ph-id h1 { font-size: 22px; }
  .ph-rating span { font-size: 24px; }
}

/* ranking: destaque da data de corte (90d) + nota no header da coluna Part. */
.rk-cutoff {
  color: var(--accent-2); font-weight: 600; white-space: nowrap;
  border: 1px solid rgba(255,122,24,.25); background: rgba(255,122,24,.08);
  border-radius: 100px; padding: 1px 9px; margin: 0 2px;
}
.th-note { font-family: var(--mono); font-size: 9px; letter-spacing: 1px; color: var(--faint); font-weight: 400; }

/* ============ perfil: 3 iRatings + gráfico de variação ============ */
.player-head { flex-wrap: wrap; }
.ph-ratings { display: flex; gap: 10px; margin-left: auto; }
.ph-rate {
  min-width: 96px; text-align: center; position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px 9px;
}
.ph-rate::before { content:""; position:absolute; left:0; top:8px; bottom:8px; width:2px; background: var(--line-2); border-radius: 2px; }
.ph-rate:first-child::before { background: var(--accent); }
.ph-rate span { display: block; font-family: var(--mono); font-weight: 700; font-size: 23px; letter-spacing: -1px; color: var(--text); line-height: 1; }
.ph-rate.hi span { color: var(--green); }
.ph-rate.lo span { color: var(--red); }
.ph-rate b { display: block; font-size: 10.5px; color: var(--text); margin-top: 7px; font-weight: 600; }
.ph-rate i { display: block; font-style: normal; font-family: var(--mono); font-size: 8px; letter-spacing: .8px; text-transform: uppercase; color: var(--faint); margin-top: 3px; }

.chart-panel { padding: 15px 18px 12px; margin: 16px 0; }
.chart-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.chart-head h3 { margin: 0; font-size: 15px; letter-spacing: .3px; }
.chart-head h3 b { color: var(--accent); }
.chart-sub { font-family: var(--mono); font-size: 10px; letter-spacing: .3px; color: var(--faint); }
.rating-chart { position: relative; }
.rating-chart-svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart-empty { padding: 24px; text-align: center; color: var(--dim); font-family: var(--mono); font-size: 12px; }
.rc-area { stroke: none; }
.rc-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.rc-ref { stroke: var(--accent-2); stroke-opacity: .55; stroke-width: 1; stroke-dasharray: 5 5; }
.rc-ylbl, .rc-xlbl { fill: var(--faint); font-family: var(--mono); font-size: 10px; }
.rc-avg-lbl { fill: var(--accent-2); font-weight: 700; }
.rc-avg-tag { fill: var(--accent-2); fill-opacity: .8; font-family: var(--mono); font-size: 9.5px; letter-spacing: .3px; }
.point { stroke: var(--bg); stroke-width: 2; transition: r .12s var(--ease); }
.point.hi { fill: var(--green); }
.point.lo { fill: var(--red); }
.point.mid { fill: var(--accent-2); }
.point-hit { fill: transparent; cursor: pointer; }
.point-hit:hover + .point { r: 7; }
.chart-tip {
  position: absolute; transform: translate(-50%, calc(-100% - 12px)); z-index: 5;
  background: var(--panel-2); border: 1px solid var(--line-2); border-radius: 6px; padding: 6px 11px;
  pointer-events: none; box-shadow: var(--shadow); white-space: nowrap; text-align: center;
}
.chart-tip::after { content:""; position:absolute; left:50%; bottom:-5px; transform: translateX(-50%) rotate(45deg); width:8px; height:8px; background: var(--panel-2); border-right:1px solid var(--line-2); border-bottom:1px solid var(--line-2); }
.chart-tip b { display: block; font-size: 11px; color: var(--text); }
.chart-tip span { display: block; font-family: var(--mono); font-size: 9.5px; color: var(--dim); margin-top: 1px; }
.chart-tip i { font-style: normal; font-family: var(--mono); font-weight: 700; font-size: 14px; color: var(--accent-2); }
.chart-tip i.hi { color: var(--green); }
.chart-tip i.lo { color: var(--red); }

@media (max-width: 760px) {
  .ph-ratings { margin-left: 0; width: 100%; }
  .ph-rate { flex: 1; min-width: 0; }
}

/* ====================== HOME (estatísticas) ====================== */
.home-hero, .home-stats, .home-block { animation: fade .45s var(--ease) both; }
.home-hero {
  position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 10px;
  padding: 34px 40px; margin-bottom: 18px; min-height: 182px;
  background: radial-gradient(120% 150% at 82% -30%, rgba(255,122,24,.20), transparent 55%), linear-gradient(180deg, var(--panel-2), var(--panel));
}
.home-hero .hh-inner { z-index: 2; }
/* cadeira de rodas GRANDE rolando no hero (roda gira via animateTransform + balanço de rolagem) */
.hero-rider {
  position: absolute; right: 42px; top: 50%; width: 188px; height: 188px; z-index: 1; pointer-events: none;
  filter: drop-shadow(0 6px 18px rgba(255,122,24,.4));
  animation: heroRoll 3.4s ease-in-out infinite;
}
.hero-rider circle, .hero-rider line, .hero-rider path { fill: none; stroke: var(--accent); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.hero-rider .wc-hub { fill: var(--accent); stroke: none; }
.hero-rider .wc-body { stroke-width: 1.6; }
@keyframes heroRoll {
  0%   { transform: translate(10px, -50%) rotate(2.5deg); }
  50%  { transform: translate(-24px, -50%) rotate(-2.5deg); }
  100% { transform: translate(10px, -50%) rotate(2.5deg); }
}
@media (max-width: 860px) { .hero-rider { width: 130px; right: 18px; opacity: .55; } }
@media (max-width: 600px) { .hero-rider { display: none; } }
.hh-grid {
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 34px 34px; opacity: .35;
  -webkit-mask-image: radial-gradient(120% 120% at 72% 0%, #000 28%, transparent 74%);
          mask-image: radial-gradient(120% 120% at 72% 0%, #000 28%, transparent 74%);
}
.hh-inner { position: relative; max-width: 680px; }
.hh-kicker { font-family: var(--mono); font-size: 11px; letter-spacing: 3px; color: var(--accent-2); }
.hh-title { font-size: 46px; line-height: 1; margin: 12px 0 12px; letter-spacing: -1px; }
.hh-title b { color: var(--accent); }
.hh-sub { color: var(--dim); font-size: 14.5px; max-width: 560px; line-height: 1.5; }
.hh-sub b { color: var(--text); }
.hh-period { font-family: var(--mono); color: var(--faint); font-size: 12px; white-space: nowrap; }
.hh-cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.hh-cta .btn { padding: 11px 20px; }

/* frase em destaque (callout) */
.home-banner {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  margin: 0 0 18px; padding: 14px 22px; border-radius: 8px; text-align: center; position: relative; overflow: hidden;
  background: linear-gradient(90deg, rgba(255,95,95,.10), rgba(255,122,24,.13), rgba(255,95,95,.10));
  border: 1px solid rgba(255,122,24,.32);
}
.home-banner::before, .home-banner::after { content: "☠"; color: var(--amber); font-size: 18px; opacity: .8; flex: none; }
.hb-txt { font-family: var(--ui); font-weight: 600; font-size: 16.5px; letter-spacing: .4px; color: var(--text); }
.hb-txt b {
  display: inline-block; color: #fff; background: var(--red); padding: 1px 11px; border-radius: 5px; margin-left: 5px;
  font-weight: 700; letter-spacing: 1.5px; animation: ruimglow 1.8s ease-in-out infinite;
}
@keyframes ruimglow { 0%,100% { box-shadow: 0 0 10px rgba(255,95,95,.45); } 50% { box-shadow: 0 0 22px rgba(255,95,95,.9); } }

.home-stats { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-bottom: 28px; }
.hs-cell { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 16px 15px; overflow: hidden; }
.hs-cell::before { content:""; position:absolute; left:0; top:0; bottom:0; width:3px; background: var(--accent); opacity:.7; }
.hs-num { display: block; font-family: var(--mono); font-weight: 700; font-size: 25px; letter-spacing: -1px; color: var(--text); }
.hs-lbl { display: block; font-size: 9.5px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--faint); margin-top: 5px; }
.hs-sub { display:block; font-family: var(--mono); font-size: 9px; color: var(--accent-2); margin-top: 4px; }

.home-block { margin-bottom: 28px; }
.hb-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 9px; }
.hb-head h2 { margin: 0; font-size: 20px; letter-spacing: .2px; }
.hb-head h2 b { color: var(--accent); }
.hb-link { font-family: var(--mono); font-size: 11px; color: var(--dim); text-decoration: none; white-space: nowrap; }
.hb-link:hover { color: var(--accent-2); }
.hb-note { font-family: var(--mono); font-size: 10px; letter-spacing: 1px; text-transform: uppercase; color: var(--faint); }

/* pódio */
.podium { display: grid; grid-template-columns: 1fr 1.18fr 1fr; gap: 12px; align-items: end; }
.pod { display: flex; flex-direction: column; align-items: center; gap: 7px; text-decoration: none; position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: 9px; padding: 22px 14px 16px; transition: .18s var(--ease); }
.pod:hover { border-color: var(--accent-dk); transform: translateY(-3px); }
.pod-1 { padding-top: 30px; background: linear-gradient(180deg, rgba(255,122,24,.12), var(--panel)); border-color: rgba(255,122,24,.32); box-shadow: 0 14px 40px -22px rgba(255,122,24,.6); }
.pod-rank { position: absolute; top: -13px; width: 27px; height: 27px; border-radius: 50%; display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: 13px; color: #1a0f02; box-shadow: 0 4px 10px rgba(0,0,0,.4); }
.pod-rank.r1 { background: linear-gradient(180deg,#ffe08a,#f0a83c); }
.pod-rank.r2 { background: linear-gradient(180deg,#e7edf6,#aab4c4); }
.pod-rank.r3 { background: linear-gradient(180deg,#e6b083,#c47a44); }
.pod-av { width: 52px; height: 52px; border-radius: 13px; display:grid; place-items:center; font-family: var(--mono); font-weight:700; font-size:18px; color: var(--accent-2); background: rgba(255,122,24,.1); border:1px solid rgba(255,122,24,.25); }
.pod-av.hi { color: var(--green); background: rgba(52,211,153,.1); border-color: rgba(52,211,153,.28); }
.pod-1 .pod-av { width: 62px; height: 62px; font-size: 22px; }
.pod-name { font-weight: 600; font-size: 14px; color: var(--text); max-width: 100%; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.pod-rate { font-family: var(--mono); font-weight:700; font-size: 23px; color: var(--text); letter-spacing:-1px; }
.pod-rate.hi { color: var(--green); } .pod-rate.lo { color: var(--red); }
.pod-1 .pod-rate { font-size: 30px; }
.pod-sub { font-family: var(--mono); font-size: 9.5px; color: var(--faint); text-align:center; }
.pod-rest { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.rk-mini { display:flex; align-items:center; gap:10px; text-decoration:none; background: var(--panel); border:1px solid var(--line); border-radius: 100px; padding: 6px 16px 6px 9px; transition:.15s var(--ease); }
.rk-mini:hover { border-color: var(--accent-dk); }
.rkm-pos { font-family: var(--mono); font-size:11px; color: var(--faint); }
.rkm-name { color: var(--text); font-size: 13px; }
.rkm-rate { font-family: var(--mono); font-weight:700; color: var(--dim); font-size:13px; }
.rkm-rate.hi { color: var(--green);} .rkm-rate.lo{color:var(--red);}

/* recordes */
.records-home { display: grid; grid-template-columns: repeat(3,1fr); gap: 12px; }
.rec-card { position: relative; overflow: hidden; border: 1px solid var(--line-2); border-radius: 9px; min-height: 152px; cursor: pointer; display:flex; transition: .18s var(--ease); }
.rec-card:hover { border-color: var(--accent-dk); transform: translateY(-3px); }
.rec-bg { position:absolute; inset:0; background-size: cover; background-position: center; opacity:.22; }
.rec-card::after { content:""; position:absolute; inset:0; background: linear-gradient(180deg, rgba(11,14,19,.5), rgba(11,14,19,.93)); }
.rec-content { position: relative; z-index:1; display:flex; flex-direction:column; gap:6px; padding: 15px 16px; width:100%; justify-content: space-between; }
.rec-top { display:flex; align-items:center; justify-content: space-between; }
.rec-title { font-family: var(--mono); font-size: 10px; letter-spacing: 1.4px; text-transform: uppercase; color: var(--accent-2); }
.rec-val { font-family: var(--mono); font-weight:700; font-size: 40px; letter-spacing:-2px; color: var(--text); line-height:1; }
.rec-val.hi { color: var(--green); }
.rec-val i { font-style:normal; font-family: var(--mono); font-size: 10px; letter-spacing:1px; text-transform:uppercase; color: var(--faint); margin-left:8px; font-weight:400; }
.rec-foot { display:flex; align-items:baseline; justify-content: space-between; gap: 10px; }
.rec-player.player-link { font-weight:600; font-size: 14px; }
.rec-line { font-family: var(--mono); font-size: 10px; color: var(--dim); white-space: nowrap; }

/* mapas + ativos */
.home-grid2 { display:grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.map-bars, .act-list { display:flex; flex-direction: column; gap: 9px; }
.map-bar { display:grid; grid-template-columns: 30px 80px 1fr 34px; align-items:center; gap: 11px; }
.mb-thumb { width: 30px; height: 30px; border-radius: 5px; background-size: cover; background-position:center; border:1px solid var(--line-2); background-color: var(--panel-2); }
.mb-name { font-family: var(--mono); font-size: 11px; color: var(--text); letter-spacing:.3px; }
.mb-track, .act-track { height: 8px; background: var(--panel-2); border-radius: 100px; overflow:hidden; }
.mb-fill { display:block; height:100%; background: linear-gradient(90deg, var(--accent-dk), var(--accent)); border-radius:100px; }
.mb-count, .act-count { font-family: var(--mono); font-size: 12px; font-weight:700; color: var(--dim); text-align:right; }
.act-row { display:grid; grid-template-columns: 22px 1fr 96px 30px; align-items:center; gap: 11px; text-decoration:none; }
.act-pos { font-family: var(--mono); font-size: 11px; color: var(--faint); text-align:center; }
.act-name { font-size: 13px; color: var(--text); overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.act-row:hover .act-name { color: var(--accent-2); }
.act-fill { display:block; height:100%; background: linear-gradient(90deg, var(--line-2), var(--blue)); border-radius:100px; }

/* últimas partidas */
.home-matches { display:grid; grid-template-columns: repeat(3,1fr); gap: 10px; }
.hm-chip { display:flex; gap: 10px; align-items:center; background: var(--panel); border:1px solid var(--line); border-radius: 8px; padding: 8px; cursor:pointer; transition:.16s var(--ease); }
.hm-chip:hover { border-color: var(--accent-dk); transform: translateY(-2px); }
.hm-map { position:relative; width: 66px; height: 46px; border-radius: 5px; background-size:cover; background-position:center; display:grid; place-items:center; overflow:hidden; flex:0 0 66px; background-color: var(--panel-2); }
.hm-map::after { content:""; position:absolute; inset:0; background: rgba(8,10,14,.55); }
.hm-map b { position:relative; z-index:1; font-family: var(--mono); font-size: 9px; letter-spacing:1px; color:#fff; text-shadow: 0 1px 3px rgba(0,0,0,.8); }
.hm-body { flex:1; min-width:0; }
.hm-teams { display:flex; align-items:center; gap: 7px; font-size: 12.5px; }
.hm-teams > span { overflow:hidden; text-overflow:ellipsis; white-space:nowrap; max-width: 78px; color: var(--dim); }
.hm-teams > span.win { color: var(--text); font-weight:600; }
.hm-teams i { font-style:normal; font-family: var(--mono); color: var(--faint); flex:0 0 auto; }
.hm-date { font-family: var(--mono); font-size: 9.5px; color: var(--faint); margin-top:4px; display:block; }

@media (max-width: 920px) {
  .home-stats { grid-template-columns: repeat(3,1fr); }
  .home-grid2 { grid-template-columns: 1fr; gap: 0; }
  .home-grid2 .home-block { margin-bottom: 24px; }
  .home-matches { grid-template-columns: 1fr 1fr; }
  .records-home { grid-template-columns: 1fr; }
  .hh-title { font-size: 36px; }
}
@media (max-width: 560px) {
  .home-hero { padding: 32px 22px; }
  .home-stats { grid-template-columns: repeat(2,1fr); }
  .home-matches { grid-template-columns: 1fr; }
  .hh-title { font-size: 30px; }
  .podium { grid-template-columns: 1fr; }
  .pod-1 { order: -1; }
}
