:root {
  --purple-900: #2b1745;
  --purple-700: #4b2a78;
  --purple-600: #653a9c;
  --purple-500: #7c4dff;
  --purple-300: #b79bef;
  --purple-100: #ece3fb;
  --purple-50: #f6f2fd;
  --ink: #1b1424;
  --ink-soft: #3b2f4d;
  --muted: #726787;
  --line: #ece8f3;
  --bg: #f7f5fb;
  --white: #ffffff;
  --green: #10805e;
  --green-bg: #e4f6ee;
  --amber: #a45f00;
  --amber-bg: #fff2dc;
  --red: #b3392b;
  --red-bg: #fdecea;
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow-sm: 0 2px 8px rgba(43, 23, 69, 0.05);
  --shadow: 0 10px 30px rgba(43, 23, 69, 0.09);
  --nav-h: 74px;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #efe9f7;
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4, p { margin: 0; }
a { color: inherit; }

.app {
  position: relative;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  box-shadow: 0 0 0 1px rgba(43, 23, 69, 0.06), 0 30px 90px rgba(43, 23, 69, 0.16);
}

.view { padding-bottom: calc(var(--nav-h) + 28px); min-height: 100vh; }

.ic { width: 20px; height: 20px; flex: none; }
.ic-sm { width: 16px; height: 16px; }

/* ---------- generic type ---------- */
.pad { padding: 0 16px; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.stack-sm { display: flex; flex-direction: column; gap: 9px; }
.row { display: flex; align-items: center; gap: 10px; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.muted { color: var(--muted); }
.tiny { font-size: 11.5px; }
.small { font-size: 13px; }
.bold { font-weight: 700; }
.grow { flex: 1; min-width: 0; }
.mono { font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 15px; border-radius: 13px;
  font-size: 13.5px; font-weight: 650; letter-spacing: -0.1px;
  transition: transform 0.12s ease, opacity 0.12s ease, background 0.15s ease;
}
.btn:active { transform: scale(0.975); }
.btn-primary { background: var(--purple-700); color: #fff; box-shadow: 0 8px 18px rgba(75, 42, 120, 0.24); }
.btn-primary:disabled { background: #cdc4dd; box-shadow: none; cursor: not-allowed; }
.btn-outline { background: #fff; color: var(--purple-700); box-shadow: inset 0 0 0 1.4px var(--purple-100); }
.btn-outline:disabled { color: #a79db9; box-shadow: inset 0 0 0 1.4px var(--line); cursor: not-allowed; }
.btn-soft { background: var(--purple-50); color: var(--purple-700); }
.btn-white { background: #fff; color: var(--purple-700); box-shadow: 0 8px 18px rgba(28, 12, 48, 0.16); }
.btn-white-ghost { background: rgba(255, 255, 255, 0.16); color: #fff; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28); }
.btn-sm { padding: 8px 12px; font-size: 12.5px; border-radius: 11px; }
.btn-block { width: 100%; }
.icon-btn {
  width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 12px; background: var(--purple-50); color: var(--purple-700); flex: none;
}
.icon-btn.ghost { background: transparent; color: var(--ink-soft); }
.icon-btn:active { transform: scale(0.94); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 25;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.93);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.topbar-title { font-size: 17px; font-weight: 750; letter-spacing: -0.3px; }
.topbar-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.topbar-actions { margin-left: auto; display: flex; gap: 8px; }

/* ---------- storefront hero ---------- */
.store-hero {
  position: relative;
  padding: 14px 16px 18px;
  color: #fff;
  background:
    radial-gradient(560px 260px at 88% -18%, rgba(183, 155, 239, 0.72), transparent 62%),
    radial-gradient(360px 220px at 4% 118%, rgba(124, 77, 255, 0.55), transparent 68%),
    linear-gradient(158deg, #56307f 0%, #3d2163 58%, #2b1745 100%);
  border-radius: 0 0 26px 26px;
  overflow: hidden;
}
.store-hero::after {
  content: ""; position: absolute; inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='44'%3E%3Cpath d='M0 44L44 0' stroke='rgba(255,255,255,0.055)' stroke-width='1'/%3E%3C/svg%3E");
  pointer-events: none;
}
.hero-top { position: relative; display: flex; align-items: center; justify-content: space-between; }
.hero-brand { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 650; letter-spacing: 0.14em; text-transform: uppercase; opacity: 0.92; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.22);
  font-size: 10.5px; font-weight: 600; letter-spacing: 0.02em;
}

.vendor-head { position: relative; display: flex; align-items: center; gap: 13px; margin-top: 16px; }
.avatar {
  width: 44px; height: 44px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 14px; background: var(--purple-100); color: var(--purple-700);
  font-size: 14px; font-weight: 750; letter-spacing: 0.02em;
}
.avatar-lg { width: 62px; height: 62px; border-radius: 20px; font-size: 19px; }
.avatar-sm { width: 38px; height: 38px; border-radius: 12px; font-size: 12.5px; }
.vendor-head .avatar {
  background: linear-gradient(150deg, #ffffff, #e9dcff);
  color: var(--purple-700);
  box-shadow: 0 10px 22px rgba(18, 6, 34, 0.28), inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}
.vendor-name { display: flex; align-items: center; gap: 6px; font-size: 20px; font-weight: 780; letter-spacing: -0.45px; }
.verified { color: #9be7c4; width: 17px; height: 17px; }
.vendor-handle { font-size: 11.5px; color: rgba(255, 255, 255, 0.7); margin-top: 3px; }
.vendor-loc {
  display: inline-flex; align-items: center; gap: 5px; margin-top: 7px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 11px; font-weight: 600;
}
.vendor-loc .ic { width: 13px; height: 13px; }

.vendor-stats {
  position: relative;
  display: grid; grid-template-columns: repeat(4, 1fr);
  margin-top: 18px; padding: 11px 4px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.1);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
  text-align: center;
}
.vendor-stat strong { display: block; font-size: 14px; font-weight: 750; }
.vendor-stat span { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.07em; color: rgba(255, 255, 255, 0.64); }
.vendor-actions { position: relative; display: grid; grid-template-columns: 1fr 1fr; gap: 9px; margin-top: 14px; }

/* ---------- cards ---------- */
.card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 14px;
}
.card-flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 11px; }
.card-title { font-size: 14px; font-weight: 720; letter-spacing: -0.2px; }
.card-note { font-size: 11.5px; color: var(--muted); }

.pickup-card { display: flex; align-items: flex-start; gap: 11px; }
.pickup-icon {
  width: 36px; height: 36px; flex: none; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--purple-50); color: var(--purple-700);
}
.pickup-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.09em; color: var(--muted); font-weight: 650; }
.pickup-value { font-size: 13px; font-weight: 620; margin-top: 2px; line-height: 1.4; }

/* ---------- search ---------- */
.search {
  display: flex; align-items: center; gap: 9px;
  padding: 0 12px; height: 46px;
  background: #fff; border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--line), var(--shadow-sm);
}
.search .ic { color: #9d93b2; }
.search input {
  flex: 1; min-width: 0; border: none; outline: none; background: transparent;
  font-size: 13.5px; padding: 0;
}
.search input::placeholder { color: #a79dba; }
.search-clear { width: 22px; height: 22px; border-radius: 50%; background: var(--purple-50); color: var(--purple-700); display: grid; place-items: center; }
.search-clear .ic { width: 12px; height: 12px; }

/* ---------- section head ---------- */
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin: 4px 0 10px; }
.section-title { font-size: 15px; font-weight: 740; letter-spacing: -0.25px; }
.section-note { font-size: 11.5px; color: var(--muted); }

/* ---------- product grid ---------- */
.product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.product-card {
  text-align: left; background: #fff; border-radius: var(--radius);
  overflow: hidden; box-shadow: var(--shadow-sm);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
  display: flex; flex-direction: column;
}
.product-card:active { transform: scale(0.985); }
.product-thumb { position: relative; aspect-ratio: 1 / 1; background: var(--purple-50); overflow: hidden; }
.product-thumb img { width: 100%; height: 100%; object-fit: cover; }
.product-card.is-out .product-thumb img { opacity: 0.55; filter: grayscale(0.35); }
.chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3.5px 7px; border-radius: 7px;
  font-size: 9.5px; font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase;
}
.chip-in { background: var(--green-bg); color: var(--green); }
.chip-low { background: var(--amber-bg); color: var(--amber); }
.chip-out { background: #fff; color: var(--red); box-shadow: inset 0 0 0 1px #f6d4ce; }
.product-thumb .chip { position: absolute; top: 8px; left: 8px; box-shadow: 0 2px 6px rgba(43, 23, 69, 0.12); }
.product-body { padding: 10px 11px 12px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.product-title { font-size: 12.8px; font-weight: 640; line-height: 1.32; letter-spacing: -0.1px; }
.product-price { font-size: 14px; font-weight: 780; letter-spacing: -0.25px; color: var(--purple-700); }
.product-meta { font-size: 10.5px; color: var(--muted); margin-top: auto; }

/* ---------- pills / scroller ---------- */
.scroller {
  display: flex; gap: 8px; overflow-x: auto; padding: 2px 16px 4px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.scroller::-webkit-scrollbar { display: none; }
.pill {
  flex: none; display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 13px; border-radius: 999px;
  background: #fff; color: var(--ink-soft);
  font-size: 12.5px; font-weight: 620; white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line);
  transition: background 0.15s ease, color 0.15s ease;
}
.pill.active { background: var(--purple-700); color: #fff; box-shadow: 0 6px 14px rgba(75, 42, 120, 0.22); }
.pill-count {
  font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 999px;
  background: rgba(43, 23, 69, 0.07); color: var(--muted);
}
.pill.active .pill-count { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* ---------- segmented ---------- */
.segmented {
  display: grid; grid-template-columns: 1fr 1fr; gap: 4px;
  padding: 4px; border-radius: 13px; background: #eae3f5;
}
.seg {
  padding: 8px 6px; border-radius: 10px;
  font-size: 12.5px; font-weight: 660; color: #6a5c80;
  transition: background 0.15s ease, color 0.15s ease;
}
.seg.active { background: #fff; color: var(--purple-700); box-shadow: var(--shadow-sm); }

/* ---------- product detail ---------- */
.gallery {
  position: relative; display: flex; overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none;
  background: #fff; aspect-ratio: 1 / 1;
}
.gallery::-webkit-scrollbar { display: none; }
.gal-slide { flex: 0 0 100%; scroll-snap-align: center; }
.gal-slide img { width: 100%; height: 100%; object-fit: cover; }
.gal-slide.zoom { background-repeat: no-repeat; background-color: #f2edfa; }
.gal-dots {
  position: absolute; bottom: 12px; left: 0; right: 0;
  display: flex; justify-content: center; gap: 5px;
}
.dot-item {
  width: 6px; height: 6px; border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: 0 0 0 1px rgba(43, 23, 69, 0.12);
  transition: width 0.18s ease, background 0.18s ease;
}
.dot-item.active { width: 16px; border-radius: 999px; background: #fff; }

.detail-wrap { background: #fff; border-radius: 22px 22px 0 0; margin-top: -18px; position: relative; padding: 18px 16px 6px; }
.detail-title { font-size: 19px; font-weight: 760; letter-spacing: -0.4px; line-height: 1.28; }
.detail-price { font-size: 24px; font-weight: 800; letter-spacing: -0.8px; color: var(--purple-700); margin-top: 6px; }
.stock-line { display: flex; align-items: center; gap: 7px; margin-top: 9px; font-size: 11.5px; color: var(--muted); }
.detail-desc { font-size: 13px; line-height: 1.6; color: var(--ink-soft); margin-top: 14px; }
.detail-list { list-style: none; padding: 0; margin: 12px 0 0; display: grid; gap: 7px; }
.detail-list li { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-soft); }
.detail-list .ic { color: var(--green); width: 15px; height: 15px; margin-top: 2px; }

.option-group { margin-top: 18px; }
.option-label {
  display: flex; align-items: baseline; gap: 6px;
  font-size: 12.5px; font-weight: 700; letter-spacing: -0.1px;
}
.option-label .req { font-size: 10px; font-weight: 650; color: var(--purple-500); text-transform: uppercase; letter-spacing: 0.05em; }
.option-value { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-left: auto; }
.opt-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 9px; }
.opt {
  min-width: 46px; padding: 9px 13px; border-radius: 11px;
  background: #fff; font-size: 12.5px; font-weight: 620; color: var(--ink-soft);
  box-shadow: inset 0 0 0 1.4px var(--line);
  transition: background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}
.opt.selected { background: var(--purple-700); color: #fff; box-shadow: 0 6px 14px rgba(75, 42, 120, 0.2); }
.opt:disabled { opacity: 0.45; cursor: not-allowed; }

.action-bar {
  position: sticky; bottom: var(--nav-h); z-index: 15;
  margin-top: 18px; padding: 12px 0 10px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), #fff 42%);
  border-top: 1px solid var(--line);
}
.action-note {
  display: flex; align-items: center; gap: 6px;
  font-size: 11.5px; font-weight: 600; color: var(--amber);
  margin-bottom: 9px;
}
.action-note .ic { width: 14px; height: 14px; }
.action-note.ok { color: var(--green); }
.action-buttons { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }

/* ---------- orders ---------- */
.order-card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 13px; }
.order-top { display: flex; align-items: flex-start; gap: 10px; }
.order-buyer { font-size: 13.5px; font-weight: 700; letter-spacing: -0.15px; }
.order-id { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.order-amount { margin-left: auto; font-size: 14px; font-weight: 780; letter-spacing: -0.3px; font-variant-numeric: tabular-nums; }
.order-item-line {
  display: flex; align-items: center; gap: 8px;
  margin-top: 11px; padding: 9px 11px; border-radius: 11px;
  background: var(--purple-50);
  font-size: 12.5px; font-weight: 600; color: var(--ink-soft);
}
.order-item-line .qty { margin-left: auto; color: var(--muted); font-weight: 600; }
.order-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.03em;
}
.status .ic { width: 12px; height: 12px; }
.status-to-send { background: var(--amber-bg); color: var(--amber); }
.status-on-the-way { background: #e8edff; color: #3448a8; }
.status-done { background: var(--green-bg); color: var(--green); }
.order-how { font-size: 11px; color: var(--muted); }
.order-actions { display: flex; gap: 8px; margin-top: 11px; padding-top: 11px; border-top: 1px solid var(--line); }
.link-btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 11px; border-radius: 10px;
  font-size: 12px; font-weight: 650; color: var(--purple-700);
  background: var(--purple-50);
}
.link-btn.plain { background: transparent; color: var(--muted); }
.link-btn .ic { width: 14px; height: 14px; }

.empty {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 42px 24px; text-align: center;
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.empty-icon { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; background: var(--purple-50); color: var(--purple-600); }
.empty-title { font-size: 13.5px; font-weight: 700; }
.empty-text { font-size: 12px; color: var(--muted); line-height: 1.5; max-width: 240px; }

/* ---------- chats ---------- */
.thread-list { display: flex; flex-direction: column; gap: 8px; }
.thread {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  padding: 12px; background: #fff; border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.thread.unread { box-shadow: inset 0 0 0 1.4px var(--purple-100), var(--shadow-sm); }
.thread-body { flex: 1; min-width: 0; }
.thread-name { display: flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; letter-spacing: -0.15px; }
.thread-msg {
  font-size: 11.5px; color: var(--muted); margin-top: 3px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.thread.unread .thread-msg { color: var(--ink-soft); font-weight: 560; }
.thread-meta { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; flex: none; }
.thread-time { font-size: 10px; color: var(--muted); }
.badge-dot {
  min-width: 17px; height: 17px; padding: 0 5px; border-radius: 999px;
  background: var(--purple-500); color: #fff; font-size: 9.5px; font-weight: 750;
  display: grid; place-items: center;
}
.tag {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2.5px 6px; border-radius: 6px;
  font-size: 9px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em;
  background: var(--purple-50); color: var(--purple-700);
}
.tag.top { background: #fff4e0; color: #9a5c00; }
.tag.follow { background: #eaf1ff; color: #2f4aa8; }

.chat-head { display: flex; align-items: center; gap: 10px; }
.chat-head-name { font-size: 14px; font-weight: 730; letter-spacing: -0.2px; }
.chat-head-meta { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.messages {
  display: flex; flex-direction: column; gap: 9px;
  padding: 16px; min-height: 320px;
  max-height: calc(100vh - 260px); overflow-y: auto;
  background:
    radial-gradient(320px 180px at 100% 0%, rgba(236, 227, 251, 0.65), transparent 70%),
    var(--bg);
}
.msg { max-width: 78%; padding: 9px 12px; border-radius: 14px; font-size: 12.8px; line-height: 1.45; }
.msg-them { align-self: flex-start; background: #fff; box-shadow: var(--shadow-sm); border-bottom-left-radius: 5px; }
.msg-me { align-self: flex-end; background: var(--purple-700); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 6px 14px rgba(75, 42, 120, 0.18); }
.msg-time { display: block; font-size: 9.5px; margin-top: 4px; opacity: 0.6; }
.msg-day { align-self: center; font-size: 10px; font-weight: 600; color: var(--muted); padding: 3px 9px; border-radius: 999px; background: #fff; box-shadow: var(--shadow-sm); }
.quick-replies { display: flex; gap: 7px; overflow-x: auto; padding: 0 16px 10px; scrollbar-width: none; }
.quick-replies::-webkit-scrollbar { display: none; }
.quick-reply {
  flex: none; padding: 7px 11px; border-radius: 999px;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line);
  font-size: 11.5px; font-weight: 600; color: var(--ink-soft); white-space: nowrap;
}
.composer {
  position: sticky; bottom: var(--nav-h); z-index: 15;
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px; background: #fff;
  border-top: 1px solid var(--line);
}
.composer input {
  flex: 1; min-width: 0; height: 42px; padding: 0 14px;
  border-radius: 999px; border: none; outline: none;
  background: var(--purple-50); font-size: 13px;
}
.send-btn {
  width: 42px; height: 42px; flex: none; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--purple-700); color: #fff;
  box-shadow: 0 8px 16px rgba(75, 42, 120, 0.26);
}
.send-btn:disabled { background: #cfc6df; box-shadow: none; }

/* ---------- dashboard ---------- */
.greet { font-size: 12px; color: var(--muted); font-weight: 600; }
.greet-name { font-size: 20px; font-weight: 780; letter-spacing: -0.45px; margin-top: 2px; }

.money-hero {
  position: relative; overflow: hidden;
  padding: 16px; border-radius: var(--radius-lg); color: #fff;
  background:
    radial-gradient(360px 180px at 92% -30%, rgba(183, 155, 239, 0.6), transparent 65%),
    linear-gradient(150deg, #5a3385, #3c2064 62%, #2b1745);
  box-shadow: 0 16px 34px rgba(43, 23, 69, 0.22);
}
.money-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.66); font-weight: 650; }
.money-big { font-size: 29px; font-weight: 800; letter-spacing: -1.1px; margin-top: 5px; }
.money-split { display: grid; gap: 9px; margin-top: 15px; padding-top: 13px; border-top: 1px solid rgba(255, 255, 255, 0.16); }
.split-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.split-row .ic { width: 15px; height: 15px; opacity: 0.8; }
.split-amount { margin-left: auto; font-weight: 720; font-variant-numeric: tabular-nums; }
.split-label { color: rgba(255, 255, 255, 0.76); }

.stat-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat-tile { background: #fff; border-radius: var(--radius); padding: 13px; box-shadow: var(--shadow-sm); }
.stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--muted); font-weight: 650; }
.stat-value { font-size: 21px; font-weight: 800; letter-spacing: -0.7px; margin-top: 5px; font-variant-numeric: tabular-nums; }
.stat-sub { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.quick-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.quick-action {
  display: flex; flex-direction: column; align-items: flex-start; gap: 8px;
  padding: 13px; border-radius: var(--radius); text-align: left;
  background: #fff; box-shadow: var(--shadow-sm);
  font-size: 12.5px; font-weight: 680; letter-spacing: -0.1px;
}
.quick-action .qa-icon {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center;
  background: var(--purple-50); color: var(--purple-700);
}
.quick-action.primary { background: var(--purple-700); color: #fff; box-shadow: 0 12px 24px rgba(75, 42, 120, 0.24); }
.quick-action.primary .qa-icon { background: rgba(255, 255, 255, 0.18); color: #fff; }

.task { display: flex; align-items: flex-start; gap: 10px; padding: 11px 0; border-top: 1px solid var(--line); }
.task:first-of-type { border-top: none; padding-top: 2px; }
.task-check {
  width: 20px; height: 20px; flex: none; margin-top: 1px; border-radius: 7px;
  display: grid; place-items: center;
  box-shadow: inset 0 0 0 1.6px #d9d1e8; color: transparent; background: #fff;
}
.task-check .ic { width: 13px; height: 13px; }
.task.done .task-check { background: var(--green-bg); box-shadow: none; color: var(--green); }
.task.done .task-label { text-decoration: line-through; color: var(--muted); }
.task-label { font-size: 12.8px; font-weight: 620; line-height: 1.35; }
.task-meta { font-size: 10.5px; color: var(--muted); margin-top: 3px; }

.chart { display: flex; align-items: flex-end; gap: 6px; height: 92px; margin-top: 14px; }
.chart-bar {
  flex: 1; border-radius: 7px 7px 4px 4px;
  background: linear-gradient(180deg, #8f68d6, #653a9c);
  min-height: 8px; opacity: 0.9;
  transition: height 0.25s ease;
}
.chart-bar:last-child { background: linear-gradient(180deg, #a98bf0, #7c4dff); opacity: 1; }
.chart-labels { display: flex; gap: 6px; margin-top: 7px; }
.chart-labels span { flex: 1; text-align: center; font-size: 9px; color: var(--muted); font-weight: 600; }

/* ---------- payouts ---------- */
.balance-card { padding: 18px; border-radius: var(--radius-lg); color: #fff; background: linear-gradient(150deg, #5a3385, #3c2064 60%, #2b1745); box-shadow: 0 18px 36px rgba(43, 23, 69, 0.22); }
.balance-total { font-size: 33px; font-weight: 800; letter-spacing: -1.3px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.balance-rows { display: grid; gap: 8px; margin-top: 16px; }
.bal-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.bal-row .ic { width: 15px; height: 15px; opacity: 0.82; }
.bal-row .split-amount { font-weight: 700; }
.bar { height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.2); overflow: hidden; margin-top: 6px; }
.bar-fill { height: 100%; border-radius: 999px; background: #cdb4ff; }
.bar-fill.mid { background: #9ad6ff; }
.bar-fill.end { background: #9be7c4; }

.bank-card { display: flex; align-items: center; gap: 12px; }
.bank-logo {
  width: 42px; height: 42px; border-radius: 13px; flex: none;
  display: grid; place-items: center; background: var(--purple-50); color: var(--purple-700);
  font-size: 11px; font-weight: 800;
}
.history-row { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); }
.history-row:first-of-type { border-top: none; }
.history-icon { width: 34px; height: 34px; flex: none; border-radius: 11px; display: grid; place-items: center; background: var(--green-bg); color: var(--green); }
.history-main { font-size: 12.5px; font-weight: 650; }
.history-date { font-size: 10.5px; color: var(--muted); margin-top: 2px; }
.history-amount { margin-left: auto; text-align: right; font-size: 13px; font-weight: 740; font-variant-numeric: tabular-nums; }
.status-chip { font-size: 9.5px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: 0.04em; }

/* ---------- account ---------- */
.profile-card { display: flex; align-items: center; gap: 12px; }
.profile-card .avatar-lg { background: linear-gradient(150deg, var(--purple-100), #dcc9ff); color: var(--purple-700); }
.profile-name { font-size: 16px; font-weight: 760; letter-spacing: -0.3px; }
.profile-meta { font-size: 11.5px; color: var(--muted); margin-top: 3px; }

.progress { height: 7px; border-radius: 999px; background: var(--purple-100); overflow: hidden; }
.progress-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7c4dff, #653a9c); }

.check-item { display: flex; align-items: center; gap: 11px; padding: 11px 0; border-top: 1px solid var(--line); width: 100%; text-align: left; }
.check-item:first-of-type { border-top: none; }
.check-mark {
  width: 26px; height: 26px; flex: none; border-radius: 9px;
  display: grid; place-items: center; background: var(--green-bg); color: var(--green);
}
.check-mark.todo { background: var(--purple-50); color: var(--purple-500); box-shadow: inset 0 0 0 1.5px var(--purple-100); }
.check-mark .ic { width: 14px; height: 14px; }
.check-label { font-size: 12.8px; font-weight: 640; }
.check-detail { font-size: 10.5px; color: var(--muted); margin-top: 2px; }

.plan-card {
  position: relative; overflow: hidden;
  padding: 16px; border-radius: var(--radius-lg); color: #fff;
  background: linear-gradient(140deg, #653a9c, #4b2a78 55%, #2b1745);
  box-shadow: 0 16px 32px rgba(43, 23, 69, 0.2);
}
.plan-badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.24);
  font-size: 10px; font-weight: 750; text-transform: uppercase; letter-spacing: 0.06em;
}
.plan-title { font-size: 17px; font-weight: 780; letter-spacing: -0.35px; margin-top: 9px; }
.plan-note { font-size: 11.5px; color: rgba(255, 255, 255, 0.74); margin-top: 3px; line-height: 1.5; }
.plan-features { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.plan-feature { font-size: 10.5px; font-weight: 600; padding: 4px 8px; border-radius: 7px; background: rgba(255, 255, 255, 0.13); }

.referral { border: 1px dashed #d7c9f0; background: linear-gradient(160deg, #fbf8ff, #f4ecff); }
.ref-code {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin-top: 12px; padding: 11px 13px; border-radius: 12px;
  background: #fff; box-shadow: inset 0 0 0 1.2px var(--line);
  font-size: 14px; font-weight: 780; letter-spacing: 0.12em;
}

/* ---------- sheets, toast ---------- */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60;
  display: flex; align-items: flex-end; justify-content: center;
  background: rgba(24, 12, 40, 0.44);
  backdrop-filter: blur(3px);
  animation: fade 0.16s ease;
}
.sheet {
  width: 100%; max-width: 480px;
  background: #fff; border-radius: 22px 22px 0 0;
  padding: 10px 18px calc(20px + env(safe-area-inset-bottom));
  box-shadow: 0 -14px 40px rgba(24, 12, 40, 0.2);
  animation: slide 0.22s cubic-bezier(0.22, 1, 0.36, 1);
}
.sheet-handle { width: 38px; height: 4px; border-radius: 999px; background: #e3dcf0; margin: 0 auto 14px; }
.sheet-title { font-size: 16px; font-weight: 760; letter-spacing: -0.3px; }
.sheet-body { margin-top: 12px; }
.sheet-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 9px 0; font-size: 12.8px; border-top: 1px solid var(--line); }
.sheet-row:first-child { border-top: none; }
.sheet-total { font-size: 15px; font-weight: 780; }
.sheet-note { font-size: 11px; color: var(--muted); line-height: 1.5; margin-top: 10px; }
textarea {
  width: 100%; min-height: 92px; resize: none; padding: 12px;
  border-radius: 13px; border: none; outline: none; background: var(--purple-50);
  font-size: 13px; line-height: 1.5; margin-top: 10px;
}
textarea::placeholder { color: #a79dba; }

.toast {
  position: fixed; left: 50%; bottom: calc(var(--nav-h) + 16px); z-index: 80;
  transform: translate(-50%, 12px);
  display: flex; align-items: center; gap: 8px;
  max-width: min(420px, calc(100vw - 32px));
  padding: 11px 15px; border-radius: 13px;
  background: #241334; color: #fff;
  font-size: 12.5px; font-weight: 600; line-height: 1.35;
  box-shadow: 0 16px 34px rgba(24, 12, 40, 0.3);
  opacity: 0; pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast .ic { color: #9be7c4; width: 16px; height: 16px; }

/* ---------- bottom nav ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
  max-width: 480px; margin: 0 auto;
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 7px 6px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(16px);
  border-top: 1px solid var(--line);
  box-shadow: 0 -6px 24px rgba(43, 23, 69, 0.06);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 6px 2px 4px; border-radius: 12px;
  font-size: 9.5px; font-weight: 650; letter-spacing: 0.01em;
  color: #8d82a2;
  transition: color 0.15s ease, background 0.15s ease;
}
.tab .ic { width: 21px; height: 21px; }
.tab.active { color: var(--purple-700); background: var(--purple-50); }

@media (min-width: 520px) {
  body { padding: 0; }
  .app { min-height: 100vh; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001s !important; transition-duration: 0.001s !important; }
}

@keyframes slide { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }

/* ---------- assisted listing (WhatsApp) ---------- */
.btn-wa { background: #128c4a; color: #fff; box-shadow: 0 8px 18px rgba(18, 140, 74, 0.2); }
.btn-wa:active { box-shadow: 0 4px 12px rgba(18, 140, 74, 0.2); }

.list-card { display: flex; flex-direction: column; gap: 8px; padding: 15px; }
.list-icon {
  width: 38px; height: 38px; border-radius: 13px;
  display: grid; place-items: center;
  background: var(--purple-50); color: var(--purple-700);
}
.list-card .btn { margin-top: 4px; }
.list-steps { list-style: none; padding: 0; margin: 10px 0 0; display: grid; gap: 9px; }
.list-steps li { display: flex; gap: 8px; font-size: 12.5px; color: var(--ink-soft); line-height: 1.5; }
.list-steps b {
  flex: none; width: 19px; height: 19px; margin-top: 1px; border-radius: 50%;
  display: grid; place-items: center; font-size: 10.5px; font-weight: 750;
  background: var(--purple-50); color: var(--purple-700);
}
.support-card .card-title { font-size: 13.5px; font-weight: 730; letter-spacing: -0.15px; }
