* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: #0f1115;
  color: #eef1f6;
}

header,
.panel {
  max-width: 1200px;
  margin: 0 auto;
  padding: 24px;
}

header {
  padding-bottom: 0;
}

h1,
h2 {
  margin: 0 0 8px;
}

p {
  margin: 0;
  color: #b8c0cc;
}

.panel {
  background: #171a21;
  border: 1px solid #2a3140;
  border-radius: 12px;
  margin-top: 20px;
}

.upload-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: end;
}

.file-label,
.inline-label {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.inline-label {
  min-width: 120px;
}

input[type="file"],
input[type="number"] {
  background: #0f1115;
  color: #eef1f6;
  border: 1px solid #394055;
  border-radius: 8px;
  padding: 10px 12px;
}

button {
  background: #3358d4;
  color: white;
  border: 0;
  border-radius: 8px;
  padding: 10px 16px;
  cursor: pointer;
}

button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.ga-capacity-intro {
  margin-bottom: 16px;
}

.ga-capacity-list {
  display: grid;
  gap: 12px;
}

.ga-capacity-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border: 1px solid #2a3140;
  border-radius: 8px;
  background: #12151c;
}

.ga-capacity-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 180px;
}

.ga-capacity-label strong {
  color: #eef1f6;
  font-size: 15px;
}

.ga-capacity-label span {
  color: #9aa3b2;
  font-size: 13px;
}

.ga-capacity-input {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ga-capacity-input input {
  width: 120px;
}

.status {
  flex: 1 1 100%;
}

.hidden {
  display: none;
}

pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: #0f1115;
  border-radius: 8px;
  padding: 12px;
  overflow: auto;
}

.preview-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 16px;
}

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

.preview-wrap,
.preview-viewport {
  width: 100%;
  background: #0b0d11;
  border: 1px solid #2a3140;
  border-radius: 8px;
  overflow: hidden;
}

.preview-wrap {
  height: min(70vh, 760px);
  background: #f5f6f7;
}

.preview-viewport {
  display: flex;
  flex-direction: column;
  height: min(70vh, 760px);
}

.preview-viewport-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border-bottom: 1px solid #2a3140;
  background: #12151c;
}

.preview-viewport-toolbar button {
  min-width: 36px;
  padding: 8px 12px;
}

.zoom-label {
  margin-left: auto;
  font-size: 13px;
  color: #b8c0cc;
  min-width: 48px;
  text-align: right;
}

.preview-viewport-stage {
  position: relative;
  flex: 1;
  min-height: 0;
  background: #f5f6f7;
  cursor: grab;
  touch-action: none;
}

.preview-viewport-stage.is-panning {
  cursor: grabbing;
}

#previewSvg,
#sectionPreviewSvg {
  width: 100%;
  height: 100%;
  display: block;
}

.hint {
  margin-top: 12px;
  font-size: 14px;
}

.seat-dot {
  fill: #3358d4;
}

.seat-dot-interactive {
  cursor: pointer;
  pointer-events: all;
}

.seat-dot-interactive:hover {
  fill: #1f3fbf;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.seat-tooltip {
  position: absolute;
  z-index: 3;
  max-width: calc(100% - 16px);
  padding: 8px 12px;
  border-radius: 6px;
  background: rgba(18, 21, 28, 0.94);
  border: 1px solid #3e8bf7;
  color: #f5f7fb;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  pointer-events: none;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
  white-space: nowrap;
}

.section-hit {
  fill: #3e8bf7;
  fill-opacity: 0;
  stroke-opacity: 0;
  pointer-events: none;
}

.section-hit:hover {
  fill-opacity: 0.18;
  stroke-opacity: 0.35;
}

.section-ga {
  fill: rgba(51, 88, 212, 0.35);
  stroke: #ffffff;
  stroke-width: 2;
}

.section-preview-hit {
  fill: #3e8bf7;
  stroke: rgba(255, 255, 255, 0.95);
  stroke-width: 2;
}

.section-preview-ga {
  fill: rgba(51, 88, 212, 0.35);
  stroke: #ffffff;
  stroke-width: 2;
}

.section-label-text,
.section-label-art {
  pointer-events: none;
}

.highlight-preview-wrap {
  margin-top: 12px;
  padding: 16px;
  border-radius: 8px;
  background: #f5f6f7;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 280px;
}

#highlightPreviewImage {
  max-width: 100%;
  max-height: 420px;
  display: block;
}

.highlight-picker {
  min-width: 220px;
}

.highlight-picker select {
  min-width: 160px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid #2a3140;
  background: #12151c;
  color: #f5f7fb;
}

.measure-svg {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.sell-order-panel .preview-header {
  align-items: center;
}

.sell-order-legend {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
  color: #b8c0cc;
}

.legend-gradient {
  width: 120px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(
    90deg,
    rgba(227, 81, 81, 1),
    rgba(84, 227, 141, 0.58),
    rgba(85, 227, 227, 0.71),
    rgba(86, 151, 227, 0.84),
    rgba(110, 81, 227, 1)
  );
}

.sell-order-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: end;
  margin-bottom: 16px;
}

.secondary-btn {
  background: #2a3140;
}

.floor-setup {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 16px;
}

.floor-card {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 16px;
  border: 1px solid #394055;
  border-radius: 10px;
  background: #12151c;
}

.floor-card.active-floor {
  border-color: #5478f1;
  box-shadow: 0 0 0 1px rgba(84, 120, 241, 0.35);
}

.floor-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.floor-selected-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.floor-chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  color: white;
  font-size: 13px;
}

.sell-order-viewport {
  width: 100%;
  background: #0b0d11;
  border: 1px solid #2a3140;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: min(70vh, 760px);
}

#sellOrderStage {
  position: relative;
}

#sellOrderSvg {
  width: 100%;
  height: 100%;
  display: block;
}

.sell-order-section {
  cursor: pointer;
}

.sell-order-section:hover {
  fill-opacity: 0.12;
  stroke-opacity: 0.35;
}

.sell-order-hotspot {
  position: absolute;
  width: 34px;
  height: 34px;
  transform: translate(-50%, -50%);
  pointer-events: auto;
  z-index: 2;
}

.sell-order-hotspot-inner {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 3px solid white;
  background: rgba(227, 81, 81, 0.95);
  box-shadow: 0 0 0 6px rgba(227, 81, 81, 0.25);
  animation: hotspotPulse 1.6s ease-in-out infinite;
}

@keyframes hotspotPulse {
  0%,
  100% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
}
