/* ============================================================
   TGA-POS. — SISTEMA DE DISEÑO CLINICAL BLUEPRINT ON FROSTED PAPER
   Basado en DESIGN.md (shadcn/ui aesthetic):
   Lienzo #f5f5f5, Superficie Alt #fafafa, Tarjetas #ffffff flotantes
   con bordes hairline #e5e5e5, radio 24px en contenedores y 18px
   en elementos interactivos, con personalización de color de acento.
   ============================================================ */

:root {
  /* ============================================================
     DESIGN.MD TOKENS — CLINICAL BLUEPRINT ON FROSTED PAPER (SHADCN/UI)
     ============================================================ */
  --color-canvas: #f5f5f5;
  --color-paper: #ffffff;
  --color-surface-alt: #fafafa;
  --color-ink: #0a0a0a;
  --color-ink-soft: #171717;
  --color-mid-gray: #737373;
  --color-hairline: #e5e5e5;
  --color-ember: #e7000b;

  /* Superficies y Capas (Canvas -> Soft -> Paper) */
  --bg-canvas: #f5f5f5;
  --bg-surface: #ffffff;
  --bg-subtle: #fafafa;
  --bg-card: #ffffff;
  --bg-active-nav: rgba(10, 10, 10, 0.05);

  /* Jerarquía Tipográfica */
  --text-main: #0a0a0a;
  --text-heading: #0a0a0a;
  --text-body: #171717;
  --text-secondary: #404040;
  --text-muted: #737373;

  /* Bordes Hairline */
  --border-subtle: #f0f0f0;
  --border-default: #e5e5e5;
  --border-strong: #d4d4d4;

  /* Estados Semánticos (Destructive Ember #e7000b) */
  --color-success: #10b981;
  --color-warning: #f59e0b;
  --color-error: #e7000b;
  --color-info: #3b82f6;

  /* Paleta Dinámica de Color de Acento (Personalizable por negocio) */
  --color-primary-50: #f0fdfa;
  --color-primary-100: #ccfbf1;
  --color-primary-200: #99f6e4;
  --color-primary-500: #06b6d4; /* Cian TGAPOS por defecto; sobrescrito dinámicamente por la config del tenant */
  --color-primary-600: #0891b2;
  --color-primary-700: #0e7490;

  /* Tipografía — Franklin Gothic */
  --font-sans: 'Franklin Gothic Medium', 'Franklin Gothic', 'ITC Franklin Gothic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-geist: 'Franklin Gothic Medium', 'Franklin Gothic', 'ITC Franklin Gothic', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-mono: 'JetBrains Mono', 'Courier New', monospace;

  /* Escala de Radios de Borde Refinados (Estándar Shadcn/UI — Tokens Mid / Medium) */
  --radius-xs: 4px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 12px;       /* Botones, inputs, badges, pestañas */
  --radius-xl: 14px;       /* Tarjetas, paneles, modales */
  --radius-2xl: 14px;
  --radius-3xl: 16px;
  --radius-cards: 12px;
  --radius-buttons: 10px;
  --radius-inputs: 10px;
  --radius-badges: 8px;
  --radius-full: 9999px;

  /* Elevaciones Whisper-Quiet de DESIGN.md */
  --shadow-subtle: 0 0 0 1px rgba(23, 23, 23, 0.05), 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-subtle-2: 0 0 0 1px rgba(23, 23, 23, 0.05);
  --shadow-card: 0 0 0 1px rgba(23, 23, 23, 0.05), 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.04);
  --shadow-elevated: 0 0 0 1px rgba(23, 23, 23, 0.08), 0 8px 24px -4px rgba(0, 0, 0, 0.08);
  --shadow-primary: 0 4px 14px rgba(10, 10, 10, 0.15);

  --topbar-height: 64px;
  --sidebar-width: 254px;
  --comanda-width: 370px;
}

/* Modo Oscuro Opcional */
body.dark-mode {
  --bg-canvas: #0b0f19;
  --bg-surface: #111827;
  --bg-subtle: #1e293b;
  --bg-active-nav: rgba(91, 69, 255, 0.18);
  --text-main: #f8fafc;
  --text-secondary: #cbd5e1;
  --text-muted: #64748b;
  --border-subtle: #1e293b;
  --border-default: #334155;
  --border-strong: #475569;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

html, body {
  width: 100%;
  height: 100dvh;
  overflow: hidden;
  font-family: var(--font-sans);
  background-color: var(--bg-canvas);
  color: var(--text-main);
  font-size: 14px;
  line-height: 1.45;
}

button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

/* Iconos Lucide limpios */
svg.lucide {
  width: 17px;
  height: 17px;
  stroke-width: 1.85px;
  flex-shrink: 0;
}

/* ============================================================
   ESTADOS DE CARGA (SKELETON SHIMMER UTILITY & SKELETON SCREENS)
   ============================================================ */
.skeleton {
  background: linear-gradient(
    90deg,
    var(--bg-subtle, #fafafa) 25%,
    var(--border-default, #e5e5e5) 50%,
    var(--bg-subtle, #fafafa) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite;
  border-radius: var(--radius-sm, 6px);
  display: inline-block;
}

@keyframes skeleton-shimmer {
  0% {
    background-position: 200% 0;
  }
  100% {
    background-position: -200% 0;
  }
}

.skeleton-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
  gap: 12px;
  width: 100%;
  padding: 8px 0;
}

.skeleton-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-default, #e5e5e5);
  border-radius: var(--radius-md, 10px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-height: 110px;
}

.skeleton-line {
  height: 12px;
  width: 80%;
  border-radius: var(--radius-xs, 4px);
}

.skeleton-line-sm {
  height: 10px;
  width: 50%;
  border-radius: var(--radius-xs, 4px);
}

.skeleton-circle {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm, 6px);
}

/* ==================== ESTRUCTURA PRINCIPAL CON SIDEBAR A LA DERECHA ==================== */
.tga-app-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--sidebar-width);
  width: 100%;
  height: 100dvh;
  overflow: hidden;
}

/* Modo KDS / Cocina Pantalla Completa: expandir el grid a 1fr y ocultar el sidebar sin dejar huecos */
.tga-app-shell.sidebar-hidden,
.tga-app-shell.sidebar-collapsed,
body.modo-cocina-activo .tga-app-shell,
body.modo-kds-activo .tga-app-shell,
html.rol-cocina-inmediato .tga-app-shell {
  grid-template-columns: 1fr !important;
  width: 100% !important;
}

.tga-app-shell.sidebar-hidden #tga-sidebar,
.tga-app-shell.sidebar-collapsed #tga-sidebar,
body.modo-cocina-activo #tga-sidebar,
body.modo-kds-activo #tga-sidebar,
html.rol-cocina-inmediato #tga-sidebar,
body.modo-cocina-activo #btn-toggle-sidebar,
body.modo-kds-activo #btn-toggle-sidebar,
html.rol-cocina-inmediato #btn-toggle-sidebar,
body.modo-cocina-activo .tga-mobile-sidebar-toggle,
body.modo-kds-activo .tga-mobile-sidebar-toggle,
html.rol-cocina-inmediato .tga-mobile-sidebar-toggle {
  display: none !important;
}

.tga-app-shell.sidebar-hidden .tga-main-column,
.tga-app-shell.sidebar-collapsed .tga-main-column,
body.modo-cocina-activo .tga-main-column,
body.modo-kds-activo .tga-main-column,
html.rol-cocina-inmediato .tga-main-column {
  width: 100% !important;
  max-width: 100% !important;
}

.tga-app-shell.sidebar-hidden .tga-topbar,
.tga-app-shell.sidebar-collapsed .tga-topbar,
body.modo-cocina-activo .tga-topbar,
body.modo-kds-activo .tga-topbar,
html.rol-cocina-inmediato .tga-topbar {
  width: 100% !important;
  padding: 0 20px;
}

.tga-main-column {
  display: flex;
  flex-direction: column;
  min-width: 0;
  height: 100dvh;
  overflow: hidden;
  background: var(--bg-canvas);
}

/* ==================== 1. TOP HEADER (ESTILO TGA) ==================== */
.tga-topbar {
  height: var(--topbar-height);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
  z-index: 40;
  min-width: 0;
}

.tga-topbar-left {
  display: flex;
  align-items: center;
  gap: 16px;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.tga-page-title {
  font-size: clamp(1.05rem, 0.95rem + 0.4vw, 1.32rem);
  font-weight: 800;
  color: var(--text-main);
  letter-spacing: -0.02em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 240px;
  flex-shrink: 0;
}

.tga-pill-truncate {
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  display: inline-block;
}

.tga-global-search {
  position: relative;
  display: flex;
  align-items: center;
  width: min(380px, 100%);
  background: var(--bg-canvas);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-inputs);
  padding: 0 12px;
  height: 38px;
  transition: all 0.15s ease;
}

.tga-global-search:focus-within {
  background: var(--bg-surface);
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(91, 69, 255, 0.12);
}

.tga-global-search svg.lucide {
  color: var(--text-muted);
  width: 16px;
  height: 16px;
}

.tga-global-search input {
  border: none;
  background: transparent;
  outline: none;
  width: 100%;
  padding: 0 10px;
  font-size: 0.84rem;
  color: var(--text-main);
}

.tga-global-search input::placeholder {
  color: var(--text-muted);
}

.tga-kbd-badge {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 5px;
  white-space: nowrap;
}

.tga-topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.tga-header-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 34px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tga-header-chip:hover {
  border-color: var(--border-strong);
  color: var(--text-main);
}

.status-indicator-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--color-success);
  box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.18);
}

.tga-icon-btn {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tga-icon-btn:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.tga-user-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 5px;
  border-radius: var(--radius-full);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  cursor: pointer !important;
  transition: all 0.2s ease;
  user-select: none;
  pointer-events: auto !important;
}

.tga-user-pill > * {
  pointer-events: none;
}

.tga-user-pill:hover {
  background: var(--bg-hover);
  border-color: var(--color-primary-300);
  box-shadow: 0 2px 8px rgba(10, 10, 10, 0.08);
}

.tga-user-pill:active {
  transform: scale(0.97);
}

.tga-user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-primary-500);
  color: #ffffff;
  font-weight: 800;
  font-size: 0.78rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.tga-user-name {
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--text-main);
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tga-user-role-badge {
  font-size: 0.62rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(99, 102, 241, 0.12);
  color: #6366f1;
  display: inline-block;
  line-height: 1.2;
}

.tga-user-pill select {
  background: transparent;
  border: none;
  outline: none;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
}

/* ==================== ESTILOS CAMBIO DE OPERADOR & PIN PAD ==================== */
.operator-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 12px 8px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  cursor: pointer;
  transition: all 0.18s ease;
  text-align: center;
  user-select: none;
}

.operator-card:hover {
  border-color: var(--color-primary-300);
  background: var(--bg-subtle);
  transform: translateY(-2px);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.05);
}

.operator-card.selected {
  border-color: var(--color-primary-500) !important;
  background: rgba(99, 102, 241, 0.08) !important;
  box-shadow: 0 0 0 2px var(--color-primary-500) !important;
}

.operator-card-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  flex-shrink: 0;
}

.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: #f8fafc;
  transition: all 0.15s ease;
  display: inline-block;
}

.pin-dot.filled {
  background: var(--color-primary-500, #06b6d4) !important;
  border-color: var(--color-primary-500, #06b6d4) !important;
  transform: scale(1.18);
  box-shadow: 0 0 10px rgba(6, 182, 212, 0.45);
}

.pin-dot.error {
  background: #ef4444 !important;
  border-color: #ef4444 !important;
  transform: scale(1.18);
  box-shadow: 0 0 10px rgba(239, 68, 68, 0.4);
}

.numpad-key {
  height: 56px;
  width: 100%;
  min-width: 68px;
  max-width: 90px;
  border-radius: 14px;
  border: 1.5px solid var(--border-default, #e2e8f0);
  background: #ffffff;
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.12s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 4px rgba(15, 23, 42, 0.04);
  user-select: none;
  margin: 0 auto;
}

.numpad-key:hover {
  background: #f8fafc;
  border-color: var(--color-primary-400, #22d3ee);
  box-shadow: 0 4px 10px rgba(15, 23, 42, 0.08);
}

.numpad-key:active {
  transform: scale(0.95);
  background: #f1f5f9;
}

.numpad-key.numpad-action {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text-muted, #64748b);
  background: #f8fafc;
}

.plan-locked-tag {
  display: inline-block;
  font-size: 0.62rem;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
  background: rgba(234, 179, 8, 0.15);
  color: #ca8a04;
  border: 1px solid rgba(234, 179, 8, 0.3);
  margin-left: 6px;
  text-transform: uppercase;
}

.tga-mobile-sidebar-toggle {
  display: none;
}

/* ==================== 2. SIDEBAR DERECHO (ESTILO TGA) ==================== */
.tga-right-sidebar {
  width: var(--sidebar-width);
  height: 100dvh;
  background: var(--bg-subtle);
  border-left: 1px solid var(--border-default);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 14px 10px;
  overflow: hidden !important;
  z-index: 50;
  user-select: none;
  scrollbar-width: none;
}

.tga-right-sidebar::-webkit-scrollbar {
  display: none;
}

.tga-brand-box {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 2px 10px 18px 10px;
}

.tga-brand-logo {
  font-family: 'Franklin Gothic Demi', 'Franklin Gothic Medium', 'ITC Franklin Gothic', 'Arial Narrow', sans-serif;
  font-weight: 400;
  font-style: normal;
  color: var(--text-main);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: baseline;
  gap: 0;
  cursor: pointer;
  line-height: 1;
}

.tga-brand-logo .tga-word-main {
  font-size: 1.55rem;
  font-weight: 400;
  letter-spacing: -0.02em;
}

.tga-brand-logo .tga-word-pos {
  font-size: 0.92rem;
  font-weight: 400;
  color: var(--color-primary-500);
  margin-left: 0;
  letter-spacing: -0.01em;
}

.tga-brand-sub {
  font-size: 0.68rem;
  color: var(--text-muted);
  font-weight: 600;
  display: block;
  margin-top: 3px;
}

.tga-sidebar-custom-logo-box {
  margin: 12px auto 6px auto;
  padding: 4px 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 190px;
  height: 86px;
  max-height: 86px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 0;
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

.tga-sidebar-custom-logo-img,
.tga-sidebar-custom-logo-box img,
#sidebar-custom-logo-img {
  display: block;
  max-width: 100% !important;
  max-height: 80px !important;
  width: auto !important;
  height: auto !important;
  object-fit: contain !important;
  object-position: center !important;
  margin: 0 auto;
  border: none !important;
  background: transparent !important;
}

.tga-nav-scroll {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden !important;
  scrollbar-width: none;
}

.tga-nav-scroll::-webkit-scrollbar {
  display: none;
}

.tga-nav-section {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tga-nav-accordion-header {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 5px 8px;
  background: transparent;
  border: none;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.15s ease;
  user-select: none;
}

.tga-nav-accordion-header:hover {
  background: var(--bg-hover, rgba(0, 0, 0, 0.04));
  color: var(--text-main);
}

.tga-accordion-chevron {
  width: 13px;
  height: 13px;
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tga-nav-section.collapsed .tga-accordion-chevron {
  transform: rotate(-90deg);
}

.tga-nav-accordion-content {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow: hidden;
  max-height: 800px;
  opacity: 1;
  transform: translateY(0);
  transition: max-height 0.32s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.24s ease,
              transform 0.24s ease;
}

.tga-nav-section.collapsed .tga-nav-accordion-content {
  max-height: 0 !important;
  opacity: 0 !important;
  transform: translateY(-4px) !important;
  pointer-events: none;
  visibility: hidden;
  transition: max-height 0.28s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.2s ease,
              transform 0.2s ease,
              visibility 0.28s;
}

.tga-nav-section-label {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  padding: 4px 10px 6px 10px;
}

.tga-nav-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 9px 10px;
  border-radius: var(--radius-buttons);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.14s ease;
  text-align: left;
}

.tga-nav-item-left {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.tga-nav-item:hover {
  background: var(--bg-subtle);
  color: var(--text-main);
}

.tga-nav-item.active {
  background: var(--bg-active-nav);
  color: var(--color-primary-500);
  font-weight: 700;
}

.tga-nav-item.active svg.lucide {
  color: var(--color-primary-500);
}

.tga-nav-chevron {
  width: 14px !important;
  height: 14px !important;
  color: var(--text-muted);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.tga-nav-group.open .tga-nav-chevron {
  transform: rotate(180deg);
}

.tga-nav-submenu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-left: 28px;
  margin-top: 2px;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  visibility: hidden;
  transition: max-height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.22s ease,
              transform 0.22s ease,
              visibility 0.3s;
}

.tga-nav-group.open .tga-nav-submenu {
  max-height: 400px;
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
}

.tga-nav-subitem {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.79rem;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: all 0.12s ease;
}

.tga-nav-subitem:hover {
  color: var(--color-primary-500);
  background: var(--bg-subtle);
}

.tga-nav-subitem.active {
  color: var(--color-primary-500);
  font-weight: 700;
}

.tga-sidebar-footer {
  padding: 14px 10px 2px 10px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.72rem;
  color: var(--text-muted);
}

.top-pill-badge {
  background: var(--color-primary-500);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 1px 6px;
  border-radius: var(--radius-full);
}

/* ==================== 3. SUB-BARRA DE CONTEXTO POS Y CATEGORÍAS ==================== */
.pos-context-strip {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.crumb-block {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.crumb-heading {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--text-main);
}

.crumb-subheading {
  font-size: 0.74rem;
  color: var(--text-muted);
}

.foh-quick-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.foh-mini-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: var(--radius-buttons);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.77rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
  white-space: nowrap;
}

.foh-mini-btn:hover {
  border-color: var(--color-primary-500);
  color: var(--color-primary-500);
}

.foh-mini-btn.active {
  background: var(--bg-active-nav);
  border-color: var(--color-primary-500);
  color: var(--color-primary-500);
  font-weight: 700;
}

/* Previsualizaciones del catálogo de widgets: sus tarjetas internas llevan fondo blanco fijo y texto con
   var(--text-main); en modo oscuro el texto claro quedaba invisible sobre blanco. */
body.dark-mode .sidebar-widget-card [style*="background:#fff"],
body.dark-mode .banco-widget-card [style*="background:#fff"] {
  background: var(--bg-surface) !important;
}

.category-pills-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: 8px 24px;
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.category-pills-bar::-webkit-scrollbar {
  display: none;
}

.category-oval-tab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-badges);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-secondary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.14s ease;
}

.category-oval-tab:hover {
  border-color: var(--color-primary-500);
  color: var(--color-primary-500);
}

.category-oval-tab.active {
  background: var(--color-primary-500) !important;
  border-color: var(--color-primary-500) !important;
  color: #ffffff !important;
  font-weight: 700 !important;
  box-shadow: 0 2px 8px color-mix(in srgb, var(--color-primary-500, #0a0a0a) 32%, transparent) !important;
}

/* ==================== 4. WORKSPACE CENTRAL Y TARJETA DE FILTROS TGA ==================== */
.pos-body-split {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--comanda-width);
  min-height: 0;
  overflow: hidden;
}

.pos-body-split.full-canvas-mode {
  grid-template-columns: minmax(0, 1fr);
}

.pos-body-split.full-canvas-mode .navy-comanda-sidebar {
  display: none;
}

.marble-floor-section {
  container-type: inline-size;
  container-name: workspace;
  padding: 20px 24px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.marble-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

#section-header-text {
  font-size: 0.96rem;
  font-weight: 700;
  color: var(--text-main);
}

/* Tarjeta Blanca de Filtros (Ventas Totales TGA) */
.tga-filter-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-cards);
  padding: 20px 24px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tga-filter-top-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.tga-filter-inputs {
  display: flex;
  align-items: flex-end;
  gap: 14px;
  flex-wrap: wrap;
}

.tga-field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.tga-field-group label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.tga-date-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  padding: 0 12px;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-main);
}

.tga-date-input-wrap input,
.tga-date-input-wrap select {
  border: none;
  background: transparent;
  outline: none;
  font-weight: 600;
  color: var(--text-main);
}

.tga-filter-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.tga-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 20px;
  border-radius: var(--radius-buttons);
  border: none;
  background: var(--color-primary-500);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  box-shadow: var(--shadow-primary);
  transition: all 0.15s ease;
}

.tga-btn-primary:hover {
  background: var(--color-primary-600);
}

.tga-btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-buttons);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.84rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.tga-btn-outline:hover {
  border-color: var(--color-primary-500);
  color: var(--color-primary-500);
}

.tga-preset-pills-row,
.tga-Preset-Pills-Row {
  border-top: 1px solid var(--border-subtle);
  padding-top: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tga-preset-pill {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-main);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.14s ease;
}

.tga-preset-pill:hover:not(.active) {
  background: var(--bg-active-nav);
  border-color: var(--color-primary-500);
  color: var(--color-primary-500);
}

.tga-preset-pill.active {
  background: var(--color-primary-500) !important;
  border-color: var(--color-primary-500) !important;
  color: #ffffff !important;
  font-weight: 700;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
}

/* ==================== 5. GRILLA DE TARJETAS (MESAS / PRODUCTOS) ==================== */
.porcelain-plates-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 14px;
  align-content: start;
}

@container workspace (max-width: 540px) {
  .porcelain-plates-grid {
    grid-template-columns: repeat(auto-fill, minmax(155px, 1fr));
    gap: 10px;
  }
}

.plate-dish-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-cards);
  padding: 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  min-height: 138px;
  box-shadow: var(--shadow-card);
  cursor: pointer;
  transition: transform 0.14s ease, border-color 0.14s ease, box-shadow 0.14s ease;
}

.plate-dish-card:hover {
  transform: translateY(-2px);
  border-color: var(--color-primary-500);
  box-shadow: 0 8px 20px rgba(91, 69, 255, 0.08);
}

.plate-dish-card.selected-table {
  border: 2px solid var(--color-primary-500);
  background: var(--bg-active-nav);
}

.plate-dish-card.occupied-table {
  border-left: 4px solid var(--color-error);
}

.plate-dish-card.reserved-table {
  border-left: 4px solid #8b5cf6;
}

.plate-dish-card.cleaning-table {
  border-left: 4px solid var(--color-warning);
}

.plate-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
}

.plate-name {
  font-weight: 700;
  font-size: 0.94rem;
  color: var(--text-main);
  line-height: 1.3;
}

.plate-accent-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  background: var(--bg-subtle);
  color: var(--color-primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dish-photo-round {
  width: 44px;
  height: 44px;
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  flex-shrink: 0;
  aspect-ratio: 1 / 1;
}

.dish-photo-round img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Tarjeta de producto con imagen rectangular amplia (Estilo Imagen 4) */
.plate-dish-card.product-catalog-card {
  padding: 12px;
  gap: 8px;
  min-height: 225px;
  justify-content: space-between;
  position: relative; /* ancla el globito de cantidad (.plate-ticket-qty-badge) a su propia tarjeta */
}

.product-card-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.product-area-pill {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  padding: 2px 8px;
  border-radius: 999px;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.dish-photo-banner {
  width: 100%;
  height: 128px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--bg-subtle);
  flex-shrink: 0;
}

.dish-photo-banner img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.25s ease;
}

.plate-dish-card.product-catalog-card:hover .dish-photo-banner img {
  transform: scale(1.04);
}

.product-card-bottom {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.plate-middle-content {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plate-meta-text {
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.plate-price-tag {
  font-size: 0.96rem;
  font-weight: 800;
  color: var(--color-primary-500);
}

.plate-footer-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 8px;
  border-top: 1px solid var(--border-subtle);
}

.plate-badge-capsule {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  font-size: 0.71rem;
  font-weight: 700;
  background: var(--bg-subtle);
  color: var(--text-secondary);
}

.badge-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.badge-dot.green { background: var(--color-success); }
.badge-dot.red { background: var(--color-error); }
.badge-dot.amber { background: var(--color-warning); }
.badge-dot.purple { background: #8b5cf6; }

/* Estado Vacío (Empty State) con Iconos Vectoriales */
.empty-state-box {
  grid-column: 1 / -1;
  background: var(--bg-surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-xl);
  padding: 44px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 560px;
  margin: 20px auto;
}

.empty-state-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  background: var(--bg-active-nav);
  color: var(--color-primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
}

.empty-state-icon svg.lucide {
  width: 26px;
  height: 26px;
}

.empty-state-title {
  font-size: 1.12rem;
  font-weight: 800;
  color: var(--text-main);
}

.empty-state-desc {
  font-size: 0.84rem;
  color: var(--text-secondary);
  max-width: 430px;
}

.empty-state-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: center;
  margin-top: 6px;
}

/* ==================== 6. PANEL DE COMANDA ACTIVA ==================== */
.navy-comanda-sidebar {
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  overflow: hidden;
}

.comanda-top-title-bar {
  padding: 14px 16px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.comanda-title-large {
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--text-main);
}

.comanda-table-badge {
  display: inline-block;
  margin-top: 2px;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--bg-active-nav);
  color: var(--color-primary-500);
  font-size: 0.72rem;
  font-weight: 700;
}

.pax-selector-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--bg-subtle);
  padding: 4px 8px;
  border-radius: var(--radius-sm);
}

.pax-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 700;
  cursor: pointer;
}

.pax-num {
  font-weight: 800;
  font-size: 0.8rem;
  min-width: 16px;
  text-align: center;
}

.comanda-course-seat-bar {
  padding: 8px 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  flex-wrap: wrap;
}

.seat-Course-Group {
  display: flex;
  align-items: center;
  gap: 4px;
}

.mini-label {
  font-size: 0.7rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.mini-select-pill {
  padding: 3px 6px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-size: 0.74rem;
  font-weight: 600;
}

.btn-send-kds-now {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--color-primary-500);
  color: #ffffff;
  border: none;
  padding: 5px 10px;
  border-radius: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  cursor: pointer;
}

.comanda-cards-list {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.dish-porcelain-item-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  cursor: pointer;
}

.dish-porcelain-item-card.selected-for-mod {
  border-color: var(--color-primary-500);
  background: var(--bg-active-nav);
}

.dish-stepper-navy {
  display: flex;
  align-items: center;
  gap: 4px;
  background: var(--bg-subtle);
  padding: 3px;
  border-radius: 8px;
}

.dish-stepper-btn {
  width: 22px;
  height: 22px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-weight: 800;
  cursor: pointer;
}

.dish-stepper-count {
  font-weight: 800;
  font-size: 0.8rem;
  min-width: 18px;
  text-align: center;
}

.dish-center-col {
  flex: 1;
  min-width: 0;
}

.dish-title-serif {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dish-unit-rate {
  font-size: 0.7rem;
  color: var(--text-secondary);
}

.dish-modifier-pill {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fef3c7;
  color: #b45309;
  font-size: 0.67rem;
  font-weight: 700;
}

.alergia-badge-red {
  display: inline-block;
  margin-top: 2px;
  padding: 1px 6px;
  border-radius: 4px;
  background: #fee2e2;
  color: #dc2626;
  font-size: 0.67rem;
  font-weight: 800;
}

/* Botón de eliminar línea en comanda/ticket */
.dish-quitar {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 32px !important;
  height: 32px !important;
  min-width: 32px !important;
  min-height: 32px !important;
  border: 1px solid #fee2e2 !important;
  border-radius: 8px !important;
  background: #fef2f2 !important;
  color: #ef4444 !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
  flex-shrink: 0 !important;
  padding: 0 !important;
  margin-left: 6px;
  box-sizing: border-box;
}

.dish-quitar:hover {
  background: #fee2e2 !important;
  color: #dc2626 !important;
  border-color: #fca5a5 !important;
  transform: scale(1.06);
}

.dish-quitar:active {
  transform: scale(0.95);
}

.dish-quitar svg,
.dish-quitar i {
  width: 15px !important;
  height: 15px !important;
  pointer-events: none !important;
  stroke: currentColor;
}

.comanda-mod-panel {
  padding: 8px 12px;
  background: var(--bg-subtle);
  border-top: 1px solid var(--border-subtle);
}

.mod-panel-label {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
  margin-bottom: 5px;
}

.mod-pills-row {
  display: flex;
  gap: 5px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.mod-pill-white-btn {
  padding: 4px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}

.mod-pill-white-btn.alergia-chip {
  border-color: #fca5a5;
  color: #dc2626;
  background: #fef2f2;
}

.comanda-subtotals-box {
  padding: 8px 16px;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 0.76rem;
  color: var(--text-secondary);
}

.subtotal-row-item {
  display: flex;
  justify-content: space-between;
  font-weight: 600;
}

.silver-total-plaque {
  padding: 12px 16px;
  border-top: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.plaque-top-label {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.05em;
}

.plaque-gold-digits {
  font-size: 1.42rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.1;
}

.plaque-usd-subtotal {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--color-primary-500);
}

.plaque-pill-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 6px;
}

.action-pill-3d {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.action-pill-3d:hover {
  background: var(--bg-surface);
  border-color: var(--color-primary-400);
  transform: translateY(-1px);
}

.action-pill-3d.cobrar-highlight {
  grid-column: 1 / -1;
  width: 100%;
  height: 50px;
  font-size: 1.05rem;
  font-weight: 800;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: linear-gradient(135deg, #06b6d4 0%, #0284c7 100%);
  border: none;
  color: #ffffff;
  box-shadow: 0 4px 14px rgba(6, 182, 212, 0.4);
  letter-spacing: 0.3px;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.action-pill-3d.cobrar-highlight:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(6, 182, 212, 0.5);
}

.action-pill-3d.cobrar-highlight:active {
  transform: translateY(0);
}

/* ==================== CATÁLOGO IN-PAGE TARJETAS MODERNAS ==================== */
.catalogo-inpage-cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(215px, 1fr));
  gap: 12px;
  width: 100%;
}

.catalogo-inpage-card {
  background: var(--bg-card, #ffffff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.catalogo-inpage-card:hover {
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
  transform: translateY(-2px);
}

.catalogo-inpage-img-wrapper {
  width: 100%;
  height: 112px;
  position: relative;
  background: #f8fafc;
  overflow: hidden;
  cursor: pointer;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: center;
}

.catalogo-inpage-img {
  width: 100%;
  height: 112px;
  object-fit: cover;
  display: block;
}

.catalogo-inpage-body {
  padding: 10px 12px;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
}

.catalogo-inpage-title {
  font-weight: 800;
  font-size: 0.88rem;
  color: var(--text-main, #0f172a);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 2.4em;
  margin-bottom: 3px;
}

/* ==================== REGLAS STRICT RETAIL EN SIDEBAR Y POS ==================== */
body.modo-retail #snav-mesas,
body.modo-retail #snav-subitem-mesas,
body.modo-retail #pos-btn-sub-mesas,
body.modo-retail #pos-btn-sub-acciones-mesa,
body.modo-retail #pos-btn-sub-dividir,
body.modo-retail #pos-btn-sub-delivery,
body.modo-retail #snav-subitem-pedidos,
body.modo-retail #navgroup-produccion,
body.modo-retail #snav-cocina,
body.modo-retail #snav-reportes-anulaciones,
body.modo-retail #modal-auditoria-anulaciones {
  display: none !important;
}

/* ==================== 7. TARJETAS KPI ESTILO TGA & TABLAS ==================== */
.kpi-cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(175px, 1fr));
  gap: 14px;
}

.kpi-stat-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-cards);
  padding: 16px 18px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-stat-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.kpi-stat-value {
  font-size: 1.38rem;
  font-weight: 800;
  color: var(--text-main);
}

.table-responsive-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-cards);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
}

.pos-data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.8rem;
}

.pos-data-table th {
  background: var(--bg-subtle);
  color: var(--text-muted);
  text-align: left;
  padding: 11px 14px;
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border-subtle);
}

.pos-data-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  color: var(--text-main);
}

/* ==================== 8. KDS COCINA ==================== */
.kds-board-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
}

.kds-ticket-card {
  background: var(--bg-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-default);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-card);
}

.kds-ticket-card.semaforo-verde { border-top: 4px solid var(--color-success); }
.kds-ticket-card.semaforo-amarillo { border-top: 4px solid var(--color-warning); }
.kds-ticket-card.semaforo-rojo { border-top: 4px solid var(--color-error); }

.kds-card-header {
  padding: 12px 14px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kds-timer-pill {
  padding: 3px 8px;
  border-radius: var(--radius-full);
  font-size: 0.72rem;
  font-weight: 800;
}
.kds-timer-pill.verde { background: #d1fae5; color: #047857; }
.kds-timer-pill.amarillo { background: #fef3c7; color: #b45309; }
.kds-timer-pill.rojo { background: #fee2e2; color: #b91c1c; }

.kds-items-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kds-item-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

/* ==================== 9. FORMULARIOS Y BOTONES DE MÓDULOS ==================== */
.admin-card-form {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  padding: 18px 20px;
  border-radius: var(--radius-cards);
  box-shadow: var(--shadow-card);
}

.admin-form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.caja-dual-grid {
  display: grid;
  grid-template-columns: minmax(340px, 1fr) minmax(440px, 1.25fr);
  gap: 16px;
  width: 100%;
  align-items: start;
}

@media (max-width: 992px) {
  .caja-dual-grid {
    grid-template-columns: 1fr;
  }
}

.admin-form-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.admin-form-group.full-width {
  grid-column: 1 / -1;
}

.admin-form-group label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-secondary);
}

.admin-input-styled,
.admin-select-styled,
.admin-form-group input,
.admin-form-group select {
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-size: 0.84rem;
  outline: none;
}

.admin-input-styled:focus,
.admin-select-styled:focus,
.admin-form-group input:focus,
.admin-form-group select:focus {
  border-color: var(--color-primary-500);
}

.admin-btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-buttons);
  border: none;
  background: var(--color-primary-500);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.admin-btn-primary:hover {
  background: var(--color-primary-600);
}

.admin-btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border-radius: var(--radius-buttons);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  color: var(--text-main);
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
}

.admin-platillos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 12px;
}

.admin-plato-card {
  display: flex;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  align-items: center;
  min-width: 0;
  overflow: hidden;
  box-sizing: border-box;
}

.admin-plato-photo-wrapper {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-md);
  overflow: hidden;
  position: relative;
  flex-shrink: 0;
  cursor: pointer;
  border: 1px solid var(--border-subtle);
}

.admin-plato-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-plato-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-plato-title {
  font-weight: 700;
  font-size: 0.86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-plato-cat-badge {
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--color-primary-500);
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-plato-price-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  margin-top: 5px;
  min-width: 0;
}

.admin-plato-price-input-wrap {
  display: flex;
  align-items: center;
  gap: 3px;
  min-width: 0;
  flex-shrink: 1;
}

.admin-price-input {
  width: 66px;
  padding: 3px 5px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  font-weight: 700;
  font-size: 0.78rem;
  box-sizing: border-box;
}

.admin-plato-btn-group {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

.admin-btn-save-mini {
  padding: 4px 7px;
  border-radius: 6px;
  border: none;
  background: var(--color-primary-500);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.admin-btn-edit-mini {
  padding: 4px 7px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  color: var(--text-main);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.admin-btn-edit-mini:hover {
  background: var(--border-subtle);
  color: var(--color-primary-600);
}

.admin-btn-delete-mini {
  padding: 4px 6px;
  border-radius: 6px;
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #dc2626;
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}

.admin-waiters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
}

.admin-waiter-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 14px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  gap: 8px;
}

.admin-waiter-left {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  flex: 1;
}

.admin-waiter-avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  max-width: 42px;
  max-height: 42px;
  aspect-ratio: 1 / 1;
  border-radius: 50% !important;
  background: var(--bg-active-nav);
  color: var(--color-primary-600);
  font-weight: 800;
  font-size: 0.88rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-sizing: border-box;
}

.admin-waiter-actions {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-shrink: 0;
}

/* ==================== 10. MODALES Y WIZARD ==================== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.5);
  backdrop-filter: blur(3px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  z-index: 1000;
}

.modal-overlay.active {
  display: flex;
}

.modal-card {
  background: var(--bg-surface);
  border-radius: var(--radius-cards);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-elevated);
  width: 100%;
  max-width: 560px;
  max-height: 92dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.modal-header {
  padding: 16px 20px;
  border-bottom: 1px solid var(--border-subtle);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.modal-title {
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-main);
}

.modal-close-btn {
  width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  font-weight: 700;
  cursor: pointer;
}

.modal-body {
  padding: 18px 20px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.wizard-steps-indicator {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  padding: 12px 20px;
  background: var(--bg-subtle);
  border-bottom: 1px solid var(--border-subtle);
}

.wizard-step-pill {
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  background: var(--bg-surface);
  color: var(--text-muted);
  border: 1px solid var(--border-default);
}

.wizard-step-pill.active {
  background: var(--color-primary-500);
  color: #ffffff;
  border-color: var(--color-primary-500);
}

.wizard-step-pill.done {
  background: #d1fae5;
  color: #047857;
  border-color: #6ee7b7;
}

/* Cobro Modal */
.currency-selector-row {
  display: flex;
  gap: 8px;
}

.currency-toggle-btn {
  flex: 1;
  padding: 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
}

.currency-toggle-btn.active {
  background: var(--color-primary-500);
  color: #ffffff;
  border-color: var(--color-primary-500);
}

.payment-methods-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.pay-method-btn {
  padding: 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-surface);
  font-weight: 700;
  font-size: 0.82rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.pay-method-btn.active {
  border-color: var(--color-primary-500);
  background: var(--bg-active-nav);
  color: var(--color-primary-500);
}

.cash-quick-denominations {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.denom-btn {
  flex: 1;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  font-weight: 700;
  font-size: 0.76rem;
  cursor: pointer;
}

.admin-pin-input-group input {
  width: 100%;
  padding: 12px;
  font-size: 1.5rem;
  text-align: center;
  letter-spacing: 8px;
  font-weight: 800;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-default);
}

.admin-keypad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.admin-key-btn {
  padding: 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-subtle);
  font-size: 1.05rem;
  font-weight: 800;
  cursor: pointer;
}

.photo-upload-dropzone {
  border: 2px dashed var(--border-strong);
  border-radius: var(--radius-md);
  padding: 16px;
  text-align: center;
  background: var(--bg-subtle);
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.pos-toast {
  background: #0f172a;
  color: #ffffff;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  font-size: 0.82rem;
  font-weight: 600;
  box-shadow: var(--shadow-elevated);
  display: flex;
  align-items: center;
  gap: 8px;
}

/* ==================== 11. RESPONSIVIDAD MÓVIL Y TABLET ==================== */
.mobile-comanda-fab {
  display: none;
}

.mobile-drawer-close-btn {
  display: none;
}

@media (max-width: 1024px) {
  .tga-app-shell {
    grid-template-columns: 1fr;
  }

  .tga-mobile-sidebar-toggle {
    display: inline-flex;
  }

  .tga-right-sidebar {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    width: 270px;
    transform: translateX(100%);
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: -10px 0 30px rgba(15, 23, 42, 0.15);
  }

  .tga-right-sidebar.mobile-open {
    transform: translateX(0);
  }
}

/* ==================== 11. RESPONSIVIDAD METICULOSA (TABLETS & MÓVILES) ==================== */

/* Nivel Tablet Landscape (hasta 1200px) */
@media (max-width: 1200px) {
  .tga-topbar {
    padding: 0 16px;
    gap: 10px;
  }

  .tga-topbar-left {
    gap: 12px;
  }

  .tga-page-title {
    max-width: 190px;
    font-size: 1.12rem;
  }

  .tga-global-search {
    width: min(220px, 100%);
    padding: 0 8px;
  }

  .tga-kbd-badge {
    display: none;
  }

  .tga-header-chip .chip-text {
    display: none;
  }

  .tga-header-chip {
    padding: 0 9px;
    height: 34px;
  }

  .hide-tablet-landscape {
    display: none !important;
  }
}

/* Nivel Tablet Portrait & Small Screens (hasta 992px) */
@media (max-width: 992px) {
  .tga-topbar {
    padding: 0 12px;
    gap: 8px;
  }

  .tga-topbar-left {
    gap: 10px;
    flex: 1 1 auto;
  }

  .tga-page-title {
    display: none;
  }

  .tga-global-search {
    flex: 1 1 auto;
    min-width: 180px;
    max-width: 380px;
    width: auto;
  }

  .tga-global-search input {
    font-size: 0.82rem;
    padding: 0 8px;
  }

  .tga-topbar-right {
    gap: 6px;
  }

  .tga-header-chip.hide-tablet {
    display: none !important;
  }

  #btn-modo-terminal.hide-tablet {
    display: none !important;
  }

  .hide-tablet-portrait {
    display: none !important;
  }

  .tga-pill-truncate {
    max-width: 90px;
  }

  .tga-user-pill select {
    max-width: 90px;
    font-size: 0.72rem;
  }

  .kpi-cards-row {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
  }
}

/* Nivel Tablet & Mobile (hasta 860px) */
@media (max-width: 860px) {
  .pos-body-split {
    grid-template-columns: 1fr;
  }

  .navy-comanda-sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    height: 82dvh;
    z-index: 900;
    border-radius: 20px 20px 0 0;
    box-shadow: 0 -10px 30px rgba(15, 23, 42, 0.25);
    transform: translateY(105%);
    transition: transform 0.26s cubic-bezier(0.16, 1, 0.3, 1);
  }

  .navy-comanda-sidebar.mobile-open {
    transform: translateY(0);
  }

  .mobile-drawer-close-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid var(--border-default);
    background: var(--bg-subtle);
    font-size: 0.75rem;
    font-weight: 700;
  }

  .mobile-comanda-fab {
    display: flex;
    position: fixed;
    bottom: 16px;
    left: 16px;
    right: 16px;
    height: 48px;
    background: var(--color-primary-500);
    color: #ffffff;
    border: none;
    border-radius: var(--radius-lg);
    padding: 0 18px;
    align-items: center;
    justify-content: space-between;
    font-weight: 700;
    font-size: 0.86rem;
    box-shadow: var(--shadow-primary);
    z-index: 800;
    cursor: pointer;
  }
}

/* Nivel Smartphone Estrecho (hasta 680px) */
@media (max-width: 680px) {
  .tga-topbar {
    padding: 0 8px;
    gap: 6px;
  }

  .tga-page-title {
    display: none;
  }

  .tga-global-search {
    display: flex !important;
    flex: 1 1 auto;
    min-width: 140px;
    max-width: 280px;
    height: 34px;
    padding: 0 8px;
  }

  .tga-global-search input {
    font-size: 0.78rem;
    padding: 0 6px;
  }

  .hide-mobile {
    display: none !important;
  }

  .tga-user-pill {
    padding: 3px 6px;
  }

  .tga-user-pill select {
    display: none;
  }

  .tga-pill-truncate {
    max-width: 75px;
  }

  .kpi-cards-row {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }
}

/* ==================== 12. PERSONALIZACIÓN, ESTADOS KDS E IMPRESIÓN TÉRMICA LIMPIA ==================== */
.color-swatches-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(125px, 1fr));
  gap: 8px;
}

.color-swatch-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
  border: 1.5px solid var(--border-default);
  background: var(--bg-surface);
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.color-swatch-btn:hover {
  border-color: var(--swatch-color, var(--color-primary-500));
  background: var(--bg-subtle);
}

.color-swatch-btn.active {
  border-color: var(--swatch-color, var(--color-primary-500));
  background: var(--color-primary-50);
  box-shadow: 0 0 0 2px var(--color-primary-100);
}

.color-swatch-btn span {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--swatch-color, #5b45ff);
  flex-shrink: 0;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.12);
}

.kds-draft-pill,
.kds-sent-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 999px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.kds-draft-pill {
  background: #fef3c7;
  color: #b45309;
  border: 1px solid #fde68a;
}

.kds-sent-pill {
  background: #dcfce7;
  color: #15803d;
  border: 1px solid #bbf7d0;
}

.thermal-print-only {
  display: none;
}

/* Jerarquía de apilamiento de modales para evitar que un modal quede detrás de otro */
#modal-acciones-mesa,
#modal-canal-externo,
#modal-dividir-cuenta,
#modal-cobro,
#modal-reloj-asistencia,
#modal-red,
#modal-tipo-cambio {
  z-index: 1500;
}
#modal-admin-auth {
  z-index: 2100;
}
#modal-setup-wizard {
  z-index: 2300;
}
#modal-cambiar-foto {
  z-index: 2400;
}
#modal-precuenta {
  z-index: 100005;
}

/* ==================== 13. GRÁFICO DE FLUJO DE CAJA EN DASHBOARD ==================== */
.cashflow-dashboard-card {
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-cards);
  padding: 18px 20px;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.cashflow-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.cashflow-title-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cashflow-icon-badge {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: var(--color-primary-50);
  color: var(--color-primary-500);
  display: flex;
  align-items: center;
  justify-content: center;
}

.cashflow-summary-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
}

.cashflow-mini-metric {
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cashflow-mini-metric .lbl {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.cashflow-mini-metric .val {
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main);
}

.cashflow-charts-grid {
  display: grid;
  grid-template-columns: 1.65fr 1fr;
  gap: 18px;
  align-items: stretch;
}

@media (max-width: 900px) {
  .cashflow-charts-grid {
    grid-template-columns: 1fr;
  }
}

.cashflow-svg-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.cashflow-methods-box {
  background: var(--bg-subtle);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
}

.cashflow-method-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.cashflow-method-top {
  display: flex;
  justify-content: space-between;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--text-main);
}

.cashflow-progress-track {
  width: 100%;
  height: 8px;
  background: var(--border-default);
  border-radius: 999px;
  overflow: hidden;
}

.cashflow-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

@page {
  size: 80mm auto;
  margin: 0mm !important;
}

@media print {
  html,
  body {
    margin: 0 !important;
    padding: 0 !important;
    background: #ffffff !important;
    color: #000000 !important;
    width: 80mm !important;
    height: auto !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  body > *:not(#thermal-print-mount) {
    display: none !important;
  }

  .modal-overlay,
  #modal-ver-xml,
  #modal-precuenta,
  #pantalla-espera-usuarios-libres,
  #pos-toast-container {
    display: none !important;
  }

  #thermal-print-mount.thermal-print-only {
    display: block !important;
    width: 76mm !important;
    max-width: 76mm !important;
    margin: 0 auto !important;
    padding: 4mm 2mm !important;
    font-family: 'JetBrains Mono', 'Courier New', monospace !important;
    font-size: 11px !important;
    line-height: 1.35 !important;
    color: #000000 !important;
    background: #ffffff !important;
    box-shadow: none !important;
    border: none !important;
  }
}

/* ========================================================================
   TGA-POS AppDialogs & In-DOM Notification Styles (Zero Alerts)
   ======================================================================== */
.tgapos-dialog-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.tgapos-dialog-backdrop.active {
  opacity: 1;
  pointer-events: auto;
}

.tgapos-dialog-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: 18px;
  width: 100%;
  max-width: 480px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25), 0 0 0 1px rgba(6, 182, 212, 0.12);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transform: scale(0.96) translateY(8px);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}

.tgapos-dialog-backdrop.active .tgapos-dialog-card {
  transform: scale(1) translateY(0);
}

.tgapos-dialog-header {
  padding: 18px 20px 14px 20px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
  border-bottom: 1px solid var(--border-subtle, #f1f5f9);
  position: relative;
}

.tgapos-dialog-icon-box {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  font-weight: 800;
  flex-shrink: 0;
}

.tgapos-dialog-header-text {
  flex: 1;
  padding-right: 20px;
}

.tgapos-dialog-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text-main, #0f172a);
  letter-spacing: -0.01em;
}

.tgapos-dialog-subtitle {
  margin: 3px 0 0 0;
  font-size: 0.78rem;
  color: var(--text-muted, #64748b);
  line-height: 1.4;
}

.tgapos-dialog-close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  background: transparent;
  border: none;
  font-size: 1.4rem;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  line-height: 1;
  padding: 4px;
  border-radius: 8px;
  transition: color 0.15s ease, background 0.15s ease;
}

.tgapos-dialog-close-btn:hover {
  color: var(--text-main, #0f172a);
  background: var(--bg-subtle, #f8fafc);
}

.tgapos-dialog-body {
  padding: 20px;
  overflow-y: auto;
  max-height: 65vh;
  font-size: 0.88rem;
  color: var(--text-main, #334155);
  line-height: 1.5;
}

.tgapos-dialog-input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid var(--border-default, #cbd5e1);
  background: var(--bg-surface, #ffffff);
  color: var(--text-main, #0f172a);
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
  box-sizing: border-box;
}

.tgapos-dialog-input:focus {
  border-color: var(--color-primary-500, #06b6d4);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.18);
}

.tgapos-dialog-footer {
  padding: 14px 20px;
  background: var(--bg-subtle, #f8fafc);
  border-top: 1px solid var(--border-subtle, #f1f5f9);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.tgapos-btn {
  padding: 8px 18px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tgapos-btn-primary {
  background: var(--color-primary-500, #06b6d4);
  color: #ffffff;
}
.tgapos-btn-primary:hover {
  background: var(--color-primary-600, #0891b2);
}

.tgapos-btn-secondary {
  background: var(--bg-surface, #ffffff);
  border-color: var(--border-default, #cbd5e1);
  color: var(--text-main, #334155);
}
.tgapos-btn-secondary:hover {
  background: var(--bg-subtle, #f1f5f9);
}

.tgapos-btn-danger {
  background: #ef4444;
  color: #ffffff;
}
.tgapos-btn-danger:hover {
  background: #dc2626;
}

/* Toasts flotantes */
.tgapos-toast-container {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 100000;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.tgapos-toast {
  background: #0f172a;
  color: #ffffff;
  padding: 12px 18px;
  border-radius: 12px;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
  font-size: 0.85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 10px;
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.22s ease, transform 0.22s ease;
  pointer-events: auto;
  border-left: 4px solid var(--color-primary-500, #06b6d4);
  max-width: 380px;
}

.tgapos-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.tgapos-toast-success { border-left-color: #10b981; }
.tgapos-toast-warning { border-left-color: #f59e0b; }
.tgapos-toast-error   { border-left-color: #ef4444; }

/* Selector de Tipo de Comercio en el Wizard */
.wiz-commerce-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 14px 0;
}

.wiz-commerce-card {
  background: var(--bg-surface);
  border: 2px solid var(--border-default);
  border-radius: 14px;
  padding: 18px 14px;
  text-align: center;
  cursor: pointer;
  transition: all 0.18s ease;
}

.wiz-commerce-card:hover {
  border-color: var(--color-primary-500);
  transform: translateY(-2px);
  box-shadow: 0 8px 16px -4px rgba(6, 182, 212, 0.15);
}

.wiz-commerce-card.active {
  border-color: var(--color-primary-500);
  background: var(--color-primary-50, #ecfeff);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.25);
}

.tgapos-dialog-msg {
  white-space: pre-line;
  line-height: 1.6;
  color: var(--text-main, #1e293b);
  font-size: 0.9rem;
}





/* ============================================================
   DESIGN.MD TYPOGRAPHIC SPEC & SHADCN/UI ELEVATIONS
   ============================================================ */
h1, .tga-page-title, .modal-title {
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--text-heading);
}

.tga-nav-section-label,
.crumb-subheading,
.kpi-stat-label,
.tga-field-group label {
  font-size: 12px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--text-muted);
}

.kpi-stat-value {
  letter-spacing: -0.025em;
  font-weight: 600;
  color: var(--text-heading);
}

.plate-name {
  letter-spacing: -0.015em;
  font-weight: 600;
}

/* Focused input styling from DESIGN.md */
input:focus, select:focus, textarea:focus,
.admin-input-styled:focus, .admin-select-styled:focus {
  border-color: var(--color-primary-500) !important;
  box-shadow: 0 0 0 1px var(--color-primary-500) !important;
  outline: none !important;
}

/* Card hairline definition */
.plate-dish-card,
.tga-filter-card,
.admin-card-form,
.kpi-stat-card,
.cashflow-dashboard-card,
.table-responsive-wrap,
.modal-card {
  border: 1px solid var(--color-hairline) !important;
  box-shadow: var(--shadow-card) !important;
}

/* ============================================================
   TERMINAL ACTIVATION & SUSPENDED OVERLAYS (DESIGN.MD BLUEPRINT)
   ============================================================ */
.tga-terminal-screen {
  position: fixed;
  inset: 0;
  z-index: 99999;
  background: var(--color-canvas, #f5f5f5);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 20px;
  font-family: var(--font-sans, 'Geist', 'Inter', -apple-system, sans-serif);
}

.tga-terminal-card {
  width: 100%;
  max-width: 440px;
  background: var(--color-paper, #ffffff);
  border: 1px solid var(--color-hairline, #e5e5e5);
  border-radius: var(--radius-cards, 24px);
  box-shadow: var(--shadow-modal, 0 0 0 1px rgba(23, 23, 23, 0.08), 0 20px 25px -5px rgba(0, 0, 0, 0.06));
  padding: 40px 34px;
  text-align: center;
  color: var(--color-ink, #0a0a0a);
  animation: fadeIn 0.2s ease-out;
  box-sizing: border-box;
}

.tga-terminal-logo-wrap {
  margin: 0 auto 18px;
  display: flex;
  justify-content: center;
}

.tga-terminal-logo-wrap img {
  height: 52px;
  width: auto;
  object-fit: contain;
}

.tga-terminal-title {
  font-size: 1.45rem;
  font-weight: 600;
  margin-bottom: 8px;
  letter-spacing: -0.025em;
  color: var(--color-ink, #0a0a0a);
}

.tga-terminal-subtitle {
  font-size: 0.85rem;
  color: var(--color-mid-gray, #737373);
  margin-bottom: 28px;
  line-height: 1.45;
}

.tga-terminal-field {
  text-align: left;
  margin-bottom: 18px;
}

.tga-terminal-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--color-mid-gray, #737373);
  display: block;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.tga-terminal-input {
  width: 100%;
  background: var(--color-paper, #ffffff);
  border: 1px solid var(--color-hairline, #e5e5e5);
  border-radius: var(--radius-inputs, 18px);
  padding: 12px 16px;
  font-size: 0.95rem;
  font-weight: 600;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  color: var(--color-ink, #0a0a0a);
  outline: none;
  letter-spacing: 0.04em;
  transition: all 0.15s ease;
  box-sizing: border-box;
}

.tga-terminal-input:focus {
  border-color: var(--color-primary-500, #0a0a0a) !important;
  box-shadow: 0 0 0 1px var(--color-primary-500, #0a0a0a) !important;
}

.tga-terminal-btn-primary {
  width: 100%;
  background: var(--color-primary-500, #0a0a0a);
  color: #ffffff;
  font-weight: 600;
  font-size: 0.92rem;
  padding: 13px 20px;
  border-radius: var(--radius-buttons, 18px);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
  letter-spacing: -0.01em;
}

.tga-terminal-btn-primary:hover {
  filter: brightness(1.08);
  transform: translateY(-1px);
}

.tga-terminal-btn-primary:active {
  transform: translateY(0);
}

.tga-terminal-footer {
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px solid var(--color-hairline, #e5e5e5);
  font-size: 0.78rem;
  color: var(--color-mid-gray, #737373);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tga-terminal-footer a {
  color: var(--color-ink, #0a0a0a);
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.tga-terminal-footer a:hover {
  color: var(--color-primary-500, #0a0a0a);
  text-decoration: underline;
}

.tga-terminal-error {
  color: var(--color-ember, #e7000b);
  background: #fef2f2;
  border: 1px solid #fecaca;
  padding: 10px 14px;
  border-radius: var(--radius-inputs, 18px);
  font-size: 0.82rem;
  margin-bottom: 16px;
  text-align: left;
}

/* ============================================================
   PASSWORD TOGGLE BUTTON & MICRO-ANIMATIONS (UNIVERSAL POS)
   ============================================================ */
.password-input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
}

.password-input-wrapper input {
  width: 100%;
  padding-right: 44px !important;
}

.password-toggle-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: var(--color-mid-gray, #737373);
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm, 6px);
  transition: color 0.15s ease, transform 0.15s ease;
  z-index: 5;
}

.password-toggle-btn:hover {
  color: var(--color-ink, #0a0a0a);
}

.password-toggle-btn:active {
  transform: translateY(-50%) scale(0.9);
}

.password-toggle-btn.active {
  color: var(--color-primary-500, #0a0a0a);
}

@keyframes eyeSlashPulse {
  0% { transform: scale(0.72) rotate(-18deg); opacity: 0.3; }
  60% { transform: scale(1.18) rotate(6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

@keyframes eyeOpenPulse {
  0% { transform: scale(0.72) rotate(18deg); opacity: 0.3; }
  60% { transform: scale(1.18) rotate(-6deg); opacity: 1; }
  100% { transform: scale(1) rotate(0deg); opacity: 1; }
}

.password-toggle-btn svg.anim-toggle-show {
  animation: eyeSlashPulse 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.password-toggle-btn svg.anim-toggle-hide {
  animation: eyeOpenPulse 0.32s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

/* ============================================================
   ISOLACIÓN MODAL ESTRICTA Y TRANSICIÓN SIN FLICKER EN REFRESH
   ============================================================ */
.modal-overlay:not(.active) {
  display: none !important;
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden !important;
}

.modal-overlay.active {
  display: flex !important;
  opacity: 1 !important;
  pointer-events: auto !important;
  visibility: visible !important;
}

.modal-overlay .modal-card {
  transform: scale(0.985) translateY(4px);
  opacity: 0;
  transition: transform 0.18s cubic-bezier(0.16, 1, 0.3, 1),
              opacity 0.16s ease;
}

.modal-overlay.active .modal-card {
  transform: scale(1) translateY(0);
  opacity: 1;
}

/* ============================================================
   SKELETON SHIMMER LOADER SUAVE (IN-PLACE LOADING UX)
   ============================================================ */
@keyframes tgaSkeletonShimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* ============================================================
   ESTADO DE CARGA EN BOTONES (SPINNER ANIMADO SIN EMOJIS)
   ============================================================ */
.btn-loading,
button.is-loading,
.tga-btn-loading {
  position: relative !important;
  pointer-events: none !important;
  cursor: wait !important;
  opacity: 0.82 !important;
  user-select: none !important;
}

.btn-loading-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: tgaSpinBtn 0.65s linear infinite;
  vertical-align: middle;
  flex-shrink: 0;
  box-sizing: border-box;
}

@keyframes tgaSpinBtn {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.tga-skeleton-block {
  background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
  background-size: 200% 100%;
  animation: tgaSkeletonShimmer 1.4s infinite ease-in-out;
  border-radius: var(--radius-elements, 8px);
}

.tga-skeleton-card {
  background: #ffffff;
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-cards, 12px);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

/* Tarjeta Ejecutiva de Salud: ¿Cómo va mi negocio? */
.executive-pulse-card {
  background: #ffffff;
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: var(--radius-cards, 12px);
  padding: 18px 20px;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.04);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.impersonate-active-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fef3c7;
  color: #92400e;
  border: 1px solid #fcd34d;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(180, 83, 9, 0.1);
}

.impersonate-active-pill button {
  background: transparent;
  border: none;
  cursor: pointer;
  font-weight: 800;
  color: #b45309;
  padding: 0 2px;
  display: inline-flex;
  align-items: center;
}

.impersonate-active-pill button:hover {
  color: #78350f;
}

/* ============================================================
   SMOOTH VIEW CONTAINER TRANSITION & CHART ANIMATIONS
   ============================================================ */
@keyframes tgaViewFade {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

.tga-view-container {
  animation: tgaViewFade 0.16s ease-out;
}

/* Chart Drawing Animations */
@keyframes drawChartLine {
  0% { stroke-dashoffset: 1200; opacity: 0.4; }
  100% { stroke-dashoffset: 0; opacity: 1; }
}

@keyframes riseChartBar {
  0% { transform: scaleY(0); opacity: 0; }
  100% { transform: scaleY(1); opacity: 1; }
}

.tga-chart-animated-path {
  stroke-dasharray: 1200;
  stroke-dashoffset: 0;
  animation: drawChartLine 0.85s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.tga-chart-bar-animated {
  transform-origin: bottom;
  animation: riseChartBar 0.65s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* Number highlight glow when count-up completes */
.number-counting-active {
  display: inline-block;
  font-variant-numeric: tabular-nums;
  transition: color 0.2s ease;
}

/* ============================================================
   MODAL CONFIGURACIÓN DE SISTEMA (ESTRUCTURA MODULAR)
   ============================================================ */
.syscfg-tabs-nav {
  display: flex;
  gap: 8px;
  padding: 12px 20px;
  background: var(--color-surface-alt, #fafafa);
  border-bottom: 1px solid var(--color-hairline, #e5e5e5);
  overflow-x: auto;
}

.syscfg-tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: var(--radius-buttons, 18px);
  border: 1px solid var(--color-hairline, #e5e5e5);
  background: var(--color-paper, #ffffff);
  color: var(--color-mid-gray, #737373);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.syscfg-tab-btn:hover {
  color: var(--color-ink, #0a0a0a);
  border-color: var(--color-ink, #0a0a0a);
}

.syscfg-tab-btn.active {
  background: var(--color-primary-500, #0a0a0a);
  color: #ffffff;
  border-color: var(--color-primary-500, #0a0a0a);
  box-shadow: var(--shadow-sm);
}

.syscfg-tab-pane {
  display: none;
  padding: 24px 28px;
}

.syscfg-tab-pane.active {
  display: block;
  animation: tgaViewFade 0.2s ease-out;
}

.syscfg-footer-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--color-hairline, #e5e5e5);
}

.syscfg-danger-zone {
  border: 1px solid #fecaca;
  background: #fef2f2;
  border-radius: var(--radius-cards, 24px);
  padding: 24px;
  margin-top: 12px;
}

/* ============================================================ */
/* CONTENEDOR CON SCROLL FIJO INDEPENDIENTE PARA CAJA (8 REGISTROS) */
/* ============================================================ */
.caja-scroll-container {
  height: 380px !important;
  max-height: 380px !important;
  min-height: 380px !important;
  overflow-y: auto !important;
  overflow-x: auto !important;
  scrollbar-width: thin;
}

.caja-scroll-container::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}

.caja-scroll-container::-webkit-scrollbar-track {
  background: transparent;
}

.caja-scroll-container::-webkit-scrollbar-thumb {
  background: var(--border-default, #cbd5e1);
  border-radius: 4px;
}

/* ============================================================ */
/* LOGIN WALL DE ACCESO DE OPERADORES Y BLOQUEO DE TERMINAL     */
/* ============================================================ */
#tga-login-wall {
  position: fixed;
  inset: 0;
  background: #0f172a;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
  overflow: hidden;
}

/* Zero-FOUC: Control de visibilidad temprana antes de autenticación */
html.terminal-requiere-login #tga-login-wall {
  display: flex !important;
}

html.terminal-requiere-activacion #pantalla-activacion-terminal {
  display: flex !important;
}

html.terminal-requiere-login #tga-pos-app,
html.terminal-requiere-activacion #tga-pos-app {
  visibility: hidden !important;
  pointer-events: none !important;
  user-select: none !important;
}

.tga-login-wall-bg-video {
  position: absolute;
  top: 50%;
  left: 50%;
  min-width: 100%;
  min-height: 100%;
  width: auto;
  height: auto;
  transform: translate(-50%, -50%) scale(1.06);
  object-fit: cover;
  z-index: 0;
  pointer-events: none;
  filter: brightness(0.40) saturate(1.15) blur(4px);
}

.tga-login-wall-bg-overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(15, 23, 42, 0.45) 0%, rgba(15, 23, 42, 0.85) 100%);
  z-index: 1;
  pointer-events: none;
}

.tga-login-wall-card {
  position: relative;
  z-index: 2;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 24px;
  max-width: 420px;
  width: 100%;
  padding: 34px 30px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.2);
  text-align: center;
}

/* ============================================================ */
/* NUEVO LOGIN WALL SPLIT MODERNO (#50BDC6) & MARCA DE AGUA     */
/* ============================================================ */
.tga-login-screen {
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  z-index: 99999;
  background: #ffffff;
  display: none;
  align-items: stretch;
  justify-content: stretch;
  padding: 0;
  margin: 0;
  overflow: hidden;
  font-family: var(--font-sans, 'Geist', 'Inter', -apple-system, sans-serif);
}

.tga-login-split-card {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  min-height: 100vh;
  background: #ffffff;
  border-radius: 0;
  border: none;
  box-shadow: none;
  display: grid;
  grid-template-columns: 45% 55%;
  overflow: hidden;
  box-sizing: border-box;
}

.tga-login-form-col {
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: #f8fafc;
  width: 100%;
  margin: 0 auto;
  box-sizing: border-box;
}

.tga-login-brand-topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
  width: 100%;
  max-width: 480px;
}

.tga-login-topbar-logo {
  height: 32px;
  width: auto;
  object-fit: contain;
}

.tga-login-topbar-text {
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.tga-login-topbar-text strong {
  color: #50BDC6;
}

.tga-login-card-wrapper {
  background: #ffffff;
  border-radius: 28px;
  padding: 38px 40px;
  border: 1.5px solid #e2e8f0;
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.05);
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  transition: box-shadow 0.3s ease;
}

.tga-login-card-wrapper:hover {
  box-shadow: 0 20px 48px rgba(0, 0, 0, 0.08);
}

.tga-login-brand {
  margin-bottom: 20px;
}

.tga-login-logo-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 9999px;
}

.tga-login-logo-pill img {
  height: 22px;
  width: auto;
  object-fit: contain;
}

.tga-login-brand-text {
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: #0f172a;
}

.tga-login-brand-text strong {
  color: #50BDC6;
}

.tga-login-header {
  margin-bottom: 24px;
}

.tga-login-title {
  font-size: 1.85rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
  letter-spacing: -0.03em;
}

.tga-login-subtitle {
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0;
}

.tga-login-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.tga-login-field {
  text-align: left;
}

.tga-login-label-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 6px;
}

.tga-login-label {
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  display: block;
  margin-bottom: 6px;
}

.tga-login-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.tga-login-field-icon {
  position: absolute;
  left: 14px;
  width: 17px;
  height: 17px;
  color: #94a3b8;
  pointer-events: none;
}

.tga-login-input {
  width: 100%;
  height: 46px;
  padding: 10px 14px 10px 42px;
  border-radius: 12px;
  border: 1.5px solid #e2e8f0;
  font-size: 0.94rem;
  font-weight: 600;
  color: #0f172a;
  background: #f8fafc;
  transition: all 0.2s ease;
  outline: none;
  box-sizing: border-box;
}

.tga-login-input:focus {
  background: #ffffff;
  border-color: #50BDC6 !important;
  box-shadow: 0 0 0 3px rgba(80, 189, 198, 0.2) !important;
}

.tga-login-eye-btn {
  position: absolute;
  right: 10px;
  background: none;
  border: none;
  color: #94a3b8;
  cursor: pointer;
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
}

.tga-login-eye-btn:hover {
  color: #334155;
  background: #f1f5f9;
}

.tga-login-pill-submit {
  width: 100%;
  height: 48px;
  border-radius: 9999px;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.94rem;
  font-weight: 700;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
  transition: all 0.2s ease;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.25);
}

.tga-login-pill-submit:hover {
  background: #1e293b;
  transform: translateY(-1px);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.35);
}

.tga-login-pill-submit:active {
  transform: translateY(0);
}

.tga-login-link-btn {
  background: none;
  border: none;
  color: #50BDC6;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
  text-decoration: none;
  transition: color 0.15s ease;
}

.tga-login-link-btn:hover {
  color: #2ba5af;
  text-decoration: underline;
}

.tga-login-bold-link {
  font-weight: 700;
  margin-left: 6px;
}

.tga-login-footer-action {
  margin-top: 18px;
  text-align: center;
}

.tga-login-footer-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 24px;
  padding-top: 14px;
  border-top: 1px solid #f1f5f9;
  font-size: 0.76rem;
  color: #94a3b8;
}

.tga-login-footer-nav a {
  color: #64748b;
  text-decoration: none;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: color 0.15s ease;
}

.tga-login-footer-nav a:hover {
  color: #0f172a;
}

/* Columna Derecha con Degradado #50BDC6 */
.tga-login-visual-col {
  background: linear-gradient(135deg, #50BDC6 0%, #2ba5af 45%, #156d75 100%);
  position: relative;
  overflow: hidden;
  padding: 30px 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: #ffffff;
}

.tga-visual-glow-1 {
  position: absolute;
  top: -60px;
  right: -60px;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.22);
  filter: blur(40px);
  pointer-events: none;
}

.tga-visual-glow-2 {
  position: absolute;
  bottom: -80px;
  left: -60px;
  width: 280px;
  height: 280px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.2);
  filter: blur(50px);
  pointer-events: none;
}

.tga-visual-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
}

.tga-visual-top-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 5px 12px;
  border-radius: 9999px;
  font-size: 0.74rem;
  font-weight: 700;
  color: #ffffff;
  align-self: flex-start;
  margin-bottom: 24px;
}

.tga-visual-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 8px #34d399;
}

.tga-visual-card {
  background: rgba(255, 255, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.12);
  margin-bottom: 14px;
  transition: transform 0.3s ease;
}

@keyframes tgaFloatSlow1 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(-7px) rotate(0.3deg); }
}

@keyframes tgaFloatSlow2 {
  0%, 100% { transform: translateY(0px) rotate(0deg); }
  50% { transform: translateY(7px) rotate(-0.3deg); }
}

.tga-card-float-top {
  animation: tgaFloatSlow1 6.5s ease-in-out infinite;
}

.tga-card-float-bottom {
  animation: tgaFloatSlow2 7.5s ease-in-out infinite;
}

.tga-visual-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 6px;
}

.tga-visual-card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: rgba(255, 255, 255, 0.85);
  font-weight: 700;
  display: block;
}

.tga-visual-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: #ffffff;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.tga-visual-pill-trend {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(16, 185, 129, 0.25);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.4);
  padding: 3px 8px;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 700;
}

.tga-visual-card-desc {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0 0 10px 0;
}

.tga-visual-chart-wrap {
  width: 100%;
  height: 48px;
  overflow: hidden;
  position: relative;
}

.tga-visual-svg-chart {
  width: 100%;
  height: 100%;
}

@keyframes dashWave {
  0% { stroke-dashoffset: 400; }
  100% { stroke-dashoffset: 0; }
}

@keyframes pulseDot {
  0%, 100% { transform: scale(1); opacity: 1; filter: drop-shadow(0 0 4px #ffffff); }
  50% { transform: scale(1.4); opacity: 0.85; filter: drop-shadow(0 0 8px #50BDC6); }
}

.tga-animated-chart-line {
  stroke-dasharray: 400;
  stroke-dashoffset: 0;
  animation: dashWave 3.5s ease-in-out infinite alternate;
}

.tga-pulse-chart-dot {
  transform-origin: center;
  animation: pulseDot 2s ease-in-out infinite;
}

.tga-visual-micro-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
}

.tga-visual-micro-stats .lbl {
  display: block;
  font-size: 0.65rem;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  font-weight: 700;
}

.tga-visual-micro-stats .val {
  display: block;
  font-size: 0.86rem;
  font-weight: 800;
  color: #ffffff;
  margin-top: 2px;
}

.tga-visual-live-queue {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 8px;
}

.tga-queue-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  font-size: 0.74rem;
}

.tga-queue-item .q-mesa {
  font-weight: 800;
  color: #ffffff;
}

.tga-queue-item .q-plate {
  flex: 1;
  color: rgba(255, 255, 255, 0.9);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tga-queue-item .q-badge {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 9999px;
}

.tga-queue-item .q-badge.cooking {
  background: rgba(245, 158, 11, 0.35);
  color: #fef08a;
  border: 1px solid rgba(245, 158, 11, 0.45);
}

.tga-queue-item .q-badge.ready {
  background: rgba(16, 185, 129, 0.35);
  color: #a7f3d0;
  border: 1px solid rgba(16, 185, 129, 0.45);
}

@keyframes tgaFloatSlow3 {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-5px); }
}

.tga-card-float-print {
  animation: tgaFloatSlow3 8s ease-in-out infinite;
}

.tga-visual-icon-bubble {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
}

.tga-visual-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(16, 185, 129, 0.25);
  border: 1px solid rgba(16, 185, 129, 0.4);
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 9999px;
}

.tga-pulse-emerald {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #34d399;
}

.tga-visual-footer-text {
  margin-top: 14px;
}

.tga-visual-footer-text h3 {
  font-size: 1.25rem;
  font-weight: 800;
  color: #ffffff;
  margin: 0 0 4px 0;
  letter-spacing: -0.02em;
}

.tga-visual-footer-text p {
  font-size: 0.82rem;
  color: rgba(255, 255, 255, 0.85);
  margin: 0;
  line-height: 1.4;
}

@media (max-width: 860px) {
  .tga-login-screen {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }
  .tga-login-split-card {
    grid-template-columns: 1fr;
    max-width: 100vw;
    width: 100vw;
    min-height: 100vh;
    height: auto !important;
  }
  .tga-login-visual-col {
    display: none;
  }
  .tga-login-form-col {
    padding: 34px 20px;
    max-width: 100%;
    min-height: 100vh;
    box-sizing: border-box;
  }
  .tga-login-card-wrapper {
    padding: 28px 20px;
    border-radius: 20px;
    width: 100%;
    max-width: 440px;
  }
}

/* ============================================================ */
/* MARCA DE AGUA DEL LOGO DEL COMERCIO EN FONDO Y MODALES       */
/* ============================================================ */
#main-split-layout {
  position: relative;
}

#main-split-layout::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--business-logo-watermark, none);
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(440px, 36vw) auto;
  opacity: 0.09;
  z-index: 0;
  transition: opacity 0.3s ease;
}

.modal-card, .modal-sheet {
  position: relative;
}

.modal-card::before, .modal-sheet::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: var(--business-logo-watermark, none);
  background-repeat: no-repeat;
  background-position: center;
  background-size: min(260px, 48%) auto;
  opacity: 0.08;
  z-index: 0;
  border-radius: inherit;
  transition: opacity 0.3s ease;
}

.modal-card > *, .modal-sheet > * {
  position: relative;
  z-index: 1;
}

.pos-body-split {
  position: relative;
}

.tga-pos-watermark {
  display: none !important;
}

/* Botón rápido de salida en el sidebar */
.tga-sidebar-logout-btn:hover {
  background: var(--color-primary-50, #f0fdfa) !important;
  border-color: var(--color-primary-500, #50BDC6) !important;
  transform: scale(1.05);
}

/* ============================================================
   ACCESIBILIDAD Y NAVEGACIÓN UNIVERSAL (WCAG 2.1 AA)
   ============================================================ */

/* 1. Indicador de foco visible de alto contraste */
:focus-visible {
  outline: 2px solid var(--color-primary-500, #06b6d4) !important;
  outline-offset: 2px !important;
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--color-primary-500, #06b6d4) !important;
  outline-offset: 2px !important;
}

/* 2. Banner de consentimiento de cookies / almacenamiento local */
.cookie-banner {
  animation: slideUpCookie 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes slideUpCookie {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

/* ============================================================
   PANTALLA DE CARGA DE TRANSICIÓN DE OPERADOR & SCROLL COMPROBANTES
   ============================================================ */
.operator-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.18s ease;
}

.operator-transition-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  padding: 30px;
}

.operator-transition-logo {
  height: 48px;
  width: auto;
  max-width: 180px;
  object-fit: contain;
  margin-bottom: 2px;
}

.operator-transition-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(15, 23, 42, 0.1);
  border-top-color: #0a0a0a;
  border-radius: 50%;
  animation: spin 0.65s linear infinite;
}

.operator-transition-text {
  font-size: 1.05rem;
  font-weight: 800;
  color: #0a0a0a;
}

.operator-transition-sub {
  font-size: 0.8rem;
  font-weight: 600;
  color: #64748b;
}

/* Scroll a partir de 6 registros en comprobantes emitidos */
.table-scroll-comprobantes {
  max-height: 285px !important;
  overflow-y: auto !important;
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
}

.table-scroll-comprobantes::-webkit-scrollbar {
  width: 6px;
}

.table-scroll-comprobantes::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 4px;
}

/* Tarjetas de Pedidos Para Llevar en Plano de Mesas */
.plate-dish-card.takeout-card {
  border-color: rgba(99, 102, 241, 0.35);
  background: rgba(99, 102, 241, 0.03);
}

.plate-dish-card.takeout-card:hover {
  border-color: #6366f1;
  box-shadow: 0 4px 14px rgba(99, 102, 241, 0.12);
}

/* ==================== Historial de ventas (cajero, admin y gerente) ==================== */
.hist-campo { display: flex; flex-direction: column; gap: 4px; font-size: 0.74rem; font-weight: 700; color: var(--text-muted); }
.hist-campo .admin-input-styled { min-width: 140px; }
.hist-estado { display: inline-block; padding: 2px 8px; border-radius: 6px; font-size: 0.72rem; font-weight: 800; background: #dcfce7; color: #15803d; text-transform: capitalize; }
.hist-estado.anulada { background: #fee2e2; color: #991b1b; }
.hist-ventas .foh-mini-btn { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; font-size: 0.74rem; }
.hist-ventas .foh-mini-btn i, .hist-ventas .foh-mini-btn svg { width: 13px; height: 13px; }

/* Comercio sin facturación electrónica: sin Factura 01, cédula de receptor ni opciones de Hacienda */
.sin-factura-electronica .solo-con-fe { display: none !important; }

/* ==================== Movimiento suave entre vistas y modales ====================
   Entradas de 160-220 ms solo con opacidad y un desplazamiento leve (no recalculan el layout).
   Se usan @keyframes porque los modales pasan de display:none a flex, y una transición no corre ahí.
   Con "reducir movimiento" del sistema no se anima nada. */
@keyframes tgaFondoEntra { from { opacity: 0; } to { opacity: 1; } }
@keyframes tgaTarjetaEntra { from { opacity: 0; transform: translateY(10px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes tgaVistaEntra { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes tgaContenidoListo { from { opacity: 0.25; } to { opacity: 1; } }

@media (prefers-reduced-motion: no-preference) {
  .modal-overlay.active { animation: tgaFondoEntra 0.16s ease-out both; }
  .modal-overlay.active .modal-card { animation: tgaTarjetaEntra 0.22s cubic-bezier(0.16, 1, 0.3, 1) both; }
  /* Al cambiar de vista: el skeleton o el contenido entra con un fundido corto */
  #mesas-plates-grid.vista-entrando > * { animation: tgaVistaEntra 0.2s ease-out both; }
  /* Cuando el contenido real reemplaza al skeleton */
  #mesas-plates-grid.contenido-listo > * { animation: tgaContenidoListo 0.22s ease-out both; }
}
@media (prefers-reduced-motion: reduce) {
  .modal-overlay .modal-card { transition: none !important; transform: none !important; opacity: 1 !important; }
  .tga-skeleton-block { animation: none !important; }
}

/* Skeleton con los colores del tema (claro y oscuro) */
.tga-skeleton-block {
  background: linear-gradient(90deg, var(--bg-subtle, #f1f5f9) 25%, var(--border-default, #e2e8f0) 50%, var(--bg-subtle, #f1f5f9) 75%);
  background-size: 200% 100%;
}
.tga-skeleton-card { background: var(--bg-surface, #ffffff); border-color: var(--border-default, #e2e8f0); }

/* Indicador de conexión de la barra superior (reemplaza el texto "En línea") */
.tga-red-ind { position: relative; display: inline-grid; place-items: center; flex-shrink: 0; width: 34px; height: 34px; padding: 0;
  border-radius: 50%; border: 1px solid var(--border-default, #e5e5e5); background: var(--bg-surface, #ffffff); --red-c: #10b981; color: var(--red-c); cursor: default; font: inherit; }
.tga-red-ind svg { width: 18px; height: 18px; }
.tga-red-ind:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.tga-red-ind .num { position: absolute; top: -4px; right: -5px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px;
  background: var(--red-c); color: #ffffff; font-size: 0.62rem; font-weight: 700; line-height: 17px; text-align: center; box-shadow: 0 0 0 2px var(--bg-surface, #ffffff); }
.tga-red-ind .num:empty { display: none; }
.tga-red-ind.tga-red-enviando { --red-c: #059669; }
.tga-red-ind.tga-red-sin-red { --red-c: #d97706; }
.tga-red-ind.tga-red-con-error { --red-c: #dc2626; }
.tga-red-ind.tga-red-enviando svg { animation: tga-red-sube 1.2s ease-in-out infinite; }
@keyframes tga-red-sube { 50% { transform: translateY(-2px); } }
@media (prefers-reduced-motion: reduce) { .tga-red-ind svg { animation: none !important; } }
/* En teléfonos la barra no tiene espacio: ahí se usa el indicador compacto de modo-offline.js */
@media (max-width: 600px) { #network-sync-badge { display: none !important; } }

/* ==================== REDISEÑO MODAL DE COBRO CON PAD NUMÉRICO ==================== */
.modal-cobro-card {
  max-width: 980px !important;
  width: 95vw !important;
  max-height: 94vh !important;
  display: flex !important;
  flex-direction: column !important;
  border-radius: 20px !important;
  overflow: hidden !important;
}

.cobro-layout-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.95fr;
  gap: 22px;
  align-items: start;
}

@media (max-width: 820px) {
  .cobro-layout-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .modal-cobro-card {
    max-width: 100% !important;
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0 !important;
  }
}

@media (max-width: 600px) {
  #modal-cobro {
    padding: 0 !important;
  }
  #modal-cobro .modal-cobro-card {
    width: 100vw !important;
    max-width: 100vw !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 !important;
    border: none !important;
    margin: 0 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  #modal-cobro .modal-header {
    padding: 10px 14px !important;
    flex-shrink: 0 !important;
  }
  #modal-cobro .modal-header .modal-title {
    font-size: 1.02rem !important;
  }
  #modal-cobro .modal-body {
    padding: 12px 14px 28px !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
  }
  #modal-cobro .cobro-layout-grid {
    grid-template-columns: 1fr !important;
    gap: 12px !important;
    width: 100% !important;
    max-width: 100% !important;
  }
  #modal-cobro .cobro-col-left,
  #modal-cobro .cobro-col-right {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px !important;
  }
  #modal-cobro .cobro-division-tabs {
    grid-template-columns: 1fr 1fr !important;
    gap: 4px !important;
    padding: 3px !important;
  }
  #modal-cobro .cobro-div-tab {
    font-size: 0.72rem !important;
    padding: 2px 4px !important;
    height: 36px !important;
    white-space: normal !important;
    text-align: center !important;
    line-height: 1.15 !important;
  }
  #modal-cobro .cobro-div-tab i,
  #modal-cobro .cobro-div-tab svg {
    width: 14px !important;
    height: 14px !important;
    flex-shrink: 0 !important;
  }
  #modal-cobro .cobro-total-highlight-card {
    padding: 10px 12px !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }
  #modal-cobro #cobro-monto-total {
    font-size: 1.65rem !important;
  }
  #modal-cobro #cobro-monto-secundario {
    font-size: 0.85rem !important;
  }
  #modal-cobro .cash-quick-denominations {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 6px !important;
  }
  #modal-cobro .denom-btn {
    padding: 8px 4px !important;
    font-size: 0.76rem !important;
    font-weight: 700 !important;
    white-space: nowrap !important;
    text-align: center !important;
  }
  #modal-cobro .cobro-numpad-grid {
    gap: 6px !important;
  }
  #modal-cobro .cobro-numpad-btn {
    height: 44px !important;
    font-size: 1.15rem !important;
  }
  #modal-cobro .admin-form-grid {
    gap: 8px !important;
  }
}

.cobro-col-left {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.cobro-col-right {
  display: flex;
  flex-direction: column;
  gap: 12px;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: 16px;
  padding: 16px;
}

.cobro-total-highlight-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-active-nav, #f0f9ff);
  border: 1.5px solid var(--color-primary-200, #bae6fd);
  padding: 14px 18px;
  border-radius: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
}

.cobro-display-box {
  background: var(--bg-surface, #ffffff);
  border: 1.5px solid var(--border-default, #e2e8f0);
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.03);
  transition: border-color 0.15s ease;
}

.cobro-display-box:focus-within {
  border-color: var(--color-primary-500, #0ea5e9);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

.cobro-input-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.cobro-curr-symbol {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--color-primary-600, #0284c7);
  user-select: none;
  line-height: 1;
}

.cobro-input-display {
  flex: 1;
  border: none !important;
  outline: none !important;
  background: transparent !important;
  font-size: 1.65rem !important;
  font-weight: 800 !important;
  color: var(--text-main, #0f172a) !important;
  padding: 0 !important;
  font-variant-numeric: tabular-nums;
  min-width: 0;
  line-height: 1.2;
}

.cobro-pill-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  font-size: 0.72rem;
  font-weight: 800;
  border-radius: 6px;
  background: var(--color-primary-50, #f0f9ff);
  color: var(--color-primary-600, #0284c7);
  border: 1px solid var(--color-primary-200, #bae6fd);
  cursor: pointer;
  transition: all 0.15s ease;
}

.cobro-pill-btn:hover {
  background: var(--color-primary-100, #e0f2fe);
}

.cobro-clear-input-btn {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: var(--bg-subtle, #f1f5f9);
  color: var(--text-muted, #64748b);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.15s ease;
  flex-shrink: 0;
}

.cobro-clear-input-btn:hover {
  background: #fee2e2;
  color: #ef4444;
}

.cobro-numpad-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.cobro-numpad-btn {
  height: 48px;
  border-radius: 10px;
  border: 1.5px solid var(--border-default, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  color: var(--text-main, #0f172a);
  font-size: 1.25rem;
  font-weight: 800;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.1s ease;
  user-select: none;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.cobro-numpad-btn:hover {
  background: var(--bg-active-nav, #f8fafc);
  border-color: var(--color-primary-400, #38bdf8);
}

.cobro-numpad-btn:active {
  transform: scale(0.96);
  background: var(--color-primary-100, #e0f2fe);
}

.cobro-numpad-btn.btn-action-clear {
  color: #ef4444;
  background: #fef2f2;
  border-color: #fecaca;
  font-size: 1.1rem;
}

.cobro-numpad-btn.btn-action-clear:hover {
  background: #fee2e2;
}

.cobro-numpad-btn.btn-action-back {
  color: #64748b;
  background: #f8fafc;
}

.cobro-numpad-btn.btn-action-exacto {
  color: var(--color-primary-700, #0369a1);
  background: var(--color-primary-50, #f0f9ff);
  border-color: var(--color-primary-300, #7dd3fc);
  font-size: 0.88rem;
  font-weight: 800;
  display: inline-flex;
  gap: 4px;
}

.cobro-numpad-btn.btn-action-exacto:hover {
  background: var(--color-primary-100, #e0f2fe);
}

.cobro-vuelto-card {
  background: #f0fdf4;
  border: 1.5px solid #bbf7d0;
  border-radius: 12px;
  padding: 10px 14px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
  transition: border-color 0.2s ease;
}

.cobro-btn-finalizar {
  width: 100% !important;
  justify-content: center !important;
  padding: 14px !important;
  font-size: 0.98rem !important;
  font-weight: 800 !important;
  border-radius: 12px !important;
  box-shadow: 0 4px 14px rgba(14, 165, 233, 0.35) !important;
  margin-top: 4px;
}

/* ==================== DIVISION DE CUENTA Y PAGO MIXTO EN MODAL COBRO ==================== */
.cobro-division-toggle-container {
  width: 100%;
  margin-bottom: 2px;
}

.cobro-division-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: var(--bg-subtle, #f1f5f9);
  padding: 4px;
  border-radius: 12px;
  border: 1px solid var(--border-default, #e2e8f0);
}

.cobro-div-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 36px;
  padding: 0 10px;
  border: none;
  border-radius: 9px;
  background: transparent;
  color: var(--text-secondary, #64748b);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.cobro-div-tab:hover {
  color: var(--text-main, #0f172a);
}

.cobro-div-tab.active {
  background: var(--bg-surface, #ffffff);
  color: var(--color-primary-600, #0284c7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
}

.cobro-items-div-card {
  background: var(--bg-surface, #ffffff);
  border: 1.5px solid var(--color-primary-200, #bae6fd);
  border-radius: 14px;
  padding: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cobro-items-div-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cobro-items-div-scroll {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.cobro-items-div-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border-default, #e2e8f0);
  background: var(--bg-surface, #ffffff);
  transition: all 0.12s ease;
}

.cobro-items-div-row.selected {
  border-color: var(--color-primary-500);
  background: var(--bg-active-nav, rgba(6, 182, 212, 0.05));
}

.cobro-items-div-row .item-info {
  flex: 1;
  min-width: 0;
}

.cobro-items-div-row .item-nombre {
  font-weight: 800;
  font-size: 0.82rem;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cobro-items-div-row .item-meta {
  font-size: 0.7rem;
  color: var(--text-muted);
}

.cobro-items-div-row .item-stepper {
  display: flex;
  align-items: center;
  gap: 6px;
}

.cobro-items-div-row .item-monto {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text-main);
  min-width: 68px;
  text-align: right;
  white-space: nowrap;
}

.cobro-items-div-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 6px;
  border-top: 1px dashed var(--border-default, #e2e8f0);
}

/* Estilos de Pago Mixto */
#btn-pago-mixto {
  grid-column: 1 / -1;
  background: linear-gradient(135deg, var(--bg-surface, #ffffff) 0%, var(--bg-active-nav, #f0fdf4) 100%);
  border: 1.5px dashed var(--color-primary-400, #38bdf8);
}

#btn-pago-mixto.active {
  border-style: solid;
  border-color: var(--color-primary-500);
  background: var(--bg-active-nav);
  color: var(--color-primary-600);
}

.mixto-header-badge {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-default, #e2e8f0);
  padding: 10px 12px;
  border-radius: 12px;
}

.mixto-icon-box {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--color-primary-100, #e0f2fe);
  color: var(--color-primary-600, #0284c7);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.mixto-row-card {
  background: var(--bg-surface, #ffffff);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: 12px;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  transition: border-color 0.15s ease;
}

.mixto-row-card:focus-within {
  border-color: var(--color-primary-500);
}

.mixto-row-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mixto-row-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.76rem;
  font-weight: 800;
  color: var(--text-main);
  user-select: none;
}

.mixto-restante-btn {
  font-size: 0.68rem;
  font-weight: 800;
  color: var(--color-primary-600, #0284c7);
  background: var(--color-primary-50, #f0f9ff);
  border: 1px solid var(--color-primary-200, #bae6fd);
  border-radius: 6px;
  padding: 2px 7px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.mixto-restante-btn:hover {
  background: var(--color-primary-100, #e0f2fe);
}

.mixto-input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg-subtle, #f8fafc);
  border: 1px solid var(--border-default, #e2e8f0);
  border-radius: 8px;
  padding: 0 8px;
  transition: border-color 0.15s ease;
}

.mixto-input-wrap:focus-within {
  border-color: var(--color-primary-500);
  background: var(--bg-surface, #ffffff);
}

.mixto-curr {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-muted);
  user-select: none;
}

.mixto-monto-input {
  border: none !important;
  background: transparent !important;
  font-size: 0.95rem !important;
  font-weight: 800 !important;
  padding: 6px 4px !important;
  width: 100%;
}

.mixto-monto-input:focus {
  outline: none !important;
  box-shadow: none !important;
}

.mixto-status-bar {
  background: var(--bg-surface, #ffffff);
  border: 1.5px solid var(--border-default, #e2e8f0);
  border-radius: 12px;
  padding: 10px 14px;
}

/* ==================== Z-INDEX GARANTIZADO MODALES LOGIN WALL ==================== */
#modal-registro-negocio,
#modal-recuperar-clave {
  z-index: 100005 !important;
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
}

#modal-registro-negocio.active,
#modal-recuperar-clave.active {
  display: flex !important;
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  z-index: 100005 !important;
  align-items: center !important;
  justify-content: center !important;
}

/* ==================== RESPONSIVE DESIGN: MODALES DE REGISTRO Y RECUPERACIÓN ==================== */
.tga-modal-responsive-card {
  width: min(94vw, 500px) !important;
  max-height: min(92dvh, 88vh) !important;
  overflow-y: auto !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  border-radius: 22px !important;
  box-shadow: 0 25px 60px -10px rgba(15, 23, 42, 0.45) !important;
}

.tga-modal-header {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  position: relative;
  color: #fff;
  flex-shrink: 0;
}

.tga-modal-body {
  padding: 20px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: var(--bg-surface, #ffffff);
}

.tga-responsive-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.tga-demo-buttons-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

@media (max-width: 560px) {
  .tga-modal-responsive-card {
    width: 96vw !important;
    max-height: 94dvh !important;
    border-radius: 18px !important;
  }

  .tga-modal-header {
    padding: 16px 16px 14px !important;
  }

  .tga-modal-header h2 {
    font-size: 1.1rem !important;
  }

  .tga-modal-header p {
    font-size: 0.76rem !important;
  }

  .tga-modal-body {
    padding: 15px !important;
    gap: 13px !important;
  }

  .tga-responsive-grid-2 {
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .tga-demo-buttons-grid {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .tga-modal-close-touch {
    width: 36px !important;
    height: 36px !important;
    top: 12px !important;
    right: 12px !important;
    font-size: 1.3rem !important;
  }
}

/* ==================== ESTILOS PULL-TO-REFRESH UNIVERSAL ==================== */
.tga-ptr-indicator {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translate(-50%, -80px);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 20px;
  border-radius: 9999px;
  background: rgba(15, 23, 42, 0.94);
  color: #ffffff;
  border: 1.5px solid rgba(255, 255, 255, 0.22);
  box-shadow: 0 16px 36px rgba(0, 0, 0, 0.38), 0 0 0 1px rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  opacity: 0;
  pointer-events: none;
  z-index: 100010 !important; /* Siempre por encima del Login Wall (99999) y Modales (100005) */
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.tga-ptr-indicator.tga-ptr-tracking {
  transition: none;
}

.tga-ptr-icon-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
}

.tga-ptr-svg {
  width: 19px;
  height: 19px;
  color: #06b6d4;
  transition: transform 0.05s linear;
}

.tga-ptr-indicator.tga-ptr-ready {
  border-color: rgba(6, 182, 212, 0.7);
  box-shadow: 0 16px 36px rgba(6, 182, 212, 0.4), 0 0 0 1px rgba(6, 182, 212, 0.3);
}

.tga-ptr-indicator.tga-ptr-refreshing .tga-ptr-svg {
  animation: tgaPtrSpin 0.7s linear infinite !important;
}

@keyframes tgaPtrSpin {
  100% { transform: rotate(360deg); }
}

/* ==================== BARRA RÁPIDA DE COMANDERO Y MODO VISTA COMPACTA ==================== */
.comandero-fast-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.comandero-search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-buttons, 8px);
  padding: 0 10px;
  height: 36px;
  min-width: 250px;
  max-width: 360px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.comandero-search-input-wrap:focus-within {
  border-color: var(--color-primary-500);
  box-shadow: 0 0 0 3px rgba(6, 182, 212, 0.15);
}

.comandero-search-input-wrap input {
  border: none;
  outline: none;
  background: transparent;
  width: 100%;
  font-size: 0.84rem;
  color: var(--text-main);
  padding: 0 6px;
}

.comandero-search-input-wrap input::placeholder {
  color: var(--text-muted);
}

.btn-clear-search-cmd {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.15rem;
  line-height: 1;
  cursor: pointer;
  padding: 2px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
}

.btn-clear-search-cmd:hover {
  color: var(--color-error, #ef4444);
}

.comandero-view-switch {
  display: inline-flex;
  background: var(--bg-subtle, rgba(0,0,0,0.04));
  border: 1px solid var(--border-default);
  border-radius: var(--radius-buttons, 8px);
  padding: 2px;
  gap: 2px;
}

.btn-view-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 10px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-view-toggle.active {
  background: var(--bg-surface);
  color: var(--color-primary-500);
  box-shadow: 0 1px 4px rgba(0,0,0,0.08);
}

/* Grilla Compacta para Saloneros */
.porcelain-plates-grid.vista-compacta {
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 8px;
}

@container workspace (max-width: 540px) {
  .porcelain-plates-grid.vista-compacta {
    grid-template-columns: 1fr;
    gap: 6px;
  }
}

.plate-dish-card.plate-dish-compact {
  min-height: 68px;
  padding: 8px 12px;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  position: relative;
  border-radius: 10px;
}

.plate-dish-card.plate-dish-compact .compact-card-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.plate-dish-card.plate-dish-compact .compact-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
}

.plate-dish-card.plate-dish-compact .compact-plate-name {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.plate-dish-card.plate-dish-compact .compact-plate-price {
  font-size: 0.88rem;
  font-weight: 900;
  color: var(--color-primary-500);
  white-space: nowrap;
}

.plate-dish-card.plate-dish-compact .compact-card-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.compact-code-pill {
  font-size: 0.68rem;
  font-family: monospace;
  font-weight: 700;
  color: var(--text-muted);
  background: var(--bg-subtle);
  padding: 1px 5px;
  border-radius: 4px;
}

.compact-stock-indicator {
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-muted);
}

.compact-stock-indicator.sin-stock {
  color: #ef4444;
  font-weight: 800;
}

.compact-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--bg-subtle, rgba(0,0,0,0.04));
  border: 1px solid var(--border-default);
  color: var(--color-primary-500);
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.12s ease;
  pointer-events: none;
}

.plate-dish-card.plate-dish-compact:hover .compact-add-btn {
  background: var(--color-primary-500);
  color: #ffffff;
  border-color: var(--color-primary-500);
  transform: scale(1.06);
}

.plate-dish-card.plate-dish-compact:active {
  transform: scale(0.98);
}

/* Badge de cantidad activa en el ticket */
.plate-ticket-qty-badge {
  position: absolute;
  top: -6px;
  left: -6px;
  background: var(--color-primary-500, #06b6d4);
  color: #ffffff;
  font-size: 0.74rem;
  font-weight: 900;
  min-width: 22px;
  height: 22px;
  padding: 0 5px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(6, 182, 212, 0.45);
  border: 2px solid var(--bg-surface);
  z-index: 2;
  animation: tgaBadgePop 0.18s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.plate-dish-card.plate-in-ticket {
  border-color: var(--color-primary-500);
  background: var(--bg-active-nav, rgba(6, 182, 212, 0.04));
}

@keyframes tgaBadgePop {
  0% { transform: scale(0.6); }
  60% { transform: scale(1.25); }
  100% { transform: scale(1); }
}

/* Estilo destacado de la pestaña ⭐ Más Pedidos */
.category-oval-tab[data-cat-id="populares"] {
  border-color: #f59e0b;
  color: #d97706;
  font-weight: 800;
}

.category-oval-tab[data-cat-id="populares"].active {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  color: #ffffff !important;
  border-color: #d97706 !important;
}

/* ==================== ACCESO: SOLICITUD DE CUENTA Y RESTABLECER CLAVE ==================== */
/* Misma familia visual que la tarjeta de inicio de sesión: blanca, redondeada, botón principal oscuro. */
.acc-overlay {
  overflow-y: auto;
  align-items: flex-start !important;
  padding: 16px;
}

.acc-card {
  position: relative;
  width: min(100%, 440px);
  margin: auto;
  padding: 32px 32px 28px;
  background: #ffffff;
  color: #0f172a;
  border-radius: 24px;
  box-shadow: 0 24px 60px -12px rgba(15, 23, 42, 0.45);
  box-sizing: border-box;
}

.acc-card-ancha {
  width: min(100%, 580px);
}

.acc-card [hidden] {
  display: none !important;
}

.acc-cerrar {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 50%;
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.acc-cerrar:hover {
  background: #e2e8f0;
  color: #0f172a;
}

.acc-cerrar svg,
.acc-cerrar i {
  width: 16px;
  height: 16px;
}

.acc-cerrar:focus-visible,
.acc-btn-secundario:focus-visible,
.acc-card .tga-login-pill-submit:focus-visible,
.acc-card .tga-login-link-btn:focus-visible,
.acc-card a:focus-visible {
  outline: 3px solid rgba(80, 189, 198, 0.55);
  outline-offset: 2px;
}

.acc-encabezado {
  margin-bottom: 20px;
  padding-right: 40px;
}

.acc-titulo {
  margin: 0;
  font-size: 1.5rem;
  font-weight: 800;
  line-height: 1.2;
  letter-spacing: -0.025em;
  color: #0f172a;
}

.acc-subtitulo {
  margin: 8px 0 0;
  font-size: 0.9rem;
  line-height: 1.5;
  color: #64748b;
}

.acc-subtitulo strong {
  color: #0f172a;
  font-weight: 700;
}

.acc-paso > .acc-subtitulo {
  margin: 0 0 18px;
}

.acc-form {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.acc-form .tga-login-pill-submit {
  margin-top: 4px;
}

.acc-card .tga-login-pill-submit:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.acc-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

/* Pasos del restablecimiento: una barra por paso, la actual en oscuro y las hechas en el color de marca */
.acc-pasos {
  list-style: none;
  display: flex;
  gap: 8px;
  margin: 18px -40px 0 0;
  padding: 0;
}

.acc-pasos li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  padding-top: 10px;
  border-top: 3px solid #e2e8f0;
  font-size: 0.78rem;
  font-weight: 600;
  color: #94a3b8;
  white-space: nowrap;
}

.acc-pasos li span {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  font-size: 0.72rem;
  font-weight: 700;
}

.acc-pasos li.activo {
  border-top-color: #0f172a;
  color: #0f172a;
}

.acc-pasos li.activo span {
  background: #0f172a;
  color: #ffffff;
}

.acc-pasos li.hecho {
  border-top-color: #50BDC6;
  color: #0e7490;
}

.acc-pasos li.hecho span {
  background: #cdeff2;
  color: #0e7490;
}

/* Código de 6 dígitos */
.acc-card .acc-otp {
  height: 60px;
  padding: 10px 6px 10px 0.5em;
  text-align: center;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: 0.5em;
  font-variant-numeric: tabular-nums;
}

.acc-card .acc-otp::placeholder {
  color: #cbd5e1;
}

.acc-error {
  padding: 10px 14px;
  border: 1px solid #fecaca;
  border-radius: 12px;
  background: #fef2f2;
  color: #991b1b;
  font-size: 0.85rem;
  line-height: 1.45;
}

.acc-aviso {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid #bae6fd;
  border-radius: 12px;
  background: #f0f9ff;
  color: #075985;
  font-size: 0.85rem;
}

.acc-aviso strong {
  letter-spacing: 0.12em;
}

.acc-ayuda {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #64748b;
}

.acc-enlaces {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
}

.acc-card .tga-login-link-btn {
  color: #0e7490;
  font-size: 0.84rem;
}

.acc-card .tga-login-link-btn:disabled {
  color: #94a3b8;
  cursor: default;
  text-decoration: none;
}

.acc-nota-pie {
  margin: 18px 0 0;
  padding-top: 16px;
  border-top: 1px solid #e2e8f0;
  font-size: 0.84rem;
  color: #64748b;
  text-align: center;
}

.acc-nota-pie a,
.acc-legal a {
  color: #0e7490;
  font-weight: 600;
  text-decoration: none;
}

.acc-nota-pie a:hover,
.acc-legal a:hover {
  text-decoration: underline;
}

/* Opciones tipo tarjeta (tipo de negocio y plan) */
.acc-grupo {
  margin: 0;
  padding: 0;
  border: none;
  min-width: 0;
}

.acc-grupo legend {
  padding: 0;
}

.acc-opciones {
  display: grid;
  gap: 10px;
}

.acc-opciones-2 {
  grid-template-columns: 1fr 1fr;
}

.acc-opciones-3 {
  grid-template-columns: repeat(3, 1fr);
}

.acc-opcion {
  position: relative;
  display: block;
  cursor: pointer;
}

.acc-opcion input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.acc-opcion-caja {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  padding: 12px 14px;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  background: #f8fafc;
  box-sizing: border-box;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
}

.acc-opcion-caja > i,
.acc-opcion-caja > svg {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #64748b;
}

.acc-opcion-caja strong {
  display: block;
  font-size: 0.9rem;
  font-weight: 700;
  color: #0f172a;
}

.acc-opcion-caja small {
  display: block;
  margin-top: 1px;
  font-size: 0.76rem;
  color: #64748b;
}

.acc-opcion-plan {
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
}

.acc-precio {
  font-size: 0.98rem;
  font-weight: 800;
  color: #0f172a;
  font-variant-numeric: tabular-nums;
}

.acc-opcion-caja .acc-precio small {
  display: inline;
  margin: 0 0 0 1px;
  font-size: 0.74rem;
  font-weight: 600;
}

.acc-etiqueta {
  margin-top: 4px;
  font-size: 0.72rem;
  font-style: normal;
  font-weight: 700;
  color: #0e7490;
}

.acc-opcion:hover .acc-opcion-caja {
  border-color: #cbd5e1;
}

.acc-opcion input:checked + .acc-opcion-caja {
  border-color: #0f172a;
  background: #ffffff;
  box-shadow: 0 0 0 1px #0f172a;
}

.acc-opcion input:checked + .acc-opcion-caja > i,
.acc-opcion input:checked + .acc-opcion-caja > svg {
  color: #0f172a;
}

.acc-opcion input:focus-visible + .acc-opcion-caja {
  outline: 3px solid rgba(80, 189, 198, 0.55);
  outline-offset: 2px;
}

.acc-trampa {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.acc-btn-secundario {
  width: 100%;
  height: 46px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1.5px solid #e2e8f0;
  border-radius: 9999px;
  background: #ffffff;
  color: #0f172a;
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  margin-top: -4px;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.acc-btn-secundario:hover {
  border-color: #cbd5e1;
  background: #f8fafc;
}

.acc-btn-secundario i,
.acc-btn-secundario svg {
  width: 18px;
  height: 18px;
  color: #16a34a;
}

.acc-legal {
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.5;
  color: #64748b;
  text-align: center;
}

.acc-exito {
  text-align: center;
  padding-top: 8px;
}

.acc-exito .acc-subtitulo {
  margin: 8px auto 24px;
  max-width: 36ch;
}

.acc-exito-icono {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
}

.acc-exito-icono i,
.acc-exito-icono svg {
  width: 28px;
  height: 28px;
}

.acc-girando {
  width: 16px;
  height: 16px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  animation: accGirar 0.7s linear infinite;
}

@keyframes accGirar {
  to {
    transform: rotate(360deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .acc-girando {
    animation-duration: 2.4s;
  }
}

@media (max-width: 560px) {
  .acc-overlay {
    padding: 10px;
  }

  .acc-card {
    padding: 24px 20px 22px;
    border-radius: 20px;
  }

  .acc-titulo {
    font-size: 1.32rem;
  }

  .acc-grid-2,
  .acc-opciones-3 {
    grid-template-columns: 1fr;
  }

  .acc-opciones-3 {
    gap: 8px;
  }

  .acc-opcion-plan {
    flex-direction: row;
    align-items: center;
    flex-wrap: wrap;
    gap: 2px 10px;
  }

  .acc-opcion-plan strong {
    flex: 1;
  }

  .acc-opcion-plan .acc-etiqueta {
    flex-basis: 100%;
    margin-top: 0;
  }

  .acc-pasos {
    margin-right: 0;
  }

  .acc-pasos li {
    font-size: 0.74rem;
    gap: 5px;
  }

  /* 16px evita el zoom automático de iOS al enfocar un campo */
  .acc-card .tga-login-input {
    font-size: 16px;
  }

  .acc-card .acc-otp {
    font-size: 1.5rem;
    letter-spacing: 0.4em;
  }
}

/* ==================== CONFIGURACIÓN › CORREOS ==================== */
.correo-panel {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 640px;
}

.correo-ayuda {
  display: block;
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--color-mid-gray, #737373);
}

.correo-opcion {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  border: 1px solid var(--color-hairline, #e5e5e5);
  border-radius: var(--radius-inputs, 12px);
  background: var(--color-surface-alt, #fafafa);
  cursor: pointer;
}

.correo-opcion input {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--color-primary-500, #0a0a0a);
}

.correo-opcion strong {
  display: block;
  font-size: 0.9rem;
  color: var(--color-ink, #0a0a0a);
}

.correo-opcion small {
  display: block;
  margin-top: 2px;
  font-size: 0.8rem;
  line-height: 1.45;
  color: var(--color-mid-gray, #737373);
}

.correo-nota,
.correo-cargando {
  font-size: 0.82rem;
  line-height: 1.5;
  color: var(--color-mid-gray, #737373);
}

.correo-nota strong {
  color: var(--color-ink, #0a0a0a);
}

.correo-aviso {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid #fde68a;
  border-radius: var(--radius-inputs, 12px);
  background: #fffbeb;
  color: #92400e;
  font-size: 0.84rem;
  line-height: 1.45;
}

.correo-aviso i,
.correo-aviso svg {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin-top: 1px;
}

.correo-panel .syscfg-footer-actions {
  margin-top: 8px;
  flex-wrap: wrap;
}

/* ==================== VISTAS IN-PAGE DE CONFIGURACIÓN Y ADMINISTRACIÓN ==================== */
/* #vistas-config-host vive junto a #mesas-plates-grid; cambiarVista muestra una sola sección a la vez. */
.vistas-config-host {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.vista-config-pagina {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.vista-config-pagina[hidden] {
  display: none !important;
}

/* Reportes › Líneas anuladas (in-page) */
.vista-anulaciones-tarjeta {
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
  overflow: hidden;
  min-width: 0;
}
.vista-anulaciones-tarjeta > .vista-config-encabezado {
  border: 0;
  border-radius: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--border-subtle, var(--border-default));
}

/* Pestañas de la pantalla única "Configuración" */
.config-pestanas {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-default);
  border-radius: 14px;
}
.config-pestanas[hidden] { display: none !important; }
.config-pestanas .syscfg-tab-btn i,
.config-pestanas .syscfg-tab-btn svg { flex-shrink: 0; }
.config-pestanas .config-pestana-sistema { margin-left: auto; }
@media (max-width: 600px) {
  .config-pestanas {
    flex-wrap: nowrap;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .config-pestanas .config-pestana-sistema { margin-left: 0; }
}

.vista-config-encabezado {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--bg-card);
  padding: 14px 18px;
  border-radius: 14px;
  border: 1px solid var(--border-default);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.vista-config-icono {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-active-nav);
  color: var(--color-primary-500);
}

.vista-config-icono i,
.vista-config-icono svg {
  width: 22px;
  height: 22px;
}

.vista-config-textos {
  min-width: 0;
}

.vista-config-titulo {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--text-main);
  line-height: 1.25;
}

.vista-config-subtitulo {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--text-muted);
  line-height: 1.4;
}

/* El contenido que antes vivía en un modal no debe forzar scroll horizontal en la página */
.vista-config-pagina > *,
.vista-config-pagina .admin-form-grid > * {
  min-width: 0;
}

.vista-config-pagina .table-responsive-wrap {
  max-width: 100%;
  overflow-x: auto;
}

@media (max-width: 600px) {
  .vista-config-encabezado {
    padding: 12px 14px;
  }

  .vista-config-titulo {
    font-size: 1.02rem;
  }

  .vista-config-pagina .admin-card-form {
    padding: 14px;
  }

  .vista-config-pagina .admin-waiters-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==================== COBRO EN TELÉFONOS ==================== */
/* En un teléfono el pad numérico no cabe junto con el total, los billetes y el vuelto:
   se oculta y se usa el teclado numérico del propio teléfono. En tablets (más de 600px) se mantiene. */
/* Una sola columna que sí puede encogerse: sin esto el contenido más ancho (pestañas, selects)
   empujaba la columna a 480px y en un teléfono se cortaba por la derecha. */
@media (max-width: 820px) {
  #modal-cobro .cobro-layout-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  #modal-cobro .cobro-col-left,
  #modal-cobro .cobro-col-right,
  #modal-cobro .cobro-col-left > *,
  #modal-cobro .cobro-col-right > * {
    min-width: 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
  }
}

@media (max-width: 600px), (max-height: 520px) and (pointer: coarse) {
  #modal-cobro .cobro-numpad-grid {
    display: none !important;
  }

  #modal-cobro .cobro-input-display {
    font-size: 1.6rem !important;
    min-height: 52px;
  }

  /* Moneda y descuento uno debajo del otro: lado a lado el descuento quedaba cortado ("Sin de…") */
  #modal-cobro .cobro-col-left > .admin-form-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* ==================== CENTRO DE REPORTES (js/modules/reportes.js) ==================== */
.rep-root {
  --rep-serie: #2a78d6;
  --rep-neg: #e34948;
  --rep-pista: #f0efec;
  --rep-s0: #f5f5f4; --rep-s1: #cde2fb; --rep-s2: #9ec5f4; --rep-s3: #6da7ec;
  --rep-s4: #3987e5; --rep-s5: #256abf; --rep-s6: #104281;
  gap: 14px;
}
body.dark-mode .rep-root {
  --rep-serie: #3987e5;
  --rep-neg: #e66767;
  --rep-pista: #262c3a;
  --rep-s0: #1b2232; --rep-s1: #0d366b; --rep-s2: #184f95; --rep-s3: #256abf;
  --rep-s4: #3987e5; --rep-s5: #6da7ec; --rep-s6: #b7d3f6;
}
.rep-encabezado { justify-content: flex-start; }
.rep-volver { height: 34px; padding: 0 12px; font-size: 0.8rem; flex-shrink: 0; }
.rep-volver[hidden] { display: none !important; }
.rep-cuerpo { display: flex; flex-direction: column; gap: 14px; min-width: 0; }

/* Catálogo (masonry por columnas para apilar grupos cortos sin huecos verticales) */
.rep-cat { column-count: 3; column-gap: 14px; }
.rep-cat-grupo {
  background: var(--bg-card); border: 1px solid var(--border-default); border-radius: 14px; padding: 14px 14px 8px;
  min-width: 0; width: 100%; display: inline-block; vertical-align: top; margin-bottom: 14px;
  break-inside: avoid; page-break-inside: avoid; box-sizing: border-box;
}
@media (max-width: 1120px) { .rep-cat { column-count: 2; } }
@media (max-width: 720px) { .rep-cat { column-count: 1; } }
.rep-cat-grupo-titulo { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; font-weight: 800; color: var(--text-main); margin: 0 0 8px; }
.rep-cat-grupo-titulo i, .rep-cat-grupo-titulo svg { width: 18px; height: 18px; color: var(--color-primary-500); }
.rep-cat-lista { display: flex; flex-direction: column; }
.rep-cat-item {
  display: grid; grid-template-columns: 1fr auto; grid-template-rows: auto auto; column-gap: 10px;
  text-align: left; width: 100%; background: none; border: 0; border-top: 1px solid var(--border-subtle);
  padding: 10px 4px; cursor: pointer; color: inherit; font: inherit; border-radius: 0;
}
.rep-cat-item:first-child { border-top: 0; }
.rep-cat-item:hover .rep-cat-item-titulo { color: var(--color-primary-600); }
.rep-cat-item:focus-visible { outline: 2px solid var(--color-primary-500); outline-offset: 2px; border-radius: 8px; }
.rep-cat-item-titulo { font-weight: 700; font-size: 0.88rem; color: var(--text-main); }
.rep-cat-item-desc { grid-column: 1; font-size: 0.76rem; color: var(--text-muted); line-height: 1.4; margin-top: 2px; }
.rep-cat-item-flecha { grid-column: 2; grid-row: 1 / span 2; align-self: center; width: 16px; height: 16px; color: var(--text-muted); }

/* Filtros */
.rep-filtros {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  background: var(--bg-card); border: 1px solid var(--border-default); border-radius: 14px; padding: 12px 14px;
}
.rep-campo { display: flex; flex-direction: column; gap: 3px; font-size: 0.72rem; color: var(--text-muted); font-weight: 600; }
.rep-campo[hidden] { display: none !important; }
.rep-campo .admin-input-styled, .rep-campo .admin-select-styled { height: 34px; padding: 4px 8px; font-size: 0.82rem; min-width: 140px; }
.rep-campo-corto .admin-input-styled { min-width: 0; width: 110px; }
.rep-atajos { display: flex; flex-wrap: wrap; gap: 6px; }
.rep-atajo {
  height: 34px; padding: 0 10px; border-radius: 999px; border: 1px solid var(--border-default);
  background: var(--bg-subtle); color: var(--text-secondary); font: inherit; font-size: 0.78rem; cursor: pointer;
}
.rep-atajo:hover { border-color: var(--color-primary-500); color: var(--text-main); }
.rep-consultar { height: 34px; padding: 0 14px; font-size: 0.82rem; margin-left: auto; }
.rep-consultar.is-loading svg,
.rep-consultar.is-loading i {
  animation: tgaSpinBtn 0.65s linear infinite;
  transform-origin: center;
}

/* Resultado */
.rep-resultado { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.rep-rango { margin: 0; font-size: 0.8rem; color: var(--text-muted); }
.rep-estado { padding: 24px; text-align: center; color: var(--text-muted); font-size: 0.85rem; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: 14px; }
.rep-estado-error { color: var(--color-error); }
.rep-kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.rep-kpi { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.rep-kpi-label { font-size: 0.74rem; color: var(--text-muted); font-weight: 600; }
.rep-kpi-valor { font-size: 1.3rem; font-weight: 800; color: var(--text-main); font-variant-numeric: tabular-nums; line-height: 1.2; overflow-wrap: anywhere; }
.rep-kpi-nota { font-size: 0.72rem; color: var(--text-secondary); }
.rep-avisos { list-style: none; margin: 0; padding: 10px 14px; display: flex; flex-direction: column; gap: 6px; background: var(--bg-subtle); border: 1px solid var(--border-default); border-radius: 12px; }
.rep-avisos li { display: flex; gap: 8px; font-size: 0.78rem; color: var(--text-secondary); line-height: 1.45; }
.rep-avisos i, .rep-avisos svg { width: 15px; height: 15px; flex-shrink: 0; margin-top: 1px; color: var(--text-muted); }

/* Gráficos */
.rep-graficos { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 14px; }
.rep-graficos:empty { display: none; }
.rep-grafico { margin: 0; background: var(--bg-card); border: 1px solid var(--border-default); border-radius: 14px; padding: 14px; min-width: 0; }
.rep-grafico-ancho { grid-column: 1 / -1; }
.rep-grafico-titulo { font-size: 0.88rem; font-weight: 700; color: var(--text-main); margin-bottom: 10px; }
.rep-grafico-nota { margin: 8px 0 0; font-size: 0.72rem; color: var(--text-muted); }
.rep-barras { display: flex; flex-direction: column; gap: 4px; }
.rep-barra-fila { display: grid; grid-template-columns: minmax(80px, 34%) 1fr auto; align-items: center; gap: 10px; padding: 3px 0; border-radius: 6px; }
.rep-barra-fila:hover { background: var(--bg-subtle); }
.rep-barra-label { font-size: 0.78rem; color: var(--text-secondary); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rep-barra-pista { position: relative; height: 10px; }
.rep-barra { position: absolute; left: 0; top: 0; bottom: 0; background: var(--rep-serie); border-radius: 0 4px 4px 0; }
.rep-pista-centro::before { content: ''; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--border-strong); }
.rep-pista-centro .rep-neg { left: auto; background: var(--rep-neg); border-radius: 4px 0 0 4px; }
.rep-barra-ref { position: absolute; top: -4px; bottom: -4px; width: 0; border-left: 1px dashed var(--text-muted); z-index: 1; }
.rep-barra-valor { font-size: 0.78rem; font-variant-numeric: tabular-nums; color: var(--text-main); text-align: right; min-width: 64px; }
.rep-cols { display: grid; grid-template-columns: repeat(var(--n), minmax(0, 1fr)); gap: 2px; height: 180px; align-items: end; border-bottom: 1px solid var(--border-strong); padding-bottom: 0; }
.rep-col { display: flex; flex-direction: column; height: 100%; min-width: 0; cursor: default; }
.rep-col-pista { flex: 1; display: flex; align-items: flex-end; justify-content: center; }
.rep-col-barra { width: min(100%, 14px); background: var(--rep-serie); border-radius: 4px 4px 0 0; }
.rep-col:hover .rep-col-barra { filter: brightness(1.15); }
.rep-col-label { height: 0; overflow: visible; font-size: 0.66rem; color: var(--text-muted); text-align: center; transform: translateY(4px); white-space: nowrap; }
.rep-cols + .rep-grafico-nota { margin-top: 22px; }
.rep-heat-scroll { overflow-x: auto; }
.rep-heat { display: grid; grid-template-columns: 34px repeat(var(--cols), minmax(18px, 1fr)); gap: 2px; min-width: calc(34px + var(--cols) * 20px); }
.rep-heat-h { font-size: 0.64rem; color: var(--text-muted); text-align: center; }
.rep-heat-d { font-size: 0.72rem; color: var(--text-secondary); align-self: center; }
.rep-heat-c { height: 22px; border-radius: 3px; background: var(--rep-s0); }
.rep-s1 { background: var(--rep-s1); } .rep-s2 { background: var(--rep-s2); } .rep-s3 { background: var(--rep-s3); }
.rep-s4 { background: var(--rep-s4); } .rep-s5 { background: var(--rep-s5); } .rep-s6 { background: var(--rep-s6); }
.rep-heat-leyenda { display: flex; align-items: center; gap: 3px; flex-wrap: wrap; }
.rep-heat-leyenda .rep-heat-c { width: 18px; height: 10px; display: inline-block; }
.rep-heat-leyenda span:first-child { margin-right: 4px; } .rep-heat-leyenda span:last-child { margin-left: 4px; }
.rep-sc { width: 100%; max-width: 760px; height: auto; display: block; margin: 0 auto; }
.rep-sc-tick { font-size: 10px; fill: var(--text-muted); font-variant-numeric: tabular-nums; }
.rep-sc-eje { stroke: var(--border-strong); stroke-width: 1; }
.rep-sc-umbral { stroke: var(--text-muted); stroke-width: 1; stroke-dasharray: 4 4; }
.rep-sc-p { fill: var(--rep-serie); stroke: var(--bg-card); stroke-width: 2; cursor: default; }
.rep-sc-p:hover { r: 7; }
.rep-sc-cuad { font-size: 11px; fill: var(--text-muted); font-weight: 700; }
.rep-sc-tit { font-size: 11px; fill: var(--text-secondary); }

/* Tablas */
.rep-tablas { display: flex; flex-direction: column; gap: 14px; }
.rep-tabla-bloque { background: var(--bg-card); border: 1px solid var(--border-default); border-radius: 14px; overflow: hidden; min-width: 0; }
.rep-tabla-cab { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border-subtle); }
.rep-tabla-cab h3 { margin: 0; font-size: 0.9rem; font-weight: 800; color: var(--text-main); }
.rep-tabla-cuenta { font-weight: 600; color: var(--text-muted); font-size: 0.78rem; margin-left: 4px; }
.rep-csv { height: 32px; padding: 0 12px; font-size: 0.78rem; }
.rep-tabla-wrap { max-height: 520px; overflow: auto; }
.rep-tabla { width: 100%; border-collapse: collapse; font-size: 0.8rem; }
.rep-tabla th { position: sticky; top: 0; background: var(--bg-subtle); color: var(--text-secondary); font-weight: 700; font-size: 0.74rem; text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border-default); white-space: nowrap; cursor: pointer; user-select: none; }
.rep-tabla th:focus-visible { outline: 2px solid var(--color-primary-500); outline-offset: -2px; }
.rep-tabla td { padding: 7px 10px; border-bottom: 1px solid var(--border-subtle); color: var(--text-main); vertical-align: top; }
.rep-tabla tbody tr:hover td { background: var(--bg-subtle); }
.rep-tabla .rep-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.rep-tabla .rep-negativo { color: var(--color-error); }
.rep-vacio { text-align: center !important; color: var(--text-muted) !important; padding: 20px !important; }
.rep-tip {
  position: fixed; left: 0; top: 0; z-index: 99999; pointer-events: none; max-width: 280px;
  background: var(--color-ink, #0a0a0a); color: #fff; font-size: 0.76rem; line-height: 1.35;
  padding: 6px 9px; border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.18);
}
.rep-tip[hidden] { display: none; }
@media (max-width: 600px) {
  .rep-cat { grid-template-columns: minmax(0, 1fr); }
  .rep-consultar { margin-left: 0; width: 100%; justify-content: center; }
  .rep-campo { flex: 1 1 140px; }
  .rep-campo .admin-input-styled, .rep-campo .admin-select-styled { min-width: 0; width: 100%; }
  .rep-graficos { grid-template-columns: minmax(0, 1fr); }
  .rep-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rep-kpi-valor { font-size: 1.1rem; }
  .rep-barra-fila { grid-template-columns: minmax(70px, 38%) 1fr auto; }
}

/* Badges visuales de atajos de teclado */
.tga-kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1;
  padding: 2px 5px;
  border-radius: 4px;
  background: rgba(15, 23, 42, 0.08);
  color: inherit;
  border: 1px solid rgba(15, 23, 42, 0.16);
  box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.12);
  letter-spacing: 0.02em;
  opacity: 0.85;
  pointer-events: none;
  margin-left: 4px;
}
.cobrar-highlight .tga-kbd,
.cobro-btn-finalizar .tga-kbd,
.pay-method-btn.active .tga-kbd {
  background: rgba(255, 255, 255, 0.2);
  border-color: rgba(255, 255, 255, 0.35);
  box-shadow: inset 0 -1px 0 rgba(0, 0, 0, 0.12);
  color: #fff;
}
.pay-method-btn .tga-kbd {
  font-size: 0.6rem;
  margin-left: auto;
}
.cobro-div-tab .tga-kbd {
  font-size: 0.6rem;
  margin-left: 6px;
}
.cobro-div-tab.active .tga-kbd {
  background: rgba(2, 132, 199, 0.1);
  border-color: rgba(2, 132, 199, 0.25);
  color: var(--color-primary-700, #0369a1);
}
@media (max-width: 768px) {
  .tga-kbd { display: none !important; }
}
