:root {
  --free: #ffffff;
  --free-border: #10b981;
  --selected: #0c4a6e;
  --selected-border: #083344;
  --held: #ffca28;
  --held-border: #f9a825;
  --sold: #e57373;
  --sold-border: #c62828;
  --cross: #dbeafe;
  --cross-border: #3b82f6;
  --surcharge: #bbf7d0;
  --surcharge-border: #16a34a;
}
.khoang-grid {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 8px;
}
.khoang-box {
  flex: 0 0 auto;
  border: 1px solid #ddd;
  border-radius: 6px;
  padding: 6px;
  display: flex;
  flex-direction: column-reverse;
  gap: 4px;
  min-width: 76px;
}
.khoang-box .khoang-label {
  text-align: center;
  font-size: 10px;
  color: #888;
  margin-top: 4px;
}
.tier-row {
  display: flex;
  gap: 4px;
}
.flat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
  gap: 6px;
}
.ngoi-mem-grid {
  display: flex;
  align-items: flex-start;
  gap: 0;
  overflow-x: auto;
  padding-bottom: 8px;
}
.ngm-side {
  display: grid;
  grid-template-rows: auto auto 22px auto auto;
  row-gap: 2px;
  column-gap: 4px;
  flex: 0 0 auto;
}
.ngm-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}
.ngm-aisle {
  flex: 0 0 auto;
  width: 22px;
  align-self: stretch;
  margin: 0 8px;
  display: grid;
  grid-template-rows: auto auto 22px auto auto;
}
.ngm-table {
  border-radius: 6px;
  height: 70%;
  align-self: center;
  justify-self: center;
  width: 100%;
  background:
    linear-gradient(
      180deg,
      #ebd4b8,
      #ddc1a6);
  border: 1px solid #cbb59e;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.25);
}
.ngm-table-top {
  grid-row: 1 / 3;
}
.ngm-table-bottom {
  grid-row: 4 / 6;
}
.ngm-phu-label {
  margin-top: 12px;
  margin-bottom: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #666;
}
.nml34-wrap,
.nml32-wrap {
  overflow-x: auto;
}
.scroll-wrapper {
  width: 100%;
  overflow-x: auto;
  padding-bottom: 10px;
}
.car-container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: max-content;
  min-width: 100%;
  min-height: 340px;
  border: 3px solid #12305c;
  border-radius: 14px;
  background: #fff;
  padding: 14px 20px;
  gap: 40px;
}
.top-section,
.bottom-section {
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
}
.top-section {
  align-items: flex-start !important;
  gap: 10px !important;
}
.bottom-section {
  align-items: flex-end !important;
  gap: 15px;
}
.quay-bar {
  flex: 0 0 auto;
  width: 90px;
  height: 150px;
  align-self: flex-start !important;
  background: #fff;
  border: 1px solid #ccc;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #888;
  font-size: 12px;
  text-align: center;
}
.nml34-top-seats {
  flex: 1;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: nowrap;
}
.back-to-back {
  display: flex;
  flex-direction: row;
  gap: 0;
  flex: 0 0 auto;
}
.col-group {
  display: flex;
  flex-direction: column;
  gap: 8px !important;
  flex: 0 0 auto;
  height: auto !important;
}
.col-cluster {
  display: flex;
  flex-direction: row;
  align-items: center !important;
  gap: 15px;
  flex: 0 0 auto;
}
.table-large {
  width: 24px !important;
  height: 24px !important;
  border-radius: 50%;
  background-color: #999;
  flex: 0 0 auto;
  margin: 0 !important;
}
.table-oval-row {
  width: 45px !important;
  height: 25px !important;
  border-radius: 20px;
  background-color: #999;
  flex: 0 0 auto !important;
  margin: 0 10px !important;
}
.nml32-wrap .col-cluster {
  display: flex;
  flex-direction: row;
  align-items: center !important;
  gap: 0 !important;
  flex: 0 0 auto;
}
.vip-cluster {
  position: relative;
  display: flex;
  flex-direction: column;
  flex: 0 0 auto;
  align-items: center !important;
  justify-content: flex-end;
  gap: 22px !important;
  height: auto !important;
}
.vip-row-top,
.vip-row-bottom {
  display: flex;
  justify-content: center !important;
  width: 100% !important;
}
.vip-row-top {
  flex-direction: row;
  align-items: center;
  gap: 45px !important;
}
.vip-row-bottom {
  flex-direction: row;
  align-items: center;
  gap: 0;
}
.vip-cluster .table-oval {
  position: absolute !important;
  top: 50% !important;
  left: 50% !important;
  transform: translate(-50%, -50%) !important;
  margin: 0 !important;
  z-index: 2;
}
.seat.seat-left {
  border-left: 4px solid #8b4513;
}
.seat.seat-right {
  border-right: 4px solid #8b4513;
}
.top-section .table-round,
.nml34-top-seats .table-round {
  align-self: flex-start !important;
  margin-top: 22px !important;
}
.bottom-section .table-round {
  align-self: flex-end;
  margin-bottom: 20px !important;
}
.table-round {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: #999;
  flex: 0 0 auto;
}
.table-oval {
  width: 40px !important;
  height: 20px !important;
  border-radius: 20px !important;
  background-color: #999;
  flex: 0 0 auto !important;
}
.seat-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
}
.seat {
  width: 36px;
  height: 36px;
  border-radius: 6px;
  border: 2px solid var(--sold-border);
  background: var(--sold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  cursor: pointer;
  position: relative;
  color: #333;
  transition:
    background-color 0.35s ease,
    border-color 0.35s ease,
    transform 0.2s ease;
}
.seat.free {
  background: var(--free);
  border-color: var(--free-border);
  color: #047857;
}
.seat.selected {
  background: var(--selected);
  border-color: var(--selected-border);
  color: #fff;
  font-weight: 700;
}
.seat.held {
  background: var(--held);
  border-color: var(--held-border);
  color: #6d4c00;
}
.seat.sold {
  background: var(--sold);
  border-color: var(--sold-border);
  color: #fff;
}
.seat.cross_segment {
  background: var(--cross);
  border-color: var(--cross-border);
  color: #1e40af;
}
.seat.seat-dang-giu {
  pointer-events: none;
  opacity: .55;
  cursor: progress;
  animation: seat-dang-giu-nhap 1s ease-in-out infinite;
}
@keyframes seat-dang-giu-nhap {
  50% {
    opacity: .28;
  }
}
@media (prefers-reduced-motion: reduce) {
  .seat.seat-dang-giu {
    animation: none;
  }
}
.seat.surcharge {
  background: var(--surcharge);
  border-color: var(--surcharge-border);
  color: #14532d;
}
.seat.seat-de-xuat {
  outline: 3px dashed var(--accent);
  outline-offset: 2px;
  z-index: 1;
  animation: seat-de-xuat-tho 1.6s ease-in-out infinite;
}
@keyframes seat-de-xuat-tho {
  50% {
    outline-offset: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .seat.seat-de-xuat {
    animation: none;
  }
}
.seat.disabled {
  cursor: not-allowed;
}
@keyframes seat-pulse {
  0% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65);
  }
  40% {
    transform: scale(1.16);
    box-shadow: 0 0 0 6px rgba(255, 255, 255, 0);
  }
  100% {
    transform: scale(1);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0);
  }
}
.seat.seat-just-changed {
  animation: seat-pulse 0.55s ease-out;
}
@keyframes seat-selected-breathe-light {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(12, 74, 110, 0.6);
  }
  50% {
    box-shadow: 0 0 11px 5px rgba(12, 74, 110, 0.30);
  }
}
@keyframes seat-selected-breathe-dark {
  0%, 100% {
    box-shadow: 0 0 0 0 rgba(56, 189, 248, 0.7);
  }
  50% {
    box-shadow: 0 0 10px 4px rgba(56, 189, 248, 0.14);
  }
}
.seat.selected {
  animation: seat-selected-breathe-light 1.8s ease-in-out infinite;
}
html[data-theme=dark] .seat.selected {
  animation-name: seat-selected-breathe-dark;
}
.legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 12px;
  font-size: 12px;
  color: #555;
}
.legend .sw {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 3px;
  margin-right: 4px;
  vertical-align: middle;
}
html[data-theme=dark] .khoang-box,
html[data-theme=dark] .car-container,
html[data-theme=dark] .quay-bar {
  background: #1b232d;
  border-color: #2c3644;
  color: #ddd;
}
html[data-theme=dark] .khoang-box .khoang-label,
html[data-theme=dark] .ngm-phu-label,
html[data-theme=dark] .legend {
  color: #8a96a3;
}
