/* ============================================================
   MERION APP — extra product pages (wallet, team, notifications, tokenization)
   Reuses dashboard tokens & classes; adds only what's new.
   ============================================================ */

/* page-level view toggle (2 variations) reuses .tabs-list/.tab */
.view-switch { display: inline-flex; gap: 4px; }

/* DataTable placed inside a Card: neutralize the table-wrap's own border/bg/radius
   (it is itself a card) so it blends into the parent Card, and align columns to the
   card's 24px gutter. */
.card-table .table-wrap { border: none; border-radius: 0; background: transparent; overflow-x: auto; overflow-y: hidden; }
.card-table .table thead th { background: transparent; border-bottom: 1px solid var(--border); }
.card-table .table thead th:first-child,
.card-table .table tbody td:first-child { padding-left: 24px; }
.card-table .table thead th:last-child,
.card-table .table tbody td:last-child { padding-right: 24px; }
.card-table.divided { border-top: 1px solid var(--border); margin-top: 16px; }

/* clickable table rows + transaction detail */
.row-clickable { cursor: pointer; transition: background .12s ease; }
.row-clickable:hover { background: var(--accent); }
.tx-back { display: inline-flex; align-items: center; gap: 5px; background: none; border: none; cursor: pointer;
  font-family: var(--ui-font); font-size: 13px; font-weight: 600; color: var(--muted-foreground); padding: 0; margin-bottom: 16px; transition: color .14s ease; }
.tx-back:hover { color: var(--foreground); }
.tx-back .ic { font-size: 16px; }
.tx-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; }
.tx-party { display: flex; align-items: center; gap: 11px; margin-top: 14px; }
.tx-party-role { font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--muted-foreground); }
.tx-party-name { font-size: 14px; font-weight: 600; margin-top: 1px; }
.tx-arrow { margin: 10px 0 0 16px; color: var(--brand); }
.tx-arrow .ic { font-size: 18px; transform: rotate(90deg); }
.tx-value-card { display: flex; flex-direction: column; justify-content: center; }
.tx-value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 10px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tx-value-sub { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }
.tx-meta { margin-top: 14px; border-top: 1px solid var(--border); }
.tx-meta-row { display: flex; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.tx-meta-row:last-child { border-bottom: none; }
.tx-meta-k { font-size: 13px; color: var(--muted-foreground); }
.tx-meta-v { font-size: 13px; font-weight: 500; text-align: right; word-break: break-all; }
@media (max-width: 720px) { .tx-grid { grid-template-columns: 1fr; } }

/* soluções — list variation */
.sol-line { display: flex; align-items: center; gap: 16px; padding: 16px 22px; border-top: 1px solid var(--border); }
.sol-line .sol-ic { flex: none; }
.sol-line-main { flex: 1.6; min-width: 0; }
.sol-line-metric { flex: 0 0 92px; display: flex; flex-direction: column; }
.sol-line-metric .v { font-size: 15px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sol-line-metric .k { font-size: 11px; color: var(--muted-foreground); }
.sol-line-health { flex: 0 0 130px; }
@media (max-width: 860px) { .sol-line-metric, .sol-line-health { display: none; } }

/* ---------------- WALLET ---------------- */
.wallet-hero { position: relative; overflow: hidden; padding: 26px 28px; margin-bottom: 18px;
  background: linear-gradient(135deg, color-mix(in srgb, var(--brand) 14%, var(--card)), var(--card) 62%); }
.wallet-hero .wh-glow { position: absolute; right: -80px; top: -90px; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 26%, transparent), transparent 65%); pointer-events: none; }
.wh-label { font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted-foreground); }
.wh-balance { font-size: 40px; font-weight: 700; letter-spacing: -.02em; margin: 8px 0 4px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wh-sub { display: flex; gap: 28px; margin-top: 16px; flex-wrap: wrap; }
.wh-stat .v { font-size: 17px; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.wh-stat .k { font-size: 12px; color: var(--muted-foreground); }

.asset-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(248px, 1fr)); gap: 14px; }
.asset-card { padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; }
.asset-top { display: flex; align-items: center; gap: 12px; }
.asset-chip { width: 40px; height: 40px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; }
.asset-sym { font-size: 15px; font-weight: 600; }
.asset-name { font-size: 12.5px; color: var(--muted-foreground); }
.asset-bal { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.asset-meta { display: flex; align-items: center; justify-content: space-between; }
.asset-val { font-size: 13px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }
.asset-delta { font-size: 12.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.asset-delta.up { color: var(--success); }
.asset-delta.down { color: var(--destructive); }

.copy-field { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: var(--radius); background: var(--muted); }
.copy-field .addr { flex: 1; min-width: 0; font-family: var(--ui-mono); font-size: 13px; overflow: hidden; text-overflow: ellipsis;
  white-space: nowrap; font-variant-numeric: tabular-nums; }

/* ---------------- TEAM ---------------- */
.member-cell { display: flex; align-items: center; gap: 11px; }
.member-cell .mc-name { font-size: 13.5px; font-weight: 600; }
.member-cell .mc-mail { font-size: 12px; color: var(--muted-foreground); }
.role-pill { display: inline-flex; align-items: center; gap: 6px; }
.invite-row { display: flex; align-items: center; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--border); }
.invite-row:last-child { border-bottom: none; }
.invite-mail { flex: 1; font-size: 13.5px; font-weight: 500; }

/* ---------------- NOTIFICATIONS ---------------- */
.notif-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; flex-wrap: wrap; }
.notif-feed { display: flex; flex-direction: column; }
.notif-daylabel { font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted-foreground);
  padding: 18px 0 10px; }
.notif-daylabel:first-child { padding-top: 0; }
.notif-item { display: flex; gap: 14px; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-md);
  background: var(--card); margin-bottom: 8px; align-items: flex-start; transition: border-color .14s ease; position: relative; }
.notif-item[data-unread="true"] { border-color: color-mix(in srgb, var(--brand) 38%, var(--border)); background: color-mix(in srgb, var(--brand) 4%, var(--card)); }
.notif-item:hover { border-color: var(--border-strong); }
.notif-ic { width: 38px; height: 38px; border-radius: 50%; flex: none; display: flex; align-items: center; justify-content: center; }
.notif-ic .ic { font-size: 18px; }
.notif-body { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.notif-desc { font-size: 13px; color: var(--muted-foreground); line-height: 1.5; }
.notif-time { font-size: 12px; color: var(--muted-foreground); white-space: nowrap; font-variant-numeric: tabular-nums; }
.notif-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; margin-top: 6px; }

/* tri-stat strip (team / tokenization headers) */
.stat-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin-bottom: 18px; }
.stat-cell { padding: 16px 18px; }
.stat-cell .v { font-size: 24px; font-weight: 700; letter-spacing: -.01em; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat-cell .k { font-size: 12.5px; color: var(--muted-foreground); margin-top: 2px; }

/* standard chip (ERC-20 etc) */
.std-chip { font-family: var(--ui-mono); font-size: 11px; font-weight: 600; letter-spacing: .04em; }

/* setup banner (painel) */
.setup-banner { display: flex; align-items: center; gap: 14px; padding: 16px 20px; margin-bottom: 20px;
  border: 1px solid color-mix(in srgb, var(--brand) 32%, var(--border)); border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand) 7%, var(--card)); }
.setup-ic { width: 40px; height: 40px; border-radius: var(--radius); flex: none; display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--brand) 16%, transparent); color: var(--brand); }
.setup-ic .ic { font-size: 20px; }
.setup-body { flex: 1; min-width: 0; }
.setup-t { font-size: 14.5px; font-weight: 600; }
.setup-d { font-size: 13px; color: var(--muted-foreground); margin-top: 2px; }
@media (max-width: 640px) { .setup-banner { flex-wrap: wrap; } }

/* ============================================================
   ONBOARDING (full screen wizard)
   ============================================================ */
.onb { position: fixed; inset: 0; z-index: 100; background:
  radial-gradient(120% 80% at 50% -10%, color-mix(in srgb, var(--brand) 9%, var(--background)), var(--background) 58%);
  color: var(--foreground); display: flex; flex-direction: column; overflow-y: auto; }
.onb-top { display: flex; align-items: center; justify-content: space-between; padding: 22px 32px; flex: 0 0 auto; }
.onb-skip { display: inline-flex; align-items: center; gap: 6px; background: none; border: none; cursor: pointer;
  font-family: var(--ui-font); font-size: 13px; font-weight: 600; color: var(--muted-foreground); transition: color .14s ease; }
.onb-skip:hover { color: var(--foreground); }
.onb-skip .ic { font-size: 16px; }
.onb-body { flex: 1; width: 100%; max-width: 620px; margin: 0 auto; padding: 12px 24px 48px; display: flex; flex-direction: column; }
.onb-stepper { margin-bottom: 30px; }
.onb-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 36px 34px; box-shadow: var(--shadow); }
.onb-step { animation: auth-in .3s cubic-bezier(.16,.84,.44,1) both; }
.onb-mark { margin-bottom: 18px; }
.onb-title { font-size: 24px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; margin: 0 0 8px; }
.onb-sub { font-size: 14.5px; font-weight: 300; line-height: 1.6; color: var(--muted-foreground); margin: 0 0 24px; }
.onb-form { display: flex; flex-direction: column; gap: 16px; }

/* choice cards (network) */
.onb-choice-grid, .onb-sol-grid { display: grid; gap: 12px; }
.onb-choice-grid { grid-template-columns: 1fr 1fr; }
.onb-choice { position: relative; text-align: left; cursor: pointer; padding: 20px; border-radius: var(--radius-md);
  background: var(--background); border: 1.5px solid var(--border); transition: .14s ease; font-family: var(--ui-font); }
.onb-choice:hover { border-color: var(--border-strong); }
.onb-choice[data-active="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 6%, var(--background)); }
.onb-choice-ic { width: 40px; height: 40px; border-radius: var(--radius); display: flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--brand) 14%, transparent); color: var(--brand); margin-bottom: 14px; }
.onb-choice-ic .ic { font-size: 20px; }
.onb-choice-t { font-size: 15px; font-weight: 600; margin-bottom: 4px; }
.onb-choice-d { font-size: 13px; color: var(--muted-foreground); line-height: 1.5; }
.onb-choice-check, .onb-sol-check { position: absolute; top: 16px; right: 16px; width: 22px; height: 22px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; background: var(--brand); color: var(--brand-contrast);
  opacity: 0; transform: scale(.6); transition: .16s ease; }
.onb-choice-check .ic, .onb-sol-check .ic { font-size: 14px; }
.onb-choice[data-active="true"] .onb-choice-check { opacity: 1; transform: scale(1); }

/* solution multi-select */
.onb-sol-grid { grid-template-columns: 1fr 1fr; }
.onb-sol { position: relative; display: flex; align-items: flex-start; gap: 13px; text-align: left; cursor: pointer;
  padding: 16px; border-radius: var(--radius-md); background: var(--background); border: 1.5px solid var(--border);
  transition: .14s ease; font-family: var(--ui-font); }
.onb-sol:hover { border-color: var(--border-strong); }
.onb-sol[data-active="true"] { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 5%, var(--background)); }
.onb-sol-ic { width: 40px; height: 40px; border-radius: var(--radius); flex: none; display: flex; align-items: center; justify-content: center; }
.onb-sol-ic .ic { font-size: 19px; }
.onb-sol-body { flex: 1; min-width: 0; padding-right: 24px; }
.onb-sol-t { font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.onb-sol-d { font-size: 12.5px; color: var(--muted-foreground); line-height: 1.45; }
.onb-sol-check { top: 14px; right: 14px; width: 20px; height: 20px; border: 1.5px solid var(--border-strong); background: transparent; color: transparent; opacity: 1; transform: none; }
.onb-sol-check[data-on="true"] { background: var(--brand); border-color: var(--brand); color: var(--brand-contrast); }

/* invites */
.onb-invites { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.onb-invite { display: grid; grid-template-columns: 1fr 150px 40px; gap: 10px; width: 100%; align-items: center; }
.onb-role { width: 150px; }

/* done */
.onb-done { text-align: center; }
.onb-done-mark { width: 68px; height: 68px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  background: color-mix(in srgb, var(--brand) 15%, transparent); color: var(--brand); margin-bottom: 18px; }
.onb-done-mark .ic { font-size: 34px; }
.onb-done .onb-title, .onb-done .onb-sub { text-align: center; }
.onb-summary { margin-top: 22px; border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; text-align: left; }
.onb-sum-row { display: flex; justify-content: space-between; padding: 13px 18px; border-bottom: 1px solid var(--border); }
.onb-sum-row:last-child { border-bottom: none; }
.onb-sum-row .k { font-size: 13.5px; color: var(--muted-foreground); }
.onb-sum-row .v { font-size: 13.5px; font-weight: 600; }

/* actions */
.onb-actions { display: flex; align-items: center; justify-content: space-between; margin-top: 22px; }
.onb-actions-right { display: flex; align-items: center; gap: 16px; }
.onb-progress { font-size: 12.5px; color: var(--muted-foreground); font-variant-numeric: tabular-nums; }

@media (max-width: 620px) {
  .onb-choice-grid, .onb-sol-grid { grid-template-columns: 1fr; }
  .onb-invite { grid-template-columns: 1fr; }
  .onb-role { width: 100%; }
}

/* ============================================================
   TOP-NAV app shell (substitui a sidebar .dash-app).
   Header horizontal fixo: marca à esquerda, busca + menu à direita;
   conteúdo abaixo centralizado (mesma largura do .dash). Reusa tokens.
   ============================================================ */
.topnav-app { display: flex; flex-direction: column; min-height: 100vh; background: var(--background); color: var(--foreground); }
.topnav-bar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between;
  gap: 20px; padding: 12px 32px; border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--background) 88%, transparent); backdrop-filter: blur(8px); }
.topnav-brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; flex: 0 0 auto; }
.topnav-brand-name { color: var(--brand); text-transform: uppercase; letter-spacing: 0.13em; font-size: 10.5px; font-weight: 500; white-space: nowrap; }
.topnav-actions { display: flex; align-items: center; gap: 14px; flex: 0 1 auto; min-width: 0; }
.topnav-main { flex: 1; }
@media (max-width: 620px) {
  .topnav-bar { padding: 12px 18px; }
  .topnav-actions .dapp-search { width: 150px; }
}

/* Perfil (read-only) — lista de pares rótulo/valor dentro de um .card. */
.prof-list { margin: 0; padding: 6px 24px 16px; display: flex; flex-direction: column; }
.prof-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); }
.prof-row:last-child { border-bottom: none; }
.prof-row dt { flex: 0 0 auto; }
.prof-row dd { margin: 0; font-size: 14px; color: var(--foreground); text-align: right; word-break: break-word; min-width: 0; }
