/* Admin PWA — mobile-first lojista */
:root {
  --bg: #0a0a0a;
  --card: #151515;
  --line: #2a2a2a;
  --text: #f5f5f5;
  --muted: #9a9a9a;
  --yellow: #FFD400;
  --orange: #FF8C00;
  --ok: #22c55e;
  --danger: #ef4444;
  --font: "Inter", system-ui, sans-serif;
  --display: "Archivo", sans-serif;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--yellow); }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
:focus-visible { outline: 2px solid var(--yellow); outline-offset: 2px; }

.app-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: .75rem;
  padding: .85rem 1rem;
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,212,0,.15);
}
.app-bar img { width: auto; height: 44px; object-fit: contain; }
.app-bar h1 {
  margin: 0;
  font-family: var(--display);
  font-size: 1.15rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--yellow);
}
.app-bar .grow { flex: 1; }
.pill {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #111;
  background: var(--orange);
  padding: .3rem .55rem;
  border-radius: 999px;
}

.wrap { width: min(100% - 1.5rem, 720px); margin: 0 auto; padding: 1rem 0 6rem; }

.gate, .panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1.25rem;
}
.gate h2, .panel h2 {
  margin: 0 0 .35rem;
  font-family: var(--display);
  letter-spacing: .04em;
  text-transform: uppercase;
}
.gate p, .hint { color: var(--muted); margin: 0 0 1rem; font-size: .92rem; }
.field { display: grid; gap: .35rem; margin-bottom: .85rem; }
.field label { font-size: .82rem; color: var(--muted); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%;
  background: #0f0f0f;
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: .8rem .9rem;
}
.field textarea { min-height: 90px; resize: vertical; }
.row-2 { display: grid; gap: .75rem; }
@media (min-width: 560px) { .row-2 { grid-template-columns: 1fr 1fr; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  min-height: 48px; width: 100%;
  border-radius: 4px;
  font-weight: 700;
  padding: .7rem 1rem;
}
.btn-primary { background: var(--yellow); color: #111; }
.btn-ghost { border: 1px solid var(--line); background: #111; }
.btn-danger { background: rgba(239,68,68,.15); color: #fecaca; border: 1px solid rgba(239,68,68,.35); }
.btn-row { display: grid; gap: .55rem; margin-top: .5rem; }
@media (min-width: 560px) { .btn-row.two { grid-template-columns: 1fr 1fr; } }

.toolbar {
  display: flex; flex-wrap: wrap; gap: .55rem;
  margin: 1rem 0;
}
.toolbar .btn { width: auto; min-height: 42px; padding: .55rem .9rem; font-size: .88rem; }

.list { display: grid; gap: .75rem; }
.item {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: .75rem;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: .7rem;
  align-items: center;
}
.item img {
  width: 72px; height: 72px; object-fit: cover;
  border-radius: 4px; background: #000;
}
.item h3 { margin: 0 0 .2rem; font-size: .95rem; line-height: 1.25; }
.item .meta { color: var(--muted); font-size: .8rem; }
.item .price { color: var(--yellow); font-family: var(--display); font-size: 1.1rem; margin-top: .25rem; }
.item .actions { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .45rem; }
.item .actions .btn { width: auto; min-height: 36px; font-size: .78rem; padding: .4rem .65rem; }

.thumb-preview {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  border-radius: 4px;
  background: #000;
  border: 1px solid var(--line);
  margin-bottom: .75rem;
}
.checks { display: flex; flex-wrap: wrap; gap: .85rem; margin: .4rem 0 1rem; }
.checks label { display: flex; align-items: center; gap: .4rem; font-size: .9rem; }

.toast {
  position: fixed; left: 50%; bottom: 1.25rem;
  transform: translateX(-50%) translateY(20px);
  background: #111; border: 1px solid var(--yellow);
  color: var(--text); padding: .7rem 1rem; border-radius: 999px;
  opacity: 0; pointer-events: none; transition: .25s; z-index: 50;
  font-size: .9rem; font-weight: 600;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

.hidden { display: none !important; }
.fab-add {
  position: fixed; right: 16px; bottom: 18px; z-index: 30;
  width: 58px; height: 58px; border-radius: 50%;
  background: var(--yellow);
  color: #111; font-size: 1.8rem; font-weight: 700;
  box-shadow: 0 12px 28px rgba(255,140,0,.35);
}
.sheet {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(0,0,0,.65);
  display: grid; place-items: end center;
  opacity: 0; pointer-events: none; transition: .25s;
}
.sheet.open { opacity: 1; pointer-events: auto; }
.sheet .panel {
  width: min(100%, 560px);
  max-height: 92dvh;
  overflow: auto;
  border-radius: 20px 20px 0 0;
  transform: translateY(24px);
  transition: .3s;
}
.sheet.open .panel { transform: none; }
@media (min-width: 720px) {
  .sheet { place-items: center; padding: 1rem; }
  .sheet .panel { border-radius: 20px; }
}
