/**
 * Enterprise Cafeteria POS System
 * Kitchen Display System (KDS) CSS
 */

.kds-container {
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  background: #1e252d;
  color: #f8fafc;
  overflow: hidden;
}

.kds-header {
  height: 52px;
  background: linear-gradient(180deg, #2b3541 0%, #1c232b 100%);
  border-bottom: 2px solid #3b4754;
  padding: 0 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.kds-filters {
  display: flex;
  gap: 8px;
}

.kds-station-btn {
  padding: 6px 14px;
  font-size: var(--font-size-sm);
  font-weight: 700;
  border-radius: var(--radius-sm);
  background: #2d3844;
  color: #cbd5e1;
  border: 1px solid #485666;
  cursor: pointer;
  transition: all 0.15s ease;
}

.kds-station-btn.active {
  background: var(--bg-primary-glossy);
  border-color: #1b5e20;
  color: #ffffff;
}

.kds-stats-summary {
  display: flex;
  gap: 16px;
  font-size: var(--font-size-sm);
  font-weight: 700;
}

.kds-stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* KDS Tickets Board */
.kds-board {
  flex: 1;
  padding: 14px;
  overflow-x: auto;
  overflow-y: hidden;
  display: flex;
  gap: 14px;
  align-items: stretch;
}

.kds-ticket {
  width: 290px;
  min-width: 290px;
  background: #28313c;
  border: 1px solid #434f5e;
  border-radius: var(--radius-md);
  display: flex;
  flex-direction: column;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.kds-ticket-header {
  padding: 10px 12px;
  background: #34404e;
  border-bottom: 1px solid #434f5e;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kds-ticket-token {
  font-size: var(--font-size-xl);
  font-weight: 900;
  color: #4ade80;
  font-family: var(--font-mono);
}

.kds-ticket-meta {
  font-size: 11px;
  color: #94a3b8;
  line-height: 1.2;
}

.kds-timer-badge {
  padding: 3px 8px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-weight: 800;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.kds-timer-badge.timer-normal {
  background: #14532d;
  color: #86efac;
}

.kds-timer-badge.timer-warning {
  background: #78350f;
  color: #fde047;
  animation: pulseWarning 1.5s infinite;
}

.kds-timer-badge.timer-danger {
  background: #7f1d1d;
  color: #fca5a5;
  animation: pulseDanger 1s infinite;
}

.kds-ticket-body {
  flex: 1;
  overflow-y: auto;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.kds-item-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed #3a4755;
  cursor: pointer;
}

.kds-item-check {
  margin-top: 2px;
  accent-color: #22c55e;
  cursor: pointer;
}

.kds-item-details {
  flex: 1;
}

.kds-item-name {
  font-size: var(--font-size-md);
  font-weight: 700;
  color: #f1f5f9;
}

.kds-item-qty {
  font-weight: 800;
  color: #38bdf8;
  margin-right: 4px;
}

.kds-item-notes {
  font-size: 11px;
  color: #fbbf24;
  font-style: italic;
  margin-top: 2px;
}

.kds-ticket-footer {
  padding: 8px 10px;
  background: #1e2630;
  border-top: 1px solid #3a4755;
  display: flex;
  gap: 6px;
}

.kds-bump-btn {
  flex: 1;
  height: 38px;
  font-size: 12px;
  font-weight: 800;
}

@keyframes pulseWarning {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

@keyframes pulseDanger {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.8; transform: scale(1.02); }
}
