/* ==========================================================================
   Sharely — Mobile H5 Styles
   Mobile-first, safe-area aware, light theme
   ========================================================================== */

:root {
  --primary: #4f46e5;
  --primary-dark: #4338ca;
  --primary-soft: #eef2ff;
  --primary-grad: linear-gradient(135deg, #6366f1 0%, #4f46e5 55%, #7c3aed 100%);
  --accent: #06b6d4;
  --accent-soft: #ecfeff;
  --success: #10b981;
  --success-soft: #ecfdf5;
  --warning: #f59e0b;
  --warning-soft: #fffbeb;
  --danger: #ef4444;
  --danger-soft: #fef2f2;
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --text: #151a2d;
  --text-2: #4b5563;
  --muted: #8a93a6;
  --border: #e9ecf3;
  --border-strong: #dce0ea;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 22px;
  --shadow-sm: 0 2px 8px rgba(24, 32, 64, .04);
  --shadow: 0 8px 28px rgba(30, 41, 84, .08);
  --shadow-lg: 0 18px 48px rgba(30, 41, 84, .14);
  --nav-h: 62px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

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

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

body {
  background: #e9ebf2;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "Noto Sans", Roboto, sans-serif;
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.device-shell {
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  box-shadow: 0 0 60px rgba(20, 25, 50, .10);
}

.app-root {
  min-height: 100vh;
  min-height: 100dvh;
  padding-bottom: calc(var(--nav-h) + var(--safe-b) + 8px);
}
.app-root.no-nav { padding-bottom: calc(var(--safe-b) + 16px); }

/* ---------- Top bar ---------- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 10px;
  height: calc(56px + var(--safe-t));
  padding: var(--safe-t) 16px 0;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.topbar--transparent {
  background: transparent;
  border-bottom-color: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}
.topbar__back {
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--surface);
  border: 1px solid var(--border);
  flex: none;
}
.topbar__back svg { width: 18px; height: 18px; }
.topbar__title { font-size: 16px; font-weight: 700; flex: 1; min-width: 0; }
.topbar__right { display: flex; align-items: center; gap: 8px; }

.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand__logo {
  width: 34px; height: 34px; border-radius: 11px;
  background: var(--primary-grad);
  display: grid; place-items: center;
  box-shadow: 0 5px 14px rgba(79, 70, 229, .32);
  flex: none;
}
.brand__logo svg { width: 19px; height: 19px; color: #fff; }
.brand__name { font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.brand__name span { color: var(--primary); }

.lang-pill {
  display: inline-flex; align-items: center; gap: 5px;
  height: 32px; padding: 0 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  font-size: 12px; font-weight: 700; color: var(--text-2);
  flex: none;
}
.lang-pill svg { width: 15px; height: 15px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  min-height: 44px; padding: 0 18px;
  border-radius: 12px;
  font-size: 14px; font-weight: 700;
  transition: transform .16s ease, opacity .16s ease, box-shadow .16s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(.97); }
.btn svg { width: 17px; height: 17px; flex: none; }
.btn--primary {
  background: var(--primary-grad); color: #fff;
  box-shadow: 0 8px 20px rgba(79, 70, 229, .26);
}
.btn--ghost { background: var(--surface); color: var(--primary); border: 1px solid var(--border-strong); }
.btn--soft { background: var(--primary-soft); color: var(--primary); }
.btn--onbrand { background: rgba(255,255,255,.18); color: #fff; border: 1px solid rgba(255,255,255,.45); backdrop-filter: blur(4px); }
.btn--onbrand:active { background: rgba(255,255,255,.3); }
.btn--block { width: 100%; }
.btn--sm { min-height: 36px; padding: 0 13px; font-size: 13px; border-radius: 10px; }
.btn[disabled] { opacity: .5; pointer-events: none; box-shadow: none; }

/* ---------- Home ---------- */
.hero {
  position: relative;
  overflow: hidden;
  padding: 30px 20px 26px;
  background: linear-gradient(160deg, #eef2ff 0%, #f5f3ff 48%, #ecfeff 100%);
  border-bottom-left-radius: 30px;
  border-bottom-right-radius: 30px;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; filter: blur(2px);
}
.hero::before { width: 210px; height: 210px; right: -90px; top: -80px; background: rgba(99, 102, 241, .14); }
.hero::after { width: 160px; height: 160px; left: -70px; bottom: -70px; background: rgba(6, 182, 212, .12); }
.hero > * { position: relative; z-index: 1; }

.badge {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px; border-radius: 999px;
  background: rgba(255, 255, 255, .8);
  border: 1px solid rgba(79, 70, 229, .16);
  color: var(--primary); font-size: 11px; font-weight: 700;
  box-shadow: var(--shadow-sm);
}
.badge__dot { width: 6px; height: 6px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, .15); }

.hero h1 {
  margin: 16px 0 10px;
  font-size: 30px; line-height: 1.25; letter-spacing: -.9px; font-weight: 800;
}
.hero h1 em {
  font-style: normal;
  background: var(--primary-grad);
  -webkit-background-clip: text; background-clip: text;
  color: transparent;
}
.hero p { margin: 0; color: var(--text-2); font-size: 14px; max-width: 330px; }
.hero__actions { display: flex; gap: 10px; margin-top: 20px; }
.hero__actions .btn { flex: 1; }

/* earnings preview card */
.preview-card {
  margin-top: 24px;
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: var(--radius-lg);
  padding: 16px;
  box-shadow: var(--shadow-lg);
  transform: rotate(-1deg);
}
.preview-card__top { display: flex; align-items: center; justify-content: space-between; }
.preview-card__label { font-size: 11px; color: var(--muted); font-weight: 600; }
.preview-card__value { font-size: 27px; font-weight: 800; letter-spacing: -.6px; margin-top: 2px; }
.preview-card__value small { font-size: 14px; color: var(--muted); font-weight: 600; }
.preview-card__chip {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 9px; border-radius: 999px;
  background: var(--success-soft); color: #059669; font-size: 11px; font-weight: 700;
}
.preview-card__chip svg { width: 12px; height: 12px; }
.preview-card__chart { display: flex; align-items: flex-end; gap: 5px; height: 62px; margin-top: 14px; }
.preview-card__chart i {
  flex: 1; border-radius: 5px 5px 2px 2px;
  background: linear-gradient(180deg, #a5b4fc, #6366f1);
  opacity: .45;
}
.preview-card__chart i.on { opacity: 1; background: linear-gradient(180deg, #818cf8, #4f46e5); }
.preview-card__foot {
  display: flex; justify-content: space-between;
  padding-top: 12px; margin-top: 10px; border-top: 1px dashed var(--border);
  font-size: 11px; color: var(--muted);
}
.preview-card__foot b { color: var(--text); font-weight: 700; }

.stats-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 8px; margin: 18px 16px 0;
}
.stat {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 13px 6px; text-align: center;
  box-shadow: var(--shadow-sm);
}
.stat b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.stat span { display: block; margin-top: 2px; font-size: 10.5px; color: var(--muted); }

.section { padding: 26px 16px 0; }
.section__head { text-align: center; margin-bottom: 17px; }
.section__kicker { font-size: 11px; font-weight: 800; color: var(--primary); letter-spacing: 1.2px; text-transform: uppercase; }
.section__title { margin: 5px 0 5px; font-size: 21px; font-weight: 800; letter-spacing: -.5px; }
.section__desc { margin: 0; font-size: 12.5px; color: var(--muted); }

.steps { position: relative; display: grid; gap: 10px; }
.steps::before {
  content: ""; position: absolute; left: 24px; top: 28px; bottom: 28px;
  width: 2px; background: repeating-linear-gradient(to bottom, var(--border-strong) 0 5px, transparent 5px 10px);
}
.step {
  display: flex; gap: 13px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px;
  box-shadow: var(--shadow-sm); position: relative;
}
.step__num {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary);
  font-size: 14px; font-weight: 800;
}
.step:nth-child(2) .step__num { background: var(--accent-soft); color: #0891b2; }
.step:nth-child(3) .step__num { background: var(--success-soft); color: #059669; }
.step h3 { margin: 1px 0 3px; font-size: 14.5px; font-weight: 700; }
.step p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.platform-strip { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.platform-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 8px 13px; border-radius: 999px;
  background: var(--surface); border: 1px solid var(--border);
  font-size: 12px; font-weight: 700; box-shadow: var(--shadow-sm);
}
.platform-chip i { width: 9px; height: 9px; border-radius: 3px; }

.feature-grid { display: grid; gap: 10px; }
.feature {
  display: flex; gap: 12px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px;
  box-shadow: var(--shadow-sm);
}
.feature__icon {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
}
.feature__icon svg { width: 19px; height: 19px; }
.feature h3 { margin: 1px 0 3px; font-size: 14px; font-weight: 700; }
.feature p { margin: 0; font-size: 12.5px; color: var(--muted); line-height: 1.5; }

.cta-banner {
  margin: 26px 16px 0; padding: 22px 18px;
  border-radius: var(--radius-lg);
  background: var(--primary-grad); color: #fff;
  text-align: center; position: relative; overflow: hidden;
  box-shadow: 0 14px 30px rgba(79, 70, 229, .28);
}
.cta-banner::after {
  content: ""; position: absolute; width: 180px; height: 180px; border-radius: 50%;
  background: rgba(255, 255, 255, .1); top: -100px; right: -60px;
}
.cta-banner h3 { margin: 0 0 5px; font-size: 19px; font-weight: 800; position: relative; }
.cta-banner p { margin: 0 0 15px; font-size: 12.5px; opacity: .85; position: relative; }
.cta-banner .btn { background: #fff; color: var(--primary); position: relative; }
.footer { text-align: center; padding: 24px 16px 10px; font-size: 11px; color: var(--muted); }

/* ---------- Auth ---------- */
.auth-hero {
  padding: 28px 20px 18px;
  background: linear-gradient(150deg, #eef2ff, #faf5ff 60%, #ecfeff);
  border-bottom-left-radius: 26px; border-bottom-right-radius: 26px;
}
.auth-hero__icon {
  width: 46px; height: 46px; border-radius: 15px;
  background: var(--primary-grad); color: #fff;
  display: grid; place-items: center; box-shadow: 0 8px 18px rgba(79, 70, 229, .28);
}
.auth-hero__icon svg { width: 23px; height: 23px; }
.auth-hero h1 { margin: 14px 0 5px; font-size: 25px; font-weight: 800; letter-spacing: -.6px; }
.auth-hero p { margin: 0; font-size: 13px; color: var(--text-2); }

.auth-form { padding: 20px 16px 30px; }
.field { margin-bottom: 14px; }
.field__label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 700; color: var(--text-2); }
.field__label .req { color: var(--danger); margin-left: 2px; }
.field__label .opt { color: var(--muted); font-weight: 500; font-size: 11px; margin-left: 4px; }
.input-wrap { position: relative; }
.input {
  width: 100%; height: 47px; padding: 0 13px;
  background: var(--surface); border: 1.5px solid var(--border-strong);
  border-radius: 12px; outline: none; font-size: 14px;
  transition: border-color .18s, box-shadow .18s;
}
.input::placeholder { color: #b4bbc9; }
.input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(79, 70, 229, .10); }
.input.is-error { border-color: var(--danger); }
.input--with-icon { padding-right: 42px; }
.input-icon {
  position: absolute; right: 11px; top: 50%; transform: translateY(-50%);
  width: 20px; height: 20px; color: var(--muted); cursor: pointer;
}
.field__error { display: none; margin-top: 5px; font-size: 11.5px; color: var(--danger); }
.field__error.show { display: block; }
.code-row { display: flex; gap: 8px; }
.code-row .input { flex: 1; min-width: 0; letter-spacing: 2px; font-weight: 700; }
.code-btn { width: 112px; min-height: 47px; flex: none; padding: 0 6px; font-size: 12.5px; }
.code-btn[disabled] { opacity: .6; }

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

.gender-row { display: flex; gap: 8px; flex-wrap: wrap; }
.seg {
  padding: 8px 13px; border-radius: 10px;
  background: var(--surface); border: 1.5px solid var(--border-strong);
  font-size: 12.5px; font-weight: 600; color: var(--text-2);
}
.seg.on { background: var(--primary-soft); border-color: var(--primary); color: var(--primary); }

.check-line { display: flex; align-items: flex-start; gap: 9px; margin: 4px 0 14px; }
.check-line input { display: none; }
.check-box {
  width: 19px; height: 19px; border-radius: 6px; flex: none; margin-top: 1px;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  display: grid; place-items: center; color: transparent;
}
.check-line input:checked + .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.check-box svg { width: 13px; height: 13px; }
.check-line__text { font-size: 12px; color: var(--text-2); line-height: 1.5; }
.check-line__text b { color: var(--text); font-weight: 700; }
.check-line__text small { display: block; color: var(--muted); font-size: 11px; }

.link { color: var(--primary); font-weight: 700; }
.auth-switch { text-align: center; margin-top: 18px; font-size: 13px; color: var(--text-2); }
.demo-tip {
  margin-top: 14px; padding: 10px 12px; border-radius: 10px;
  background: var(--warning-soft); border: 1px solid #fde68a;
  font-size: 11.5px; color: #92400e; line-height: 1.5;
}
.demo-tip b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

/* ---------- Slider captcha ---------- */
.captcha { margin: 6px 0 16px; }
.captcha-sheet__desc { margin: -4px 0 16px; color: var(--muted); font-size: 13px; line-height: 1.6; }
.captcha__track {
  position: relative; height: 48px; border-radius: 12px;
  background: linear-gradient(90deg, #eef2ff, #f8fafc);
  border: 1.5px dashed #c7d2fe; overflow: hidden;
  touch-action: none; user-select: none; -webkit-user-select: none;
}
.captcha__fill { position: absolute; inset: 0 auto 0 0; width: 0; background: rgba(79, 70, 229, .14); }
.captcha__text {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 12.5px; font-weight: 600; color: #7c83a0; pointer-events: none;
  letter-spacing: .3px;
}
.captcha__thumb {
  position: absolute; top: 4px; left: 4px; width: 40px; height: 38px;
  border-radius: 9px; background: var(--primary-grad); color: #fff;
  display: grid; place-items: center; box-shadow: 0 4px 12px rgba(79, 70, 229, .35);
  touch-action: none; z-index: 2;
}
.captcha__thumb svg { width: 20px; height: 20px; }
.captcha.ok .captcha__track { background: var(--success-soft); border-color: #6ee7b7; border-style: solid; }
.captcha.ok .captcha__fill { background: rgba(16, 185, 129, .16); width: 100% !important; }
.captcha.ok .captcha__text { color: #047857; }
.captcha.ok .captcha__thumb { background: linear-gradient(135deg, #34d399, #059669); left: auto !important; right: 4px; }
.captcha.shake { animation: shake .35s ease; }
@keyframes shake { 0%,100%{transform:translateX(0)} 25%{transform:translateX(-6px)} 75%{transform:translateX(6px)} }

/* ---------- Bottom nav ---------- */
.bottom-nav {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 40;
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: grid; grid-template-columns: repeat(5, 1fr);
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 600;
  position: relative;
}
.nav-item svg { width: 21px; height: 21px; stroke-width: 1.8; }
.nav-item.on { color: var(--primary); }
.nav-item.on::before {
  content: ""; position: absolute; top: 0; width: 22px; height: 3px;
  border-radius: 0 0 3px 3px; background: var(--primary);
}
.nav-item__dot {
  position: absolute; top: 8px; right: calc(50% - 17px);
  width: 7px; height: 7px; border-radius: 50%; background: var(--danger);
  border: 1.5px solid #fff;
}

/* ---------- Page content ---------- */
.page { padding: 16px 16px 24px; }
.page__head { margin-bottom: 16px; }
.page__title { margin: 0; font-size: 22px; font-weight: 800; letter-spacing: -.5px; }
.page__desc { margin: 3px 0 0; font-size: 12.5px; color: var(--muted); }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 15px;
  box-shadow: var(--shadow-sm);
}
.card + .card { margin-top: 11px; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.card__title { font-size: 14.5px; font-weight: 700; }

/* account card */
.account-card { position: relative; overflow: hidden; }
.account-card__head { display: flex; align-items: center; gap: 10px; }
.platform-badge {
  width: 38px; height: 38px; border-radius: 11px; flex: none;
  display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 800;
}
.account-card__name { font-size: 14.5px; font-weight: 700; margin: 0; }
.account-card__meta { font-size: 11.5px; color: var(--muted); margin: 1px 0 0; }
.status {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 9px; border-radius: 999px;
  font-size: 10.5px; font-weight: 700; white-space: nowrap;
}
.status::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status--active { background: var(--success-soft); color: #059669; }
.status--review { background: var(--warning-soft); color: #d97706; }
.status--expired { background: var(--danger-soft); color: #dc2626; }

.account-card__grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px;
  margin-top: 13px; padding-top: 12px; border-top: 1px dashed var(--border);
}
.kv span { display: block; font-size: 10.5px; color: var(--muted); }
.kv b { display: block; font-size: 13px; font-weight: 700; margin-top: 1px; word-break: break-all; }
.kv b.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; }
.kv b.money { color: var(--success); }
.account-card__foot { display: flex; gap: 8px; margin-top: 12px; }
.account-card__foot .btn { flex: 1; }

/* Balance hero */
.balance-card {
  background: var(--primary-grad); color: #fff; border: 0;
  border-radius: var(--radius-lg); padding: 20px;
  box-shadow: 0 14px 30px rgba(79, 70, 229, .26);
  position: relative; overflow: hidden;
}
.balance-card::after {
  content: ""; position: absolute; width: 170px; height: 170px; border-radius: 50%;
  background: rgba(255, 255, 255, .09); right: -70px; top: -70px;
}
.balance-card__label { font-size: 12px; opacity: .8; font-weight: 600; }
.balance-card__value { font-size: 34px; font-weight: 800; letter-spacing: -1px; line-height: 1.2; margin-top: 4px; }
.balance-card__value small { font-size: 17px; opacity: .85; }
.balance-card__row { display: flex; gap: 24px; margin-top: 16px; position: relative; }
.balance-card__row div span { display: block; font-size: 10.5px; opacity: .75; }
.balance-card__row div b { display: block; font-size: 14px; font-weight: 700; margin-top: 1px; }

.address-nets { display: flex; gap: 8px; margin-bottom: 12px; }
.address-nets .seg { flex: 1; text-align: center; padding: 10px 6px; }
.record {
  display: flex; align-items: center; gap: 11px;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.record:last-child { border-bottom: 0; padding-bottom: 0; }
.record__icon {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: var(--success-soft); color: #059669; display: grid; place-items: center;
}
.record__icon svg { width: 17px; height: 17px; }
.record__main { flex: 1; min-width: 0; }
.record__main b { display: block; font-size: 13px; font-weight: 700; }
.record__main span { display: block; font-size: 11px; color: var(--muted); }
.record__amt { text-align: right; font-size: 14px; font-weight: 800; color: var(--success); white-space: nowrap; }
.record__amt small { display: block; font-size: 10px; color: var(--muted); font-weight: 500; }

/* Messages */
.msg-item {
  display: flex; gap: 11px; padding: 14px 0; border-bottom: 1px solid var(--border);
}
.msg-item:last-child { border-bottom: 0; }
.msg-item__icon {
  width: 38px; height: 38px; border-radius: 12px; flex: none; display: grid; place-items: center;
}
.msg-item__icon svg { width: 18px; height: 18px; }
.msg-item__main { flex: 1; min-width: 0; }
.msg-item__top { display: flex; align-items: center; gap: 6px; }
.msg-item__top b { font-size: 13.5px; font-weight: 700; flex: 1; }
.msg-item__body { font-size: 12px; color: var(--muted); margin-top: 3px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msg-item__time { font-size: 10.5px; color: var(--muted); margin-top: 5px; }
.unread-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--danger); flex: none; }

/* Profile */
.profile-head {
  display: flex; align-items: center; gap: 13px;
  padding: 18px; border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff;
  box-shadow: 0 12px 26px rgba(79, 70, 229, .24);
}
.profile-head__avatar {
  width: 52px; height: 52px; border-radius: 17px; flex: none;
  background: rgba(255, 255, 255, .2); display: grid; place-items: center;
  font-size: 21px; font-weight: 800;
}
.profile-head h2 { margin: 0; font-size: 18px; font-weight: 800; }
.profile-head p { margin: 3px 0 0; font-size: 11.5px; opacity: .8; }
.profile-head__tag {
  padding: 3px 8px; border-radius: 999px; background: rgba(255, 255, 255, .2);
  font-size: 10px; font-weight: 700; display: inline-block; margin-top: 7px;
}
.list-card { padding: 0 15px; }
.list-row {
  display: flex; align-items: center; gap: 11px;
  padding: 14px 0; border-bottom: 1px solid var(--border);
}
.list-row:last-child { border-bottom: 0; }
.list-row__icon {
  width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center;
  background: var(--primary-soft); color: var(--primary); flex: none;
}
.list-row__icon svg { width: 17px; height: 17px; }
.list-row__label { flex: 1; font-size: 13.5px; font-weight: 600; }
.list-row__value { font-size: 12px; color: var(--muted); }
.list-row__chevron { width: 16px; height: 16px; color: var(--muted); }

/* Empty */
.empty { text-align: center; padding: 44px 20px; }
.empty__icon {
  width: 68px; height: 68px; border-radius: 22px; margin: 0 auto 14px;
  background: var(--primary-soft); color: var(--primary); display: grid; place-items: center;
}
.empty__icon svg { width: 30px; height: 30px; }
.empty h3 { margin: 0 0 5px; font-size: 15px; font-weight: 700; }
.empty p { margin: 0 0 17px; font-size: 12.5px; color: var(--muted); }

/* Floating support */
.support-fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px);
  width: 48px; height: 48px; border-radius: 16px; z-index: 35;
  background: var(--primary-grad); color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 20px rgba(79, 70, 229, .36);
}
.support-fab svg { width: 23px; height: 23px; }

/* ---------- Bottom sheet ---------- */
.sheet-root { position: fixed; inset: 0; z-index: 100; pointer-events: none; }
.sheet-mask {
  position: absolute; inset: 0; background: rgba(15, 20, 40, .42);
  opacity: 0; transition: opacity .22s; pointer-events: auto;
}
.sheet {
  position: absolute; left: 50%; bottom: 0; transform: translate(-50%, 100%);
  width: 100%; max-width: 480px;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  max-height: 86vh; max-height: 86dvh; overflow-y: auto;
  padding: 8px 18px calc(22px + var(--safe-b));
  transition: transform .28s cubic-bezier(.22, .8, .3, 1);
  pointer-events: auto;
  box-shadow: 0 -10px 40px rgba(15, 20, 40, .16);
}
.sheet-root.open .sheet-mask { opacity: 1; }
.sheet-root.open .sheet { transform: translate(-50%, 0); }
.sheet__handle { width: 38px; height: 4px; border-radius: 3px; background: var(--border-strong); margin: 4px auto 16px; }
.sheet__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.sheet__title { font-size: 18px; font-weight: 800; }
.sheet__close { width: 30px; height: 30px; border-radius: 9px; background: var(--surface-2); display: grid; place-items: center; color: var(--muted); }
.sheet__close svg { width: 16px; height: 16px; }
.select {
  width: 100%; height: 47px; padding: 0 34px 0 13px;
  border: 1.5px solid var(--border-strong); border-radius: 12px;
  background: var(--surface); outline: none; font-size: 14px;
  appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238a93a6' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center;
}
.select:focus { border-color: var(--primary); }
.hint { font-size: 11px; color: var(--muted); margin: -6px 0 14px; line-height: 1.5; }
.wd-status { font-weight: 700; }
.wd-status--pending { color: var(--warning); }
.wd-status--paid { color: var(--success); }
.wd-status--rejected { color: var(--danger); }
.wd-bal { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }
.wd-bal b { color: var(--primary); font-size: 15px; }
.wd-addr {
  display: flex; align-items: center; gap: 10px; padding: 12px;
  border: 1.5px solid var(--border-strong); border-radius: 12px;
  cursor: pointer; transition: border-color .15s, background .15s;
}
.wd-addr.on { border-color: var(--primary); background: var(--primary-soft); }
.wd-addr input { accent-color: var(--primary); width: 17px; height: 17px; }
.wd-addr__body { min-width: 0; flex: 1; }
.wd-addr__body b { display: block; font-size: 13px; }
.wd-addr__body small { display: block; color: var(--muted); font-size: 10.5px; word-break: break-all; margin-top: 2px; }
.wd-max { font-size: 12px; font-weight: 700; color: var(--primary); cursor: pointer; }

/* Message detail */
.msg-detail__meta { font-size: 11px; color: var(--muted); margin-bottom: 12px; }
.msg-detail__body { font-size: 13.5px; color: var(--text-2); line-height: 1.8; white-space: pre-wrap; }

/* ---------- Toast ---------- */
.toast-root {
  position: fixed; left: 50%; top: 76px; transform: translateX(-50%);
  z-index: 200; width: max-content; max-width: calc(100vw - 40px);
  pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 15px; border-radius: 12px;
  background: rgba(21, 26, 45, .94); color: #fff;
  font-size: 12.5px; font-weight: 600; line-height: 1.4;
  box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease;
}
.toast.out { animation: toastOut .22s ease forwards; }
.toast svg { width: 16px; height: 16px; flex: none; }
.toast--error { background: #b91c1c; }
.toast--success svg { color: #6ee7b7; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-10px) } to { opacity: 1; transform: translateY(0) } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-10px) } }

/* ---------- Language picker sheet ---------- */
.lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 9px; }
.lang-opt {
  display: flex; align-items: center; gap: 9px;
  padding: 12px; border-radius: 12px;
  border: 1.5px solid var(--border-strong); background: var(--surface);
  text-align: left; font-size: 13px; font-weight: 600;
}
.lang-opt.on { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }
.lang-opt__flag { font-size: 18px; }
.lang-opt small { display: block; color: var(--muted); font-size: 10px; font-weight: 500; }

/* ---------- Utility ---------- */
.hidden { display: none !important; }
.center { text-align: center; }
.mt-8 { margin-top: 8px; }
.mt-14 { margin-top: 14px; }
.muted { color: var(--muted); }

@media (min-width: 481px) {
  .device-shell { min-height: 100vh; }
  .support-fab { right: calc(50% - 224px); }
}

@media (max-width: 340px) {
  .hero h1 { font-size: 26px; }
  .hero__actions { flex-direction: column; }
  .balance-card__value { font-size: 29px; }
}
