/* Coleção de camisas — mesmo esqueleto visual do Backlog de Jogos, com tema claro e escuro. */
:root, [data-tema="claro"] {
  color-scheme: light;
  --bg: #f4f3ef; --panel: #ffffff; --line: #e0ddd5; --ink: #17191b; --mute: #6a6e72;
  --hover: #efede7; --acc: #1f7a46; --acc-ink: #fff; --bar: #0f1713; --sombra: 0 10px 20px -14px rgba(0,0,0,.45);
  --papel: #fbfaf5; --s1: var(--acc); --s2: #f47230;
}
[data-tema="escuro"] {
  color-scheme: dark;
  --bg: #121513; --panel: #1b1f1d; --line: #2c322f; --ink: #eef0ee; --mute: #9fa7a2;
  --hover: #252a27; --acc: #2f9e5f; --acc-ink: #fff; --bar: #0a0c0b; --sombra: 0 10px 20px -12px rgba(0,0,0,.7);
  --papel: #f4f1e8; --s1: var(--acc); --s2: #e76624;
}
:root { --disp: Archivo, Inter, system-ui, sans-serif; --w: 1320px; --pad: max(4vw, 16px); }

* { box-sizing: border-box; min-width: 0; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 Inter, system-ui, sans-serif; overflow-x: clip; }
h1, h2, h3 { font-family: var(--disp); letter-spacing: -.01em; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--acc); outline-offset: 2px; }
.hint { color: var(--mute); font-size: 14px; margin: 0 0 12px; }
.hint.pequena { font-size: 13px; margin-top: 6px; }
.link { background: none; border: 0; padding: 0; color: var(--acc); font-weight: 600; text-decoration: underline; font-size: inherit; }
.err { color: #d8452f; font-size: 14px; margin: 8px 0 0; }

/* ---------- Topo ---------- */
header { background: var(--bar); color: #fff; padding: max(22px, env(safe-area-inset-top)) 0 0; }
.hin { max-width: calc(var(--w) + 2 * var(--pad)); margin: 0 auto; padding: 0 var(--pad); }
.top { display: flex; align-items: center; gap: 12px 20px; flex-wrap: wrap; justify-content: space-between; }
header h1 { margin: 0; font-size: clamp(28px, 4.4vw, 42px); line-height: 1.05; font-weight: 800; letter-spacing: -.02em; }
.hdir { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.stats { display: flex; gap: 18px; color: #bdc3bf; font-size: 14px; flex-wrap: wrap; }
.stats b { color: #fff; font: 800 20px var(--disp); margin-right: 4px; }
.hacts { display: flex; align-items: center; gap: 6px; }
.hbtn { border: 1px solid rgba(255,255,255,.18); background: rgba(255,255,255,.06); color: #fff; border-radius: 10px; height: 40px; min-width: 40px; display: grid; place-items: center; padding: 0; }
.hbtn svg { width: 20px; height: 20px; }
.hbtn.txt { padding: 0 14px; font-weight: 600; font-size: 14px; }
.hbtn:hover { background: rgba(255,255,255,.12); }
nav { display: flex; gap: 4px; margin: 16px 0 0 -16px; overflow-x: auto; scrollbar-width: none; }
nav a { flex: none; color: #c9cfcb; text-decoration: none; padding: 12px 16px; border-radius: 10px 10px 0 0; font-weight: 600; font-size: 15px; }
nav a[aria-current] { background: var(--bg); color: var(--ink); }
nav .cnt { font-size: 12px; font-weight: 600; opacity: .65; margin-left: 2px; }
.faixa-publico { background: #f2bd2c; color: #1b1407; text-align: center; padding: 8px 16px; font-size: 14px; font-weight: 500; }
.faixa-publico .link { color: inherit; }
main { padding: 22px var(--pad) 120px; max-width: calc(var(--w) + 2 * var(--pad)); margin: 0 auto; }

.menu { position: relative; }
.menu-lista { position: absolute; right: 0; top: calc(100% + 6px); min-width: 270px; background: var(--panel); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 14px 30px rgba(0,0,0,.35); padding: 4px; z-index: 30; }
.menu-lista button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 9px 12px; border-radius: 8px; font-size: 15px; }
.menu-lista button:hover { background: var(--hover); }
.menu-lista hr { border: 0; border-top: 1px solid var(--line); margin: 4px; }

/* ---------- Botões ---------- */
.btn { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; padding: 10px 16px; min-height: 44px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; white-space: nowrap; }
.btn:hover { background: var(--hover); }
.btn.pri { background: var(--acc); border-color: var(--acc); color: var(--acc-ink); }
.btn.pri:hover { filter: brightness(1.08); }
.btn.ghost { background: none; }
.btn.danger { color: #d8452f; }
.btn:disabled { opacity: .5; cursor: default; }
.btn.sm { min-height: 34px; padding: 4px 12px; font-size: 14px; }
.icon { border: 1px solid var(--line); background: var(--panel); border-radius: 10px; width: 44px; height: 44px; flex: none; display: grid; place-items: center; padding: 0; }
.icon svg { width: 20px; height: 20px; }
.icon:hover { background: var(--hover); }

/* ---------- Filtros (igual ao Backlog) ---------- */
.filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.filters .q { grid-column: 1 / -1; }
.filters input, .filters select, .filters .btn, .filters .seg { height: 44px; min-height: 0; margin: 0; }
.filters .btn { padding: 0 12px; }
.filters input, .filters select, .field input, .field select, textarea, .pf input, .pf select, #tlsel, .dlg input[type="password"] {
  border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 10px 12px; min-height: 44px; font-size: 16px; width: 100%;
}
.filters select, .pf select, #tlsel, .field select {
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%239fa7a2' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center; background-size: 18px; padding-right: 36px;
}
.seg { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.seg button, .seg label { flex: 1; border: 0; background: var(--bg); height: 100%; padding: 0 12px; font-weight: 600; font-size: 14px; display: grid; place-items: center; cursor: pointer; white-space: nowrap; }
.seg button + button, .seg label + label { border-left: 1px solid var(--line); }
.seg button[aria-pressed="true"], .seg label:has(input:checked) { background: var(--ink); color: var(--bg); }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.sorthd { font: 600 15px var(--disp); color: var(--mute); margin: 12px 0; display: flex; gap: 12px; align-items: baseline; flex-wrap: wrap; }
.sorthd .link { font: 600 14px Inter, sans-serif; }

/* seleção múltipla */
.ms { position: relative; }
.msb { width: 100%; height: 44px; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 0 10px 0 12px; font-size: 16px; display: flex; align-items: center; justify-content: space-between; gap: 8px; text-align: left; }
.msb span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msb svg { width: 18px; height: 18px; flex: none; color: var(--mute); }
.ms.on .msb { border-color: var(--mute); font-weight: 600; }
.msp { position: absolute; top: calc(100% + 4px); left: 0; min-width: 100%; width: max-content; max-width: min(320px, 90vw); max-height: 340px; overflow-y: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 4px; z-index: 12; box-shadow: 0 14px 30px rgba(0,0,0,.35); }
.msi { display: flex; gap: 10px; align-items: center; padding: 4px 10px; border-radius: 8px; min-height: 32px; font-size: 15px; line-height: 1.3; cursor: pointer; }
.msi:hover { background: var(--hover); }
.msi small { margin-left: auto; color: var(--mute); font-size: 13px; padding-left: 10px; }
.msp .msi input { width: 18px; height: 18px; min-height: 0; padding: 0; margin: 0; border: 0; accent-color: var(--acc); flex: none; }
.msi.all { border-bottom: 1px solid var(--line); border-radius: 8px 8px 0 0; margin-bottom: 3px; padding-bottom: 6px; font-weight: 600; }

/* ---------- Grade ---------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 22px 18px; }
.tw { display: flex; flex-direction: column; }
.tw > .tcap:last-child:not(:first-child) { margin-top: auto; padding-top: 4px; }
.tile { border: 0; background: none; padding: 0; text-align: left; display: flex; flex-direction: column; gap: 8px; width: 100%; }
.cover { position: relative; aspect-ratio: 3 / 4; border-radius: 14px; overflow: hidden; box-shadow: var(--sombra); transition: transform .15s; background: var(--panel); }
.cover img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(160deg, rgba(255,255,255,.14), transparent 45%, rgba(0,0,0,.18)); pointer-events: none; }
.tile:hover .cover { transform: translateY(-3px); }
.chipst { position: absolute; left: 8px; top: 8px; z-index: 2; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 999px; white-space: nowrap; color: #fff; background: rgba(15,18,16,.72); }
.chipst.fav { background: #f2bd2c; color: #1b1407; }
.notab { position: absolute; right: 8px; bottom: 8px; z-index: 2; min-width: 42px; height: 30px; padding: 0 8px; border-radius: 8px; display: grid; place-items: center; font: 700 15px var(--disp); background: rgba(15,18,16,.78); color: #f2bd2c; }
.tcap strong { display: block; font: 700 16px/1.2 var(--disp); }
.tcap small { display: block; color: var(--mute); font-size: 13px; margin-top: 2px; }
.tcap .linha { display: flex; justify-content: space-between; align-items: flex-end; gap: 8px; margin-top: 6px; font-size: 14px; }
.camisa-svg { width: 100%; height: 100%; display: block; }
.empty { padding: 48px 20px; text-align: center; color: var(--mute); border: 2px dashed var(--line); border-radius: 14px; }

/* ---------- Ficha em figurinha ---------- */
.veil { position: fixed; inset: 0; background: rgba(8,10,9,.62); z-index: 20; display: flex; justify-content: center; }
.view { background: var(--bg); width: min(560px, 100%); height: 100%; overflow-y: auto; overscroll-behavior: contain; }
.vbar { display: flex; justify-content: flex-end; gap: 8px; padding: 14px 16px 4px; position: sticky; top: 0; background: var(--bg); z-index: 6; }
.vbar .pos { margin-right: auto; align-self: center; color: var(--mute); font-size: 14px; }
.palco { position: relative; display: flex; align-items: center; justify-content: center; padding: 14px 0 26px; }
.arrow { width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel); font-size: 22px; line-height: 1; flex: none; display: grid; place-items: center; padding: 0; }
.arrow:disabled { opacity: .3; cursor: default; }

.fig-wrap { --c1: #1f6f43; --c2: #f4f1ea; position: relative; width: min(290px, 70vw); aspect-ratio: 5 / 7; margin: 0 14px; perspective: 1400px; transform: rotate(-1.5deg); transition: transform .25s; }
.fig-wrap:hover { transform: rotate(0) scale(1.01); }
.fig-wrap.gira { cursor: pointer; }
.fig-flip { position: relative; width: 100%; height: 100%; transform-style: preserve-3d; transition: transform .7s cubic-bezier(.3, .7, .3, 1); }
.fig-flip.virada { transform: rotateY(180deg); }
.fig { position: absolute; inset: 0; padding: 9px; border-radius: 18px; background: var(--papel); box-shadow: 0 22px 40px -20px rgba(0,0,0,.75), 0 2px 0 rgba(0,0,0,.08); -webkit-backface-visibility: hidden; backface-visibility: hidden; }
.fig.verso { transform: rotateY(180deg); }
.dica-virar { text-align: center; color: var(--mute); font-size: 13px; margin: -12px 16px 14px; }
.extras { margin-top: 20px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: var(--mute); font-size: 13px; }
.extras div { display: flex; gap: 6px; flex-wrap: wrap; }
.extras button { width: 40px; height: 50px; border-radius: 6px; overflow: hidden; border: 1px solid var(--line); padding: 0; background: var(--panel); opacity: .85; }
.extras button:hover { opacity: 1; }
.extras img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.86); display: grid; place-items: center; padding: 20px; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 10px; }
.fig-in { position: relative; height: 100%; border-radius: 11px; overflow: hidden; display: flex; flex-direction: column; background: radial-gradient(120% 80% at 50% 10%, color-mix(in srgb, var(--c1) 70%, #fff), var(--c1) 55%, color-mix(in srgb, var(--c1) 70%, #000)); }
.fig-in::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.07) 0 10px, transparent 10px 20px); pointer-events: none; }
.fig-topo { position: relative; z-index: 2; display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 10px 6px; }
.fig-num { min-width: 40px; height: 40px; padding: 0 6px; border-radius: 50%; background: var(--c2); color: var(--c1); display: grid; place-items: center; font: 900 19px var(--disp); box-shadow: 0 0 0 2px rgba(255,255,255,.7); }
.fig-etq { font: 700 11px/1.25 Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; color: #fff; text-align: right; text-shadow: 0 1px 2px rgba(0,0,0,.45); }
.fig-foto { position: relative; z-index: 1; flex: 1; margin: 0 10px; border-radius: 8px; overflow: hidden; background: rgba(255,255,255,.14); box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.fig-foto img, .fig-foto svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.fig-placa { position: relative; z-index: 2; margin: 8px 10px 10px; background: var(--papel); color: #17191b; border-radius: 8px; padding: 7px 10px 8px 14px; overflow: hidden; }
.fig-placa::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 6px; background: linear-gradient(var(--c1) 50%, var(--c2) 50%); }
.fig-placa strong { display: block; font: 800 20px/1.1 var(--disp); letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fig-placa small { display: block; font-size: 12.5px; color: #555a5e; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fig-nota { position: absolute; right: -8px; bottom: 58px; z-index: 4; width: 56px; height: 56px; border-radius: 50%; background: #17191b; color: #f2bd2c; display: grid; place-items: center; font: 800 16px var(--disp); box-shadow: 0 0 0 3px var(--papel), 0 6px 14px rgba(0,0,0,.35); }
.fig-selo { position: absolute; left: -6px; top: 62px; z-index: 4; transform: rotate(-12deg); background: #d8452f; color: #fff; font: 800 11px var(--disp); letter-spacing: .06em; text-transform: uppercase; padding: 4px 10px; border-radius: 4px; box-shadow: 0 3px 8px rgba(0,0,0,.3); }
.fig::after { content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; background: linear-gradient(115deg, transparent 35%, rgba(255,255,255,.28) 47%, transparent 58%); }
.fig.holo::after { background: linear-gradient(115deg, rgba(255,0,128,.14), rgba(255,220,0,.16), rgba(0,255,170,.14), rgba(0,140,255,.16), rgba(200,0,255,.14)); background-size: 300% 300%; mix-blend-mode: color-dodge; animation: holo 6s linear infinite; }
@keyframes holo { 0% { background-position: 0% 50%; } 100% { background-position: 300% 50%; } }
.miniaturas { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin: -10px 16px 14px; }
.miniaturas button { width: 46px; height: 58px; border-radius: 8px; overflow: hidden; border: 2px solid transparent; padding: 0; background: var(--panel); }
.miniaturas button[aria-current="true"] { border-color: var(--acc); }
.miniaturas img { width: 100%; height: 100%; object-fit: cover; display: block; }
.det { padding: 0 22px 40px; }
.det h2 { margin: 0; font-size: 26px; line-height: 1.1; padding-bottom: 8px; border-bottom: 1px solid var(--line); }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 16px; margin: 12px 0; font-size: 14px; }
.facts span { color: var(--mute); }
.facts b { display: block; color: var(--ink); font-weight: 600; font-size: 15px; }
.facts .est-fixas { display: flex; gap: 2px; margin-top: 2px; }
.est-fixas svg { width: 20px; height: 20px; }
.pills { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
.pill { font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; white-space: nowrap; color: #fff; background: #5f6a7a; }
.pill.fav { background: #f2bd2c; color: #1b1407; }
.pill.aut { background: #d8452f; }
.pill.des { background: #6b4fd8; }
.rev { margin-top: 18px; }
.rev h3 { font-size: 17px; margin: 0 0 6px; }
.rev p { margin: 0; white-space: pre-wrap; background: var(--panel); padding: 12px 14px; border-radius: 12px; font-size: 15px; }
.det .acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 18px; }

/* ---------- Tier lists (igual ao Backlog) ---------- */
.tierbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
#tlsel { width: auto; font-weight: 600; }
.tlayout { display: grid; gap: 16px; }
.tier { display: grid; grid-template-columns: var(--lw, 72px) minmax(0, 1fr); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; margin-bottom: 8px; min-height: 96px; }
.tier .lab { display: flex; align-items: center; justify-content: center; font: 800 26px/1.1 var(--disp); color: #141318; border: 0; padding: 6px 8px; text-align: center; overflow-wrap: break-word; hyphens: auto; min-width: 0; }
.tier .zone { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; align-content: flex-start; background: var(--panel); }
.tier.target .zone, .plist.target { outline: 3px dashed var(--acc); outline-offset: -3px; }
.chip { width: 60px; height: 80px; border-radius: 8px; border: 0; padding: 0; overflow: hidden; position: relative; background: var(--bg); display: block; }
.chip img, .chip svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.chip.sel { outline: 3px solid var(--acc); outline-offset: 2px; }
.poolp { border: 1px solid var(--line); border-radius: 14px; padding: 12px; background: var(--panel); display: grid; gap: 8px; }
.poolp h3 { margin: 0; font-size: 17px; display: flex; justify-content: space-between; align-items: baseline; }
.poolp h3 small { font: 400 13px Inter, sans-serif; color: var(--mute); }
.pf { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px; }
.pf input, .pf select { padding: 0 10px; height: 44px; }
.pf .q, .pf #po { grid-column: 1 / -1; }
.pf label { grid-column: 1 / -1; display: flex; gap: 8px; align-items: center; font-size: 14px; min-height: 36px; }
.pf label input { width: 20px; height: 20px; min-height: 0; accent-color: var(--acc); }
.plist { max-height: min(55vh, 560px); overflow-y: auto; display: grid; gap: 4px; align-content: start; border-radius: 10px; min-height: 80px; }
.prow { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 10px; align-items: center; border: 1px solid var(--line); background: var(--bg); border-radius: 10px; padding: 5px 8px 5px 5px; text-align: left; min-height: 52px; width: 100%; }
.prow i { width: 36px; height: 48px; border-radius: 6px; display: block; overflow: hidden; }
.prow i img, .prow i svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.prow span { font-weight: 600; font-size: 14px; line-height: 1.2; }
.prow small { display: block; font-weight: 400; color: var(--mute); font-size: 12px; }
.prow em { font: 700 14px var(--disp); font-style: normal; padding: 2px 8px; border-radius: 6px; color: #141318; }
.prow.sel { outline: 3px solid var(--acc); outline-offset: -1px; }
@media (min-width: 700px) { .pf { grid-template-columns: 2fr 1fr 1fr 1fr; } .pf .q, .pf #po { grid-column: auto; } .plist { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); } }
.movebar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 15; background: var(--bar); color: #fff; border-radius: 14px; padding: 10px 12px; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; width: min(720px, calc(100% - 24px)); box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.movebar .mt { flex: 1 1 100%; font-size: 14px; }
.movebar button { min-width: 48px; height: 44px; border-radius: 10px; border: 0; font: 700 18px var(--disp); color: #141318; padding: 0 10px; }
.movebar .x { background: #3a3f3c; color: #fff; font: 600 14px Inter, sans-serif; }

/* ---------- Dados ---------- */
.list { display: grid; }
.li { display: grid; grid-template-columns: 45px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.li:last-child { border-bottom: 0; }
.li .thumb { width: 45px; height: 60px; border-radius: 8px; overflow: hidden; }
.li .thumb img, .li .thumb svg { width: 100%; height: 100%; object-fit: cover; display: block; }
.li .info strong { display: block; font-size: 16px; line-height: 1.2; }
.li .info small { color: var(--mute); font-size: 14px; }
.li .side { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.box p { margin: 0 0 12px; }
.box .acts { display: flex; flex-wrap: wrap; gap: 8px; }
.box.wide { margin-top: 16px; }
@media (max-width: 600px) { .li .side { grid-column: 2 / -1; justify-content: flex-start; } }
.toast button { border: 0; background: none; color: var(--acc); font-weight: 700; padding: 4px 2px; min-height: 32px; filter: brightness(1.4); }

/* ---------- Estatísticas ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi { border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; background: var(--panel); }
.kpi b { display: block; font: 800 28px/1.1 var(--disp); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kpi span { color: var(--mute); font-size: 14px; }
.boxes { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); gap: 16px; align-items: start; }
.box { border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px; background: var(--panel); }
.box h2 { margin: 0 0 10px; font-size: 19px; display: flex; justify-content: space-between; align-items: baseline; }
.box h2 small { font: 400 13px Inter, sans-serif; color: var(--mute); }
.bar { display: grid; grid-template-columns: minmax(0, 40%) minmax(0, 1fr) 2.4em; gap: 10px; align-items: center; border: 0; background: none; padding: 5px 6px; margin: 0 -6px; border-radius: 8px; text-align: left; font-size: 14px; width: calc(100% + 12px); }
.bar:hover { background: var(--hover); }
.bar .nm { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar .tr { height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.bar .tr i { display: block; height: 100%; border-radius: 6px; background: var(--acc); }
.bar .vl { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--mute); }
.box .mais { margin-top: 6px; }
.rosca { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.rosca svg { width: 150px; height: 150px; flex: none; }
.rosca circle { transition: opacity .15s; }
.rosca svg:hover circle { opacity: .55; }
.rosca svg circle:hover { opacity: 1; }
.rosca-n { font: 800 24px var(--disp); fill: var(--ink); }
.rosca-t { font: 500 11px Inter, sans-serif; fill: var(--mute); }
.leg { display: grid; gap: 4px; flex: 1; min-width: 160px; }
.legi { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 3.2em; gap: 10px; align-items: center; border: 0; background: none; padding: 6px 8px; margin: 0 -8px; border-radius: 8px; text-align: left; font-size: 15px; }
.legi:hover { background: var(--hover); }
.legi i { width: 12px; height: 12px; border-radius: 3px; }
.legi b { font-variant-numeric: tabular-nums; }
.legi small { color: var(--mute); text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Formulário (painel lateral, como o editor do Backlog) ---------- */
.dlg { border: 0; padding: 0; background: var(--bg); color: var(--ink); width: min(560px, 100%); max-width: 100%; height: 100dvh; max-height: 100dvh; margin: 0 0 0 auto; }
.dlg::backdrop { background: rgba(8,10,9,.62); }
.dlg > form, .dlg > div { padding: 22px 22px 0; }
.dlg h2 { margin: 0 0 14px; font-size: 26px; line-height: 1.1; }
.dlg-peq { height: auto; max-height: calc(100dvh - 24px); margin: auto; border-radius: 16px; width: min(460px, calc(100% - 24px)); }
.dlg-peq > form, .dlg-peq > div { padding: 22px; }
.dlg-peq .actions { position: static; border: 0; padding-bottom: 0; }
.sec { font-size: 17px; margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.campos { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px 12px; }
.campos .c2 { grid-column: span 2; }
.campos .c4 { grid-column: 1 / -1; }
.field { display: grid; gap: 6px; font-weight: 600; font-size: 14px; align-content: start; }
.field .lbl, .lbl { font-weight: 600; font-size: 14px; }
.field input, .field select { font-weight: 400; }
.field > .seg { height: 44px; }
textarea { resize: vertical; font-weight: 400; }
.check { display: flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 500; min-height: 44px; align-self: end; }
.check input { width: 20px; height: 20px; accent-color: var(--acc); margin: 0; }
.bolinhas { display: flex; gap: 8px; align-items: center; height: 44px; }
.bolinha { display: block; width: 34px; height: 34px; border-radius: 50%; position: relative; cursor: pointer; }
.field .bolinha input { -webkit-appearance: none; appearance: none; display: block; width: 34px; height: 34px; min-height: 0; aspect-ratio: 1; border-radius: 50%; border: 2px solid var(--line); padding: 0; margin: 0; background: none; cursor: pointer; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.bolinha input::-webkit-color-swatch-wrapper { padding: 0; }
.bolinha input::-webkit-color-swatch { border: 0; border-radius: 50%; }
.bolinha input::-moz-color-swatch { border: 0; border-radius: 50%; }
.score { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: var(--panel); }
.score .hd { display: flex; justify-content: space-between; align-items: center; }
.score output { font: 700 22px var(--disp); color: #c8940f; }
.estrelas { display: flex; gap: 4px; margin: 6px 0 4px; }
.estrela { position: relative; width: 42px; height: 42px; flex: none; }
.estrela svg { width: 100%; height: 100%; display: block; pointer-events: none; }
.estrela button { position: absolute; top: 0; bottom: 0; width: 50%; border: 0; background: none; padding: 0; cursor: pointer; }
.estrela button.e { left: 0; } .estrela button.d { right: 0; }
.estrela button:focus-visible { outline-offset: -2px; }
.score-pe { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.upload { margin-top: 8px; cursor: pointer; }
.lados { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; max-width: 360px; }
.lado .lado-img, .lado .lado-vazio { position: relative; display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: 12px; overflow: hidden; background: var(--panel); }
.lado .lado-img img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lado .lado-img .pill { position: absolute; top: 6px; left: 6px; }
.lado .lado-img.enviando img { opacity: .4; }
.lado .lado-vazio { border: 2px dashed var(--line); color: var(--mute); font-weight: 600; font-size: 14px; cursor: pointer; text-align: center; padding: 10px; }
.lado .lado-vazio:hover { border-color: var(--mute); color: var(--ink); }
.lado .acoes { display: flex; justify-content: space-between; margin-top: 4px; font-size: 13px; }
.lado .acoes button, .lado .acoes label { background: none; border: 0; color: var(--mute); padding: 2px; font-size: 13px; font-weight: 500; cursor: pointer; }
.lado .acoes button:hover, .lado .acoes label:hover { color: var(--ink); text-decoration: underline; }
.extras-edit { margin-top: 16px; }
.extras-edit .lbl small { font-weight: 400; color: var(--mute); }
.extras-edit .fotos-edit { margin-top: 8px; }
.fotos-edit { display: flex; flex-wrap: wrap; gap: 10px; }
.foto-edit .usar { display: block; font-size: 12px; color: var(--mute); margin-top: 2px; }
.foto-edit .usar button { background: none; border: 0; padding: 0 2px; color: var(--mute); font-size: 12px; text-decoration: underline; cursor: pointer; }
.foto-edit .usar button:hover { color: var(--ink); }
.foto-edit { position: relative; width: 84px; }
.foto-edit img { width: 84px; height: 105px; object-fit: cover; border-radius: 10px; display: block; background: var(--panel); }
.foto-edit .acoes { display: flex; justify-content: space-between; margin-top: 3px; font-size: 12px; color: var(--mute); }
.foto-edit .acoes button { background: none; border: 0; color: var(--mute); padding: 2px; font-size: 12px; }
.foto-edit .acoes button:hover { color: var(--ink); text-decoration: underline; }
.foto-edit .capa { position: absolute; top: 5px; left: 5px; font-size: 11px; }
.foto-edit.enviando img { opacity: .4; }
.actions { position: sticky; bottom: 0; background: var(--bg); padding: 14px 0; display: flex; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--line); margin-top: 18px; }
.actions .sp { flex: 1; }
#importar-previa { margin-top: 12px; font-size: 14px; }
#importar-previa ul { margin: 6px 0; padding-left: 18px; color: var(--mute); max-height: 160px; overflow: auto; }

.toast { display: flex; gap: 14px; align-items: center; max-width: calc(100% - 24px); position: fixed; left: 50%; bottom: max(20px, env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 40; font-size: 14px; }

@media (max-width: 600px) {
  .filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .filters .seg, .filters .btn.pri { grid-column: 1 / -1; }
  .top { position: relative; }
  header h1 { font-size: 26px; padding-right: 92px; }
  .hacts { position: absolute; top: -2px; right: 0; }
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 14px; }
  .campos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dlg > form, .dlg > div { padding: 18px 16px 0; }
  .det { padding: 0 16px 40px; }
  .tier { grid-template-columns: min(var(--lw, 72px), 30vw) minmax(0, 1fr); }
  .stats { gap: 12px; }
  .hdir { width: 100%; justify-content: space-between; }
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpi b { font-size: 22px; }
  .arrow { position: absolute; z-index: 5; top: calc(50% - 22px); background: color-mix(in srgb, var(--panel) 85%, transparent); }
  .arrow.l { left: 6px; } .arrow.r { right: 6px; }
}
@media (prefers-reduced-motion: reduce) { .cover, .fig-wrap, .fig-flip { transition: none; } .fig.holo::after { animation: none; } }
.extras-edit .foto-edit { width: 112px; }
.extras-edit .foto-edit img { width: 112px; height: 132px; }

/* Botão de mostrar/esconder filtros */
.filters .tgf { justify-content: flex-start; gap: 8px; }
.filters .tgf svg { width: 18px; height: 18px; flex: none; }
.filters .tgf svg:last-child { margin-left: auto; color: var(--mute); transition: transform .15s; }
.filters .tgf[aria-expanded="true"] svg:last-child { transform: rotate(180deg); }
.nbadge { background: var(--acc); color: #fff; border-radius: 999px; padding: 0 8px; font-size: 12px; line-height: 20px; }
.loja { display: inline-flex; align-items: center; gap: 3px; margin-left: 6px; color: var(--acc); font-size: 13px; font-weight: 600; text-decoration: none; }
.loja svg, .acts .btn svg { width: 15px; height: 15px; }
.loja:hover { text-decoration: underline; }
