/* ===== COUNTER-NET KU — STYLE.CSS ===== */
@import url('https://fonts.googleapis.com/css2?family=Kanit:wght@300;400;500;600;700&family=Share+Tech+Mono&display=swap');

:root {
  --bg-deep:    #0d0f1a;
  --bg-panel:   #13162a;
  --bg-card:    #1a1f38;
  --bg-hover:   #222846;
  --accent:     #00e5ff;
  --accent2:    #7c4dff;
  --success:    #ff3d3d;   /* แดง = มีการจอง */
  --warning:    #ffd600;   /* เหลือง = รอตรวจสลิป */
  --danger:     #ff5252;
  --text-main:  #e8eaf6;
  --text-dim:   #7986cb;
  --border:     rgba(100,120,255,0.18);
  --seat-avail: #1e2744;
  --seat-avail-border: #3d5afe;
  --seat-booked: #2a0a0a;           /* แดงเข้ม = มีการจอง */
  --seat-booked-border: #ff3d3d;    /* แดง */
  --seat-inuse:  #2a0a0a;           /* แดงเข้ม = มีการจอง */
  --seat-inuse-border: #ff3d3d;     /* แดง */
  --radius: 10px;
  --glow: 0 0 12px rgba(0,229,255,0.25);
}

*, *::before, *::after { box-sizing: border-box; margin:0; padding:0; }

body {
  font-family: 'Kanit', sans-serif;
  background: var(--bg-deep);
  color: var(--text-main);
  min-height: 100vh;
  min-width: 1200px;
  overflow-x: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  background-image:
    radial-gradient(circle at 15% 20%, rgba(124,77,255,0.07) 0%, transparent 50%),
    radial-gradient(circle at 85% 80%, rgba(0,229,255,0.05) 0%, transparent 50%);
}

/* ===== HEADER ===== */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 20px;
  background: rgba(13,15,26,0.95);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 20px rgba(0,0,0,0.4);
  width: 100%;
  min-width: 1200px;
}

.header-left { display:flex; align-items:center; gap:12px; }

.logo-badge {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
}
.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.header-title h1 {
  font-size: 16px; font-weight: 700;
  letter-spacing: 2px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.header-title .subtitle { font-size: 11px; color: var(--text-dim); }

.header-right {
  display: flex; align-items: center; gap: 14px;
  font-size: 12px;
}

.live-dot {
  width: 8px; height: 8px;
  background: #ff5252;
  border-radius: 50%;
  animation: pulse-live 1.2s ease-in-out infinite;
}
@keyframes pulse-live {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,82,82,0.6); }
  50% { box-shadow: 0 0 0 6px rgba(255,82,82,0); }
}

.live-label {
  font-family: 'Share Tech Mono', monospace;
  color: #ff5252;
  font-size: 11px;
  letter-spacing: 2px;
}

.clock {
  font-family: 'Share Tech Mono', monospace;
  font-size: 20px;
  color: var(--accent);
  letter-spacing: 2px;
  text-shadow: var(--glow);
}

.legend {
  display: flex; align-items:center; gap: 8px;
  font-size: 11px; color: var(--text-dim);
}
.leg-dot {
  width: 10px; height: 10px; border-radius: 3px;
}
.leg-dot.available { background: var(--seat-avail-border); }
.leg-dot.booked    { background: var(--seat-booked-border); }
.leg-dot.inuse     { background: var(--seat-inuse-border); }

.btn-admin {
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-dim);
  padding: 5px 12px;
  border-radius: 6px;
  font-size: 11px;
  text-decoration: none;
  transition: all .2s;
}
.btn-admin:hover {
  border-color: var(--accent);
  color: var(--accent);
}

/* ===== TOOLBAR ===== */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 20px;
  background: var(--bg-panel);
  border-bottom: 1px solid var(--border);
  gap: 10px;
  width: 100%;
  min-width: 1200px;
}
.toolbar-left, .toolbar-right { display:flex; align-items:center; gap:10px; }

.btn-cashier, .btn-food {
  padding: 7px 16px;
  border-radius: 8px;
  border: none;
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}
.btn-cashier {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  color: #fff;
  box-shadow: 0 2px 10px rgba(46,125,50,0.3);
}
.btn-cashier:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(46,125,50,0.5); }

.btn-food {
  background: linear-gradient(135deg, #e65100, #f4511e);
  color: #fff;
  box-shadow: 0 2px 10px rgba(230,81,0,0.3);
}
.btn-food:hover { transform: translateY(-1px); box-shadow: 0 4px 15px rgba(230,81,0,0.5); }

.server-box {
  display: flex; flex-direction: column; align-items:center;
  gap: 4px; font-size: 10px; color: var(--text-dim);
}
.server-light {
  width: 28px; height: 28px;
  background: #c62828;
  border-radius: 6px;
  box-shadow: 0 0 10px rgba(198,40,40,0.6);
  animation: server-blink 2s ease-in-out infinite;
}
@keyframes server-blink {
  0%,100% { opacity:1; }
  50% { opacity:.6; }
}

.room-badge {
  background: linear-gradient(135deg, #0288d1, #0097a7);
  color: #fff;
  padding: 5px 14px;
  border-radius: 8px;
  font-size: 11px;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 2px 10px rgba(2,136,209,0.3);
}

/* ===== FLOOR PLAN ===== */
.floor-plan {
  padding: 30px 30px 36px;
  width: 1100px;
  min-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  margin-top: 20px;
  background: linear-gradient(135deg, rgba(19,22,42,0.98) 0%, rgba(22,27,50,0.98) 100%);
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 20px;
  box-shadow:
    0 0 0 1px rgba(124,77,255,0.1),
    0 8px 40px rgba(0,0,0,0.4),
    inset 0 1px 0 rgba(255,255,255,0.04);
  position: relative;
}

/* มุมประดับ 4 มุม */
.floor-plan::before,
.floor-plan::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.6;
}
.floor-plan::before {
  top: 10px; left: 10px;
  border-width: 2px 0 0 2px;
  border-radius: 4px 0 0 0;
}
.floor-plan::after {
  top: 10px; right: 10px;
  border-width: 2px 2px 0 0;
  border-radius: 0 4px 0 0;
}

/* มุมล่าง 2 มุม ทำด้วย pseudo elements บน wrapper */
.floor-plan-inner::before,
.floor-plan-inner::after {
  content: '';
  position: absolute;
  width: 18px; height: 18px;
  border-color: var(--accent);
  border-style: solid;
  opacity: 0.6;
}
.floor-plan-inner::before {
  bottom: 10px; left: 10px;
  border-width: 0 0 2px 2px;
  border-radius: 0 0 0 4px;
}
.floor-plan-inner::after {
  bottom: 10px; right: 10px;
  border-width: 0 2px 2px 0;
  border-radius: 0 0 4px 0;
}

/* แถบชื่อด้านบนกรอบ */
.floor-plan-label {
  position: absolute;
  top: -13px; left: 50%;
  transform: translateX(-50%);
  background: var(--bg-deep);
  padding: 0 16px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 3px;
  color: var(--accent);
  white-space: nowrap;
  text-transform: uppercase;
  border: 1px solid rgba(0,229,255,0.2);
  border-radius: 20px;
}

.zone-section {
  margin-bottom: 22px;
}

/* ── offset แต่ละโซน (1 ช่อง = 51px) — ค่า pixel คงที่ไม่ขยับตาม viewport ── */

/* Zone A (11-22) */
.zone-a-offset {
  margin-left: 153px;
  margin-bottom: 73px;
}

/* Zone B (23-50) */
.zone-b-offset {
  margin-left: 153px;
  margin-bottom: calc(16px + 51px * 2);
}

/* Zone C (51-80) */
.zone-c-offset {
  margin-left: 51px;
  margin-top: 0;
}

/* Zone D (81-95) */
.zone-d-offset {
  margin-top: auto;
  margin-left: 51px;
}


.zone-label {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.zone-tag {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 2px;
  color: var(--accent);
  background: rgba(0,229,255,0.08);
  border: 1px solid rgba(0,229,255,0.2);
  padding: 2px 10px;
  border-radius: 4px;
}

/* ===== SEAT ===== */
.seat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.seat {
  width: 44px; height: 44px;
  display: flex; align-items:center; justify-content:center;
  border-radius: 9px;
  font-size: 13px;
  font-weight: 600;
  font-family: 'Share Tech Mono', monospace;
  cursor: pointer;
  transition: all .18s cubic-bezier(.34,1.56,.64,1);
  user-select: none;
  position: relative;
  border: 2px solid;
}

.seat.available {
  background: var(--seat-avail);
  border-color: var(--seat-avail-border);
  color: var(--accent);
}
.seat.available:hover {
  transform: scale(1.12) translateY(-2px);
  background: rgba(61,90,254,0.3);
  box-shadow: 0 4px 16px rgba(61,90,254,0.4);
}

.seat.booked {
  background: var(--seat-booked);
  border-color: var(--seat-booked-border);
  color: var(--warning);
  cursor: not-allowed;
}
.seat.booked::after {
  content: '📌';
  position: absolute;
  top: -6px; right: -6px;
  font-size: 10px;
}

.seat.inuse {
  background: var(--seat-inuse);
  border-color: var(--seat-inuse-border);
  color: var(--success);
  cursor: not-allowed;
}
.seat.inuse::after {
  content: '▶';
  position: absolute;
  top: -5px; right: -4px;
  font-size: 9px;
  color: var(--success);
}

/* ===== PENDING VERIFY — สีเหลือง ===== */
.seat.pending_verify {
  background: #1a1600;
  border-color: #ffd600;
  color: #ffd600;
  cursor: not-allowed;
  animation: pulse-yellow 1.5s ease-in-out infinite;
}
.seat.pending_verify::after {
  content: '⏳';
  position: absolute;
  top: -7px; right: -5px;
  font-size: 11px;
}
@keyframes pulse-yellow {
  0%,100% { box-shadow: 0 0 0 0 rgba(255,214,0,0); }
  50%      { box-shadow: 0 0 8px 3px rgba(255,214,0,0.3); }
}

/* ===== ZONE A MID ===== */
.zone-a-mid-wrapper {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

.zone-a-group {
  display: flex;
  flex-direction: column;
}

/* ===== ZONE L + ZONE B/C SIDE BY SIDE ===== */
.zone-lb-wrapper {
  display: flex;
  align-items: stretch;
  gap: 14px;
  margin-bottom: 18px;
}

.zone-l {
  flex-shrink: 0;
  margin-bottom: 0;
}

.zone-l-cols {
  display: flex;
  gap: 7px;
}

.side-col {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

/* Zone C/D stack — margin จัดการโดย zone-c-offset และ zone-d-offset */
.zone-bc-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.zone-b-inner {
  margin-bottom: 0;
}

.zone-c-inner {
  margin-top: auto;
  margin-bottom: 0;
}


/* ===== MODAL ===== */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(5,7,20,0.85);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity .25s;
}
.modal-overlay.active {
  opacity: 1;
  pointer-events: all;
}

.modal-box {
  background: var(--bg-panel);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 28px 32px;
  width: 100%;
  max-width: 460px;
  position: relative;
  box-shadow: 0 20px 60px rgba(0,0,0,0.6), 0 0 40px rgba(0,229,255,0.06);
  transform: scale(.94) translateY(10px);
  transition: transform .25s cubic-bezier(.34,1.56,.64,1);
}
.modal-overlay.active .modal-box {
  transform: scale(1) translateY(0);
}

.modal-close {
  position: absolute;
  top: 14px; right: 16px;
  background: none;
  border: 1px solid var(--border);
  color: var(--text-dim);
  width: 28px; height: 28px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
  transition: all .2s;
}
.modal-close:hover { color: var(--danger); border-color: var(--danger); }

.modal-header {
  display: flex; align-items:center; gap: 16px;
  margin-bottom: 22px;
}

.modal-seat-badge {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  border-radius: 14px;
  display: flex; align-items:center; justify-content:center;
  font-size: 22px; font-weight: 700; color: #fff;
  font-family: 'Share Tech Mono', monospace;
  box-shadow: 0 4px 20px rgba(0,229,255,0.3);
  flex-shrink: 0;
}

.modal-title { font-size: 20px; font-weight: 700; }
.modal-sub { font-size: 12px; color: var(--text-dim); }

.form-group { margin-bottom: 14px; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

label {
  display: block;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 5px;
  font-weight: 500;
}
.req { color: var(--danger); }

input, select {
  width: 100%;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 9px 12px;
  color: var(--text-main);
  font-family: 'Kanit', sans-serif;
  font-size: 13px;
  outline: none;
  transition: border-color .2s;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0,229,255,0.1);
}
select option { background: var(--bg-card); }

.price-summary {
  display: flex; align-items:center; justify-content:space-between;
  background: rgba(0,229,255,0.05);
  border: 1px solid rgba(0,229,255,0.15);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 14px; font-weight: 600;
}
.price-amount {
  font-size: 22px; font-weight: 700;
  color: var(--accent);
  font-family: 'Share Tech Mono', monospace;
}

.btn-confirm {
  width: 100%;
  padding: 13px;
  background: linear-gradient(135deg, var(--accent2), var(--accent));
  color: #fff;
  border: none;
  border-radius: 10px;
  font-family: 'Kanit', sans-serif;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
  letter-spacing: .5px;
  box-shadow: 0 4px 20px rgba(0,229,255,0.3);
}
.btn-confirm:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 28px rgba(0,229,255,0.45);
}
.btn-confirm:active { transform: translateY(0); }

/* ===== PAYMENT BOX ===== */
.payment-box {
  max-width: 400px;
}

.payment-info {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 16px;
  margin: 14px 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.payment-detail {
  display: flex; flex-direction: column; gap: 2px;
  font-size: 12px;
}
.payment-detail span { color: var(--text-dim); }
.payment-detail strong { font-size: 14px; }
.payment-detail.highlight strong {
  font-size: 20px;
  color: var(--success);
  font-family: 'Share Tech Mono', monospace;
}

.qr-wrapper {
  display: flex; flex-direction: column; align-items:center;
  background: #fff;
  border-radius: 14px;
  padding: 16px;
  margin: 10px 0;
}
.qr-loading {
  font-size: 13px; color: #555;
  padding: 40px 0;
}
#qr-canvas {
  border-radius: 8px;
}
.qr-shop-name {
  color: #222; font-weight: 700; font-size: 13px;
  margin-top: 8px;
}
.qr-promptpay-id {
  color: #666; font-size: 11px;
}

.payment-steps {
  display: flex; gap: 10px;
  margin: 12px 0;
  justify-content: center;
}
.step {
  display: flex; flex-direction:column; align-items:center; gap: 4px;
  font-size: 11px; color: var(--text-dim);
  text-align: center;
}
.step-num {
  width: 24px; height: 24px;
  background: var(--bg-card);
  border: 1px solid var(--accent);
  border-radius: 50%;
  display: flex; align-items:center; justify-content:center;
  color: var(--accent);
  font-size: 12px; font-weight: 700;
}

.payment-actions {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 12px;
}
.btn-paid {
  background: linear-gradient(135deg, #1b5e20, #2e7d32);
  color: #fff; border: none;
  padding: 12px; border-radius: 9px;
  font-family: 'Kanit', sans-serif;
  font-size: 14px; font-weight: 600;
  cursor: pointer; transition: all .2s;
}
.btn-paid:hover { transform: translateY(-1px); box-shadow: 0 4px 16px rgba(46,125,50,0.4); }

.btn-cancel-pay {
  background: var(--bg-card);
  color: var(--danger);
  border: 1px solid var(--danger);
  padding: 12px; border-radius: 9px;
  font-family: 'Kanit', sans-serif;
  font-size: 14px; cursor: pointer; transition: all .2s;
}
.btn-cancel-pay:hover { background: rgba(255,82,82,0.08); }

/* ===== TOAST ===== */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--bg-panel);
  border: 1px solid var(--border);
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 14px;
  z-index: 9999;
  transition: transform .3s cubic-bezier(.34,1.56,.64,1);
  box-shadow: 0 8px 30px rgba(0,0,0,0.4);
}
.toast.show { transform: translateX(-50%) translateY(0); }
.toast.success { border-color: var(--success); color: var(--success); }
.toast.warn    { border-color: var(--warning); color: var(--warning); }
.toast.error   { border-color: var(--danger);  color: var(--danger);  }

/* layout คงที่ ไม่ขยับตาม viewport */

/* ===== INFOGRAPHIC ===== */
.ig-wrap {
  margin-top: 20px;
  width: 1000px;
}
.ig-top {
  display: grid;
  grid-template-columns: 1fr 380px;
  gap: 16px;
  margin-bottom: 16px;
}
.ig-right-col { display:flex; flex-direction:column; gap:14px; }

.ig-card {
  background: linear-gradient(135deg,rgba(19,22,42,0.98),rgba(22,27,50,0.95));
  border: 1px solid rgba(100,120,255,0.18);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.25);
  position: relative;
  overflow: hidden;
}
.ig-card::before {
  content:''; position:absolute; top:-40px; right:-40px;
  width:160px; height:160px;
  background:radial-gradient(circle,rgba(124,77,255,0.06) 0%,transparent 70%);
  pointer-events:none;
}

.ig-card-hd {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid rgba(100,120,255,0.12);
}
.ig-hd-icon {
  width: 42px; height: 42px; border-radius: 12px;
  display: flex; align-items:center; justify-content:center;
  font-size: 20px; flex-shrink:0;
  box-shadow: 0 4px 14px rgba(0,0,0,0.3);
}
.ig-hd-title { font-size:15px; font-weight:700; color:var(--text-main); }
.ig-hd-sub   { font-size:11px; color:var(--text-dim); margin-top:2px; }

/* Steps */
.ig-steps { display:flex; flex-direction:column; gap:0; }
.ig-step {
  display: flex; align-items: flex-start; gap: 14px;
  padding: 8px 0;
}
.ig-step-left { display:flex; flex-direction:column; align-items:center; flex-shrink:0; }
.ig-num {
  width: 30px; height: 30px; border-radius: 50%;
  display:flex; align-items:center; justify-content:center;
  font-size: 13px; font-weight: 800; color:#fff; flex-shrink:0;
  position: relative; z-index:1;
}
.n1{background:linear-gradient(135deg,#7c4dff,#651fff);}
.n2{background:linear-gradient(135deg,#3d5afe,#1565c0);}
.n3{background:linear-gradient(135deg,#00bcd4,#0097a7);}
.n4{background:linear-gradient(135deg,#4caf50,#2e7d32);}
.n5{background:linear-gradient(135deg,#f9a825,#e65100);}
.n6{background:linear-gradient(135deg,#e53935,#b71c1c);}
.ig-vline {
  width: 2px; flex:1; min-height:22px;
  background: linear-gradient(to bottom, rgba(100,120,255,0.3), rgba(100,120,255,0.05));
  margin: 3px 0;
}
.ig-step-body { flex:1; padding-top:4px; }
.ig-step-title { font-size:13px; font-weight:600; color:var(--text-main); }
.ig-step-sub   { font-size:11px; color:var(--text-dim); margin-top:2px; }
.ig-step-ico   { font-size:20px; padding-top:4px; flex-shrink:0; }
.ig-step-last  { padding-bottom:0; }

/* Terms */
.ig-terms { display:flex; flex-direction:column; gap:10px; }
.ig-term {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 10px;
  border: 1px solid rgba(100,120,255,0.1);
}
.ig-term-icon {
  width:32px; height:32px; border-radius:8px;
  display:flex; align-items:center; justify-content:center;
  font-size:15px; flex-shrink:0;
}
.ig-term-text { font-size:12px; color:var(--text-main); line-height:1.6; padding-top:6px; }

/* Prices */
.ig-prices { display:flex; flex-direction:column; gap:6px; }
.ig-price-row {
  display:flex; justify-content:space-between; align-items:center;
  padding: 8px 12px; border-radius:9px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(100,120,255,0.08);
  transition: background .15s;
}
.ig-price-row:hover { background:rgba(255,255,255,0.06); }
.ig-price-hl {
  background: rgba(124,77,255,0.1) !important;
  border-color: rgba(124,77,255,0.3) !important;
}
.ig-pr-hr  { font-size:12px; color:var(--text-dim); }
.ig-pr-amt { font-family:'Share Tech Mono',monospace; font-size:15px; font-weight:700; color:var(--accent); }
.ig-pr-badge {
  font-size:9px; font-weight:700; letter-spacing:1px;
  background: linear-gradient(135deg,var(--accent2),var(--accent));
  color:#fff; padding:2px 8px; border-radius:10px;
}

/* Status grid */
.ig-status-grid {
  display: flex; gap: 8px; flex-wrap:wrap;
}
.ig-status { display:flex; flex-direction:column; align-items:center; gap:6px; flex:1; min-width:52px; }
.ig-seat {
  width:44px; height:44px; border-radius:10px; border:2px solid;
  display:flex; align-items:center; justify-content:center;
  font-size:12px; font-weight:700; font-family:'Share Tech Mono',monospace;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}
.ig-st-lbl { font-size:10px; color:var(--text-dim); text-align:center; }

/* Footer */
.ig-footer {
  display: flex; align-items:center; justify-content:center; gap:12px;
  padding: 14px 20px;
  background: linear-gradient(135deg,rgba(19,22,42,0.98),rgba(22,27,50,0.95));
  border: 1px solid rgba(100,120,255,0.15);
  border-radius: 14px;
  font-size: 12px; color: var(--text-dim);
}
.ig-sep { color:rgba(100,120,255,0.4); }

/* ====================================================
   BOOKING PAGE INFOGRAPHIC  (prefix: bk-)
   ==================================================== */
.bk-ig-section {
  width: 1100px; min-width: 1100px;
  margin: 0 auto 48px;
  padding-top: 32px;
}

.bk-ig-outer {
  display: grid;
  grid-template-columns: 1fr 370px;
  gap: 16px;
  margin-bottom: 14px;
}
.bk-ig-right { display:flex; flex-direction:column; gap:14px; }

/* Card */
.bk-ig-card {
  background: linear-gradient(135deg,rgba(19,22,42,0.98),rgba(22,27,50,0.95));
  border: 1px solid rgba(100,120,255,0.18);
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 4px 28px rgba(0,0,0,0.3);
  position: relative;
  overflow: hidden;
}
.bk-ig-card::before {
  content:'';
  position:absolute; top:-40px; right:-40px;
  width:160px; height:160px;
  background:radial-gradient(circle,rgba(124,77,255,0.07) 0%,transparent 70%);
  pointer-events:none;
}

/* Card header */
.bk-ig-card-hd {
  display:flex; align-items:center; gap:14px;
  padding-bottom:14px; margin-bottom:16px;
  border-bottom:1px solid rgba(100,120,255,0.12);
}
.bk-ig-icon-box {
  width:42px; height:42px; border-radius:12px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center;
  font-size:20px; box-shadow:0 4px 14px rgba(0,0,0,0.3);
}
.bk-ig-title { font-size:15px; font-weight:700; color:var(--text-main); }
.bk-ig-sub   { font-size:11px; color:var(--text-dim); margin-top:2px; }

/* Steps */
.bk-ig-steps { display:flex; flex-direction:column; }
.bk-ig-step  { display:flex; align-items:flex-start; gap:14px; padding:9px 0; }
.bk-ig-step-last { padding-bottom:0; }
.bk-ig-step-l    { display:flex; flex-direction:column; align-items:center; flex-shrink:0; }

.bk-num {
  width:30px; height:30px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:800; color:#fff; flex-shrink:0; z-index:1;
}
.bk-vline {
  width:2px; flex:1; min-height:20px;
  background:linear-gradient(to bottom,rgba(100,120,255,0.35),rgba(100,120,255,0.04));
  margin:4px 0;
}
.bk-ig-step-b  { flex:1; padding-top:4px; }
.bk-st-title   { font-size:13px; font-weight:600; color:var(--text-main); }
.bk-st-sub     { font-size:11px; color:var(--text-dim); margin-top:2px; line-height:1.5; }
.bk-st-ico     { font-size:20px; padding-top:5px; flex-shrink:0; }

/* Terms */
.bk-ig-terms { display:flex; flex-direction:column; gap:10px; }
.bk-term {
  display:flex; align-items:flex-start; gap:12px;
  padding:10px 12px; border-radius:10px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(100,120,255,0.1);
}
.bk-term-ico {
  width:32px; height:32px; border-radius:8px; flex-shrink:0;
  display:flex; align-items:center; justify-content:center; font-size:15px;
}
.bk-term-txt { font-size:12px; color:var(--text-main); line-height:1.65; padding-top:5px; }

/* Prices */
.bk-ig-prices { display:flex; flex-direction:column; gap:6px; }
.bk-pr-row {
  display:flex; justify-content:space-between; align-items:center;
  padding:8px 12px; border-radius:9px;
  background:rgba(255,255,255,0.03);
  border:1px solid rgba(100,120,255,0.08);
  transition:background .15s;
}
.bk-pr-row:hover { background:rgba(255,255,255,0.06); }
.bk-pr-hl {
  background:rgba(124,77,255,0.1) !important;
  border-color:rgba(124,77,255,0.3) !important;
}
.bk-pr-hr  { font-size:12px; color:var(--text-dim); }
.bk-pr-amt {
  font-family:'Share Tech Mono',monospace;
  font-size:15px; font-weight:700; color:var(--accent);
}
.bk-pr-badge {
  font-size:9px; font-weight:700; letter-spacing:1px;
  background:linear-gradient(135deg,var(--accent2),var(--accent));
  color:#fff; padding:2px 8px; border-radius:10px;
}

/* Status */
.bk-ig-status { display:flex; gap:8px; flex-wrap:wrap; }
.bk-st-item   { display:flex; flex-direction:column; align-items:center; gap:6px; flex:1; min-width:56px; }
.bk-seat-demo {
  width:46px; height:46px; border-radius:10px; border:2px solid;
  display:flex; align-items:center; justify-content:center;
  font-size:13px; font-weight:700;
  font-family:'Share Tech Mono',monospace;
  box-shadow:0 2px 10px rgba(0,0,0,0.3);
}
.bk-st-lbl { font-size:11px; color:var(--text-dim); text-align:center; font-weight:500; }

/* Footer */
.bk-ig-footer {
  display:flex; align-items:center; justify-content:center; gap:14px;
  padding:13px 20px;
  background:linear-gradient(135deg,rgba(19,22,42,0.98),rgba(22,27,50,0.95));
  border:1px solid rgba(100,120,255,0.15);
  border-radius:14px;
  font-size:12px; color:var(--text-dim);
}
.bk-ig-sep { color:rgba(100,120,255,0.4); }


/* ===== SLIP UPLOAD AREA (step-slip popup only) ===== */
.slip-upload-area {
  border: 2px dashed rgba(0,229,255,0.35);
  border-radius: 14px;
  background: rgba(0,229,255,0.03);
  padding: 28px 20px 20px;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  min-height: 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin: 14px 0;
  position: relative;
}
.slip-upload-area:hover,
.slip-upload-area.drag-over {
  border-color: var(--accent);
  background: rgba(0,229,255,0.07);
}
.slip-icon {
  font-size: 38px;
  line-height: 1;
  margin-bottom: 4px;
}
.slip-hint {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-main);
  margin: 0;
}
.slip-hint-sub {
  font-size: 12px;
  color: var(--text-dim);
  margin: 0;
}

/* ===== MAINTENANCE SEAT (เครื่องเสีย/ซ่อม) ===== */
.seat.maintenance {
  background: #1a1200;
  border-color: #ff8f00;
  color: #ff8f00;
  cursor: not-allowed;
  opacity: 0.8;
}
.seat.maintenance:hover {
  transform: none;
  box-shadow: none;
}
.seat.maintenance::after {
  content: '';
  position: absolute;
  top: -5px; right: -4px;
  font-size: 10px;
}


/* =====================================================================
   📱 MOBILE-FIRST RESPONSIVE LAYER (added 2026-06-04)
   ครอบคลุม: ฟอร์มจอง, modal ชำระเงิน (QR + step), modal อัปสลิป
   ===================================================================== */

@media (max-width: 600px) {

  /* ---------- Modal container ---------- */
  .modal-overlay {
    padding: 12px;
    align-items: flex-start;
    padding-top: 24px;
    overflow-y: auto;
  }
  .modal-box {
    padding: 22px 18px;
    border-radius: 16px;
    max-width: 100%;
    max-height: calc(100vh - 32px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .modal-close {
    width: 38px; height: 38px;
    font-size: 16px;
    top: 10px; right: 12px;
    border-radius: 10px;
  }
  .modal-header { gap: 12px; margin-bottom: 18px; }
  .modal-seat-badge {
    width: 52px; height: 52px;
    font-size: 18px;
    border-radius: 12px;
  }
  .modal-title { font-size: 18px; line-height: 1.3; }
  .modal-sub { font-size: 13px; line-height: 1.5; }

  /* ---------- Form: stack rows + bigger inputs ---------- */
  .form-row { grid-template-columns: 1fr; gap: 14px; }
  .form-group { margin-bottom: 16px; }
  label { font-size: 13px; margin-bottom: 7px; font-weight: 600; }
  input, select {
    padding: 13px 14px !important;
    font-size: 16px !important;   /* กัน iOS auto-zoom */
    border-radius: 10px !important;
    min-height: 48px;
  }
  /* readonly time displays */
  #f-time-start-display,
  #f-time-end-display {
    padding: 13px 12px !important;
    font-size: 15px !important;
    min-height: 48px;
  }

  /* ---------- Price summary ---------- */
  .price-summary {
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    margin: 18px 0;
  }
  .price-amount { font-size: 24px; }

  /* ---------- Confirm button ---------- */
  .btn-confirm {
    padding: 16px;
    font-size: 16px;
    border-radius: 12px;
    min-height: 54px;
  }

  /* ---------- Payment box ---------- */
  .payment-box { max-width: 100%; }
  .payment-info {
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    padding: 14px 16px;
    border-radius: 12px;
  }
  .payment-detail { font-size: 13px; }
  .payment-detail span { font-size: 12px; }
  .payment-detail strong { font-size: 15px; }
  .payment-detail.highlight strong { font-size: 24px; }

  /* QR — กว้างเต็มภายใน modal */
  .qr-wrapper { padding: 14px; border-radius: 16px; }
  #qr-canvas { width: 100% !important; height: auto !important; max-width: 260px; }
  .qr-shop-name { font-size: 14px; margin-top: 10px; }
  .qr-promptpay-id { font-size: 12px; }

  /* Payment steps — ขยายตัวเลข + ระยะห่าง */
  .payment-steps { gap: 12px; flex-wrap: wrap; margin: 16px 0; }
  .step { font-size: 12px; min-width: 60px; }
  .step-num {
    width: 32px; height: 32px;
    font-size: 14px;
  }

  /* Action buttons → stack แทน side-by-side */
  .payment-actions {
    grid-template-columns: 1fr !important;
    gap: 10px;
    margin-top: 16px;
  }
  .btn-paid, .btn-cancel-pay {
    padding: 15px !important;
    font-size: 15px !important;
    border-radius: 12px !important;
    min-height: 52px;
    font-weight: 700;
  }
  /* ปุ่มหลัก (ชำระแล้ว/ส่งสลิป) ดันมาขึ้นบน */
  .payment-actions .btn-paid { order: 0; }
  .payment-actions .btn-cancel-pay { order: 1; }

  /* ---------- Slip upload area ---------- */
  .slip-upload-area {
    min-height: 160px;
    padding: 28px 16px 20px;
    border-radius: 14px;
    border-width: 2px;
  }
  .slip-icon { font-size: 46px; margin-bottom: 6px; }
  .slip-hint { font-size: 15px; }
  .slip-hint-sub { font-size: 12px; }
  #slip-preview { max-height: 200px !important; }

  /* ---------- Step waiting (auto-approved receipt) ---------- */
  #waiting-receipt {
    max-width: 100% !important;
    padding: 16px 18px !important;
    border-radius: 14px !important;
  }
  #step-waiting .modal-title { font-size: 17px; }
  #waiting-countdown { font-size: 18px !important; }

  /* ---------- Modal seats summary chips ---------- */
  .modal-seats-summary { font-size: 13px; padding: 10px 12px; }
}

/* Very small phones (< 360px) — tighten further */
@media (max-width: 360px) {
  .modal-box { padding: 18px 14px; }
  .modal-title { font-size: 16px; }
  .modal-seat-badge { width: 46px; height: 46px; font-size: 16px; }
  .price-amount { font-size: 20px; }
  .payment-detail.highlight strong { font-size: 22px; }
  .step { font-size: 11px; min-width: 54px; }
  #qr-canvas { max-width: 220px; }
}

/* Landscape phones — ลดความสูง modal เผื่อ keyboard */
@media (max-height: 600px) and (orientation: landscape) {
  .modal-overlay { padding-top: 12px; align-items: flex-start; }
  .modal-box { max-height: calc(100vh - 24px); }
  .modal-header { margin-bottom: 12px; }
  .form-group { margin-bottom: 10px; }
}
