* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  user-select: none;
  -webkit-user-select: none;
}

html, body {
  width: 100vw;
  height: 100vh;
  background: #0b0b0d;
  color: #f2efe9;
  font-family: -apple-system, "SF Pro Display", Inter, Helvetica, Arial, sans-serif;
  overflow: hidden;
  position: relative;
  cursor: default;
}

#stage {
  width: 1920px;
  height: 1080px;
  position: relative;
  overflow: hidden;
  transform-origin: top left;
}

.bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(1200px 600px at 20% -10%, #2a1f0a 0%, transparent 60%),
    radial-gradient(900px 500px at 100% 100%, #141a2a 0%, transparent 60%);
  pointer-events: none;
}

header {
  position: relative;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 56px;
  border-bottom: 1px solid #26262b;
}

.brand {
  display: flex;
  align-items: center;
  gap: 22px;
}

.logo {
  width: 72px;
  height: 72px;
  border-radius: 18px;
  background: linear-gradient(135deg, #d4a017, #8a6509);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 34px;
  color: #0b0b0d;
  letter-spacing: -1px;
  flex-shrink: 0;
}

.brand h1 {
  font-size: 38px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.brand p {
  color: #a9a49a;
  font-size: 18px;
  margin-top: 4px;
}

.header-right {
  display: flex;
  align-items: center;
}

.offline-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #2a1f0a;
  color: #f59e0b;
  border: 1px solid #78350f;
  border-radius: 999px;
  padding: 6px 14px;
  font-weight: 600;
  font-size: 15px;
  margin-right: 16px;
}

.offline-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #f59e0b;
  box-shadow: 0 0 10px #f59e0b;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 8px 18px;
  font-weight: 700;
  font-size: 18px;
  margin-right: 30px;
}

.status-badge.open {
  background: #0f2a18;
  color: #4ade80;
  border: 1px solid #1f5a33;
}

.status-badge.open .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4ade80;
  box-shadow: 0 0 12px #4ade80;
}

.status-badge.closed {
  background: #2a1215;
  color: #f87171;
  border: 1px solid #5a1f24;
}

.status-badge.closed .dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f87171;
  box-shadow: 0 0 12px #f87171;
}

.clock {
  text-align: right;
  min-width: 195px;
}

.clock .t {
  font-size: 46px;
  font-weight: 700;
  letter-spacing: -1px;
  font-variant-numeric: tabular-nums;
}

.clock .d {
  color: #a9a49a;
  font-size: 18px;
}

main {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  padding: 28px 56px 0;
}

.chair {
  background: #141417;
  border: 1px solid #26262b;
  border-radius: 24px;
  padding: 24px 24px 18px;
  height: 726px;
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}

.chair::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 6px;
  background: var(--c);
}

.who {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 14px;
}

.av {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--c);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 24px;
  color: #0b0b0d;
  flex-shrink: 0;
}

.who-text {
  min-width: 0;
}

.who h2 {
  font-size: 26px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.who small {
  display: block;
  color: #a9a49a;
  font-size: 15px;
  margin-top: 3px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status {
  font-size: 16px;
  padding: 6px 12px;
  border-radius: 10px;
  background: #1c1c21;
  color: #d7d2c8;
  display: inline-block;
  margin-bottom: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.status.now {
  background: #2a1f0a;
  color: #f0c14b;
  border: 1px solid rgba(240, 193, 75, 0.25);
}

.slots {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-height: 0;
  overflow: hidden;
}

.slot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 11px 16px;
  border-radius: 13px;
  background: #1a1a1f;
  font-size: 19px;
  flex-shrink: 0;
}

.slot .tm {
  font-weight: 700;
  width: 96px;
  flex-shrink: 0;
  font-variant-numeric: tabular-nums;
}

.slot .nm {
  color: #d7d2c8;
  flex: 1;
  padding-left: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.slot.busy {
  background: #1f1f25;
  opacity: 0.85;
}

.slot.open {
  background: #0f2a18;
  border: 1px solid #1f5a33;
}

.slot.open .nm {
  color: #4ade80;
  font-weight: 700;
}

.slot.off {
  background: transparent;
  border: 1px dashed #2c2c33;
  color: #6f6a62;
}

.slot.off .nm {
  color: #6f6a62;
}

.queue-block {
  margin-top: 10px;
  padding: 9px 14px;
  border-radius: 11px;
  background: #19191e;
  border: 1px solid #26262b;
  font-size: 15px;
  color: #d7d2c8;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex-shrink: 0;
}

.queue-block.has-queue {
  background: #1f1b12;
  border-color: #423315;
  color: #f2efe9;
}

.queue-block .q-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #6f6a62;
  flex-shrink: 0;
}

.queue-block.has-queue .q-badge {
  background: #f0c14b;
  box-shadow: 0 0 8px rgba(240, 193, 75, 0.6);
}

.queue-block .q-text {
  overflow: hidden;
  text-overflow: ellipsis;
}

.foot {
  margin-top: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #a9a49a;
  font-size: 15px;
  flex-shrink: 0;
}

.src {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
}

.src i {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  background: var(--c);
  display: inline-block;
  flex-shrink: 0;
}

.qr-box {
  width: 76px;
  height: 76px;
  background: #f2efe9;
  padding: 5px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
}

.qr-box svg,
.qr-box img,
.qr-box canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
}

.dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 146px;
  background: linear-gradient(180deg, rgba(11, 11, 13, 0) 0%, #0b0b0d 38%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  gap: 18px;
  padding: 0 56px 30px;
}

.app {
  width: 180px;
  height: 78px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 20px;
  font-family: inherit;
  color: #ffffff;
  border: 2px solid transparent;
  letter-spacing: 0.3px;
  cursor: pointer;
  outline: none;
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
  position: relative;
}

.app:focus,
.app.sel {
  border-color: #f0c14b;
  box-shadow: 0 0 0 4px rgba(240, 193, 75, 0.22), 0 8px 20px rgba(0, 0, 0, 0.5);
  transform: translateY(-7px);
}

.app.subtle-focus:focus,
.app.subtle-focus.sel {
  border-color: rgba(240, 193, 75, 0.65);
  box-shadow: 0 0 0 3px rgba(240, 193, 75, 0.14);
  transform: translateY(-3px);
}

/* Brand colors for the 9 required tiles */
.app.yt {
  background: #ff0000;
  color: #ffffff;
}

.app.nf {
  background: #141414;
  border-color: #2c2c30;
}
.app.nf span {
  color: #e50914;
  letter-spacing: 1px;
}

.app.pv {
  background: #00a8e1;
  color: #ffffff;
}

.app.pk {
  background: #1c1c24;
  border-color: #32323d;
  color: #ffffff;
}
.app.pk::after {
  content: "";
  position: absolute;
  bottom: 8px;
  width: 48px;
  height: 3px;
  border-radius: 2px;
  background: linear-gradient(90deg, #ffb800, #ff5200, #e0007a, #7b2cbf, #0096c7, #00b4d8);
}

.app.dp {
  background: #113ccf;
  color: #ffffff;
}

.app.hu {
  background: #1ce783;
  color: #0b0b0d;
}

.app.pm {
  background: #0064ff;
  color: #ffffff;
}

.app.kd {
  background: #17b2e7;
  color: #0b0b0d;
}

.app.br {
  background: linear-gradient(135deg, #fb542b, #c92a0e);
  color: #ffffff;
}

.hint {
  position: absolute;
  bottom: 7px;
  left: 0;
  right: 0;
  text-align: center;
  color: #6f6a62;
  font-size: 13px;
}

.toast {
  position: absolute;
  bottom: 122px;
  left: 50%;
  transform: translateX(-50%);
  background: #1c1c21;
  color: #f0c14b;
  border: 1px solid #f0c14b;
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 16px;
  font-weight: 700;
  z-index: 50;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6);
}

.hidden {
  display: none !important;
}

main .chair.sel{outline:4px solid #f0c14b;outline-offset:-2px;box-shadow:0 0 0 6px rgba(240,193,75,.18);transform:translateY(-6px);transition:transform .12s}
main .chair{cursor:pointer}
