.bar-board {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(340px, .85fr);
  gap: 22px;
  align-items: start;
}

.bar-ticket-grid,
.bar-history {
  display: grid;
  gap: 14px;
}

.bar-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.bar-live-status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #eef4ef;
  color: var(--green);
  font-weight: 900;
  padding: 9px 13px;
}

.bar-live-status[data-state="changed"] {
  background: #fff3c8;
  color: #675822;
}

.bar-live-status[data-state="error"] {
  background: #f7d9d7;
  color: #8b2929;
}

.bar-live-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 0 currentColor;
  animation: bar-live-pulse 1.7s infinite;
}

@keyframes bar-live-pulse {
  70% {
    box-shadow: 0 0 0 9px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}

.bar-ticket {
  background: white;
  border: 2px solid var(--ink);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 10px 28px #17211b14;
}

.bar-ticket.processed {
  border-color: var(--line);
  opacity: .86;
}

.bar-ticket.cancelled {
  background: #fff7f6;
  border-color: #f0bbb7;
}

.bar-ticket-head {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-start;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.bar-ticket-head h2 {
  margin: 2px 0 4px;
  font-size: 1.7rem;
}

.bar-arrived,
.bar-open-timer {
  color: var(--red);
  font-weight: 900;
}

.bar-open-timer {
  text-align: right;
  line-height: 1.1;
}

.bar-open-timer strong {
  display: block;
  color: var(--red);
  font-size: 2rem;
  letter-spacing: -.04em;
  font-variant-numeric: tabular-nums;
}

.bar-handled {
  margin-top: 5px;
  padding: 8px 10px;
  border-radius: 10px;
  background: #d9f2df;
  color: var(--green);
  font-weight: 900;
}

.bar-ticket-meta {
  display: grid;
  gap: 7px;
  justify-items: end;
  text-align: right;
}

.bar-ticket-meta strong {
  font-size: 1.35rem;
}

.bar-status {
  display: inline-block;
  border-radius: 99px;
  padding: 5px 10px;
  font-size: .78rem;
  font-weight: 900;
}

.bar-status.paid {
  background: #d9f2df;
  color: #176b4b;
}

.bar-status.account {
  background: #fff3c8;
  color: #675822;
}

.bar-status.cancelled {
  background: #f7d9d7;
  color: #8b2929;
}

.bar-lines {
  display: grid;
  gap: 9px;
  padding: 14px 0;
}

.bar-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  background: #f7f8f5;
}

.bar-ticket-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.refund-warning {
  color: var(--red);
  font-weight: 900;
}

.bar-dialog,
.confirm-dialog {
  width: min(92vw, 520px);
  padding: 0;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 20px 80px #17211b55;
}

.bar-dialog::backdrop,
.confirm-dialog::backdrop {
  background: #17211b99;
  backdrop-filter: blur(3px);
}

.bar-add-item-form,
.bar-pin-form,
.confirm-dialog-card {
  position: relative;
  padding: 28px;
}

.confirm-dialog-card p {
  margin: 12px 0;
  color: var(--muted);
}

.confirm-dialog-card p strong {
  color: var(--ink);
  font-size: 1.1rem;
}

@media(max-width: 980px) {
  .bar-board {
    grid-template-columns: 1fr;
  }
}
