/* ═══════════════════════════════════════════════════════════
   PIXEL BLACK RESTAURANT ERP — KDS (Kitchen Display System)
   Dark, high-contrast kitchen screen
   ═══════════════════════════════════════════════════════════ */

/* ── KDS SHELL ── */
.kds-shell {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 54px);   /* full height minus green header */
  overflow: hidden;
  background: #0D0D0D;
  color: #fff;
}

/* ── KDS TOPBAR ── */
.kds-topbar {
  height: 48px;
  background: #161616;
  border-bottom: 1px solid #2A2A2A;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 14px;
  flex-shrink: 0;
}

.kds-tab {
  height: 28px; padding: 0 14px;
  border-radius: 6px;
  font-size: 0.72rem; font-weight: 700;
  color: #666; cursor: pointer; transition: 0.15s;
  display: flex; align-items: center; gap: 5px;
  border: 1px solid transparent;
}
.kds-tab:hover { color: #aaa; }
.kds-tab.active { background: #252525; border-color: #3A3A3A; color: #fff; }
.kds-tab .kt-badge {
  background: #2A2A2A; color: #aaa;
  font-size: 0.58rem; font-weight: 800;
  padding: 1px 5px; border-radius: 99px;
  min-width: 16px; text-align: center;
}
.kds-tab.active .kt-badge { background: var(--green); color: #fff; }

.kds-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.kds-clock {
  font-size: 1rem; font-weight: 800; color: #fff;
  letter-spacing: 1px; font-variant-numeric: tabular-nums;
}
.kds-date { font-size: 0.65rem; color: #555; font-weight: 500; }

/* ── LEGEND ── */
.kds-legend {
  display: flex; align-items: center; gap: 12px;
  font-size: 0.62rem; color: #555; font-weight: 600;
}
.kl-item { display: flex; align-items: center; gap: 5px; }
.kl-dot  { width: 9px; height: 9px; border-radius: 2px; }
.kl-dot.fresh  { background: var(--green);  }
.kl-dot.normal { background: var(--gold);   }
.kl-dot.urgent { background: var(--orange); }
.kl-dot.overdue{ background: var(--red);    }

/* ── KDS GRID ── */
.kds-grid-wrap {
  flex: 1; overflow-y: auto; padding: 14px;
}
.kds-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  align-items: start;
}

/* ── KOT TICKET ── */
.kot-card {
  background: #1A1A1A;
  border: 1.5px solid #2A2A2A;
  border-radius: 10px;
  overflow: hidden;
  transition: 0.2s;
  position: relative;
  border-top: 4px solid var(--green);
}
.kot-card.normal  { border-top-color: var(--gold); }
.kot-card.urgent  { border-top-color: var(--orange); }
.kot-card.overdue {
  border-top-color: var(--red);
  animation: urgentPulse 1.5s ease-in-out infinite;
}
@keyframes urgentPulse {
  0%,100% { box-shadow: none; }
  50%      { box-shadow: 0 0 20px rgba(239,68,68,0.3); }
}

/* Ticket header */
.kot-head {
  padding: 10px 12px;
  background: #222;
  border-bottom: 1px solid #2E2E2E;
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 8px;
}
.kot-left { display: flex; flex-direction: column; gap: 2px; }
.kot-id   { font-size: 0.8rem; font-weight: 800; color: #fff; letter-spacing: 0.3px; }
.kot-meta { font-size: 0.62rem; color: #666; display: flex; align-items: center; gap: 6px; }
.kot-type-badge {
  display: inline-flex; align-items: center;
  padding: 1px 6px; border-radius: 3px;
  font-size: 0.58rem; font-weight: 700;
}
.kot-type-badge.dine   { background: rgba(0,166,81,0.2);  color: var(--green); }
.kot-type-badge.take   { background: rgba(59,130,246,0.2); color: var(--blue); }
.kot-type-badge.del    { background: rgba(249,115,22,0.2); color: var(--orange); }

/* Timer */
.kot-timer-wrap { text-align: right; flex-shrink: 0; }
.kot-timer {
  font-size: 1.2rem; font-weight: 900;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.kot-timer.fresh  { color: var(--green); }
.kot-timer.normal { color: var(--gold); }
.kot-timer.urgent { color: var(--orange); }
.kot-timer.overdue{ color: var(--red); }
.kot-timer-label  { font-size: 0.55rem; color: #555; text-transform: uppercase; letter-spacing: 0.5px; margin-top: 2px; }

/* Ticket body — items */
.kot-items {
  padding: 10px 12px;
  display: flex; flex-direction: column; gap: 7px;
}
.kot-item {
  display: flex; align-items: center; gap: 8px;
}
.kot-qty {
  width: 26px; height: 26px; border-radius: 6px;
  background: #2E2E2E; color: #fff;
  font-size: 0.75rem; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.kot-item-name { font-size: 0.82rem; font-weight: 700; color: #EFEFEF; flex: 1; }
.kot-item-veg  { flex-shrink: 0; }
.kot-veg-ind {
  display: inline-flex; align-items: center; justify-content: center;
  width: 13px; height: 13px; border-radius: 2px;
}
.kot-veg-ind::after { content: ''; width: 6px; height: 6px; border-radius: 50%; }
.kot-veg-ind.veg    { border: 1.5px solid var(--green); }
.kot-veg-ind.veg::after { background: var(--green); }
.kot-veg-ind.nonveg { border: 1.5px solid var(--red); }
.kot-veg-ind.nonveg::after { background: var(--red); }

/* Notes row */
.kot-notes {
  margin: 0 12px 8px;
  padding: 6px 8px;
  background: #111;
  border-radius: 5px;
  font-size: 0.65rem; color: #aaa;
  border-left: 3px solid var(--gold);
  display: none;
}
.kot-notes.has-note { display: block; }

/* Ticket footer */
.kot-footer {
  padding: 8px 10px;
  border-top: 1px solid #2A2A2A;
  display: flex; gap: 7px; align-items: center;
  background: #161616;
}
.kot-done-btn {
  flex: 1; height: 34px; border-radius: 7px;
  background: var(--green); border: none;
  color: #fff; font-size: 0.75rem; font-weight: 700;
  cursor: pointer; transition: 0.15s;
  display: flex; align-items: center; justify-content: center; gap: 5px;
}
.kot-done-btn:hover { background: var(--green-dk); }

.kot-recall-btn {
  height: 34px; padding: 0 10px; border-radius: 7px;
  background: #222; border: 1px solid #333;
  color: #888; font-size: 0.65rem; font-weight: 700;
  cursor: pointer; transition: 0.15s;
}
.kot-recall-btn:hover { border-color: #555; color: #ccc; }

/* ── READY SECTION ── */
.ready-section {
  display: none;
  flex-direction: column;
  gap: 14px;
}
.ready-section.visible { display: flex; }

.ready-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 8px 14px;
  background: rgba(0,166,81,0.08);
  border: 1px solid rgba(0,166,81,0.2);
  border-radius: 8px;
  font-size: 0.8rem; font-weight: 700; color: var(--green);
}

.ready-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px;
}

.ready-card {
  background: #1A1A1A;
  border: 1px solid rgba(0,166,81,0.2);
  border-radius: 8px; padding: 10px 12px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
.ready-info .ri-id { font-size: 0.8rem; font-weight: 800; color: var(--green); }
.ready-info .ri-tbl { font-size: 0.65rem; color: #666; }
.ready-btn {
  height: 26px; padding: 0 10px; border-radius: 5px;
  background: rgba(0,166,81,0.15); border: 1px solid rgba(0,166,81,0.3);
  color: var(--green); font-size: 0.62rem; font-weight: 700;
  cursor: pointer; transition: 0.15s;
}
.ready-btn:hover { background: var(--green); color: #fff; }

/* ── EMPTY STATE ── */
.kds-empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 80px 20px;
  color: #333;
}
.kds-empty-icon { font-size: 3rem; margin-bottom: 12px; }
.kds-empty-txt  { font-size: 1rem; font-weight: 700; color: #444; }
.kds-empty-sub  { font-size: 0.75rem; margin-top: 5px; color: #333; }
