[hidden] { display: none !important; }
:root {
  --bg: #141414; --bg2: #1d1d1d; --bg3: #262626; --line: #333; --tx: #ececec; --tx2: #a3a3a3; --tx3: #737373;
  --ac: #e0a84f; --ac-tx: #1a1200; --ok: #5cb97a; --bad: #e0645a; --fav: #f2c14e; --hl: #5aa6e0;
  --r: 10px; --gap: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--tx); font: 15px/1.45 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; -webkit-text-size-adjust: 100%; }
a { color: var(--ac); text-decoration: none; }
h1 { font-size: 22px; margin: 0 0 4px; font-weight: 650; }
h2 { font-size: 17px; margin: 0 0 10px; font-weight: 620; }
h3 { font-size: 14px; margin: 16px 0 8px; color: var(--tx2); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.top { position: sticky; top: 0; z-index: 20; display: flex; gap: 18px; align-items: center; padding: 10px 16px; padding-top: max(10px, env(safe-area-inset-top)); background: rgba(20,20,20,.92); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.top .marca { color: var(--tx); font-weight: 700; letter-spacing: .02em; }
.top nav { display: flex; gap: 14px; flex: 1; }
.top nav a { color: var(--tx2); }
.top nav a.on { color: var(--tx); }
.fila { font-size: 12px; color: var(--tx3); white-space: nowrap; }
.fila.ativa { color: var(--ac); }
main { padding: 16px; max-width: 1400px; margin: 0 auto; padding-bottom: 120px; }
.muted { color: var(--tx2); } .small { font-size: 13px; } .tiny { font-size: 12px; color: var(--tx3); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grow { flex: 1; }
.card { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 16px; margin-bottom: var(--gap); }
.cols { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
button, .btn { font: inherit; border: 1px solid var(--line); background: var(--bg3); color: var(--tx); padding: 8px 14px; border-radius: 8px; cursor: pointer; display: inline-flex; gap: 6px; align-items: center; white-space: nowrap; min-height: 38px; }
button:hover, .btn:hover { border-color: #4a4a4a; }
button.pri, .btn.pri { background: var(--ac); color: var(--ac-tx); border-color: var(--ac); font-weight: 600; }
button.perigo { color: var(--bad); }
button:disabled { opacity: .45; cursor: default; }
button.chip { padding: 5px 12px; min-height: 32px; border-radius: 99px; font-size: 13px; }
button.chip.on { background: var(--tx); color: var(--bg); border-color: var(--tx); }
input, select, textarea { font: inherit; background: var(--bg); color: var(--tx); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 38px; width: 100%; }
input[type=checkbox] { width: auto; min-height: 0; accent-color: var(--ac); }
input[type=range] { padding: 0; accent-color: var(--ac); }
label { display: block; font-size: 13px; color: var(--tx2); margin: 10px 0 4px; }
label.inline { display: flex; gap: 8px; align-items: center; color: var(--tx); font-size: 15px; }
.form-grid { display: grid; gap: 0 12px; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
th { color: var(--tx2); font-weight: 500; font-size: 13px; }
code, .mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 13px; }
.token { background: var(--bg); border: 1px dashed var(--ac); padding: 10px; border-radius: 8px; word-break: break-all; }

.ev-list { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.ev { display: block; color: var(--tx); background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; }
.ev:hover { border-color: #4a4a4a; }
.ev .tipo { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--ac); }
.ev.inativo { opacity: .55; }
.nums { display: flex; gap: 14px; margin-top: 8px; font-size: 13px; color: var(--tx2); }
.nums b { color: var(--tx); font-weight: 600; }

.tabs { display: flex; gap: 4px; overflow-x: auto; border-bottom: 1px solid var(--line); margin: 14px -16px 16px; padding: 0 16px; scrollbar-width: none; }
.tabs a { color: var(--tx2); padding: 10px 12px; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a.on { color: var(--tx); border-color: var(--ac); }

.filtros { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 4px; scrollbar-width: none; }
.grid { display: grid; gap: 6px; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); margin-top: 12px; }
@media (max-width: 520px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 3px; } main { padding: 12px; } .tabs { margin: 12px -12px; } }
.ft { position: relative; aspect-ratio: 3 / 2; background: var(--bg3); border-radius: 6px; overflow: hidden; cursor: pointer; outline: 2px solid transparent; outline-offset: -2px; }
.ft img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ft.sel { outline-color: var(--ac); }
.ft.rej img { opacity: .3; filter: grayscale(1); }
.ft .chk { position: absolute; top: 6px; left: 6px; width: 24px; height: 24px; border-radius: 50%; border: 2px solid #fff; background: rgba(0,0,0,.35); display: grid; place-items: center; font-size: 13px; color: transparent; }
.ft.sel .chk { background: var(--ac); border-color: var(--ac); color: var(--ac-tx); }
.ft .badges { position: absolute; right: 5px; top: 5px; display: flex; gap: 3px; }
.badge { font-size: 11px; line-height: 1; padding: 4px 5px; border-radius: 5px; background: rgba(0,0,0,.65); color: #fff; font-weight: 600; }
.badge.hl { background: var(--hl); } .badge.fav { background: var(--fav); color: #241a00; } .badge.am { background: #8a6de0; } .badge.ed { background: #3d7d56; }
.ft .acoes { position: absolute; left: 0; right: 0; bottom: 0; display: flex; justify-content: space-between; padding: 4px; background: linear-gradient(transparent, rgba(0,0,0,.7)); opacity: 0; transition: opacity .15s; }
.ft:hover .acoes, .ft:focus-within .acoes { opacity: 1; }
@media (hover: none) { .ft .acoes { opacity: 1; } }
.ft .acoes button { min-height: 28px; padding: 2px 8px; background: rgba(0,0,0,.5); border: 0; font-size: 15px; }
.ft .acoes button.on.f { color: var(--fav); } .ft .acoes button.on.x { color: var(--bad); }
.ft .nome { position: absolute; left: 6px; bottom: 6px; font-size: 11px; color: #ddd; pointer-events: none; }
.ft:hover .nome { display: none; }

.barra-sel { position: fixed; left: 50%; transform: translateX(-50%); bottom: max(14px, env(safe-area-inset-bottom)); z-index: 30; background: #222; border: 1px solid #444; border-radius: 14px; padding: 8px; display: flex; gap: 6px; align-items: center; box-shadow: 0 10px 30px rgba(0,0,0,.5); max-width: calc(100vw - 24px); overflow-x: auto; }
.barra-sel .n { padding: 0 8px; font-weight: 600; white-space: nowrap; }

.lb { position: fixed; inset: 0; z-index: 50; background: rgba(8,8,8,.97); display: grid; grid-template-rows: auto 1fr auto; }
.lb header { display: flex; gap: 10px; align-items: center; padding: 10px 14px; padding-top: max(10px, env(safe-area-inset-top)); }
.lb .img { display: grid; place-items: center; min-height: 0; padding: 0 8px; }
.lb .img img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb footer { display: flex; gap: 8px; justify-content: center; flex-wrap: wrap; padding: 10px; padding-bottom: max(10px, env(safe-area-inset-bottom)); }
.lb footer button.on.f { color: var(--fav); border-color: var(--fav); } .lb footer button.on.x { color: var(--bad); border-color: var(--bad); }
.stars button { padding: 4px 6px; min-height: 32px; background: none; border: 0; color: var(--tx3); font-size: 18px; }
.stars button.on { color: var(--fav); }

.editor { display: grid; gap: var(--gap); grid-template-columns: minmax(280px, 360px) 1fr; align-items: start; }
@media (max-width: 820px) { .editor { grid-template-columns: 1fr; } }
.slider { display: grid; grid-template-columns: 96px 1fr 46px; gap: 8px; align-items: center; margin: 6px 0; font-size: 14px; }
.slider output { text-align: right; color: var(--tx2); font-variant-numeric: tabular-nums; }
.preview-box { background: var(--bg3); border-radius: var(--r); min-height: 240px; display: grid; place-items: center; overflow: hidden; position: sticky; top: 64px; }
.preview-box img { max-width: 100%; max-height: 70vh; display: block; transition: opacity .2s; }
.preview-box img.carregando { opacity: .6; }

.progresso { height: 8px; background: var(--bg3); border-radius: 99px; overflow: hidden; }
.progresso > i { display: block; height: 100%; background: var(--ac); width: 0; transition: width .2s; }
.lista-envio { max-height: 340px; overflow: auto; font-size: 13px; margin-top: 10px; }
.lista-envio div { display: flex; justify-content: space-between; gap: 8px; padding: 4px 0; border-bottom: 1px solid #2a2a2a; }
.st-ok, .st-duplicada, .st-ja-estava { color: var(--ok); } .st-erro { color: var(--bad); } .st-enviando { color: var(--ac); }

.toast { position: fixed; left: 50%; transform: translateX(-50%); top: 70px; z-index: 60; background: #f2f2f2; color: #111; padding: 10px 16px; border-radius: 10px; font-weight: 500; box-shadow: 0 8px 24px rgba(0,0,0,.4); max-width: 90vw; }
.toast.erro { background: var(--bad); color: #fff; }
.login { max-width: 360px; margin: 12vh auto; }
.vazio { text-align: center; padding: 48px 16px; color: var(--tx2); }
.vers { font-size: 13px; }
.vers li { margin: 4px 0; }
.ft.cur { outline-color: #fff; }
.ft.sel.cur { outline-color: var(--ac); box-shadow: inset 0 0 0 4px #fff; }
.badge.esp { background: #6b7280; } .badge.mot { background: var(--bad); }
.lote { background: var(--bg3); border: 1px solid var(--ac); border-radius: 8px; padding: 10px; margin-top: 10px; font-size: 14px; }
.bl { margin-top: 12px; display: grid; gap: 8px; }
.bl-item { display: flex; gap: 10px; align-items: center; }
.bl-item img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; background: var(--bg3); }
a.chip.btn { padding: 5px 12px; min-height: 32px; border-radius: 99px; font-size: 13px; }
.pessoas { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.pessoa { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; display: flex; flex-direction: column; }
.pessoa .capa { position: relative; aspect-ratio: 3 / 2; background: var(--bg3); cursor: pointer; }
.pessoa .capa img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pessoa .num { position: absolute; left: 8px; bottom: 8px; background: rgba(0,0,0,.75); color: #fff; font-weight: 700; font-size: 20px; padding: 2px 10px; border-radius: 8px; font-variant-numeric: tabular-nums; }
.pessoa.sem .num { left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.pessoa.bloq .capa img { filter: grayscale(1); opacity: .4; }
.pessoa .info { padding: 10px; display: grid; gap: 6px; }
.pessoa .nome { min-height: 32px; padding: 4px 8px; }
.acoes-p { gap: 6px; }
.acoes-p button, .acoes-p .btn { min-height: 30px; padding: 4px 9px; font-size: 13px; }
