/* ==========================================================
   GOAT STYLE | Estilos del panel de administrador
   Reemplaza Style/admin.css. Cubre TODAS las clases que usa
   Script/admin.js (modal, login, editor, barra de tarjetas,
   aviso y barra flotante).
   ========================================================== */
:root {
  --adm-red: var(--red, #e10600);
  --adm-bg: #0d0d0d;
  --adm-line: #2a2a2a;
  --adm-text: #f5f5f5;
  --adm-mute: #9a9a9a;
}

/* ---------- Modal ---------- */
.adm[hidden] { display: none !important; }
.adm {
  position: fixed; inset: 0; z-index: 2147483000;
  display: grid; place-items: center;
  padding: 16px; overflow-y: auto;
  background: rgba(0, 0, 0, .78);
  font-family: "Barlow", system-ui, sans-serif;
}
.adm__box {
  position: relative; width: min(520px, 100%);
  max-height: calc(100vh - 32px); overflow-y: auto;
  padding: 28px 24px 24px;
  background: var(--adm-bg); color: var(--adm-text);
  border: 1px solid var(--adm-line); border-radius: 14px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .6);
  outline: none;
}
.adm__box h2 {
  margin: 0 0 18px; padding-right: 36px;
  font-family: "Anton", Impact, sans-serif; font-weight: 400;
  font-size: 1.7rem; letter-spacing: .02em; text-transform: uppercase;
}
.adm__x {
  position: absolute; top: 12px; right: 12px;
  width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #1c1c1c; color: var(--adm-text); font-size: 1rem; cursor: pointer;
}
.adm__x:hover { background: var(--adm-red); }
body.adm-open { overflow: hidden; }

/* ---------- Formularios ---------- */
.adm__form { display: grid; gap: 14px; }
.adm__form p { margin: 0; line-height: 1.45; color: var(--adm-mute); }
.adm__form label { display: grid; gap: 6px; font-size: .85rem; font-weight: 600; color: var(--adm-mute); }
.adm__form input:not([type="checkbox"]):not([type="file"]),
.adm__form select {
  width: 100%; padding: 12px 14px;
  background: #161616; color: var(--adm-text);
  border: 1px solid var(--adm-line); border-radius: 8px;
  font: inherit; font-size: 1rem;
}
.adm__form input:focus, .adm__form select:focus { outline: 2px solid var(--adm-red); outline-offset: 1px; }
.adm__form small { font-weight: 400; color: var(--adm-mute); }
.adm__row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.adm__err { padding: 10px 12px; border-radius: 8px; background: rgba(225, 6, 0, .15); color: #ff8a85 !important; border: 1px solid rgba(225, 6, 0, .5); }
.adm__err[hidden] { display: none; }
.adm__ok { padding: 10px 12px; border-radius: 8px; background: rgba(40, 180, 90, .15); color: #8ee6ab !important; border: 1px solid rgba(40, 180, 90, .5); }
.adm__form .btn { cursor: pointer; }
.adm__form .btn[disabled] { opacity: .6; cursor: wait; }
.adm__form .linkbtn { justify-self: start; background: none; border: 0; padding: 0; color: var(--adm-mute); text-decoration: underline; cursor: pointer; font: inherit; }
.adm__actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Foto ---------- */
.adm__photo { display: flex; gap: 14px; align-items: center; }
.adm__photo img { width: 96px; height: 120px; object-fit: cover; border-radius: 8px; background: #1a1a1a; border: 1px solid var(--adm-line); }
.adm__file { cursor: pointer; width: max-content; }

/* ---------- Tallas ---------- */
.adm__avail { border: 1px solid var(--adm-line); border-radius: 8px; padding: 10px 12px; margin: 0; }
.adm__avail legend { padding: 0 6px; font-size: .85rem; font-weight: 600; color: var(--adm-mute); }
.adm__avail div { display: flex; flex-wrap: wrap; gap: 8px; }
.adm__chk { display: inline-flex !important; grid-auto-flow: column; align-items: center; gap: 6px !important; padding: 6px 10px; border: 1px solid var(--adm-line); border-radius: 999px; color: var(--adm-text) !important; cursor: pointer; }
.adm__chk input { accent-color: var(--adm-red); width: 16px; height: 16px; }

/* ---------- Aviso ---------- */
.adm-toast {
  position: fixed; left: 50%; bottom: 24px; z-index: 2147483200;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  max-width: min(92vw, 460px); padding: 12px 18px; border-radius: 10px;
  background: #1f7a3f; color: #fff; font: 600 .95rem "Barlow", system-ui, sans-serif;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .5); transition: opacity .25s, transform .25s;
}
.adm-toast.bad { background: #b3261e; }
.adm-toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Barra flotante (modo administrador) ---------- */
.adm-dock {
  position: fixed; left: 12px; bottom: 12px; z-index: 2147482000;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 999px;
  background: #0d0d0d; color: #fff; border: 1px solid var(--adm-red);
  font: 600 .85rem "Barlow", system-ui, sans-serif;
}
.adm-dock b { color: #7dffa8; }
.adm-dock button { padding: 6px 12px; border-radius: 999px; border: 1px solid #333; background: #1a1a1a; color: #fff; font: inherit; cursor: pointer; }
.adm-dock button:hover { background: var(--adm-red); border-color: var(--adm-red); }

/* ---------- Marcas dentro del catálogo (solo con sesión) ---------- */
.is-admin .card { position: relative; }
.adm-bar { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; }
.adm-bar button {
  flex: 1 1 auto; padding: 8px 10px; border-radius: 8px;
  border: 1px solid #333; background: #1a1a1a; color: #fff;
  font: 600 .8rem "Barlow", system-ui, sans-serif; cursor: pointer;
}
.adm-bar button:hover { background: #2a2a2a; }
.adm-bar .is-del { border-color: #7a1d1a; color: #ff8a85; }
.adm-bar .is-del:hover { background: #7a1d1a; color: #fff; }
.adm-add { margin-left: auto; cursor: pointer; }
.shop__head { flex-wrap: wrap; gap: 10px; }

@media (max-width: 520px) {
  .adm__row { grid-template-columns: 1fr; }
  .adm__box { padding: 24px 16px 18px; }
}
