/* ============================================================
   Profile pages (staking, promo, referral, settings, security,
   verification, API): one component set on the same tokens as the
   rest of the redesigned exchange (mobile-chrome.css, new-design/).
   ============================================================ */
:root {
  --mp-bg: #070B11;
  --mp-card: #11161E;
  --mp-raised: #161C25;
  --mp-inset: #0C1117;
  --mp-line: #1E2632;
  --mp-text: #EAECEF;
  --mp-soft: #B7BDC6;
  --mp-muted: #858C97;
  --mp-dim: #5B6472;
  --mp-green: #18BB59;
  --mp-green-hi: #20CA63;
  --mp-on-green: #05130A;
  --mp-red: #EB4536;
  --mp-amber: #E8B23A;
  --mp-blue: #4FA3F7;
}

.mp { color: var(--mp-text); background: var(--mp-bg); font-family: 'Roboto', Helvetica, Arial, sans-serif; padding: 0 16px 32px; min-height: calc(100vh - 122px); }
.mp *, .mp-sheet * { box-sizing: border-box; }
/* Components set their own display, which would otherwise override the hidden attribute. */
.mp [hidden], .mp-sheet [hidden] { display: none !important; }
.mp a { color: inherit; text-decoration: none; }
.mp button { font-family: inherit; }

/* ---------- Page header ---------- */
.mp-head { display: flex; align-items: center; height: 52px; margin: 0 -4px; }
.mp-head__back { width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; border-radius: 12px; color: var(--mp-text);
  background: none; border: 0; padding: 0; cursor: pointer; flex: none; }
.mp-head__back .mdi { font-size: 24px; }
.mp-head__back:active { background: var(--mp-card); }
.mp-head__title { flex: 1; text-align: center; font-size: 16px; font-weight: 700; margin-right: 40px; }

/* ---------- Hero ---------- */
.mp-hero { position: relative; overflow: hidden; border-radius: 20px; padding: 20px; margin-top: 6px;
  background: radial-gradient(120% 140% at 100% 0%, color-mix(in srgb, var(--tint, #18BB59) 22%, transparent) 0%, transparent 55%), var(--mp-card);
  border: 1px solid var(--mp-line); }
.mp-hero__icon { width: 48px; height: 48px; border-radius: 14px; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--tint, #18BB59) 16%, #0A0F15); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--tint, #18BB59) 32%, transparent); }
.mp-hero__icon .mdi { font-size: 26px; color: var(--tint, #18BB59); }
.mp-hero__title { font-size: 21px; font-weight: 700; line-height: 1.25; margin-top: 14px; }
.mp-hero__text { font-size: 13px; color: var(--mp-muted); line-height: 1.5; margin-top: 6px; }

/* ---------- Sections and cards ---------- */
.mp-sec { display: flex; align-items: center; gap: 8px; margin: 26px 2px 10px; font-size: 15px; font-weight: 700; }
.mp-sec small { margin-left: auto; font-size: 12px; font-weight: 500; color: var(--mp-muted); }
.mp-card { background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 16px; padding: 16px; }
.mp-card + .mp-card { margin-top: 10px; }
.mp-card__title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.mp-card__text { font-size: 13px; color: var(--mp-muted); line-height: 1.5; margin-top: 6px; }
.mp-divider { height: 1px; background: var(--mp-line); margin: 16px -16px; }

/* ---------- List rows ---------- */
.mp-list { background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 16px; overflow: hidden; }
.mp-item { display: flex; align-items: center; gap: 12px; padding: 14px 14px; width: 100%; background: none; border: 0; color: var(--mp-text); text-align: left; cursor: pointer; }
.mp-item + .mp-item { border-top: 1px solid var(--mp-line); }
.mp-item:active { background: var(--mp-raised); }
.mp-item__icon { width: 38px; height: 38px; border-radius: 11px; flex: none; display: flex; align-items: center; justify-content: center; background: #141A22; }
.mp-item__icon .mdi { font-size: 20px; color: var(--mp-green); }
.mp-item__body { flex: 1; min-width: 0; }
.mp-item__title { font-size: 14.5px; font-weight: 500; }
.mp-item__sub { font-size: 12px; color: var(--mp-muted); margin-top: 2px; line-height: 1.4;
  display: -webkit-box !important; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mp-item__end { display: flex; align-items: center; gap: 6px; flex: none; }
.mp-item__end > .mdi { font-size: 20px; color: var(--mp-dim); }

/* ---------- Badges ---------- */
.mp-badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 9px; border-radius: 999px; font-size: 11.5px; font-weight: 700; white-space: nowrap;
  color: var(--mp-soft); background: #1A212B; }
.mp-badge .mdi { font-size: 13px; }
.mp-badge--ok { color: var(--mp-green); background: rgba(24,187,89,.12); }
.mp-badge--warn { color: var(--mp-amber); background: rgba(232,178,58,.12); }
.mp-badge--off { color: var(--mp-red); background: rgba(235,69,54,.12); }
.mp-badge--info { color: var(--mp-blue); background: rgba(79,163,247,.12); }

/* ---------- Key/value rows ---------- */
.mp-kv { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 9px 0; font-size: 13px; }
.mp-kv + .mp-kv { border-top: 1px dashed #1A212B; }
.mp-kv dt, .mp-kv > span:first-child { color: var(--mp-muted); flex: none; }
.mp-kv dd, .mp-kv > span:last-child { margin: 0; text-align: right; color: var(--mp-text); font-weight: 500; overflow-wrap: anywhere; min-width: 0; }

/* ---------- Form fields ---------- */
.mp-field { position: relative; display: block; margin-top: 12px; }
.mp-field__label { display: block; font-size: 12px; color: var(--mp-muted); margin: 0 2px 6px; }
.mp-input { width: 100%; height: 50px; border-radius: 12px; border: 1px solid var(--mp-line); background: var(--mp-inset); color: var(--mp-text);
  font: 500 15px 'Roboto', Helvetica, Arial, sans-serif; padding: 0 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
.mp-input::placeholder { color: var(--mp-dim); font-weight: 400; }
.mp-input:focus { border-color: var(--mp-green); box-shadow: 0 0 0 3px rgba(24,187,89,.14); }
.mp-input.is-bad { border-color: var(--mp-red); box-shadow: 0 0 0 3px rgba(235,69,54,.12); }
.mp-input--mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: .5px; }
.mp-input--code { text-align: center; font-size: 22px; letter-spacing: 8px; font-weight: 700; }
.mp-field--eye .mp-input { padding-right: 48px; }
.mp-eye { position: absolute; right: 4px; bottom: 4px; width: 42px; height: 42px; border: 0; background: none; color: var(--mp-muted); cursor: pointer; border-radius: 10px; }
.mp-eye .mdi { font-size: 20px; }
.mp-hint { font-size: 12px; color: var(--mp-muted); margin: 6px 2px 0; }
.mp-hint--bad { color: var(--mp-red); }

/* ---------- Buttons ---------- */
.mp-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; width: 100%; height: 50px; margin-top: 16px; border: 0; border-radius: 999px; cursor: pointer;
  background: var(--mp-green); color: var(--mp-on-green); font: 700 15px 'Roboto', Helvetica, Arial, sans-serif; transition: background .15s, transform .1s, opacity .15s; }
.mp-btn:active { transform: scale(.985); }
.mp-btn:hover { background: var(--mp-green-hi); }
.mp-btn .mdi { font-size: 19px; }
.mp-btn:disabled, .mp-btn.is-busy { opacity: .55; cursor: default; }
.mp-btn.is-busy::after { content: ""; width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: mp-spin .7s linear infinite; }
@keyframes mp-spin { to { transform: rotate(360deg); } }
.mp-btn--ghost { background: transparent; color: var(--mp-text); border: 1px solid var(--mp-line); }
.mp-btn--ghost:hover { background: var(--mp-raised); }
.mp-btn--danger { background: rgba(235,69,54,.12); color: #F07167; border: 1px solid rgba(235,69,54,.3); }
.mp-btn--danger:hover { background: rgba(235,69,54,.2); }
.mp-btn--sm { width: auto; height: 36px; padding: 0 16px; margin-top: 0; font-size: 13px; }
.mp-btn-row { display: flex; gap: 10px; }
.mp-btn-row .mp-btn { flex: 1; }
.mp-link { color: var(--mp-green) !important; font-weight: 700; }

/* ---------- Copy field ---------- */
.mp-copy { display: flex; align-items: center; gap: 10px; background: var(--mp-inset); border: 1px solid var(--mp-line); border-radius: 12px; padding: 12px 12px 12px 14px; }
.mp-copy + .mp-copy { margin-top: 10px; }
.mp-copy__body { flex: 1; min-width: 0; }
.mp-copy__label { font-size: 11px; color: var(--mp-muted); }
.mp-copy__value { font-size: 13.5px; font-weight: 500; margin-top: 3px; overflow-wrap: anywhere; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.mp-copy__btn { flex: none; width: 38px; height: 38px; border-radius: 10px; border: 0; cursor: pointer; background: rgba(24,187,89,.12); color: var(--mp-green); }
.mp-copy__btn .mdi { font-size: 18px; }

/* ---------- Steps ---------- */
.mp-steps { counter-reset: mp-step; list-style: none; margin: 0; padding: 0; }
.mp-steps > li { position: relative; display: flex; gap: 12px; padding-bottom: 16px; }
.mp-steps > li:last-child { padding-bottom: 0; }
.mp-steps > li::before { counter-increment: mp-step; content: counter(mp-step); flex: none; width: 26px; height: 26px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 700; color: var(--mp-green); background: rgba(24,187,89,.12); position: relative; z-index: 1; }
.mp-steps > li:not(:last-child)::after { content: ""; position: absolute; left: 12.5px; top: 28px; bottom: 2px; width: 1px; background: var(--mp-line); }
.mp-steps b { display: block; font-size: 14px; font-weight: 700; margin-top: 3px; }
.mp-steps p { margin: 4px 0 0; font-size: 12.5px; color: var(--mp-muted); line-height: 1.5; }

/* ---------- Bullet list ---------- */
.mp-bullets { list-style: none; margin: 12px 0 0; padding: 0; }
.mp-bullets li { position: relative; padding-left: 20px; font-size: 13px; color: var(--mp-soft); line-height: 1.5; }
.mp-bullets li + li { margin-top: 8px; }
.mp-bullets li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 6px; height: 6px; border-radius: 50%; background: var(--mp-green); }
.mp-bullets li.is-warn { color: #E8C27A; }
.mp-bullets li.is-warn::before { background: var(--mp-amber); }

/* ---------- Callout ---------- */
.mp-callout { display: flex; gap: 12px; align-items: flex-start; border-radius: 14px; padding: 13px 14px; font-size: 13px; line-height: 1.5;
  background: rgba(232,178,58,.08); border: 1px solid rgba(232,178,58,.26); color: #E8C27A; }
.mp-callout .mdi { font-size: 20px; flex: none; margin-top: -1px; }
.mp-callout--ok { background: rgba(24,187,89,.08); border-color: rgba(24,187,89,.28); color: #7FD9A2; }
.mp-callout--bad { background: rgba(235,69,54,.08); border-color: rgba(235,69,54,.28); color: #F3928B; }
.mp-callout--info { background: rgba(79,163,247,.08); border-color: rgba(79,163,247,.26); color: #9CC8F7; }
.mp-callout a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Checkbox chips ---------- */
.mp-chips { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 12px; }
.mp-chip { position: relative; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; cursor: pointer; user-select: none;
  background: var(--mp-inset); border: 1px solid var(--mp-line); font-size: 13.5px; font-weight: 500; transition: border-color .15s, background .15s; }
.mp-chip input { position: absolute; opacity: 0; pointer-events: none; }
.mp-chip__box { width: 18px; height: 18px; border-radius: 5px; border: 1.5px solid #3C4351; flex: none; display: flex; align-items: center; justify-content: center; }
.mp-chip__box .mdi { font-size: 13px; color: var(--mp-on-green); opacity: 0; }
.mp-chip:has(input:checked) { border-color: rgba(24,187,89,.55); background: rgba(24,187,89,.07); }
.mp-chip input:checked + .mp-chip__box { background: var(--mp-green); border-color: var(--mp-green); }
.mp-chip input:checked + .mp-chip__box .mdi { opacity: 1; }
.mp-chip input:focus-visible + .mp-chip__box { outline: 2px solid var(--mp-green); outline-offset: 2px; }

/* ---------- Segmented control ---------- */
.mp-seg { display: flex; gap: 4px; padding: 4px; background: var(--mp-card); border: 1px solid var(--mp-line); border-radius: 13px; }
.mp-seg button { flex: 1; height: 36px; border: 0; border-radius: 9px; background: none; color: var(--mp-muted); font: 500 13px 'Roboto', Helvetica, Arial, sans-serif; cursor: pointer; }
.mp-seg button.active { background: #1E2632; color: var(--mp-text); font-weight: 700; }

/* ---------- Empty state ---------- */
.mp-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 30px 16px; color: var(--mp-muted); font-size: 13px; }
.mp-empty__icon { width: 54px; height: 54px; border-radius: 50%; background: var(--mp-raised); display: flex; align-items: center; justify-content: center; margin-bottom: 10px; }
.mp-empty__icon .mdi { font-size: 26px; color: var(--mp-dim); }

/* ---------- Meter (security level) ---------- */
.mp-meter { display: flex; gap: 6px; margin-top: 14px; }
.mp-meter i { flex: 1; height: 6px; border-radius: 999px; background: #1E2632; }
.mp-meter.lvl-1 i:nth-child(-n+1) { background: var(--mp-red); }
.mp-meter.lvl-2 i:nth-child(-n+2) { background: var(--mp-amber); }
.mp-meter.lvl-3 i { background: var(--mp-green); }

/* ---------- Pager ---------- */
.mp-pager { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; font-size: 12.5px; color: var(--mp-muted); }

/* ---------- Bottom sheet ---------- */
.mp-sheet { position: fixed; inset: 0; z-index: 1300; display: none; background: rgba(2,4,7,.62); color: var(--mp-text); font-family: 'Roboto', Helvetica, Arial, sans-serif; }
.mp-sheet.open { display: flex; align-items: flex-end; justify-content: center; }
.mp-sheet__panel { position: relative; width: 100%; max-height: 88vh; overflow-y: auto; background: #0D1219; border-top: 1px solid var(--mp-line); border-radius: 22px 22px 0 0;
  padding: 6px 18px calc(22px + env(safe-area-inset-bottom, 0px)); animation: mp-sheet-in .22s cubic-bezier(.2,.8,.2,1); }
@keyframes mp-sheet-in { from { transform: translateY(36px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .mp-sheet__panel { animation: none; } }
.mp-sheet__grab { width: 38px; height: 4px; border-radius: 999px; background: #2A3441; margin: 6px auto 12px; }
.mp-sheet__title { font-size: 17px; font-weight: 700; }
.mp-sheet__text { font-size: 13px; color: var(--mp-muted); line-height: 1.5; margin-top: 6px; }
.mp-sheet__icon { width: 56px; height: 56px; border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 6px auto 12px; background: rgba(24,187,89,.12); }
.mp-sheet__icon .mdi { font-size: 30px; color: var(--mp-green); }
.mp-sheet__icon--warn { background: rgba(232,178,58,.12); } .mp-sheet__icon--warn .mdi { color: var(--mp-amber); }
.mp-sheet__icon--bad { background: rgba(235,69,54,.12); } .mp-sheet__icon--bad .mdi { color: var(--mp-red); }
.mp-center { text-align: center; }

/* ---------- Coin icon ---------- */
.mp-coin { width: 36px; height: 36px; border-radius: 50%; flex: none; position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center;
  background: #1E2632; color: #fff; font-weight: 700; font-size: 15px; }
.mp-coin img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mp-num { font-variant-numeric: tabular-nums; }
.mp-up { color: var(--mp-green); } .mp-down { color: var(--mp-red); }
.mp-mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
