:root {
  --bg: #05070d;
  --panel: rgba(255, 255, 255, 0.04);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef2fb;
  --muted: #94a0b8;
  --accent1: #6366f1;
  --accent2: #22d3ee;
  --gold: #f59e0b;
  --green: #22c55e;
  --red: #ef4444;
  --radius: 18px;
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* {
  box-sizing: border-box;
}

/* the hidden attribute must always win over class display rules —
   e.g. .subwallet-loading sets display:flex, which otherwise keeps
   "hidden" spinner elements on screen forever */
[hidden] {
  display: none !important;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(99, 102, 241, 0.5);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: #1c2537;
  border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
  background: #28344d;
}

/* ---- background FX ------------------------------------------------------- */

.orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(110px);
  opacity: 0.28;
  z-index: -2;
  animation: drift 26s ease-in-out infinite alternate;
}

.orb-1 {
  width: 520px;
  height: 520px;
  top: -160px;
  left: -140px;
  background: radial-gradient(circle, #4f46e5, transparent 65%);
}

.orb-2 {
  width: 460px;
  height: 460px;
  bottom: -140px;
  right: -120px;
  background: radial-gradient(circle, #0ea5b7, transparent 65%);
  animation-delay: -9s;
}

.orb-3 {
  width: 340px;
  height: 340px;
  top: 42%;
  left: 58%;
  background: radial-gradient(circle, #9333ea, transparent 65%);
  opacity: 0.18;
  animation-delay: -16s;
}

@keyframes drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(70px, 50px) scale(1.14); }
}

.grid-overlay {
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse at 50% 0%, black 25%, transparent 70%);
}

/* ---- top banner / nav ------------------------------------------------------- */

.app-nav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(6, 9, 17, 0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.app-nav-inner {
  max-width: 430px;
  margin: 0 auto;
  padding: 10px 0;
  display: flex;
  align-items: center;
  position: relative;
}

.app-nav-left {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-shrink: 1;
}

.app-nav-left a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  padding: 5px 10px;
  border-radius: 999px;
  transition: color 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}

.app-nav-left a:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
  text-decoration: none;
}

.app-nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  margin-left: -6px;
}

a.app-nav-brand {
  text-decoration: none;
  color: inherit;
}

.app-nav-brand .brand-text {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: 0.01em;
  background: linear-gradient(90deg, #83C9F7, #9B9DFB, #C095F4);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.app-nav-icons {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

.app-nav-icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px;
  border: none;
  border-radius: 10px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.15s ease, background 0.12s ease;
}

.app-nav-icon-btn:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.app-nav-icon-btn:disabled {
  opacity: 0.55;
  cursor: default;
}

.app-nav-icon-btn.spinning svg {
  animation: navspin 0.9s linear infinite;
}

@keyframes navspin {
  to { transform: rotate(360deg); }
}

main {
  max-width: 720px;
  margin: 48px auto 72px;
  padding: 0 16px;
  position: relative;
  z-index: 1;
}

main.wide {
  max-width: min(1920px, calc(100vw - 48px));
}

/* ---- cards ----------------------------------------------------------------- */

.card {
  background:
    linear-gradient(180deg, rgba(20, 27, 46, 0.9), rgba(11, 16, 29, 0.92)) padding-box,
    linear-gradient(140deg, rgba(99, 102, 241, 0.55), rgba(255, 255, 255, 0.06) 42%, rgba(34, 211, 238, 0.4)) border-box;
  border: 1px solid transparent;
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5);
  animation: rise 0.35s ease both;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.card.wide {
  max-width: 1280px;
  margin: 0 auto;
}

h1 {
  margin: 0 0 6px;
  font-size: 25px;
  letter-spacing: -0.02em;
  font-weight: 700;
}

h3 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

h1::after {
  content: "";
  display: block;
  width: 42px;
  height: 3px;
  margin-top: 10px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
}

.auth-card h1::after,
.backup-wrap h1::after,
.dash-head h1::after {
  display: none;
}

a {
  color: #7dd3fc;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.center {
  text-align: center;
}

.nowrap {
  white-space: nowrap;
}

/* ---- auth pages ------------------------------------------------------------- */

.auth-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: calc(100vh - 120px);
  min-height: calc(100svh - 120px);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  padding: 40px 36px;
}

.auth-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.auth-head .logo-ring {
  margin-bottom: 0;
  flex-shrink: 0;
}

.auth-head-text h1 {
  margin: 0 0 4px;
}

.auth-head-text p {
  margin: 0;
}

.logo-ring {
  width: 62px;
  height: 62px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background:
    linear-gradient(180deg, rgba(23, 30, 52, 0.95), rgba(12, 17, 31, 0.95)) padding-box,
    linear-gradient(135deg, var(--accent1), var(--accent2)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
}

.auth-card .muted.center {
  margin: 20px 0 0;
  font-size: 13.5px;
}

/* ---- forms ------------------------------------------------------------------- */

label {
  display: block;
  margin: 18px 0 0;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

input {
  width: 100%;
  padding: 12px 15px;
  margin-top: 7px;
  background: rgba(5, 8, 15, 0.75);
  border: 1px solid var(--border);
  border-radius: 11px;
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

input::placeholder {
  color: #525c72;
}

input:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.65);
  box-shadow: 0 0 0 3px rgba(34, 211, 238, 0.12);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  margin-top: 20px;
  border: none;
  border-radius: 11px;
  background: linear-gradient(135deg, #98a3fa, #010202);
  color: #fff;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.45);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, filter 0.12s ease;
  box-shadow: 0 10px 26px rgba(79, 70, 229, 0.4);
}

.btn:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
  box-shadow: 0 14px 32px rgba(34, 211, 238, 0.32);
  text-decoration: none;
}

.btn:active {
  transform: translateY(0);
}

.btn-block {
  width: 100%;
}

.btn-ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  box-shadow: none;
}

.btn-ghost:hover {
  border-color: rgba(34, 211, 238, 0.6);
  box-shadow: 0 8px 22px rgba(34, 211, 238, 0.15);
}

.btn-danger {
  background: linear-gradient(135deg, #b91c1c, #ea580c);
  box-shadow: 0 10px 26px rgba(220, 38, 38, 0.3);
}

.btn-small {
  padding: 8px 16px;
  margin-top: 0;
  font-size: 13px;
}

.row {
  display: flex;
  gap: 12px;
  margin-top: 20px;
  flex-wrap: wrap;
  align-items: center;
}

.row-mini {
  display: flex;
  gap: 6px;
  margin-top: 8px;
}

.mini {
  padding: 5px 11px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 11px;
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.mini:hover:not(:disabled) {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.08);
}

.mini.ok {
  color: var(--green);
  border-color: var(--green);
}

.mini.danger {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.55);
}

.mini.danger:hover:not(:disabled) {
  background: rgba(239, 68, 68, 0.1);
  border-color: #f87171;
}

.mini:disabled {
  opacity: 0.4;
  cursor: default;
}

/* ---- dashboard ---------------------------------------------------------------- */

.dash-head {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 24px;
}

.dash-head h1 {
  margin: 0;
  font-size: 26px;
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  flex-shrink: 0;
}

.avatar-lg {
  width: 54px;
  height: 54px;
  font-size: 18px;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

.phrase-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.chips {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(132px, 1fr));
  gap: 8px;
  margin: 16px 0 6px;
}

.chip {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 11px;
  border-radius: 11px;
  background: rgba(5, 8, 15, 0.7);
  border: 1px solid var(--border);
  font-family: var(--mono);
  font-size: 13.5px;
  transition: border-color 0.15s ease;
}

.chip:hover {
  border-color: rgba(99, 102, 241, 0.5);
}

.chip b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 21px;
  height: 21px;
  padding: 0 5px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  font-size: 11px;
  font-weight: 600;
  flex-shrink: 0;
}

.chip .w {
  letter-spacing: 0.02em;
  overflow: hidden;
  text-overflow: ellipsis;
}

.regen {
  margin-top: 24px;
  border-top: 1px dashed var(--border);
  padding-top: 16px;
}

.regen summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  list-style: none;
}

.regen summary::before {
  content: "+";
  display: inline-block;
  margin-right: 8px;
  color: var(--accent2);
  font-weight: 700;
}

.regen summary:hover {
  color: var(--text);
}

/* ---- pills / bars -------------------------------------------------------------- */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  white-space: nowrap;
}

.pill-green {
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
}

.pill-amber {
  color: #fbbf24;
  border-color: rgba(245, 158, 11, 0.45);
  background: rgba(245, 158, 11, 0.08);
}

.pill-gold {
  color: #fcd34d;
  border-color: rgba(245, 158, 11, 0.55);
  background: rgba(245, 158, 11, 0.12);
}

.pill-muted {
  color: var(--muted);
}

.pill-red {
  color: #f87171;
  border-color: rgba(239, 68, 68, 0.4);
  background: rgba(239, 68, 68, 0.08);
}

.error-bar {
  margin-top: 16px;
  padding: 11px 15px;
  border-radius: 11px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 14px;
}

.notice-bar {
  margin: 0 0 18px;
  padding: 12px 16px;
  border-radius: 11px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.4);
  color: #86efac;
  font-size: 14px;
}

.warning-bar {
  margin-top: 24px;
  padding: 14px 16px;
  border-radius: 11px;
  background: rgba(245, 158, 11, 0.07);
  border: 1px solid rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  color: #fde68a;
}

.warning {
  padding: 12px 16px;
  border-radius: 11px;
  background: rgba(239, 68, 68, 0.07);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 13.5px;
}

/* ---- backup page ----------------------------------------------------------------- */

/* Compact, borderless — content sits straight on the wallet background. */
/* width matches .app-nav-inner (430px) so the backup body aligns with the
   header: starts under the logo, ends under the lock icon */
.backup-wrap {
  max-width: 430px;
  margin: 0 auto;
}

.backup-wrap h1 {
  font-size: 20px;
}

.backup-wrap .steps {
  margin-bottom: 16px;
}

.backup-wrap .chips {
  grid-template-columns: repeat(2, 1fr);
  gap: 6px;
  margin: 12px 0 4px;
}

.backup-wrap .chip {
  padding: 6px 10px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.07);
}

.backup-wrap .chip b {
  background: none;
  color: #fff;
  min-width: auto;
  height: auto;
  padding: 0;
  font-size: 11.5px;
}

.backup-wrap .chip .w {
  color: #97a1b8;
}

.copy-phrase-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 16px auto 0;
  padding: 4px 6px;
  background: none;
  border: none;
  color: #818cf8;
  font-family: var(--font);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  transition: color 0.12s ease;
}

.copy-phrase-btn:hover {
  color: #a5b4fc;
}

.copy-phrase-btn.ok {
  color: #4ade80;
}

.backup-wrap .backup-actions {
  margin-top: 18px;
  gap: 14px;
}

.backup-wrap p.muted {
  font-size: 13.5px;
}

.backup-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 8px;
}

.backup-form .btn {
  margin-top: 22px;
}

/* verify step: everything centered in the card */
.backup-verify {
  text-align: center;
  max-width: 420px;
  margin: 0 auto;
}

.backup-verify .backup-inputs {
  text-align: left;
}

.backup-verify .backup-form .btn {
  margin-left: auto;
  margin-right: auto;
}

.backup-verify .backup-alt {
  justify-content: center;
}

/* ---- admin ------------------------------------------------------------------------ */

.page-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 14px;
  margin: 22px 0 8px;
}

.stat {
  padding: 18px 20px;
  border-radius: 14px;
  background: rgba(5, 8, 15, 0.6);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.stat-num {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  background: linear-gradient(90deg, #a5b4fc, var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.stat-label {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

.toolbar {
  margin: 20px 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.toolbar input {
  margin-top: 0;
  max-width: 400px;
}

.toolbar .search-form {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
}

.sw-edit-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin: 0;
}

.sw-addr-input {
  font-family: var(--mono);
  font-size: 12px;
  padding: 6px 9px;
  min-width: 320px;
  margin: 0;
}

.admin-subnav {
  display: flex;
  gap: 6px;
  margin: 14px 0 6px;
  flex-wrap: wrap;
}

.subnav-tab {
  padding: 7px 16px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.subnav-tab:hover {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.6);
}

.subnav-tab.active {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.1);
}

.subnav-badge {
  display: inline-block;
  min-width: 18px;
  padding: 1px 6px;
  margin-left: 5px;
  border-radius: 999px;
  background: rgba(245, 158, 11, 0.16);
  border: 1px solid rgba(245, 158, 11, 0.6);
  color: #fbbf24;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
}

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 12px 0;
}

a.mini {
  display: inline-block;
  text-decoration: none;
}

.mini-disabled {
  opacity: 0.45;
  cursor: default;
}

.flash {
  margin: 12px 0 0;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid rgba(34, 197, 94, 0.4);
  background: rgba(34, 197, 94, 0.08);
  color: #4ade80;
  font-size: 13px;
}

.tx-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.tx-actions form {
  display: inline;
}

.tx-amt-cell {
  font-family: var(--mono);
  font-size: 13px;
}

.tx-amt-cell b {
  font-weight: 600;
}

/* truncated address/hash chip + copy button */
.addr-chip {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 8px;
  background: rgba(99, 102, 241, 0.09);
  border: 1px solid rgba(99, 102, 241, 0.28);
  color: #a5f3fc;
  font-family: var(--mono);
  font-size: 12px;
  white-space: nowrap;
  cursor: help;
}

.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: 6px;
  padding: 4px 7px;
  border-radius: 7px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  vertical-align: middle;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.copy-btn:hover {
  color: var(--accent2);
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.08);
}

.copy-btn.ok {
  color: var(--green);
  border-color: var(--green);
}

/* transaction edit modal form */
.tx-edit-form {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 12px;
}

.tx-edit-form label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 6px;
}

.tx-edit-form input {
  margin-top: 0;
  font-family: var(--mono);
  font-size: 13px;
}

.tx-edit-form .row-mini {
  margin-top: 14px;
  gap: 8px;
}

.tx-edit-form input:disabled {
  opacity: 0.55;
}

.table-scroll {
  overflow: visible;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: rgba(5, 8, 15, 0.45);
}

/* let long addresses wrap instead of forcing a horizontal scrollbar */
.admin-table td,
.admin-table th {
  overflow-wrap: anywhere;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.admin-table th {
  text-align: left;
  padding: 13px 16px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  font-weight: 700;
  background: rgba(6, 10, 19, 0.85);
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  position: sticky;
  top: 0;
}

.admin-table td {
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  vertical-align: middle;
}

.admin-table tbody tr {
  transition: background 0.12s ease;
}

.admin-table tbody tr:nth-child(even) {
  background: rgba(255, 255, 255, 0.018);
}

.admin-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.07);
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.user-cell {
  display: flex;
  align-items: center;
  gap: 11px;
}

.nickname {
  font-weight: 600;
}

.phrase-mask {
  display: block;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.14em;
  color: #5b6780;
  word-break: break-all;
}

.phrase-mask[data-state="open"] {
  color: #a5f3fc;
  letter-spacing: 0.02em;
  line-height: 1.75;
}

/* ---- toast ------------------------------------------------------------------------- */

#toast {
  position: fixed;
  bottom: 28px;
  left: 50%;
  transform: translate(-50%, 20px);
  background: rgba(13, 18, 32, 0.95);
  border: 1px solid var(--border);
  color: var(--text);
  padding: 11px 20px;
  border-radius: 11px;
  font-size: 13.5px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
  z-index: 100;
  backdrop-filter: blur(12px);
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
}

#toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

/* ---- responsive ---------------------------------------------------------------------- */

@media (max-width: 780px) {
  .backup-inputs {
    grid-template-columns: 1fr;
  }

  .card {
    padding: 22px;
  }
}

@media (max-width: 720px) {
  .app-nav-inner {
    padding: 10px 16px;
  }
}

/* ---- backup steps ---------------------------------------------------------- */

.steps {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
  flex-wrap: wrap;
}

.step {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 600;
  padding: 6px 13px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
}

.step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  font-size: 10.5px;
}

.step.active {
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.07);
}

.step.active span {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
}

.step.done {
  color: #4ade80;
  border-color: rgba(34, 197, 94, 0.45);
  background: rgba(34, 197, 94, 0.06);
}

.backup-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.backup-actions .btn {
  margin-top: 0;
}

.skip-link {
  color: var(--muted);
  font-size: 14px;
}

.skip-link:hover {
  color: var(--text);
}

.backup-alt {
  margin: 18px 0 0;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* ---- welcome banner ---------------------------------------------------------- */

.welcome-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 18px;
  padding: 13px 16px;
  border-radius: 11px;
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.13), rgba(34, 211, 238, 0.08));
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #c7d2fe;
  font-size: 14px;
}

.welcome-bar b {
  color: #e0e7ff;
}

.welcome-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}

.welcome-close:hover {
  color: var(--text);
}

/* ---- derived addresses ---------------------------------------------------------- */

.derive-box {
  margin-top: 26px;
  border-top: 1px dashed var(--border);
  padding-top: 20px;
}

.derive-box h4 {
  margin: 0 0 6px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.addr-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  flex-wrap: wrap;
}

.addr-row:last-of-type {
  border-bottom: none;
}

.addr-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 110px;
  font-size: 13px;
  font-weight: 600;
}

.addr-path {
  font-style: normal;
  font-family: var(--mono);
  font-size: 10.5px;
  color: var(--muted);
  font-weight: 400;
}

.addr-value {
  font-family: var(--mono);
  font-size: 13px;
  color: #a5f3fc;
  word-break: break-all;
  flex: 1;
  min-width: 200px;
}

.addr-box {
  margin-top: 8px;
}

.addr-line {
  display: flex;
  gap: 10px;
  align-items: center;
  padding: 4px 0;
  flex-wrap: wrap;
}

.addr-line span {
  min-width: 76px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}

.addr-line code {
  font-family: var(--mono);
  font-size: 12px;
  color: #a5f3fc;
  white-space: nowrap;
}

/* ---- wallet UI -------------------------------------------------------------- */

.wallet-card {
  padding: 26px 28px;
}

.wallet-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 14px;
  flex-wrap: wrap;
}

.wallet-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.env-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(220, 38, 38, 0.14);
  border: 1px solid rgba(239, 68, 68, 0.65);
  color: #f87171;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
}

.wallet-balance {
  text-align: right;
}

.bal-big {
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.bal-sub {
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.wallet-actions {
  display: flex;
  gap: 12px;
  margin: 20px 0 6px;
}

.asset-list {
  margin-top: 14px;
  border-top: 1px solid var(--border);
}

.asset-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 15px 2px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  flex-wrap: wrap;
}

.asset-row:last-child {
  border-bottom: none;
}

.coin {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 21px;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
}

.coin-btc {
  background: linear-gradient(135deg, #f7931a, #d97706);
  box-shadow: 0 6px 16px rgba(247, 147, 26, 0.35);
}

.coin-eth {
  background: linear-gradient(135deg, #627eea, #8a9ff0);
  box-shadow: 0 6px 16px rgba(98, 126, 234, 0.35);
}

.coin-sol {
  background: linear-gradient(135deg, #9945ff, #14f195);
  box-shadow: 0 6px 16px rgba(153, 69, 255, 0.35);
}

.coin-usdt {
  background: linear-gradient(135deg, #26a17b, #15803d);
  box-shadow: 0 6px 16px rgba(38, 161, 123, 0.35);
}

.coin-usdc {
  background: linear-gradient(135deg, #2775ca, #1d4ed8);
  box-shadow: 0 6px 16px rgba(39, 117, 202, 0.35);
}

.asset-info {
  flex: 1;
  min-width: 150px;
}

.asset-name {
  font-weight: 600;
  font-size: 15px;
}

.asset-sym {
  color: var(--muted);
  font-weight: 500;
  font-size: 12px;
  margin-left: 6px;
  letter-spacing: 0.06em;
}

.asset-addr {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
}

.asset-bal {
  text-align: right;
  min-width: 90px;
}

.bal-amount {
  display: block;
  font-weight: 600;
  font-size: 15px;
}

.bal-sym {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.05em;
}

.asset-actions {
  display: flex;
  gap: 8px;
}

.asset-actions .btn {
  margin-top: 0;
}

/* ---- modals ------------------------------------------------------------------ */

.modal[hidden] {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 5, 10, 0.75);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 16px;
}

.modal-card {
  width: 100%;
  max-width: 380px;
  background: linear-gradient(180deg, #131a2c, #0c111f);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 22px 24px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6);
  animation: rise 0.25s ease both;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-head h3 {
  font-size: 18px;
}

.modal-head h3::after {
  display: none;
}

.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 8px;
}

.modal-close:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.06);
}

.modal-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.tab {
  flex: 1;
  padding: 9px 0;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.03);
  color: var(--muted);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.06em;
  cursor: pointer;
  transition: all 0.12s ease;
}

.tab.active {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  border-color: transparent;
  color: #fff;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.35);
}

.tab-pane .btn {
  margin-top: 14px;
}

.qr-box {
  width: min(100%, 360px);
  margin: 0 auto;
  padding: 10px;
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.qr-box svg,
.qr-box img.qr-img {
  display: block;
  width: 100%;
  height: auto;
  image-rendering: pixelated;
}

.modal-addr {
  display: block;
  font-family: var(--mono);
  font-size: 12px;
  color: #a5f3fc;
  word-break: break-all;
  text-align: center;
  margin: 14px 0 2px;
  padding: 10px 12px;
  background: rgba(5, 8, 15, 0.7);
  border: 1px dashed var(--border);
  border-radius: 10px;
}

.send-form .btn {
  margin-top: 18px;
}

.send-result {
  margin-top: 16px;
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.08);
  border: 1px solid rgba(34, 197, 94, 0.4);
}

.send-ok {
  margin: 0 0 6px;
  color: #86efac;
  font-size: 13.5px;
}

.txid {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}

.tab-pane > .muted {
  margin: 12px 0 0;
}

/* ---- phrase drawer ------------------------------------------------------------ */

.phrase-drawer {
  margin-top: 22px;
  border-top: 1px dashed var(--border);
  padding-top: 14px;
}

.phrase-drawer > summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  list-style: none;
}

.phrase-drawer > summary::before {
  content: "+";
  display: inline-block;
  margin-right: 8px;
  color: var(--accent2);
  font-weight: 700;
}

.phrase-drawer[open] > summary::before {
  content: "−";
}

.phrase-drawer[open] > summary {
  color: var(--text);
}

.phrase-drawer .phrase-head {
  margin-top: 18px;
}

@media (max-width: 560px) {
  .wallet-balance {
    text-align: left;
  }

  .asset-actions {
    width: 100%;
  }
}

/* ---- MetaMask-style wallet ----------------------------------------------------- */

.mm-wrap {
  max-width: 430px;
  margin: 0 auto;
  padding-bottom: 110px;
}

.mm-account {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-bottom: 22px;
}

.mm-account-name {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 15px;
  font-weight: 600;
  cursor: default;
}

.mm-account-ico {
  color: var(--muted);
  display: inline-flex;
}

.mm-addr-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border);
  color: var(--muted);
  font-family: var(--mono);
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.12s ease, color 0.12s ease;
}

.mm-addr-chip:hover {
  border-color: rgba(34, 211, 238, 0.6);
  color: var(--text);
}

.mm-dots {
  display: inline-flex;
  gap: 2px;
}

.mm-dots i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.mm-dots i:nth-child(1) { background: #f7931a; }
.mm-dots i:nth-child(2) { background: #627eea; }
.mm-dots i:nth-child(3) { background: #a855f7; }

.mm-balance {
  text-align: center;
  margin-bottom: 22px;
}

.mm-bal {
  font-size: 44px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.mm-delta {
  margin-top: 6px;
  color: #4ade80;
  font-size: 14px;
  font-weight: 600;
}

.mm-delta.down {
  color: #f87171;
}

.mm-actions {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  margin-bottom: 18px;
}

.mm-action {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  padding: 8px 4px 7px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: border-color 0.12s ease, background 0.12s ease, transform 0.12s ease;
}

.mm-action:hover {
  border-color: rgba(34, 211, 238, 0.55);
  background: rgba(34, 211, 238, 0.06);
  transform: translateY(-1px);
}

.mm-glyph {
  font-size: 15px;
  line-height: 1;
  color: var(--accent2);
}

/* small "Coming soon" label above Buy/Swap on hover (touch = tap toast) */
.mm-action[data-tip] {
  position: relative;
}

.mm-action[data-tip]:hover::after,
.mm-action[data-tip]:focus-visible::after {
  content: attr(data-tip);
  position: absolute;
  bottom: calc(100% + 7px);
  left: 50%;
  transform: translateX(-50%);
  padding: 4px 9px;
  border-radius: 7px;
  background: #0d1424;
  border: 1px solid var(--border);
  color: var(--text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  z-index: 30;
}

.mm-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 14px;
  border-radius: 14px;
  background: rgba(220, 38, 38, 0.09);
  border: 1px solid rgba(239, 68, 68, 0.45);
  color: #fca5a5;
  font-size: 13px;
}

.mm-notice b {
  color: #f87171;
}

.mm-notice-x {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: 0 4px;
  flex-shrink: 0;
}

.mm-notice-x:hover {
  color: var(--text);
}

.mm-tabs {
  display: flex;
  gap: 20px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 14px;
}

.mm-tab {
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 2px 12px;
  cursor: pointer;
  position: relative;
}

.mm-tab.active {
  color: var(--text);
}

.mm-tab.active::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--accent1), var(--accent2));
}

.mm-filter-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 10px;
}

.mm-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.mm-row-tools {
  color: var(--muted);
  font-size: 14px;
  letter-spacing: 2px;
}

.mm-token {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  cursor: pointer;
  border-radius: 10px;
  transition: background 0.12s ease;
}

.mm-token:hover {
  background: rgba(255, 255, 255, 0.03);
}

.mm-token:last-child {
  border-bottom: none;
}

.mm-token .coin {
  width: 40px;
  height: 40px;
  font-size: 19px;
}

.mm-verified {
  vertical-align: -2px;
  margin-left: 2px;
}

.mm-token-info {
  flex: 1;
  min-width: 0;
}

.mm-token-name {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.mm-badge {
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.mm-token-pct {
  color: #4ade80;
  font-size: 12.5px;
  margin-top: 3px;
}

.mm-token-val {
  text-align: right;
}

.mm-fiat {
  font-size: 15px;
  font-weight: 600;
}

.mm-amount {
  color: var(--muted);
  font-size: 12px;
  margin-top: 3px;
}

.mm-activity-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.mm-act-coin {
  width: 36px;
  height: 36px;
  font-size: 17px;
}

.mm-act-info {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mm-act-status {
  color: #4ade80;
  font-size: 12px;
  font-weight: 600;
}

.mm-act-status.failed {
  color: #f87171;
}

.mm-act-status.pending {
  color: #fbbf24;
}

.mm-empty {
  padding: 18px 4px;
}

/* bottom navigation */

.mm-bottom {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  justify-content: space-around;
  gap: 0;
  background: rgba(6, 9, 16, 0.92);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  border-bottom: none;
  border-radius: 18px 18px 0 0;
  padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  z-index: 40;
}

.mm-bitem {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: var(--muted);
  font-family: var(--font);
  font-size: 10px;
  font-weight: 600;
  cursor: pointer;
  padding: 4px 10px;
  border-radius: 12px;
  transition: color 0.12s ease;
}

.mm-bitem svg {
  width: 20px;
  height: 20px;
}

.mm-bitem.active,
.mm-bitem:hover {
  color: var(--text);
}

/* ---- coin images (CoinMarketCap logos) ------------------------------------------- */

.coin-img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.coin[hidden] {
  display: none;
}

@media (max-width: 480px) {
  .app-nav-brand .brand-text {
    display: none;
  }
}

/* ---- light theme ------------------------------------------------------------------ */

:root[data-theme="light"] {
  --bg: #eef1f8;
  --panel: rgba(15, 23, 42, 0.04);
  --border: rgba(15, 23, 42, 0.14);
  --text: #0f172a;
  --muted: #5b6478;
}

:root[data-theme="light"] body {
  background: var(--bg);
}

:root[data-theme="light"] .orb,
:root[data-theme="light"] .grid-overlay {
  display: none;
}

:root[data-theme="light"] .card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.95), rgba(244, 246, 252, 0.95)) padding-box,
    linear-gradient(140deg, rgba(99, 102, 241, 0.45), rgba(15, 23, 42, 0.08) 42%, rgba(34, 211, 238, 0.35)) border-box;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.12);
}

:root[data-theme="light"] input {
  background: rgba(255, 255, 255, 0.9);
  color: var(--text);
}

:root[data-theme="light"] input::placeholder {
  color: #9aa3b8;
}

:root[data-theme="light"] .chip {
  background: rgba(15, 23, 42, 0.05);
}

:root[data-theme="light"] .stat {
  background: rgba(15, 23, 42, 0.04);
}

:root[data-theme="light"] .table-scroll {
  background: rgba(15, 23, 42, 0.03);
}

:root[data-theme="light"] .admin-table th {
  background: rgba(15, 23, 42, 0.06);
}

:root[data-theme="light"] .admin-table tbody tr:hover {
  background: rgba(99, 102, 241, 0.08);
}

:root[data-theme="light"] .modal-card {
  background: linear-gradient(180deg, #ffffff, #f1f4fb);
}

:root[data-theme="light"] .modal-addr {
  background: rgba(15, 23, 42, 0.05);
}

:root[data-theme="light"] .app-nav {
  background: rgba(255, 255, 255, 0.82);
}

:root[data-theme="light"] .app-nav-icon-btn:hover {
  background: rgba(15, 23, 42, 0.06);
}

:root[data-theme="light"] .mm-bottom {
  background: rgba(255, 255, 255, 0.95);
}

:root[data-theme="light"] .mm-action {
  background: rgba(15, 23, 42, 0.045);
}

:root[data-theme="light"] .mm-token:hover {
  background: rgba(15, 23, 42, 0.05);
}

:root[data-theme="light"] .mm-addr-chip,
:root[data-theme="light"] .mm-chip,
:root[data-theme="light"] .mm-badge,
:root[data-theme="light"] .pill {
  background: rgba(15, 23, 42, 0.05);
}

:root[data-theme="light"] .mm-tab {
  color: var(--muted);
}

:root[data-theme="light"] .mm-activity-row,
:root[data-theme="light"] .mm-token,
:root[data-theme="light"] .asset-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] #toast {
  background: rgba(255, 255, 255, 0.97);
  color: var(--text);
}

:root[data-theme="light"] ::selection {
  background: rgba(99, 102, 241, 0.25);
}

:root[data-theme="light"] a {
  color: #0369a1;
}

:root[data-theme="light"] .warning-bar {
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(217, 119, 6, 0.5);
}

:root[data-theme="light"] .warning,
:root[data-theme="light"] .error-bar {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(220, 38, 38, 0.35);
}

:root[data-theme="light"] .notice-bar {
  color: #166534;
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(22, 163, 74, 0.4);
}

:root[data-theme="light"] .mm-notice {
  color: #b91c1c;
  background: rgba(239, 68, 68, 0.07);
  border-color: rgba(220, 38, 38, 0.35);
}

:root[data-theme="light"] .mm-notice b {
  color: #b91c1c;
}

:root[data-theme="light"] .mm-delta,
:root[data-theme="light"] .mm-token-pct,
:root[data-theme="light"] .mm-act-status {
  color: #16a34a;
}

:root[data-theme="light"] .pill-green {
  color: #16a34a;
  border-color: rgba(22, 163, 74, 0.45);
  background: rgba(34, 197, 94, 0.1);
}

:root[data-theme="light"] .pill-amber,
:root[data-theme="light"] .pill-gold {
  color: #b45309;
  border-color: rgba(217, 119, 6, 0.5);
  background: rgba(245, 158, 11, 0.12);
}

:root[data-theme="light"] .send-result {
  background: rgba(34, 197, 94, 0.1);
  border-color: rgba(22, 163, 74, 0.4);
}

:root[data-theme="light"] .send-ok {
  color: #166534;
}

/* ---- asset detail page ---------------------------------------------------------- */

a.mm-token {
  text-decoration: none;
  color: inherit;
}

.mm-token-pct.down {
  color: #f87171;
}

.asset-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}

.asset-back {
  color: var(--muted);
  font-size: 24px;
  line-height: 1;
  text-decoration: none;
  padding: 2px 10px 2px 0;
}

.asset-back:hover {
  color: var(--text);
  text-decoration: none;
}

.asset-sym {
  font-weight: 700;
  font-size: 15px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.asset-price {
  font-size: 40px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.asset-chg {
  margin-top: 4px;
  font-weight: 600;
  font-size: 14px;
}

.asset-chg.up {
  color: #4ade80;
}

.asset-chg.down {
  color: #f87171;
}

.asset-chart {
  margin-top: 14px;
}

.asset-chart-svg {
  display: block;
  width: 100%;
  height: auto;
}

.chart-lbl {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
  fill: #e8edf7;
}

.range-pills {
  display: flex;
  gap: 6px;
  margin: 14px 0 18px;
  flex-wrap: wrap;
}

.range-pill {
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
}

.range-pill:hover {
  color: var(--text);
  text-decoration: none;
}

.range-pill.active {
  background: linear-gradient(135deg, var(--accent1), var(--accent2));
  color: #fff;
  border-color: transparent;
}

.asset-sec {
  margin-top: 22px;
  border-top: 1px solid var(--border);
  padding-top: 14px;
}

.asset-sec h4 {
  margin: 0 0 10px;
  font-size: 14px;
  font-weight: 700;
}

.asset-verified {
  color: #4ade80;
  font-weight: 600;
  font-size: 14px;
  margin: 0 0 4px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  padding: 6px 0;
  font-size: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-row .asset-addr {
  font-size: 12px;
  word-break: break-all;
  text-align: right;
}

/* ---- admin user assets popup ------------------------------------------------------ */

.admin-row {
  cursor: pointer;
}

.modal-wide {
  max-width: 540px;
}

.modal-xl {
  max-width: 900px;
}

.receive-card {
  max-width: 430px;
}

/* ---- admin: user popup ------------------------------------------------------ */

.popup-sec {
  margin: 14px 0;
}

.popup-sec-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}

.popup-addrs {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 6px 18px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5, 8, 15, 0.45);
  max-height: 180px;
  overflow-y: auto;
}

.pw-debug-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.pw-debug-val {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.08em;
  color: var(--text);
}

.asset-contracts {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 4px;
}

.sm-tag {
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  padding: 2px 5px;
  border-radius: 5px;
  border: 1px solid rgba(99, 102, 241, 0.4);
  color: #a5b4fc;
  background: rgba(99, 102, 241, 0.1);
}

/* toggle switch */
.switch {
  position: relative;
  display: inline-block;
  width: 42px;
  height: 23px;
  cursor: pointer;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 17px;
  height: 17px;
  left: 2px;
  top: 2px;
  border-radius: 50%;
  background: #8b93a8;
  transition: transform 0.15s ease, background 0.15s ease;
}

.switch input:checked + .switch-slider {
  background: rgba(34, 197, 94, 0.25);
  border-color: rgba(34, 197, 94, 0.65);
}

.switch input:checked + .switch-slider::before {
  transform: translateX(19px);
  background: #4ade80;
}

.switch input:focus-visible + .switch-slider {
  outline: 2px solid var(--accent2);
  outline-offset: 2px;
}

.user-bal {
  margin-bottom: 14px;
  font-size: 14px;
}

.ua-list {
  max-height: 320px;
  overflow-y: auto;
  margin-bottom: 4px;
}

.ua-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  flex-wrap: wrap;
}

.ua-row:last-child {
  border-bottom: none;
}

.ua-off .asset-info {
  opacity: 0.55;
}

.coin-img-sm,
.coin-sm {
  width: 30px;
  height: 30px;
  font-size: 14px;
}

.ua-toggle {
  margin-left: auto;
}

.ua-toggle .btn {
  margin-top: 0;
}

.ua-h {
  margin: 16px 0 2px;
  font-size: 13px;
  font-weight: 700;
}

.ua-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.ua-add .btn {
  margin-top: 16px;
}

@media (max-width: 520px) {
  .ua-grid {
    grid-template-columns: 1fr;
  }
}

:root[data-theme="light"] .detail-row,
:root[data-theme="light"] .ua-row {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

:root[data-theme="light"] .asset-chg.up,
:root[data-theme="light"] .asset-verified {
  color: #16a34a;
}

:root[data-theme="light"] .range-pill {
  background: rgba(15, 23, 42, 0.04);
}

/* ---- mainnet mode ------------------------------------------------------------------ */

body[data-net="main"] .tab-pane .mini[data-faucet] {
  display: none;
}

/* ---- settings page + SPA nav ------------------------------------------------------ */

a.mm-bitem {
  text-decoration: none;
  color: inherit;
}

.set-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  padding: 12px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

.set-item:last-child {
  border-bottom: none;
}

.set-item .muted {
  display: block;
}

.set-item .ua-toggle .btn {
  margin-top: 0;
}

.set-item .row {
  margin-top: 12px;
}

:root[data-theme="light"] .set-item {
  border-bottom-color: rgba(15, 23, 42, 0.08);
}

/* ---- recovery phrase unlock modal --------------------------------------------------- */

.phrase-card {
  max-width: 400px;
}

.phrase-lock-ring {
  width: 62px;
  height: 62px;
  border-radius: 50%;
  margin: 8px auto 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(180deg, rgba(23, 30, 52, 0.95), rgba(12, 17, 31, 0.95)) padding-box,
    linear-gradient(135deg, var(--accent1), var(--accent2)) border-box;
  border: 1px solid transparent;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.35);
  color: var(--accent2);
}

.phrase-lock-ring svg {
  width: 26px;
  height: 26px;
}

.phrase-locked > p {
  margin: 0 0 16px;
  line-height: 1.5;
}

.phrase-err {
  margin-top: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(239, 68, 68, 0.08);
  border: 1px solid rgba(239, 68, 68, 0.4);
  color: #fca5a5;
  font-size: 13.5px;
}

.phrase-open .chips {
  margin: 12px 0 4px;
}

.phrase-open .row {
  margin-top: 14px;
}

.send-bal {
  margin-top: 12px;
}

.tab-pane .mini[data-faucet] {
  margin-top: 8px;
}

:root[data-theme="light"] .phrase-lock-ring {
  background:
    linear-gradient(180deg, #ffffff, #f3f5fb) padding-box,
    linear-gradient(135deg, var(--accent1), var(--accent2)) border-box;
  box-shadow: 0 10px 30px rgba(99, 102, 241, 0.25);
}

/* ---- send flow (Trust-Wallet style: pick asset -> form -> review) ----------- */

.send-card {
  max-width: 430px;
  min-height: 600px;
  display: flex;
  flex-direction: column;
  padding-bottom: 18px;
}

.send-flow {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.sf-step {
  display: flex;
  flex-direction: column;
  flex: 1;
  animation: rise 0.2s ease both;
}

.sf-head {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  margin-bottom: 14px;
}

.sf-head h3 {
  text-align: center;
  font-size: 17px;
  font-weight: 600;
}

.sf-head .modal-close {
  justify-self: end;
}

.sf-back {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 6px;
  display: inline-flex;
  transition: color 0.12s ease;
}

.sf-back:hover {
  color: var(--text);
}

/* step 1: asset picker */
.sf-search {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(5, 8, 15, 0.5);
  color: var(--muted);
  margin-bottom: 10px;
}

.sf-search input {
  flex: 1;
  margin-top: 0;
  padding: 0;
  border: none;
  background: none;
  font-size: 14px;
}

.sf-search input:focus {
  box-shadow: none;
}

.sf-chip {
  align-self: flex-start;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  margin-bottom: 6px;
}

.sf-list {
  flex: 1;
  overflow-y: auto;
  margin: 0 -6px;
  padding: 0 6px;
}

.sf-asset {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 8px;
  background: none;
  border: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
  cursor: pointer;
  text-align: left;
  color: inherit;
  border-radius: 10px;
  transition: background 0.12s ease;
}

.sf-asset:hover {
  background: rgba(99, 102, 241, 0.07);
}

.mm-token-sub {
  font-size: 12px;
  color: var(--muted);
}

/* step 2: form */
.sf-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  padding: 18px 0 22px;
}

.sf-hero .coin-img,
.sf-hero .coin {
  width: 52px;
  height: 52px;
  font-size: 24px;
}

.sf-sym {
  font-size: 20px;
  font-weight: 700;
}

.sf-label {
  font-size: 13px;
  color: var(--muted);
  margin: 10px 0 6px;
}

.sf-to-row,
.sf-amt-row {
  display: flex;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(5, 8, 15, 0.5);
  padding: 0 8px 0 14px;
}

.sf-to-row:focus-within,
.sf-amt-row:focus-within {
  border-color: rgba(34, 211, 238, 0.6);
}

.sf-to-row input,
.sf-amt-row input {
  flex: 1;
  margin-top: 0;
  padding: 13px 0;
  border: none;
  background: none;
  font-size: 15px;
  font-family: var(--mono);
}

.sf-to-row input:focus,
.sf-amt-row input:focus {
  box-shadow: none;
}

.sf-paste {
  background: none;
  border: none;
  color: var(--muted);
  cursor: pointer;
  padding: 8px;
  display: inline-flex;
  transition: color 0.12s ease;
}

.sf-paste:hover {
  color: var(--accent2);
}

.sf-amt-sym {
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  padding: 0 6px;
}

.sf-amt-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 12px;
  color: var(--muted);
  padding: 7px 2px;
}

.sf-avail {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.sf-max {
  background: none;
  border: none;
  color: var(--accent2);
  font-weight: 700;
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.sf-max:hover {
  text-decoration: underline;
}

.sf-faucet {
  align-self: flex-start;
  margin-top: 4px;
}

.sf-foot {
  margin-top: auto;
  padding-top: 18px;
}

.sf-foot .btn:disabled {
  opacity: 0.45;
  cursor: default;
}

/* step 3: review */
.sf-review-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 8px 0 18px;
}

.sf-review-hero .coin-img,
.sf-review-hero .coin {
  width: 44px;
  height: 44px;
  font-size: 20px;
}

.sf-review-label {
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 2px;
}

.sf-big-amt {
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.sf-big-usd {
  font-size: 14px;
}

.sf-cards {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sf-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(5, 8, 15, 0.5);
}

.sf-card-label {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 3px;
}

.sf-card-val {
  font-size: 14px;
  font-weight: 600;
}

.sf-card-val.mono {
  font-family: var(--mono);
  font-size: 13px;
  word-break: break-all;
}

.sf-card-sub {
  font-size: 12px;
  color: var(--muted);
}

.sf-card-right {
  text-align: right;
}

.sf-card-ico {
  display: inline-flex;
}

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

/* step 4: done */
.sf-done {
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 12px;
}

.sf-check {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 32px;
  color: #4ade80;
  border: 2px solid rgba(34, 197, 94, 0.5);
  background: rgba(34, 197, 94, 0.1);
  margin-bottom: 6px;
}

.sf-done .txid {
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
}

/* ---- compact send popup ------------------------------------------------------ */

.send-simple select {
  width: 100%;
  margin-top: 0;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(5, 8, 15, 0.5);
  color: var(--text);
  font-family: var(--mono);
  font-size: 14px;
  appearance: auto;
}

.send-simple select:focus {
  outline: none;
  border-color: rgba(34, 211, 238, 0.6);
}

.send-simple #ss-send {
  margin-top: 16px;
}

.send-simple #ss-send:disabled {
  opacity: 0.45;
  cursor: default;
}

.ss-done {
  text-align: center;
  padding: 18px 0 6px;
}

.ss-done .txid {
  display: block;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--muted);
  word-break: break-all;
  margin: 8px 0 10px;
}

/* ---- custom asset dropdown (send popup) -------------------------------------- */

.ss-asset-wrap {
  position: relative;
}

.ss-selected {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 13px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(5, 8, 15, 0.5);
  color: var(--text);
  cursor: pointer;
  font-size: 14px;
  transition: border-color 0.12s ease;
}

.ss-selected:hover,
.ss-selected:focus-visible {
  outline: none;
  border-color: rgba(34, 211, 238, 0.6);
}

.ss-selected-coin .coin-img,
.ss-selected-coin .coin {
  width: 30px;
  height: 30px;
  font-size: 15px;
  border-radius: 50%;
}

.ss-selected-info {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
}

.ss-selected-info b {
  font-size: 14px;
  font-weight: 700;
}

.ss-selected-name {
  font-size: 11.5px;
}

.ss-chev {
  margin-left: auto;
  color: var(--muted);
}

.ss-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 20;
  max-height: 250px;
  overflow-y: auto;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0d1322;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55);
  animation: rise 0.15s ease both;
}

.ss-opt {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  background: none;
  border: none;
  border-radius: 9px;
  cursor: pointer;
  color: inherit;
  text-align: left;
  transition: background 0.1s ease;
}

.ss-opt:hover {
  background: rgba(99, 102, 241, 0.09);
}

.ss-opt.active {
  background: rgba(34, 211, 238, 0.1);
}

.ss-opt.active::after {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent2);
  flex-shrink: 0;
}

.ss-opt .coin-img,
.ss-opt .coin {
  width: 30px;
  height: 30px;
  font-size: 15px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ss-opt-info {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
  min-width: 0;
}

.ss-opt-info b {
  font-size: 13.5px;
}

.ss-opt-info .muted {
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ss-opt-bal {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--muted);
  white-space: nowrap;
}

/* ---- transaction status pills + rejection reason ------------------------------ */

.pill-blue {
  color: #60a5fa;
  border-color: rgba(96, 165, 250, 0.5);
  background: rgba(96, 165, 250, 0.1);
}

.tx-reason {
  max-width: 220px;
  margin-top: 5px;
  font-size: 12px;
  line-height: 1.4;
  color: #fca5a5;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- dashboard network filter dropdown --------------------------------------- */

.mm-net-wrap {
  position: relative;
}

.mm-chip-btn {
  cursor: pointer;
  font-family: var(--font);
  transition: border-color 0.12s ease, color 0.12s ease;
}

.mm-chip-btn:hover,
.mm-chip-btn:focus-visible {
  outline: none;
  color: var(--text);
  border-color: rgba(34, 211, 238, 0.6);
}

.mm-net-chev {
  opacity: 0.7;
}

.mm-net-drop {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 20;
  min-width: 180px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #0d1322;
  box-shadow: 0 22px 55px rgba(0, 0, 0, 0.55);
  animation: rise 0.15s ease both;
}

.mm-net-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  background: none;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  color: var(--text);
  font-family: var(--font);
  font-size: 13px;
  font-weight: 600;
  text-align: left;
  transition: background 0.1s ease;
}

.mm-net-opt:hover {
  background: rgba(99, 102, 241, 0.09);
}

.mm-net-opt.active {
  background: rgba(34, 211, 238, 0.1);
}

.mm-net-opt.active::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: auto;
  border-radius: 50%;
  background: var(--accent2);
  flex-shrink: 0;
}

.mm-net-coin {
  width: 20px;
  height: 20px;
  font-size: 11px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mm-net-coin-img {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

.mm-row-refresh {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.04);
  color: var(--muted);
  cursor: pointer;
  transition: color 0.12s ease, border-color 0.12s ease, background 0.12s ease;
}

.mm-row-refresh:hover:not(:disabled) {
  color: var(--accent2);
  border-color: rgba(34, 211, 238, 0.6);
  background: rgba(34, 211, 238, 0.08);
}

.mm-row-refresh:disabled {
  opacity: 0.5;
  cursor: default;
}

.mm-row-refresh.spinning svg {
  animation: navspin 0.7s linear infinite;
}

/* ---- activity coin logos (from the asset catalog) ---------------------------- */

.coin-img.mm-act-coin {
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
}

/* ---- QR enlarge + subwallet requests ------------------------------------------ */

.qr-box {
  position: relative;
  width: min(100%, 360px);
}

.qr-box img.qr-img {
  cursor: zoom-in;
}

/* privacy cover: the QR stays hidden until the user clicks to reveal it */
.qr-veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 0;
  font: inherit;
  border: 1px dashed var(--border);
  border-radius: 10px;
  background: linear-gradient(180deg, #131a2c, #0c111f);
  color: var(--muted);
  font-size: 13px;
  cursor: pointer;
}

.qr-veil:hover {
  color: var(--text);
  border-color: var(--accent2);
}

.qr-veil[hidden] {
  display: none;
}

/* small QRs (subwallets) stay in place but unreadable until tapped */
img.qr-veiled {
  filter: blur(11px);
  cursor: pointer;
}

.receive-card {
  max-width: 460px;
}

.qr-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.92);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  cursor: zoom-out;
}

.qr-overlay[hidden] {
  display: none;
}

.qr-overlay img {
  width: min(80vmin, 560px);
  height: auto;
  background: #fff;
  padding: 18px;
  border-radius: 18px;
  image-rendering: pixelated;
}

.qr-overlay-hint {
  color: var(--muted);
  font-size: 13px;
}

.subwallet-zone {
  margin-top: 16px;
  border-top: 1px dashed var(--border);
  padding-top: 12px;
  text-align: left;
}

.subwallet-row {
  padding: 10px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.045);
}

/* approved subwallet: same presentation as the main receive address */
.subwallet-big .modal-addr {
  margin: 4px 0 10px;
}

.subwallet-big .btn-block {
  margin-top: 0;
}

.subwallet-big .pill {
  display: inline-block;
  margin-top: 10px;
}

.subwallet-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  padding: 14px 0;
}

.load-ring {
  display: inline-block;
  width: 15px;
  height: 15px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: var(--accent2);
  border-radius: 50%;
  animation: navspin 0.8s linear infinite;
  flex-shrink: 0;
}

.subwallet-denied {
  color: #f87171;
  font-size: 13px;
  padding: 6px 0;
}

/* PWA install help */
.pwa-help {
  margin-top: 10px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  font-size: 13px;
}

.pwa-help > b {
  display: block;
  margin-bottom: 6px;
}

.pwa-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
  color: var(--muted);
}

.pwa-steps b {
  display: inline;
  margin: 0;
  color: var(--text);
}

.pwa-ico {
  vertical-align: -1px;
  color: var(--accent2);
}
