/* ============================================================
   Variables
   ============================================================ */
:root {
  --bg: #FBF8FF;
  --ink: #2B2438;
  --ink-soft: #756D8C;

  --violet: #B79CFF;
  --violet-deep: #8A6DFF;
  --coral: #FFB4C6;
  --coral-deep: #FF8FAD;
  --mint: #A6EBDA;
  --sky: #AEE0FF;

  --line: #E9E2FB;
  --card-bg: #FFFFFF;

  --btn-primary-bg: var(--violet-deep);
  --btn-primary-fg: #FFFFFF;
  --btn-primary-hover: #7355E6;

  --btn-tertiary-bg: #EFEAFF;
  --btn-tertiary-fg: var(--violet-deep);
  --btn-tertiary-hover: #E0D7FF;

  --btn-success-bg: #2DBF97;
  --btn-success-fg: #FFFFFF;
  --btn-success-hover: #22A882;
  --btn-success-soft-bg: #DFF7EF;
  --btn-success-soft-fg: #17604A;

  --btn-danger-bg: var(--coral-deep);
  --btn-danger-fg: #FFFFFF;
  --btn-danger-hover: #E57494;
  --btn-danger-soft-bg: #FFE9EE;
  --btn-danger-soft-fg: #A82440;

  --btn-warning-bg: #FFC857;
  --btn-warning-fg: #6B4600;
  --btn-warning-hover: #F0B93E;

  --btn-ring: rgba(138, 109, 255, 0.35);
  --btn-ring-success: rgba(45, 191, 151, 0.40);
  --btn-ring-danger: rgba(255, 143, 173, 0.45);
  --btn-ring-warning: rgba(255, 200, 87, 0.45);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
  position: relative;
  overflow-x: hidden;
  line-height: 1.5;                 /* ✅ ค่ามาตรฐานสำหรับฟอนต์ไทย */
}

h1, h2, .logo, .eyebrow, .artist { font-family: "Noto Sans Thai", "Segoe UI", sans-serif; }

a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; }

/* ============================================================
   Uniform buttons — สูง 46px เฉพาะ class ที่ระบุ
   ✅ line-height: 1.5 ไม่ตัดสระไทย
   ============================================================ */
.btn,
.btn-dark,
.btn-outline,
.btn-approve,
.btn-approve-outline,
.btn-reject,
.btn-reject-filled,
.btn-warning,
.btn-submit,
.btn-google,
.btn-download,
.row-btn,
.row-btn-view,
.row-btn-confirm,
.row-btn-issue,
.row-btn-reopen,
.btn-clear,
.confirm-btn,
.role-btn,
.custom-select-btn,
a.btn,
a.btn-dark,
a.btn-outline,
a.row-btn,
a[class*="btn-"] {
  height: 46px;
  min-height: 46px;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 18px;
  line-height: 1.5;
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  white-space: nowrap;
  text-align: center;
  vertical-align: middle;
}

/* ============================================================
   Uniform inputs — เฉพาะ input ในฟอร์มหลัก
   ============================================================ */
.search-bar-wrap input,
.listings-toolbar input,
.listings-toolbar select,
.search-toolbar > input,
.filter-group input,
.filter-group select,
.auth-form-box input,
.sell-form-box input[type="text"],
.sell-form-box input[type="number"],
.sell-form-box input[type="date"],
.sell-form-box select,
.checkout-form-box input[type="text"],
.checkout-form-box select,
.profile-form-panel input {
  height: 46px;
  min-height: 46px;
  box-sizing: border-box;
  padding: 0 14px;
  line-height: 1.5;
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
}

/* ============================================================
   Global button states
   ============================================================ */
button:focus-visible,
.btn:focus-visible,
.row-btn:focus-visible,
.confirm-btn:focus-visible {
  outline: 3px solid var(--btn-ring);
  outline-offset: 2px;
  border-radius: inherit;
}
.btn-approve:focus-visible,
.btn-approve-outline:focus-visible,
.row-btn-reopen:focus-visible {
  outline-color: var(--btn-ring-success);
}
.btn-reject:focus-visible,
.btn-reject-filled:focus-visible,
.confirm-btn-danger:focus-visible,
.row-btn-issue:focus-visible {
  outline-color: var(--btn-ring-danger);
}
.btn-warning:focus-visible {
  outline-color: var(--btn-ring-warning);
}
button:disabled,
.btn:disabled,
.row-btn:disabled,
.confirm-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  pointer-events: none;
}

/* ============================================================
   Ambient glow
   ============================================================ */
.glow {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.45;
  z-index: 0;
  pointer-events: none;
}
.glow-1 {
  width: 380px; height: 380px;
  background: var(--violet);
  top: -120px; left: -100px;
}
.glow-2 {
  width: 320px; height: 320px;
  background: var(--coral);
  top: 60px; right: -100px;
}

/* ============================================================
   Navbar
   ============================================================ */
.navbar {
  position: relative;
  z-index: 2;
  padding: 18px 32px;
}
.navbar-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(6px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 20px;
  flex-wrap: nowrap;
}
.logo {
  font-weight: 800;
  font-size: 1.2rem;
  white-space: nowrap;
  order: -1;
}
.logo span { color: var(--violet-deep); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink-soft);
  font-size: 0.92rem;
  white-space: nowrap;
  order: -2;
  margin: 0;
}
.nav-links .active { color: var(--violet-deep); font-weight: 700; }

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
  order: 1;
  margin-left: auto;
}

/* ============================================================
   Hamburger + sidebar (แบ่งหน้าจอถาวร ไม่ใช่เมนูลอย)
   ============================================================ */
:root {
  --sidebar-w: min(280px, 82vw);
}

body {
  padding-left: 0;
  transition: padding-left 0.25s ease;
}
body.nav-sidebar-open {
  padding-left: var(--sidebar-w);
}

.nav-hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  min-height: 40px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 10px;
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  transition: border-color 0.15s ease, background 0.15s ease;
}
.nav-hamburger-btn span {
  display: block;
  width: 18px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}
.nav-hamburger-btn:hover {
  border-color: var(--violet-deep);
  background: rgba(0,0,0,0.03);
}

.nav-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: #fff;
  border-right: 1px solid var(--line);
  box-shadow: 20px 0 45px -20px rgba(43,36,56,0.2);
  transform: translateX(-100%);
  transition: transform 0.25s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
  padding: 20px 0;
  overflow-y: auto;
}
.nav-sidebar.show {
  transform: translateX(0);
}
.nav-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding: 0 20px;
}
.nav-sidebar-close-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  cursor: pointer;
  color: var(--ink);
  flex-shrink: 0;
}
.nav-sidebar-close-btn:hover { border-color: var(--violet-deep); }

.nav-sidebar-links {
  display: flex;
  flex-direction: column;
  gap: 0;
}
/* ไอคอน+ข้อความชิดซ้ายที่ตำแหน่งเดียวกับโลโก้ด้านบนเป๊ะๆ (ไม่มี padding ซ้ายเพิ่มจากกรอบ sidebar)
   และพื้นหลัง hover/active กางเต็มความกว้างแผง ดูเรียบร้อยแบบ YouTube */
.nav-sidebar-links a {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  border-radius: 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
}
.nav-sidebar-links a:last-child { border-bottom: none; }
/* ไอคอนกว้างเท่ากันทุกอัน ตัวหนังสือของทุกแถวเลยเริ่มที่ตำแหน่งเดียวกัน */
.nav-sidebar-link-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  flex-shrink: 0;
}
.nav-sidebar-links a svg { flex-shrink: 0; color: var(--ink-soft); }
.nav-sidebar-links a:hover,
.nav-sidebar-links a.active {
  background: var(--bg);
  color: var(--violet-deep);
}
.nav-sidebar-links a:hover svg,
.nav-sidebar-links a.active svg { color: var(--violet-deep); }

/* เส้นคั่นระหว่างกลุ่มเมนู เผื่อใช้ในอนาคต */
.nav-sidebar-divider {
  height: 1px;
  background: var(--line);
  margin: 10px 0;
}

/* กล่องด้านล่างของแผง sidebar สำหรับปุ่มออกจากระบบ อยู่ชิดล่างเสมอ */
.nav-sidebar-footer {
  margin-top: auto;
  padding: 16px 20px 0;
}
.nav-sidebar-footer:empty { padding-top: 0; }
.nav-sidebar-logout-btn {
  width: 100%;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
/* กดปุ่มออกจากระบบแล้วเปลี่ยนเป็นสีแดง เตือนว่าเป็นการกระทำที่สำคัญ
   (ใช้ .btn-outline.nav-sidebar-logout-btn เพื่อให้ specificity สูงกว่า .btn-outline:hover ปกติที่เป็นสีม่วง) */
.btn-outline.nav-sidebar-logout-btn:hover,
.btn-outline.nav-sidebar-logout-btn:focus-visible {
  background: var(--btn-danger-soft-bg) !important;
  color: var(--btn-danger-soft-fg) !important;
  border-color: var(--btn-danger-bg) !important;
}
.btn-outline.nav-sidebar-logout-btn:active {
  background: var(--btn-danger-bg) !important;
  color: var(--btn-danger-fg) !important;
  border-color: var(--btn-danger-bg) !important;
}

/* ============================================================
   Breadcrumb — แสดงเฉพาะหน้าที่อยู่ลึก บอกตำแหน่งปัจจุบันชัดกว่าปุ่มย้อนกลับอย่างเดียว
   ============================================================ */
.breadcrumb-bar {
  max-width: 1100px;
  margin: 0 auto;
  padding: 10px 32px 0;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  font-size: 0.82rem;
}
.breadcrumb-bar-admin {
  max-width: 1200px;
  padding: 10px 20px 0;
}
.breadcrumb-bar a {
  color: var(--ink-soft);
  text-decoration: none;
}
.breadcrumb-bar a:hover { color: var(--violet-deep); }
.breadcrumb-current {
  color: var(--ink);
  font-weight: 700;
}
.breadcrumb-sep { color: var(--line); }

/* ============================================================
   Base buttons
   ============================================================ */
.btn {
  border: none;
  border-radius: 999px;
  font-weight: 600;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.btn:active { transform: translateY(1px); }

.btn-dark {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.btn-dark:hover { background: var(--btn-primary-hover); }

.btn-outline {
  background: transparent;
  border: 1.5px solid var(--violet-deep);
  color: var(--violet-deep);
}
.btn-outline:hover {
  background: var(--violet-deep);
  color: #fff;
  border-color: var(--violet-deep);
}

/* Semantic buttons */
.btn-approve {
  background: var(--btn-success-bg);
  color: var(--btn-success-fg);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-approve:hover { background: var(--btn-success-hover); }
.btn-approve:active { transform: translateY(1px); }

.btn-approve-outline {
  background: #fff;
  color: var(--btn-success-soft-fg);
  border: 1.5px solid var(--btn-success-bg);
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn-approve-outline:hover {
  background: var(--btn-success-soft-bg);
  color: var(--btn-success-soft-fg);
}
.btn-approve-outline:active { transform: translateY(1px); }

.btn-reject {
  background: #fff;
  color: var(--btn-danger-soft-fg);
  border: 1.5px solid var(--btn-danger-bg);
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.btn-reject:hover {
  background: var(--btn-danger-soft-bg);
  color: var(--btn-danger-soft-fg);
}
.btn-reject:active { transform: translateY(1px); }

.btn-reject-filled {
  background: var(--btn-danger-bg);
  color: var(--btn-danger-fg);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-reject-filled:hover { background: var(--btn-danger-hover); }
.btn-reject-filled:active { transform: translateY(1px); }

.btn-warning {
  background: var(--btn-warning-bg);
  color: var(--btn-warning-fg);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-warning:hover { background: var(--btn-warning-hover); }
.btn-warning:active { transform: translateY(1px); }

.btn-download {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border: none;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-download:hover { background: var(--btn-primary-hover); }
.btn-download:active { transform: translateY(1px); }

/* ============================================================
   Hero
   ============================================================ */
.hero {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 60px 20px 30px;
  max-width: 720px;
  margin: 0 auto;
}
.eyebrow {
  display: inline-block;
  background: var(--violet);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 6px 16px;
  border-radius: 999px;
  margin-bottom: 18px;
  letter-spacing: 0.3px;
}
.hero h1 {
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.4;
  margin: 0 0 12px;
}
.hero-sub {
  color: var(--ink-soft);
  margin: 0 0 28px;
}

.search-bar {
  display: flex;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px 6px 6px 20px;
  max-width: 560px;
  margin: 0 auto 20px;
  box-shadow: 0 12px 30px rgba(138,109,255,0.12);
}
.search-bar input {
  flex: 1;
  border: none;
  background: transparent;
  outline: none;
  padding: 10px 0;
  font-size: 0.95rem;
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  line-height: 1.5;
  height: auto;
  min-height: 0;
}
.search-bar button {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  min-height: 40px;
  padding: 0;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, transform 0.1s ease;
}
.search-bar button:hover { background: var(--btn-primary-hover); }
.search-bar button:active { transform: translateY(1px); }

.tag-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
}
.tag {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--ink);
}
.tag:hover { border-color: var(--violet-deep); color: var(--violet-deep); }

/* ============================================================
   Trust bar
   ============================================================ */
.trust-bar {
  position: relative;
  z-index: 2;
  background: var(--ink);
  color: #fff;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 32px;
  padding: 12px 20px;
  font-size: 0.82rem;
  font-weight: 500;
  margin-top: 20px;
}
.trust-item { display: flex; align-items: center; gap: 8px; }
.trust-letter {
  width: 20px; height: 20px;
  border-radius: 50%;
  background: var(--violet);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 0.68rem;
}

/* ============================================================
   Listing
   ============================================================ */
.listing-section {
  position: relative;
  z-index: 2;
  max-width: 1100px;
  margin: 44px auto;
  padding: 0 20px;
}
.listing-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.listing-header h2 { margin: 0; font-size: 1.2rem; font-weight: 700; }
.see-all { color: var(--violet-deep); font-weight: 600; font-size: 0.88rem; }

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 16px;
}
@media (max-width: 520px) {
  .card-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .hero h1 { font-size: 1.6rem; }
  .navbar-inner { flex-wrap: wrap; }
}

/* ============================================================
   Ticket card
   ============================================================ */
.ticket-card {
  position: relative;
  background: var(--card-bg);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(43,36,56,0.07);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.ticket-card:hover { transform: translateY(-4px); box-shadow: 0 18px 36px rgba(43,36,56,0.14); }

.ticket-poster {
  position: relative;
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  background: var(--bg);
}
.ticket-poster-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.ticket-poster-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  font-size: 2.6rem;
  font-weight: 800;
}

.ticket-price-tag {
  position: absolute;
  left: 10px;
  bottom: 10px;
  background: rgba(255,255,255,0.94);
  backdrop-filter: blur(4px);
  color: var(--ink);
  font-weight: 800;
  font-size: 0.82rem;
  padding: 5px 11px;
  border-radius: 999px;
  box-shadow: 0 6px 16px rgba(43,36,56,0.18);
}

.ticket-card-body { padding: 10px 12px 14px; }
.ticket-card-title {
  font-weight: 700;
  font-size: 0.86rem;
  line-height: 1.45;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ticket-card-meta {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.meta-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  color: var(--ink-soft);
  line-height: 1.4;
}
.meta-row svg {
  width: 13px; height: 13px;
  flex-shrink: 0;
  color: var(--violet-deep);
}

.chip-violet { background: linear-gradient(160deg, var(--violet) 0%, var(--violet-deep) 100%); color: #fff; }
.chip-coral  { background: linear-gradient(160deg, var(--coral) 0%, var(--coral-deep) 100%); color: #4A2233; }
.chip-mint   { background: linear-gradient(160deg, #C9F5E8 0%, var(--mint) 100%); color: #17403A; }
.chip-sky    { background: linear-gradient(160deg, #D7EEFF 0%, var(--sky) 100%); color: #123A55; }

/* ============================================================
   Auth pages
   ============================================================ */
.auth-body { background: var(--bg); }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
@media (max-width: 820px) {
  .auth-wrap { grid-template-columns: 1fr; }
}

.auth-left {
  position: relative;
  background: linear-gradient(150deg, var(--violet) 0%, var(--violet-deep) 55%, var(--coral-deep) 130%);
  color: #fff;
  padding: 56px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.auth-left::before {
  content: "";
  position: absolute;
  width: 280px; height: 280px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  top: -100px; right: -100px;
}
.auth-left-inner { position: relative; z-index: 1; max-width: 380px; }

.logo-on-dark { font-size: 1.4rem; margin-bottom: 22px; }
.logo-on-dark span { color: #FFE1EC; }

.auth-left-desc {
  font-size: 0.95rem;
  line-height: 1.7;
  opacity: 0.92;
  margin-bottom: 34px;
}

.auth-trust-list {
  list-style: none;
  margin: 0; padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
  font-size: 0.88rem;
  font-weight: 500;
}
.auth-trust-list li { display: flex; align-items: center; gap: 10px; }
.auth-trust-list .trust-letter { background: rgba(255,255,255,0.22); color: #fff; }

.perforation {
  position: absolute;
  right: -10px;
  top: 0; bottom: 0;
  width: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-evenly;
  align-items: center;
  z-index: 2;
}
.perforation span {
  width: 20px; height: 20px;
  background: var(--bg);
  border-radius: 50%;
}
@media (max-width: 820px) { .perforation { display: none; } }

.auth-right {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 56px 32px;
}
.auth-form-box { width: 100%; max-width: 360px; }
.auth-form-box h1 {
  font-size: 1.5rem;
  margin: 0 0 26px;
}

.auth-form-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}
.auth-form-box input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
}
.auth-form-box input:focus {
  border-color: var(--violet-deep);
  box-shadow: 0 0 0 3px rgba(138,109,255,0.15);
}

.forgot-link {
  display: block;
  text-align: right;
  font-size: 0.8rem;
  color: var(--violet-deep);
  font-weight: 600;
  margin-top: 10px;
}

.btn-submit {
  width: 100%;
  margin-top: 22px;
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border: none;
  border-radius: 999px;
  padding: 0 24px;
  font-size: 0.95rem;
  font-weight: 700;
  transition: background 0.15s ease, transform 0.1s ease;
}
.btn-submit:hover { background: var(--btn-primary-hover); }
.btn-submit:active { transform: translateY(1px); }

.divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  margin: 22px 0;
}
.divider::before, .divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

.btn-google {
  width: 100%;
  background: #fff;
  border: 1.5px solid var(--line);
  border-radius: 999px;
  padding: 0 24px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
}
.btn-google:hover {
  border-color: var(--violet-deep);
  color: var(--violet-deep);
  background: #FAF7FF;
}

.signup-hint {
  text-align: center;
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin-top: 22px;
}
.signup-hint a { color: var(--violet-deep); font-weight: 700; }

.form-error {
  background: #FFE4E9;
  color: #B3253F;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.85rem;
  margin-bottom: 12px;
}

.auth-hint {
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin: 0 0 22px;
}

.success-icon {
  font-size: 2.4rem;
  margin-bottom: 6px;
}

.btn-link-center {
  display: block;
  text-align: center;
  text-decoration: none;
  margin-top: 24px;
}

.role-toggle {
  display: flex;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 20px;
  align-items: center;
}
.role-btn {
  flex: 1;
  border: none;
  background: transparent;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--ink-soft);
  transition: background 0.15s ease, color 0.15s ease;
}
.role-btn.active {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}

.user-chip {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  height: 46px;
  gap: 8px;
  margin-right: 4px;
}
.role-tag {
  background: var(--violet);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
  display: inline-block;
}

/* ============================================================
   Sell ticket page
   ============================================================ */
.sell-page {
  max-width: 1000px;
  margin: 40px auto 60px;
  padding: 0 20px;
}
.sell-header { margin-bottom: 28px; }
.sell-header h1 { font-size: 1.7rem; margin: 0 0 6px; }

.notice-box, .success-box {
  max-width: 480px;
  margin: 60px auto;
  text-align: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 40px 28px;
}

.sell-layout {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 800px) { .sell-layout { grid-template-columns: 1fr; } }

.sell-form-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 28px;
}
.sell-form-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}
.sell-form-box label:first-of-type { margin-top: 0; }
.sell-form-box input[type="text"],
.sell-form-box input[type="number"],
.sell-form-box input[type="date"],
.sell-form-box input[type="file"],
.sell-form-box select {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
}
.sell-form-box input[type="file"] {
  height: auto;
  min-height: 46px;
  padding: 10px 14px;
}
.sell-form-box input:focus {
  border-color: var(--violet-deep);
  box-shadow: 0 0 0 3px rgba(138,109,255,0.15);
}
.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.fee-box {
  background: linear-gradient(160deg, var(--violet) 0%, var(--violet-deep) 100%);
  color: #fff;
  border-radius: 16px;
  padding: 24px;
  position: sticky;
  top: 20px;
}
.fee-box h3 { margin: 0 0 16px; font-size: 1.05rem; }
.fee-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 8px 0;
  border-bottom: 1px solid rgba(255,255,255,0.2);
}
.fee-row-total {
  border-bottom: none;
  font-weight: 800;
  font-size: 1.05rem;
  margin-top: 4px;
}
.fee-note {
  font-size: 0.78rem;
  opacity: 0.85;
  margin-top: 16px;
  line-height: 1.6;
}

.empty-state {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--ink-soft);
  padding: 40px 0;
  font-size: 0.92rem;
}

/* ============================================================
   Ticket detail page
   ============================================================ */
.detail-page {
  max-width: 1000px;
  margin: 40px auto 60px;
  padding: 0 20px;
}
.detail-layout {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 32px;
}
@media (max-width: 800px) { .detail-layout { grid-template-columns: 1fr; } }

.detail-gallery { min-width: 0; }

.gallery-main {
  width: 100%;
  max-width: 420px;
  margin: 0 auto;
  aspect-ratio: 3/4;
  border-radius: 16px;
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--line);
}
.gallery-main img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.gallery-placeholder {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.gallery-thumbs {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.thumb {
  width: 64px; height: 64px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  border: 2px solid transparent;
  opacity: 0.7;
}
.thumb.active { border-color: var(--violet-deep); opacity: 1; }

.detail-info h1 { font-size: 1.5rem; margin: 10px 0 4px; }
.detail-sub { color: var(--ink-soft); font-size: 0.92rem; margin-bottom: 20px; }

.seller-review-link {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed var(--ink-soft);
}
.seller-review-link:hover { color: var(--violet-deep); border-bottom-color: var(--violet-deep); }

.status-badge {
  display: inline-block;
  background: var(--mint);
  color: #17403A;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
}

.detail-price-box {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px 18px;
  margin-bottom: 18px;
}
.price-line {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  color: var(--ink-soft);
  padding: 4px 0;
}
.price-line-main {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--violet-deep);
  padding-top: 8px;
}

.detail-meta {
  display: flex;
  gap: 24px;
  margin-bottom: 18px;
}
.meta-item { display: flex; flex-direction: column; gap: 2px; }
.meta-label { font-size: 0.78rem; color: var(--ink-soft); }
.meta-value { font-size: 0.92rem; font-weight: 600; }

.seller-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 16px;
  margin-bottom: 20px;
}

.detail-note {
  font-size: 0.78rem;
  color: var(--ink-soft);
  text-align: center;
  margin-top: 12px;
  line-height: 1.6;
}

/* ============================================================
   My Listings dashboard
   ============================================================ */
.listings-page {
  max-width: 1000px;
  margin: 40px auto 60px;
  padding: 0 20px;
}
.listings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}
.listings-header h1 { font-size: 1.5rem; margin: 0; }

.stat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 24px;
}
@media (max-width: 700px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
.stat-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.stat-label { font-size: 0.78rem; color: var(--ink-soft); }
.stat-value { font-size: 1.4rem; font-weight: 800; }
.stat-active { color: var(--violet-deep); }
.stat-sold { color: #17403A; }

.listings-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.listings-toolbar input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
}
.listings-toolbar select {
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  background: #fff;
}

.section-divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 40px 0 32px;
}

/* ประวัติการแก้ไขบัญชีกลาง — คลิกหัวข้อครั้งเดียว ขยายเห็นประวัติทั้งหมดทีเดียว (ขนาดกะทัดรัด) */
.log-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  max-width: 560px;
}
.log-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 16px;
  cursor: pointer;
  user-select: none;
}
.log-panel-header:hover { background: #FAF8FF; }
.log-panel-title { font-weight: 700; font-size: 0.9rem; color: var(--ink); }
.log-panel-count { font-weight: 500; font-size: 0.78rem; color: var(--ink-soft); margin-left: 6px; }
.log-panel-header .log-accordion-chevron {
  width: 16px; height: 16px;
  flex-shrink: 0;
  color: var(--ink-soft);
  transition: transform 0.2s ease;
}
.log-panel-header.open .log-accordion-chevron { transform: rotate(180deg); }
.log-panel-body {
  display: none;
  padding: 10px 16px 14px;
  border-top: 1px solid var(--line);
  max-height: 280px;
  overflow-y: auto;
}
.log-panel-body.open { display: block; }

.log-accordion-list { display: flex; flex-direction: column; gap: 8px; }
.log-accordion-row {
  background: #FAFAFF;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 9px 12px;
}
.log-accordion-admin { font-weight: 600; font-size: 0.78rem; }
.log-accordion-date { font-size: 0.7rem; color: var(--ink-soft); margin-left: 6px; }
.log-accordion-diff-row { font-size: 0.74rem; margin-top: 4px; line-height: 1.5; color: var(--ink-soft); }
.log-accordion-diff-label { font-weight: 600; margin-right: 3px; }
.log-diff-old { color: #B94A48; }
.log-diff-new { color: #2E8B57; }
.log-diff-arrow { color: var(--ink-soft); margin: 0 4px; }
.log-panel-empty { font-size: 0.8rem; color: var(--ink-soft); padding: 4px 0; }

.listing-rows { display: flex; flex-direction: column; gap: 12px; }
.listing-row {
  display: flex;
  align-items: center;
  gap: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 12px;
}
@media (max-width: 640px) { .listing-row { flex-wrap: wrap; } }

.row-banner {
  width: 72px; height: 72px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
}
.row-banner-img { width: 100%; height: 100%; object-fit: cover; }
.row-banner-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 1.4rem;
}

.row-info { flex: 1; min-width: 0; }
.row-title-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.row-title { font-weight: 700; font-size: 0.95rem; }
.row-sub { font-size: 0.8rem; color: var(--ink-soft); margin-top: 2px; }
.row-price { margin-top: 4px; display: flex; align-items: baseline; gap: 8px; }
.price-now { font-weight: 800; font-size: 1rem; color: var(--violet-deep); }
.price-old { font-size: 0.82rem; color: var(--ink-soft); text-decoration: line-through; }

.listing-row .row-status {
  font-size: 0.7rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  line-height: 1.4;
}
.order-row .row-status {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
  line-height: 1.4;
}

.status-active { background: var(--mint); color: #17403A; }
.status-sold { background: #E4E4E4; color: #666; }

.row-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.row-btn {
  border: none;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.1s ease;
}
.row-btn:active { transform: translateY(1px); }

.row-btn-view {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.row-btn-view:hover { background: var(--btn-primary-hover); }

/* ============================================================
   Search page
   ============================================================ */
.search-page {
  max-width: 1100px;
  margin: 40px auto 60px;
  padding: 0 20px;
}
.search-header { margin-bottom: 24px; }
.search-header h1 { font-size: 1.6rem; margin: 0 0 6px; }

.search-toolbar {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 8px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.search-toolbar > input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
  margin: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-toolbar > input:focus {
  border-color: var(--violet-deep);
  box-shadow: 0 0 0 3px rgba(138,109,255,0.15);
}

/* ============================================================
   Filter row — Grid 5 คอลัมน์
   ============================================================ */
.filter-row {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: end;
  width: 100%;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.filter-group label {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0;
}
.filter-group input,
.filter-group select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.85rem;
  background: #fff;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.filter-group input:focus,
.filter-group select:focus {
  border-color: var(--violet-deep);
  box-shadow: 0 0 0 3px rgba(138,109,255,0.15);
}

.filter-row .custom-select-wrap {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 0;
  min-width: 0;
  width: 100%;
}
.filter-row .custom-select-wrap label {
  font-size: 0.75rem;
  color: var(--ink-soft);
  font-weight: 600;
  line-height: 1.4;
  margin-bottom: 0;
}
.filter-row .custom-select-wrap .custom-select-btn {
  width: 100%;
  min-width: 0;
}

.filter-row .btn-clear {
  box-sizing: border-box;
  background: var(--btn-tertiary-bg);
  border: 1px solid transparent;
  border-radius: 10px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--btn-tertiary-fg);
  cursor: pointer;
  width: fit-content;
  justify-self: start;
  transition: background 0.15s ease, color 0.15s ease;
}
.filter-row .btn-clear:hover { background: var(--btn-tertiary-hover); }

@media (max-width: 900px) {
  .filter-row { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .filter-row { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
}
@media (max-width: 400px) {
  .filter-row { grid-template-columns: 1fr; }
}

.result-count {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: 18px 0 14px;
}

/* ============================================================
   Search bar wrap (มีไอคอนแว่นขยาย)
   ============================================================ */
.search-bar-wrap {
  position: relative;
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
}
.search-bar-wrap input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0 16px 0 42px;
  font-size: 0.9rem;
  line-height: 1.5;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.search-bar-wrap input:focus {
  border-color: var(--violet-deep);
  box-shadow: 0 0 0 3px rgba(138,109,255,0.15);
}
.search-bar-wrap svg {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--ink-soft);
  pointer-events: none;
}

/* ============================================================
   Custom dropdown — ลูกศรขวา ข้อความซ้าย
   ============================================================ */
.custom-select-wrap {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: stretch;
  margin-bottom: 20px;
  min-width: 0;
}

.custom-select-btn {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 170px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0 16px;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.custom-select-btn:hover { border-color: var(--violet-deep); }
.custom-select-btn:disabled { opacity: 0.55; cursor: not-allowed; }
.custom-select-btn.open {
  border-color: var(--violet-deep);
  box-shadow: 0 0 0 3px rgba(138,109,255,0.15);
}

.custom-select-btn > span,
.custom-select-btn > .custom-select-label {
  order: 1;
  flex: 1;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  line-height: 1.5;
}
.custom-select-btn > svg {
  order: 2;
  margin-left: auto;
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  color: var(--ink-soft);
  display: block;
  align-self: center;
  transition: transform 0.15s ease;
}
.custom-select-btn.open > svg { transform: rotate(180deg); }

.custom-select-list {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(420px, calc(100vw - 40px));
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 20px 45px -20px rgba(43,36,56,0.25);
  padding: 6px;
  max-height: 260px;
  overflow-y: auto;
  overflow-x: hidden;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  z-index: 50;
}
.custom-select-list.show {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}
.custom-select-option {
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 0.88rem;
  color: var(--ink);
  cursor: pointer;
  white-space: normal;
  word-break: break-word;
  line-height: 1.5;
  text-align: left;
}
.custom-select-option:hover { background: var(--bg); }
.custom-select-option.selected {
  background: var(--bg);
  color: var(--violet-deep);
  font-weight: 700;
}

/* ============================================================
   Checkout page
   ============================================================ */
.checkout-page {
  max-width: 900px;
  margin: 40px auto 60px;
  padding: 0 20px;
}
.checkout-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
@media (max-width: 720px) { .checkout-layout { grid-template-columns: 1fr; } }

.order-summary-box, .checkout-form-box {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px;
}
.order-summary-box h2, .checkout-form-box h2 { font-size: 1.1rem; margin: 0 0 18px; }

.summary-ticket {
  display: flex;
  align-items: center;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.summary-banner {
  width: 56px; height: 56px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--violet);
}
.summary-banner img { width: 100%; height: 100%; object-fit: cover; }
.summary-banner-fallback {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem;
}
.summary-title { font-weight: 700; font-size: 0.95rem; }
.summary-sub { font-size: 0.8rem; color: var(--ink-soft); }

.summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  padding: 4px 0;
}
.summary-total {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--violet-deep);
  padding-top: 8px;
  margin-bottom: 18px;
}

.transfer-box {
  background: var(--bg);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
}
.transfer-label { font-size: 0.82rem; font-weight: 600; margin: 0 0 8px; }
.transfer-detail {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 4px 0;
}
.transfer-detail span:last-child { font-weight: 700; }

.checkout-form-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 14px 0 6px;
}
.checkout-form-box label:first-of-type { margin-top: 0; }
.checkout-form-box select,
.checkout-form-box input[type="text"],
.checkout-form-box input[type="file"] {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  outline: none;
}
.checkout-form-box input[type="file"] {
  height: auto;
  min-height: 46px;
  padding: 10px 14px;
}
#slipPreview {
  width: 100%;
  max-height: 200px;
  object-fit: contain;
  margin-top: 10px;
  border-radius: 10px;
  border: 1px solid var(--line);
}

/* ============================================================
   Seller orders page
   ============================================================ */
.orders-page {
  max-width: 900px;
  margin: 40px auto 60px;
  padding: 0 20px;
}
.orders-page h1 { font-size: 1.5rem; margin: 0 0 6px; }

.order-rows { display: flex; flex-direction: column; gap: 16px; margin-top: 20px; }

.order-row {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 18px;
}
.order-row-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}
.order-ticket-name { font-weight: 700; font-size: 1rem; }
.order-sub { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }

.status-pending { background: #FFE9C2; color: #8A5A00; }
.status-preparing { background: #D7E8FF; color: #123A55; }
.status-shipped { background: var(--violet-deep); color: #fff; }
.status-done { background: var(--mint); color: #17403A; }

.order-row-body {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
}
@media (max-width: 560px) { .order-row-body { grid-template-columns: 1fr; } }

.order-info-col { display: flex; flex-direction: column; min-width: 0; }

.info-line {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.85rem;
  padding: 4px 0;
}
.info-line span:first-child { color: var(--ink-soft); }
.info-line span:last-child { font-weight: 600; text-align: right; }
.info-line .highlight { color: var(--violet-deep); font-weight: 800; }

.order-slip-col { display: flex; flex-direction: column; gap: 6px; align-items: center; }
.slip-thumb {
  width: 90px; height: 90px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  cursor: pointer;
}
.slip-thumb-empty {
  width: 90px; height: 90px;
  border-radius: 10px;
  border: 1px dashed var(--line);
  display: flex; align-items: center; justify-content: center;
  font-size: 0.72rem;
  color: var(--ink-soft);
  text-align: center;
}

.order-row-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.row-btn-confirm {
  background: var(--btn-success-bg);
  color: var(--btn-success-fg);
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
}
.row-btn-confirm:hover { background: var(--btn-success-hover); }
.row-btn-confirm:active { transform: translateY(1px); }

/* ปุ่มดาวน์โหลด ใช้สีหลักของเว็บ (ม่วง) แยกจากสีเขียวที่สงวนไว้กับสถานะ "สำเร็จ/ยืนยันแล้ว" */
.row-btn-download {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
  border: none;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s ease, transform 0.1s ease;
  /* อยู่ใน .order-info-col ซึ่งเป็น flex-column (align-items เริ่มต้นคือ stretch)
     ถ้าไม่ล็อกไว้ ปุ่มจะถูกยืดเต็มความกว้าง/สูงเกินจริงจนดูไม่สมส่วน */
  align-self: flex-start;
  width: auto;
  margin: 6px 0 4px;
}
.row-btn-download:hover { background: var(--btn-primary-hover); }
.row-btn-download:active { transform: translateY(1px); }

.waiting-note { font-size: 0.82rem; color: var(--ink-soft); font-style: italic; }

/* ป้ายแจ้งว่าให้คะแนนไปแล้ว แทนปุ่ม "ให้คะแนนผู้ขาย" — ให้น้ำหนักสายตาใกล้เคียงปุ่มรอบข้าง ไม่ใช่แค่ตัวหนังสือเอียงลอยๆ */
.reviewed-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--btn-success-soft-fg);
  background: var(--btn-success-soft-bg);
  padding: 8px 14px;
  border-radius: 999px;
}

.slip-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
  z-index: 999;
  cursor: pointer;
}
.slip-modal img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

.ship-modal-box {
  background: #fff;
  border-radius: 16px;
  padding: 24px;
  max-width: 380px;
  width: 90%;
  max-height: 90vh;
  overflow-y: auto;
}
.ship-modal-box h3 { margin: 0 0 16px; font-size: 1.05rem; }
.ship-modal-box label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.ship-modal-box input[type="text"],
.ship-modal-box select,
.ship-modal-box input[type="file"] {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--line);
  border-radius: 10px;
  font-size: 0.9rem;
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  outline: none;
  margin-bottom: 6px;
}
.ship-modal-box input[type="text"],
.ship-modal-box select {
  height: 46px;
  padding: 0 14px;
}
.ship-modal-box input[type="file"] {
  height: auto;
  min-height: 46px;
  padding: 10px 14px;
}
.ship-modal-box .custom-select-wrap {
  width: 100%;
  margin-bottom: 6px;
}
.ship-modal-box .custom-select-btn {
  width: 100%;
  min-width: 0;
}

.platform-account-box .custom-select-wrap {
  width: 100%;
  margin-bottom: 20px;
}
.platform-account-box .custom-select-btn {
  width: 100%;
  min-width: 0;
}
.ship-modal-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

.name-change-notice {
  background: #FFF4E0;
  border: 1px solid #FFD98A;
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 0.78rem;
  color: #7A5200;
  line-height: 1.6;
  margin-bottom: 12px;
}
.checkbox-label {
  display: flex !important;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.82rem !important;
  font-weight: 500 !important;
  color: var(--ink) !important;
  margin-top: 10px !important;
  cursor: pointer;
  height: auto !important;
}
.checkbox-label input[type="checkbox"] {
  margin-top: 2px;
  width: auto;
  height: auto;
}

.name-confirmed-note {
  background: var(--mint);
  color: #17403A;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 0.78rem;
  font-weight: 600;
  margin-bottom: 10px;
}

.row-btn-issue {
  background: #fff;
  color: #B3253F;
  border: 1px solid #FFC9D4;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.row-btn-issue:hover {
  background: var(--btn-danger-bg);
  color: #fff;
  border-color: var(--btn-danger-bg);
}

.star-picker {
  text-align: center;
  margin-bottom: 16px;
}
.star-picker span {
  color: #E0E0E0;
  transition: color 0.15s ease;
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 26px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  border-top: 1px solid var(--line);
}

/* ============================================================
   Profile page
   ============================================================ */
.profile-page {
  max-width: 920px;
  margin: 40px auto 60px;
  padding: 0 20px;
  position: relative;
}

.profile-card {
  display: grid;
  grid-template-columns: 0.85fr auto 1.15fr;
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 20px 50px -20px rgba(43,36,56,0.18);
}
@media (max-width: 760px) {
  .profile-card { grid-template-columns: 1fr; }
  .profile-card .perforation { display: none; }
}

.profile-id-panel {
  position: relative;
  background: linear-gradient(150deg, var(--violet) 0%, var(--violet-deep) 55%, var(--coral-deep) 130%);
  color: #fff;
  padding: 40px 32px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.profile-id-glow {
  position: absolute;
  width: 220px; height: 220px;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  top: -80px; right: -70px;
}
.profile-id-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  text-align: center;
}

.profile-id-eyebrow {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 22px;
}

.profile-avatar {
  width: 84px; height: 84px;
  margin: 0 auto 16px;
  border-radius: 50%;
  background: rgba(255,255,255,0.18);
  border: 2px solid rgba(255,255,255,0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  font-size: 1.7rem;
  font-weight: 700;
}

.profile-id-name {
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 10px;
  word-break: break-word;
}

.profile-role-badge {
  display: inline-block;
  background: rgba(255,255,255,0.22);
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
}

.profile-id-divider {
  height: 1px;
  background: rgba(255,255,255,0.25);
  margin: 26px 0 20px;
}

.profile-id-meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 14px;
  text-align: left;
}
.profile-id-meta-label {
  font-size: 0.7rem;
  opacity: 0.75;
}
.profile-id-meta-value {
  font-size: 0.88rem;
  font-weight: 600;
  word-break: break-word;
}

.profile-form-panel {
  padding: 44px 40px;
}
.profile-form-panel h1 {
  font-size: 1.4rem;
  margin: 0 0 4px;
}
.profile-form-sub {
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0 0 26px;
}

.profile-form-panel label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 16px 0 6px;
}
.profile-form-panel input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 10px;
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.profile-form-panel input:focus {
  border-color: var(--violet-deep);
  box-shadow: 0 0 0 3px rgba(138,109,255,0.15);
}
.profile-form-panel input:disabled {
  background: #F5F3FA;
  color: var(--ink-soft);
  cursor: not-allowed;
}

.profile-toast {
  position: fixed;
  left: 50%;
  bottom: 32px;
  transform: translate(-50%, 20px);
  background: var(--ink);
  color: #fff;
  padding: 13px 26px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.25s ease;
  z-index: 50;
}
.profile-toast::before {
  content: "✓ ";
  color: var(--mint);
  font-weight: 700;
}
.profile-toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
  .profile-toast { transition: none; }
}

/* ============================================================
   Logout confirm modal
   ============================================================ */
.confirm-overlay {
  position: fixed;
  inset: 0;
  background: rgba(43,36,56,0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.confirm-overlay.show {
  opacity: 1;
  pointer-events: auto;
}

.confirm-box {
  background: #fff;
  border-radius: 20px;
  padding: 32px 28px 24px;
  width: 90%;
  max-width: 340px;
  text-align: center;
  box-shadow: 0 24px 60px -20px rgba(43,36,56,0.35);
  transform: translateY(14px) scale(0.97);
  transition: transform 0.2s ease;
}
.confirm-overlay.show .confirm-box {
  transform: translateY(0) scale(1);
}

.confirm-box h3 {
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  font-size: 1.1rem;
  margin: 0 0 8px;
}
.confirm-box p {
  text-wrap: balance; /* ตัดบรรทัดให้สมดุล ไม่ทิ้งคำสั้นๆ โดดอยู่บรรทัดสุดท้าย */
  color: var(--ink-soft);
  font-size: 0.88rem;
  margin: 0 0 22px;
  line-height: 1.6;
}

.confirm-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.confirm-btn {
  flex: 1;
  border: none;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, transform 0.1s ease;
}
.confirm-btn:active { transform: translateY(1px); }

.confirm-btn-cancel {
  background: var(--btn-tertiary-bg);
  color: var(--btn-tertiary-fg);
}
.confirm-btn-cancel:hover { background: var(--btn-tertiary-hover); }

.confirm-btn-danger {
  background: var(--btn-danger-bg);
  color: var(--btn-danger-fg);
}
.confirm-btn-danger:hover { background: var(--btn-danger-hover); }

.confirm-btn-success {
  background: var(--btn-success-bg);
  color: var(--btn-success-fg);
}
.confirm-btn-success:hover { background: var(--btn-success-hover); }

.confirm-btn-primary {
  background: var(--btn-primary-bg);
  color: var(--btn-primary-fg);
}
.confirm-btn-primary:hover { background: var(--btn-primary-hover); }

@media (prefers-reduced-motion: reduce) {
  .confirm-overlay, .confirm-box { transition: none; }
}

/* ============================================================
   Listing management
   ============================================================ */
.status-closed { background: #FFE3E9; color: #99425A; }

.row-btn-reopen {
  background: #fff;
  color: var(--btn-success-soft-fg);
  border: 1.5px solid var(--btn-success-bg);
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.row-btn-reopen:hover {
  background: var(--btn-success-soft-bg);
  color: var(--btn-success-soft-fg);
}

/* ============================================================
   Seatmap
   ============================================================ */
.seatmap-section {
  grid-column: 1 / -1;
  margin-top: 12px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
.seatmap-section h2 {
  font-size: 1.1rem;
  margin: 0 0 14px;
}
.seatmap-hint {
  font-size: 0.85rem;
  color: var(--ink-soft);
  margin: -8px 0 14px;
}
.seatmap-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}
.seatmap-thumb-wrap {
  cursor: pointer;
  display: inline-block;
  line-height: 0;
}
.seatmap-thumb {
  width: 160px;
  height: 160px;
  object-fit: cover;
  border-radius: 12px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.seatmap-thumb:hover { transform: scale(1.03); }

@media (max-width: 640px) {
  .seatmap-thumb { width: 120px; height: 120px; }
}

/* ============================================================
   Email verification page
   ============================================================ */
.verify-page {
  max-width: 480px;
  margin: 60px auto;
  padding: 0 20px;
  text-align: center;
}

/* ============================================================
   Receipt
   ============================================================ */
.receipt-page {
  max-width: 720px;
  margin: 40px auto 60px;
  padding: 0 20px;
}

.receipt-box {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 40px;
  box-shadow: 0 20px 50px -24px rgba(43,36,56,0.18);
}

.receipt-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}
.receipt-logo { font-family: "Noto Sans Thai", "Segoe UI", sans-serif; font-weight: 700; font-size: 1.2rem; }
.receipt-logo span { color: var(--violet-deep); }
.receipt-head-sub { font-size: 0.8rem; color: var(--ink-soft); margin: 4px 0 0; }

.receipt-head-meta { text-align: right; font-size: 0.82rem; }
.receipt-head-meta div { margin-bottom: 4px; }
.receipt-head-meta span { display: block; color: var(--ink-soft); font-size: 0.72rem; }

.receipt-divider {
  height: 1px;
  background: var(--line);
  margin: 22px 0;
}

.receipt-parties {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.receipt-parties > div { display: flex; flex-direction: column; gap: 3px; }
.receipt-label { font-size: 0.72rem; color: var(--ink-soft); }

.receipt-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
}
.receipt-table th {
  text-align: left;
  font-size: 0.72rem;
  color: var(--ink-soft);
  border-bottom: 1px solid var(--line);
  padding-bottom: 8px;
  font-weight: 600;
}
.receipt-table td {
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  font-size: 0.9rem;
}
.receipt-item-sub { font-size: 0.78rem; color: var(--ink-soft); margin-top: 2px; }

.receipt-summary { margin: 0 0 22px; }
.receipt-summary-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.88rem;
  padding: 6px 0;
  color: var(--ink-soft);
}
.receipt-summary-net {
  color: var(--ink);
  font-weight: 700;
  font-size: 1rem;
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 10px;
}

.receipt-payment-info {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
.receipt-payment-info div { display: flex; flex-direction: column; gap: 3px; }
.receipt-payment-info span { font-size: 0.72rem; color: var(--ink-soft); }
.receipt-payment-info strong { font-size: 0.88rem; }

.receipt-footnote {
  font-size: 0.76rem;
  color: var(--ink-soft);
  line-height: 1.6;
  margin-bottom: 26px;
}

@media (max-width: 600px) {
  .receipt-box { padding: 26px 20px; }
  .receipt-parties, .receipt-payment-info { grid-template-columns: 1fr; }
  .receipt-head { flex-direction: column; }
  .receipt-head-meta { text-align: left; }
}

@media print {
  .no-print { display: none !important; }
  /* แผง sidebar แฮมเบอร์เกอร์ถูกสร้างแยกไว้ที่ body ไม่ได้อยู่ใน .navbar เลยต้องซ่อนเองอีกที ไม่งั้นติดมาตอนพิมพ์/เซฟ PDF ด้วย */
  #navSidebar { display: none !important; }
  body.nav-sidebar-open { padding-left: 0 !important; }
  .receipt-page { margin: 0; padding: 0; max-width: 100%; }
  .receipt-box { box-shadow: none; border: none; }
  body { background: #fff; }
}

/* ============================================================
   Payment method
   ============================================================ */
.payment-method-fixed {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  background: #F8F6FD;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 0.92rem;
  color: var(--ink);
  font-weight: 600;
}
.payment-method-icon { font-size: 1.05rem; }

/* ============================================================
   My reviews
   ============================================================ */
.review-summary-card {
  background: linear-gradient(150deg, var(--violet) 0%, var(--violet-deep) 55%, var(--coral-deep) 130%);
  color: #fff;
  border-radius: 18px;
  padding: 28px;
  text-align: center;
  margin-bottom: 24px;
}
.review-summary-score {
  font-family: "Noto Sans Thai", "Segoe UI", sans-serif;
  font-size: 2.4rem;
  font-weight: 700;
}
.review-summary-stars {
  font-size: 1.3rem;
  color: #FFD873;
  letter-spacing: 2px;
  margin: 4px 0;
}
.review-summary-count { font-size: 0.85rem; opacity: 0.85; }

.review-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.review-card {
  background: var(--card-bg);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px 20px;
}
.review-card-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
}
.review-card-name { font-weight: 700; font-size: 0.92rem; }
.review-card-stars { color: #F5B301; letter-spacing: 1px; }
.review-card-comment {
  font-size: 0.88rem;
  color: var(--ink);
  line-height: 1.7;
  margin: 0 0 8px;
}
.review-card-comment em { color: var(--ink-soft); }
.review-card-date { font-size: 0.72rem; color: var(--ink-soft); }

/* ============================================================
   Admin
   ============================================================ */
.admin-badge {
  display: inline-block;
  background: var(--coral-deep);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  vertical-align: middle;
}

.admin-navbar {
  position: relative;
  z-index: 2;
  padding: 18px 32px;
}
.admin-navbar-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 14px;
  background: rgba(251,248,255,0.9);
  backdrop-filter: blur(10px);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 10px 20px;
  flex-wrap: nowrap;
}
.admin-nav-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  position: relative;
  order: -2;
  margin: 0;
}
.admin-nav-links a {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 6px 2px;
  border-bottom: 2px solid transparent;
}
.admin-nav-links a.active,
.admin-nav-links a:hover {
  color: var(--violet-deep);
  border-bottom-color: var(--violet-deep);
}
.admin-nav-actions {
  order: 1;
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 12px;
  white-space: nowrap;
}
.admin-navbar-inner .logo {
  order: -1;
  white-space: nowrap;
}
.role-tag-admin {
  background: var(--coral-deep);
  white-space: nowrap;
}

.status-removed { background: #FFD6D6; color: #8A1F1F; }

/* ============================================================
   Status badges
   ============================================================ */
.status-booked { background: #FFF3C4; color: #7A5C00; }
.status-pending-review { background: #E0DBFF; color: #4B3B99; }

/* ============================================================
   Fee tiers
   ============================================================ */
.fee-tier-box {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.25);
}
.fee-tier-box h4 {
  font-size: 0.88rem;
  margin: 0 0 4px;
  color: #fff;
}
.fee-tier-box .fee-note {
  color: rgba(255,255,255,0.75);
}
.fee-tier-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.fee-tier-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 9px 12px;
  border-radius: 10px;
  border: 1px solid rgba(255,255,255,0.3);
  background: rgba(255,255,255,0.08);
  font-size: 0.84rem;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.fee-tier-info { display: flex; flex-direction: column; gap: 2px; }
.fee-tier-name { font-weight: 700; color: #fff; }
.fee-tier-range { color: rgba(255,255,255,0.8); }
.fee-tier-rate { font-weight: 700; color: #fff; }
.fee-tier-row.active {
  background: rgba(255,255,255,0.22);
  border-color: #fff;
}
.fee-tier-row.active .fee-tier-range,
.fee-tier-row.active .fee-tier-rate {
  color: #fff;
}

/* ============================================================
   Issue evidence
   ============================================================ */
.issue-evidence {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 14px;
  margin-bottom: 16px;
}
.issue-evidence h4 {
  font-size: 0.88rem;
  margin: 0 0 10px;
}
.issue-evidence-row {
  margin-bottom: 12px;
}
.issue-evidence-row:last-child { margin-bottom: 0; }
.issue-evidence-label {
  display: block;
  font-size: 0.78rem;
  color: var(--ink-soft);
  margin-bottom: 6px;
}
.evidence-thumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.evidence-thumb {
  width: 64px;
  height: 64px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--line);
  cursor: pointer;
  transition: transform 0.15s ease;
}
.evidence-thumb:hover { transform: scale(1.05); }

/* ============================================================
   Proof field + rejection banner
   ============================================================ */
.proof-field {
  border: 1px dashed var(--coral-deep);
  background: #FFF6F7;
  border-radius: 12px;
  padding: 14px;
  margin-top: 8px;
}
.proof-field label { margin-top: 0 !important; }

#rejectionBanner p { margin: 0; }

.sell-form-box input:disabled,
.sell-form-box select:disabled {
  background: #F3F1F8;
  color: var(--ink-soft);
  cursor: not-allowed;
  opacity: 0.75;
}

/* ============================================================
   Form banner
   ============================================================ */
.form-banner {
  border-radius: 12px;
  padding: 16px 20px;
  margin-bottom: 20px;
  text-align: left;
  border-left: 4px solid transparent;
}
.form-banner-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}
.form-banner-highlight {
  margin: 8px 0 0;
  font-size: 0.88rem;
  font-weight: 700;
}
.form-banner-sub {
  margin: 8px 0 0;
  font-size: 0.8rem;
  color: var(--ink-soft);
}

.form-banner-warning {
  background: #FFF1F2;
  border-left-color: #E88A94;
}
.form-banner-warning .form-banner-highlight { color: #99425A; }

.form-banner-info {
  background: #F1EEFF;
  border-left-color: var(--violet-deep);
}
.form-banner-info .form-banner-highlight { color: var(--violet-deep); }

.form-banner-success {
  background: var(--btn-success-soft-bg);
  border-left-color: var(--btn-success-bg);
}
.form-banner-success .form-banner-highlight { color: var(--btn-success-soft-fg); }

/* ============================================================
   Icon in buttons
   ============================================================ */
.btn svg,
.row-btn svg,
.btn-dark svg,
.btn-outline svg,
.btn-approve svg,
.btn-reject svg,
.custom-select-btn svg,
.btn-clear svg,
.confirm-btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  display: block;
}
/* Universal button fix — บังคับทุกปุ่มให้จัดกลาง */
button,
a[class],
[role="button"] {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  line-height: 1.5 !important;
  vertical-align: middle !important;
}

/* ยกเว้นปุ่ม icon ที่ต้องเป็น flex-column */
.nav-hamburger-btn {
  flex-direction: column !important;
}

/* ยกเว้นแถวเมนูใน sidebar (a[class] ข้างบนบังคับ justify-content:center และ inline-flex ไว้
   ทำให้ข้อความในเมนูไปอยู่กึ่งกลางแทนที่จะชิดซ้าย) ให้กลับมาเป็นแถวเต็มความกว้าง ชิดซ้ายเหมือนเดิม */
.nav-sidebar-links a {
  display: flex !important;
  justify-content: flex-start !important;
  text-align: left !important;
}
.nav-sidebar-logout-btn {
  justify-content: center !important;
  text-align: center !important;
}

/* ข้อความในปุ่ม */
button > span,
a[class] > span,
[role="button"] > span {
  display: inline-flex;
  align-items: center;
  line-height: 1.5;
}

/* ===== กล่องวิธีรับบัตร (หน้ารายละเอียดบัตร / checkout) ===== */
.delivery-box { margin: 14px 0; padding: 14px 16px; border-radius: 12px; background: #f3f0ff; border-left: 4px solid #8b6cf6; font-size: 13.5px; line-height: 1.7; }
.delivery-box h3 { margin: 0 0 6px; font-size: 14.5px; }
.delivery-box ol { margin: 0 0 6px 18px; padding: 0; }
.delivery-box p { margin: 0; font-size: 12.5px; color: #666; }

/* ===== ลิงก์ footer ให้เห็นว่ากดได้ (ปุ่มแคปซูล) ===== */
.footer-links a, .info-footer-links a {
  display: inline-block; padding: 7px 16px; border-radius: 999px;
  background: #fff; border: 1px solid #d9d2f7; color: #5b3fd1 !important;
  font-size: 13.5px; font-weight: 500; text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(91, 63, 209, .08);
  transition: background .15s, border-color .15s, transform .15s, box-shadow .15s;
}
.footer-links a:hover, .info-footer-links a:hover {
  background: #f3f0ff; border-color: #8b6cf6; transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(91, 63, 209, .18);
}
.footer-links a.active, .info-footer-links a.active { background: #8b6cf6; border-color: #8b6cf6; color: #fff !important; }
.footer-links, .info-footer-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px !important; margin-bottom: 14px !important; }


/* ===== ผังที่นั่ง: การ์ดเต็มความกว้าง รูปเด่น ไม่เล็กลอยซ้าย ===== */
.seatmap-section { margin-top: 16px; padding: 22px 24px 24px; border: 1px solid var(--line); border-radius: 16px; background: #fff; text-align: center; }
.seatmap-section h2 { font-size: 1.15rem; margin: 0 0 4px; }
.seatmap-hint { margin: 0 0 16px; }
.seatmap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; justify-items: center; }
.seatmap-grid:has(> :only-child) { grid-template-columns: minmax(0, 560px); justify-content: center; }
.seatmap-thumb-wrap { position: relative; display: block; width: 100%; border-radius: 14px; overflow: hidden; background: #faf9ff; border: 1px solid var(--line); cursor: zoom-in; }
.seatmap-thumb { width: 100%; height: auto; max-height: 360px; object-fit: contain; border: 0; border-radius: 0; display: block; transform: none !important; }
.seatmap-thumb-wrap::after { content: "แตะเพื่อขยาย"; position: absolute; right: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; background: rgba(32, 24, 64, .72); color: #fff; font-size: 12px; line-height: 1.4; }
@media (max-width: 640px) { .seatmap-section { padding: 16px; } .seatmap-thumb { width: 100%; height: auto; } }


/* ===== แกลเลอรีรวม โปสเตอร์ + ผังที่นั่ง (แท็บ) ===== */
.gallery-tabs { display: flex; justify-content: center; gap: 6px; margin: 0 auto 12px; padding: 4px; width: fit-content; background: #f1eefc; border-radius: 999px; }
.gallery-tab { border: 0 !important; background: transparent !important; color: #6b5bd0 !important; padding: 7px 20px !important; border-radius: 999px !important; font-size: 13.5px !important; font-weight: 600 !important; cursor: pointer; box-shadow: none !important; min-height: 0 !important; }
.gallery-tab.active { background: #fff !important; color: #3f2aa8 !important; box-shadow: 0 1px 4px rgba(63, 42, 168, .18) !important; }
.gallery-main { position: relative; }
.gallery-main img { cursor: zoom-in; }
.gallery-main-seat { background: #fff; }
.gallery-main-seat img { object-fit: contain; }
.gallery-zoom { position: absolute; right: 10px; top: 10px; width: 32px; height: 32px; border-radius: 50%; background: rgba(32, 24, 64, .7); color: #fff; display: flex; align-items: center; justify-content: center; pointer-events: none; }
.gallery-arrow { position: absolute; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; padding: 0 !important; min-height: 0 !important; border-radius: 50% !important; border: 0 !important; background: rgba(32, 24, 64, .65) !important; color: #fff !important; font-size: 22px !important; line-height: 1 !important; justify-content: center; cursor: pointer; }
.gallery-prev { left: 10px; } .gallery-next { right: 10px; }
.gallery-count { position: absolute; left: 10px; bottom: 10px; padding: 3px 10px; border-radius: 999px; background: rgba(32, 24, 64, .65); color: #fff; font-size: 12px; }
.gallery-caption { margin: 10px 0 0; text-align: center; font-size: 13px; color: var(--ink-soft); }
.gallery-main-seat { aspect-ratio: auto; max-width: 560px; }
.gallery-main-seat img { height: auto; max-height: 560px; }

/* ===== รองรับทุกหน้าจอ (มือถือ/แท็บเล็ต/คอม) ===== */
html { overflow-x: clip; }
body { max-width: 100%; }
img, video { max-width: 100%; }
@media (max-width: 640px) {
  .navbar-inner { flex-wrap: nowrap !important; padding: 8px 12px; gap: 8px; }
  .user-chip .user-greet { display: none; }
  .nav-actions { gap: 6px; }
  .nav-actions .btn { padding: 8px 12px; font-size: .85rem; min-height: 40px; }
  .logo { font-size: 1.05rem; }
  .detail-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 16px; }
  /* แถวประกาศของฉัน / รายการ: ซ้อนแนวตั้ง ไม่บีบข้อความ */
  .listing-row { flex-wrap: wrap; align-items: flex-start; gap: 10px 12px; }
  .listing-row .row-banner { width: 56px; height: 56px; }
  .listing-row .row-info { flex: 1 1 calc(100% - 80px); min-width: 0; }
  .listing-row .row-actions { flex: 1 1 100%; flex-wrap: wrap; justify-content: flex-start; }
  .listing-row .row-actions .row-btn, .listing-row .row-actions a, .listing-row .row-actions button { flex: 1 1 auto; justify-content: center; }
  .listing-row .row-status { white-space: nowrap; }
  .sd-bar-labels span { font-size: .62rem; }
  .sell-form-box, .listings-page { max-width: 100%; }
}
@media (min-width: 641px) and (max-width: 900px) {
  .navbar-inner { padding: 10px 14px; }
  .user-chip .user-greet { max-width: 140px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: inline-block; vertical-align: bottom; }
}

/* ============================================================
   แก้หน้าจอโทรศัพท์: เมนูบนสุดล้น, แถบจุดเด่น, ตารางใบเสร็จ
   ============================================================ */
@media (max-width: 640px) {
  .navbar { padding: 10px 10px !important; }
  .navbar-inner { padding: 6px 8px !important; gap: 6px !important; min-width: 0; }
  .navbar-inner .logo { font-size: .98rem !important; }
  .nav-actions { flex-shrink: 0; gap: 5px !important; }
  .nav-actions .btn { padding: 6px 10px !important; font-size: .78rem !important; min-height: 36px !important; white-space: nowrap; }
  .trust-bar { display: grid !important; grid-template-columns: 1fr 1fr; gap: 10px 8px !important; padding: 14px 16px !important; font-size: .78rem !important; justify-content: stretch; }
  .trust-item { gap: 6px; }
}
@media (max-width: 380px) {
  .nav-actions .btn { padding: 6px 8px !important; font-size: .72rem !important; }
  .navbar-inner .logo { font-size: .9rem !important; }
}
@media (max-width: 600px) {
  .receipt-table, .receipt-table tbody, .receipt-table tr, .receipt-table td { display: block; width: 100%; }
  .receipt-table thead { display: none; }
  .receipt-table tr { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .receipt-table td { padding: 3px 0 !important; border-bottom: none !important; text-align: left !important; }
  .receipt-table td:first-child { font-size: .78rem; color: var(--ink-soft); }
  .receipt-table td:last-child { font-size: 1.05rem; font-weight: 700; margin-top: 4px; }
}
