:root {
  --primary: #FF8A00;
  --secondary: #FFC83D;
  --bg: #FFFFFF;
  --gray: #F5F5F5;
  --text: #222222;
  --accent: #34C759;
  --radius: 20px;
  --shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
  --nav-h: 72px;
}

/* Login */
.login-page {
  height: 100%;
  background: linear-gradient(180deg, #FFF5E6 0%, #fff 45%);
  padding: 16px 24px 32px;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.login-back {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: rgba(255,255,255,0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #222;
  text-decoration: none;
  box-shadow: var(--shadow);
}
.login-hero {
  text-align: center;
  margin: 28px 0 24px;
}
.login-logo {
  width: auto;
  height: 64px;
  margin: 0 auto 14px;
  display: block;
  animation: scaleIn 0.6s ease, float 3s ease-in-out infinite;
}
.login-logo img {
  width: auto;
  height: 100%;
  object-fit: contain;
}
.login-hero h1 {
  font-size: 24px;
  font-weight: 800;
  margin: 0;
  color: var(--text);
}
.login-hero p {
  margin: 6px 0 0;
  color: #888;
  font-size: 13px;
}
.login-form .form-label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
  margin-bottom: 6px;
}
.input-wrap {
  position: relative;
  margin-bottom: 14px;
}
.input-wrap i {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
}
.input-wrap .form-control {
  border-radius: 16px;
  border: 1.5px solid #eee;
  padding: 12px 14px 12px 42px;
  font-size: 15px;
  background: #fff;
  box-shadow: none;
}
.input-wrap .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.15);
}
.btn-login {
  margin-top: 8px;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #ff9f2e);
  padding: 13px;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 10px 24px rgba(255, 138, 0, 0.35);
}
.btn-login:hover, .btn-login:active {
  background: linear-gradient(135deg, #e67c00, var(--primary));
}
.login-hint {
  text-align: center;
  font-size: 11px;
  color: #aaa;
  margin-top: 16px;
}
.login-error {
  color: #e53935;
  font-size: 12px;
  margin-bottom: 8px;
  text-align: center;
}

/* App shell */
.app-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: var(--gray);
  position: relative;
  transform: translateZ(0);
}
.app-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-bottom: calc(var(--nav-h) + 8px);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
  touch-action: pan-y;
  scrollbar-width: none;
  -ms-overflow-style: none;
  -webkit-user-select: none;
  user-select: none;
  cursor: grab;
}
.app-body::-webkit-scrollbar { display: none; }
.app-body.is-vdragging {
  cursor: grabbing;
  -webkit-user-select: none;
  user-select: none;
}
.app-body input,
.app-body textarea,
.app-body select,
.app-body [contenteditable="true"] {
  -webkit-user-select: text;
  user-select: text;
  cursor: text;
}
.app-body button,
.app-body a,
.app-body .nav-item,
.app-body label {
  cursor: pointer;
}
.page {
  display: none;
  min-height: 100%;
  animation: fadeInUp 0.28s ease;
}
.page.active { display: block; }
body.is-app-dragging {
  cursor: grabbing !important;
  -webkit-user-select: none !important;
  user-select: none !important;
}

/* Bottom nav */
.bottom-nav {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--nav-h);
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  border-top: 1px solid rgba(0,0,0,0.05);
  display: flex;
  justify-content: space-around;
  align-items: flex-start;
  padding: 8px 4px 18px;
  z-index: 100;
}
.nav-item {
  flex: 1;
  border: none;
  background: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  color: #999;
  font-size: 10px;
  font-weight: 600;
  padding: 4px;
  cursor: pointer;
}
.nav-item i { font-size: 20px; }
.nav-item.active {
  color: var(--primary);
}
.nav-item.active i {
  transform: translateY(-1px);
}

/* Cards / glass */
.glass-card {
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  border: 1px solid rgba(255,255,255,0.6);
}

.section-pad { padding: 12px 16px; }
.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  margin: 0 0 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.section-title .link {
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
  border: none;
  background: none;
}

/* Home header */
.home-top {
  background: linear-gradient(135deg, #FF8A00 0%, #FFC83D 100%);
  padding: 6px 16px 16px;
  border-radius: 0 0 28px 28px;
  color: #fff;
  text-align: center;
}
.home-top .greet {
  font-size: 13px;
  opacity: 0.9;
  margin-bottom: 2px;
}
.home-top .brand-line {
  font-size: 13px;
  font-weight: 600;
  margin: 4px 0 10px;
  opacity: 0.95;
}
.home-top .brand-mark {
  width: auto;
  height: 28px;
  max-width: 180px;
  margin: 0 auto 4px;
  display: block;
}
.home-top .brand-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.search-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border-radius: 16px;
  padding: 10px 14px;
  color: #888;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
  cursor: pointer;
}
.search-bar span { font-size: 13px; flex: 1; }

.banner-wrap {
  margin: -8px 16px 0;
  position: relative;
  z-index: 2;
}
.banner {
  border-radius: var(--radius);
  overflow: hidden;
  height: 120px;
  background: linear-gradient(120deg, #ff6b00, #ffb347);
  position: relative;
  box-shadow: var(--shadow);
  color: #fff;
  padding: 18px 20px;
}
.banner h3 { font-size: 18px; font-weight: 800; margin: 0 0 4px; }
.banner p { font-size: 12px; margin: 0; opacity: 0.92; }
.banner .bi-stars {
  position: absolute;
  right: 16px;
  bottom: 12px;
  font-size: 48px;
  opacity: 0.25;
}

/* Promo slider */
.promo-slider {
  height: 120px;
  border-radius: var(--radius);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow);
  background: #f5f5f5;
  touch-action: pan-y;
  cursor: grab;
  user-select: none;
}
.promo-slider.is-swiping {
  cursor: grabbing;
}
.promo-slider.is-swiping .promo-track {
  transition: none;
}
.promo-track {
  display: flex;
  height: 100%;
  transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}
.promo-slide {
  flex: 0 0 100%;
  height: 100%;
  border: none;
  padding: 0;
  margin: 0;
  background: none;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  touch-action: pan-y;
}
.promo-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  pointer-events: none;
}
.promo-slide-label {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 20px 14px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,0.45));
  color: #fff;
  font-size: 12px;
  font-weight: 800;
  text-align: left;
  pointer-events: none;
}
.promo-dots {
  position: absolute;
  bottom: 8px;
  right: 10px;
  display: flex;
  gap: 5px;
  z-index: 2;
}
.promo-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255,255,255,0.45);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.25s ease;
}
.promo-dot.active {
  background: #fff;
  width: 16px;
}

/* Home carousel menu */
.carousel {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding: 4px 2px 6px;
  animation: fadeInUp 0.45s ease;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.carousel.is-dragging {
  cursor: grabbing;
}
.carousel.is-dragging .carousel-slidemo {
  pointer-events: none;
}
.carousel::-webkit-scrollbar { display: none; }
.carousel-slidemo {
  flex: 0 0 68px;
  text-align: center;
  border: none;
  background: none;
  padding: 0;
  cursor: pointer;
  transition: transform 0.2s ease;
  touch-action: pan-x;
}
.carousel-slidemo:hover { transform: translateY(-3px); }
.carousel-slidemo .carousel-image {
  width: 56px;
  height: 56px;
  border-radius: 40px;
  object-fit: cover;
  display: block;
  margin: 0 auto;
  box-shadow: 0 4px 14px rgba(0,0,0,0.1);
  background: #fff;
}
.carousel-slidemo p {
  font-size: 10px;
  font-weight: 700;
  color: #444;
  margin: 6px 0 0;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-top: 14px;
}
.quick-item {
  border: none;
  background: none;
  text-align: center;
  padding: 0;
  cursor: pointer;
  animation: fadeInUp 0.4s ease both;
  transition: transform 0.2s ease;
}
.quick-item:hover { transform: translateY(-4px); }
.quick-item:nth-child(1) { animation-delay: 0.05s; }
.quick-item:nth-child(2) { animation-delay: 0.1s; }
.quick-item:nth-child(3) { animation-delay: 0.15s; }
.quick-item:nth-child(4) { animation-delay: 0.2s; }
.quick-icon {
  width: 48px;
  height: 48px;
  margin: 0 auto 6px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 20px;
  box-shadow: 0 6px 14px rgba(255, 138, 0, 0.2);
  transition: all 0.3s ease;
}
.quick-item:hover .quick-icon {
  box-shadow: 0 10px 24px rgba(255, 138, 0, 0.35);
  transform: scale(1.1);
}
.quick-item:nth-child(1) .quick-icon { background: linear-gradient(135deg, #FF8A00, #ff6b00); }
.quick-item:nth-child(2) .quick-icon { background: linear-gradient(135deg, #FFC83D, #ff9800); }
.quick-item:nth-child(3) .quick-icon { background: linear-gradient(135deg, #7C4DFF, #536DFE); }
.quick-item:nth-child(4) .quick-icon { background: linear-gradient(135deg, #00BCD4, #26C6DA); }
.quick-item span {
  font-size: 10px;
  font-weight: 600;
  color: #555;
  line-height: 1.25;
  display: block;
}

/* Product cards */
.prod-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}
.prod-scroll::-webkit-scrollbar { display: none; }
.prod-card {
  min-width: 148px;
  max-width: 148px;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: var(--shadow);
  border: none;
  padding: 0;
  text-align: left;
  cursor: pointer;
  transition: all 0.3s ease;
  animation: fadeInUp 0.4s ease both;
}
.prod-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.12);
}
.prod-card img,
.prod-img {
  width: 100%;
  height: 110px;
  object-fit: cover;
  background: #eee;
  display: block;
}
.prod-body { padding: 10px; }
.prod-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text);
  height: 32px;
  overflow: hidden;
  margin: 0 0 6px;
  line-height: 1.3;
}
.prod-price-cny {
  font-size: 11px;
  color: #999;
  margin: 0;
}
.prod-price-thb {
  font-size: 14px;
  font-weight: 800;
  color: var(--primary);
  margin: 0;
}
.prod-score {
  font-size: 10px;
  color: #888;
  margin-top: 4px;
}
.prod-score i { color: #FFC83D; }

.prod-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.prod-grid .prod-card {
  min-width: 0;
  max-width: none;
  width: 100%;
}

.order-mini {
  display: flex;
  gap: 12px;
  align-items: center;
  padding: 12px;
  background: #fff;
  border-radius: 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  cursor: pointer;
  border: none;
  width: 100%;
  text-align: left;
}
.order-mini .thumb {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: #eee;
  object-fit: cover;
}
.order-mini .meta { flex: 1; min-width: 0; }
.order-mini .meta strong {
  font-size: 13px;
  display: block;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.order-mini .meta small { color: #999; font-size: 11px; }
.badge-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}
.badge-paid { background: #E8F5E9; color: #2E7D32; }
.badge-shipping { background: #FFF3E0; color: #EF6C00; }
.badge-completed { background: #E3F2FD; color: #1565C0; }
.badge-pending { background: #F5F5F5; color: #666; }

/* Page header */
.page-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 12px;
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 50;
  border-bottom: 1px solid rgba(0,0,0,0.04);
}
.page-header .back-btn {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: var(--gray);
  display: flex;
  align-items: center;
  justify-content: center;
}
.page-header h2 {
  font-size: 17px;
  font-weight: 800;
  margin: 0;
  flex: 1;
}
.page-header .header-action {
  width: 36px;
  height: 36px;
  border: none;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff8a00, #ffc83d);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
}

/* Filter chips */
.chip-scroll {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 0 16px 12px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.chip-scroll.is-dragging { cursor: grabbing; }
.chip-scroll::-webkit-scrollbar { display: none; }
.filter-chip {
  flex-shrink: 0;
  border: none;
  background: #fff;
  color: #666;
  font-size: 12px;
  font-weight: 600;
  padding: 7px 14px;
  border-radius: 999px;
  box-shadow: var(--shadow);
  touch-action: manipulation;
  cursor: pointer;
  position: relative;
  z-index: 1;
}
.filter-chip.active {
  background: var(--primary);
  color: #fff;
}

/* Product detail */
#page-detail.page.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 100%;
  overflow: hidden;
}
#page-detail .page-header {
  flex-shrink: 0;
}
#page-detail .detail-scroll {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-y: contain;
}
#appBody.detail-mode {
  overflow: hidden;
  padding-bottom: 0;
}
.pd-wrap {
  padding-bottom: 16px;
}
.pd-gallery {
  background: #fff;
  position: relative;
}
.pd-gallery .pd-main-img {
  width: 100%;
  height: 320px;
  object-fit: cover;
  display: block;
  background: #f5f5f5;
}
.pd-gallery .pd-main-img.img-broken {
  object-fit: contain;
  padding: 40px;
  opacity: 0.35;
}
.pd-thumbs {
  display: flex;
  gap: 8px;
  padding: 10px 16px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.pd-thumbs.is-dragging { cursor: grabbing; }
.pd-thumbs.is-dragging img { pointer-events: none; }
.pd-thumbs::-webkit-scrollbar { display: none; }
.pd-thumbs img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 2px solid transparent;
  cursor: pointer;
  flex-shrink: 0;
  background: #f5f5f5;
}
.pd-thumbs img.active { border-color: var(--primary); }
.pd-info { padding: 12px 16px 16px; }
.pd-price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 8px 0;
}
.pd-price-row .thb {
  font-size: 24px;
  font-weight: 800;
  color: var(--primary);
}
.pd-price-row .cny { color: #999; font-size: 13px; }
.pd-selected-sku {
  margin-top: 6px;
  font-size: 12px;
  font-weight: 700;
  color: #E53935;
  line-height: 1.4;
}
.pd-stock-inline {
  margin-top: 8px;
  font-size: 12px;
  color: #888;
  font-weight: 600;
}
.pd-stock-inline strong {
  color: #2E7D32;
  font-weight: 800;
}
.pd-bottom {
  position: relative;
  left: auto;
  right: auto;
  bottom: auto;
  width: 100%;
  max-width: none;
  transform: none;
  flex-shrink: 0;
  background: #fff;
  border-top: 1px solid #eee;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.06);
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px calc(10px + env(safe-area-inset-bottom, 0));
}
.pd-bottom.d-none {
  display: none !important;
}
.pd-bottom .pd-qty-inline {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.pd-bottom .pd-qty-inline .qty-row {
  margin: 0;
  gap: 8px;
}
.pd-bottom .pd-qty-inline .qty-row button {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 16px;
  border: 1px solid #eee;
  background: #f7f7f7;
  color: #333;
}
.pd-bottom .pd-qty-inline #qtyVal {
  min-width: 18px;
  text-align: center;
  font-weight: 800;
  font-size: 14px;
}
.pd-actions {
  display: flex;
  gap: 8px;
  flex: 1;
  min-width: 0;
  padding: 0;
  background: transparent;
}
.pd-actions .btn-soft {
  flex-shrink: 0;
}
.pd-actions .btn-import {
  height: 48px;
}
.btn-soft {
  border: none;
  border-radius: 16px;
  background: var(--gray);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: #555;
}
.btn-import {
  flex: 1;
  border: none;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--primary), #ff9f2e);
  color: #fff;
  font-weight: 700;
  font-size: 15px;
  box-shadow: 0 8px 20px rgba(255, 138, 0, 0.35);
}

/* Wizard */
.wizard-steps {
  display: flex;
  justify-content: space-between;
  padding: 12px 16px;
  gap: 4px;
}
.wizard-step {
  flex: 1;
  text-align: center;
  font-size: 9px;
  font-weight: 700;
  color: #bbb;
}
.wizard-step .dot {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eee;
  color: #999;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 4px;
  font-size: 11px;
}
.wizard-step.active .dot,
.wizard-step.done .dot {
  background: var(--primary);
  color: #fff;
}
.wizard-step.active { color: var(--primary); }
.wizard-step.done { color: var(--accent); }
.wizard-panel {
  padding: 8px 16px 24px;
}
.wizard-nav {
  display: flex;
  gap: 10px;
  padding: 0 16px 16px;
}
.wizard-nav .btn {
  flex: 1;
  border-radius: 14px;
  padding: 12px;
  font-weight: 700;
}
.btn-outline-orange {
  border: 1.5px solid var(--primary);
  color: var(--primary);
  background: #fff;
}
.btn-orange {
  background: var(--primary);
  border: none;
  color: #fff;
}
.success-anim {
  text-align: center;
  padding: 40px 20px;
}
.success-anim .check {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  font-size: 42px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  animation: checkPop 0.55s ease;
  box-shadow: 0 12px 28px rgba(52, 199, 89, 0.4);
}

/* Shipping calc */
.form-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
}
.form-card label {
  font-size: 12px;
  font-weight: 600;
  color: #666;
}
.form-card .form-control,
.form-card .form-select {
  border-radius: 14px;
  border: 1.5px solid #eee;
  padding: 10px 12px;
  font-size: 14px;
  margin-bottom: 10px;
}
.form-card .form-control:focus,
.form-card .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.12);
}
.result-card {
  background: linear-gradient(135deg, #FF8A00, #FFC83D);
  color: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: 0 10px 24px rgba(255, 138, 0, 0.3);
}
.result-card .big {
  font-size: 28px;
  font-weight: 800;
}
.result-card .sub { font-size: 12px; opacity: 0.9; }

/* Profile */
.profile-hero {
  background: linear-gradient(135deg, #FF8A00, #FFC83D);
  color: #fff;
  padding: 20px 16px 28px;
  border-radius: 0 0 28px 28px;
  text-align: center;
}
.avatar {
  width: 72px;
  height: 72px;
  border-radius: 24px;
  background: rgba(255,255,255,0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 800;
  margin: 0 auto 10px;
  border: 3px solid rgba(255,255,255,0.5);
}
.menu-list {
  margin: -12px 16px 16px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px;
  background: #fff;
  border-radius: 16px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  border: none;
  width: 100%;
  text-align: left;
}
.menu-item i.main {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #FFF3E0;
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}
.menu-item span { flex: 1; font-weight: 600; font-size: 14px; }
.menu-item .val { font-size: 12px; color: #999; font-weight: 500; }

.stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}
.stats-grid .glass-card {
  padding: 14px;
}
.stats-grid .num {
  font-size: 20px;
  font-weight: 800;
  color: var(--text);
}
.stats-grid .lbl {
  font-size: 11px;
  color: #999;
}

/* FAB */
.fab {
  position: absolute;
  right: 18px;
  bottom: calc(var(--nav-h) + 16px);
  width: 56px;
  height: 56px;
  border-radius: 18px;
  border: none;
  background: linear-gradient(135deg, var(--primary), #ff9f2e);
  color: #fff;
  font-size: 24px;
  box-shadow: 0 12px 28px rgba(255, 138, 0, 0.45);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseSoft 2.4s ease infinite;
}
.fab.hidden { display: none; }

/* Chart container */
.chart-wrap {
  background: #fff;
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  height: 180px;
}

/* Translate */
.translate-box textarea {
  border-radius: 16px;
  border: 1.5px solid #eee;
  min-height: 100px;
  font-size: 14px;
  resize: none;
}
.translate-result {
  background: #FFF8EE;
  border-radius: 16px;
  padding: 14px;
  min-height: 80px;
  font-size: 14px;
  border: 1px dashed rgba(255, 138, 0, 0.3);
}

.hidden-nav .bottom-nav,
.hidden-nav .fab { display: none !important; }
.hidden-nav .app-body { padding-bottom: 16px; }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: #999;
}
.empty-state i { font-size: 40px; color: #ddd; display: block; margin-bottom: 8px; }

/* Paste link box */
.paste-box {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border-radius: 16px;
  padding: 6px 6px 6px 12px;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}
.paste-box.light {
  box-shadow: var(--shadow);
  border: 1.5px solid #eee;
  margin-bottom: 4px;
}
.paste-box i { color: #FF8A00; font-size: 18px; }
.paste-box input {
  flex: 1;
  border: none;
  outline: none;
  font-size: 12.5px;
  min-width: 0;
  background: transparent;
  color: #222;
}
.paste-box button {
  border: none;
  background: linear-gradient(135deg, #FF8A00, #ff9f2e);
  color: #fff;
  font-weight: 700;
  font-size: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  white-space: nowrap;
}
.platform-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.plat-btn {
  border: none;
  background: #fff;
  border-radius: 14px;
  padding: 12px 8px;
  box-shadow: var(--shadow);
  font-weight: 800;
  font-size: 13px;
}
.plat-1688 { color: #FF6600; }
.plat-tb { color: #FF5000; }
.plat-tm { color: #E60012; }
.banner-img {
  background-size: cover;
  background-position: center top;
}
.howto-row {
  display: flex;
  align-items: center;
  gap: 4px;
}
.howto-item {
  flex: 1;
  background: #fff;
  border-radius: 14px;
  padding: 12px 4px 10px;
  text-align: center;
  box-shadow: var(--shadow);
  animation: bounceIn 0.5s ease both;
  transition: transform 0.2s ease;
  min-width: 0;
}
.howto-item:nth-child(1) { animation-delay: 0.1s; }
.howto-item:nth-child(3) { animation-delay: 0.2s; }
.howto-item:nth-child(5) { animation-delay: 0.3s; }
.howto-item:nth-child(7) { animation-delay: 0.4s; }
.howto-item:hover { transform: translateY(-3px); }
.howto-icon {
  width: 36px;
  height: 36px;
  margin: 0 auto 6px;
  border-radius: 12px;
  background: linear-gradient(135deg, #FFF3E0, #FFE0B2);
  color: #FF8A00;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: pulseSoft 2s ease-in-out infinite;
}
.howto-arrow {
  flex: 0 0 auto;
  color: #FFB74D;
  font-size: 12px;
  opacity: 0.7;
}
.howto-item .t { font-size: 9px; font-weight: 700; color: #444; line-height: 1.2; }
.howto-item .d { display: none; }
.howto-item .n { display: none; }

.nav-item { position: relative; }
.nav-badge {
  position: absolute;
  top: 0;
  right: calc(50% - 18px);
  background: #E53935;
  color: #fff;
  font-size: 9px;
  font-weight: 800;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 4px;
}

/* SKU / Detail buy */
.sku-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}
.sku-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  text-align: left;
  line-height: 1.3;
  border: 1.5px solid #eee;
  background: #fff;
  border-radius: 12px;
  padding: 8px 10px;
  font-size: 11px;
  font-weight: 600;
  color: #555;
  word-break: break-word;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  pointer-events: auto;
  position: relative;
  z-index: 2;
}
.sku-chip:active {
  transform: scale(0.98);
}
.sku-chip img {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  object-fit: cover;
  border-radius: 6px;
  pointer-events: none;
}
.sku-chip.active {
  border-color: #FF8A00;
  color: #FF8A00;
  background: #FFF8EE;
}
[data-tour="mkt-sku"] {
  position: relative;
  z-index: 3;
  pointer-events: auto;
}
.qty-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 12px 0;
}
.qty-row button {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: none;
  background: #F5F5F5;
  font-size: 18px;
  font-weight: 700;
}
.qty-row span { font-weight: 800; min-width: 24px; text-align: center; }
.source-tag {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  padding: 3px 8px;
  border-radius: 999px;
  background: #FFF3E0;
  color: #E65100;
}

/* Checkout steps */
.checkout-steps {
  display: flex;
  justify-content: space-around;
  padding: 10px 16px;
  background: #fff;
  border-bottom: 1px solid #f0f0f0;
}
.cstep {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  font-size: 10px;
  font-weight: 600;
  color: #bbb;
}
.cstep i { font-size: 18px; }
.cstep.active { color: #FF8A00; }
.cstep.done { color: #34C759; }

/* Cart items — one card per shop */
.cart-shop-block {
  margin-bottom: 12px;
}
.cart-shop-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
  overflow: hidden;
  border: 1px solid rgba(0, 0, 0, 0.04);
}
.cart-shop {
  font-size: 13px;
  font-weight: 700;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid #f0f0f0;
  background: #fff;
}
.cart-shop .shop-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFB347, #FF8A00);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(255, 138, 0, 0.3);
}
.cart-shop .shop-name {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #222;
}
.cart-shop-items {
  background: #fff;
}
.cart-shop-clear {
  border: none;
  background: #fff5f5;
  color: #e53935;
  font-size: 11px;
  font-weight: 700;
  padding: 5px 10px;
  border-radius: 999px;
  flex-shrink: 0;
  transition: background 0.2s ease, transform 0.2s ease;
}
.cart-shop-clear:active {
  transform: scale(0.96);
}
.cart-shop-clear.is-active {
  background: #e53935;
  color: #fff;
}
.cart-shop-clear:disabled {
  opacity: 0.5;
}
.cart-check {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  cursor: pointer;
  flex-shrink: 0;
  user-select: none;
  position: relative;
}
.cart-check input {
  -webkit-appearance: none;
  appearance: none;
  width: 22px;
  height: 22px;
  margin: 0;
  border: 2px solid #d9d9d9;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition:
    background 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.cart-check input:hover {
  border-color: #FF8A00;
  box-shadow: 0 0 0 3px rgba(255, 138, 0, 0.12);
}
.cart-check input:checked {
  background: linear-gradient(145deg, #FFB347 0%, #FF8A00 55%, #F57C00 100%);
  border-color: transparent;
  box-shadow:
    0 4px 12px rgba(255, 138, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.cart-check input:checked::after {
  content: "";
  position: absolute;
  left: 6.5px;
  top: 3.5px;
  width: 5px;
  height: 9px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  border-radius: 0.5px;
  transform: rotate(45deg) scale(0.2);
  opacity: 0;
  animation: cartCheckPop 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.cart-check input:active {
  transform: scale(0.88);
}
@keyframes cartCheckPop {
  to {
    opacity: 1;
    transform: rotate(45deg) scale(1);
  }
}
.cart-check-all {
  padding: 2px 0;
}
.cart-check-all span {
  font-size: 12px;
  font-weight: 700;
  color: #555;
}
.cart-item-front > .cart-check {
  align-self: center;
  margin-top: 0;
}
.cart-shop > .cart-check {
  align-self: center;
}
.cart-swipe {
  position: relative;
  margin: 0;
  border-radius: 0;
  overflow: hidden;
  background: #e53935;
  border-bottom: 1px solid #f2f2f2;
}
.cart-shop-items .cart-swipe:last-child {
  border-bottom: none;
}
.cart-swipe-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: 76px;
  display: flex;
  z-index: 0;
}
.cart-swipe-del {
  flex: 1;
  border: none;
  background: #e53935;
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.cart-swipe-del i { font-size: 18px; }
.cart-item-front {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: #fff;
  border-radius: 0;
  padding: 12px;
  box-shadow: none;
  transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
  touch-action: pan-y;
}
.cart-item-front .sku-pill {
  display: inline-block;
  margin-top: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: #f5f5f5;
  color: #666;
  font-size: 11px;
  font-weight: 600;
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-swipe.is-open .cart-item-front {
  transform: translateX(-76px);
}
.cart-swipe.is-dragging .cart-item-front {
  transition: none;
}
.cart-swipe.is-opening .cart-item-front {
  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}
.cart-swipe.is-closing .cart-item-front {
  transition: transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-item {
  display: flex;
  gap: 10px;
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  transition: opacity 0.25s ease, transform 0.25s ease;
}
.cart-swipe.is-removing {
  opacity: 0;
  transform: translateX(-28px) scale(0.98);
  transition: opacity 0.36s cubic-bezier(0.4, 0, 0.2, 1), transform 0.36s cubic-bezier(0.4, 0, 0.2, 1);
}
.cart-item.is-updating,
.cart-item-front.is-updating { opacity: 0.6; }
.cart-item.is-removing {
  opacity: 0;
  transform: translateX(20px);
}
.cart-total-flash {
  animation: totalFlash 0.35s ease;
}
@keyframes totalFlash {
  0% { color: #FF8A00; transform: scale(1.05); }
  100% { color: inherit; transform: scale(1); }
}
.cart-item-front img,
.cart-item img,
.ck-line img {
  width: 64px;
  height: 64px;
  border-radius: 12px;
  object-fit: cover;
  flex-shrink: 0;
  pointer-events: none;
}
.cart-item-front .info,
.cart-item .info,
.ck-line .info { flex: 1; min-width: 0; }
.cart-item-front .title,
.cart-item .title,
.ck-line .title {
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.cart-item-front .sku,
.cart-item .sku,
.ck-line .sku { font-size: 11px; color: #999; }
.cart-item-front .price,
.cart-item .price,
.ck-line .price { font-size: 13px; font-weight: 800; color: #FF8A00; }
/* Checkout — items grouped in shop card */
.ck-line {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  background: #fff;
  border-bottom: 1px solid #f2f2f2;
}
.cart-shop-items .ck-line:last-child {
  border-bottom: none;
}
.cart-item .rm {
  border: none;
  background: none;
  color: #ccc;
  font-size: 16px;
  padding: 0;
}
.cart-footer-mid {
  flex: 1;
  min-width: 0;
  text-align: right;
  padding-right: 4px;
}
.cart-footer .btn-checkout:disabled {
  opacity: 0.45;
  pointer-events: none;
}
#appBody.detail-mode,
#appBody.cart-mode,
#appBody.checkout-mode {
  overflow: hidden;
  padding-bottom: 0;
}

/* Cart page: list scrolls, footer pinned (no overlap) */
#page-cart.page.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}
#page-cart .page-header,
#page-cart .checkout-steps {
  flex-shrink: 0;
}
#page-cart #cartList,
#page-cart .cart-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 16px;
  scrollbar-width: none;
  -ms-overflow-style: none;
  touch-action: pan-y;
  cursor: grab;
}
#page-cart #cartList::-webkit-scrollbar { display: none; }
#page-cart #cartList.is-vdragging { cursor: grabbing; }
.cart-footer {
  position: relative;
  bottom: auto;
  flex-shrink: 0;
  margin: 0 12px 12px;
  background: #fff;
  border-radius: 18px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08), 0 8px 28px rgba(0,0,0,0.06);
  z-index: 40;
  border: 1px solid rgba(0,0,0,0.04);
}
.cart-footer.d-none {
  display: none !important;
}

/* Checkout page: same pinned footer pattern */
#page-checkout.page.active {
  display: flex;
  flex-direction: column;
  height: 100%;
  max-height: 100%;
  min-height: 0;
  overflow: hidden;
}
#page-checkout .page-header,
#page-checkout .checkout-steps {
  flex-shrink: 0;
}
#page-checkout #checkoutBody,
#page-checkout .checkout-scroll {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding-bottom: 20px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
#page-checkout #checkoutBody::-webkit-scrollbar { display: none; }
#page-checkout .sticky-order-bar,
#checkoutFooter.sticky-order-bar {
  position: relative;
  bottom: auto;
  flex-shrink: 0;
  margin: 0 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: #fff;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 -4px 24px rgba(0,0,0,0.08), 0 8px 28px rgba(0,0,0,0.06);
  border: 1px solid rgba(0,0,0,0.04);
  z-index: 40;
}
#checkoutFooter.sticky-order-bar.d-none {
  display: none !important;
}
.cf-label { font-size: 11px; color: #999; }
.cf-price { font-size: 18px; font-weight: 800; color: #E53935; }
.btn-checkout {
  border: none;
  background: linear-gradient(135deg, #FF8A00, #ff9f2e);
  color: #fff;
  font-weight: 800;
  padding: 12px 22px;
  border-radius: 14px;
}

/* Ship options */
.ship-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.ship-opt {
  border: 1.5px solid #eee;
  background: #fff;
  border-radius: 16px;
  padding: 14px 10px;
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  color: #666;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
}
.ship-opt i { font-size: 22px; }
.ship-opt.active {
  border-color: #E53935;
  color: #E53935;
  background: #FFF5F5;
  box-shadow: 0 0 0 1px #E53935;
}
.ship-opt small { font-weight: 500; color: #999; font-size: 10px; }

.toggle-list { background: #fff; border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 12px; }
.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border-bottom: 1px solid #f5f5f5;
}
.toggle-row:last-child { border-bottom: none; }
.toggle-row .meta { flex: 1; }
.toggle-row .meta strong { font-size: 13px; display: block; }
.toggle-row .meta small { font-size: 11px; color: #999; }
.toggle-row .fee { font-size: 12px; font-weight: 700; color: #FF8A00; margin-right: 6px; }
.form-switch .form-check-input { width: 2.4em; height: 1.3em; cursor: pointer; }
.form-switch .form-check-input:checked { background-color: #FF8A00; border-color: #FF8A00; }

.summary-box {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  font-size: 13px;
}
.summary-box .row-line {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
  color: #666;
}
.summary-box .row-line.total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #eee;
  font-weight: 800;
  color: #222;
  font-size: 15px;
}
.summary-box .row-line.total span:last-child { color: #E53935; }

.terms-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 14px;
  padding: 14px 14px;
  background: #fff;
  border: 1.5px solid #ebebeb;
  border-radius: 16px;
  cursor: pointer;
  user-select: none;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
}
.terms-row:active {
  transform: scale(0.985);
}
.terms-row.is-checked {
  border-color: rgba(255, 138, 0, 0.45);
  background: linear-gradient(135deg, #fffaf3 0%, #fff 60%);
  box-shadow:
    0 4px 16px rgba(255, 138, 0, 0.12),
    inset 0 0 0 1px rgba(255, 138, 0, 0.06);
}
.terms-check {
  flex-shrink: 0;
  display: flex;
  align-items: center;
}
.terms-check input {
  -webkit-appearance: none;
  appearance: none;
  width: 24px;
  height: 24px;
  margin: 0;
  border: 2px solid #d9d9d9;
  border-radius: 50%;
  background: #fff;
  cursor: pointer;
  position: relative;
  flex-shrink: 0;
  transition:
    background 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.2s ease;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.03);
}
.terms-check input:checked {
  background: linear-gradient(145deg, #FFB347 0%, #FF8A00 55%, #F57C00 100%);
  border-color: transparent;
  box-shadow:
    0 4px 12px rgba(255, 138, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.terms-check input:checked::after {
  content: "";
  position: absolute;
  left: 7.5px;
  top: 4px;
  width: 5.5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2.5px 2.5px 0;
  border-radius: 0.5px;
  transform: rotate(45deg) scale(0.2);
  opacity: 0;
  animation: cartCheckPop 0.28s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
.terms-body {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}
.terms-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  background: linear-gradient(145deg, #FFE0B2, #FFCC80);
  color: #E65100;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  flex-shrink: 0;
  transition: background 0.25s ease, color 0.25s ease, box-shadow 0.25s ease;
}
.terms-row.is-checked .terms-icon {
  background: linear-gradient(145deg, #FFB347, #FF8A00);
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 138, 0, 0.35);
}
.terms-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.terms-text strong {
  font-size: 13px;
  font-weight: 800;
  color: #222;
  line-height: 1.3;
}
.terms-text small {
  font-size: 11px;
  color: #888;
  line-height: 1.35;
}
.sticky-order-bar .price { font-size: 18px; font-weight: 800; color: #E53935; }

/* PO */
.order-list-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}
.order-list-header h2 {
  margin: 0;
}
.order-type-switch {
  display: inline-flex;
  padding: 3px;
  background: #f0f0f0;
  border-radius: 999px;
  flex-shrink: 0;
}
.order-type-switch .ots-btn {
  border: none;
  background: transparent;
  color: #888;
  font-size: 12px;
  font-weight: 800;
  padding: 6px 14px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}
.order-type-switch .ots-btn.active {
  background: #fff;
  color: #FF8A00;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}
.po-card {
  background: #fff;
  border-radius: 16px;
  padding: 12px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  border: none;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}
.po-card:active {
  transform: scale(0.985);
}
.po-card-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}
.po-card-thumb {
  width: 72px;
  height: 72px;
  border-radius: 14px;
  object-fit: cover;
  flex-shrink: 0;
  background: #f5f5f5;
}
.po-card-thumb-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ccc;
  font-size: 22px;
}
.po-card-info {
  flex: 1;
  min-width: 0;
}
.po-card .top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 4px;
  gap: 8px;
}
.po-card .id { font-weight: 800; font-size: 13px; color: #222; }
.po-status {
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  color: #fff;
  flex-shrink: 0;
}
.po-card-title {
  font-size: 12px;
  font-weight: 600;
  color: #444;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 4px;
}
.po-card .meta { font-size: 11px; color: #999; }
.po-card-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
  gap: 8px;
}
.po-shop-count {
  font-size: 11px;
  font-weight: 700;
  color: #888;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.po-card-price {
  font-size: 14px;
  font-weight: 800;
  color: #E53935;
}
.so-shop-name {
  font-size: 12px;
  font-weight: 700;
  color: #FF8A00;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: 2px;
}
.so-detail-shop {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 700;
  color: #222;
  margin-top: 4px;
}
.so-detail-shop .shop-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: linear-gradient(145deg, #FFB347, #FF8A00);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

/* Shipping invoices */
.inv-calc-link {
  border: none;
  background: #fff7eb;
  color: #FF8A00;
  font-size: 11px;
  font-weight: 800;
  padding: 7px 12px;
  border-radius: 999px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.inv-card {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  cursor: pointer;
}
.inv-card:active { transform: scale(0.985); }
.inv-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.inv-no { font-size: 14px; font-weight: 800; color: #222; }
.inv-date { font-size: 11px; color: #999; margin-top: 2px; }
.inv-addr {
  font-size: 11px;
  color: #666;
  line-height: 1.4;
  margin-bottom: 10px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.inv-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 10px;
}
.inv-grid small {
  display: block;
  font-size: 10px;
  color: #999;
  font-weight: 600;
}
.inv-grid strong {
  font-size: 13px;
  color: #333;
}
.inv-grid .inv-grand { color: #E53935; font-weight: 800; }
.inv-card-actions {
  margin-top: 10px;
  padding-top: 8px;
  border-top: 1px dashed #f0f0f0;
}
.inv-pay-hint {
  font-size: 11px;
  font-weight: 700;
  color: #FF8A00;
}
.inv-detail-addr .label {
  font-size: 11px;
  color: #999;
  font-weight: 700;
  margin-bottom: 4px;
}
.inv-detail-addr {
  font-size: 13px;
  color: #333;
  line-height: 1.45;
  margin-top: 8px;
}
.inv-track-row {
  padding: 10px 0;
  border-bottom: 1px solid #f2f2f2;
}
.inv-track-row:last-child { border-bottom: none; }
.inv-track-no {
  font-size: 12px;
  font-weight: 800;
  color: #222;
}
.inv-track-meta {
  font-size: 11px;
  color: #888;
  margin-top: 4px;
}
.inv-track-foot {
  display: flex;
  justify-content: space-between;
  margin-top: 6px;
  font-size: 11px;
  color: #666;
}
.inv-track-foot strong { color: #FF8A00; font-weight: 800; }
.inv-pay-box .inv-balance {
  font-size: 12px;
  color: #666;
  margin-bottom: 10px;
}
.inv-pay-box .inv-balance strong { color: #222; }
.paid-banner {
  background: #e8f5e9;
  color: #2E7D32;
  border-radius: 14px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 8px;
}
.slip-preview {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid #eee;
  background: #fafafa;
}
.slip-preview img {
  width: 100%;
  max-height: 280px;
  object-fit: contain;
  display: block;
}
.pay-slip-bill .label {
  font-size: 11px;
  color: #999;
  font-weight: 700;
}
.pay-slip-bill strong {
  display: block;
  font-size: 15px;
  margin-top: 2px;
}
.pay-slip-amount {
  margin-top: 10px;
  font-size: 28px;
  font-weight: 800;
  color: #E53935;
}
.bank-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff8f0;
  border-radius: 14px;
  padding: 12px;
  border: 1px solid rgba(255, 138, 0, 0.15);
}
.bank-card small {
  display: block;
  font-size: 10px;
  color: #999;
  font-weight: 700;
}
.bank-card strong {
  font-size: 13px;
  color: #222;
}
.btn-copy-acc {
  border: none;
  background: #FF8A00;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 10px;
  border-radius: 999px;
}
.slip-upload-btn {
  width: 100%;
  border: 1.5px dashed #ffc985;
  background: #fffaf3;
  color: #FF8A00;
  border-radius: 14px;
  padding: 22px 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  font-size: 13px;
}
.slip-upload-btn i { font-size: 28px; }
.slip-upload .slip-preview { margin-top: 10px; }

/* Address book */
.addr-card {
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 10px;
  box-shadow: var(--shadow);
  border: 1.5px solid transparent;
}
.addr-card.is-default {
  border-color: rgba(255, 138, 0, 0.4);
  background: linear-gradient(135deg, #fffaf3 0%, #fff 55%);
}
.addr-card-top {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.addr-name {
  font-size: 14px;
  font-weight: 800;
  color: #222;
}
.addr-default-pill {
  display: inline-block;
  font-size: 10px;
  font-weight: 800;
  color: #fff;
  background: #FF8A00;
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 4px;
  vertical-align: middle;
}
.addr-tel {
  font-size: 12px;
  color: #666;
  margin-top: 2px;
}
.addr-company {
  font-size: 12px;
  font-weight: 700;
  color: #FF8A00;
  margin-bottom: 4px;
}
.addr-line {
  font-size: 12px;
  color: #555;
  line-height: 1.45;
}
.addr-tax {
  font-size: 11px;
  color: #999;
  margin-top: 4px;
}
.addr-actions {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
}
.addr-icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  border: 1.5px solid rgba(255, 138, 0, 0.28);
  background: #fff8f0;
  color: #FF8A00;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 0;
  flex-shrink: 0;
  transition: transform 0.15s ease, background 0.15s ease;
}
.addr-icon-btn:active {
  transform: scale(0.94);
}
.addr-icon-btn.is-danger {
  border-color: rgba(229, 57, 53, 0.25);
  background: #fff5f5;
  color: #e53935;
}
.addr-icon-btn.is-muted {
  border-color: transparent;
  background: transparent;
  color: #FF8A00;
  pointer-events: none;
}
.addr-add-btn {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(145deg, #FFB347, #FF8A00);
  border: none;
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 138, 0, 0.3);
  font-size: 18px;
}
.btn-outline-danger {
  border: 1.5px solid #ffcdd2;
  color: #e53935;
  background: #fff;
  border-radius: 12px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 12px;
}
.address-default-row {
  margin-bottom: 0;
}
.order-list-header .back-btn {
  width: 34px;
  height: 34px;
}
.po-timeline-h {
  display: flex;
  gap: 0;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 8px 0 4px;
  scrollbar-width: none;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.po-timeline-h.is-dragging { cursor: grabbing; }
.po-timeline-h::-webkit-scrollbar { display: none; }
.po-tl {
  flex: 0 0 auto;
  width: 72px;
  text-align: center;
  position: relative;
  font-size: 9px;
  color: #bbb;
  font-weight: 600;
}
.po-tl .dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #eee;
  margin: 0 auto 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: #fff;
}
.po-tl.done .dot { background: #34C759; }
.po-tl.current .dot { background: #FF8A00; box-shadow: 0 0 0 4px rgba(255,138,0,0.2); }
.po-tl.done, .po-tl.current { color: #444; }
.po-item-row {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid #f5f5f5;
}
.po-item-row:last-child { border-bottom: none; }
.po-item-row img {
  width: 52px;
  height: 52px;
  border-radius: 10px;
  object-fit: cover;
}
.paid-banner {
  background: #E8F5E9;
  color: #2E7D32;
  text-align: center;
  font-weight: 800;
  padding: 10px;
  border-radius: 12px;
  margin: 10px 0;
}

/* PROFILE / ME PAGE */
.me-header {
  padding: 16px 16px 12px;
  animation: fadeInUp 0.4s ease;
}
.me-icons {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 12px;
}
.me-icon-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(0,0,0,0.05);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  color: #666;
  cursor: pointer;
  transition: all 0.2s;
}
.me-icon-btn:hover { background: rgba(255,138,0,0.1); color: #FF8A00; }
.me-profile {
  display: flex;
  align-items: center;
  gap: 12px;
}
.me-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.me-info { flex: 1; }
.me-email {
  font-size: 15px;
  font-weight: 700;
  color: #222;
  margin-bottom: 4px;
}
.me-level {
  display: flex;
  align-items: center;
  gap: 8px;
}
.vip-badge {
  display: inline-block;
  padding: 3px 10px;
  background: linear-gradient(135deg, #FF8A00, #FFC83D);
  color: #fff;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.5px;
}
.me-id {
  font-size: 11px;
  color: #999;
  font-weight: 500;
}

/* BALANCE CARD */
.balance-card {
  background: linear-gradient(135deg, #FF8A00, #FFC83D);
  border-radius: 20px;
  padding: 18px;
  color: #fff;
  box-shadow: 0 8px 24px rgba(255,138,0,0.25);
  animation: fadeInUp 0.5s ease;
  position: relative;
  overflow: hidden;
}
.balance-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: float 6s ease-in-out infinite;
}
.bc-label {
  font-size: 12px;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 4px;
}
.bc-amount {
  font-size: 32px;
  font-weight: 900;
  margin-bottom: 14px;
  letter-spacing: -1px;
}
.bc-actions {
  display: flex;
  gap: 10px;
  margin-bottom: 16px;
}
.bc-btn {
  flex: 1;
  padding: 10px;
  background: rgba(255,255,255,0.25);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  border-radius: 12px;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  cursor: pointer;
  transition: all 0.25s;
}
.bc-btn:hover {
  background: rgba(255,255,255,0.35);
  transform: translateY(-2px);
}
.bc-btn i { font-size: 16px; }
.bc-icons {
  display: flex;
  gap: 12px;
  border-top: 1px solid rgba(255,255,255,0.2);
  padding-top: 14px;
}
.bc-icon {
  flex: 1;
  background: rgba(255,255,255,0.15);
  border-radius: 12px;
  padding: 10px;
  text-align: center;
  border: none;
  color: #fff;
  cursor: pointer;
  transition: all 0.25s;
  position: relative;
}
.bc-icon:hover {
  background: rgba(255,255,255,0.25);
  transform: translateY(-2px);
}
.bc-icon i {
  font-size: 20px;
  display: block;
  margin-bottom: 4px;
}
.bc-icon span {
  font-size: 11px;
  font-weight: 600;
  display: block;
}
.bc-badge {
  position: absolute;
  top: 6px;
  right: 6px;
  background: #E53935;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  border-radius: 999px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
  box-shadow: 0 2px 8px rgba(229,57,53,0.4);
}

/* PROMO BANNER */
.promo-banner {
  background: linear-gradient(120deg, #FF8A00, #FFC83D);
  border-radius: 18px;
  padding: 20px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 6px 20px rgba(255,138,0,0.2);
  animation: fadeInUp 0.6s ease;
  overflow: hidden;
  position: relative;
}
.promo-banner::before {
  content: '';
  position: absolute;
  top: -100px;
  right: -100px;
  width: 200px;
  height: 200px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  animation: glow 4s ease-in-out infinite;
}
.promo-text { flex: 1; position: relative; z-index: 1; }
.promo-tag {
  display: inline-block;
  background: rgba(255,255,255,0.3);
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 6px;
  letter-spacing: 0.5px;
}
.promo-title {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  margin-bottom: 2px;
  letter-spacing: -0.5px;
}
.promo-sub {
  font-size: 11px;
  color: rgba(255,255,255,0.9);
  font-weight: 600;
  margin-bottom: 10px;
}
.promo-btn {
  display: inline-block;
  background: #fff;
  color: #FF8A00;
  font-size: 13px;
  font-weight: 800;
  padding: 8px 18px;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
  transition: all 0.25s;
}
.promo-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
.promo-img {
  font-size: 64px;
  margin-left: 10px;
  animation: bounceIn 0.8s ease, float 3s ease-in-out infinite;
}

/* ME SECTION TITLE */
.me-section-title {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  font-size: 16px;
  font-weight: 800;
  color: #222;
}
.me-view-all {
  font-size: 12px;
  font-weight: 600;
  color: #FF8A00;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
}

/* ORDER STATUS ROW */
.order-status-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
  animation: fadeInUp 0.6s ease;
}
.order-status-item {
  flex: 1;
  background: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.25s;
}
.order-status-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.order-status-item i {
  font-size: 24px;
  display: block;
  margin-bottom: 6px;
  color: #FF8A00;
}
.order-status-item span {
  font-size: 11px;
  font-weight: 600;
  color: #444;
  display: block;
}

/* ME SHIPPING CARD */
.me-shipping-card {
  background: linear-gradient(120deg, rgba(255,138,0,0.08), rgba(255,200,61,0.08));
  border-radius: 16px;
  padding: 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  animation: fadeInUp 0.65s ease;
  border: 1px solid rgba(255,138,0,0.15);
}
.mesc-icon {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, #FF8A00, #FFC83D);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
  flex-shrink: 0;
}
.mesc-text { flex: 1; }
.mesc-title {
  font-size: 13px;
  font-weight: 800;
  color: #222;
  margin-bottom: 2px;
}
.mesc-sub {
  font-size: 11px;
  color: #666;
}
.mesc-btn {
  background: #FF8A00;
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.25s;
  flex-shrink: 0;
}
.mesc-btn:hover {
  background: #E67700;
  transform: translateY(-2px);
}

/* SERVICES GRID */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  animation: fadeInUp 0.7s ease;
}
.service-item {
  background: #fff;
  border: none;
  border-radius: 14px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: all 0.25s;
}
.service-item:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(0,0,0,0.12);
}
.service-item i {
  font-size: 26px;
  display: block;
  margin-bottom: 6px;
  color: #FF8A00;
}
.service-item span {
  font-size: 10px;
  font-weight: 600;
  color: #444;
  display: block;
  line-height: 1.2;
}

/* FOR YOU CARDS */
.foryou-row {
  display: flex;
  gap: 10px;
  margin-bottom: 10px;
}
.foryou-card {
  flex: 1;
  border-radius: 16px;
  padding: 16px;
  color: #fff;
  box-shadow: 0 6px 18px rgba(0,0,0,0.15);
  cursor: pointer;
  transition: all 0.3s;
  animation: fadeInUp 0.8s ease;
  position: relative;
  overflow: hidden;
}
.foryou-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 24px rgba(0,0,0,0.2);
}
.foryou-card::before {
  content: '';
  position: absolute;
  top: -50%;
  right: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
  animation: float 5s ease-in-out infinite;
}
.foryou-icon {
  font-size: 32px;
  margin-bottom: 8px;
  animation: bounceIn 1s ease;
}
.foryou-title {
  font-size: 14px;
  font-weight: 800;
  margin-bottom: 2px;
}
.foryou-sub {
  font-size: 10px;
  font-weight: 500;
  opacity: 0.9;
}

/* TOP UP / WITHDRAW */
.balance-info {
  background: linear-gradient(135deg, #F5F5F5, #E8E8E8);
  border-radius: 18px;
  padding: 20px;
  text-align: center;
  animation: fadeInUp 0.4s ease;
}
.bi-label {
  font-size: 12px;
  color: #888;
  font-weight: 600;
  margin-bottom: 6px;
}
.bi-amount {
  font-size: 36px;
  font-weight: 900;
  color: #FF8A00;
  letter-spacing: -1px;
}
.quick-amounts {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  margin-top: 12px;
}
.qa-btn {
  background: #F5F5F5;
  border: 1px solid #E8E8E8;
  border-radius: 10px;
  padding: 10px 8px;
  font-size: 13px;
  font-weight: 700;
  color: #444;
  cursor: pointer;
  transition: all 0.2s;
}
.qa-btn:hover, .qa-btn.active {
  background: rgba(255,138,0,0.1);
  border-color: #FF8A00;
  color: #FF8A00;
}
.payment-methods {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 10px;
}
.pm-btn {
  background: #F5F5F5;
  border: 2px solid #E8E8E8;
  border-radius: 12px;
  padding: 14px 8px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
}
.pm-btn:hover, .pm-btn.active {
  background: rgba(255,138,0,0.08);
  border-color: #FF8A00;
}
.pm-btn i {
  font-size: 24px;
  display: block;
  margin-bottom: 6px;
  color: #666;
}
.pm-btn.active i { color: #FF8A00; }
.pm-btn span {
  font-size: 11px;
  font-weight: 600;
  color: #444;
  display: block;
}
.withdraw-fee {
  font-size: 12px;
  color: #E53935;
  font-weight: 600;
  margin-top: 8px;
  padding: 8px;
  background: rgba(229,57,53,0.08);
  border-radius: 8px;
  text-align: center;
}
.info-box {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(52,199,89,0.08);
  border: 1px solid rgba(52,199,89,0.2);
  border-radius: 12px;
  padding: 12px;
  font-size: 12px;
  color: #2E7D32;
  font-weight: 600;
  animation: fadeInUp 0.6s ease;
}
.info-box i {
  font-size: 18px;
  flex-shrink: 0;
}

/* FLASH DEALS */
.flash-deals-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  padding-bottom: 8px;
  animation: fadeInUp 0.5s ease;
  -webkit-overflow-scrolling: touch;
  touch-action: pan-x;
  overscroll-behavior-x: contain;
  cursor: grab;
}
.flash-deals-scroll.is-dragging {
  cursor: grabbing;
}
.flash-deals-scroll.is-dragging .flash-deal-card {
  pointer-events: none;
}
.flash-deals-scroll::-webkit-scrollbar { display: none; }
.flash-deal-card {
  flex: 0 0 140px;
  background: #fff;
  border-radius: 14px;
  padding: 0;
  box-shadow: var(--shadow);
  cursor: pointer;
  transition: all 0.25s;
  overflow: hidden;
  border: none;
  text-align: left;
  touch-action: pan-x;
}
.flash-deal-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
}
.flash-deal-img {
  width: 100%;
  height: 140px;
  object-fit: cover;
  background: #f5f5f5;
}
.flash-deal-body {
  padding: 10px;
}
.flash-deal-title {
  font-size: 11px;
  font-weight: 600;
  color: #333;
  line-height: 1.3;
  margin-bottom: 6px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.flash-deal-price {
  font-size: 14px;
  font-weight: 800;
  color: #E53935;
  margin-bottom: 2px;
}
.flash-deal-old {
  font-size: 10px;
  color: #999;
  text-decoration: line-through;
}

/* PRODUCT DETAIL - API desc */
.pd-desc-html {
  font-size: 13px;
  color: #555;
  overflow: hidden;
}
.pd-desc-html img {
  width: 100% !important;
  height: auto !important;
  border-radius: 12px;
  margin-bottom: 8px;
  display: block;
}
.pd-desc-imgs img,
.pd-desc-img {
  width: 100%;
  border-radius: 12px;
  margin-bottom: 8px;
  display: block;
}

/* Cart added popup */
.cart-popup {
  position: absolute;
  inset: 0;
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.cart-popup.d-none { display: none !important; }
.cart-popup-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(2px);
}
.cart-popup-card {
  position: relative;
  width: 100%;
  max-width: 300px;
  background: #fff;
  border-radius: 20px;
  padding: 24px 20px 20px;
  text-align: center;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  animation: fadeInUp 0.28s ease;
}
.cart-popup-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 12px;
  border-radius: 50%;
  background: rgba(52, 199, 89, 0.12);
  color: #34c759;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 30px;
}
.cart-popup-card h4 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 8px;
  color: #222;
}
.cart-popup-sku {
  font-size: 12px;
  color: #666;
  margin: 0 0 18px;
  line-height: 1.45;
  word-break: break-word;
}
.cart-popup-actions {
  display: flex;
  gap: 10px;
}
.btn-cart-popup-ghost {
  flex: 1;
  border: 1.5px solid #e8e8e8;
  background: #fff;
  color: #444;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 12px;
  border-radius: 12px;
}
.btn-cart-popup-ghost:active { background: #f5f5f5; }
.cart-popup-actions .btn-orange {
  flex: 1;
  font-size: 13px;
  font-weight: 700;
  padding: 11px 12px;
  border-radius: 12px;
}

/* Tracks + Alipay */
.feature-hint {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  background: #fff7ed;
  border: 1px solid #ffe0b8;
  color: #8a5a00;
  font-size: 12px;
  line-height: 1.45;
  padding: 10px 12px;
  border-radius: 12px;
}
.feature-hint i { flex-shrink: 0; margin-top: 1px; }
.row-3 {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
}
.track-card,
.alipay-card {
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  margin-bottom: 10px;
  display: block;
}
.track-card-top,
.alipay-card-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.track-no {
  font-size: 13px;
  font-weight: 800;
  color: #222;
  word-break: break-all;
}
.track-card-title {
  font-size: 13px;
  font-weight: 700;
  margin-top: 8px;
  color: #333;
}
.track-card-meta,
.alipay-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
  font-size: 11px;
  color: #888;
}
.track-card-tag {
  display: inline-block;
  margin-top: 10px;
  font-size: 10px;
  font-weight: 700;
  color: #ff8a00;
  background: #fff4e6;
  padding: 3px 8px;
  border-radius: 999px;
}
.status-pill {
  flex-shrink: 0;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.track-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.track-detail-grid > div {
  background: #f7f7f7;
  border-radius: 10px;
  padding: 8px 10px;
}
.track-detail-grid span {
  display: block;
  font-size: 10px;
  color: #888;
}
.track-detail-grid strong {
  font-size: 12px;
  color: #222;
}
.track-tl {
  display: flex;
  gap: 10px;
  padding: 8px 0;
  position: relative;
}
.track-tl .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #ddd;
  margin-top: 4px;
  flex-shrink: 0;
}
.track-tl.done .dot { background: #43a047; }
.track-tl .ttl { font-size: 12px; font-weight: 700; color: #333; }
.track-tl .tat { font-size: 11px; color: #999; }
.alipay-balance .bi-row {
  display: flex;
  gap: 24px;
  margin-top: 6px;
}
.alipay-balance .bi-mini {
  font-size: 11px;
  color: #aaa;
}
.alipay-balance .bi-amount.avail { color: #43a047; }
.alipay-acc {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
  word-break: break-all;
}
.alipay-amounts {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 800;
}
.alipay-amounts .thb { color: #e53935; }
.alipay-remark {
  margin-top: 8px;
  font-size: 11px;
  color: #777;
}
.btn-soft-sm {
  border: 1px solid #ffe0b8;
  background: #fff7ed;
  color: #ff8a00;
  font-size: 11px;
  font-weight: 700;
  border-radius: 10px;
  padding: 6px 10px;
}
.alipay-type-grid {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.alipay-type-btn {
  text-align: left;
  border: 1.5px solid #eee;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
}
.alipay-type-btn.active {
  border-color: #ff8a00;
  background: #fff8f0;
}
.alipay-type-btn strong {
  display: block;
  font-size: 13px;
  color: #222;
}
.alipay-type-btn span {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.alipay-quote {
  background: #f7f7f7;
  border-radius: 12px;
  padding: 12px;
}
.aq-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: #666;
  margin-bottom: 6px;
}
.aq-row.total {
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px dashed #ddd;
  font-size: 14px;
  color: #222;
  font-weight: 700;
}
.aq-row.total strong { color: #e53935; }

/* ME ICON DOT */
.me-icon-btn { position: relative; }
.me-icon-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E53935;
  border: 1.5px solid #fff;
}

.text-soft-btn {
  border: none;
  background: transparent;
  color: #FF8A00;
  font-size: 12px;
  font-weight: 600;
  padding: 6px 4px;
}

/* COUPONS */
.coupon-ticket {
  display: flex;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow);
  margin-bottom: 12px;
  min-height: 110px;
}
.coupon-ticket.is-claimed { opacity: 0.72; }
.coupon-ticket-left {
  width: 92px;
  flex-shrink: 0;
  background: linear-gradient(160deg, #FF8A00, #FF6B35);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 12px 8px;
  text-align: center;
  position: relative;
}
.coupon-ticket-left::after {
  content: "";
  position: absolute;
  right: -6px;
  top: 50%;
  width: 12px;
  height: 12px;
  background: #f5f5f5;
  border-radius: 50%;
  transform: translateY(-50%);
  box-shadow: 0 -28px 0 #f5f5f5, 0 28px 0 #f5f5f5;
}
.coupon-ticket-value {
  font-size: 16px;
  font-weight: 800;
  line-height: 1.2;
}
.coupon-ticket-type {
  font-size: 10px;
  opacity: 0.9;
  margin-top: 4px;
}
.coupon-ticket-right {
  flex: 1;
  padding: 12px 14px;
  position: relative;
}
.coupon-badge {
  display: inline-block;
  font-size: 10px;
  font-weight: 700;
  color: #FF6B35;
  background: #FFF3E8;
  border-radius: 6px;
  padding: 2px 6px;
  margin-bottom: 4px;
}
.coupon-ticket-title {
  font-size: 14px;
  font-weight: 700;
  color: #222;
}
.coupon-ticket-desc,
.coupon-ticket-meta,
.coupon-ticket-code {
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.coupon-ticket-code { color: #FF8A00; font-weight: 600; }
.coupon-claim-btn {
  margin-top: 8px;
  border: none;
  background: linear-gradient(135deg, #FF8A00, #FF6B35);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 6px 14px;
}
.coupon-claimed-label,
.coupon-ready-label {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 700;
  color: #43A047;
}
.coupon-claimed-label { color: #999; }
.coupon-code-row {
  display: flex;
  gap: 8px;
}
.coupon-code-row .form-control { flex: 1; }
.coupon-hint-list { margin-top: 12px; }
.coupon-hint-item {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border-radius: 12px;
  padding: 10px 12px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  font-size: 12px;
  color: #666;
}
.coupon-hint-item code {
  background: #FFF3E8;
  color: #E65100;
  padding: 4px 8px;
  border-radius: 8px;
  font-weight: 700;
}

/* SETTINGS */
.settings-group { margin-bottom: 14px; }
.settings-group-title {
  font-size: 12px;
  font-weight: 700;
  color: #888;
  margin: 0 4px 8px;
}
.settings-card label { margin-top: 10px; }
.settings-card label:first-child { margin-top: 0; }
.settings-link-row {
  width: 100%;
  margin-top: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  background: #f7f7f7;
  border-radius: 12px;
  padding: 12px;
  color: #333;
  font-size: 13px;
  font-weight: 600;
}
.settings-link-row .bi-chevron-right { margin-left: auto; color: #bbb; }
.settings-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 0;
  border-bottom: 1px solid #f0f0f0;
  margin: 0 !important;
  font-size: 13px;
  color: #333;
  font-weight: 600;
}
.settings-toggle:last-child { border-bottom: none; }
.switch {
  position: relative;
  width: 44px;
  height: 26px;
  flex-shrink: 0;
}
.switch input { opacity: 0; width: 0; height: 0; }
.slider {
  position: absolute;
  inset: 0;
  background: #ddd;
  border-radius: 999px;
  transition: 0.2s;
}
.slider::before {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 3px;
  background: #fff;
  border-radius: 50%;
  transition: 0.2s;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}
.switch input:checked + .slider { background: #FF8A00; }
.switch input:checked + .slider::before { transform: translateX(18px); }
.settings-line-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.settings-line-row strong { display: block; font-size: 13px; }
.settings-line-row small { display: block; font-size: 11px; color: #999; margin-top: 2px; }
.settings-lang label { margin-top: 0; }

/* NOTIFICATIONS */
.notify-card {
  width: 100%;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  text-align: left;
  border: none;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  position: relative;
}
.notify-card.is-unread { background: #FFFBF6; }
.notify-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #FFF3E8;
  color: #FF8A00;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}
.notify-title {
  font-size: 13px;
  font-weight: 700;
  color: #222;
}
.notify-text {
  font-size: 12px;
  color: #777;
  margin-top: 2px;
  line-height: 1.4;
}
.notify-time {
  font-size: 11px;
  color: #aaa;
  margin-top: 6px;
}
.notify-dot {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #E53935;
}

/* TICKETS */
.ticket-list-card {
  width: 100%;
  text-align: left;
  border: none;
  background: #fff;
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.ticket-list-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.ticket-list-top strong {
  font-size: 14px;
  color: #222;
}
.ticket-status-pill {
  font-size: 10px;
  font-weight: 700;
  border-radius: 999px;
  padding: 3px 8px;
  white-space: nowrap;
}
.ticket-list-preview {
  font-size: 12px;
  color: #777;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ticket-list-meta {
  font-size: 11px;
  color: #aaa;
  margin-top: 6px;
}
.ticket-dept-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.ticket-dept-btn {
  border: 1.5px solid #eee;
  background: #fff;
  border-radius: 12px;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  color: #555;
}
.ticket-dept-btn.active {
  border-color: #FF8A00;
  background: #FFF8F0;
  color: #E65100;
}
.ticket-chat-header {
  align-items: center;
}
.ticket-chat-title {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.ticket-chat-title strong {
  font-size: 15px;
  color: #222;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ticket-chat-title small {
  font-size: 11px;
  font-weight: 600;
}
.ticket-chat-wrap {
  display: flex;
  flex-direction: column;
  height: calc(100vh - 120px);
  max-height: 680px;
  background: #f5f5f5;
}
.ticket-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 14px 14px 8px;
  -webkit-overflow-scrolling: touch;
}
.chat-bubble-row {
  display: flex;
  margin-bottom: 10px;
}
.chat-bubble-row.is-me { justify-content: flex-end; }
.chat-bubble {
  max-width: 78%;
  background: #fff;
  border-radius: 16px 16px 16px 4px;
  padding: 10px 12px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.chat-bubble-row.is-me .chat-bubble {
  background: linear-gradient(135deg, #FF8A00, #FF6B35);
  color: #fff;
  border-radius: 16px 16px 4px 16px;
}
.chat-bubble-name {
  font-size: 10px;
  font-weight: 700;
  opacity: 0.7;
  margin-bottom: 2px;
}
.chat-bubble-text {
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}
.chat-bubble-time {
  font-size: 10px;
  opacity: 0.65;
  margin-top: 4px;
  text-align: right;
}
.ticket-chat-composer {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fff;
  border-top: 1px solid #eee;
}
.ticket-chat-composer .form-control {
  border-radius: 999px;
  padding-left: 14px;
}
.ticket-send-btn {
  width: 42px;
  height: 42px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, #FF8A00, #FF6B35);
  color: #fff;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.ticket-demo-reply {
  border: none;
  background: #fff;
  color: #999;
  font-size: 11px;
  padding: 6px 12px 12px;
  text-align: center;
}

/* POINTS */
.points-hero {
  background: linear-gradient(145deg, #FF8A00 0%, #FFB347 55%, #FFD54F 100%);
  border-radius: 20px;
  padding: 18px 16px 16px;
  color: #fff;
  box-shadow: 0 10px 28px rgba(255, 138, 0, 0.28);
}
.points-hero-label {
  font-size: 12px;
  opacity: 0.9;
  font-weight: 600;
}
.points-hero-balance {
  font-size: 36px;
  font-weight: 800;
  line-height: 1.1;
  margin-top: 2px;
}
.points-hero-balance small {
  font-size: 14px;
  font-weight: 700;
  opacity: 0.9;
}
.points-hero-hint {
  font-size: 11px;
  opacity: 0.85;
  margin-top: 4px;
}
.points-hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}
.points-hero-stats > div {
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
  padding: 8px 6px;
  text-align: center;
}
.points-hero-stats span {
  display: block;
  font-size: 10px;
  opacity: 0.9;
}
.points-hero-stats strong {
  display: block;
  font-size: 14px;
  margin-top: 2px;
}
.points-expire {
  font-size: 11px;
  margin-top: 10px;
  opacity: 0.9;
}
.points-checkin-btn {
  width: 100%;
  margin-top: 12px;
  border: none;
  background: #fff;
  color: #E65100;
  font-weight: 700;
  font-size: 13px;
  border-radius: 999px;
  padding: 10px 14px;
}
.points-checkin-done {
  margin-top: 12px;
  text-align: center;
  font-size: 12px;
  font-weight: 600;
  opacity: 0.95;
}
.points-hist-card,
.points-rule-card,
.points-reward-card {
  background: #fff;
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.points-hist-card,
.points-rule-card {
  display: flex;
  align-items: center;
  gap: 12px;
}
.points-hist-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 14px;
}
.points-hist-icon.is-earn { background: #E8F5E9; color: #43A047; }
.points-hist-icon.is-spend { background: #FFEBEE; color: #E53935; }
.points-hist-body { flex: 1; min-width: 0; }
.points-hist-body strong,
.points-rule-body strong {
  display: block;
  font-size: 13px;
  color: #222;
}
.points-hist-body span,
.points-rule-body span,
.points-reward-desc {
  display: block;
  font-size: 11px;
  color: #888;
  margin-top: 2px;
}
.points-hist-pts {
  font-size: 14px;
  font-weight: 800;
  flex-shrink: 0;
}
.points-hist-pts.is-earn { color: #43A047; }
.points-hist-pts.is-spend { color: #E53935; }
.points-rule-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: #FFF3E8;
  color: #FF8A00;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.points-rule-body { flex: 1; }
.points-rule-pts {
  font-size: 12px;
  font-weight: 800;
  color: #FF8A00;
  white-space: nowrap;
}
.points-reward-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: flex-start;
}
.points-reward-top strong {
  font-size: 14px;
  color: #222;
}
.points-reward-cost {
  font-size: 13px;
  font-weight: 800;
  color: #FF8A00;
  white-space: nowrap;
}
.points-reward-bot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 10px;
}
.points-reward-value {
  font-size: 12px;
  font-weight: 700;
  color: #555;
  background: #f5f5f5;
  border-radius: 8px;
  padding: 4px 8px;
}
.points-redeem-btn {
  border: none;
  background: linear-gradient(135deg, #FF8A00, #FF6B35);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  border-radius: 999px;
  padding: 7px 14px;
}
.points-redeem-btn:disabled {
  background: #ddd;
  color: #999;
}

/* Tracks select → invoice */
#page-tracks .page-header .header-action {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  background: linear-gradient(145deg, #FFB347, #FF8A00);
  box-shadow: 0 6px 16px rgba(255, 138, 0, 0.35);
}
#page-tracks .chip-scroll {
  cursor: grab;
  touch-action: pan-x;
  -webkit-user-select: none;
  user-select: none;
}
#page-tracks .filter-chip {
  background: #FFF3E8;
  color: #9A5A1A;
  box-shadow: none;
  border: 1.5px solid transparent;
}
#page-tracks .filter-chip.active {
  background: linear-gradient(135deg, #FF8A00, #FF6B35);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 138, 0, 0.28);
}
.tracks-list-pad { padding-bottom: 90px; }
.track-card {
  display: flex !important;
  align-items: stretch;
  gap: 0;
  padding: 0 !important;
  overflow: hidden;
}
.track-card.is-selected {
  box-shadow: 0 0 0 2px #FF8A00, var(--shadow);
}
.track-check {
  width: 48px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #FFF8F0;
  margin: 0;
  cursor: pointer;
}
.track-check.is-disabled {
  background: #f7f7f7;
}
.track-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.track-check-box {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  border: 2px solid #FFB347;
  background: #fff;
  position: relative;
}
.track-check input:checked + .track-check-box {
  background: linear-gradient(135deg, #FF8A00, #FF6B35);
  border-color: transparent;
}
.track-check input:checked + .track-check-box::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 2px;
  width: 6px;
  height: 11px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}
.track-card-main {
  flex: 1;
  border: none;
  background: transparent;
  text-align: left;
  padding: 12px 14px 12px 10px;
  min-width: 0;
}
.track-card-tag.is-ready {
  background: #E8F5E9;
  color: #2E7D32;
}
.track-card-tag.is-invoiced {
  background: #FFF3E0;
  color: #E65100;
}
.track-bill-bar {
  position: sticky;
  bottom: calc(var(--nav-h, 72px) + 8px);
  margin: 0 12px 8px;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  background: #1A2332;
  color: #fff;
  border-radius: 18px;
  padding: 12px 14px;
  box-shadow: 0 12px 28px rgba(0,0,0,0.22);
}
.track-bill-bar.d-none { display: none !important; }
.tbb-left small { display: block; font-size: 10px; opacity: 0.7; margin-top: 2px; }
.tbb-count { font-size: 13px; font-weight: 800; }
.tbb-btn {
  border: none;
  background: linear-gradient(135deg, #FF8A00, #FF6B35);
  color: #fff;
  font-size: 13px;
  font-weight: 800;
  border-radius: 999px;
  padding: 10px 16px;
  white-space: nowrap;
}


/* Compact track rows (~40% shorter) */
#page-tracks .track-card {
  margin-bottom: 6px !important;
  border-radius: 12px !important;
  min-height: 0;
}
#page-tracks .track-check {
  width: 36px;
}
#page-tracks .track-check-box {
  width: 18px;
  height: 18px;
  border-radius: 6px;
}
#page-tracks .track-check input:checked + .track-check-box::after {
  left: 5px;
  top: 1px;
  width: 5px;
  height: 9px;
}
#page-tracks .track-card-main {
  padding: 8px 10px 8px 8px !important;
}
#page-tracks .track-card-top {
  margin-bottom: 0;
  align-items: center;
}
#page-tracks .track-no {
  font-size: 12px;
  line-height: 1.2;
}
#page-tracks .status-pill {
  font-size: 9px;
  padding: 2px 6px;
}
#page-tracks .track-card-title {
  font-size: 12px;
  font-weight: 600;
  margin-top: 2px !important;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
#page-tracks .track-card-meta {
  margin-top: 3px !important;
  gap: 8px;
  font-size: 10px;
}
#page-tracks .track-card-tag {
  margin-top: 4px !important;
  font-size: 9px;
  padding: 2px 6px;
  border-radius: 6px;
}
