/* Panel Glotón — misma estructura que el de El Barto, con la identidad de Glotón */
:root {
  --y: #ffba1f; --y-soft: #fff1c9; --t: #1aada9; --td: #124444; --ink: #2b2b2b;
  --cream: #f9f2e6; --cream-2: #f3e7d0; --paper: #fffaf1; --line: #dccdb1; --muted: #6c6357;
  --red: #d64933; --green: #1f9d57; --pop: 3px 3px 0 var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: 'Archivo', system-ui, -apple-system, sans-serif; background: var(--cream); color: var(--ink); font-size: 15.5px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
html.gl-lock { overflow: hidden; }
[hidden] { display: none !important; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
svg { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
h2, h3 { margin: 0; }
.gl-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- botones ---------- */
.gl-btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; min-height: 42px; padding: 0 16px; border: 2.5px solid var(--ink); border-radius: 999px; background: var(--y); color: var(--ink); font-weight: 800; font-size: 15px; text-decoration: none; white-space: nowrap; box-shadow: var(--pop); transition: transform .12s, box-shadow .12s; }
.gl-btn:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--ink); }
.gl-btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.gl-btn:disabled { opacity: .5; pointer-events: none; }
.gl-btn--sm { min-height: 36px; padding: 0 13px; font-size: 14px; box-shadow: 2px 2px 0 var(--ink); }
.gl-btn--lg { min-height: 52px; font-size: 17px; }
.gl-btn--block { width: 100%; }
.gl-btn--ghost { background: var(--paper); }
.gl-btn--dark { background: var(--ink); color: var(--y); }
.gl-btn--teal { background: var(--t); color: #fff; }
.gl-btn--ghost-dark { background: transparent; color: var(--cream); border-color: rgba(249, 242, 230, .4); box-shadow: none; }
.gl-btn--ghost-dark:hover { box-shadow: none; background: rgba(255, 255, 255, .08); }
.gl-btn svg { width: 18px; height: 18px; }
.gl-link { background: none; border: 0; padding: 4px 2px; font-weight: 700; color: var(--td); text-decoration: underline; text-underline-offset: 3px; }
.gl-link--danger { color: var(--red); }
.gl-x { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 2.5px solid var(--ink); background: var(--paper); font-size: 22px; line-height: 1; display: grid; place-items: center; }

/* ---------- formularios ---------- */
.gl-group { margin: 0 0 14px; border: 0; padding: 0; min-width: 0; }
fieldset.gl-group legend { font-weight: 800; font-size: 14px; margin-bottom: 6px; padding: 0; }
.gl-label { display: grid; gap: 5px; font-weight: 800; font-size: 14px; }
.gl-label small { font-weight: 600; color: var(--muted); }
.gl-inline { display: flex; align-items: center; gap: 8px; }
.gl-input { width: 100%; min-height: 44px; padding: 9px 12px; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 500; outline: none; transition: border-color .15s, box-shadow .15s; }
.gl-input:focus { border-color: var(--ink); box-shadow: 3px 3px 0 var(--y); }
textarea.gl-input { resize: vertical; line-height: 1.4; }
.gl-input--sm { min-height: 38px; padding: 6px 11px; width: auto; }
.gl-hint { margin: 4px 0 0; font-size: 13px; color: var(--muted); font-weight: 500; }
.gl-err { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #fde4df; color: #8f2414; font-weight: 700; font-size: 14px; border: 2px solid #f2b3a6; }
.gl-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; }
.gl-switch { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; cursor: pointer; user-select: none; }
.gl-switch input { appearance: none; flex: none; position: relative; width: 46px; height: 27px; margin: 0; border-radius: 99px; background: #cbbfa8; border: 2px solid var(--ink); cursor: pointer; transition: background .2s; }
.gl-switch input::after { content: ''; position: absolute; top: 2px; left: 2px; width: 19px; height: 19px; border-radius: 50%; background: #fff; border: 1.5px solid var(--ink); transition: left .2s; }
.gl-switch input:checked { background: var(--green); }
.gl-switch input:checked::after { left: 21px; }
.gl-seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gl-seg--4 { grid-template-columns: repeat(4, 1fr); }
.gl-opt { position: relative; cursor: pointer; }
.gl-opt input { position: absolute; opacity: 0; pointer-events: none; }
.gl-opt > span { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-height: 46px; padding: 8px; text-align: center; border: 2px solid var(--line); border-radius: 12px; background: #fff; font-weight: 800; font-size: 14px; }
.gl-opt input:checked + span { border-color: var(--ink); background: var(--y-soft); box-shadow: var(--pop); }
.gl-opt__dot { width: 30px; height: 30px; border-radius: 9px; border: 2px solid var(--ink); }

/* ---------- login ---------- */
.gl-login { min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: repeating-conic-gradient(var(--y) 0 25%, var(--t) 0 50%) 0 0 / 72px 72px; }
.gl-pin { width: min(380px, 100%); padding: 26px; text-align: center; background: var(--paper); border: 3px solid var(--ink); border-radius: 26px; box-shadow: 8px 8px 0 var(--ink); }
.gl-pin__logo { width: 180px; margin: -4px auto 6px; }
.gl-pin h1 { margin: 0 0 18px; font-weight: 900; text-transform: uppercase; font-variation-settings: 'wdth' 120; font-size: 24px; }
.gl-pin form { text-align: left; display: grid; gap: 14px; }

/* ---------- barra superior ---------- */
.gl-abar { position: sticky; top: 0; z-index: 30; background: var(--ink); color: var(--cream); }
.gl-abar__in { max-width: 1040px; margin: 0 auto; padding: 10px 16px 0; display: grid; grid-template-columns: auto 1fr; align-items: center; gap: 8px 12px; }
.gl-abar__brand { display: flex; align-items: center; gap: 10px; }
.gl-abar__brand img { width: 96px; }
.gl-abar__brand small { font-weight: 800; text-transform: uppercase; letter-spacing: .12em; font-size: 11px; color: var(--y); border: 1.5px solid var(--y); border-radius: 6px; padding: 2px 6px; }
.gl-abar__act { display: flex; gap: 8px; justify-content: flex-end; }
.gl-anav { grid-column: 1 / -1; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 4px 4px 0; }
.gl-anav::-webkit-scrollbar { display: none; }
.gl-anav button { position: relative; flex: none; display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px 12px; border: 0; border-radius: 14px 14px 0 0; background: none; color: rgba(249, 242, 230, .72); font-weight: 800; font-size: 14.5px; }
.gl-anav button svg { width: 18px; height: 18px; }
.gl-anav button[aria-current="page"] { background: var(--cream); color: var(--ink); }
.gl-anav button[aria-current="page"] svg { color: var(--td); }
.gl-nav-n { display: inline-grid; place-items: center; min-width: 21px; height: 21px; padding: 0 6px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; }
.gl-checker { height: 12px; background: repeating-conic-gradient(var(--y) 0 25%, var(--t) 0 50%) 0 0 / 24px 24px; border-bottom: 2.5px solid var(--ink); }

/* ---------- contenido ---------- */
.gl-amain { max-width: 1040px; margin: 0 auto; padding: 20px 16px 90px; }
.gl-ahead { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.gl-ahead h2 { font-weight: 900; text-transform: uppercase; font-variation-settings: 'wdth' 120; font-size: 26px; line-height: 1; }
.gl-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.gl-toolbar--wrap { gap: 10px 22px; margin: 4px 0 18px; }
.gl-search { width: 220px; }
.gl-banner { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; margin: 0 0 14px; padding: 11px 14px; border-radius: 12px; background: var(--y-soft); border: 2px solid var(--y); font-size: 14px; font-weight: 600; }
.gl-stack { display: grid; gap: 14px; }
.gl-card { background: var(--paper); border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); padding: 16px; margin-bottom: 14px; }
.gl-stack .gl-card { margin: 0; }
.gl-card h3 { font-weight: 900; text-transform: uppercase; font-size: 17px; font-variation-settings: 'wdth' 112; }
.gl-card__sub { margin: 4px 0 14px; color: var(--muted); font-size: 14px; }
.gl-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }
.gl-empty { text-align: center; padding: 30px 10px; color: var(--muted); font-weight: 700; }

/* filas de producto / categoría */
.gl-mhead { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.gl-mhead h3 span { font-weight: 600; text-transform: none; color: var(--muted); font-size: 14px; }
.gl-swatch { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 11px; border: 2.5px solid var(--ink); font-weight: 900; font-size: 17px; transform: rotate(-4deg); }
.gl-swatch--amarillo { background: var(--y); }
.gl-swatch--turquesa { background: var(--t); color: #fff; }
.gl-swatch--petroleo { background: var(--td); color: var(--y); }
.gl-swatch--crema { background: var(--cream-2); }
.gl-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-top: 1.5px dashed var(--line); }
.gl-row:first-of-type { border-top: 0; }
.gl-mhead + .gl-row { border-top: 0; }
.gl-row.is-off .gl-row__main { opacity: .55; }
.gl-row__open { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 0; border: 0; background: none; text-align: left; }
.gl-thumb { flex: none; width: 56px; height: 56px; border-radius: 12px; border: 2px solid var(--ink); object-fit: cover; background: var(--y-soft); }
.gl-thumb--empty { display: grid; place-items: center; font-size: 10.5px; font-weight: 800; color: var(--muted); text-align: center; line-height: 1.1; background: repeating-conic-gradient(rgba(0,0,0,.05) 0 25%, transparent 0 50%) 0 0 / 14px 14px, var(--cream-2); }
.gl-row__main { min-width: 0; display: grid; gap: 2px; }
.gl-row__name { font-weight: 800; display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.gl-row__desc { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gl-row__edit { flex: none; display: inline-flex; align-items: center; gap: 5px; font-weight: 800; font-size: 13px; color: var(--td); padding: 6px 10px; border-radius: 99px; border: 2px solid transparent; }
.gl-row__open:hover .gl-row__edit { border-color: var(--td); }
.gl-row__edit svg { width: 15px; height: 15px; }
.gl-row__ctl { flex: none; display: flex; align-items: center; gap: 12px; }
.gl-price { font-weight: 900; font-size: 15.5px; background: var(--y); border: 2px solid var(--ink); border-radius: 8px; padding: 1px 8px; transform: rotate(-2deg); white-space: nowrap; }
.gl-row__moves { display: flex; gap: 4px; }
.gl-move { width: 32px; height: 32px; border-radius: 9px; border: 2px solid var(--ink); background: #fff; font-weight: 900; }
.gl-move:disabled { opacity: .25; }
.gl-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 7px; font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; background: var(--cream-2); color: var(--ink); border: 1.5px solid var(--line); white-space: nowrap; }
.gl-badge--y { background: var(--y); border-color: var(--ink); }
.gl-badge--red { background: var(--red); border-color: var(--red); color: #fff; }
.gl-badge--green { background: var(--green); border-color: var(--green); color: #fff; }
.gl-badge--teal { background: var(--t); border-color: var(--t); color: #fff; }
.gl-badge--dark { background: var(--ink); border-color: var(--ink); color: var(--y); }

/* grupos de opciones en el editor */
.gl-lrow { padding: 12px; margin-bottom: 10px; border: 2px dashed var(--line); border-radius: 14px; background: var(--cream); display: grid; gap: 8px; }
.gl-group-head { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; }
.gl-group-head .gl-input--sm { width: 100%; }

/* foto */
.gl-photo { display: grid; gap: 8px; }
.gl-photo img { width: 100%; max-width: 280px; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 14px; border: 2.5px solid var(--ink); }

/* horarios */
.gl-hour { display: grid; grid-template-columns: 150px 1fr; gap: 10px; align-items: start; padding: 10px 0; border-top: 1.5px dashed var(--line); }
.gl-hour:first-child { border-top: 0; }
.gl-hour .gl-switch { padding-top: 6px; }
.gl-hour__ranges { display: grid; gap: 8px; justify-items: start; }
.gl-range { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-weight: 700; }
.gl-closed { padding-top: 7px; color: var(--muted); font-weight: 700; }

/* pedidos */
.gl-help { margin: 0 0 14px; padding: 10px 14px; border: 2px solid var(--line); border-radius: 12px; background: var(--paper); font-size: 14px; }
.gl-help summary { cursor: pointer; font-weight: 800; }
.gl-help p { margin: 8px 0 2px; }
.gl-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin-bottom: 14px; padding-bottom: 2px; }
.gl-chips::-webkit-scrollbar { display: none; }
.gl-chip { flex: none; padding: 8px 14px; border: 2px solid var(--ink); border-radius: 99px; background: var(--paper); font-weight: 800; font-size: 14px; }
.gl-chip[aria-pressed="true"] { background: var(--ink); color: var(--y); }
.gl-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.gl-tile { padding: 12px 14px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 16px; box-shadow: var(--pop); }
.gl-tile--accent { background: var(--y); }
.gl-tile__label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.gl-tile--accent .gl-tile__label { color: var(--ink); }
.gl-tile__value { font-size: 28px; font-weight: 900; font-variation-settings: 'wdth' 115; line-height: 1.1; }
.gl-tile__delta { font-size: 12.5px; color: var(--muted); }
.gl-orders { display: grid; gap: 12px; }
.gl-order { position: relative; display: grid; gap: 7px; padding: 14px 16px; background: var(--paper); border: 2.5px solid var(--ink); border-radius: 18px; box-shadow: 4px 4px 0 var(--ink); }
.gl-order.is-new { border-color: var(--red); box-shadow: 4px 4px 0 var(--red); }
.gl-order__top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 44px; }
.gl-order__n { font-weight: 900; font-size: 20px; font-variation-settings: 'wdth' 115; margin-right: 2px; }
.gl-order__total { margin-left: auto; font-weight: 900; font-size: 19px; }
.gl-order__who { font-weight: 800; font-size: 16px; }
.gl-order__meta { color: var(--muted); font-size: 13.5px; }
a.gl-order__meta { color: var(--td); font-weight: 700; }
.gl-order__items { margin: 2px 0; padding: 10px 12px 10px 28px; background: var(--cream); border-radius: 12px; font-size: 14.5px; }
.gl-order__items li { margin: 3px 0; }
.gl-order__items small { color: var(--muted); }
.gl-order__notes { padding: 8px 12px; border-radius: 10px; background: var(--y-soft); font-size: 14px; }
.gl-order__ctl { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 2px; }
.gl-order-x { position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; font-size: 19px; border-width: 2px; color: var(--muted); }

/* descuentos */
.gl-coupon-grid { display: grid; grid-template-columns: 1fr 1.3fr 1fr 1fr; gap: 0 12px; align-items: start; }

/* ---------- hojas (editores) ---------- */
.gl-overlay { position: fixed; inset: 0; z-index: 60; display: flex; align-items: center; justify-content: center; padding: 16px; background: rgba(28, 24, 18, .55); animation: gl-fade .15s; }
@keyframes gl-fade { from { opacity: 0; } }
.gl-sheet { width: min(640px, 100%); max-height: calc(100dvh - 32px); display: flex; flex-direction: column; background: var(--paper); border: 3px solid var(--ink); border-radius: 22px; box-shadow: 8px 8px 0 var(--ink); overflow: hidden; outline: none; animation: gl-pop .2s cubic-bezier(.2, .9, .25, 1.2); }
@keyframes gl-pop { from { transform: scale(.95); opacity: 0; } }
.gl-sheet form { display: flex; flex-direction: column; min-height: 0; }
.gl-sheet__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; background: var(--y); border-bottom: 2.5px solid var(--ink); }
.gl-sheet__title { font-weight: 900; text-transform: uppercase; font-variation-settings: 'wdth' 118; font-size: 20px; }
.gl-sheet__body { flex: 1; overflow-y: auto; padding: 16px; }
.gl-sheet__foot { display: flex; align-items: center; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 2.5px solid var(--ink); background: var(--cream); }

.gl-toast { position: fixed; z-index: 99; left: 50%; bottom: 22px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 12px 20px; border-radius: 99px; background: var(--ink); color: var(--y); font-weight: 800; border: 2.5px solid var(--y); box-shadow: 0 8px 24px rgba(0,0,0,.2); animation: gl-pop .2s; }
.gl-toast.is-bad { background: var(--red); color: #fff; border-color: #fff; }

/* ---------- celular ---------- */
@media (max-width: 720px) {
  .gl-abar__in { padding: 8px 12px 0; }
  .gl-abar__brand img { width: 84px; }
  .gl-icon-btn span { display: none; }
  .gl-icon-btn { padding: 0 9px; }
  .gl-anav button { padding: 9px 11px 11px; font-size: 13.5px; }
  .gl-amain { padding: 16px 12px 90px; }
  .gl-ahead h2 { font-size: 22px; }
  .gl-search { width: 100%; flex: 1; }
  .gl-ahead .gl-toolbar { width: 100%; }
  .gl-row { flex-wrap: wrap; }
  .gl-row__open { flex-basis: 100%; }
  .gl-row__edit span { display: none; }
  .gl-row__ctl { width: 100%; justify-content: flex-end; padding-left: 68px; }
  .gl-row2, .gl-coupon-grid { grid-template-columns: 1fr; }
  .gl-seg--4 { grid-template-columns: 1fr 1fr; }
  .gl-hour { grid-template-columns: 1fr; gap: 6px; }
  .gl-group-head { grid-template-columns: 1fr auto; }
  .gl-group-head select { grid-column: 1 / -1; grid-row: 2; }
  .gl-overlay { align-items: flex-end; padding: 0; }
  .gl-sheet { width: 100%; max-height: 94dvh; border-radius: 22px 22px 0 0; border-bottom: 0; box-shadow: none; animation: gl-up .25s cubic-bezier(.2, .8, .2, 1); }
  @keyframes gl-up { from { transform: translateY(100%); } }
  .gl-tile__value { font-size: 22px; }
  .gl-tiles { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .gl-tile { padding: 10px; }
  .gl-tile__label { font-size: 10.5px; }
}
