/* Member / vendor dashboard (phone first) */
body.mb { margin: 0; background: #f6f5fb; font-family: 'Inter', system-ui, sans-serif; color: #1d1a2e; }
.mb-auth { min-height: 100vh; }
.req { color: #c2334d; font-style: normal; }
.mb-app { max-width: 760px; margin: 0 auto; min-height: 100vh; padding-bottom: calc(76px + env(safe-area-inset-bottom)); }
.mb-top { display: flex; align-items: center; justify-content: space-between; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: #fff; border-bottom: 1px solid #e4e1ee; position: sticky; top: 0; z-index: 5; }
.mb-top img { height: 30px; }
.mb-meb { display: flex; align-items: center; gap: 8px; border: 0; background: none; font: inherit; font-weight: 600; font-size: 14px; color: #3a21a3; cursor: pointer; max-width: 60vw; }
.mb-meb span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-av { border-radius: 50%; object-fit: cover; flex: none; display: inline-block; }
.mb-av.ini { display: inline-grid; place-items: center; background: linear-gradient(150deg, #6d4cf0, #3a21a3); color: #fff; font-weight: 800; }
.mb-main { padding: 16px; }
.mb-h1 { margin: 4px 0 8px; font-size: 22px; color: #3a21a3; }
.mb-hello h1 { margin: 0; font-size: 22px; } .mb-hello p { margin: 4px 0 14px; color: #6d6a7c; font-size: 13.5px; }
.mb-card { background: #fff; border: 1px solid #e4e1ee; border-radius: 14px; padding: 16px; margin-bottom: 14px; }
.mb-card h2 { margin: 0 0 10px; font-size: 15px; }
.mb-score { background: linear-gradient(150deg, #4f35c9, #2a1690); color: #fff; border: 0; }
.mb-score .muted { color: rgba(255, 255, 255, .75) !important; }
.mb-score-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.mb-score .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; opacity: .8; }
.pts { display: block; font-size: 42px; font-weight: 800; line-height: 1.1; } .pts small { font-size: 15px; font-weight: 600; opacity: .8; }
.rank-b { text-align: center; font-size: 26px; font-weight: 800; } .rank-b small { display: block; font-size: 11px; font-weight: 500; opacity: .8; }
.bar { height: 8px; background: rgba(255, 255, 255, .2); border-radius: 99px; margin: 12px 0 6px; overflow: hidden; } .bar i { display: block; height: 100%; background: #f2cf5b; border-radius: 99px; }
.mb-break { list-style: none; padding: 0; margin: 10px 0; } .mb-break li { display: flex; justify-content: space-between; padding: 6px 0; border-bottom: 1px solid rgba(127, 127, 160, .2); font-size: 13.5px; }
.mb-score .btn { background: rgba(255, 255, 255, .15); border-color: rgba(255, 255, 255, .3); color: #fff; }
.lvl { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.lvl-p { background: #e8e4ff; color: #3a21a3; } .lvl-g { background: #fff3cd; color: #8a5a00; } .lvl-s { background: #eef0f3; color: #4b5563; } .lvl-b { background: #f8e8dc; color: #8b4a1d; }
.mb-award { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; padding: 8px 0; border-bottom: 1px solid #eeeaf7; } .mb-award span { color: #6d6a7c; font-size: 12px; } .mb-award em { width: 100%; color: #8a6d1d; font-size: 13px; }
.mb-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.mb-act { background: #fff; border: 1px solid #e4e1ee; border-radius: 14px; padding: 16px 12px; font: inherit; font-weight: 600; font-size: 14px; color: #3a21a3; text-align: left; cursor: pointer; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.mb-act span { font-size: 24px; }
.mb-money { display: grid; gap: 10px; margin-bottom: 12px; }
.mb-money div { background: #f6f4fd; border-radius: 10px; padding: 10px 12px; } .mb-money span { display: block; font-size: 12px; color: #6d6a7c; } .mb-money b { display: block; font-size: 19px; margin: 2px 0; } .mb-money small { color: #6d6a7c; font-size: 12px; }
.mb-list { list-style: none; padding: 0; margin: 0; background: #fff; border: 1px solid #e4e1ee; border-radius: 14px; }
.mb-list li { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; border-bottom: 1px solid #eeeaf7; } .mb-list li:last-child { border-bottom: 0; }
.mb-list small, .mb-lead small, .mb-person small, .mb-offer small { display: block; color: #6d6a7c; font-size: 12.5px; }
.mb-list li > span { text-align: right; flex: none; font-size: 13px; }
.mb-card .mb-list { border: 0; }
.mb-seg { display: flex; gap: 4px; background: #ece8f8; border-radius: 12px; padding: 4px; margin: 8px 0 14px; overflow-x: auto; }
.mb-seg button { flex: 1; border: 0; background: none; padding: 10px 8px; border-radius: 9px; font: inherit; font-size: 13px; font-weight: 600; color: #6d6a7c; white-space: nowrap; cursor: pointer; }
.mb-seg button.on { background: #fff; color: #3a21a3; box-shadow: 0 1px 3px rgba(29, 26, 46, .12); }
.mb-lead, .mb-person, .mb-offer { background: #fff; border: 1px solid #e4e1ee; border-radius: 14px; padding: 14px; margin-bottom: 10px; }
.mb-lead-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.mb-lead p { margin: 8px 0; font-size: 14px; } .mb-lead .ok { color: #127a3a; font-weight: 600; margin-top: 6px; }
.mb-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pill { display: inline-block; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; background: #eef0f3; color: #4b5563; }
.s-won, .s-joined, .s-approved, .s-attended { background: #e3f7ea; color: #127a3a; } .s-lost, .s-rejected { background: #fde7e7; color: #b42318; }
.s-contacted, .s-meeting, .s-pending, .s-invited { background: #fff3cd; color: #8a5a00; } .s-new { background: #e8e4ff; color: #3a21a3; }
.mb-person { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .mb-person > div:nth-child(2) { flex: 1; min-width: 160px; } .mb-person .mb-btns { margin: 0; }
.mb-offers { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.mb-offer { padding: 0; overflow: hidden; margin: 0; } .mb-offer > div:last-child { padding: 12px; }
.mb-offer img, .mb-noimg { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; display: block; }
.mb-noimg { display: grid; place-items: center; background: #f1eefb; color: #6d6a7c; font-size: 13px; text-align: center; padding: 10px; box-sizing: border-box; }
.mb-board { list-style: none; padding: 0; margin: 0; }
.mb-board li { display: grid; grid-template-columns: 34px 1fr auto 44px; align-items: center; gap: 10px; background: #fff; border: 1px solid #e4e1ee; border-radius: 12px; padding: 10px 12px; margin-bottom: 8px; }
.mb-board li.me { border-color: #3a21a3; background: #f6f4fd; } .mb-board li > b { text-align: right; font-size: 17px; }
.rk { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: #f1eefb; font-weight: 800; }
.rk.r1 { background: #f2cf5b; } .rk.r2 { background: #d9dde3; } .rk.r3 { background: #e7b48a; }
.mb-chap h1 { margin: 0; font-size: 19px; color: #3a21a3; } .mb-chap p { margin: 6px 0 0; font-size: 13.5px; }
.mb-search { width: 100%; box-sizing: border-box; border: 1px solid #e4e1ee; border-radius: 10px; padding: 12px; font: inherit; font-size: 16px; margin-bottom: 10px; }
.mb-full { width: 100%; margin-bottom: 12px; }
.mb-prof { display: flex; gap: 14px; align-items: center; } .mb-prof b { font-size: 17px; }
.chk { flex-direction: row !important; align-items: center; gap: 10px !important; font-size: 14px !important; }
.chk input { width: 20px; height: 20px; }
.mb-qr { display: flex; gap: 12px; align-items: center; padding: 10px 0; border-bottom: 1px solid #eeeaf7; }
.mb-qr img { width: 120px; height: 120px; image-rendering: pixelated; flex: none; } .mb-qr small { display: block; color: #6d6a7c; font-size: 12.5px; margin-bottom: 6px; }
.mb-qr input { width: 100%; box-sizing: border-box; border: 1px solid #e4e1ee; border-radius: 8px; padding: 8px; font-size: 12px; }
.muted { color: #6d6a7c; } .small { font-size: 12.5px; } .center { text-align: center; padding: 20px 0; }
.btn.wa { background: #1f9d55; border-color: #1f9d55; color: #fff; text-decoration: none; }
a.btn { text-decoration: none; display: inline-block; text-align: center; }
/* bottom tabs */
.mb-tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: #fff; border-top: 1px solid #e4e1ee; padding-bottom: env(safe-area-inset-bottom); box-shadow: 0 -4px 20px rgba(20, 10, 60, .06); }
.mb-tabs button { flex: 1; border: 0; background: none; padding: 8px 0 10px; display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 11px; font-weight: 600; color: #6d6a7c; cursor: pointer; }
.mb-tabs button span { font-size: 20px; } .mb-tabs button.on { color: #3a21a3; }
.mb-tabs .mb-plus span { width: 44px; height: 44px; margin-top: -20px; border-radius: 50%; background: #3a21a3; color: #fff; display: grid; place-items: center; font-size: 24px; box-shadow: 0 6px 16px rgba(58, 33, 163, .4); }
/* dialog */
.modal { position: fixed; inset: 0; z-index: 50; background: rgba(20, 14, 50, .45); display: flex; align-items: flex-end; justify-content: center; }
.modal[hidden] { display: none; }
.modal-card { background: #fff; width: 100%; max-width: 560px; max-height: 92vh; border-radius: 18px 18px 0 0; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #e4e1ee; } .modal-head h2 { margin: 0; font-size: 17px; color: #3a21a3; }
.modal-head .icon-btn { border: 0; background: #f1eefb; width: 38px; height: 38px; border-radius: 10px; font-size: 16px; cursor: pointer; }
.modal-body { padding: 14px 16px; overflow-y: auto; flex: 1; } .modal-foot { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #e4e1ee; }
.modal-foot .btn { flex: 1 1 auto; padding: 12px; font-size: 15px; }
@media (min-width: 700px) { .modal { align-items: center; } .modal-card { border-radius: 18px; } }
.toast { bottom: calc(86px + env(safe-area-inset-bottom)); }
/* statement */
.st-h { display: flex; gap: 12px; align-items: center; margin-bottom: 12px; } .st-h img { height: 30px; } .st-h small { display: block; color: #6d6a7c; font-size: 12px; }
.st-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 12px; } .st-sum div { background: #f6f4fd; border-radius: 10px; padding: 8px; } .st-sum span { display: block; font-size: 11px; color: #6d6a7c; } .st-sum .due { background: #3a21a3; color: #fff; } .st-sum .due span { color: rgba(255,255,255,.8); }
.st-t { width: 100%; border-collapse: collapse; font-size: 12.5px; } .st-t th, .st-t td { text-align: left; padding: 6px 4px; border-bottom: 1px solid #eeeaf7; vertical-align: top; } .st-t td small { display: block; color: #8a879a; }
.st h3 { font-size: 14px; margin: 16px 0 6px; color: #3a21a3; }
.print-area { display: none; }
@media print {
  body.mb > *:not(.print-area) { display: none !important; }
  .print-area { display: block !important; padding: 10mm; }
}
.mb-board li small, .mb-prof small, .mb-board li div b { display: block; }
.mb-board li small, .mb-prof small { color: #6d6a7c; font-size: 12.5px; font-weight: 500; }

/* Stats, graphs, learn, wallet */
.mb-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 14px; }
.mb-stats div { background: #fff; border: 1px solid #e4e1ee; border-radius: 12px; padding: 10px 8px; text-align: center; }
.mb-stats b { display: block; font-size: 19px; color: #3a21a3; } .mb-stats span { font-size: 11.5px; color: #6d6a7c; }
.mb-bars { display: flex; align-items: flex-end; gap: 8px; height: 110px; margin-top: 8px; }
.mb-bars div { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; height: 100%; font-size: 11px; color: #6d6a7c; }
.mb-bars i { display: block; width: 100%; max-width: 34px; background: #4f35c9; border-radius: 5px 5px 0 0; min-height: 2px; margin-bottom: 4px; }
.mb-bars em { font-style: normal; color: #1d1a2e; font-weight: 600; }
.mb-bell { position: relative; border: 0; background: none; font-size: 21px; cursor: pointer; padding: 4px 8px; }
.mb-bell b { position: absolute; top: -2px; right: 0; min-width: 17px; padding: 0 4px; border-radius: 9px; background: #c0392b; color: #fff; font-size: 11px; line-height: 17px; }
.mb-topr { display: flex; align-items: center; gap: 4px; min-width: 0; }
.mb-posters { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
.mb-posters img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 10px; display: block; }
.mb-poster b { display: block; font-size: 13px; margin: 6px 0; }
.mb-level { display: inline-block; font-size: 11.5px; font-weight: 600; background: #ece8f8; color: #3a21a3; padding: 2px 8px; border-radius: 9px; }
.mb-unseen { border-left: 3px solid #4f35c9; }
