/* Mission page — premium mobile dashboard */
.mission-page {
  --sp: #F0357A;
  --sp2: #28D9CE;
  --sp-dark: #D42E66;
  --gold: #f5b942;
  --gold2: #ffe082;
  --ticket1: #F0357A;
  --ticket2: #22C55E;
  --ink: #0f172a;
  --muted: #64748b;
  --line: #e8ecf2;
  --red: #e11d48;
  --green: #059669;
  --ms-font: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --ms-radius: 20px;
  --ms-shadow: 0 4px 6px -1px rgba(15, 23, 42, 0.06), 0 12px 28px -8px rgba(15, 23, 42, 0.1);
  --ms-shadow-lg: 0 24px 48px -12px rgba(15, 23, 42, 0.14);
  font-family: var(--ms-font);
  background: #f1f5f9;
  -webkit-font-smoothing: antialiased;
}

.mission-page .footer,
.mission-page #site-footer { display: none; }

.mission-page #site-main { padding: 0; }

.ms-wrap {
  max-width: 480px;
  margin: 0 auto;
}

/* ── Hero header (โลโก้ + แถบ SSL — ไม่มีพื้นเขียวใหญ่) ── */
.ms-hero {
  position: relative;
  background: #fff;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}

.ms-hero-brandbar {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: 10px 14px 14px;
  padding-top: calc(10px + env(safe-area-inset-top, 0));
  background: #FFFFFF;
  border-bottom: 1px solid rgba(15, 23, 42, 0.06);
}

/* แถวโลโก้ + PREMIUM (จัดกลางโลโก้ ป้ายชิดขวาแถวเดียวกัน) */
.ms-hero-top {
  display: flex;
  align-items: center;
  width: 100%;
  gap: 8px;
  min-height: 48px;
}

.ms-hero-side {
  flex: 1;
  min-width: 0;
}

.ms-hero-side--badge {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.ms-hero-brandbar .ms-brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  line-height: 0;
  transition: transform 0.2s ease, filter 0.2s ease;
}

.ms-hero-brandbar .ms-brand:hover {
  transform: scale(1.03);
  filter: drop-shadow(0 4px 14px rgba(0, 200, 81, 0.35));
}

/* Shop logo lockup */
.ms-hero-brandbar .gm-logo-img--home.gm-logo-img--shop,
.ms-hero-brandbar .gm-logo-img--shop {
  height: 52px;
  max-height: 52px;
  width: auto;
  max-width: min(200px, 70vw);
  display: block;
  object-fit: contain;
}

.ms-hero-brandbar .gm-logo-img--home:not(.gm-logo-img--shop) {
  height: 72px;
  width: auto;
  max-width: min(360px, 92vw);
  display: block;
  object-fit: contain;
}

.ms-hero-brandbar .ms-hero-badge {
  position: static;
  transform: none;
  margin: 0;
  flex-shrink: 0;
}

.ms-hero-title {
  font-size: 22px;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
  margin: 0;
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

.ab-btn {
  background: rgba(255, 255, 255, 0.2);
  border: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  backdrop-filter: blur(6px);
}
.ab-btn:hover { background: rgba(255, 255, 255, 0.35); }

/* Premium badge next to logo */
.ms-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  background: linear-gradient(135deg, #fff8e1 0%, #ffd54f 45%, #ffb300 100%);
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 100px;
  padding: 7px 16px 7px 12px;
  color: #5d4200;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.65);
}
.ms-hero-badge i {
  color: #b8860b;
  font-size: 13px;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, 0.5));
}

@media (max-width: 360px) {
  .ms-hero-badge {
    padding: 6px 10px 6px 8px;
    font-size: 9px;
    gap: 5px;
  }
  .ms-hero-brandbar .gm-logo-img--home:not(.gm-logo-img--shop) {
    height: 56px;
  }
  .ms-hero-brandbar .gm-logo-img--shop {
    height: 44px;
    max-height: 44px;
    max-width: min(180px, 68vw);
  }
}

.ms-verified {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 10px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.05);
}
.ms-verified i {
  color: #16a34a;
  font-size: 13px;
  flex-shrink: 0;
}
.ms-verified .sep {
  opacity: 0.35;
  font-weight: 300;
}

.ms-body {
  padding: 0 16px calc(88px + env(safe-area-inset-bottom, 0));
  margin-top: 16px;
}

.ms-dashboard {
  display: flex;
  flex-direction: column;
  gap: 16px;
  animation: ms-fadeIn 0.45s ease-out;
}
@keyframes ms-fadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Level ticket — โทนเข้ม แทนพื้นเขียวเต็มแผ่น ── */
.ms-ticket {
  position: relative;
  background: linear-gradient(165deg, #1e293b 0%, #0f172a 100%);
  border-radius: var(--ms-radius);
  padding: 22px 20px 20px;
  color: #fff;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: var(--ms-shadow-lg);
}

.ms-ticket-glow {
  position: absolute;
  inset: -40% -20% auto auto;
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.22) 0%, transparent 68%);
  pointer-events: none;
}
.ms-ticket-pattern {
  position: absolute;
  inset: 0;
  opacity: 0.07;
  background-image: radial-gradient(circle at 1px 1px, #fff 1px, transparent 0);
  background-size: 18px 18px;
  pointer-events: none;
}
.ms-ticket-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 18px;
  position: relative;
  z-index: 2;
}
.lvl-badge {
  background: rgba(255, 255, 255, 0.98);
  color: #0f172a;
  font-weight: 800;
  border-radius: 100px;
  padding: 8px 16px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
  letter-spacing: -0.02em;
}
.lvl-badge i { font-size: 13px; color: var(--sp); }
.ms-ticket-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ms-cur {
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  opacity: 0.88;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.92);
}
.ms-history-btn {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: background 0.2s, transform 0.2s;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.ms-history-btn:hover {
  background: rgba(255, 255, 255, 0.28);
  transform: scale(1.04);
}
.ms-ticket-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 16px;
  position: relative;
  z-index: 2;
}
.ms-ticket-stat {
  padding: 12px 14px;
  background: rgba(0, 0, 0, 0.12);
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(4px);
}
.ms-ticket-stat--right { text-align: right; }
.ms-ticket .lbl {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.88;
  margin-bottom: 6px;
}
.ms-ticket .val {
  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.15;
  font-variant-numeric: tabular-nums;
}
.ms-ticket .val.small { font-size: 19px; }
.ms-ticket .unit {
  font-size: 11px;
  font-weight: 600;
  opacity: 0.85;
  margin-left: 3px;
  letter-spacing: 0.02em;
}

.ms-progress { margin-top: 16px; position: relative; z-index: 2; }
.ms-progress-bar {
  height: 8px;
  background: rgba(0, 0, 0, 0.22);
  border-radius: 100px;
  overflow: hidden;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.15);
}
.ms-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #fff 0%, #f0fdf4 100%);
  border-radius: 100px;
  transition: width 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 0 12px rgba(255, 255, 255, 0.45);
}
.ms-progress-text {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  margin-top: 8px;
  font-weight: 600;
  opacity: 0.94;
}
.ms-pct {
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

/* ── Stats card ── */
.ms-stats {
  background: #fff;
  border-radius: var(--ms-radius);
  padding: 18px 16px 16px;
  box-shadow: var(--ms-shadow);
  border: 1px solid rgba(255, 255, 255, 0.9);
}
.ms-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  padding: 0 2px;
}
.ms-stats-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.ms-stats-title i {
  color: var(--primary);
  font-size: 14px;
}
.ms-stats-live {
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.25);
  animation: ms-pulse 2s ease-in-out infinite;
}
.ms-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.st-item.st-card {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px 12px;
  background: linear-gradient(180deg, #fafbfc 0%, #f4f6f8 100%);
  border-radius: 14px;
  border: 1px solid var(--line);
  transition: transform 0.2s, box-shadow 0.2s;
}
.st-item.st-card::after { display: none; }
.st-item.st-card:active { transform: scale(0.98); }
.st-card--balance {
  background: linear-gradient(145deg, #fff5f5 0%, #ffe4e8 100%);
  border-color: #fecdd3;
}
.st-ic {
  width: 36px;
  height: 36px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
}
.st-ic.c1 { background: linear-gradient(145deg, #dcfce7, #bbf7d0); color: #15803d; }
.st-ic.c2 { background: linear-gradient(145deg, #fef3c7, #fde68a); color: #b45309; }
.st-ic.c3 { background: linear-gradient(145deg, #dbeafe, #bfdbfe); color: #1d4ed8; }
.st-ic.c4 { background: linear-gradient(145deg, #ffe4e6, #fecdd3); color: #be123c; }
.st-body { min-width: 0; flex: 1; }
.st-item .st-lbl {
  font-size: 10.5px;
  color: var(--muted);
  margin-bottom: 4px;
  font-weight: 600;
  line-height: 1.3;
}
.st-item .st-val {
  font-size: 16px;
  font-weight: 800;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.st-val--accent { color: var(--red) !important; }

.ms-rate-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 14px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #f0fdf4, #ecfdf5);
  border-radius: 12px;
  border: 1px solid #bbf7d0;
}
.ms-rate-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.ms-rate-label i { color: #ea580c; font-size: 13px; }
.ms-rate-row b {
  color: var(--primary-dark);
  font-weight: 800;
  font-size: 13px;
}

.ms-start-wrap { margin-top: 16px; text-align: center; position: relative; z-index: 2; }
.ms-start {
  background: linear-gradient(135deg, #28D9CE 0%, #1FC4BA 38%, #F04A7A 72%, #F0357A 100%);
  color: #fff;
  border: none;
  font-size: 16px;
  font-weight: 700;
  padding: 16px 0;
  width: 100%;
  border-radius: 100px;
  cursor: pointer;
  font-family: var(--ms-font);
  box-shadow:
    0 12px 28px -4px rgba(240, 53, 122, 0.4),
    0 6px 16px -6px rgba(40, 217, 206, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
  position: relative;
  overflow: hidden;
}
.ms-start::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: ms-shine 3.5s ease-in-out infinite;
}
@keyframes ms-shine {
  0%, 100% { left: -100%; }
  50% { left: 120%; }
}
.ms-start:hover:not(:disabled) {
  filter: brightness(1.05);
  transform: translateY(-2px);
  box-shadow:
    0 16px 36px -4px rgba(240, 53, 122, 0.48),
    0 8px 20px -6px rgba(40, 217, 206, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.4);
}
.ms-start:disabled {
  background: linear-gradient(180deg, #e2e8f0, #cbd5e1);
  cursor: not-allowed;
  box-shadow: none;
  color: #94a3b8;
  transform: none;
}
.ms-start:disabled::after { display: none; }

/* Trust + hours */
.ms-trust {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}
.ms-trust .tb {
  background: #fff;
  border-radius: 16px;
  padding: 14px 8px;
  text-align: center;
  box-shadow: var(--ms-shadow);
  border: 1px solid var(--line);
  transition: transform 0.2s;
}
.ms-trust .tb i {
  font-size: 20px;
  color: var(--primary);
  margin-bottom: 6px;
  display: block;
  width: 40px;
  height: 40px;
  line-height: 40px;
  margin-left: auto;
  margin-right: auto;
  background: var(--primary2);
  border-radius: 12px;
}
.ms-trust .tb small { font-size: 10px; color: var(--muted); display: block; line-height: 1.35; font-weight: 500; }
.ms-trust .tb b { font-size: 11.5px; color: var(--ink); display: block; font-weight: 700; margin-bottom: 2px; }

.ms-hours {
  background: #fff;
  border-radius: 16px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: var(--ms-shadow);
  border: 1px solid var(--line);
}
.ms-hours .h-ic {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--primary2);
  color: var(--primary);
  display: grid;
  place-items: center;
  font-size: 16px;
}
.ms-hours .h-main { flex: 1; }
.ms-hours .h-title { font-size: 13px; color: var(--ink); font-weight: 600; }
.ms-hours .h-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.ms-hours .h-status {
  font-size: 11px;
  color: var(--primary-dark);
  background: var(--primary2);
  padding: 4px 10px;
  border-radius: 100px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.ms-hours .h-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--primary);
  animation: ms-pulse 2s infinite;
}
@keyframes ms-pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.35; } }

.ms-tip {
  background: #fff;
  border-radius: 16px;
  padding: 18px 18px;
  font-size: 13px;
  line-height: 1.75;
  color: var(--muted);
  box-shadow: var(--ms-shadow);
  border: 1px solid var(--line);
}
.ms-tip h4 {
  color: var(--ink);
  margin-bottom: 10px;
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.ms-tip h4 i { color: var(--primary); }
.ms-tip .tip-note {
  display: flex;
  gap: 8px;
  padding: 10px 12px;
  background: #fffbeb;
  border-radius: 10px;
  border-left: 3px solid #f59e0b;
  margin-top: 10px;
  font-size: 12px;
  color: #78350f;
}
.ms-tip .tip-note i { color: #f59e0b; flex-shrink: 0; margin-top: 2px; }

/* Empty state */
.ms-empty {
  background: #fff;
  border-radius: var(--ms-radius);
  padding: 32px 24px 28px;
  text-align: center;
  box-shadow: var(--ms-shadow-lg);
  border: 1px solid var(--line);
  margin-top: 8px;
}
.ms-empty .ic {
  width: 82px;
  height: 82px;
  margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--primary2), #c8f5d4);
  color: var(--primary);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 34px;
}
.ms-empty h3 { font-size: 18px; color: var(--ink); margin: 0 0 6px; font-weight: 700; }
.ms-empty p { font-size: 13px; color: var(--muted); line-height: 1.65; margin: 0 0 16px; }
.ms-empty .badge-new {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary2);
  color: var(--primary-dark);
  font-size: 11.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 100px;
  margin-bottom: 12px;
  border: 1px solid #b8efc4;
}
.ms-empty .steps {
  text-align: left;
  background: var(--gray1, #f7f8fa);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 4px 0 18px;
  border: 1px solid var(--line);
}
.ms-empty .steps .st { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; }
.ms-empty .steps .st + .st { border-top: 1px dashed var(--line); }
.ms-empty .steps .n {
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  display: grid;
  place-items: center;
}
.ms-empty .steps .tx { font-size: 13px; color: var(--ink); line-height: 1.55; }
.ms-empty .steps .tx small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.ms-empty .ctc { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 10px; }
.ms-empty .ctc a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 0;
  border-radius: 100px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: transform 0.15s;
}
.ms-empty .ctc .line { background: #06c755; color: #fff; }
.ms-empty .ctc .wa { background: #25d366; color: #fff; }
.ms-empty .ctc-sec { display: inline-flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12px; text-decoration: none; }
.ms-empty .ctc-sec:hover { color: var(--primary); }

/* Order modal */
.ord-modal {
  position: fixed;
  inset: 0;
  background: rgba(20, 30, 20, 0.55);
  z-index: 9999;
  display: none;
  align-items: flex-end;
  justify-content: center;
  backdrop-filter: blur(4px);
  pointer-events: none;
}
.ord-modal.open { display: flex; pointer-events: auto; }
.ord-box {
  background: #fff;
  border-radius: 20px 20px 0 0;
  width: 100%;
  max-width: 460px;
  padding: 22px 20px 24px;
  animation: ms-slideUp 0.25s ease-out;
  max-height: 90vh;
  overflow-y: auto;
}
@keyframes ms-slideUp {
  from { transform: translateY(30px); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}
@media (min-width: 500px) {
  .ord-modal { align-items: center; padding: 16px; }
  .ord-box { border-radius: 20px; max-width: 400px; }
}
.ord-grab { width: 40px; height: 4px; background: #e5e7eb; border-radius: 100px; margin: -6px auto 14px; }
.ord-head { font-weight: 700; font-size: 18px; color: var(--ink); margin-bottom: 2px; display: flex; align-items: center; gap: 8px; }
.ord-head i { color: var(--primary); }
.ord-date { font-size: 11.5px; color: var(--muted); margin-bottom: 14px; display: flex; align-items: center; gap: 6px; }
.ord-date .ord-no { margin-left: auto; background: #f3f4f6; padding: 2px 8px; border-radius: 100px; font-family: Roboto, monospace; }
.ord-prod {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: var(--gray1, #f7f8fa);
  border-radius: 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
}
.ord-prod img { width: 64px; height: 64px; object-fit: cover; border-radius: 8px; background: #eee; flex-shrink: 0; }
.ord-prod-ph {
  width: 64px; height: 64px; border-radius: 8px; background: #e5e7eb; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center; color: #9ca3af; font-size: 22px;
}
.ord-prod .name { flex: 1; font-size: 13px; color: var(--ink); line-height: 1.45; font-weight: 500; }
.ord-prod .store { font-size: 11px; color: var(--muted); margin-top: 4px; }
.ord-prod .store i { color: var(--primary); }
.ord-sum {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  margin-bottom: 16px;
  background: var(--primary2);
  border-radius: 12px;
  padding: 14px;
  border: 1px solid #c8f0d0;
}
.ord-sum > div:first-child { border-right: 1px dashed #a8ddb4; }
.ord-sum .lbl { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.ord-sum .val { font-size: 20px; font-weight: 700; color: var(--ink); font-family: Roboto, sans-serif; }
.ord-sum .val.comm { color: var(--primary-dark); }
.ord-btns { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 14px; }
.ord-btns--single { grid-template-columns: 1fr; }
.ord-btns button {
  border: none;
  padding: 13px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: transform 0.15s, box-shadow 0.15s;
}
.ord-btns .cancel { background: #fff; color: #475569; border: 1.5px solid #e5e7eb; }
.ord-btns .confirm {
  background: linear-gradient(180deg, #34D399, #22C55E);
  color: #fff;
  box-shadow: 0 6px 16px rgba(0, 153, 24, 0.35);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.ord-btns .confirm:hover { transform: translateY(-1px); }
.ord-btns .confirm--all {
  width: 100%;
  padding: 15px 20px;
  border-radius: 14px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.01em;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  box-shadow: 0 10px 28px -6px rgba(15, 23, 42, 0.45);
}
.ord-btns .confirm--all:hover {
  transform: translateY(-2px);
  box-shadow: 0 14px 32px -6px rgba(15, 23, 42, 0.5);
}
.ord-btns .confirm--all i {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
}
.ord-done { text-align: center; padding: 12px 4px 4px; }
.ord-done--all { padding-bottom: 8px; }
.ord-done .success-ring {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--primary2);
  display: grid;
  place-items: center;
  margin: 0 auto 12px;
}
.ord-done .success-ring--all {
  width: 64px;
  height: 64px;
  background: linear-gradient(145deg, #ecfdf5, #d1fae5);
  border: 2px solid #6ee7b7;
  box-shadow: 0 8px 24px rgba(16, 185, 129, 0.2);
}
.ord-done .success-ring i { font-size: 36px; color: var(--primary); }
.ord-done .success-ring--all i { font-size: 28px; color: #059669; }
.ord-done h3 { font-size: 18px; color: var(--ink); margin-bottom: 6px; font-weight: 700; }
.ord-done p { font-size: 13px; color: var(--muted); margin-bottom: 10px; line-height: 1.45; }
.ord-done .commish { font-size: 28px; color: var(--primary-dark); font-weight: 700; font-family: Roboto, sans-serif; margin-bottom: 4px; }
.ord-done--all .commish { color: #059669; }
.ord-done-meta {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 14px;
  background: #f8fafc;
  border-radius: 12px;
  border: 1px solid var(--line);
}
.ord-done--all .ord-done-meta {
  background: #ecfdf5;
  border-color: #bbf7d0;
}
.ord-done-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--ink);
  font-weight: 600;
}
.ord-done-badge i { color: #10b981; font-size: 14px; }
.ord-done-badge b { font-variant-numeric: tabular-nums; }
.ord-done-sub {
  font-size: 11px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* Commission history modal */
.ch-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: none;
  background: rgba(20, 30, 20, 0.55);
  backdrop-filter: blur(4px);
  align-items: flex-end;
  justify-content: center;
  pointer-events: none;
}
.ch-modal.open { display: flex; pointer-events: auto; }
.ch-box {
  background: #fff;
  width: 100%;
  max-width: 460px;
  border-radius: 20px 20px 0 0;
  max-height: 90vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  animation: ms-slideUp 0.25s ease-out;
}
@media (min-width: 500px) {
  .ch-modal { align-items: center; padding: 16px; }
  .ch-box { border-radius: 20px; max-width: 440px; }
}
.ch-head {
  padding: 18px 20px 16px;
  color: #fff;
  position: relative;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
}
.ch-head .close-btn {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
  cursor: pointer;
}
.ch-sum { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.ch-sum-item {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.22);
  border-radius: 10px;
  padding: 10px 12px;
}
.ch-sum-item .lbl { font-size: 11px; opacity: 0.85; }
.ch-sum-item .val { font-size: 19px; font-weight: 700; font-family: Roboto, sans-serif; margin-top: 2px; }
.ch-list { flex: 1; overflow-y: auto; padding: 8px 12px 18px; background: #fafafa; }
.ch-empty { text-align: center; padding: 40px 16px; color: var(--muted); font-size: 13px; }
.ch-empty i { font-size: 38px; color: #d1d5db; margin-bottom: 10px; display: block; }
.ch-loading { text-align: center; padding: 40px; color: var(--muted); font-size: 13px; }
.ch-loading i { font-size: 22px; color: var(--primary); }
.ch-item {
  display: flex;
  gap: 12px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  margin: 8px 0;
}
.ch-item .img {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  background: #f3f4f6 center/cover no-repeat;
  flex-shrink: 0;
  display: grid;
  place-items: center;
  color: #9ca3af;
}
.ch-item .name {
  font-size: 13px;
  color: var(--ink);
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ch-item .meta { font-size: 11px; color: var(--muted); margin-top: 3px; }
.ch-item .meta .tag { background: var(--primary2); color: var(--primary-dark); padding: 1px 6px; border-radius: 100px; font-size: 10px; font-weight: 600; }
.ch-item .right { text-align: right; min-width: 72px; }
.ch-item .right .plus { font-size: 10px; color: var(--muted); margin-bottom: 2px; }
.ch-item .right .comm { font-size: 15px; font-weight: 700; color: var(--green); font-family: Roboto, sans-serif; }
.ch-item .right .amt-small { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.ch-item .mid { flex: 1; min-width: 0; }
.ch-item .name { font-size: 13px; color: var(--ink); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.service-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  border: 2px solid rgba(255, 255, 255, 0.9);
}
