/* Visual inspirado na planilha Black Gate Tracker: fundo escuro, faixas claras com título vermelho, fonte Lilita One. */
@import url('https://fonts.googleapis.com/css2?family=Lilita+One&display=swap');

:root {
  --bg: #15141c;
  --panel: #1f1e29;
  --panel-2: #272635;
  --line: #34324a;
  --text: #f1f0f7;
  --muted: #9a97b3;
  --band: #e9e8ee;          /* faixa clara de título */
  --band-text: #b3242f;     /* vermelho dos títulos */
  --accent: #7ee04b;        /* verde Snake */
  --accent-2: #4b9be0;
  --win: #3ecf8e;
  --loss: #ef5a5a;
  --draw: #e0b84b;
  --wr-bg: #c9c4f5;         /* célula de WR% lilás da planilha */
  --wr-text: #1b1840;
  --danger: #ff4d4d;
  --radius: 10px;
  --font-title: 'Lilita One', 'Trebuchet MS', system-ui, sans-serif;
  --font: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.4; min-height: 100vh; }
a { color: var(--accent-2); }
img { max-width: 100%; }
h1, h2, h3, .title { font-family: var(--font-title); font-weight: 400; letter-spacing: .3px; margin: 0; }

/* ---------- topo e navegação ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: #0f0e15; border-bottom: 2px solid var(--line); }
.topbar-inner { max-width: 1280px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { font-family: var(--font-title); font-size: 22px; color: var(--accent); text-decoration: none; white-space: nowrap; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; font-size: 14px; }
.nav a:hover { color: var(--text); background: var(--panel-2); }
.nav a.active { color: #111; background: var(--accent); }
.topbar .logout { background: none; border: 1px solid var(--line); color: var(--muted); }

/* ---------- filtros ---------- */
.filters { max-width: 1280px; margin: 0 auto; padding: 12px 16px 0; display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
.filters .team-pick { display: flex; align-items: center; gap: 10px; min-width: 0; max-width: 100%; }
/* nome de time longo não pode alargar a página no celular */
.filters .field { min-width: 0; max-width: 100%; }
.filters select { max-width: 100%; text-overflow: ellipsis; }
.filters .team-photo { flex: none; }
.team-photo { width: 40px; height: 40px; border-radius: 8px; object-fit: cover; background: var(--panel-2); border: 1px solid var(--line); }
.team-photo.lg { width: 72px; height: 72px; }

/* ---------- layout ---------- */
main { max-width: 1280px; margin: 0 auto; padding: 16px; }
.page-title { font-size: 30px; margin: 4px 0 16px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.hidden { display: none !important; }

/* ---------- painéis estilo planilha ---------- */
.panel { background: var(--panel); border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); }
.band { background: var(--band); color: var(--band-text); font-family: var(--font-title); font-size: 20px; padding: 6px 14px; display: flex; align-items: center; gap: 12px; }
.band .right { margin-left: auto; display: flex; gap: 14px; align-items: center; font-size: 15px; color: #333; }
.panel-body { padding: 14px; }

/* números W/L/D */
.w { color: var(--win); } .l { color: var(--loss); } .d { color: var(--draw); }
.wld { font-family: var(--font-title); display: inline-flex; gap: 10px; }
.wr-pill { display: inline-block; background: var(--wr-bg); color: var(--wr-text); font-family: var(--font-title); padding: 2px 10px; border-radius: 6px; min-width: 70px; text-align: center; }
.stat-label { font-family: var(--font-title); color: #c88aa0; font-size: 14px; letter-spacing: .5px; text-transform: uppercase; }
.stat-value { font-family: var(--font-title); font-size: 22px; }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th { background: #4a4860; color: #e6e4f2; font-family: var(--font-title); font-weight: 400; text-transform: uppercase; font-size: 13px; padding: 6px 8px; text-align: left; white-space: nowrap; }
.tbl td { padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr:hover td { background: var(--panel-2); }
.brawler-cell { display: flex; align-items: center; gap: 8px; }
.brawler-icon { width: 30px; height: 30px; border-radius: 6px; object-fit: cover; background: var(--panel-2); flex: none; }
.brawler-icon.sm { width: 24px; height: 24px; }
.map-thumb { width: 90px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: var(--panel-2); }

/* ---------- formulários ---------- */
label.field { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--muted); }
input, select, button, textarea { font: inherit; color: var(--text); }
input[type=text], input[type=password], input[type=date], input[type=search], select, textarea {
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-width: 0;
}
input:focus, select:focus, button:focus-visible { outline: 2px solid var(--accent-2); outline-offset: 1px; }
.btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 14px; cursor: pointer; font-weight: 600; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: #102006; border-color: transparent; }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.sm { padding: 4px 10px; font-size: 13px; }

/* ---------- avisos ---------- */
.alert { border-radius: var(--radius); padding: 12px 16px; margin: 12px 0; border: 1px solid; }
.alert.urgent { background: #3a1015; border-color: var(--danger); color: #ffd6d6; font-weight: 600; }
.alert.info { background: #14243a; border-color: var(--accent-2); color: #d6e8ff; }
.alert.warn { background: #3a3010; border-color: var(--draw); color: #fff1cc; }
.empty { color: var(--muted); padding: 24px; text-align: center; }
.toast { position: fixed; bottom: 16px; left: 50%; transform: translateX(-50%); background: #111; border: 1px solid var(--line); padding: 10px 16px; border-radius: 8px; z-index: 100; max-width: calc(100% - 32px); }
.toast.error { border-color: var(--danger); }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 16px; }
.login-card { width: 100%; max-width: 360px; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.login-card h1 { color: var(--accent); font-size: 28px; text-align: center; }

@media (max-width: 640px) {
  .page-title { font-size: 24px; }
  .band { font-size: 17px; flex-wrap: wrap; }
  .band .right { margin-left: 0; width: 100%; }
  .nav a { padding: 5px 8px; font-size: 13px; white-space: nowrap; }
  /* no celular o menu vira uma linha que rola para o lado */
  .topbar-inner { gap: 8px; }
  .nav { order: 3; flex: 1 0 100%; flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .topbar .logout { margin-left: auto; }
}

/* ---- maps pages (agent A) ---- */
/* Win Rate Maps (index.html) */
.mp-modes { display: grid; gap: 18px; }
.mp-mode-icon { width: 30px; height: 30px; object-fit: contain; flex: none; }
.mp-band-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.mp-band .w { color: #12804c; }
.mp-band .l { color: #c22b2b; }
.mp-band .d { color: #9a7300; }
.mp-band .right { flex-wrap: wrap; row-gap: 4px; }
.mp-band-games { font-family: var(--font-title); color: #333; white-space: nowrap; }
.mp-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(min(270px, 100%), 1fr)); }
.mp-card { display: flex; min-width: 0; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; color: inherit; text-decoration: none; transition: border-color .15s, transform .15s; }
.mp-card:hover, .mp-card:focus-visible { border-color: var(--accent); transform: translateY(-1px); outline: none; }
.mp-card-info { flex: 1; min-width: 0; padding: 12px 14px; display: flex; flex-direction: column; justify-content: space-between; gap: 12px; }
.mp-card-name { font-family: var(--font-title); font-size: 20px; line-height: 1.15; overflow-wrap: anywhere; }
.mp-card-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.mp-card-games { display: flex; flex-direction: column; gap: 2px; }
.mp-card-games .stat-value { line-height: 1; }
.mp-card-img { flex: none; width: 112px; min-height: 140px; object-fit: contain; background: #121119; padding: 6px; align-self: stretch; }
.mp-empty-card { opacity: .75; }

/* Ver mapa (map.html) */
.mv-picker { margin-bottom: 16px; max-width: 420px; }
.mv-picker select { width: 100%; }
.mv-hero { display: flex; gap: 18px; align-items: flex-start; flex-wrap: wrap; }
.mv-img { width: 200px; max-width: 100%; aspect-ratio: 3 / 4; object-fit: contain; background: #121119; border-radius: 8px; padding: 6px; }
.mv-stack { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; min-width: min(240px, 100%); max-width: 420px; }
.mv-stack li { display: flex; align-items: center; justify-content: space-between; gap: 12px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; }
.mv-stack .stat-value { font-size: 24px; }
.mv-section { margin-top: 16px; }
.mv-comp { display: flex; gap: 4px; }
.mv-type-badge { font-size: 12px; }

/* Partidas (history.html) */
.hs-list { display: grid; gap: 14px; }
.hs-series .band { font-size: 18px; }
.hs-score { font-family: var(--font-title); font-size: 18px; padding: 1px 10px; border-radius: 6px; color: #fff; white-space: nowrap; }
.hs-score.W { background: #1f9a63; } .hs-score.L { background: #c63a3a; } .hs-score.D { background: #9a7a1e; }
.hs-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 14px; margin-bottom: 10px; }
.hs-badge { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); white-space: nowrap; }
.hs-badge.md3 { border-color: #b98cff; color: #d9c2ff; }
.hs-badge.single { border-color: var(--accent-2); color: #bcdcff; }
.hs-players { overflow-wrap: anywhere; min-width: 0; }
.hs-games { display: grid; gap: 6px; }
.hs-game { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; background: var(--panel-2); border: 1px solid var(--line); border-left: 4px solid var(--line); border-radius: 8px; padding: 6px 10px; }
.hs-game.W { border-left-color: var(--win); } .hs-game.L { border-left-color: var(--loss); } .hs-game.D { border-left-color: var(--draw); }
.hs-game-n { font-family: var(--font-title); min-width: 52px; }
.hs-res { font-family: var(--font-title); min-width: 62px; }
.hs-dur { color: var(--muted); font-variant-numeric: tabular-nums; min-width: 40px; }
.hs-sides { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.hs-side { display: flex; gap: 3px; }
.hs-vs { color: var(--muted); font-size: 12px; font-weight: 700; }
.hs-star { display: flex; align-items: center; gap: 6px; font-size: 13px; margin-left: auto; min-width: 0; }
.hs-star .star { color: #ffd23f; }
.hs-star.enemy { color: var(--muted); }
.hs-more { display: flex; justify-content: center; margin: 18px 0; }

@media (max-width: 640px) {
  .mp-card-img { width: 92px; min-height: 120px; }
  .mp-card-name { font-size: 18px; }
  .mv-img { width: 100%; max-width: 260px; margin: 0 auto; }
  .mv-hero { flex-direction: column; align-items: stretch; }
  .mv-stack { max-width: none; }
  .hs-star { margin-left: 0; width: 100%; }
}
/* ---- end maps pages (agent A) ---- */

/* ---- team pages (agent B) ---- */
.tp-controls { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.tp-controls .field { min-width: 0; max-width: 100%; }
.tp-controls select, .tp-controls input { max-width: 100%; }
.tp-stack { display: flex; flex-direction: column; gap: 16px; }
.tp-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); align-items: start; }
.tp-grid > *, .tp-stack > * { min-width: 0; }
.tp-team { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.tp-team .team-photo.lg { flex: none; }
.tp-team-name { font-family: var(--font-title); font-size: 26px; overflow-wrap: anywhere; }
.tp-roster { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.tp-roster .tp-chip { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 4px 10px; font-size: 13px; display: flex; gap: 6px; align-items: baseline; max-width: 100%; }
.tp-chip b { font-family: var(--font-title); font-weight: 400; color: var(--accent); }
.tp-chip .tag { color: var(--muted); font-size: 12px; }
.tp-map-head { display: flex; gap: 10px; align-items: center; margin-left: auto; }
.tp-map-head img { width: 44px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; }
.tp-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 10px; }
.tp-stat { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tp-stat .stat-value.w, .tp-stat .stat-value.l, .tp-stat .stat-value.d { font-family: var(--font-title); }
.mode-cell { display: inline-flex; align-items: center; gap: 8px; }
.mode-cell img { width: 26px; height: 26px; object-fit: contain; flex: none; }
.mode-cell .mode-dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.tp-comp { display: inline-flex; gap: 4px; align-items: center; }
.tp-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.tp-pill-btn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--text); display: inline-flex; gap: 6px; align-items: baseline; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.tp-pill-btn .tag { color: var(--muted); font-weight: 400; font-size: 12px; }
.tp-pill-btn.active { background: var(--accent); color: #111; border-color: transparent; }
.tp-pill-btn.active .tag { color: #234; }
.tbl tr.tp-click { cursor: pointer; }
.tbl tr.tp-selected td { background: #2f2d42; }
.tbl td .sub { color: var(--muted); font-size: 12px; margin-left: 6px; }
.tp-map-cell { display: flex; align-items: center; gap: 8px; }
.tp-map-cell img.mode-mini { width: 22px; height: 22px; object-fit: contain; flex: none; }
.tp-map-cell img.map-mini { width: 30px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 4px; background: var(--panel-2); flex: none; }
.tbl td.zero { color: var(--muted); }
.tbl th.grp { text-align: center; border-left: 2px solid var(--panel); }
.tbl td.sep, .tbl th.sep { border-left: 2px solid var(--line); }
.tp-picker { display: flex; flex-direction: column; gap: 10px; }
.tp-picker input[type=search] { width: 100%; max-width: 420px; }
.tp-bgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; max-height: 260px; overflow-y: auto; padding: 2px; }
.tp-bgrid.collapsed { max-height: 0; overflow: hidden; padding: 0; }
.tp-bbtn { background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; padding: 6px 4px; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 11px; color: var(--text); min-width: 0; }
.tp-bbtn span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tp-bbtn img { width: 40px; height: 40px; object-fit: cover; border-radius: 6px; }
.tp-bbtn:hover { border-color: var(--muted); }
.tp-bbtn.active { border-color: var(--accent); background: #24361c; }
.tp-hero { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }
.tp-hero img { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--panel-2); }
.tp-hero .tp-team-name { font-size: 28px; }
.tp-note { color: var(--muted); font-size: 12px; padding: 8px 14px 12px; }
@media (max-width: 640px) {
  .tp-team-name { font-size: 22px; }
  .tp-map-head { margin-left: 0; }
  .tp-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tp-controls .field, .tp-controls select { width: 100%; }
  .tp-bgrid { grid-template-columns: repeat(auto-fill, minmax(64px, 1fr)); }
}
/* ---- end team pages (agent B) ---- */

/* ---- admin (agent D) ---- */
.adm-head { margin-bottom: 4px; }
.adm-head .page-title { margin: 4px 0; }
.adm-jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 8px; }
.adm-jump a { color: var(--muted); text-decoration: none; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; font-weight: 600; }
.adm-jump a:hover { color: var(--text); border-color: var(--muted); }
#adm-maps, #adm-teams, #adm-collector, #adm-series { scroll-margin-top: 70px; }
.adm-section { margin-bottom: 18px; }
.adm-band-title { font-size: inherit; color: inherit; }
.adm-note { margin: 0 0 12px; }
.adm-catalog { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.adm-mono { font-family: ui-monospace, 'Cascadia Mono', Consolas, monospace; }
.adm-check { display: flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); }
.adm-badge { display: inline-block; font-size: 12px; padding: 1px 8px; border-radius: 999px; background: var(--panel-2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.adm-badge.danger { color: #ffd6d6; background: #3a1015; border-color: var(--danger); }
.adm-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 2px; }

/* login de admin */
.adm-login-wrap { display: grid; place-items: center; padding: 24px 0; }
.adm-login h1 { color: var(--accent); }
.adm-login-msg { color: #ffb3b3; min-height: 1em; }

/* mapas */
.adm-modes { display: grid; gap: 14px; }
.adm-mode { border-left: 4px solid var(--line); padding-left: 10px; }
.adm-mode-title { font-size: 18px; margin-bottom: 8px; }
.adm-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 10px; }
.adm-slot { display: flex; gap: 10px; background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px; }
.adm-slot.out { border-color: var(--danger); background: #2a1418; }
.adm-slot.empty-slot { border-style: dashed; }
.adm-thumb { width: 72px; flex: none; }
.adm-slot-info { display: flex; flex-direction: column; align-items: flex-start; gap: 5px; min-width: 0; }
.adm-slot-n { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; }
.adm-map-name { font-family: var(--font-title); font-size: 17px; overflow-wrap: anywhere; }

/* seletor de mapas */
.adm-dialog { width: min(760px, calc(100vw - 24px)); max-height: calc(100vh - 32px); background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.adm-dialog::backdrop { background: rgba(0, 0, 0, .65); }
.adm-dialog-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.adm-dialog-head h3 { flex: 1; font-size: 20px; }
.adm-dialog input[type=search] { width: 100%; margin-bottom: 10px; }
.adm-pick-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 8px; }
.adm-pick { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; text-align: center; }
.adm-pick:hover:not(:disabled) { border-color: var(--accent); }
.adm-pick:disabled { opacity: .5; cursor: not-allowed; }
.adm-pick.current { opacity: 1; border-color: var(--accent); }
.adm-pick img, .adm-pick-noimg { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: var(--bg); }
.adm-pick-name { font-size: 13px; font-weight: 600; overflow-wrap: anywhere; }
.adm-manual-list h4 { margin: 14px 0 6px; font-size: 14px; color: var(--muted); }
.adm-manual-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid var(--line); }

/* times */
.adm-fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 0 0 14px; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.adm-fieldset legend { font-family: var(--font-title); font-size: 17px; padding: 0 6px; }
.adm-fieldset:disabled > :not(legend):not(.alert) { opacity: .5; }
.adm-form-top { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.adm-grow { flex: 1 1 200px; }
.adm-photo-field { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.adm-photo-preview { display: grid; place-items: center; overflow: hidden; }
.adm-photo-preview img { width: 100%; height: 100%; object-fit: cover; }
.adm-file { max-width: 230px; font-size: 13px; }
.adm-tags { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.adm-tags input { text-transform: uppercase; width: 100%; }
.adm-teams { display: grid; gap: 12px; }
.adm-team { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.adm-team-head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.adm-team-title { flex: 1 1 180px; min-width: 0; }
.adm-team-title h3 { font-size: 20px; overflow-wrap: anywhere; }
.adm-team-actions { display: flex; gap: 6px; }
.adm-roster td { white-space: nowrap; }
.adm-status.ok { color: var(--win); }
.adm-status.err { color: var(--loss); white-space: normal; }
.adm-edit { display: flex; flex-direction: column; gap: 10px; }
.adm-edit h3 { font-size: 18px; }
.adm-errs { margin: 6px 0 0; padding-left: 18px; }
.adm-err-cell { color: var(--loss); white-space: normal !important; min-width: 160px; }

/* histórico de md3 */
.adm-inline { flex-direction: row !important; align-items: center; gap: 8px !important; color: #333 !important; }
.adm-inline select { color: var(--text); max-width: 200px; }
.adm-counts { margin-bottom: 10px; }
.adm-series-list { display: grid; gap: 10px; }
.adm-series { background: var(--panel-2); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px; }
.adm-series.excluded { opacity: .7; border-style: dashed; border-color: var(--danger); }
.adm-series-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.adm-series-map { width: 44px; aspect-ratio: 3 / 4; object-fit: cover; border-radius: 6px; background: var(--bg); flex: none; }
.adm-series-info { flex: 1 1 180px; min-width: 0; }
.adm-series-score { font-family: var(--font-title); font-size: 22px; white-space: nowrap; }
.adm-games { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 4px; }
.adm-games li { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 4px 0; border-top: 1px solid var(--line); }
.adm-game-n { font-family: var(--font-title); color: var(--muted); width: 22px; }
.adm-outcome { font-family: var(--font-title); width: 18px; text-align: center; }
.adm-outcome.w { color: var(--win); } .adm-outcome.l { color: var(--loss); } .adm-outcome.d { color: var(--draw); }
.adm-brawlers { display: inline-flex; gap: 3px; }
.adm-game-time { margin-left: auto; }
.adm-pager { justify-content: center; margin-top: 12px; }

@media (max-width: 640px) {
  .adm-slots { grid-template-columns: 1fr; }
  .adm-tags { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .adm-pick-grid { grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); }
  .adm-dialog { padding: 10px; }
  .adm-team-actions { width: 100%; }
  .adm-series-score { font-size: 19px; }
  .adm-game-time { margin-left: 0; width: 100%; }
  .adm-file { max-width: 100%; }
}
/* ---- end admin (agent D) ---- */

/* ---- draft (agent C) ---- */
.draft-layout { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 980px) {
  .draft-layout { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); align-items: start; }
  .draft-right { position: sticky; top: 64px; max-height: calc(100vh - 80px); overflow-y: auto; }
}
.draft-left { min-width: 0; }
.draft-bottom { margin-top: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr)); }
.draft-config-row { display: flex; gap: 14px; align-items: flex-start; }
.draft-map-thumb { width: 72px; flex: none; }
.draft-config-fields { display: flex; flex-direction: column; gap: 10px; flex: 1; min-width: 0; }
.draft-config-fields select { width: 100%; max-width: 340px; }
.draft-fp { gap: 8px; }
.draft-board { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.draft-side { background: var(--panel-2); border-radius: 8px; padding: 10px; border-top: 3px solid var(--accent-2); min-width: 0; }
.draft-side.enemy { border-top-color: var(--loss); }
.draft-side-title { font-family: var(--font-title); font-size: 17px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.draft-fp-tag { font-family: var(--font); font-size: 11px; font-weight: 700; background: var(--draw); color: #222; border-radius: 4px; padding: 1px 6px; }
.draft-label { margin: 8px 0 4px; }
.draft-slots { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
.draft-slot { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; min-height: 66px; min-width: 0;
  background: var(--panel); border: 1px dashed var(--line); border-radius: 8px; cursor: pointer; color: var(--text); }
.draft-slot:disabled { cursor: default; opacity: 1; }
.draft-slot.filled { border-style: solid; }
.draft-slot.ban.filled { border-color: var(--loss); }
.draft-slot.ban.filled .draft-slot-icon { filter: grayscale(1); opacity: .7; }
.draft-slot.active { border: 2px solid var(--accent); box-shadow: 0 0 0 2px rgba(126, 224, 75, .25); }
.draft-slot-icon { width: 40px; height: 40px; }
.draft-slot-name { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-slot-ph { margin: auto; font-size: 12px; color: var(--muted); }
.draft-step { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 10px; }
.draft-step-msg { font-family: var(--font-title); font-size: 17px; padding: 4px 10px; border-radius: 6px; background: var(--panel-2); border-left: 4px solid var(--accent-2); }
.draft-step-msg.enemy { border-left-color: var(--loss); }
.draft-step-msg.done { border-left-color: var(--accent); }
.draft-search input { width: 100%; margin-bottom: 10px; }
.draft-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(66px, 1fr)); gap: 6px; max-height: 360px; overflow-y: auto; padding: 2px; }
.draft-brawler { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 2px; min-width: 0;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px; cursor: pointer; }
.draft-brawler:hover:not(:disabled) { border-color: var(--accent); }
.draft-brawler.blocked { opacity: .35; cursor: not-allowed; }
.draft-brawler-icon { width: 44px; height: 44px; }
.draft-brawler-name { font-size: 11px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.draft-brawler-tag { position: absolute; top: 2px; right: 2px; font-size: 9px; font-weight: 700; padding: 0 3px; border-radius: 3px; background: #111; color: var(--muted); }
.draft-brawler.tag-ban .draft-brawler-tag { color: var(--loss); }
.draft-brawler.tag-nosso .draft-brawler-tag { color: var(--accent-2); }
.draft-brawler.tag-rival .draft-brawler-tag { color: var(--loss); }
.draft-actions { margin-top: 12px; }
.draft-chance { background: var(--panel-2); border-radius: 8px; padding: 10px 12px; margin-bottom: 14px; }
.draft-chance-sample { text-align: right; }
.draft-bar { height: 8px; background: var(--line); border-radius: 4px; overflow: hidden; margin: 8px 0; }
.draft-bar-fill { height: 100%; background: var(--accent); }
.draft-parts { margin: 6px 0; padding-left: 18px; }
.draft-caveat { margin: 8px 0 0; }
.draft-turn { font-family: var(--font-title); font-size: 16px; margin-bottom: 8px; }
.draft-turn.us { color: var(--accent-2); }
.draft-turn.enemy { color: var(--loss); }
.draft-h3 { font-size: 16px; margin: 12px 0 8px; color: var(--band); }
.draft-sug-block + .draft-sug-block { border-top: 1px solid var(--line); margin-top: 8px; }
.draft-sug-list, .draft-mini-list, .draft-saved-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.draft-sug { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; }
.draft-sug-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.draft-sug-name { min-width: 0; }
.draft-rank { font-family: var(--font-title); color: var(--muted); width: 18px; text-align: center; }
.draft-reasons { margin-top: 6px; }
.reason.good { color: var(--win); }
.reason.bad { color: var(--loss); }
.reason.warn { color: var(--draw); }
.reason.info { color: var(--muted); }
.draft-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.draft-chip { font-size: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 1px 8px; }
.draft-chip.good { border-color: var(--win); }
.draft-chip.bad { border-color: var(--loss); }
.draft-mini { display: flex; align-items: center; gap: 8px; background: var(--panel-2); border-radius: 8px; padding: 6px 8px; }
.draft-mini-text { min-width: 0; flex: 1; }
.draft-chance-mini { font-family: var(--font-title); }
.draft-saved { background: var(--panel-2); border-radius: 8px; padding: 8px 10px; }
.draft-saved-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.draft-saved-sides { display: flex; flex-direction: column; gap: 6px; margin-top: 6px; }
.draft-saved-side { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; padding-left: 8px; border-left: 3px solid var(--accent-2); }
.draft-saved-side.enemy { border-left-color: var(--loss); }
.draft-saved-label { font-size: 13px; color: var(--muted); width: 56px; }
.draft-saved-group { display: inline-flex; align-items: center; gap: 6px; }
.draft-saved-group.bans .brawler-icon { filter: grayscale(1); opacity: .75; }
.draft-icons { display: inline-flex; gap: 3px; }
.draft-result { font-family: var(--font-title); padding: 2px 10px; border-radius: 6px; background: var(--panel); }
.draft-result.w { color: var(--win); } .draft-result.l { color: var(--loss); } .draft-result.d { color: var(--draw); }
.draft-result.pending { font-family: var(--font); font-size: 12px; color: var(--muted); }
.draft-ov-summary { margin-bottom: 10px; }
.draft-fp-boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.draft-fp-box { background: var(--panel-2); border-radius: 8px; padding: 10px; display: flex; flex-direction: column; gap: 2px; }
.draft-ov-grid { display: grid; gap: 4px 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
/* tabelas de first picks (4 colunas) cabendo na coluna (360px e colunas estreitas no desktop) sem rolagem lateral */
.draft-ov-block .tbl th, .draft-ov-block .tbl td { padding: 6px 4px; }
.draft-ov-block .wld { gap: 4px; }
.draft-ov-block .wr-pill { min-width: 0; padding: 2px 6px; }
.draft-ov-block .tbl th { white-space: normal; }
@media (max-width: 640px) {
  .draft-board { gap: 8px; }
  .draft-side { padding: 8px 6px; }
  .draft-slot { min-height: 58px; }
  .draft-slot-icon { width: 32px; height: 32px; }
  .draft-slot-name { font-size: 10px; }
  .draft-grid { grid-template-columns: repeat(auto-fill, minmax(56px, 1fr)); max-height: 300px; }
  .draft-brawler-icon { width: 38px; height: 38px; }
  .draft-map-thumb { width: 56px; }
  .draft-chance-sample { text-align: left; }
  .draft-saved-label { width: auto; min-width: 44px; }
}
/* ---- end draft (agent C) ---- */
