/* =========================================================================
   Specter Wallet — shared theme
   Dark, near-black canvas with a soft violet accent and big rounded pills —
   the general feel of a modern mobile crypto wallet. No product's actual
   assets, icons, logos, or copy are used here.
   ========================================================================= */

:root{
  --bg:            #131313;
  --bg-2:          #1c1c1c;
  --surface:       #222222;
  --surface-2:     #2a2a2a;
  --surface-3:     #333333;
  --border:        #2e2e2e;
  --border-2:      #3a3a3a;

  --text:          #ffffff;
  --text-dim:      #a9a9a9;
  --text-faint:    #777777;

  --accent:        #ab9ff2;
  --accent-2:      #8a7ff0;
  --accent-ink:    #1c1830;
  --accent-soft:   rgba(171,159,242,0.16);

  --green:         #21e56f;
  --green-soft:    rgba(33,229,111,0.14);
  --red:           #fc6d6d;
  --red-soft:      rgba(252,109,109,0.14);

  --radius-xl:     28px;
  --radius-lg:     20px;
  --radius-md:     14px;
  --radius-sm:     10px;

  --shell-w:       448px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, Helvetica, Arial, sans-serif;
}

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

html, body{
  margin: 0;
  padding: 0;
  background: #0c0c0c;
  color: var(--text);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  font-size: 15px;
}

body{ min-height: 100vh; }

button{ font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea{ font-family: inherit; outline: none; }
a{ color: inherit; text-decoration: none; }

::-webkit-scrollbar{ width: 0; height: 0; }

.mono{ font-variant-numeric: tabular-nums; }
.up{ color: var(--green); }
.down{ color: var(--red); }
.dim{ color: var(--text-dim); }
.faint{ color: var(--text-faint); }
.center{ text-align: center; }
.hidden{ display: none !important; }

/* -------------------------------------------------- phone shell */
.device{
  width: 100%;
  max-width: var(--shell-w);
  margin: 0 auto;
  height: 100vh;
  height: 100dvh;
  background: var(--bg);
  position: relative;
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 60px rgba(0,0,0,0.5);
  overflow: hidden;
}
@media (min-width: 480px){
  .device{
    height: 100vh;
    height: min(920px, calc(100dvh - 48px));
    margin: 24px auto;
    border-radius: 40px;
    border: 1px solid #262626;
  }
}

/* -------------------------------------------------- buttons */
.btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 15px 22px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  transition: transform .08s ease, opacity .15s ease, background .15s ease;
  color: var(--text);
  background: var(--surface-2);
}
.btn:active{ transform: scale(0.97); }
.btn:disabled{ opacity: .4; cursor: not-allowed; }
.btn-primary{ background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover{ background: var(--accent-2); }
.btn-accent-soft{ background: var(--accent-soft); color: var(--accent); }
.btn-ghost{ background: transparent; color: var(--text-dim); }
.btn-ghost:hover{ color: var(--text); }
.btn-danger{ background: var(--red-soft); color: var(--red); }
.btn-block{ width: 100%; }
.btn-lg{ padding: 17px 24px; font-size: 16px; }
.btn-sm{ padding: 9px 14px; font-size: 13px; }

/* -------------------------------------------------- form fields */
.field{ margin-bottom: 14px; }
.field label{
  display: block;
  font-size: 12.5px;
  color: var(--text-dim);
  margin-bottom: 7px;
  font-weight: 600;
}
.field input, .field select, .field textarea{
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 14px 15px;
  border-radius: var(--radius-md);
  font-size: 15px;
}
.field input:focus, .field select:focus, .field textarea:focus{
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
/* the login fields ship readonly (drops browser autofill) until first focus */
.field input[readonly]{ background: var(--surface); color: var(--text); cursor: text; }
.field-error{ color: var(--red); font-size: 12.5px; margin-top: 8px; min-height: 1px; }
.field-hint{ color: var(--text-faint); font-size: 12px; margin-top: 7px; line-height: 1.5; }

/* -------------------------------------------------- pills / chips */
.pill{
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.pill-up{ background: var(--green-soft); color: var(--green); }
.pill-down{ background: var(--red-soft); color: var(--red); }
.pill-flat{ background: var(--surface-3); color: var(--text-dim); }

/* -------------------------------------------------- coin icon */
.coin-icon{
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--surface-3);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  overflow: hidden;
}
.coin-icon.lg{ width: 56px; height: 56px; font-size: 28px; }
.coin-icon.sm{ width: 30px; height: 30px; font-size: 15px; }
img.ci{ width: 1.1em; height: 1.1em; object-fit: cover; border-radius: 50%; vertical-align: -0.18em; }
.coin-icon img.ci{ width: 100%; height: 100%; border-radius: 0; vertical-align: 0; display: block; }
.coin-icon:has(img.ci){ background: none; }

/* -------------------------------------------------- toast */
.toast{
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translateX(-50%) translateY(12px);
  background: var(--surface-2);
  border: 1px solid var(--border-2);
  color: var(--text);
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 14px;
  font-weight: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
  z-index: 9999;
  max-width: 88vw;
  text-align: center;
}
.toast.show{ opacity: 1; transform: translateX(-50%) translateY(0); }

/* -------------------------------------------------- bottom sheet / modal */
.sheet-backdrop{
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(2px);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s ease;
}
.sheet-backdrop.show{ opacity: 1; pointer-events: auto; }
.sheet{
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-bottom: none;
  border-radius: 26px 26px 0 0;
  width: 100%;
  max-width: var(--shell-w);
  padding: 10px 20px calc(30px + env(safe-area-inset-bottom));
  transform: translateY(30px);
  transition: transform .2s ease;
  max-height: 86vh;
  overflow-y: auto;
}
.sheet-backdrop.show .sheet{ transform: translateY(0); }
.sheet-grip{
  width: 38px; height: 4px;
  background: var(--surface-3);
  border-radius: 999px;
  margin: 0 auto 16px;
}
.sheet-title{
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 18px;
}
.sheet-title h3{ margin: 0; font-size: 18px; }
.icon-btn{
  width: 34px; height: 34px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-dim);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px;
  flex-shrink: 0;
}
.icon-btn:hover{ color: var(--text); }

/* -------------------------------------------------- misc */
.empty-state{
  text-align: center;
  color: var(--text-faint);
  font-size: 13.5px;
  line-height: 1.6;
  padding: 34px 16px;
}
.divider{ height: 1px; background: var(--border); border: none; margin: 16px 0; }
.section-label{
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  margin: 4px 0 10px;
  letter-spacing: 0.01em;
}
