/* css/main.css */
/* 🟢 FIX: Importamos los Íconos y las Fuentes Roboto y Poppins directamente desde Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@20..48,100..700,0..1,-50..200');
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&family=Roboto:wght@400;500;700&display=swap');

:root {
  --color-libre: #10B981;
  --color-preparacion: #10B981;
  --color-listo: #8B5CF6;
  --color-encamino: #06B6D4;
  --color-fondo: #f4f6f9;
  --color-texto: #0a131f;
  --color-borde: #e5e7eb;
  --color-primario: #1E3A8A;
  --color-secundario: #3B82F6;
  --azul-rinoban: rgb(0, 111, 255);
  --azul-hover: rgba(255, 255, 255, 0.15);
  --menu-bg: rgb(0, 111, 255);
  --menu-text: rgba(255, 255, 255);
  --menu-active: rgba(255, 255, 255, 0.15);
  --menu-active-text: #ffffff;
}


body, html { margin: 0; padding: 0; font-family: 'Roboto', sans-serif; background-color: rgb(240, 240, 240); color: var(--color-texto); }
button, input, select, textarea { font-family: inherit; }
body { padding-left: 240px; padding-top: 48px; transition: padding-left 0.3s cubic-bezier(0.4, 0, 0.2, 1); }

  /* Clases para el enrutador de vistas (SPA) */
  .vista-sistema { 
    display: none; /* Por defecto todas las vistas están ocultas */
    animation: fadeIn 0.3s ease-in-out; 
    padding: 20px; 
    /* max-width: 1200px; */
    margin: 0 auto; 
    box-sizing: border-box; 
  }
  

#contenido-principal { display: none;  max-width: 100% !important; margin: 0 auto; }

@keyframes fadeIn { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

/* --- SIDEBAR Y MENÚ --- */
  /* --- ESTILO PC (Sidebar Lateral) --- */
.sidebar { z-index: 6015 !important; width: 240px; background-color: var(--menu-bg); height: calc(100vh - 48px); position: fixed; left: 0; top: 48px; display: flex; flex-direction: column; transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.3s ease; overflow-x: hidden; white-space: nowrap; }
  
  .img-logo-topbar { height: 50px; width: auto; object-fit: contain; display: block; }
  

  
.menu-items { margin-top: 30px; display: flex; flex-direction: column; padding: 0; gap: 4px; flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }
  
.menu-btn { background: transparent; border: none; color: #FFFFFF; padding: 14px 20px; text-align: left; font-size: 14px; font-weight: 400; width: 100%; cursor: pointer; display: flex; align-items: center; justify-content: space-between; transition: all 0.2s; border-left: 4px solid transparent; }


.menu-btn .material-icons-outlined { font-size: 22px; font-weight: normal !important; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; transition: all 0.2s ease; }
  /* Efectos Hover y Activo */
  
  /* 🟢 Transición suave para ocultar textos del menú cuando se hace "fideo" */
.menu-btn > div > span:not(.material-icons-outlined), .chevron { transition: opacity 0.2s ease, visibility 0.2s ease; }

.menu-btn:hover { background: var(--menu-active); color: var(--menu-active-text); }
.menu-btn.activo { background: #1654a8; color: var(--menu-active-text); border-left: 4px solid #51ffc9; }
.menu-btn.activo .chevron { transform: rotate(180deg); }

/* 🟢 FIX: Forzar íconos modernos, finos y súper nítidos en todo el sistema */
.material-icons-outlined {
    font-family: 'Material Symbols Outlined' !important;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24 !important;
    -webkit-font-smoothing: antialiased;
}

/* --- SUBMENÚS (Acordeón PC) --- */
.submenu { display: none; flex-direction: column; background: #1654a8; }
.submenu-btn { background: transparent; border: none; color: var(--menu-text); padding: 12px 20px 12px 55px; width: 100%; text-align: left; cursor: pointer; font-size: 0.85rem; font-weight: 400; letter-spacing: .0071428571em !important; border-left: 4px solid transparent; transition: all 0.2s; }
.submenu-btn:hover { color: white; background: var(--menu-active); }
.submenu-btn.activo { color: white; font-weight: 600; border-left: 4px solid #51ffc9; background: var(--menu-active); }  
  
  
  
  /* =======================================================
   💎 ESTILOS DE LOGIN (MINIMALISTA, ELEGANTE Y FLUIDO)
   ======================================================= */
.login-wrapper {
  position: fixed;
  top: 0; left: 0;
  width: 100vw; height: 100vh;
  background-color: #ffffff !important; /* Fondo blanco puro */
  z-index: 100000; /* Asegurar que esté sobre todo */
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  /* 🟢 FIX: Eliminamos la opacidad 0 de aquí para que el fondo tape el topbar de inmediato */
}

/* 🟢 FIX: Pasamos la magia de la animación SOLO al contenido interno */
.login-topbar, .login-content-wrapper, .login-version {
  opacity: 0;
  animation: fadeInSuaveLogin 0.6s cubic-bezier(0.22, 1, 0.36, 1) 0.2s forwards;
}

@keyframes fadeInSuaveLogin {
  from { opacity: 0; transform: translateY(-10px) scale(0.99); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.login-topbar { display: flex; justify-content: space-between; align-items: center; padding: 15px 30px; width: 100%; box-sizing: border-box; background-color: white; flex-shrink: 0; }
.login-logo-box { background-color: #ef4444; padding: 8px 20px; border-radius: 4px; display: flex; align-items: center; justify-content: center; }
/* Tamaño del logo en PC (50px) */
.login-logo-img {
  height: 50px;
  width: auto;
  transition: height 0.3s ease; /* Le da un encogimiento suave si redimensionas la ventana */
}
.login-topbar-derecha { display: flex; align-items: center; gap: 20px; font-size: 0.9rem; font-weight: 500; color: #334155; font-family: 'Roboto', sans-serif; }
.soporte-link { display: flex; align-items: center; gap: 5px; cursor: pointer; }
.soporte-link .material-icons-outlined { font-size: 18px; }
.btn-outline-blue { background: transparent; border: 1px solid #3b82f6; color: #3b82f6; padding: 8px 18px; border-radius: 4px; font-weight: 600; cursor: pointer; transition: all 0.2s; font-family: 'Roboto', sans-serif; }
.btn-outline-blue:hover { background: #eff6ff; }
.login-content-wrapper { flex: 1; display: flex; align-items: center; justify-content: center; padding: 20px; width: 100%; box-sizing: border-box; }
.login-box { width: 100%; max-width: 420px; padding: 0; box-sizing: border-box; text-align: center; background: transparent; }
.login-box h1 { font-size: 2.2rem; font-weight: 700; color: #1e293b; margin-bottom: 45px; font-family: 'Roboto', sans-serif; }
.login-input-group { margin-bottom: 25px; position: relative; }
.login-input { width: 100%; padding: 16px 15px; border: 1px solid #94a3b8; border-radius: 4px; font-size: 1rem; font-family: 'Roboto', sans-serif; color: #334155; box-sizing: border-box; transition: border-color 0.3s; outline: none; }
.login-input::placeholder { color: #64748b; font-weight: 400; }
.login-input:focus { border-color: #1e293b; border-width: 1.5px; padding: 15.5px 14.5px; } 
.toggle-password { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #64748b; cursor: pointer; font-size: 22px; }
.toggle-password:hover { color: #1e293b; }
.login-btn-submit { width: 100%; padding: 16px; background-color: #42b3ff; color: white; font-weight: 700; font-family: 'Roboto', sans-serif; font-size: 1.05rem; border: none; border-radius: 4px; cursor: pointer; transition: background-color 0.2s; margin-top: 10px; letter-spacing: 0.5px; }
.login-btn-submit:hover { background-color: #ff8585; }
.login-link-olvido { display: block; margin-top: 25px; color: #0f172a; font-weight: 700; text-decoration: underline; font-size: 0.95rem; font-family: 'Roboto', sans-serif; }
.login-disclaimer { margin-top: 45px; font-size: 0.75rem; color: #475569; line-height: 1.5; font-family: 'Roboto', sans-serif; }
.login-disclaimer a { color: #3b82f6; text-decoration: underline; }
.login-version { text-align: center; padding: 20px; font-size: 0.8rem; color: #64748b; font-family: 'Roboto', sans-serif; flex-shrink: 0; }

/* =======================================================
   📱 ADAPTACIÓN RESPONSIVA (MÓVIL EDGE-TO-EDGE)
   ======================================================= */
@media (max-width: 768px) { .login-topbar { padding: 15px 20px; } .login-logo-box { padding: 8px 15px; } .hide-mobile { display: none; } .login-box { padding: 0 10px; margin-top: -5vh; } .login-box h1 { font-size: 1.9rem; margin-bottom: 35px; } .login-input { padding: 15px; font-size: 0.95rem; } .login-btn-submit { padding: 15px; font-size: 1rem; } .login-disclaimer { margin-top: 35px; } }
  
  
  
  
/* =======================================================
   🍗 ESTANDARIZACIÓN DE ÍCONOS Mirkos (SISTEMA SVG)
   ======================================================= */
 .icono-pedido-svg-tab { display: inline-block; width: 24px; height: 24px; background-color: #5A6472; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; mask-size: contain; mask-repeat: no-repeat; mask-position: center; vertical-align: middle; flex-shrink: 0 !important; }
 
.icono-pedido-svg { display: inline-block; width: 24px; height: 24px; background-color: currentColor; -webkit-mask-size: contain; -webkit-mask-repeat: no-repeat; -webkit-mask-position: center; mask-size: contain; mask-repeat: no-repeat; mask-position: center; vertical-align: middle; flex-shrink: 0 !important; }

.svg-mesa {
    -webkit-mask-image: url('../medios/iconos/mesa.svg');
    mask-image: url('../medios/iconos/mesa.svg');
    -webkit-mask-size: 120%; /* Un pelín de zoom si hace falta */
    mask-size: 120%;
}

.svg-llevar {
    -webkit-mask-image: url('../medios/iconos/parallevar.svg');
    mask-image: url('../medios/iconos/parallevar.svg');
    /* 🟢 CLAVE 3: Zoom interno agresivo para compensar el lienzo de la bolsita */

}

.svg-delivery {
    -webkit-mask-image: url('../medios/iconos/delivery.svg');
    mask-image: url('../medios/iconos/delivery.svg');
    /* -webkit-mask-size: 130%;  */
    /* mask-size: 130%;*/
}
  /* =======================================================
   🍗 FIN ESTANDARIZACIÓN DE ÍCONOS DE PEDIDO (SISTEMA SVG)
   ======================================================= */

/* =====================================================================
   8. RESPONSIVE DESIGN: PANTALLAS MEDIANAS (Laptops de 851px a 1229px)
   ===================================================================== */
@media (min-width: 851px) and (max-width: 1229px) {
  /* 1. Cuerpo y topbar se ajustan al nuevo ancho delgado (74px) */
  body { padding-left: 74px; }
  .topbar-global::before { left: 74px; }
  
  /* 2. El menú se adelgaza */
  .sidebar { width: 74px; }
  
  /* 3. Ocultamos los textos y la flecha (suavemente gracias a la transición) */
  .sidebar:not(:hover) .menu-btn > div > span:not(.material-icons-outlined) { opacity: 0; visibility: hidden; }
  .sidebar:not(:hover) .chevron { opacity: 0; visibility: hidden; }
  
  /* 4. Limpieza visual: Ocultamos submenús, barras de scroll y líneas divisoras */
  .sidebar:not(:hover) .submenu { display: none !important; }
  .sidebar:not(:hover) hr { opacity: 0; }
  .sidebar:not(:hover) .menu-items::-webkit-scrollbar { display: none; }
  
  /* 🟢 MAGIA UX: Expansión suave y flotante al pasar el mouse por encima */
  .sidebar:hover { width: 240px; box-shadow: 10px 0 30px rgba(0,0,0,0.25); }
}


  /* 🟢 REGLA DE ESCRITORIO: Ocultar fondo negro, "X" y perfil en PC */
  @media (min-width: 851px) {
    .sidebar-perfil-movil { display: none !important; }
    .btn-cerrar-menu-movil { display: none !important; }
    .sidebar-overlay { display: none !important; }
  }


/* =========================================================
   TOPBAR GLOBAL (DE LADO A LADO) Y NOTIFICACIONES
   ========================================================= */
.topbar-global { background-color: var(--azul-rinoban) !important; color: #ffffff !important; height: 48px; display: flex; justify-content: space-between; align-items: center; padding: 0 25px; position: fixed; top: 0; left: 0; right: 0; width: 100%; box-sizing: border-box; z-index: 5500; box-shadow: 0px 2px 10px rgba(0,0,0,0.15); }
.topbar-global::before { content: ""; position: absolute; top: 0; bottom: 0; left: 240px; right: 0; background-color: var(--azul-rinoban); box-shadow: 11px 6px 10px rgb(141 130 130 / 62%); z-index: -1; transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1); }
    
.topbar-logo { display: flex; align-items: center; gap: 12px; font-weight: 700; color: #ffffff !important; font-size: 1.1rem; }
.topbar-perfil { display: flex; align-items: center; gap: 20px; }

.btn-notificacion { background: transparent; border: none; font-size: 1.3rem; cursor: pointer; color: #ffffff !important; transition: color 0.2s; position: relative; display: flex; align-items: center; justify-content: center; }
.btn-notificacion.alerta-activa::after { content: ''; position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; z-index: 2; }
.btn-notificacion.alerta-activa::before { content: ''; position: absolute; top: 2px; right: 2px; width: 8px; height: 8px; background: #ef4444; border-radius: 50%; z-index: 1; animation: halo-radar 1.5s infinite cubic-bezier(0.215, 0.61, 0.355, 1); }
/* LA ANIMACIÓN (vital para que el halo funcione) */
@keyframes halo-radar {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(3.5); opacity: 0; }
}

/* =========================================================
   NAVEGACIÓN MÓVIL (BOTTOM NAV)
   ========================================================= */
.bottom-nav { display: none; position: fixed; bottom: 0; left: 0; width: 100%; background-color: var(--azul-rinoban); z-index: 4000; justify-content: space-around; align-items: stretch; padding: 0; height: 65px; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 15px rgba(0,0,0,0.25); }
.bottom-nav-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; color: #ffffff !important; font-size: 0.75rem; font-family: 'Poppins', sans-serif; cursor: pointer; transition: background-color 0.2s ease; background: transparent; border: none; padding: 0; flex: 1; text-shadow: none !important; outline: none; }
.bottom-nav-btn .material-icons-outlined { font-size: 24px; color: #ffffff !important; text-shadow: none !important; }
.bottom-nav-btn.activo { background-color: #2563eb; font-weight: 700; }

/* =========================================================
   REGLA RESPONSIVA ÚNICA (UNIFICADA - CERO BASURA)
   ========================================================= */

@media (max-width: 850px) {
  body { padding-left: 0; padding-top: 0; padding-bottom: 70px; }
  .topbar-global, .cabecera-panel { display: none !important; }
  .bottom-nav { display: flex; }
  .vista-sistema { padding: 10px !important; }
  .quick-action-bar { display: none !important; }
  .btn-editar-movil { display: flex !important; }

  .sidebar-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100dvh; background: rgba(15, 23, 42, 0.6); z-index: 4500; opacity: 0; visibility: hidden; transition: all 0.3s ease; }
  .sidebar-overlay.activo { opacity: 1; visibility: visible; }
  .sidebar { transform: translateX(-100%); width: 260px; top: 0; height: 100dvh; }
  .sidebar.abierto { transform: translateX(0); box-shadow: 5px 0 25px rgba(0,0,0,0.5); }
  .sidebar-logo { justify-content: space-between !important; padding: 20px 15px !important; }

  .btn-cerrar-menu-movil {
    display: flex;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    padding: 0;
    flex-shrink: 0;
  }

  .btn-cerrar-menu-movil:active { background: rgba(255,255,255,0.3); }
}

  
  @keyframes popIn {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
  }


/* --- ELEMENTOS GLOBALES DE VISTAS --- */
.cabecera-panel { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.cabecera-panel h1 { margin: 0; font-size: 1.5rem; color: var(--color-texto); }
/* Botón Nuevo Pedido */
.btn-nuevo { padding:15px 50px; background:#0c5bdb; color:white; border:none; border-radius:8px; font-size: 16px; font-weight:600; cursor:pointer; display:flex; align-items:center; justify-content: center; gap:8px; transition:background 0.2s; }
.btn-nuevo:hover { background:#2563eb; }

/* --- CARGA --- */
  #pantalla-carga { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgb(0 111 255 / var(--tw-bg-opacity, 1)); display: flex; flex-direction: column; justify-content: center; align-items: center; z-index: 9999; color: white; transition: opacity 0.5s ease; }
  #pantalla-carga.fade-out { opacity:0; }
  .logo-mirkos {   font-weight: 700; letter-spacing: .22em; text-transform: uppercase; font-size: 20px; margin-bottom: 8px;}
  .texto-cargando{font-size: 12px; font-weight: 400; opacity: .85; color: rgba(219,234,254,.95); /* azul claro tipo screenshot */ }
  .spinner { width: 60px; height: 60px; border: 5px solid #57FFE1; border-top-color: transparent; border-radius: 50%; animation: girar 1s linear infinite; margin-bottom: 15px; }
  @keyframes girar { to { transform: rotate(360deg); } }


.progreso-box { margin-top: 14px; height: 30px; overflow: hidden; display: flex; justify-content: center; }
.progreso-linea { font-family: 'Poppins', sans-serif; font-size: 12.5px; font-weight: 500; color: rgba(255,255,255,.85); padding: 6px 12px; border-radius: 999px; background: rgba(255,255,255,.10); border: 1px solid rgba(255,255,255,.14); backdrop-filter: blur(6px); transform: translateY(-12px); opacity: 0; }
.progreso-linea.animar { animation: progresoInOut 1.8s ease-in-out forwards; }
@keyframes progresoInOut { 0% { opacity: 0; transform: translateY(-10px); } 18% { opacity: 1; transform: translateY(0); } 82% { opacity: 1; transform: translateY(0); } 100% { opacity: 0; transform: translateY(10px); } }

/* ------- EFECTO PINTA CUANDO ABRO BOTON NUEVO MENU*/
/* Estilo para el contenedor del menú */
#menu-nuevo-pedido {
  border-radius: 12px; /* Bordes más redondeados para ir con tu diseño */
  transition: opacity 0.2s ease;
  box-shadow:0 5px 5px -3px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, .2)), 0 8px 10px 1px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, .14)), 0 3px 14px 2px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, .12));
}

/* Estilo para cada opción del menú */
.menu-item-pedido {
  display: block;
  width: 100%;
  padding: 12px 16px;
  border: none;
  background: white;
  text-align: left;
  cursor: pointer;
  font-size: 0.95rem;
  color: #374151;
  transition: background-color 0.2s ease; /* Transición suave del color */
}

/* EFECTO HOVER: El gris suave que pediste */
.menu-item-pedido:hover {
  background-color: #f3f4f6; /* Gris muy suave (Slate-100) */
  color: #111827; /* Texto un poco más oscuro al resaltar */
}

/* Separador sutil */
.menu-item-pedido:not(:last-child) {
  border-bottom: 1px solid #f3f4f6;
}

/* TABS PEDIDOS */
.barra-acciones-top { display: flex; justify-content: space-between; align-items: center; width: 100% !important; margin-bottom: 20px; gap: 15px; }
.grupo-tabs { display: flex; background: white; border-radius: 8px; overflow: hidden; width:600px; box-shadow:0px 2px 2px #0000003d; }
.tab-btn { flex: 1; padding: 14px 15px; border: none; border-right: 1px solid var(--color-borde); background: white; color: #0A131F !important; font-family: 'Roboto', sans-serif !important; font-size: 14px !important; font-weight: 600; cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap; position: relative; }
.tab-btn:last-child { border-right: none; }
.tab-btn:hover { background: #f8fafc; color: var(--color-primario); }
.tab-btn.activo { background: #eff6ff; color: var(--color-secundario); border: 1px solid #0074FF; border-radius: 8px 0 0 8px !important; }

.tab-icon { font-size: 20px; display: block; line-height: 1; }
.badge-conteo { background: #F1F2F4; color: #0c1726; border-radius: 50%; min-width: 15px; height: 24px; display: flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; padding: 0 6px; transition: all 0.2s; }
.tab-btn.activo .badge-conteo { background: #ffffff; color: #0c1726; box-shadow: 0 1px 3px rgba(0,0,0,0.1); }
.tab-texto { line-height: 1; }

/* FILTROS */
.barra-filtros { display:flex; justify-content:space-between; align-items:center; background:white; padding:5px 20px; border-radius:8px; border:1px solid var(--color-borde); margin-bottom:15px; gap:15px; width:100%!important; box-sizing:border-box; }
.filtros-izq { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.filtros-izq::-webkit-scrollbar { display:none; }
.btn-filtro { padding: 10px 14px; border: 1px solid var(--color-borde); background: white; border-radius: 999px; cursor: pointer; font-weight: 600; color: #475569; transition: all 0.2s ease; }
.btn-filtro.activo { background: var(--color-secundario); color: white; border-color: var(--color-secundario); }
.btn-filtro:hover { border-color:#cbd5e1; color:#475569; }
.filtros-der { display: flex; align-items: center; gap: 10px; }
.filtros-der strong { color: var(--color-primario); font-size: 1rem; }


/* 🟢 EL EFECTO MÁGICO DEL BOTÓN HALO: */
.btn-cargando-halo-pro { position: relative !important; pointer-events: none !important; color: transparent !important; transform: translateZ(0) !important; }
.btn-cargando-halo-pro > * { opacity: 0 !important; visibility: hidden !important; }
.btn-cargando-halo-pro::after { content: "" !important; position: absolute !important; top: calc(50% - 12px) !important; left: calc(50% - 12px) !important; width: 24px !important; height: 24px !important; border: 3px solid rgba(255, 255, 255, 0.4) !important; border-top-color: #ffffff !important; border-radius: 50% !important; animation: halo-spin-mirkos 0.8s linear infinite !important; display: block !important; box-sizing: border-box !important; z-index: 10 !important; will-change: transform !important; }
.btn-cargando-halo-pro .ripple { display: none !important; opacity: 0 !important; animation: none !important; }
@keyframes halo-spin-mirkos { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }


/* RIPPLE EFFECT funciono de la mano con lo que tenemos en Core.js*/
/* RIPPLE EFFECT - 600ms (Corte Rápido y Limpio) */
button, a[class*="bg-brand-primary"], a[class*="bg-blue-"], a[class*="bg-green-"] { position: relative; overflow: hidden; isolation: isolate; transform: translateZ(0); }
.ripple { position: absolute; border-radius: 9999px; background: rgba(150, 202, 250); transform: translate(-50%, -50%) scale(0); opacity: 0.6; pointer-events: none; z-index: 3; will-change: transform, opacity; animation: ripple-wave 900ms cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards; }
@keyframes ripple-wave { 0% { transform: translate(-50%, -50%) scale(0); opacity: 0.5; } 60% { transform: translate(-50%, -50%) scale(1); opacity: 0.2; } 100% { transform: translate(-50%, -50%) scale(1); opacity: 0; } }


/* FIX MENÚS FLOTANTES */
  .inline-dropdown-menu { 
    position: absolute; top: 110%; left: 0; background: white; border: 1px solid #e2e8f0; 
    /* border-radius: 8px; */ box-shadow: 0 5px 5px -3px var(--v-shadow-key-umbra-opacity, rgba(0, 0, 0, .2)),0 8px 10px 1px var(--v-shadow-key-penumbra-opacity, rgba(0, 0, 0, .14)),0 3px 14px 2px var(--v-shadow-key-ambient-opacity, rgba(0, 0, 0, .12)); display: none; 
    flex-direction: column; z-index: 100; width: 270px; overflow: hidden; text-align: left;
  }
  .inline-dropdown-menu.right-aligned { left: auto; right: 0; }
.inline-dropdown-menu div { padding: 10px 12px; font-size: 0.9rem; color: #334155; cursor: pointer; display: flex; align-items: center; gap: 8px; font-weight: 600; }
.inline-dropdown-menu div:hover { background: #f8fafc; }

  /* Control de visibilidad PC vs Móvil */
  .btn-editar-movil { display: none; width: 100%; justify-content: center; }
  

/* GRID DE MESAS GLOBALES */
.grid-mesas { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 15px; background:white; padding: 15px;}
.tarjeta { border-radius: 12px; /* box-shadow: 0 2px 4px rgba(0,0,0,0.05); */ padding: 15px; display: flex; flex-direction: column; position: relative; font-family: Roboto; /* border-top: 5px solid #ccc; */ border: 1px solid #7b7b7bbd; cursor: pointer;}
.tarjeta-header { /* display: flex; */ justify-content: space-between; color: #082610; align-items: center; text-align: center; font-weight: 500; font-size: 16px; margin-bottom: 10px; }
  .cronometro { font-size: 1.8rem; font-weight: 700; text-align: center; /* margin: 10px 0; */ color: #111827; }

 /* --- VISTA LISTA (DELIVERY / LLEVAR) --- */
  .lista-pedidos { display: flex; flex-direction: column; gap: 5px; }
  .item-pedido { background: white; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,0.1); display: grid; grid-template-columns: 1.5fr 1fr 1fr 2fr 1.5fr; gap: 15px; padding: 15px; align-items: center; border-left: 4px solid #ccc; font-size: 0.9rem; }
  
  /* Colores de borde izquierdo por tipo */
  .item-pedido.border-preparacion { border-left-color: var(--color-preparacion); }
  .item-pedido.border-listo { border-left-color: var(--color-listo); }
  .item-pedido.border-camino { border-left-color: var(--color-encamino); }

  /* Encabezados de Lista Ocultos en Móvil */
  .lista-encabezado { display: grid; grid-template-columns: 1.5fr 1fr 1fr 2fr 1.5fr; gap: 15px; padding: 0 15px 5px 15px; font-weight: 600; color: #9ba1ac; font-size: 0.8rem; border-bottom: 2px solid var(--color-borde); /*margin-bottom: 10px; */}

  /* Estilos internos de la lista */
  .col-pedido { display: flex; flex-direction: column; }
  .col-pedido .num { font-size: 0.9rem; font-weight: 600; color: var(--color-preparacion); margin-bottom: 3px; }
  /* 🟢 NUEVO: Agrandamos solo el número del pedido */
  .col-pedido .num .num-grande { font-size: 1.15rem; font-weight: 800; }
  .col-pedido .num.azul { color: var(--color-secundario); }
  .col-pedido .tiempo { color: #ef4444; font-size: 0.8rem; display: flex; align-items: center; gap: 4px; padding-bottom: 6px;}
  
  .badge { padding: 4px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: 600; display: inline-block; width: max-content; margin-bottom: 5px; }
  .badge-verde { background: #d1fae5; color: #059669; }
  .badge-morado { background: #ede9fe; color: #7c3aed; }
  .badge-celeste { background: #cffafe; color: #0891b2; }
  .badge-naranja { background: #ffedd5; color: #ea580c; }
  
  .col-total { font-size: 1rem; font-weight: 600; color: #0a131f;}
  .col-cliente { display: flex; flex-direction: column; font-size: 0.85rem; }
  .btn-wsp { color: #10B981; border: 1px solid #10B981; border-radius: 4px; padding: 2px 6px; background: white; font-size: 0.75rem; cursor: pointer; display: inline-block; margin-left: 5px; }
  
  .col-acciones { display: flex; gap: 5px; justify-content: flex-end; }
  .btn-accion { border: 1px solid #d1d5db; background: white; border-radius: 6px; padding: 8px; cursor: pointer; color: #4b5563; display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; }
  .btn-finalizar { background: #93c5fd; color: white; border: none; border-radius: 6px; padding: 8px 15px; font-weight: 600; cursor: pointer; display: flex; flex-direction: column; align-items: center; font-size: 0.7rem; }
  .btn-finalizar:hover { background: var(--color-secundario); }

  /* ==============================================================
     ACCIONES RÁPIDAS (LISTA DE PEDIDOS)
     ============================================================== */
  /* Ajustamos las proporciones de la fila para darle más espacio a las acciones en PC */
  @media (min-width: 851px) {
    .item-pedido { grid-template-columns: 1.5fr 1fr 1fr 1.5fr 2.5fr !important; }
    .lista-encabezado { grid-template-columns: 1.5fr 1fr 1fr 1.5fr 2.5fr !important; }
  }

  .quick-action-bar { display: flex; gap: 8px; align-items: center; }
  
  
  /* ESTILO BASE (Imprimir, Estado, Opciones) */
  .btn-quick {display: inline-flex !important; flex-direction: column !important; /* Apila el ícono arriba y texto abajo */ align-items: center !important; justify-content: center !important;   gap: 2px; /* Espacio mínimo entre ícono y texto */  height: 55px; /* ¡Bien gorditos! */ min-width: 84px; /* Ancho mínimo para que se vean uniformes */  padding: 0 10px; background: white; 
    border: 1px solid #cbd5e1;  border-radius: 8px;  color: #64748b; /* Letras suaves (Gris pizarra) */ font-size: 0.75rem; font-weight: 600; cursor: pointer;  transition: all 0.2s ease; }
   .btn-quick:hover:not(:disabled) {background: #f8fafc; border-color: #94a3b8; color: #334155; }
   .btn-quick-pago {border: thin solid currentColor !important; color: #006fff !important; }
   .btn-quick-pago:hover:not(:disabled) { background: #eff6ff !important; /* Celeste súper suave al hover */ border-color: #2563eb !important; color: #2563eb !important; }
  .btn-quick:hover { border-color: #9ca3af; background: #f8fafc; color: var(--color-primario); }
  .btn-quick-icon { min-width: 0; width: 42px; /* Cuadrados perfectos */ height: 55px; padding: 0; }
  .btn-quick-icon .material-icons-outlined {margin: 0; }
  
  .btn-quick-finish { background: #3b82f6 !important; color: white !important; border: 1px solid #3b82f6 !important; /* Borde igual para mantener tamaño exacto */ opacity: 1 !important; /* Evita que se vea opaco/deshabilitado cuando está activo */ }
  .btn-quick-finish:hover { background: #3b82f6; color: white; }
  .btn-quick-finish:hover:not(:disabled) {background: #2563eb !important; /* Azul más oscuro al pasar el cursor */ border-color: #2563eb !important; }
  .btn-quick-finish:disabled { background: #f1f5f9 !important; color: #94a3b8 !important; border: 1px solid #e2e8f0 !important; cursor: not-allowed; }
  
@media (max-width: 768px) {
  .lista-encabezado { display: none; }
  .item-pedido { grid-template-columns: 1fr; gap: 10px; }
  .col-acciones { justify-content: flex-start; }
  
  /* 🟢 El logo se encoge a 30px en celulares */
  .login-logo-img { 
      height: 30px; 
  }
}




  /* --- SISTEMA DE TOAST NOTIFICATIONS --- */
#toast-container { position: fixed; top: 20px; right: 20px; z-index: 10000; display: flex; flex-direction: column; gap: 8px; pointer-events: none; }
.toast { background-color: #1f2937; color: white; border-radius: 8px; display: flex; align-items: center; padding: 10px 16px; box-shadow: 0 4px 12px rgba(0,0,0,0.2); font-family: 'Poppins', sans-serif; min-width: 250px; justify-content: space-between; position: relative; overflow: hidden; pointer-events: auto; animation: slideInLeft 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards; font-size: 0.95rem; line-height: 1.35; }
.toast-text { font-weight: 400; font-size: 0.8rem; }
  .toast.ocultar { animation: slideOutLeft 0.4s ease forwards; }
  .toast-content { display: flex; align-items: center; gap: 12px; }
  .toast-icon {
    background-color: #22c55e; color: white; width: 28px; height: 28px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center; font-weight: bold; font-size: 1rem;
  }

  .toast-close { color: #9ca3af; cursor: pointer; font-size: 1.2rem; background: none; border: none; padding: 0 0 0 10px; }
  .toast-close:hover { color: white; }
  
  /* La barra verde que se reduce */
  .toast-progress { position: absolute; bottom: 0; right: 0; height: 4px; background-color: #22c55e; animation: progressShrink linear forwards; }
  
  @keyframes slideInLeft { from { transform: translateX(-120%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }
  @keyframes slideOutLeft { from { transform: translateX(-120%); opacity: 0; } to { transform: translateX(-120%); opacity: 0; } }
  @keyframes progressShrink { from { width: 100%; } to { width: 0%; } }
  
  /* =======================================================
     🎯 FIX: MODAL DE MODIFICADORES (PC Y MÓVIL)
     ======================================================= */
  
  /* 1. Desktop: Centrado Perfecto (Protegido contra otras animaciones) */
  @keyframes fadeCentroMods {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
  }

  #modal-pos-mods {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    margin: 0 !important;
    /* Esta animación asegura que termine exactamente en el centro */
    animation: fadeCentroMods 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }

  /* 2. Móvil: Diseño "Bottom Sheet" (Sube desde abajo y se pega al piso) */
@keyframes slideUpMods {
  from { opacity: 0; transform: translateY(100%); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 850px) {

  #modal-pos-mods {
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    border-radius: 24px 24px 0 0 !important;
    max-height: 85vh !important;
    animation: slideUpMods 0.35s cubic-bezier(0.16, 1, 0.3, 1) forwards !important;
  }
}

@media (max-width: 768px) {
  .grid-mesas {
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  }
}
 

/* 🟢 FORZAR HERENCIA DE FUENTE ROBOTO EN BOTONES DE ACCIÓN */
  .col-acciones button,
  .btn-quick,
  .btn-accion,
  .btn-finalizar {
      font-family: 'Roboto', sans-serif !important;
      font-size: 14px !important;
  }


  /* =======================================================
       🛡️ REGLA DE SEGURIDAD ESTRICTA POR ROLES
       ======================================================= */
    body[data-rol="Mozo"] .prohibido-mozo {
        display: none !important;
        pointer-events: none !important;
        opacity: 0 !important;
    }
    

/* Oculta los elementos que el Cajero no debe ver */
body[data-rol="Cajero"] .prohibido-cajero {
    display: none !important;
    pointer-events: none !important;
}
    
      /* =========================================
   ESTILO BOTÓN "INGRESANDO..."
   ========================================= */
/* Esta clase se activa solo al dar clic */
.btn-ingresando-estado {
    background-color: #53a784 !important; /* El color verde exacto de tu imagen */
    color: white !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    gap: 10px; /* Espacio entre el spinner y el texto */
    cursor: not-allowed;
    opacity: 0.9;
}

/* Creamos el spinner blanco usando un pseudo-elemento antes del texto */
.btn-ingresando-estado::before {
    content: "";
    display: inline-block;
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255, 255, 255, 0.3); /* Borde base transparente */
    border-top-color: #ffffff; /* La parte que gira es blanca pura */
    border-radius: 50%;
    /* REUTILIZAMOS TU ANIMACIÓN DE GIRO EXISTENTE */
    /* Si tu animación se llama diferente a 'spin-halo', ajusta el nombre aquí */
    /* animation: spin-halo 0.8s linear infinite; */
}


/* =========================================================
   🟢 ANIMACIÓN RADAR ROJO PARA LA CAMPANITA (POS)
   ========================================================= */
.radar-rojo-animado {
    position: absolute;
    top: -2px;     /* Ajusta si queda muy arriba/abajo */
    right: -2px;   /* Ajusta si queda muy a la izq/der */
    width: 10px;   /* Tamaño del punto base */
    height: 10px;
    background-color: #ef4444; /* Rojo vivo */
    border-radius: 50%;
    display: none; /* JS lo cambia a 'block' al llegar pedido */
    z-index: 10;
}

/* La onda expansiva (el "latido") */
.radar-rojo-animado::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #f7f7f7;
    border-radius: 50%;
    z-index: -1;
    /* Animación rápida (0.8s) y constante */
    animation: ondaRadarCampana 0.8s infinite cubic-bezier(0.25, 0.46, 0.45, 0.94);
}


@media (max-width: 850px) {
    
    
  #vista-mesas .grid-mesas {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    padding: 10px !important;
  }

  #vista-mesas .grid-mesas .tarjeta {
    min-width: 0 !important;
    width: 100% !important;
    box-sizing: border-box !important;
  }

  #vista-mesas .grid-mesas > div[style*="grid-column"] {
    grid-column: 1 / -1 !important;
  }
}