/* El Barto — panel: lo poco que el panel necesita además de public/diseno/estilos.css */
.ad-login-logo { border-radius: 50%; margin: 0 auto; display: block; }
.ad-stack { display: grid; gap: 12px; }
.ad-search { width: 220px; }
.ad-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }
.bt-toast.is-bad { background: var(--red); }

/* Filas de productos y categorías */
.bt-mrow__desc { display: block; font-size: 13px; color: var(--ink-muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bt-mrow__price { font: 400 17px/1 var(--font-display); letter-spacing: .03em; min-width: 60px; }
.bt-mrow__btns { display: flex; align-items: center; gap: 6px; }
.bt-mrow.is-off .bt-mrow__name { text-decoration: line-through; color: var(--ink-muted); }
.ad-move { width: 36px; height: 36px; border: 0; border-radius: 50%; background: var(--surface); color: var(--ink); cursor: pointer; font-weight: 700; }
.ad-move:disabled { opacity: .3; cursor: default; }
.ad-swatch { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; color: var(--on-board); font: 400 20px/1 var(--font-display); }
.ad-swatch--rojo, .ad-swatch--destacado { background: var(--red); }
.ad-swatch--azul { background: var(--navy); }
.ad-swatch--mostaza { background: var(--mustard); color: var(--on-mustard); }
.ad-swatch--destacado { box-shadow: 0 0 0 4px var(--navy); }
.ad-tag { margin-left: 6px; }
/* El interruptor de "Agotado" se marca en rojo, no en verde */
.ad-soldout input:checked { background: var(--red); }

/* Foto */
.ad-photo { display: grid; gap: 8px; }
.ad-photo img { width: 120px; height: 120px; border-radius: 16px; object-fit: cover; }

/* Grupos de opciones */
.ad-group-head { display: grid; grid-template-columns: 1fr 190px auto; gap: 8px; align-items: center; }
@media (max-width: 560px) { .ad-group-head { grid-template-columns: 1fr; } .ad-search { width: 100%; } }

/* Horarios */
.ad-hour { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: start; padding: 12px 0; border-bottom: 1px solid var(--line); }
.ad-hour:last-of-type { border-bottom: 0; }
.ad-hour__ranges { display: grid; gap: 8px; }
.ad-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.ad-range .bt-input { width: 130px; }
.ad-closed { color: var(--ink-muted); font-weight: 600; font-size: 14px; padding-top: 8px; }
@media (max-width: 560px) { .ad-hour { grid-template-columns: 1fr; } }

/* Pedidos */
.bt-order { position: relative; }
.ad-order-x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; font-size: 22px; }
.bt-order.is-new .bt-order__top { padding-right: 40px; }
.bt-order__notes { font-size: 14px; padding: 8px 10px; border-radius: var(--radius-md); background: var(--surface); }
.bt-order__items li small { color: var(--ink-muted); }
.ad-empty { grid-column: 1 / -1; }

/* ---------- Pestañas con ícono (en el celular van fijas abajo, como una app) ---------- */
.bt-anav button { display: inline-flex; align-items: center; gap: 6px; position: relative; }
.bt-anav button svg { width: 18px; height: 18px; flex: none; }
.ad-nav-n { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; background: var(--mustard); color: var(--on-mustard); font: 400 11px/20px var(--font-display); text-align: center; }

/* ---------- Filas de productos y categorías ---------- */
.ad-row { padding: 10px 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 14px; }
.ad-row:last-child { border-bottom: 0; }
.ad-row.is-off .bt-mrow__name { text-decoration: line-through; color: var(--ink-muted); }
.ad-row__open { display: grid; grid-template-columns: 56px minmax(0, 1fr) auto; align-items: center; gap: 12px; width: 100%; padding: 4px; margin: -4px; border: 0; border-radius: 14px; background: none; text-align: left; cursor: pointer; color: inherit; min-height: 64px; }
.ad-row__open:hover { background: var(--surface); }
.ad-row__main { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.ad-row__edit { display: inline-flex; align-items: center; justify-content: center; gap: 6px; flex: none; min-height: 40px; padding: 0 14px; border: 2px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--surface-raised); color: var(--ink); font: 600 12px/1 var(--font-sans); letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.ad-row__edit svg { width: 16px; height: 16px; }
.ad-row__open:hover .ad-row__edit { border-color: var(--ink); }
.ad-row__ctl { display: flex; align-items: center; gap: 12px; }
.ad-row__moves { display: flex; gap: 6px; }
.ad-row .bt-mrow__desc { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Códigos de descuento ---------- */
.ad-coupon-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 0 14px; align-items: start; }
.ad-coupon-grid .bt-group { margin-bottom: 12px; }

/* ---------- Ayuda plegable en Pedidos ---------- */
.ad-help { margin-bottom: 12px; border-radius: var(--radius-md); background: var(--mustard); color: var(--on-mustard); font-size: 13px; font-weight: 600; }
.ad-help summary { cursor: pointer; padding: 10px 14px; list-style: none; }
.ad-help summary::-webkit-details-marker { display: none; }
.ad-help summary::after { content: " ▾"; }
.ad-help[open] summary::after { content: " ▴"; }
.ad-help p { margin: 0; padding: 0 14px 12px; line-height: 1.45; }

@media (max-width: 720px) {
  /* Pestañas abajo */
  .bt-anav { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; width: 100%; margin: 0; padding: 4px 4px calc(4px + env(safe-area-inset-bottom)); display: grid; grid-template-columns: repeat(5, 1fr); gap: 0; background: var(--navy); box-shadow: 0 -6px 20px rgba(21, 21, 28, .18); overflow: visible; }
  .bt-anav button { flex-direction: column; justify-content: center; gap: 3px; min-height: 56px; padding: 6px 1px; border-bottom: 0; border-radius: 12px; font-size: 9px; letter-spacing: .02em; }
  .bt-anav button svg { width: 22px; height: 22px; }
  .bt-anav button[aria-current="page"] { background: rgba(255, 255, 255, .12); color: var(--mustard); }
  .ad-nav-n { position: absolute; top: 4px; left: calc(50% + 6px); }
  .bt-abar__in { padding-bottom: 10px; }
  .bt-amain { padding-bottom: calc(96px + env(safe-area-inset-bottom)); }
  .bt-toast { bottom: calc(80px + env(safe-area-inset-bottom)); }

  /* Productos: arriba foto + nombre (se toca para editar), abajo precio, agotado y orden */
  .ad-row { grid-template-columns: 1fr; }
  .ad-row__ctl { justify-content: space-between; padding-left: 68px; }
  .ad-row--plain .ad-row__ctl { padding-left: 0; }
  /* En el celular, Editar es un círculo con el lápiz: no se corta */
  .ad-row__edit { width: 44px; height: 44px; min-height: 44px; padding: 0; border-radius: 50%; }
  .ad-row__edit span { display: none; }
  .ad-row__edit svg { width: 18px; height: 18px; }
  .bt-ahead .bt-toolbar { width: 100%; }
  .bt-ahead .bt-toolbar .bt-btn { flex: 1; }
  .ad-search { flex: 1 1 100%; width: 100%; }

  /* Horarios: las horas ocupan el ancho */
  .ad-range .bt-input { width: auto; flex: 1; min-width: 0; }

  /* Pedidos: contadores en una fila */
  .bt-tiles { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
  .bt-tile { padding: 10px; }
  .bt-tile__value { font-size: 20px; }
  .bt-tile__label { font-size: 9px; letter-spacing: .08em; }
  .bt-tile__delta { font-size: 11px; }
  .bt-order__total { font-size: 18px; }
}

/* Botón Configuración (engranaje) en la barra de arriba */
.ad-settings-btn svg { width: 16px; height: 16px; }
@media (max-width: 720px) {
  .ad-settings-btn { width: 38px; padding: 0; }
  .ad-settings-btn span { display: none; }
}
