/* src/css/pages/cocina.css */

body {
  background-color: #f8fafc !important;
  color: #111827 !important;
  overflow-x: hidden;
  font-family: 'Outfit', sans-serif;
}

/* Header */
.cocina-header {
  padding: 1.2rem 2.5rem;
  background-color: #ffffff !important;
  border-bottom: 3px solid #E4002B !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05) !important;
  color: #111827 !important;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.cocina-header .btn-back-global {
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
}

.cocina-header .btn-back-global:hover {
  background: #e5e7eb !important;
  color: #E4002B !important;
}

.cocina-header-title-box {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.cocina-title {
  font-family: 'Playfair Display', serif;
  font-size: 1.8rem;
  font-weight: bold;
  margin: 0;
  color: #111827 !important;
}

.cocina-status {
  color: #059669 !important;
  background: #ecfdf5 !important;
  border: 1px solid #a7f3d0 !important;
  padding: 0.3rem 0.75rem;
  border-radius: 9999px;
  font-size: 0.85rem;
  font-weight: bold;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* Kanban Board Layout */
.kanban-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  padding: 2.5rem;
  height: calc(100vh - 80px);
  align-items: start;
}

.kanban-column {
  background: #f3f4f6 !important;
  border: 1px solid #e5e7eb !important;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 160px);
  overflow: hidden;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
}

.kanban-header {
  padding: 1.2rem;
  text-align: center;
  font-family: 'Playfair Display', serif;
  font-size: 1.15rem;
  font-weight: 700;
  border-bottom: 2px solid;
  background: #ffffff !important;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.col-pendientes .kanban-header { 
  border-bottom-color: #E4002B !important; 
  color: #E4002B !important; 
}
.col-preparacion .kanban-header { 
  border-bottom-color: #d97706 !important; 
  color: #b45309 !important; 
}
.col-listos .kanban-header { 
  border-bottom-color: #059669 !important; 
  color: #047857 !important; 
}

.kanban-body {
  padding: 1.2rem;
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

/* Scrollbar styles for Kanban body */
.kanban-body::-webkit-scrollbar {
  width: 6px;
}
.kanban-body::-webkit-scrollbar-track {
  background: transparent;
}
.kanban-body::-webkit-scrollbar-thumb {
  background: #d1d5db;
  border-radius: 3px;
}
.kanban-body::-webkit-scrollbar-thumb:hover {
  background: #9ca3af;
}

/* Ticket Card Styling */
.ticket {
  background: #ffffff !important;
  border: 1px solid #e5e7eb !important;
  color: #111827 !important;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05) !important;
  border-radius: 12px;
  padding: 1.2rem;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  animation: ticketEntrance 0.5s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* Columna-specific styles */
.col-pendientes .ticket {
  border-left: 5px solid #E4002B !important;
}
.col-pendientes .ticket:hover {
  transform: translateY(-4px);
  border-color: #fca5a5 !important;
  border-left-color: #E4002B !important;
  box-shadow: 0 10px 25px rgba(228, 0, 43, 0.12) !important;
}

.col-preparacion .ticket {
  border-left: 5px solid #d97706 !important;
}
.col-preparacion .ticket:hover {
  transform: translateY(-4px);
  border-color: #fcd34d !important;
  border-left-color: #d97706 !important;
  box-shadow: 0 10px 25px rgba(217, 119, 6, 0.12) !important;
}

.col-listos .ticket {
  border-left: 5px solid #059669 !important;
}
.col-listos .ticket:hover {
  transform: translateY(-4px);
  border-color: #6ee7b7 !important;
  border-left-color: #059669 !important;
  box-shadow: 0 10px 25px rgba(5, 150, 105, 0.12) !important;
}

@keyframes ticketEntrance {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-bottom: 1px dashed #e5e7eb !important;
  padding-bottom: 0.6rem;
  margin-bottom: 0.8rem;
}

.ticket-id {
  font-weight: 800;
  font-family: monospace;
  color: #111827 !important;
  font-size: 1.15rem;
}

.ticket-time {
  font-size: 0.85rem;
  color: #6b7280 !important;
  font-weight: 600;
}

.ticket-tipo {
  font-size: 0.8rem;
  font-weight: bold;
  padding: 0.25rem 0.6rem;
  border-radius: 6px;
  display: inline-block;
  text-transform: uppercase;
  color: #374151 !important;
}

.ticket-tipo.domicilio {
  background: #eff6ff !important;
  color: #1d4ed8 !important;
  border: 1px solid #bfdbfe !important;
}

.ticket-tipo.llevar {
  background: #f5f3ff !important;
  color: #6d28d9 !important;
  border: 1px solid #ddd6fe !important;
}

.ticket-tipo.mesa, 
.ticket-mesa {
  background: #fef2f2 !important;
  color: #b91c1c !important;
  border: 1px solid #fecaca !important;
}

.ticket-client-info {
  font-size: 0.88rem;
  color: #111827 !important;
  background: #f9fafb !important;
  padding: 0.6rem 0.75rem;
  border-radius: 8px;
  border: 1px solid #e5e7eb !important;
  margin-top: 0.6rem;
  margin-bottom: 0.6rem;
  line-height: 1.45;
  font-weight: 600;
}

.ticket-client-info strong {
  color: #111827 !important;
}

.ticket-divider {
  border-top: 1px dashed #e5e7eb !important;
  margin: 0.8rem 0;
}

.ticket-items {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.ticket-item {
  font-size: 0.95rem;
  color: #111827 !important;
  line-height: 1.4;
  font-weight: 600;
}

.item-qty {
  font-weight: 800;
  color: #E4002B !important;
  margin-right: 0.4rem;
}

.item-notes {
  display: block;
  color: #92400e !important;
  font-size: 0.85rem;
  margin-left: 1.5rem;
  font-style: italic;
  background: #fffbeb !important;
  padding: 0.25rem 0.6rem;
  border-radius: 4px;
  border-left: 3px solid #d97706 !important;
  margin-top: 0.25rem;
  font-weight: 600;
}

.ticket-footer {
  margin-top: 1.2rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.ticket-btn {
  flex: 1;
  padding: 0.75rem;
  border: none;
  border-radius: 9999px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  text-align: center;
}

.btn-start {
  background: #f59e0b !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(245, 158, 11, 0.25) !important;
}

.btn-start:hover {
  background: #d97706 !important;
  box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4) !important;
  transform: translateY(-2px);
}

.btn-finish {
  background: #10b981 !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.25) !important;
}

.btn-finish:hover {
  background: #059669 !important;
  box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4) !important;
  transform: translateY(-2px);
}

.btn-dispatch {
  background: #E4002B !important;
  color: #ffffff !important;
  box-shadow: 0 4px 12px rgba(228, 0, 43, 0.25) !important;
}

.btn-dispatch:hover {
  background: #b8001f !important;
  box-shadow: 0 6px 16px rgba(228, 0, 43, 0.4) !important;
  transform: translateY(-2px);
}

/* Alarm Modal Alerta */
.alarma-overlay {
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(17, 24, 39, 0.75) !important;
  backdrop-filter: blur(8px);
}

.alarma-overlay.open {
  display: flex !important;
}

.alarma-modal-card {
  background: #ffffff !important;
  border: 3px solid #E4002B !important;
  border-radius: 20px;
  width: 90%;
  max-width: 500px;
  padding: 3rem 2rem;
  box-shadow: 0 20px 50px rgba(228, 0, 43, 0.25) !important;
  text-align: center;
  animation: modalPulse 1.5s infinite ease-in-out, modalSlideUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes modalPulse {
  0% { box-shadow: 0 0 20px rgba(228, 0, 43, 0.2); border-color: #E4002B; }
  50% { box-shadow: 0 0 40px rgba(228, 0, 43, 0.45); border-color: #ff3355; }
  100% { box-shadow: 0 0 20px rgba(228, 0, 43, 0.2); border-color: #E4002B; }
}

.alarma-title {
  color: #E4002B !important;
  font-size: 2.2rem;
  font-weight: 900;
  margin-bottom: 1rem;
  font-family: 'Playfair Display', serif;
  animation: textFlash 1s infinite alternate;
}

@keyframes textFlash {
  from { opacity: 1; transform: scale(1); }
  to { opacity: 0.8; transform: scale(1.03); }
}

.alarma-text {
  font-size: 1.1rem;
  color: #111827 !important;
  margin-bottom: 2rem;
  font-weight: 600;
}

.btn-apagar-alarma {
  font-size: 1.1rem;
  padding: 0.8rem 2.5rem;
  background: #10b981 !important;
  color: white !important;
  border: none;
  cursor: pointer;
  border-radius: 9999px;
  font-weight: bold;
  transition: all 0.2s ease;
  box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

.btn-apagar-alarma:hover {
  background: #059669 !important;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(16, 185, 129, 0.6);
}

@media (max-width: 768px) {
  .cocina-header {
    padding: 1rem 1.5rem;
    flex-direction: column;
    gap: 1rem;
    text-align: center;
  }
  .cocina-header-title-box {
    flex-direction: column;
    gap: 0.5rem;
  }
  .kanban-board {
    padding: 1rem;
    gap: 1.2rem;
    height: auto;
  }
  .kanban-column {
    max-height: none;
  }
}

.ticket-status-ready {
  font-size: 0.85rem;
  color: #059669 !important;
  font-weight: bold;
  border: 1px solid #a7f3d0 !important;
  background: #ecfdf5 !important;
  padding: 0.4rem 0.8rem;
  border-radius: 6px;
  display: inline-block;
  text-align: center;
  width: 100%;
}
