:root {
  --wine: #7A1B29;
  --wine-dark: #631520;
  --wine-light: #942537;
  --wine-soft: #FBF0F2;
  --bg-main: #F5F6F8;
  --card-bg: #FFFFFF;
  --card-border: #E5E7EB;
  --text-primary: #111827;
  --text-secondary: #374151;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --green: #10B981;
  --green-soft: #ECFDF5;
  --red: #EF4444;
  --amber: #F59E0B;
  --blue: #3B82F6;
  --font-base: -apple-system, BlinkMacSystemFont, "PingFang SC", "HarmonyOS Sans SC", "Heiti SC", "Microsoft YaHei", sans-serif;
  --font-din: "DIN Alternate", "DIN Condensed", "Impact", -apple-system, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
}

body {
  font-family: var(--font-base);
  background-color: var(--bg-main);
  color: var(--text-primary);
  line-height: 1.5;
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[v-cloak] {
  display: none !important;
}

.symbols {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.app-root {
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-main);
}

/* =================================================== */
/* Common Utilities & Toasts                           */
/* =================================================== */
.font-din { font-family: var(--font-din); }
.font-mono { font-family: var(--font-mono); }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
.text-xs { font-size: 11px; }

.error-toast {
  position: sticky;
  top: 0;
  z-index: 100;
  background: #FEF2F2;
  border-left: 4px solid var(--wine);
  color: #991B1B;
  padding: 10px 16px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.toast-close {
  background: transparent;
  border: 0;
  color: #991B1B;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  padding: 4px 8px;
}

/* Main Page Container */
.page-container {
  max-width: 480px;
  margin: 0 auto;
  padding-bottom: 90px;
  min-height: 100vh;
  position: relative;
  background-color: var(--bg-main);
  overflow-x: hidden;
}

/* Back Navigation Button */
.nav-back-btn {
  background: rgba(0, 0, 0, 0.35);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #FFFFFF;
  cursor: pointer;
  transition: background 0.2s;
  flex-shrink: 0;
}

.nav-back-btn:active {
  background: rgba(0, 0, 0, 0.55);
}

.nav-back-btn svg {
  width: 18px;
  height: 18px;
}

/* Buttons */
.wine-primary-btn {
  background: var(--wine);
  border: 0;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  border-radius: 24px;
  padding: 12px 24px;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(122, 27, 41, 0.25);
  transition: background 0.2s, transform 0.1s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.wine-primary-btn:active {
  background: var(--wine-dark);
  transform: scale(0.98);
}

.wine-primary-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
  transform: none;
}

.wine-primary-btn.full {
  width: 100%;
}

.outline-action-btn {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 600;
  border-radius: 24px;
  padding: 10px 20px;
  cursor: pointer;
  transition: all 0.2s;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.outline-action-btn:active {
  background: #F3F4F6;
  border-color: #D1D5DB;
}

.outline-action-btn.full {
  width: 100%;
}

.text-cancel-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 8px 12px;
}

.text-cancel-btn:hover {
  color: var(--red);
}

/* =================================================== */
/* 1. SCENIC HEADERS (Alpine Meadow, Mountains, Fair)  */
/* =================================================== */
.scenic-hero {
  position: relative;
  min-height: 250px;
  background: url("static/home_hero_bg.jpg") center/cover no-repeat;
  padding: 40px 20px 30px;
  color: #FFFFFF;
  overflow: hidden;
}

.scenic-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.2) 0%, rgba(17, 24, 39, 0.7) 100%);
  pointer-events: none;
}

.hero-header-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.hero-gov-badge {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
  background: rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  font-weight: 500;
}

.hero-auth-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #FFFFFF;
  color: var(--wine);
  font-size: 12px;
  font-weight: 700;
  padding: 5px 12px;
  border-radius: 20px;
  border: none;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  transition: all 0.2s ease;
}

.hero-auth-chip:active {
  transform: scale(0.95);
  background: #FDF2F4;
}

.hero-auth-chip.logged {
  background: rgba(0, 0, 0, 0.45);
  color: #FFFFFF;
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-weight: 500;
}

.chip-user-icon {
  width: 14px;
  height: 14px;
}

.online-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #10B981;
}

.hero-content {
  position: relative;
  z-index: 2;
}

.hero-tag-badge {
  display: inline-block;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}

.calligraphy-title {
  font-size: 26px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 1px;
  line-height: 1.25;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}

.calligraphy-sub {
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.9);
  margin-top: 6px;
  line-height: 1.4;
}

.hero-apply-btn {
  margin-top: 20px;
  padding: 10px 22px;
  border: 0;
  border-radius: 24px;
  background: #FFFFFF;
  color: var(--wine);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
  transition: transform 0.15s, background 0.15s;
}

.hero-apply-btn:active {
  transform: scale(0.97);
  background: #F3F4F6;
}

/* Floating 3-Metric Ribbon */
.metric-ribbon-card {
  position: relative;
  z-index: 10;
  margin: -24px 16px 16px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 12px;
  display: flex;
  justify-content: space-around;
  align-items: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.metric-col {
  text-align: center;
  flex: 1;
}

.num-stat {
  font-size: 26px;
  font-weight: 900;
  color: var(--wine);
  line-height: 1.1;
}

.label-stat {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
  font-weight: 500;
}

.metric-divider {
  width: 1px;
  height: 28px;
  background: var(--card-border);
}

/* Section styling */
.home-section {
  padding: 0 16px;
  margin-bottom: 20px;
}

.home-section-title {
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-section-title h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.home-section-title h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--wine);
  border-radius: 2px;
}

/* 3-Column Category Grid with 3D photos */
.cat-three-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.cat-pill-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 14px 8px 12px;
  text-align: center;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
  transition: transform 0.2s, box-shadow 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cat-pill-card:active {
  transform: scale(0.97);
  background: #F9FAFB;
}

.cat-photo-box {
  width: 64px;
  height: 64px;
  margin-bottom: 8px;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

.cat-photo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cat-card-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 2px;
}

.cat-card-name .arrow {
  color: var(--text-light);
  font-size: 14px;
}

.cat-card-avail {
  font-size: 11px;
  color: var(--green);
  font-weight: 600;
  background: var(--green-soft);
  padding: 2px 8px;
  border-radius: 10px;
  margin-top: 6px;
}

/* Five-Step Flow */
.five-step-flow {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.flow-step-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.flow-step-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #F3F4F6;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.flow-step-item.active .flow-step-num {
  background: var(--wine);
  color: #FFFFFF;
}

.flow-step-name {
  font-size: 11px;
  color: var(--text-secondary);
  font-weight: 500;
  white-space: nowrap;
}

.flow-arrow {
  color: var(--text-light);
  font-size: 12px;
}

/* Notice Ticker Bar */
.notice-bar-ticker {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.notice-icon {
  width: 18px;
  height: 18px;
  color: var(--wine);
  flex-shrink: 0;
  display: flex;
  align-items: center;
}

.notice-icon svg {
  width: 100%;
  height: 100%;
}

.notice-lbl {
  font-size: 12px;
  color: var(--wine);
  font-weight: 700;
  white-space: nowrap;
}

.notice-txt {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1;
}

/* Event Facts Card */
.event-facts {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 16px 20px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.02);
}

.event-facts p {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.8;
}

.event-facts a {
  color: var(--wine);
  text-decoration: none;
  font-weight: 600;
}

/* =================================================== */
/* 2. BOOTH MAP VIEW                                   */
/* =================================================== */
.map-mountain-header {
  position: relative;
  min-height: 190px;
  background: url("static/booth_map_bg.jpg") center/cover no-repeat;
  padding: 24px 16px 20px;
  color: #FFFFFF;
  text-align: center;
  overflow: hidden;
}

.map-mountain-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.3) 0%, rgba(17, 24, 39, 0.75) 100%);
  pointer-events: none;
}

.map-nav-top {
  position: absolute;
  left: 16px;
  top: 24px;
  z-index: 10;
}

.map-header-titles {
  position: relative;
  z-index: 2;
  margin-top: 6px;
}

.map-main-title {
  font-size: 22px;
  font-weight: 800;
  color: #FFFFFF;
  letter-spacing: 1px;
}

.map-sub-title {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.85);
  margin-top: 2px;
}

.map-zone-pills {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.zone-pill {
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  border-radius: 20px;
  padding: 5px 14px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.zone-pill.active {
  background: #FFFFFF;
  color: var(--wine);
  border-color: #FFFFFF;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.map-legend-bar {
  background: var(--card-bg);
  padding: 10px 16px;
  display: flex;
  justify-content: center;
  gap: 20px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--card-border);
}

.map-legend-bar span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
}

.legend-dot.AVAILABLE { background-color: var(--green); }
.legend-dot.LOCKED { background-color: var(--amber); }
.legend-dot.OCCUPIED { background-color: var(--red); }
.legend-dot.MY_BOOTH { background-color: var(--wine); }

/* =================================================== */
/* 2. BOOTH MAP VIEW (无滚动条、100%全宽适应、充实布局)  */
/* =================================================== */
.map-view {
  min-height: calc(100vh - 60px);
  padding-bottom: 90px;
  overflow-x: hidden;
}

.map-card-wrapper {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  margin: 16px;
  padding: 18px 16px 20px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.03);
  overflow: hidden;
}

.map-card-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--line);
}

.map-card-badge {
  font-size: 11px;
  font-weight: 700;
  color: var(--wine);
  background: var(--wine-tint);
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid rgba(122, 27, 41, 0.2);
}

.map-card-hint {
  font-size: 11px;
  color: var(--text-muted);
}

/* 门头条幅（主入口、次出入口） */
.map-entrance-banner {
  background: #1E293B;
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
  padding: 10px 0;
  border-radius: 8px;
  letter-spacing: 1px;
  margin-bottom: 14px;
}

.map-entrance-banner.secondary {
  background: #334155;
  margin-top: 14px;
  margin-bottom: 16px;
}

.entrance-icon {
  font-size: 10px;
  margin: 0 4px;
  opacity: 0.85;
}

/* 规整方格矩阵 (无任何左右上下滚动条，100% 自适应) */
.booth-clean-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  width: 100%;
  box-sizing: border-box;
}

@media (max-width: 360px) {
  .booth-clean-grid {
    gap: 6px;
  }
}

.booth-clean-cell {
  aspect-ratio: 1 / 1;
  min-height: 54px;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 1.5px solid transparent;
  cursor: pointer;
  padding: 4px;
  box-sizing: border-box;
  background: #FFFFFF;
  transition: transform 0.1s ease, box-shadow 0.1s ease;
  user-select: none;
}

.booth-clean-cell:active {
  transform: scale(0.94);
}

.booth-no-text {
  font-family: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.1;
}

.booth-status-text {
  font-size: 10px;
  font-weight: 500;
  margin-top: 2px;
  line-height: 1;
}

.booth-mine-tag {
  position: absolute;
  top: 2px;
  right: 2px;
  background: var(--wine);
  color: #FFFFFF;
  font-size: 9px;
  padding: 1px 3px;
  border-radius: 4px;
  line-height: 1;
}

/* 状态色（高对比度，清晰明了） */
.booth-clean-cell.AVAILABLE {
  background: #ECFDF5;
  border-color: #A7F3D0;
  color: #065F46;
}

.booth-clean-cell.LOCKED {
  background: #FFFBEB;
  border-color: #FDE68A;
  color: #92400E;
}

.booth-clean-cell.OCCUPIED {
  background: #F3F4F6;
  border-color: #E5E7EB;
  color: #9CA3AF;
  opacity: 0.9;
}

.booth-clean-cell.ADMIN_RESERVED {
  background: #F1F5F9;
  border-color: #CBD5E1;
  color: #64748B;
  opacity: 0.9;
}

.booth-clean-cell.is-mine {
  background: var(--wine-tint);
  border-color: var(--wine);
  color: var(--wine);
}

.booth-clean-cell.chosen {
  border-color: var(--wine) !important;
  box-shadow: 0 0 0 3px rgba(122, 27, 41, 0.28);
  transform: scale(1.05);
  z-index: 5;
}

/* 全部展位分区与通道 */
.booth-all-zones {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.zone-divider-title {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-primary);
  margin-bottom: 8px;
  padding-left: 2px;
}

.zone-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--wine);
}

.zone-count {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

.site-aisle-divider {
  background: #F8FAFC;
  border: 1px dashed #CBD5E1;
  color: #64748B;
  font-size: 11px;
  font-weight: 600;
  text-align: center;
  padding: 8px 0;
  border-radius: 6px;
  margin: 12px 0 6px;
  letter-spacing: 1px;
}

/* 专区规划与实时统计卡片 (充实底部空间，解决空旷感) */
.zone-summary-card {
  background: #F8FAFC;
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 14px;
  margin-top: 14px;
}

.zone-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.summary-name-box {
  display: flex;
  align-items: center;
  gap: 8px;
}

.summary-badge {
  font-size: 10px;
  background: #E2E8F0;
  color: #475569;
  padding: 2px 6px;
  border-radius: 4px;
  font-weight: 600;
}

.summary-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
}

.summary-price {
  font-size: 18px;
  font-weight: 900;
  color: var(--wine);
}

.summary-price small {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: normal;
}

.zone-stats-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.stat-pill {
  font-size: 11px;
  padding: 4px 10px;
  border-radius: 20px;
  background: #FFFFFF;
  border: 1px solid #E2E8F0;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
}

.stat-pill strong {
  font-weight: 800;
  color: var(--text-primary);
}

.stat-pill .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  display: inline-block;
}

.stat-pill .dot.ok { background: #10B981; }
.stat-pill .dot.occupied { background: #94A3B8; }
.stat-pill .dot.reserved { background: #64748B; }

.zone-specs-details {
  border-top: 1px solid #EDF2F7;
  padding-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.spec-item {
  display: flex;
  align-items: flex-start;
  font-size: 11px;
  line-height: 1.5;
}

.spec-label {
  color: var(--text-muted);
  white-space: nowrap;
  flex-shrink: 0;
}

.spec-val {
  color: var(--text-secondary);
}

/* 选定展位卡片/抽屉 */
.map-action-drawer {
  position: fixed;
  bottom: 60px;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  background: #FFFFFF;
  border-top: 1px solid #E2E8F0;
  box-shadow: 0 -6px 24px rgba(0, 0, 0, 0.08);
  border-radius: 16px 16px 0 0;
  padding: 16px 20px 22px;
  z-index: 80;
  animation: slideUpDrawer 0.2s ease-out;
}

@keyframes slideUpDrawer {
  from { transform: translateY(20px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.drawer-header-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.drawer-title-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.drawer-booth-tag {
  font-family: inherit;
  font-size: 18px;
  font-weight: 900;
  padding: 6px 12px;
  border-radius: 8px;
  background: var(--wine-tint);
  color: var(--wine);
  border: 1px solid var(--wine);
}

.drawer-booth-tag.AVAILABLE {
  background: #ECFDF5;
  color: #065F46;
  border-color: #A7F3D0;
}

.drawer-booth-tag.OCCUPIED {
  background: #F3F4F6;
  color: #9CA3AF;
  border-color: #E5E7EB;
}

.drawer-title-texts {
  display: flex;
  flex-direction: column;
}

.drawer-title-texts strong {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.drawer-cat {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 2px;
}

.drawer-fee-box {
  text-align: right;
}

.drawer-fee-lbl {
  display: block;
  font-size: 10px;
  color: var(--text-muted);
}

.drawer-fee {
  font-size: 20px;
  font-weight: 900;
  color: var(--wine);
}

.drawer-status-tip {
  font-size: 12px;
  line-height: 1.5;
  margin-top: 6px;
  padding: 6px 10px;
  border-radius: 6px;
}

.drawer-status-tip.warning {
  background: #FFFBEB;
  color: #B45309;
}

.drawer-status-tip.neutral {
  background: #F1F5F9;
  color: #475569;
}

.drawer-status-tip.info {
  background: #EFF6FF;
  color: #1D4ED8;
}

/* =================================================== */
/* 3. PROMO SCENIC HEADER (Mine, Apply, Pay)          */
/* =================================================== */
.promo-scenic-header {
  position: relative;
  min-height: 200px;
  background: url("static/fair_promo_poster.jpg") center/cover no-repeat;
  padding: 20px 16px 36px;
  color: #FFFFFF;
  overflow: hidden;
}

.promo-scenic-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(17, 24, 39, 0.45) 0%,
    rgba(17, 24, 39, 0.25) 50%,
    rgba(245, 246, 248, 0.95) 90%,
    var(--bg-main) 100%
  );
  pointer-events: none;
}

.promo-header-top-bar {
  position: relative;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.header-center-tag {
  font-size: 13px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.95);
  letter-spacing: 1px;
}

.promo-header-inner {
  position: relative;
  z-index: 2;
  text-align: center;
}

.promo-header-slogan {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 1.5px;
  color: #FFFFFF;
}

.promo-header-bilingual {
  margin-top: 4px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.promo-header-tibetan {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.9);
}

.promo-header-sub {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.95);
  font-weight: 500;
}

/* Mine and Float main body */
.mine-main-body,
.float-main-body {
  position: relative;
  z-index: 10;
  margin-top: -24px;
  padding: 0 16px;
}

/* =================================================== */
/* 4. MINE VIEW (Client Mockup 1:1 Pure White Cards)   */
/* =================================================== */
/* Logged-in Merchant Profile Card */
.merchant-profile-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 16px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  display: flex;
  align-items: center;
  gap: 12px;
}

.profile-avatar-box {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--wine-soft);
  color: var(--wine);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.profile-avatar-box svg {
  width: 22px;
  height: 22px;
}

.profile-info-col {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.profile-phone-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.profile-phone {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.profile-tag {
  display: inline-block;
  background: var(--wine-soft);
  color: var(--wine);
  font-size: 11px;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 10px;
}

.profile-sub-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.profile-action-col {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex-shrink: 0;
}

.profile-link-btn {
  background: transparent;
  border: 1px solid var(--wine);
  color: var(--wine);
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}

.profile-link-btn:active {
  background: var(--wine-soft);
}

.profile-logout-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 12px;
  cursor: pointer;
  padding: 2px 4px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s;
  white-space: nowrap;
}

.profile-logout-btn:active {
  color: var(--wine);
}

/* Card Header Between & Close */
.card-head-between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.card-head-between h3 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
}

.text-close-btn {
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 4px;
}

/* Form Groups and Inputs */
.form-group {
  margin-bottom: 14px;
  text-align: left;
}

.form-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 6px;
  text-align: left;
}

.sms-login-form {
  text-align: left;
  margin-top: 18px;
}

.sms-login-form .wine-input {
  width: 100%;
  box-sizing: border-box;
  margin-top: 0;
  height: 42px;
  padding: 0 14px;
  font-size: 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  background: #FFFFFF;
}

.sms-code-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.sms-code-row .wine-input {
  flex: 1;
  min-width: 0;
  margin-top: 0;
}

.sms-code-button {
  margin-top: 0;
  min-width: 110px;
  height: 42px;
  border: 1px solid var(--wine);
  color: var(--wine);
  background: #FFFFFF;
  border-radius: 8px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  transition: all 0.2s;
  white-space: nowrap;
}

.sms-code-button:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  border-color: var(--card-border);
  color: var(--text-muted);
}

.sms-code-button:not(:disabled):active {
  background: var(--wine-soft);
}

.sms-login-note {
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.6;
  margin: 12px 0 0;
  text-align: center;
}

.sms-demo-note {
  padding: 8px 12px;
  background: #FEF3C7;
  color: #92400E;
  font-size: 12px;
  border-radius: 6px;
  margin-top: 10px;
  line-height: 1.5;
}

/* Unlogged Card */
.floating-login-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  text-align: center;
}

.login-card-badge {
  display: inline-block;
  background: var(--wine-soft);
  color: var(--wine);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.login-card-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.login-card-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.login-secure-hint {
  font-size: 11px;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
}

.secure-icon {
  color: var(--green);
  font-weight: bold;
}

/* 5-Step Process Guide Card */
.process-guide-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 16px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.guide-card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--card-border);
}

.guide-card-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: 0.5px;
}

.guide-card-tibetan {
  font-size: 11px;
  color: var(--text-light);
}

.process-steps-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  text-align: center;
}

.process-grid-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}

.step-num-bubble {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--wine-soft);
  color: var(--wine);
  font-size: 12px;
  font-weight: 800;
  font-family: var(--font-din);
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(122, 27, 41, 0.15);
}

.step-label-text {
  font-size: 11px;
  color: var(--text-secondary);
  line-height: 1.3;
  font-weight: 500;
  text-align: center;
}

/* Empty Registration Card */
.empty-guide-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px 20px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.empty-guide-tag {
  display: inline-block;
  background: var(--wine-soft);
  color: var(--wine);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 10px;
}

.empty-guide-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.empty-guide-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Service links row */
.service-links-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 0;
}

.service-link-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-muted);
  font-size: 13px;
  text-decoration: none;
  cursor: pointer;
}

.service-link-divider {
  width: 1px;
  height: 14px;
  background: var(--card-border);
}

/* Dossier Card (1:1 with Client Mockup) */
.dossier-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
  position: relative;
  overflow: hidden;
}

.dossier-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.d-no {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-secondary);
}

.d-tag-wine {
  background: var(--wine);
  color: #FFFFFF;
  font-size: 12px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 14px;
}

.d-main-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--text-primary);
}

.d-tibetan-sub {
  font-size: 11px;
  color: var(--text-light);
  margin-top: 2px;
  margin-bottom: 14px;
}

.dossier-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  border-top: 1px dashed var(--card-border);
  font-size: 13px;
}

.d-intent {
  color: var(--text-secondary);
  font-weight: 600;
}

.d-deposit {
  color: var(--wine);
  font-weight: 700;
}

/* Progress Timeline Card */
.progress-timeline-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.timeline-head {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 16px;
}

.timeline-head h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.timeline-tibetan {
  font-size: 11px;
  color: var(--text-light);
}

.vertical-stepper {
  display: flex;
  flex-direction: column;
}

.v-step {
  display: flex;
  position: relative;
  min-height: 52px;
}

.v-step:last-child {
  min-height: auto;
}

.v-line {
  position: absolute;
  left: 12px;
  top: 26px;
  bottom: -4px;
  width: 2px;
  background: var(--card-border);
}

.v-step.completed .v-line {
  background: var(--wine);
}

.v-dot {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: #F3F4F6;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  flex-shrink: 0;
  margin-right: 14px;
}

.v-step.active .v-dot {
  background: var(--wine);
  color: #FFFFFF;
  box-shadow: 0 0 0 4px var(--wine-soft);
}

.v-step.completed .v-dot {
  background: var(--wine);
  color: #FFFFFF;
}

.v-content {
  flex: 1;
  padding-bottom: 16px;
}

.v-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.v-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.v-badge {
  font-size: 11px;
  color: var(--wine);
  font-weight: 700;
  background: var(--wine-soft);
  padding: 2px 8px;
  border-radius: 10px;
}

.v-desc {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 3px;
}

.audit-opinion {
  background: #FEF2F2;
  border-left: 3px solid var(--red);
  padding: 10px 14px;
  border-radius: 6px;
  margin: 12px 0;
  font-size: 12px;
  color: #991B1B;
}

.timeline-bottom-actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

.timeline-bottom-actions button {
  flex: 1;
}

/* Billing & Orders Card */
.billing-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 20px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.billing-card h2 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 12px;
}

.order-record {
  background: #F9FAFB;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.order-record h3 {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 4px;
}

.order-record p {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* =================================================== */
/* 5. APPLY VIEW (Single Column Document Upload Cards) */
/* =================================================== */
.apply-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 22px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

/* Form Steps Tab Indicator */
.apply-steps-indicator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.apply-step-pill {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-light);
}

.apply-step-pill.active {
  color: var(--wine);
}

.apply-step-pill.done {
  color: var(--green);
}

.step-circle {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #F3F4F6;
  color: var(--text-light);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
}

.apply-step-pill.active .step-circle {
  background: var(--wine);
  color: #FFFFFF;
}

.apply-step-pill.done .step-circle {
  background: var(--green);
  color: #FFFFFF;
}

/* Form inputs */
.form-item {
  margin-bottom: 16px;
}

.form-item label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.form-item label .req {
  color: var(--red);
  margin-left: 2px;
}

.form-row-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.wine-input, .wine-textarea {
  width: 100%;
  padding: 10px 14px;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text-primary);
  background: #FFFFFF;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.wine-input:focus, .wine-textarea:focus {
  outline: none;
  border-color: var(--wine);
  box-shadow: 0 0 0 3px var(--wine-soft);
}

.wine-textarea {
  height: 80px;
  resize: vertical;
}

.apply-cat-picker {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}

.picker-btn {
  background: #F9FAFB;
  border: 1px solid var(--card-border);
  border-radius: 8px;
  padding: 10px 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all 0.2s;
}

.picker-btn.selected {
  background: var(--wine);
  color: #FFFFFF;
  border-color: var(--wine);
}

/* Single Column Wide Document Upload Cards */
.upload-guide-tip {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 16px;
  background: #F9FAFB;
  padding: 8px 12px;
  border-radius: 8px;
}

.doc-upload-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.doc-upload-card {
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  padding: 14px 16px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.02);
}

.doc-upload-card.doc-done {
  border-color: #A7F3D0;
  background: #FCFDFD;
}

.doc-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.doc-card-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.doc-card-status-ok {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
}

.doc-card-status-tip {
  font-size: 11px;
  color: var(--text-light);
}

.doc-upload-slot {
  position: relative;
  height: 140px;
  border: 1.5px dashed #CBD5E1;
  background: #F9FAFB;
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  overflow: hidden;
  transition: border-color 0.2s, background 0.2s;
}

.doc-upload-slot:hover {
  background: #F3F4F6;
  border-color: #94A3B8;
}

.doc-slot-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  pointer-events: none;
}

.doc-slot-icon {
  font-size: 26px;
}

.doc-slot-txt {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-secondary);
}

.doc-slot-guide {
  font-size: 11px;
  color: var(--text-light);
}

.file-input-hidden {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
}

.doc-preview-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.doc-preview-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.doc-slot-reselect {
  position: absolute;
  bottom: 8px;
  right: 8px;
  background: rgba(0, 0, 0, 0.6);
  color: #FFFFFF;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  pointer-events: none;
}

.btn-group-2 {
  display: flex;
  gap: 12px;
}

.btn-group-2 button {
  flex: 1;
}

/* Step 3 Notice & Consent */
.notice-contract-box {
  background: #F9FAFB;
  border: 1px solid var(--card-border);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  max-height: 220px;
  overflow-y: auto;
}

.contract-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.contract-body {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.7;
  white-space: pre-wrap;
}

.consent-checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  cursor: pointer;
  line-height: 1.4;
}

.consent-checkbox-row input {
  margin-top: 2px;
  accent-color: var(--wine);
}

/* =================================================== */
/* 6. PAY VIEW                                         */
/* =================================================== */
.countdown-warning-strip {
  background: var(--wine-soft);
  border: 1px solid rgba(122, 27, 41, 0.2);
  border-radius: 12px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.time-digit {
  font-size: 24px;
  font-weight: 900;
  color: var(--wine);
}

.time-desc strong {
  display: block;
  font-size: 13px;
  color: var(--wine);
}

.time-desc span {
  font-size: 11px;
  color: var(--text-muted);
}

.checkout-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 24px 20px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.checkout-amount {
  text-align: center;
  font-size: 38px;
  font-weight: 900;
  color: var(--wine);
  margin-bottom: 20px;
}

.checkout-amount small {
  font-size: 20px;
  font-weight: 600;
  margin-right: 2px;
}

.checkout-rows {
  border-top: 1px solid var(--card-border);
  border-bottom: 1px solid var(--card-border);
  padding: 14px 0;
  margin-bottom: 20px;
}

.c-row {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}

.c-row:last-child {
  margin-bottom: 0;
}

.c-row span {
  color: var(--text-muted);
}

.c-row strong {
  color: var(--text-primary);
}

/* =================================================== */
/* 7. BOTTOM TAB BAR                                   */
/* =================================================== */
.bottom-tab-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  max-width: 480px;
  margin: 0 auto;
  height: 60px;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-top: 1px solid var(--card-border);
  display: flex;
  align-items: center;
  justify-content: space-around;
  z-index: 90;
}

.tab-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 11px;
  font-weight: 500;
  transition: color 0.2s;
  padding: 4px 16px;
}

.tab-item.active {
  color: var(--wine);
  font-weight: 700;
}

.tab-icon {
  width: 22px;
  height: 22px;
}

.tab-center .center-badge-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

/* =================================================== */
/* 8. MODAL DIALOG                                     */
/* =================================================== */
.notice-modal {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 20px;
}

.modal-card {
  background: var(--card-bg);
  border-radius: 16px;
  width: 100%;
  max-width: 400px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.modal-header h3 {
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
}

.modal-close-btn {
  background: transparent;
  border: 0;
  font-size: 18px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px;
}

.modal-body {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 20px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.6;
}

.modal-text {
  margin-bottom: 12px;
  line-height: 1.6;
}

.modal-text:last-child {
  margin-bottom: 0;
}

.contract-para {
  margin-bottom: 8px;
  line-height: 1.6;
}

.contract-para:last-child {
  margin-bottom: 0;
}

.modal-footer button {
  width: 100%;
}
.published-map-background { position:absolute; inset:0; width:100%; height:100%; object-fit:fill; pointer-events:none; }

.published-map-switch { display:flex; gap:8px; margin-bottom:16px; }
.published-map-switch button { border:1px solid #d8c4c8; border-radius:5px; background:white; color:#7a1b29; padding:7px 12px; font-size:12px; }
.published-map-switch button.active { background:#7a1b29; color:white; }
.published-layout .site-map { position:relative; width:100%; background:#f7f9fb; overflow:hidden; border:1px solid #e2e8f0; }
.published-layout .site-booth { position:absolute; transform:translate(-50%,-50%); background:#edf6ef; color:#245438; border:1px solid #82a68d; border-radius:3px; padding:0; font-size:10px; cursor:pointer; }
.published-layout .site-booth.LOCKED { background:#fff1ce; border-color:#c59b27; }
.published-layout .site-booth.OCCUPIED { background:#eadcdd; border-color:#98656d; color:#7a1b29; }
.published-layout .site-booth.ADMIN_RESERVED { background:#e5e4f0; border-color:#77718f; }
.published-layout .site-booth.DISABLED { background:#ddd; color:#777; border-color:#aaa; }
.published-layout .site-booth.MY_BOOTH { background:#7a1b29; color:white; border-color:#7a1b29; }
.published-layout .site-booth.chosen { outline:2px solid #c59b27; z-index:5; }
.published-layout .site-booth.dim { opacity:.35; }
.published-layout .site-aisle { position:absolute; background:#d9e8e3b8; font-size:7px; line-height:1.1; color:#365f52; overflow:hidden; }
.published-layout .site-entrance,.published-layout .site-facility { position:absolute; font-size:8px; white-space:nowrap; color:#6b5014; padding:2px 3px; background:#fff4cd; max-width:100%; overflow:hidden; }
.published-layout .site-facility { color:#325782; background:#e5edf8; }
.published-layout-hint { color:#64748b; font-size:11px; line-height:1.6; margin:10px 0; }
/* Payment status remains visible while the server confirms the transaction. */
.payment-notice { margin-top: 12px; color: #7a1b29; line-height: 1.6; overflow-wrap: anywhere; }

/* =================================================== */
/* 6. RESULT VIEW (Official Digital Booth Pass)        */
/* =================================================== */

/* Official Credential Certificate Card */
.official-credential-card {
  position: relative;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 16px;
  padding: 22px 20px;
  box-shadow: 0 8px 24px rgba(122, 27, 41, 0.08);
  overflow: hidden;
}

.official-credential-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--wine) 0%, #C9A56B 50%, var(--wine) 100%);
}

/* Authority Top Bar */
.cert-authority-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 14px;
  border-bottom: 1px dashed var(--card-border);
}

.cert-gov-badge {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

.cert-gov-seal {
  color: #C9A56B;
  font-size: 13px;
  line-height: 1;
}

.cert-gov-name {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-secondary);
  letter-spacing: 0.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cert-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: var(--green-soft);
  color: #065F46;
  border: 1px solid rgba(16, 185, 129, 0.2);
  font-size: 11px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 12px;
  flex-shrink: 0;
}

.cert-status-pill svg {
  width: 12px;
  height: 12px;
}

/* Booth Hero Showcase */
.cert-booth-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0 12px;
}

.cert-booth-badge-box {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.cert-booth-label {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 500;
}

.cert-booth-num {
  font-size: 32px;
  font-weight: 800;
  color: var(--wine);
  line-height: 1.1;
  letter-spacing: 0.5px;
}

.cert-booth-unit {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  margin-left: 4px;
}

.cert-category-tag {
  background: var(--wine-soft);
  color: var(--wine);
  border: 1px solid rgba(122, 27, 41, 0.15);
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 8px;
  flex-shrink: 0;
}

/* Merchant and Event Meta */
.cert-merchant-row {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--card-border);
}

.cert-merchant-title {
  font-size: 17px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 10px;
  line-height: 1.4;
}

.cert-event-meta {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cert-meta-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.5;
}

.cert-meta-item svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  color: var(--wine);
}

/* Dynamic Anti-Counterfeit QR Core */
.cert-qr-block {
  padding: 20px 0 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.cert-qr-loading {
  padding: 40px 0;
  color: var(--text-muted);
  font-size: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.cert-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--wine-soft);
  border-top-color: var(--wine);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.cert-qr-frame {
  position: relative;
  display: inline-block;
  padding: 10px;
  background: #FFFFFF;
  border: 1px solid var(--card-border);
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.06);
  margin-bottom: 14px;
}

.cert-qr-img-link {
  display: block;
  line-height: 0;
}

.cert-qr-img-link img {
  display: block;
  max-width: 100%;
  width: 190px;
  height: 190px;
  border-radius: 4px;
}

.cert-qr-desc {
  margin-bottom: 14px;
}

.cert-qr-title {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 6px;
}

.cert-qr-code-pill {
  display: inline-block;
  background: var(--bg-main);
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid var(--card-border);
}

.cert-qr-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
  max-width: 320px;
  margin-bottom: 8px;
}

.cert-qr-buttons a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  border-radius: 8px;
}

.cert-local-hint {
  font-size: 11px;
  color: var(--text-light);
  line-height: 1.5;
  margin-top: 6px;
  max-width: 300px;
}

.credential-qr-error {
  color: var(--red);
  font-size: 12px;
  margin-bottom: 10px;
}

.cert-footer-seal {
  margin-top: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--card-border);
  text-align: center;
  font-size: 10px;
  color: var(--text-light);
  line-height: 1.5;
}

/* Receipt Details Card */
.cert-receipt-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 18px 18px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.cert-receipt-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--card-border);
}

.cert-receipt-header h3 {
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.cert-receipt-hint {
  font-size: 11px;
  color: var(--text-muted);
}

.cert-receipt-rows {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cert-receipt-rows .c-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
}

.cert-receipt-rows .c-row span {
  color: var(--text-muted);
}

.cert-receipt-rows .c-row strong {
  color: var(--text-primary);
}

.cert-amount-highlight {
  color: var(--wine) !important;
  font-size: 17px !important;
  font-weight: 800 !important;
}

/* =================================================== */
/* Pending/Empty State Certificate Card                */
/* =================================================== */
.cert-pending-card {
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: 14px;
  padding: 28px 20px 24px;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.04);
}

.cert-pending-emblem {
  display: flex;
  justify-content: center;
  margin-bottom: 16px;
}

.cert-emblem-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--wine-soft) 0%, #F5EAEB 100%);
  border: 2px solid rgba(122, 27, 41, 0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--wine);
  box-shadow: 0 4px 12px rgba(122, 27, 41, 0.08);
}

.cert-emblem-badge svg {
  width: 28px;
  height: 28px;
}

.cert-pending-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--text-primary);
  margin-bottom: 8px;
}

.cert-pending-desc {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 320px;
  margin: 0 auto;
}

.cert-status-strip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--wine-soft);
  border: 1px solid rgba(122, 27, 41, 0.15);
  padding: 5px 14px;
  border-radius: 16px;
  margin-top: 14px;
  font-size: 12px;
}

.status-strip-label {
  color: var(--text-muted);
}

.status-strip-value {
  color: var(--wine);
  font-weight: 700;
}

.cert-pending-actions {
  width: 100%;
}

/* Step 5 Highlight in Process Grid */
.step-target-highlight {
  background: var(--wine) !important;
  color: #FFFFFF !important;
  box-shadow: 0 0 0 3px var(--wine-soft) !important;
}

.step-target-text {
  color: var(--wine) !important;
  font-weight: 700 !important;
}
