/* =============== RESET =============== */
* 
{
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

/* =============== BODY =============== */
body 
{
  background:
    radial-gradient(circle at top, #1d4ed8 0%, #020617 45%, #000000 100%);
  color: #ffffff;
  margin: 0;
  height: 100vh;
  overflow: hidden;
}

/* =============== APP SHELL =============== */
.app-shell
{
  width: 100%;
  max-width: 430px;
  margin-left: auto;
  margin-right: auto;
  height: 100vh;
  background: linear-gradient(145deg, rgba(15,23,42,0.98), rgba(2,6,23,0.98));
  display: flex;
  flex-direction: column;
  position: relative;
  overflow-x: hidden;
  overflow-y: auto;
  border-radius: 0;      /* no rounding */
  border: 1px solid rgba(148,163,184,0.2);
  box-shadow:
    0 40px 120px rgba(15,23,42,0.85),
    0 0 0 1px rgba(51,65,85,0.5);
}

/* nice glow behind app */
.app-shell::before 
{
  content: "";
  position: absolute;
  inset: -120px -60px auto -60px;
  background: radial-gradient(circle at top, rgba(56,189,248,0.25), transparent 60%);
  pointer-events: none;
  z-index: -1;
}

/* =============== TOP BAR =============== */
.top-bar 
{
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  background: linear-gradient(120deg, rgba(15,23,42,0.92), rgba(15,23,42,0.7));
  backdrop-filter: blur(18px);
  border-bottom: 1px solid rgba(30,64,175,0.5);
  position: sticky;
  top: 0;
  z-index: 20;
}

.top-bar-left 
{
  display: flex;
  align-items: center;
}

.top-bar-right 
{
  display: flex;
  align-items: center;
}

.app-logo-circle 
{
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: radial-gradient(circle at 30% 0%, #38bdf8 0%, #1d4ed8 50%, #020617 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  box-shadow:
    0 0 25px rgba(59,130,246,0.85),
    0 8px 18px rgba(15,23,42,0.9);
}

.app-logo-letter 
{
  font-size: 19px;
  font-weight: 700;
  color: #e5f2ff;
}

.app-title-group 
{
  display: flex;
  flex-direction: column;
}

.app-title 
{
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.app-subtitle 
{
  font-size: 12px;
  color: #93c5fd;
  opacity: 0.75;
}

.network-select 
{
  background: radial-gradient(circle at top, #0f172a 0%, #020617 100%);
  border: 1px solid rgba(148,163,184,0.4);
  color: #e5e7eb;
  border-radius: 999px;
  padding: 7px 12px;
  font-size: 13px;
  outline: none;
  box-shadow: 0 0 0 1px rgba(15,23,42,0.9);
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  position: relative;
}

.network-select:focus 
{
  border-color: #60a5fa;
  box-shadow: 0 0 0 1px rgba(96,165,250,0.8);
}

/* =============== MAIN CONTENT =============== */
.main-content 
{
  flex: 1;
  padding: 6px 14px 86px;
}

/* =============== SCREENS =============== */
.screen 
{
  display: none;
  animation: screenFadeUp 260ms ease-out;
}

.active-screen 
{
  display: block;
}

@keyframes screenFadeUp 
{
  from 
  {
    opacity: 0;
    transform: translateY(10px);
  }
  to 
  {
    opacity: 1;
    transform: translateY(0);
  }
}

/* =============== BUTTONS =============== */
.full-width 
{
  width: 100%;
}

.primary-button 
{
  background-image: linear-gradient(135deg, #3b82f6, #22c55e);
  border: none;
  border-radius: 14px;
  padding: 12px 20px;
  color: white;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  box-shadow:
    0 14px 40px rgba(37,99,235,0.6),
    0 0 0 1px rgba(30,64,175,0.6);
  transition:
    transform 150ms ease-out,
    box-shadow 150ms ease-out,
    filter 150ms ease-out;
}

.primary-button::after 
{
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 10% 0%, rgba(255,255,255,0.25), transparent 55%);
  opacity: 0.0;
  transition: opacity 200ms ease-out;
}

.primary-button:hover 
{
  transform: translateY(-1px);
  box-shadow:
    0 18px 50px rgba(37,99,235,0.9),
    0 0 0 1px rgba(59,130,246,0.7);
  filter: brightness(1.02);
}

.primary-button:hover::after 
{
  opacity: 1;
}

.primary-button:active 
{
  transform: translateY(1px) scale(0.99);
  box-shadow:
    0 10px 25px rgba(15,23,42,0.9),
    0 0 0 1px rgba(37,99,235,0.9);
}

.secondary-button 
{
  background: radial-gradient(circle at top left, #020617 0%, #020617 40%, #020617 100%);
  border: 1px solid #1e293b;
  border-radius: 14px;
  padding: 12px 20px;
  color: #e5e7eb;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition:
    background 140ms ease-out,
    border-color 140ms ease-out,
    transform 140ms ease-out;
}

.secondary-button:hover 
{
  background: radial-gradient(circle at top left, #020617 0%, #020617 50%, #020617 100%);
  border-color: #334155;
  transform: translateY(-1px);
}

.secondary-button:active 
{
  transform: translateY(1px);
}

.outline-button 
{
  background-color: transparent;
  border: 1px solid #334155;
  color: #e5e7eb;
  border-radius: 14px;
  padding: 10px 16px;
  font-size: 14px;
  cursor: pointer;
  transition:
    background 140ms ease-out,
    border-color 140ms ease-out,
    transform 140ms ease-out;
}

.outline-button:hover 
{
  background-color: rgba(15,23,42,0.9);
  border-color: #64748b;
  transform: translateY(-1px);
}

.small-outline-button 
{
  background-color: rgba(15,23,42,0.8);
  border: 1px solid #334155;
  border-radius: 999px;
  font-size: 12px;
  padding: 5px 12px;
  color: #e5e7eb;
  cursor: pointer;
  transition:
    background 140ms ease-out,
    border-color 140ms ease-out,
    transform 140ms ease-out;
}

.small-outline-button:hover 
{
  background-color: rgba(30,64,175,0.85);
  border-color: #60a5fa;
  transform: translateY(-1px);
}

/* =============== INPUTS =============== */
.text-input 
{
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(30,64,175,0.35);
  background: radial-gradient(circle at top, #020617 0%, #020617 40%, #020617 100%);
  color: #e5e7eb;
  padding: 10px 12px;
  font-size: 14px;
  outline: none;
  box-shadow:
    0 0 0 1px rgba(15,23,42,0.9),
    inset 0 0 0 1px rgba(15,23,42,0.9);
  transition:
    border-color 140ms ease-out,
    box-shadow 140ms ease-out,
    background 140ms ease-out;
}

.text-input::placeholder 
{
  color: #64748b;
}

.text-input:focus 
{
  border-color: #60a5fa;
  box-shadow:
    0 0 0 1px rgba(46,144,250,0.9),
    0 0 25px rgba(37,99,235,0.25);
  background: radial-gradient(circle at top, #020617 0%, #020617 40%, #020617 100%);
}

.text-area 
{
  width: 100%;
  min-height: 110px;
  border-radius: 14px;
  border: 1px solid rgba(30,64,175,0.35);
  background: radial-gradient(circle at top, #020617 0%, #020617 40%, #020617 100%);
  color: #e5e7eb;
  padding: 10px 12px;
  font-size: 14px;
  resize: vertical;
  outline: none;
}

.text-area::placeholder 
{
  color: #64748b;
}

.text-area:focus 
{
  border-color: #60a5fa;
  box-shadow:
    0 0 0 1px rgba(46,144,250,0.9),
    0 0 25px rgba(37,99,235,0.25);
}

/* =============== WELCOME =============== */
.welcome-card 
{
  margin-top: 22px;
  padding: 18px 4px 10px;
}

.welcome-title 
{
  font-size: 24px;
  font-weight: 700;
  margin-bottom: 8px;
}

.welcome-text 
{
  font-size: 14px;
  color: #9ca3af;
  margin-bottom: 18px;
}

.welcome-hint 
{
  font-size: 13px;
  color: #6b7280;
  margin-top: 14px;
  margin-bottom: 10px;
}

/* =============== INFO CARD =============== */
.info-card 
{
  background: radial-gradient(circle at top left, rgba(30,64,175,0.15), rgba(15,23,42,0.98));
  border-radius: 16px;
  padding: 14px;
  margin-bottom: 16px;
  border: 1px solid rgba(148,163,184,0.35);
  box-shadow: 0 18px 40px rgba(0,0,0,0.55);
}

.warning-card 
{
  border-color: #f97316;
  box-shadow:
    0 18px 40px rgba(0,0,0,0.7),
    0 0 35px rgba(249,115,22,0.25);
}

.info-title 
{
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
}

.info-text 
{
  font-size: 13px;
  color: #cbd5e1;
}

/* =============== SCREEN HEADER =============== */
.screen-header 
{
  display: flex;
  align-items: center;
  margin: 10px 0;
}

.back-button 
{
  background-color: transparent;
  border: none;
  color: #9ca3af;
  font-size: 14px;
  cursor: pointer;
  margin-right: 8px;
  padding: 4px 6px;
  border-radius: 999px;
  transition:
    background 120ms ease-out,
    color 120ms ease-out,
    transform 120ms ease-out;
}

.back-button:hover 
{
  background-color: rgba(148,163,184,0.1);
  color: #e5e7eb;
  transform: translateX(-1px);
}

.screen-title 
{
  font-size: 18px;
  font-weight: 600;
}

/* =============== MNEMONIC BOX =============== */
.mnemonic-box 
{
  background: radial-gradient(circle at top, #020617 0%, #020617 40%, #020617 100%);
  border: 1px solid rgba(15,23,42,0.9);
  border-radius: 18px;
  padding: 16px;
  margin-bottom: 20px;
  min-height: 100px;
  box-shadow:
    0 18px 40px rgba(15,23,42,0.9),
    0 0 0 1px rgba(15,23,42,1);
}

.mnemonic-placeholder 
{
  font-size: 13px;
  color: #64748b;
}

.mnemonic-word 
{
  background: radial-gradient(circle at top left, #0f172a 0%, #020617 100%);
  padding: 6px 10px;
  color: #e5e7eb;
  border-radius: 10px;
  margin: 4px;
  display: inline-block;
  font-size: 13px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.55);
}

/* =============== WALLET HEADER =============== */
.wallet-header-card 
{
  background:
    radial-gradient(circle at 0% 0%, rgba(45,212,191,0.35), transparent 55%),
    radial-gradient(circle at 100% 0%, rgba(59,130,246,0.65), transparent 55%),
    linear-gradient(to bottom right, #020617, #020617);
  border-radius: 20px;
  padding: 16px;
  margin: 12px 0 16px;
  box-shadow:
    0 24px 60px rgba(15,23,42,0.95),
    0 0 0 1px rgba(30,64,175,0.7);
  position: relative;
  overflow: hidden;
}

.wallet-header-card::after 
{
  content: "";
  position: absolute;
  inset: auto -40px -60px -40px;
  background: radial-gradient(circle at bottom, rgba(15,23,42,0.9), transparent 60%);
  opacity: 0.85;
  pointer-events: none;
}

.wallet-header-row 
{
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 8px;
  position: relative;
  z-index: 1;
}

.wallet-label 
{
  font-size: 13px;
  color: #cbd5e1;
}

/* NEW: right side (View address + address text) */
.wallet-header-right 
{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.wallet-balance-row 
{
  position: relative;
  z-index: 1;
}

.wallet-balance-fiat 
{
  font-size: 24px;
  font-weight: 800;
  letter-spacing: 0.03em;
}

.wallet-native-row 
{
  margin-top: 6px;
  position: relative;
  z-index: 1;
}

.wallet-balance-native 
{
  font-size: 14px;
  color: #e5e7eb;
}

.wallet-balance-native-symbol 
{
  font-size: 14px;
  color: #bfdbfe;
  margin-left: 6px;
}

/* address now under button, smaller */
.wallet-address-row 
{
  margin-top: 8px;
  position: relative;
  z-index: 1;
}

.wallet-address-short 
{
  font-size: 11px;
  color: #d1d5db;
  opacity: 0.8;
}

/* =============== CIRCLE ACTION BUTTONS =============== */
.wallet-actions 
{
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  position: relative;
  z-index: 1;
}

.circle-action-button 
{
  width: 80px;
  background-color: transparent;
  border: none;
  text-align: -webkit-center;
  cursor: pointer;
}

.circle-icon 
{
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: radial-gradient(circle at top, rgba(197, 211, 2, 0.95), rgba(15,23,42,0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  box-shadow:
    0 12px 30px rgba(15,23,42,0.9),
    0 0 0 1px rgba(15,23,42,1);
  transition:
    transform 140ms ease-out,
    box-shadow 140ms ease-out,
    background 140ms ease-out;
}

.circle-label 
{
  color: #e5e7eb;
  font-size: 12px;
  margin-top: 6px;
  opacity: 0.9;
}

.circle-action-button:hover .circle-icon 
{
  transform: translateY(-2px) scale(1.03);
  box-shadow:
    0 18px 40px rgba(15,23,42,1),
    0 0 0 1px rgba(59,130,246,0.9);
  background: radial-gradient(circle at top, rgba(30,64,175,0.95), rgba(1, 107, 89, 0.9));
}

/* =============== TABS =============== */
.tabs-row 
{
  display: flex;
  background-color: rgba(15,23,42,0.95);
  border-radius: 16px;
  padding: 4px;
  margin-bottom: 20px;
  box-shadow:
    0 14px 35px rgba(0,0,0,0.7),
    0 0 0 1px rgba(15,23,42,1);
}

.tab-button 
{
  flex: 1;
  background-color: transparent;
  border: none;
  padding: 10px 0;
  color: #6b7280;
  font-weight: 500;
  border-radius: 12px;
  cursor: pointer;
  font-size: 14px;
  position: relative;
  overflow: hidden;
  transition:
    color 150ms ease-out,
    background 150ms ease-out,
    transform 150ms ease-out;
}

.tab-button:hover 
{
  color: #e5e7eb;
  transform: translateY(-1px);
}

.active-tab 
{
  background: radial-gradient(circle at top, #1d4ed8, #0f172a);
  color: #f9fafb;
  box-shadow: 0 10px 25px rgba(15,23,42,0.8);
}

.tab-content 
{
  display: none;
}

.active-tab-content 
{
  display: block;
}

/* =============== TOKENS LIST =============== */
.token-list 
{
  list-style: none;
}

.token-item 
{
  background: radial-gradient(circle at top left, rgba(15,23,42,0.98), rgba(2,6,23,0.99));
  border-radius: 20px;
  padding: 14px 18px;
  margin-bottom: 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border: 1px solid rgba(15,23,42,1);
  box-shadow:
    0 18px 45px rgba(0,0,0,0.95),
    0 0 0 1px rgba(15,23,42,1);
  transition:
    transform 140ms ease-out,
    box-shadow 140ms ease-out,
    border-color 140ms ease-out;
}

.token-item:hover 
{
  transform: translateY(-2px);
  box-shadow:
    0 20px 50px rgba(0,0,0,1),
    0 0 0 1px rgba(37,99,235,0.85);
  border-color: rgba(37,99,235,0.8);
}

.token-left 
{
  display: flex;
  align-items: center;
}

/* ✅ UPDATED: token icon circle now supports logo images */
.token-icon-circle 
{
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background-color: #020617;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 10px;
  overflow: hidden;
  box-shadow:
    0 10px 25px rgba(15,23,42,0.95),
    0 0 0 1px rgba(15,23,42,1);
}

.token-icon-circle img 
{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.token-main 
{
  display: flex;
  flex-direction: column;
}

.token-symbol 
{
  font-size: 15px;
  font-weight: 700;
}

.token-name 
{
  font-size: 12px;
  color: #9ca3af;
}

/* =============== RIGHT SIDE OF TOKEN =============== */
.token-right 
{
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  min-width: 140px;
  text-align: right;
}

.token-top-row 
{
  display: flex;
  align-items: center;
  gap: 8px;
}

.token-fiat 
{
  font-size: 14px;
  font-weight: 700;
}

/* remove token button */
.remove-token-btn 
{
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background-color: #020617;
  border: 1px solid #111827;
  color: #e5e7eb;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  opacity: 0.85;
  transition:
    background 140ms ease-out,
    border-color 140ms ease-out,
    transform 140ms ease-out,
    opacity 140ms ease-out;
}

.remove-token-btn:hover 
{
  background-color: #b91c1c;
  border-color: #fecaca;
  opacity: 1;
  transform: translateY(-1px);
}

.token-balance-row 
{
  margin-top: 4px;
}

.token-balance 
{
  font-size: 13px;
  color: #e5e7eb;
}

.token-change 
{
  font-size: 12px;
  margin-left: 6px;
}

.token-change-positive 
{
  color: #4ade80;
}

.token-change-negative 
{
  color: #f87171;
}

/* =============== EMPTY STATE =============== */
.empty-state 
{
  margin-top: 40px;
  text-align: center;
}

.empty-title 
{
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}

.empty-text 
{
  font-size: 13px;
  color: #64748b;
}

/* =============== BOTTOM NAV =============== */
.bottom-nav 
{
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  background: linear-gradient(145deg, rgba(15,23,42,0.95), rgba(15,23,42,0.8));
  backdrop-filter: blur(20px);
  display: flex;
  justify-content: space-around;
  padding: 8px 6px;
  border-top: 1px solid rgba(30,64,175,0.6);
  z-index: 999;
  box-shadow:
    0 -8px 30px rgba(0,0,0,0.95),
    0 0 0 1px rgba(15,23,42,1);
}

.bottom-nav-item 
{
  text-align: center;
  color: #64748b;
  font-size: 12px;
  background: transparent;
  border: none;
  flex: 1;
  padding: 4px 4px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    color 140ms ease-out,
    background 140ms ease-out,
    transform 140ms ease-out;
}

.bottom-nav-item-active 
{
  color: #f9fafb;
  background: radial-gradient(circle at top, rgba(37,99,235,0.9), rgba(15,23,42,0.95));
  transform: translateY(-1px);
  box-shadow: 0 10px 30px rgba(0,0,0,0.9);
}

.bottom-nav-icon 
{
  display: block;
  font-size: 18px;
  margin-bottom: 2px;
}

.bottom-nav-label 
{
  display: block;
}

/* =============== TOAST =============== */
.toast 
{
  position: fixed;
  bottom: 96px;
  left: 50%;
  transform: translateX(-50%);
  background: radial-gradient(circle at top, #0f172a, #020617);
  padding: 12px 18px;
  border-radius: 999px;
  font-size: 14px;
  opacity: 0;
  transition:
    opacity 200ms ease-out,
    transform 200ms ease-out;
  z-index: 999;
  border: 1px solid rgba(148,163,184,0.4);
  box-shadow:
    0 16px 40px rgba(0,0,0,0.9),
    0 0 0 1px rgba(15,23,42,1);
}

.toast.visible 
{
  opacity: 1;
  transform: translateX(-50%) translateY(-4px);
}

.toast.hidden
{
  display: none !important;
}

/* =============== SEND / RECEIVE =============== */
.field-label 
{
  display: block;
  font-size: 13px;
  color: #cbd5e1;
  margin-top: 10px;
  margin-bottom: 6px;
}

.send-card,
.receive-card 
{
  background: radial-gradient(circle at top left, rgba(15,23,42,0.98), rgba(2,6,23,0.99));
  border-radius: 20px;
  padding: 18px 16px;
  margin-top: 12px;
  box-shadow:
    0 18px 45px rgba(0,0,0,0.95),
    0 0 0 1px rgba(15,23,42,1);
}

.field-row 
{
  display: flex;
  align-items: center;
}

.field-row .text-input 
{
  flex: 1;
  margin-right: 8px;
}

.qr-box 
{
  width: 210px;
  height: 210px;
  margin: 12px auto 20px;
  padding: 12px;
  border-radius: 20px;
  background: #0f172a;
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 25px rgba(0,0,0,0.45),
    inset 0 0 0 1px rgba(255,255,255,0.04);
}

.qr-box canvas 
{
  width: 100% !important;
  height: 100% !important;
  background: #ffffff;
  border-radius: 12px;
}

.receive-address-row 
{
  display: flex;
  align-items: center;
  margin-top: 8px;
}

.receive-address-row .text-input 
{
  flex: 1;
  margin-right: 8px;
}

.sheet-text 
{
  font-size: 14px;
  color: #e5e7eb;
  margin-bottom: 10px;
}

.sheet-hint 
{
  font-size: 13px;
  color: #94a3b8;
  margin-top: 4px;
  margin-bottom: 16px;
}

/* =============== ADD TOKEN ROW =============== */
.add-token-row 
{
  display: flex;
  align-items: center;
  margin-bottom: 12px;
  gap: 8px;
}

.add-token-row .text-input 
{
  flex: 1;
}

/* =============== RESPONSIVE =============== */
@media (min-width: 768px) 
{
  .app-shell 
  {
    margin-top: 24px;
    margin-bottom: 24px;
  }
}

/* =============== HISTORY (SEND / RECEIVE) =============== */
.history-section 
{
  margin-top: 18px;
}

.history-title 
{
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #cbd5e1;
}

.history-list 
{
  list-style-type: none;
}

.history-item 
{
  background: radial-gradient(circle at top left, rgba(15,23,42,0.98), rgba(2,6,23,0.99));
  border-radius: 16px;
  padding: 10px 12px;
  margin-bottom: 8px;
  border: 1px solid rgba(15,23,42,1);
  box-shadow: 0 14px 30px rgba(0,0,0,0.9);
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}

.history-row-top 
{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-row-bottom 
{
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.history-amount 
{
  font-weight: 600;
}

.history-amount-send 
{
  color: #f97373;
}

.history-amount-receive 
{
  color: #4ade80;
}

.history-date 
{
  color: #9ca3af;
}

.history-address 
{
  color: #e5e7eb;
  max-width: 200px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.history-link 
{
  color: #60a5fa;
  text-decoration: none;
  font-size: 12px;
}

.history-link:hover 
{
  text-decoration: underline;
}

.history-empty 
{
  font-size: 12px;
  color: #6b7280;
  padding: 4px 2px;
}
.token-unit-price
{
  font-size: 11px;
  color: #94a3b8;
  margin-top: 2px;
  opacity: 0.9;
}
/* =============== QR SCANNER MODAL =============== */
.scan-modal
{
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.65);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 14px;
  z-index: 2000;
}

.scan-card
{
  width: 100%;
  max-width: 420px;
  background: radial-gradient(circle at top left, rgba(15,23,42,0.98), rgba(2,6,23,0.99));
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 18px;
  padding: 14px;
  box-shadow: 0 24px 70px rgba(0,0,0,0.85);
}

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

.scan-title
{
  font-size: 14px;
  font-weight: 700;
  color: #e5e7eb;
}

.scan-video-wrap
{
  width: 100%;
  border-radius: 18px;
  overflow: hidden;
  background: #000000;
  border: 1px solid rgba(255,255,255,0.08);
}

.hidden
{
  display: none;
}
.scanner-stage
{
  position: relative;
  width: 100%;
  height: 100%;
}

#scanVideo
{
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 16px;
}

.scan-overlay
{
  position: absolute;
  inset: 0;
  pointer-events: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scan-frame
{
  position: relative;
  width: min(72vw, 320px);
  aspect-ratio: 1 / 1;
  border-radius: 18px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.45);
}

.corner
{
  position: absolute;
  width: 34px;
  height: 34px;
  border-color: rgba(255, 255, 255, 0.95);
  border-style: solid;
  border-width: 0;
  filter: drop-shadow(0 2px 6px rgba(0, 0, 0, 0.6));
}

.corner.tl
{
  top: -2px;
  left: -2px;
  border-top-width: 4px;
  border-left-width: 4px;
  border-top-left-radius: 14px;
}

.corner.tr
{
  top: -2px;
  right: -2px;
  border-top-width: 4px;
  border-right-width: 4px;
  border-top-right-radius: 14px;
}

.corner.bl
{
  bottom: -2px;
  left: -2px;
  border-bottom-width: 4px;
  border-left-width: 4px;
  border-bottom-left-radius: 14px;
}

.corner.br
{
  bottom: -2px;
  right: -2px;
  border-bottom-width: 4px;
  border-right-width: 4px;
  border-bottom-right-radius: 14px;
}

.scan-hint
{
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  padding: 10px 14px;
  font-size: 14px;
  color: rgba(255, 255, 255, 0.95);
  background: rgba(0, 0, 0, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  backdrop-filter: blur(6px);
}


.is-hidden
{
  display: none;
}


/* =============== SETTINGS LIST (SECURITY UI) =============== */
.settings-group-title
{
  margin-top: 12px;
  margin-bottom: 10px;
  font-size: 12px;
  color: rgba(148,163,184,0.85);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-list
{
  background: rgba(15,23,42,0.75);
  border: 1px solid rgba(148,163,184,0.18);
  border-radius: 18px;
  overflow: hidden;
  box-shadow:
    0 18px 45px rgba(0,0,0,0.65),
    0 0 0 1px rgba(15,23,42,0.9);
}

.settings-item
{
  cursor: pointer;
  width: 100%;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px;
  background: transparent;
  border: none;
  border-bottom: 1px solid rgba(148,163,184,0.12);
  color: #e5e7eb;
  text-align: left;
}

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

.settings-item:hover
{
  background: rgba(2,6,23,0.55);
}

.settings-icon
{
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: radial-gradient(circle at top, rgba(45,212,191,0.35), rgba(15,23,42,0.92));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex: 0 0 42px;
  box-shadow:
    0 12px 28px rgba(0,0,0,0.6),
    0 0 0 1px rgba(15,23,42,1);
}

.settings-main
{
  display: flex;
  flex-direction: column;
  flex: 1;
  min-width: 0;
}

.settings-title
{
  font-size: 16px;
  font-weight: 700;
}

.settings-subtitle
{
  margin-top: 4px;
  font-size: 13px;
  color: rgba(203,213,225,0.75);
}

.settings-right
{
  display: flex;
  align-items: center;
  gap: 10px;
}

.settings-chevron
{
  font-size: 24px;
  color: rgba(148,163,184,0.7);
  line-height: 1;
}

.settings-panel
{
  margin-top: 14px;
}

.settings-inline-buttons
{
  display: flex;
  gap: 10px;
  margin-top: 8px;
}

/* Toggle */
.toggle
{
  position: relative;
  width: 46px;
  height: 26px;
  display: inline-block;
}

.toggle input
{
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider
{
  position: absolute;
  inset: 0;
  background: rgba(148,163,184,0.25);
  border: 1px solid rgba(148,163,184,0.25);
  border-radius: 999px;
  transition:
    background 150ms ease-out,
    border-color 150ms ease-out;
}

.toggle-slider::after
{
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  border-radius: 999px;
  background: rgba(255,255,255,0.9);
  box-shadow: 0 8px 20px rgba(0,0,0,0.55);
  transition:
    transform 150ms ease-out;
}

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

.toggle input:checked + .toggle-slider::after
{
  transform: translate(20px, -50%);
}


/* =============== SECURITY MODAL =============== */

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

.security-modal.hidden
{
  display: none;
}

.security-card
{
  width: 100%;
  max-width: 360px;
  background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(2,6,23,0.96));
  border: 1px solid rgba(148,163,184,0.22);
  box-shadow:
    0 25px 90px rgba(0,0,0,0.55),
    0 0 0 1px rgba(51,65,85,0.6);
  border-radius: 22px;
  padding: 16px 16px 14px;
  position: relative;  overflow: hidden;
}

.security-back
{
  position: absolute;
  left: 12px;
  top: 12px;
  width: 42px;
  height: 42px;
  border-radius: 14px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(15,23,42,0.6);
  color: #e5e7eb;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
}

.security-head
{
  text-align: center;
  padding-top: 6px;
}

.security-title
{
  font-size: 22px;
  font-weight: 800;
  letter-spacing: 0.01em;
}

.security-subtitle
{
  margin-top: 6px;
  font-size: 13px;
  color: rgba(226,232,240,0.7);
}

.security-provider
{
  margin-top: 14px;
  padding: 12px 12px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.18);
  background: rgba(15,23,42,0.55);
  display: flex;
  align-items: center;
  gap: 10px;
}

.security-provider-badge
{
  font-weight: 900;
  font-size: 18px;
  color: #ff4d4d;
  letter-spacing: 0.02em;
  min-width: 48px;
}

.security-provider-text
{
  font-size: 13px;
  color: rgba(226,232,240,0.85);
}

.security-code
{
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  max-width: 100%;
}


.security-code-input
{
  width: 46px;
  height: 56px;
  flex: 0 0 46px;
  border-radius: 16px;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(2,6,23,0.75);
  color: #ffffff;
  font-size: 20px;
  font-weight: 800;
  text-align: center;
  outline: none;
  padding: 0;
}


.security-code-input:focus
{
  border-color: rgba(96,165,250,0.9);
  box-shadow: 0 0 0 2px rgba(59,130,246,0.25);
}

.security-actions
{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.security-btn
{
  border-radius: 16px;
  padding: 12px 14px;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid rgba(148,163,184,0.22);
  background: rgba(15,23,42,0.45);
  color: rgba(226,232,240,0.95);
}

.security-btn-primary
{
  border: none;
  background-image: linear-gradient(135deg, #3b82f6, #22c55e);
  box-shadow:
    0 12px 35px rgba(37,99,235,0.55),
    0 0 0 1px rgba(30,64,175,0.55);
  color: #ffffff;
}

.security-btn-ghost
{
  background: rgba(15,23,42,0.35);
}

.security-error
{
  margin-top: 10px;
  text-align: center;
  font-size: 13px;
  color: #fb7185;
}

.security-error.hidden
{
  display: none;
}

/* Confirm modal */
.confirm-modal
{
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  z-index: 220;
}

.confirm-modal.hidden
{
  display: none;
}

.confirm-card
{
  width: 100%;
  max-width: 360px;
  background: linear-gradient(145deg, rgba(15,23,42,0.96), rgba(2,6,23,0.96));
  border: 1px solid rgba(148,163,184,0.22);
  border-radius: 22px;
  padding: 16px;
  box-shadow: 0 25px 90px rgba(0,0,0,0.55);
}

.confirm-title
{
  font-size: 18px;
  font-weight: 800;
  text-align: center;
}

.confirm-text
{
  margin-top: 10px;
  font-size: 13px;
  color: rgba(226,232,240,0.85);
  white-space: pre-line;
  text-align: center;
}

.confirm-actions
{
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
