:root {
  --bg: #0a0a0a; --panel: #161616; --panel2: #1f1f1f; --fg: #f2f2f2; --muted: #8a8a8a;
  --line: rgba(255,255,255,.12); --accent: #e0263a; --ok: #2fbf71;
  --display: Impact, "Anton", "Arial Narrow Bold", sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { background: var(--bg); color: var(--fg); font: 17px/1.45 var(--sans); min-height: 100vh; }
button, input, select, textarea { font: inherit; color: inherit; }
img { display: block; max-width: 100%; }
main { max-width: 640px; margin: 0 auto; padding: 16px 16px 120px; }
.carregando { color: var(--muted); padding: 40vh 0; text-align: center; }
.oculto { display: none !important; }

h1.marca { font-family: var(--display); font-weight: 400; font-size: clamp(56px, 18vw, 96px); line-height: .9; letter-spacing: .01em; text-transform: uppercase; }
h1.marca span { color: transparent; -webkit-text-stroke: 1.5px var(--fg); }
h2 { font-family: var(--display); font-weight: 400; font-size: 34px; text-transform: uppercase; letter-spacing: .02em; line-height: 1; }
.sub { color: var(--muted); font-size: 15px; }

/* Login */
.login { min-height: calc(100vh - 140px); display: flex; flex-direction: column; justify-content: center; gap: 28px; }
.login form { display: grid; gap: 14px; }

label.campo { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: #cfcfcf; text-transform: uppercase; letter-spacing: .06em; }
input[type=text], input[type=password], input[type=number], select, textarea {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px; font-size: 18px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--fg);
}
textarea { min-height: 120px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--fg); outline-offset: 1px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 54px; padding: 0 22px;
  border-radius: 999px; border: 1px solid var(--fg); background: var(--fg); color: #0a0a0a; font-weight: 700; font-size: 17px;
  text-transform: uppercase; letter-spacing: .05em; cursor: pointer; }
.btn.sec { background: var(--bg); color: var(--fg); border-color: var(--line); }
.btn.perigo { background: transparent; color: #ff6b7a; border-color: rgba(224,38,58,.5); }
.btn.cheio { width: 100%; }
.btn:disabled { opacity: .45; cursor: wait; }
.erro { color: #ff6b7a; font-weight: 600; min-height: 1.4em; }

/* Topo e lista */
.topo { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0 20px; }
.topo .marca { font-size: 44px; }
.link { background: none; border: 0; color: var(--muted); text-decoration: underline; cursor: pointer; padding: 10px 4px; font-size: 15px; }
.busca { margin-bottom: 14px; }
.lista { display: grid; gap: 10px; }
.item { display: grid; grid-template-columns: 76px 1fr auto; gap: 14px; align-items: center; width: 100%; text-align: left;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 10px; cursor: pointer; }
.item .mini { width: 76px; height: 96px; border-radius: 10px; background: var(--panel2); object-fit: cover; overflow: hidden; }
.item b { display: block; font-size: 17px; line-height: 1.25; }
.item small { display: block; color: var(--muted); font-size: 14px; }
.selo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; padding: 4px 8px; border-radius: 999px; border: 1px solid var(--line); white-space: nowrap; }
.selo.esgotado { color: #ff6b7a; border-color: rgba(224,38,58,.5); }
.selo.oculta { color: var(--muted); }
.vazio { color: var(--muted); padding: 30px 0; text-align: center; }

.barra { position: fixed; left: 0; right: 0; bottom: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, var(--bg) 30%); }
.barra > div { max-width: 640px; margin: 0 auto; display: flex; gap: 10px; }
.barra .btn { flex: 1; }

/* Formulário */
.form { display: grid; gap: 22px; }
.secao { display: grid; gap: 10px; }
.secao > .titulo { font-size: 14px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: #cfcfcf; }
.dica { color: var(--muted); font-size: 14px; }
.dupla { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.fotos { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.foto { position: relative; aspect-ratio: 3 / 4; border-radius: 12px; overflow: hidden; background: var(--panel2); border: 1px solid var(--line); }
.foto img { width: 100%; height: 100%; object-fit: cover; }
.foto.principal { outline: 2px solid var(--fg); outline-offset: 2px; }
.foto .acoes { position: absolute; inset: auto 0 0 0; display: flex; justify-content: space-between; padding: 6px; background: linear-gradient(transparent, rgba(0,0,0,.8)); }
.foto .acoes button { width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; font-size: 18px; cursor: pointer; }
.foto .tag { position: absolute; top: 6px; left: 6px; font-size: 11px; font-weight: 700; text-transform: uppercase; background: var(--fg); color: #000; padding: 3px 7px; border-radius: 999px; }
.foto.enviando::after { content: "Enviando…"; position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0,0,0,.6); font-size: 14px; }
.addfoto { aspect-ratio: 3 / 4; border-radius: 12px; border: 1.5px dashed var(--muted); background: transparent; color: var(--fg);
  display: grid; place-content: center; gap: 4px; text-align: center; font-size: 14px; cursor: pointer; }
.addfoto b { font-size: 34px; line-height: 1; font-weight: 400; }

.tams { display: grid; gap: 8px; }
.tam { display: grid; grid-template-columns: 1fr auto auto auto auto; gap: 8px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 8px 8px 8px 16px; }
.tam .nome { font-weight: 700; font-size: 20px; }
.tam .qtd { width: 64px; text-align: center; padding: 10px 4px; font-size: 20px; font-weight: 700; }
.tam button { width: 46px; height: 46px; border-radius: 50%; border: 1px solid var(--line); background: var(--panel2); color: var(--fg); font-size: 22px; cursor: pointer; }
.tam button.rm { border: 0; background: none; color: var(--muted); font-size: 18px; width: 36px; }
.tam.zero .nome, .tam.zero .qtd { color: var(--muted); }
.atalhos { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 42px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--panel); color: var(--fg); font-size: 15px; font-weight: 600; cursor: pointer; }
.novo-tam { display: grid; grid-template-columns: 1fr auto; gap: 8px; }
.novo-tam input { text-transform: uppercase; }

.check { display: flex; gap: 12px; align-items: center; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; cursor: pointer; }
.check input { width: 24px; height: 24px; accent-color: var(--fg); flex: none; }
.check span small { display: block; color: var(--muted); font-size: 14px; }

.toast { position: fixed; left: 50%; bottom: calc(96px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--fg); color: #000; font-weight: 700; padding: 12px 20px; border-radius: 999px; transition: .25s; pointer-events: none; max-width: calc(100% - 32px); text-align: center; }
.toast.on { opacity: 1; transform: translate(-50%, 0); }
.toast.mal { background: var(--accent); color: #fff; }
