/* Gestión neo-brutalism design system — v1.0 2026-04-20 */
/* Scope: tabs #tab-gestion-*, panel comercio, drawer copiloto.   */
/* No afecta el chrome existente del panel admin.                  */

/* ------------------------------------------------------------------ */
/* Fuentes — Space Grotesk + Inter + JetBrains Mono                   */
/* ------------------------------------------------------------------ */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@500;600;700&family=Inter:wght@400;500;600&family=JetBrains+Mono:wght@400;500&display=swap');

/* ------------------------------------------------------------------ */
/* Sombras offset (sin blur) — rasgo definitorio del estilo            */
/* ------------------------------------------------------------------ */
.shadow-brutal    { box-shadow: 4px 4px 0 #000; }
.shadow-brutal-sm { box-shadow: 2px 2px 0 #000; }
.shadow-brutal-lg { box-shadow: 6px 6px 0 #000; }

/* Elimina sombra (estado pressed / hover de botón) */
.shadow-brutal-none { box-shadow: none; }

/* ------------------------------------------------------------------ */
/* Transiciones funcionales — sin easing fancy                         */
/* ------------------------------------------------------------------ */
.t-fast { transition: all 120ms linear; }
.t-med  { transition: all 180ms linear; }
.t-step { transition: all 100ms steps(3, end); }

/* ------------------------------------------------------------------ */
/* Feedback de botón — se "aprieta" al hacer click                     */
/* ------------------------------------------------------------------ */
.btn-brutal {
  transition: transform 120ms linear, box-shadow 120ms linear;
}
.btn-brutal:hover {
  transform: translate(2px, 2px);
  box-shadow: none;
}
.btn-brutal:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}

/* ------------------------------------------------------------------ */
/* Foco visible — WCAG AA sin perder identidad                         */
/* ------------------------------------------------------------------ */
.brutal-focus:focus-visible {
  outline: 2px dashed #000;
  outline-offset: 2px;
}

/* ------------------------------------------------------------------ */
/* Input — fondo lime al foco                                          */
/* ------------------------------------------------------------------ */
.input-brutal {
  border: 2px solid #000;
  background: #fff;
  transition: background 120ms linear;
}
.input-brutal:focus {
  background: #CCFF00;
  outline: none;
}

/* ------------------------------------------------------------------ */
/* Tabla brutal — header negro, filas con borde bottom                 */
/* ------------------------------------------------------------------ */
.table-brutal thead tr {
  background: #000;
  color: #fff;
}
.table-brutal thead th {
  padding: 0.625rem 1rem;
  text-transform: uppercase;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-align: left;
}
.table-brutal thead th:last-child { text-align: right; }

.table-brutal tbody tr {
  border-bottom: 2px solid #000;
  transition: background 120ms linear;
}
.table-brutal tbody tr:hover { background: #F5F2EB; }
.table-brutal tbody td {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
}
.table-brutal tbody td.num {
  font-family: 'JetBrains Mono', monospace;
  text-align: right;
}

/* ------------------------------------------------------------------ */
/* Badge / chip                                                        */
/* ------------------------------------------------------------------ */
.badge-brutal {
  display: inline-flex;
  align-items: center;
  padding: 0.125rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border: 1px solid #000;
  border-radius: 2px;
}
.badge-activo   { background: #CCFF00; color: #000; }
.badge-pausado  { background: #E5E5E5; color: #000; }
.badge-error    { background: #FF3B30; color: #fff; }
.badge-nuevo    { background: #FF6B35; color: #fff; }
.badge-pendiente{ background: #FFB800; color: #000; }

/* ------------------------------------------------------------------ */
/* Modal / Drawer overlay                                              */
/* ------------------------------------------------------------------ */
.modal-brutal-overlay {
  background: rgba(0, 0, 0, 0.8);
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-brutal-panel {
  background: #fff;
  border: 2px solid #000;
  box-shadow: 6px 6px 0 #000;
  max-width: 42rem;
  width: 100%;
  padding: 2rem;
  position: relative;
}
.modal-brutal-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  border: none;
  background: none;
}

/* Drawer lateral (copiloto) */
.drawer-brutal {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 480px;
  max-width: 100vw;
  background: #fff;
  border-left: 2px solid #000;
  z-index: 60;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 180ms linear;
}
.drawer-brutal.open {
  transform: translateX(0);
}

/* ------------------------------------------------------------------ */
/* Toast                                                               */
/* ------------------------------------------------------------------ */
.toast-brutal {
  position: fixed;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  border: 2px solid #000;
  box-shadow: 4px 4px 0 #000;
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  background: #fff;
  z-index: 100;
  transition: opacity 120ms linear, transform 120ms linear;
  white-space: nowrap;
}
.toast-brutal.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.toast-brutal.ok      { background: #CCFF00; color: #000; }
.toast-brutal.error   { background: #FF3B30; color: #fff; }
.toast-brutal.warning { background: #FFB800; color: #000; }

/* ------------------------------------------------------------------ */
/* POS — tile producto                                                 */
/* ------------------------------------------------------------------ */
.pos-tile {
  border: 2px solid #000;
  background: #fff;
  padding: 1rem;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  cursor: pointer;
  transition: transform 100ms linear, box-shadow 100ms linear;
  box-shadow: 4px 4px 0 #000;
}
.pos-tile:hover {
  transform: translate(2px, 2px);
  box-shadow: 2px 2px 0 #000;
}
.pos-tile:active {
  transform: translate(4px, 4px);
  box-shadow: none;
}
.pos-tile-price {
  font-family: 'JetBrains Mono', monospace;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1;
}

/* ------------------------------------------------------------------ */
/* Copiloto — burbujas de chat                                         */
/* ------------------------------------------------------------------ */
.chat-bubble-user {
  background: #000;
  color: #fff;
  border: 2px solid #000;
  padding: 0.75rem;
  max-width: 85%;
  margin-left: auto;
  font-size: 0.875rem;
}
.chat-bubble-bot {
  background: #CCFF00;
  color: #000;
  border: 2px solid #000;
  padding: 0.75rem;
  max-width: 85%;
  font-size: 0.875rem;
}
.chat-action-card {
  background: #fff;
  border: 2px solid #000;
  padding: 1rem;
  margin-top: 0.5rem;
  font-size: 0.875rem;
}

/* ------------------------------------------------------------------ */
/* Copiloto — botón flotante disparador                                */
/* ------------------------------------------------------------------ */
.copilot-trigger {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  width: 3.5rem;
  height: 3.5rem;
  background: #000;
  color: #CCFF00;
  border: 2px solid #CCFF00;
  border-radius: 9999px;
  box-shadow: 4px 4px 0 #000;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  font-size: 1rem;
  z-index: 40;
  transition: transform 120ms linear, box-shadow 120ms linear;
}
.copilot-trigger:hover {
  transform: translate(1px, 1px);
  box-shadow: 2px 2px 0 #CCFF00;
}
