* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
  background: #0f172a;
  color: #e2e8f0;
  line-height: 1.6;
}

.app.kds {
  max-width: 100%;
  margin: 0;
  padding: 1.5rem;
}

.kds-header {
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 0.75rem;
  padding: 1.5rem;
  margin-bottom: 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.kds-header h1 {
  font-size: 2rem;
  color: #f8fafc;
}

.header-stats {
  display: flex;
  gap: 2rem;
}

.header-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
}

.header-stat .stat-value {
  font-size: 2rem;
  font-weight: 700;
  color: #f8fafc;
}

.header-stat .stat-value.new {
  color: #ef4444;
}

.header-stat .stat-value.preparing {
  color: #fbbf24;
}

.header-stat .stat-value.time {
  color: #3b82f6;
}

.header-stat .stat-label {
  color: #94a3b8;
  font-size: 0.75rem;
  text-transform: uppercase;
  font-weight: 600;
}

.filters {
  display: flex;
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.filter-btn {
  padding: 0.875rem 1.75rem;
  background: #1e293b;
  border: 2px solid #334155;
  color: #cbd5e1;
  border-radius: 0.5rem;
  cursor: pointer;
  font-size: 1.125rem;
  font-weight: 600;
  transition: all 0.2s;
  text-transform: capitalize;
}

.filter-btn:hover {
  background: #334155;
}

.filter-btn.active {
  background: #3b82f6;
  border-color: #3b82f6;
  color: #fff;
}

.orders-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 1.5rem;
}

.order-ticket {
  background: #1e293b;
  border: 2px solid #334155;
  border-top: 6px solid;
  border-radius: 0.75rem;
  padding: 1.5rem;
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    opacity: 0;
    transform: translateY(-20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.order-ticket.urgent {
  border-top-color: #ef4444;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
  }
}

.order-ticket.high {
  border-top-color: #fbbf24;
}

.order-ticket.normal {
  border-top-color: #3b82f6;
}

.ticket-header {
  display: flex;
  justify-content: space-between;
  margin-bottom: 1.25rem;
  padding-bottom: 1rem;
  border-bottom: 2px solid #334155;
}

.ticket-info {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.order-number {
  color: #f8fafc;
  font-weight: 700;
  font-size: 1.5rem;
  font-family: 'Courier New', monospace;
}

.order-type {
  color: #94a3b8;
  font-size: 0.875rem;
  font-weight: 600;
}

.order-table {
  color: #3b82f6;
  font-size: 0.875rem;
  font-weight: 600;
}

.ticket-time {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.5rem;
}

.elapsed {
  font-size: 2rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: #334155;
}

.elapsed.normal {
  color: #10b981;
}

.elapsed.high {
  color: #fbbf24;
  background: #78350f;
}

.elapsed.urgent {
  color: #fff;
  background: #ef4444;
}

.server {
  color: #64748b;
  font-size: 0.75rem;
}

.ticket-items {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.ticket-item {
  background: #0f172a;
  padding: 1rem;
  border-radius: 0.5rem;
  border-left: 4px solid #334155;
}

.ticket-item.new {
  border-left-color: #ef4444;
}

.ticket-item.preparing {
  border-left-color: #fbbf24;
}

.ticket-item.ready {
  border-left-color: #10b981;
  opacity: 0.6;
}

.item-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}

.item-quantity {
  color: #f8fafc;
  font-weight: 700;
  font-size: 1.25rem;
  min-width: 2rem;
}

.item-name {
  color: #f8fafc;
  font-weight: 600;
  font-size: 1.125rem;
  flex: 1;
}

.item-status {
  font-size: 1.25rem;
}

.item-modifiers {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-left: 2.75rem;
  margin-bottom: 0.5rem;
}

.modifier {
  color: #fbbf24;
  font-size: 0.875rem;
  font-weight: 600;
}

.item-instructions {
  margin-left: 2.75rem;
  padding: 0.625rem 0.875rem;
  background: #1e293b;
  border-left: 3px solid #ef4444;
  border-radius: 0.25rem;
  color: #fca5a5;
  font-size: 0.875rem;
  font-weight: 600;
}

.ticket-actions {
  display: flex;
  gap: 0.75rem;
}

.btn-action {
  flex: 1;
  padding: 1rem;
  border: none;
  border-radius: 0.5rem;
  font-weight: 700;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.2s;
  text-transform: uppercase;
}

.btn-action.start {
  background: #3b82f6;
  color: #fff;
}

.btn-action.start:hover {
  background: #2563eb;
}

.btn-action.ready {
  background: #fbbf24;
  color: #78350f;
}

.btn-action.ready:hover {
  background: #f59e0b;
}

.btn-action.complete {
  background: #10b981;
  color: #fff;
}

.btn-action.complete:hover {
  background: #059669;
}

.no-orders {
  text-align: center;
  padding: 6rem 2rem;
  background: #1e293b;
  border: 2px solid #334155;
  border-radius: 0.75rem;
}

.no-orders-icon {
  font-size: 5rem;
  margin-bottom: 1rem;
}

.no-orders-text {
  color: #94a3b8;
  font-size: 1.5rem;
  font-weight: 600;
}
