/* ============================================================
   SWS Wallet — wallet.css
   Estilo: light clean, inspirado na referência Coinbase
   Mantém todos os IDs/classes originais intactos
   ============================================================ */

   @import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;500;600;700;800&family=DM+Mono:wght@400;500&display=swap');

   /* ── Tokens ── */
   :root {
     --bg:       #f0eef8;
     --bg2:      #e8e5f5;
     --card:     #ffffff;
     --card2:    #f5f3fc;
     --text:     #0d0d14;
     --text2:    #6b6880;
     --text3:    #a8a4be;
     --line:     rgba(0,0,0,.07);
     --line2:    rgba(0,0,0,.11);
   
     --accent:   #73387d;          /* roxo matching o walletCard       */
     --accent-d: #5a2662;
     --accent-s: rgba(115,56,125,.1);
     --success:  #00b37a;
     --success-s:rgba(0,179,122,.1);
     --danger:   #e5484d;
     --danger-s: rgba(229,72,77,.1);
   
     --shadow:   0 2px 16px rgba(108,92,231,.08), 0 1px 4px rgba(0,0,0,.06);
     --radius:   20px;
     --radius-sm:14px;
     --radius-xs:10px;
     --radius-pill:999px;
   
     --safe-top:    env(safe-area-inset-top, 0px);
     --safe-bottom: env(safe-area-inset-bottom, 0px);
     --safe-left:   env(safe-area-inset-left, 0px);
     --safe-right:  env(safe-area-inset-right, 0px);
   }
   
   /* ── Reset ── */
   *, *::before, *::after {
     box-sizing: border-box;
     -webkit-tap-highlight-color: transparent;
   }
   html, body { height: 100%; overscroll-behavior-y: auto; overscroll-behavior-x: none; }
   body {
     margin: 0;
     background: var(--bg);
     color: var(--text);
     font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif;
     -webkit-font-smoothing: antialiased;
     text-rendering: optimizeLegibility;
     -webkit-overflow-scrolling: touch;
     overflow-x: hidden;
   }
   button, input, select, textarea { font: inherit; -webkit-appearance: none; appearance: none; }
   button { cursor: pointer; border: none; background: none; }
   a { text-decoration: none; color: inherit; }
   ::-webkit-scrollbar { width: 0; }
   
   /* ── App shell ── */
   .appShell { min-height: 100%; }
   .app {
     max-width: 430px;
     margin: 0 auto;
     padding:
       0
       calc(var(--safe-right) + 20px)
       0
       calc(var(--safe-left) + 20px);
   }
   
   /* ── Typography helpers ── */
   .muted  { color: var(--text2); }
   .small  { font-size: 12px; letter-spacing: .02em; }
   .mono   { font-family: 'DM Mono', ui-monospace, monospace; letter-spacing: -.01em; }
   .h1     { font-size: 24px; font-weight: 700; letter-spacing: -.04em; color: var(--text); line-height: 1.05; }
   .h2     { font-size: 18px; font-weight: 700; letter-spacing: -.03em; color: var(--text); line-height: 1.1; }
   .space8 { height: 8px; }  .space10{ height: 10px; }
   .space12{ height: 12px; } .space14{ height: 14px; }
   .full   { width: 100%; }
   
   /* ── Card base ── */
   .card, .kvCard, .homeCardAdd, .previewBox {
     background: var(--card);
     border-radius: var(--radius);
     border: 1px solid var(--line);
   }
   .card      { padding: 20px; box-shadow: var(--shadow); }
   .kvCard    { padding: 14px 18px; }
   .previewBox{ padding: 14px; background: var(--card2); border-color: var(--line2); }
   
   /* ── Inputs ── */
   .input {
     width: 100%;
     border: 1.5px solid var(--line2);
     background: var(--card2);
     color: var(--text);
     border-radius: var(--radius-sm);
     padding: 14px 16px;
     font-size: 16px;          /* ≥16px evita zoom automático no iOS */
     outline: none;
     transition: border-color .16s, box-shadow .16s;
     caret-color: var(--accent);
   }
   .input::placeholder { color: var(--text3); }
   .input:focus {
     border-color: var(--accent);
     box-shadow: 0 0 0 4px rgba(115,56,125,.12);
     background: var(--card);
   }
   textarea.input {
     min-height: 108px;
     resize: none;
     line-height: 1.6;
   }
   select.input {
     padding-right: 40px;
     background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%236b6880' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
     background-repeat: no-repeat;
     background-position: right 14px center;
   }
   
   /* ── Buttons ── */
   .btn {
     border: none;
     border-radius: var(--radius-sm);
     padding: 15px 20px;
     font-size: 15px;
     font-weight: 600;
     letter-spacing: -.01em;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     gap: 8px;
     transition: transform .12s ease, filter .12s ease;
     touch-action: manipulation;
   }
   .btn:active { transform: scale(.97); }
   .btn:not(.secondary):not(.ghost):not(.danger) {
     background: var(--accent);
     color: #fff;
     box-shadow: 0 8px 20px rgba(115,56,125,.28);
   }
   .btn.secondary {
     background: var(--accent-s);
     color: var(--accent-d);
     border: 1px solid rgba(115,56,125,.15);
     box-shadow: none;
   }
   .btn.ghost {
     background: transparent;
     color: var(--text2);
     border: 1.5px solid var(--line2);
     box-shadow: none;
   }
   .btn.ghost:hover { border-color: var(--accent); color: var(--accent); }
   .btn.danger {
     background: var(--danger-s);
     color: var(--danger);
     border: 1px solid rgba(229,72,77,.18);
     box-shadow: none;
   }
   .btn.mini {
     padding: 0 14px;
     height: 44px;
     border-radius: var(--radius-xs);
     font-size: 13px;
   }
   
   .rowBtns { display: flex; gap: 10px; flex-wrap: wrap; }
   .rowBtns .btn { flex: 1 1 0; min-width: 0; }
   .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
   .amountRow { display: flex; gap: 8px; align-items: stretch; }
   .amountRow .input { flex: 1; }
   .amountWrap label { display: block; margin-bottom: 6px; }
   
   /* ── Icon / Nav buttons ── */
   .iconBtn, .navIcon {
     width: 44px; height: 44px;
     border-radius: var(--radius-pill);
     display: inline-flex;
     align-items: center;
     justify-content: center;
     font-size: 22px;
     line-height: 1;
     border: none;
     transition: transform .12s ease, background .14s ease;
     touch-action: manipulation;
   }
   .iconBtn:active, .navIcon:active { transform: scale(.91); }
   .iconBtn {
     background: var(--accent-s);
     color: var(--accent);
   }
   .iconBtn.ghost, .navIcon {
     background: rgba(0,0,0,.06);
     color: var(--text);
     border: 1px solid var(--line);
   }
   .iconBtn.small { width: 38px; height: 38px; font-size: 18px; }
   .iconBtn:disabled { opacity: .35; pointer-events: none; }
   
   /* ════════════════════════════════════════
      HOME VIEW
      ════════════════════════════════════════ */
   #viewHome {
     position: relative;
     min-height: 100dvh;
     padding-top: calc(var(--safe-top) + 96px);
     padding-bottom: calc(var(--safe-bottom) + 24px);
   }
   #viewWallet {
     position: relative;
     min-height: 100dvh;
   }
   .app {
     view-transition-name: app-view;
     isolation: isolate;
     overflow-x: clip;
     contain: none;
   }
   ::view-transition-group(app-view) {
     animation-duration: 300ms;
     animation-timing-function: ease-out;
   }
   html[data-vt="forward"]::view-transition-old(app-view) {
     animation: app-slide-out-left 300ms ease-out both;
   }
   html[data-vt="forward"]::view-transition-new(app-view) {
     animation: app-slide-in-right 300ms ease-out both;
   }
   html[data-vt="back"]::view-transition-old(app-view) {
     animation: app-slide-out-right 300ms ease-out both;
   }
   html[data-vt="back"]::view-transition-new(app-view) {
     animation: app-slide-in-left 300ms ease-out both;
   }
   @keyframes app-slide-in-right {
     from { transform: translateX(100%); opacity: 1; }
     to { transform: translateX(0); opacity: 1; }
   }
   @keyframes app-slide-out-left {
     from { transform: translateX(0); opacity: 1; }
     to { transform: translateX(-20%); opacity: 1; }
   }
   @keyframes app-slide-in-left {
     from { transform: translateX(-20%); opacity: 1; }
     to { transform: translateX(0); opacity: 1; }
   }
   @keyframes app-slide-out-right {
     from { transform: translateX(0); opacity: 1; }
     to { transform: translateX(100%); opacity: 1; }
   }
   
   /* Background mesh — o lilás suave da referência */
   #viewHome {
     position: relative;
   }
   #viewHome::before {
     content: '';
     position: fixed;
     inset: 0;
     background:
       radial-gradient(ellipse 70% 50% at 15% 5%,  rgba(180,160,255,.35) 0%, transparent 65%),
       radial-gradient(ellipse 50% 40% at 90% 0%,   rgba(200,185,255,.22) 0%, transparent 55%),
       radial-gradient(ellipse 60% 60% at 50% 100%, rgba(220,210,255,.18) 0%, transparent 60%);
     pointer-events: none;
     z-index: 0;
   }
   .homeTop { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 22px; }

   .homeTopBar {
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     width: 100%;
     max-width: 430px;
     margin: 0 auto;
     z-index: 40;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 16px;
     padding: calc(var(--safe-top) + 18px) calc(var(--safe-right) + 20px) 14px calc(var(--safe-left) + 20px);
     background: rgba(240,238,248,.97);
     border-bottom: 1px solid var(--line);
   }
   .homeBrand {
     display: inline-flex;
     align-items: center;
     gap: 10px;
     min-height: 48px;
   }
   .homeLogo {
     display: block;
     width: 46px;
     height: 46px;
     object-fit: contain;
   }
   
   /* ── Home header ── */
   .homeHeaderRow {
     display: flex;
     align-items: flex-start;
     justify-content: space-between;
     gap: 16px;
   }
   .homeHeadline { min-width: 0; flex: 1; }
   .homeLabel {
     color: var(--text2);
     font-size: 11px;
     font-weight: 600;
     letter-spacing: .1em;
     text-transform: uppercase;
   }
   .homeTotal {
     margin-top: 8px;
     font-size: clamp(32px, 9.5vw, 46px);
     line-height: .96;
     letter-spacing: -.055em;
     font-weight: 700;
     color: var(--text);
     cursor: pointer;
     word-break: break-word;
     touch-action: manipulation;
   }
   .homeTotal:active { opacity: .7; }
   .homeActions { display: flex; gap: 8px; flex-shrink: 0; }
   
   /* ── Carousel ── */
   .carouselWrap { --wallet-card-peek: clamp(34px, 9vw, 52px); display: flex; flex-direction: column; gap: 14px; }
   .slider {
     position: relative;
     overflow: hidden;
     width: 100%;
     touch-action: pan-y;
     user-select: none;
     -webkit-user-select: none;
     cursor: grab;
   }
   .slider:active { cursor: grabbing; }
   .track {
     display: flex;
     gap: 14px;
     will-change: transform;
     padding: 4px 0;
     transition: transform .3s cubic-bezier(.25,.46,.45,.94);
   }
   
   /* ── Wallet cards (carousel) ── */
   .walletCard {
     position: relative;
     flex: 0 0 calc(100% - var(--wallet-card-peek));
     min-width: calc(100% - var(--wallet-card-peek));
     min-height: 192px;
     border-radius: 26px;
     overflow: hidden;
     cursor: pointer;
     background: linear-gradient(140deg, #b076b9 0%, #73387d 58%, #2d0e33 100%);
     box-shadow: none;
     transition: transform .18s ease;
   }
   .walletCard:active { transform: scale(.98); }
   
   .walletCard::after, .walletHero::after {
     content: "";
     position: absolute;
     right: -50px;
     bottom: -40px;
     width: 150px;
     height: 150px;
     border-radius: 50%;
     background: rgba(255,255,255,.13);
   }
   
   .walletCard::before {
     content: '';
     position: absolute;
     inset: 0;
     background:
       radial-gradient(ellipse 60% 50% at 80% -10%, rgba(255,255,255,.22) 0%, transparent 60%),
       radial-gradient(ellipse 40% 40% at 10% 110%, rgba(255,255,255,.1)  0%, transparent 55%);
     pointer-events: none;
   }
   
   .walletCard .content {
     position: relative;
     z-index: 2;
     display: flex;
     flex-direction: column;
     justify-content: space-between;
     min-height: 192px;
     padding: 22px 22px 20px;
     color: #fff;
   }
   .walletCard .name {
     font-size: 13px;
     font-weight: 600;
     letter-spacing: .02em;
     text-transform: uppercase;
     opacity: .85;
   }
   .walletCard .value {
     margin-top: 4px;
     font-size: clamp(28px, 8vw, 38px);
     line-height: .96;
     font-weight: 700;
     letter-spacing: -.05em;
   }
   .walletCard .sub { font-size: 13px; opacity: .82; }
   .walletCard .sub strong {
     display: block;
     margin-top: 4px;
     font-size: 15px;
     font-weight: 700;
     letter-spacing: -.025em;
   }
   .walletCard .wm {
     position: absolute;
     right: -10px; bottom: -16px;
     font-size: 100px; font-weight: 700;
     line-height: 1;
     color: rgba(255,255,255,.1);
     z-index: 1;
     user-select: none;
     transform: rotate(10deg);
   }
   
   /* Add-wallet card */
   .walletCard.walletCardAdd {
     background: rgba(255,255,255,.6);
     backdrop-filter: blur(12px);
     -webkit-backdrop-filter: blur(12px);
     box-shadow: 0 4px 20px rgba(108,92,231,.1), 0 0 0 1px rgba(108,92,231,.12);
   }
   .walletCard.walletCardAdd .content  { color: var(--text); }
   .walletCard.walletCardAdd .wm       { display: none; }
   .walletCard.walletCardAdd::before   { display: none; }
   .walletCard.walletCardAdd .sub      { color: var(--text2); opacity: 1; }
   .walletCard.walletCardAdd .btnInline{ margin-top: auto; }
   .btnInline { margin-top: 14px; width: max-content; }
   
   /* ── Dots ── */
   .dots { display: flex; justify-content: center; gap: 6px; }
   .dot {
     width: 6px; height: 6px;
     border-radius: var(--radius-pill);
     background: rgba(108,92,231,.2);
     border: none;
     transition: all .2s ease;
   }
   .dot.is-active { width: 18px; background: var(--accent); }
   .sliderNav { display: flex; justify-content: flex-end; gap: 8px; }
   
   /* ── Empty-state add card ── */
   .homeCardAdd {
     padding: 22px;
     display: flex;
     flex-direction: column;
     gap: 12px;
     background: rgba(255,255,255,.7);
     backdrop-filter: blur(12px);
     -webkit-backdrop-filter: blur(12px);
     border: 1px solid rgba(108,92,231,.12);
   }
   .homeAddTitle { font-size: 18px; font-weight: 700; letter-spacing: -.03em; }
   .homeAddSub   { font-size: 14px; line-height: 1.4; color: var(--text2); }
   
   /* ── Home meta / backend selector ── */
   .homeMeta { display: flex; flex-direction: column; gap: 10px; }
   .kvCard {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
     background: rgba(255,255,255,.7);
     backdrop-filter: blur(12px);
     -webkit-backdrop-filter: blur(12px);
     border: 1px solid var(--line);
     box-shadow: none;
   }
   .kvValue       { font-size: 14px; font-weight: 700; }
   .backendSelect { max-width: 178px; font-size: 13px; padding: 10px 38px 10px 14px; }
   
   /* ── Wallet list (hidden, legacy) ── */
   #walletList { display: none; }
   
   
   /* ════════════════════════════════════════
      WALLET DETAIL VIEW
      viewWallet — layout inspirado na referência:
      saldo centralizado, gráfico edge-to-edge,
      seletor de período limpo, hero sem card flutuante
      ════════════════════════════════════════ */
   
   .walletDetail { display: flex; flex-direction: column; gap: 16px; }
   
   /* ── Hero — ocupa toda a largura, fundo gradiente lilás ── */
   .walletHero {
     position: relative;
     overflow: hidden;
     width: 100vw;
     margin: 0 calc(50% - 50vw) 0;
     padding: calc(var(--safe-top) + 82px) 24px 28px;
     background: var(--bg);
     color: var(--text);
   }
   
   /* ── Top bar do hero: voltar + refresh + settings ── */
   .walletHeroTop {
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     width: 100%;
     max-width: 430px;
     margin: 0 auto;
     z-index: 45;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
     padding: calc(var(--safe-top) + 16px) calc(var(--safe-right) + 20px) 14px calc(var(--safe-left) + 20px);
     background: rgba(240,238,248,.97);
     border-bottom: 1px solid var(--line);
   }
   .navCluster { display: flex; gap: 8px; }
   .navIcon {
     width: 38px; height: 38px;
     font-size: 20px;
     color: var(--text);
     background: rgba(255,255,255,.55);
     border: 1px solid rgba(0,0,0,.07);
     backdrop-filter: blur(10px);
     -webkit-backdrop-filter: blur(10px);
   }
   
   /* ── Saldo: centralizado, tipografia grande ── */
   .walletHeroInner {
     position: relative;
     z-index: 3;
     margin-top: 0;
     text-align: center;
   }
   .walletHeroName {
     font-size: 22px;
     font-weight: 700;
     letter-spacing: -.03em;
     color: var(--text);
   }
   .walletHeroValueRow {
     display: flex;
     flex-wrap: wrap;
     align-items: flex-end;
     justify-content: center;     /* ← centralizado */
     gap: 10px;
     margin-top: 8px;
   }
   .walletHeroValue {
     font-size: clamp(32px, 9.5vw, 44px);
     line-height: .95;
     font-weight: 700;
     letter-spacing: -.05em;
     color: var(--text);
   }
   .unitPill {
     border: 1.5px solid rgba(0,0,0,.12);
     border-radius: 10px;
     padding: 8px 12px;
     background: rgba(255,255,255,.55);
     color: var(--text2);
     font-weight: 600;
     font-size: 13px;
     min-width: 60px;
     backdrop-filter: blur(10px);
     -webkit-backdrop-filter: blur(10px);
     transition: background .15s;
   }
   .unitPill:active { background: rgba(255,255,255,.8); }
   
   /* Delta (variação %) — verde embaixo do saldo, centralizado */
   .walletHeroDelta {
     margin-top: 8px;
     min-height: 22px;
     font-size: 15px;
     font-weight: 600;
     color: var(--success);
     text-align: center;
   }
   .deltaUp   { color: var(--success); }
   .deltaDown { color: var(--danger); }
   
   /* ── Gráfico — edge-to-edge, sem borda ── */
   .walletHeroChart {
     position: relative;
     z-index: 3;
     height: 150px;
     margin: 24px -24px 0;       /* sangra até as bordas do hero */
   }
   canvas { display: block; width: 100% !important; height: 100% !important; }
   
   /* ── Seletor de período — limpo, igual à referência ── */
   .seg.heroSeg {
     position: relative;
     z-index: 3;
     display: flex;
     justify-content: center;
     gap: 2px;
     margin-top: 14px;
     padding: 0;
     background: none;            /* sem fundo de cápsula aqui */
   }
   .segBtn {
     border: 1.5px solid rgba(0,0,0,.12);
     border-radius: 10px;
     padding: 8px 12px;
     background: rgba(255,255,255,.55);
     color: var(--text2);
     font-weight: 600;
     font-size: 13px;
     letter-spacing: .01em;
     min-width: 50px;
     font-family: inherit;
     backdrop-filter: blur(10px);
     -webkit-backdrop-filter: blur(10px);
     transition: background .15s, color .15s, border-color .15s;
   }
   .segBtn.active {
     background: rgba(255,255,255,.88);
     color: var(--text);
     border-color: rgba(115,56,125,.25);
   }
   .segBtn:active { background: rgba(255,255,255,.8); }
   
   /* ── Meta / last tx ── */
   .walletHeroMeta,
   .walletHeroLast {
     position: relative;
     z-index: 3;
     margin-top: 10px;
     color: var(--text2);
     font-size: 12px;
     text-align: center;
   }
   .walletHeroWatermark { display: none; }   /* sem watermark no estilo clean */
   
   /* ── "Novo endereço" quick button ── */
   .walletHeroTools {
     position: relative;
     z-index: 3;
     margin-top: 14px;
     display: flex;
     justify-content: center;
   }
   .heroTinyBtn {
     border-radius: var(--radius-pill);
     padding: 9px 18px;
     background: rgba(255,255,255,.6);
     color: var(--accent);
     font-weight: 600;
     font-size: 13px;
     border: 1.5px solid rgba(115,56,125,.2);
     backdrop-filter: blur(10px);
     -webkit-backdrop-filter: blur(10px);
     transition: background .15s;
     font-family: inherit;
   }
   .heroTinyBtn:active { background: rgba(255,255,255,.85); }
   
   /* ── Wallet body (transações) ── */
   .walletBody  { display: flex; flex-direction: column; gap: 12px; padding-bottom: calc(120px + var(--safe-bottom)); }
   .txHeader    { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
   .txListPretty{ margin-top: 6px; }
   
   .txRow {
     display: flex;
     align-items: center;
     gap: 14px;
     padding: 13px 0;
     border-bottom: 1px solid var(--line);
     transition: opacity .12s;
   }
   .txRow:last-child { border-bottom: none; }
   .txRow:active     { opacity: .65; }
   .txIcon.pending { background: rgba(143, 149, 163, .16); color: #8f95a3; }
   .txAmt.pending { color: #8f95a3; }
   .txHash.pendingText { color: #8f95a3; }
   .txMeta.pendingText { color: #a1a7b4; }
   .txPendingDots { width: 20px; height: 6px; display: block; }
   .txPendingDots circle { fill: currentColor; }
   
   .txIcon {
     width: 42px; height: 42px;
     border-radius: 13px;
     display: flex;
     align-items: center;
     justify-content: center;
     font-size: 17px;
     font-weight: 700;
     flex: 0 0 42px;
   }
   .txIcon.recv { background: var(--success-s); color: var(--success); }
   .txIcon.sent { background: var(--danger-s);  color: var(--danger); }
   
   .txLeft   { min-width: 0; flex: 1; }
   .txHash   { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
   .txMeta   { margin-top: 3px; font-size: 12px; color: var(--text2); }
   .txAmt    { font-size: 15px; font-weight: 700; white-space: nowrap; letter-spacing: -.02em; }
   .txAmt.pos{ color: var(--success); }
   .txAmt.neg{ color: var(--danger); }
   
   /* ── Bottom action bar (Receber / Enviar) ── */
   .bottomBar {
     position: fixed;
     left: 20px;
     right: 20px;
     bottom: calc(16px + var(--safe-bottom));
     max-width: 390px;
     margin: 0 auto;
     z-index: 30;
     display: flex;
     gap: 12px;
   }
   .bottomBtn {
     flex: 1;
     padding: 18px 16px;
     border-radius: 22px;
     font-size: 18px;
     font-weight: 700;
     letter-spacing: -.02em;
   }
   .bottomBar .btn.secondary {
     background: linear-gradient(140deg, #b076b9 0%, #73387d 58%, #2d0e33 100%);
     color: #fff;
     border: none;
     box-shadow: 0 8px 24px rgba(45,14,51,.25);
     opacity: .75;
   }
   .bottomBar .btn:not(.secondary) {
     background: linear-gradient(140deg, #b076b9 0%, #73387d 58%, #2d0e33 100%);
     color: #fff;
     border: none;
     box-shadow: 0 8px 24px rgba(45,14,51,.38);
   }
   
   /* ════════════════════════════════════════
      SHEETS (bottom drawers)
      ════════════════════════════════════════ */
   .sheet { position: fixed; inset: 0; display: none; z-index: 60; }
   .sheet.show { display: block; }
   
   .backdrop {
     position: absolute; inset: 0;
     background: rgba(10,8,20,.5);
     backdrop-filter: blur(8px);
     -webkit-backdrop-filter: blur(8px);
     animation: bdIn .22s ease;
   }
   @keyframes bdIn { from { opacity: 0; } to { opacity: 1; } }
   
   .panel {
     position: absolute;
     left: 0; right: 0; bottom: 0;
     max-width: 460px;
     margin: 0 auto;
     padding: 8px 14px calc(var(--safe-bottom) + 16px);
     animation: panelUp .28s cubic-bezier(.32,.72,.0,1);
   }
   #sheetCreate .panel {
     max-height: 100vh;
     overflow-y: auto;
   }
   @keyframes panelUp {
     from { transform: translateY(56px); opacity: 0; }
     to   { transform: translateY(0);    opacity: 1; }
   }
   
   .grab {
     width: 36px; height: 4px;
     border-radius: var(--radius-pill);
     background: rgba(0,0,0,.15);
     margin: 0 auto 14px;
   }
   
   .sheetCard {
     padding: 22px 20px;
     background: var(--card);
     border-radius: 26px;
     border: 1px solid var(--line);
     box-shadow: 0 -1px 0 rgba(255,255,255,.8) inset, 0 32px 64px rgba(0,0,0,.18);
   }
   

   /* ── Add wallet / seed composer ── */
   .sheetTabs {
     display: grid;
     grid-template-columns: 1fr 1fr;
     gap: 8px;
     padding: 6px;
     background: var(--card2);
     border: 1px solid var(--line);
     border-radius: 16px;
   }
   .sheetTab {
     min-height: 42px;
     border-radius: 12px;
     font-size: 14px;
     font-weight: 700;
     color: var(--text2);
     background: transparent;
     transition: background .16s ease, color .16s ease, box-shadow .16s ease;
   }
   .sheetTab.active {
     background: var(--card);
     color: var(--text);
     box-shadow: 0 1px 0 rgba(255,255,255,.7) inset, 0 8px 18px rgba(0,0,0,.06);
   }
   .createPane { display: block; }
   .createPane[hidden] { display: none !important; }
   .sheetRowBetween {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
   }
   .choiceRow {
     display: flex;
     gap: 10px;
     flex-wrap: wrap;
   }
   .choiceCol {
     display: flex;
     flex-direction: column;
     gap: 10px;
   }
   .choicePill {
     min-height: 42px;
     padding: 0 16px;
     border-radius: 999px;
     border: 1.5px solid var(--line2);
     background: var(--card2);
     color: var(--text2);
     font-size: 14px;
     font-weight: 700;
     transition: border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
   }
   .choicePill.active {
     background: var(--accent-s);
     color: var(--accent-d);
     border-color: rgba(115,56,125,.18);
     box-shadow: 0 0 0 3px rgba(115,56,125,.08);
   }
   .choicePillWide {
     width: 100%;
     justify-content: flex-start;
     text-align: left;
     padding: 0 16px;
   }
   .seedComposer {
     margin-top: 8px;
     border: 1px solid rgba(115, 56, 125, .15);
     border-radius: 18px;
     padding: 15px;
     background: rgba(255,255,255,.72);
   }
   .seedGrid {
     display: flex;
     flex-wrap: wrap;
     justify-content: center;
     align-items: flex-start;
     gap: 10px 12px;
   }
   .seedGridDisplay .seedWord {
     width: auto;
     min-width: 0;
     max-width: 100%;
     white-space: nowrap;
   }
   .seedGridInputs .seedWord {
     width: calc(50% - 6px);
     min-width: 0;
   }
   .seedWord {
     min-height: 50px;
     padding: 10px 14px;
     border-radius: 14px;
     background: #f6f6f8;
     border: 1px solid rgba(0,0,0,.04);
     color: #7b808c;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     gap: 7px;
     text-align: center;
     box-sizing: border-box;
   }
   .seedWordIndex {
     font-size: 14px;
     font-weight: 800;
     letter-spacing: -.03em;
     color: #8c919d;
     white-space: nowrap;
   }
   .seedWordText {
     font-size: 14px;
     font-weight: 800;
     letter-spacing: -.02em;
     color: #7b808c;
     line-height: 1.1;
     white-space: nowrap;
   }
   .seedWord.empty .seedWordText { opacity: .45; }
   .seedWordInputWrap {
     padding: 8px 12px;
     justify-content: flex-start;
     gap: 8px;
   }
   .seedWordInput {
     border: none;
     background: transparent;
     flex: 1;
     min-width: 0;
     padding: 0;
     font-size: 14px;
     font-weight: 800;
     letter-spacing: -.02em;
     color: var(--text);
     outline: none;
   }
   .seedWordInput::placeholder { color: #b0b4bf; }
   .seedWordInputWrap:focus-within {
     border-color: rgba(115,56,125,.22);
     box-shadow: 0 0 0 4px rgba(115,56,125,.08);
     background: #fff;
   }
   .advancedAccordion {
     border: 1px solid var(--line);
     border-radius: 18px;
     background: var(--card2);
     overflow: hidden;
   }
   .advancedAccordion summary {
     list-style: none;
     cursor: pointer;
     padding: 14px 16px;
     font-size: 14px;
     font-weight: 800;
     color: var(--text);
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
   }
   .advancedAccordion summary::-webkit-details-marker { display: none; }
   .advancedAccordion summary::after {
     content: '▾';
     font-size: 14px;
     color: var(--text2);
     transition: transform .18s ease;
   }
   .advancedAccordion[open] summary::after { transform: rotate(180deg); }
   .accordionBody {
     padding: 0 16px 16px;
   }
   .btn:disabled,
   button.btn:disabled {
     opacity: .45;
     cursor: not-allowed;
     pointer-events: none;
     box-shadow: none;
   }
   @media (min-width: 420px) {
     .seedGridInputs .seedWord { width: calc(33.333% - 8px); }
   }

   /* ── QR ── */
   .qrWrap { display: flex; justify-content: center; padding: 16px 0 18px; }
   .qr {
     display: flex; align-items: center; justify-content: center;
     padding: 16px; background: #fff;
     border-radius: 20px;
     box-shadow: 0 12px 32px rgba(0,0,0,.12);
   }
   
   /* ── Receive sheet ── */
   .receiveHero {
     padding: 16px;
     border-radius: 16px;
     background: var(--card2);
     border: 1px solid var(--line);
   }
   .receiveQrWrap { padding: 14px 0 8px; }
   
   /* ── Pill badge ── */
   .pillBadge {
     display: inline-flex;
     align-items: center;
     gap: 6px;
     padding: 7px 12px;
     border-radius: var(--radius-pill);
     background: var(--accent-s);
     color: var(--accent-d);
     font-size: 12px;
     font-weight: 700;
     letter-spacing: .02em;
     border: 1px solid rgba(115,56,125,.15);
   }
   
   /* ── Delete card name ── */
   .deleteCardName {
     padding: 13px 16px;
     border-radius: var(--radius-sm);
     background: var(--danger-s);
     border: 1px solid rgba(229,72,77,.18);
     color: var(--danger);
     font-weight: 700;
   }
   
   /* ── Toast ── */
   #toast {
     position: fixed;
     left: 50%;
     bottom: calc(20px + var(--safe-bottom));
     transform: translateX(-50%) translateY(16px);
     background: rgba(13,13,20,.9);
     color: #fff;
     padding: 12px 20px;
     border-radius: var(--radius-pill);
     font-size: 14px;
     font-weight: 600;
     box-shadow: 0 10px 30px rgba(0,0,0,.2), 0 0 0 1px rgba(255,255,255,.06);
     opacity: 0;
     pointer-events: none;
     transition: opacity .2s ease, transform .2s ease;
     z-index: 90;
     max-width: min(90vw, 520px);
     text-align: center;
     backdrop-filter: blur(16px);
     -webkit-backdrop-filter: blur(16px);
   }
   #toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
   
   /* ── Privacy cover ── */
   .privacyCover {
     position: fixed; inset: 0;
     background: rgba(240,238,248,.8);
     backdrop-filter: blur(20px);
     -webkit-backdrop-filter: blur(20px);
     opacity: 0;
     pointer-events: none;
     transition: opacity .2s ease;
     z-index: 110;
   }
   .privacyCover.show { opacity: 1; }
   
   /* ── Focus rings (acessibilidade) ── */
   .homeTotal:focus-visible,
   .iconBtn:focus-visible,
   .navIcon:focus-visible,
   .btn:focus-visible,
   .segBtn:focus-visible,
   .heroTinyBtn:focus-visible {
     outline: 2px solid var(--accent);
     outline-offset: 3px;
   }
   
   /* ── Misc ── */
   .addrTop  { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
   .addrBtns { display: grid; grid-template-columns: repeat(3,1fr); gap: 10px; margin-top: 12px; }
   
   /* ── Responsive ── */
   @media (max-width: 380px) {
     .carouselWrap  { --wallet-card-peek: 32px; }
     .walletCard    { flex-basis: calc(100% - var(--wallet-card-peek)); min-width: calc(100% - var(--wallet-card-peek)); }
     .addrBtns      { grid-template-columns: 1fr; }
     .grid2         { grid-template-columns: 1fr; }
     .walletHeroValue { font-size: 38px; }
     .homeTotal       { font-size: 28px; }
   }

   /* ── Settings views ── */
   .ptr--ptr {
     top: var(--ptr-offset, 0px) !important;
     box-shadow: none !important;
     background: transparent !important;
     z-index: 55 !important;
   }
   .ptr--box {
     box-shadow: none !important;
     background: transparent !important;
   }
   .ptr--text {
     font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', sans-serif !important;
     color: var(--text2) !important;
   }
   .ptr--icon {
     color: var(--accent) !important;
   }

   #viewSettingsMain,
   #viewSettingsNetwork,
   #viewSettingsExplorer {
     position: relative;
     isolation: isolate;
   }
   #viewSettingsMain::before,
   #viewSettingsNetwork::before,
   #viewSettingsExplorer::before {
     content: '';
     position: absolute;
     z-index: -1;
     top: calc(-1 * (var(--safe-top) + 96px));
     right: calc(-1 * (var(--safe-right) + 20px));
     bottom: calc(-1 * (var(--safe-bottom) + 24px));
     left: calc(-1 * (var(--safe-left) + 20px));
     background: var(--bg);
     pointer-events: none;
   }
   .settingsView {
     min-height: 100dvh;
     padding-top: calc(var(--safe-top) + 96px);
     padding-bottom: calc(var(--safe-bottom) + 24px);
   }
   .settingsTopBar, .settingsSubTop {
     position: fixed;
     top: 0;
     left: 0;
     right: 0;
     width: 100%;
     max-width: 430px;
     margin: 0 auto;
     z-index: 40;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
     margin: 0;
     padding: calc(var(--safe-top) + 16px) calc(var(--safe-right) + 20px) 14px calc(var(--safe-left) + 20px);
     background: rgba(240,238,248,.97);
     border-bottom: 1px solid var(--line);
   }
   .settingsSubTitle {
     flex: 1;
     text-align: center;
     font-size: 22px;
     font-weight: 800;
     letter-spacing: -.04em;
     color: var(--text);
   }
   .settingsSubSpacer { width: 44px; flex: 0 0 44px; }
   .settingsBackBtn {
     width: 44px;
     height: 44px;
     border-radius: 999px;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     color: #162d67;
     font-size: 32px;
     line-height: 1;
     background: transparent;
   }
   .settingsTitle {
     font-size: 34px;
     line-height: .95;
     font-weight: 800;
     letter-spacing: -.06em;
     color: var(--text);
     margin-bottom: 20px;
   }
   .settingsSectionLabel {
     color: var(--text3);
     font-size: 15px;
     font-weight: 700;
     margin: 28px 6px 10px;
   }
   .settingsCard {
     background: var(--card);
     border-radius: 24px;
     border: 1px solid rgba(0,0,0,.04);
     box-shadow: none;
   }
   .settingsDonateCard, .settingsSingleCard { padding: 16px 18px; }
   .settingsDonateCard {
     display: flex;
     align-items: center;
     gap: 16px;
     margin-bottom: 18px;
   }
   .settingsGroupCard { overflow: hidden; margin-bottom: 18px; }
   .settingsRow {
     width: 100%;
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 12px;
     padding: 24px 34px 24px 24px;
     background: transparent;
     color: var(--text);
   }
   .settingsGroupCard .settingsRow + .settingsRow { border-top: 1px solid rgba(0,0,0,.06); }
   .settingsRowLeft {
     display: flex;
     align-items: center;
     gap: 16px;
     min-width: 0;
     flex: 1;
   }
   .settingsRowText { min-width: 0; }
   .settingsRowTitle {
     font-size: 19px;
     line-height: 1.1;
     font-weight: 800;
     letter-spacing: -.03em;
     color: #172b63;
   }
   .settingsRowSub {
     margin-top: 6px;
     font-size: 15px;
     line-height: 1.3;
     color: var(--text3);
   }
   .settingsChevron {
     color: #9fa3ae;
     font-size: 34px;
     line-height: 1;
     margin-left: 12px;
   }
   .settingsIconBox {
     width: 38px;
     height: 38px;
     border-radius: 12px;
     display: inline-flex;
     align-items: center;
     justify-content: center;
     font-size: 22px;
     flex: 0 0 38px;
     background: #f1f2f6;
   }
   .iconDonate { background: linear-gradient(180deg,#eff3ff,#cfe0ff); }
   .iconGray { background:#f0f1f5; }
   .iconGreen { background:#e5f5ea; }
   .iconYellow { background:#f7ecd5; }
   .iconRed { background:#f8e6e6; }
   .iconBlue { background:#e4ecfb; }
   .iconPurple { background:#eee8fb; }
   .explorerList .settingsRow { padding-top: 26px; padding-bottom: 26px; }
   .explorerRow.is-active .settingsRowTitle { color: var(--accent); }
   .explorerAdvancedCard, .explorerInputCard { margin-top: 12px; }
   .settingsSwitchRow {
     display: flex;
     align-items: center;
     justify-content: space-between;
     gap: 16px;
   }
   .switchWrap { position: relative; display: inline-flex; align-items: center; }
   .switchWrap input { position: absolute; opacity: 0; pointer-events: none; }
   .switchUi {
     width: 62px;
     height: 36px;
     border-radius: 999px;
     background: #d7dbe6;
     position: relative;
     transition: background .2s ease;
   }
   .switchUi::after {
     content: '';
     position: absolute;
     top: 4px;
     left: 4px;
     width: 28px;
     height: 28px;
     border-radius: 50%;
     background: #fff;
     box-shadow: 0 1px 3px rgba(0,0,0,.15);
     transition: transform .2s ease;
   }
   .switchWrap input:checked + .switchUi { background: #62c96b; }
   .switchWrap input:checked + .switchUi::after { transform: translateX(26px); }
   .settingsTextInput {
     width: 100%;
     border-radius: 18px;
     border: 1.5px solid rgba(0,0,0,.12);
     background: transparent;
     padding: 18px 16px;
     font-size: 16px;
     color: var(--text);
     outline: none;
   }
   .settingsTextInput::placeholder { color: var(--text3); }

/* Tommylabs Bottom Sheet V3 integration (scoped, non-invasive) */
.appSheetTrigger{position:fixed;left:-9999px;top:-9999px;width:1px;height:1px;opacity:0;pointer-events:none;}
.sws-sheet-wrapper .sws-sheet-body{padding:22px 20px calc(var(--safe-bottom) + 16px);text-align:left;}
.sws-sheet-wrapper .sws-sheet-body > *{text-align:left;}
.sws-sheet-wrapper .sheetRowBetween,
.sws-sheet-wrapper .rowBtns,
.sws-sheet-wrapper .choiceRow,
.sws-sheet-wrapper .choiceCol,
.sws-sheet-wrapper .grid2,
.sws-sheet-wrapper .amountRow,
.sws-sheet-wrapper .receiveHero,
.sws-sheet-wrapper .previewBox{max-width:none;}


/* Stable shell/header corrections */
.settingsTitle{margin-top:0;}
.homeTop{position:relative; z-index:1; display:flex; flex-direction:column; gap:22px;}
.sws-close-btn[hidden]{display:none !important;}
