/* ==========================================================================
   VNC WALLET — OBSIDIAN & BRUSHED CHAMPAGNE GOLD DESIGN SYSTEM
   Self-hosted @fontsource .woff2 fonts + Strict CSP (no inline styles)
   ========================================================================== */

@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-vietnamese-400-normal.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-vietnamese-600-normal.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-vietnamese-700-normal.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin-700-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-vietnamese-800-normal.woff2') format('woff2');
  unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+1EA0-1EF9;
}
@font-face {
  font-family: 'Plus Jakarta Sans';
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url('/assets/fonts/plus-jakarta-sans-latin-800-normal.woff2') format('woff2');
}

@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('/assets/fonts/jetbrains-mono-latin-700-normal.woff2') format('woff2');
}

:root {
  --bg-canvas: #07090F;
  --bg-card: #0D121E;
  --bg-elevated: #141B2D;
  --bg-input: #0A0E17;
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-gold: rgba(229, 193, 88, 0.35);
  --gold-light: #E5C158;
  --gold-deep: #C89B3C;
  --gold-gradient: linear-gradient(135deg, #E5C158 0%, #C89B3C 100%);
  --cyan: #38BDF8;
  --emerald: #10B981;
  --coral: #E11D48;
  --amber: #F59E0B;
  --text-main: #F3F4F6;
  --text-muted: #94A3B8;
  --text-dim: #64748B;
  --radius-xl: 22px;
  --radius-lg: 16px;
  --radius-md: 12px;
  --shadow-card: 0 22px 54px -18px rgba(0, 0, 0, 0.78);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  min-height: 100vh;
  background-color: var(--bg-canvas);
  background-image:
    radial-gradient(circle at 15% 0%, rgba(229, 193, 88, 0.08), transparent 45%),
    radial-gradient(circle at 85% 10%, rgba(56, 189, 248, 0.07), transparent 40%);
  color: var(--text-main);
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.mono, code {
  font-family: 'JetBrains Mono', monospace;
}

.tnum {
  font-variant-numeric: tabular-nums;
}

.hidden {
  display: none !important;
}

.app-shell {
  width: 100%;
  max-width: 480px;
  margin: 0 auto;
  min-height: 100vh;
  padding: 16px 16px 96px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.popup-shell {
  padding-bottom: 24px;
}

/* Header */
.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px;
}

.brand-mark {
  display: flex;
  align-items: center;
  gap: 10px;
}

.brand-emblem {
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--gold-gradient);
  color: #090B10;
  font-weight: 800;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 20px rgba(200, 155, 60, 0.28);
  letter-spacing: -0.04em;
}

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

.brand-sub {
  font-size: 11px;
  color: var(--text-muted);
}

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.1);
  border: 1px solid rgba(16, 185, 129, 0.26);
  color: var(--emerald);
  font-size: 11px;
  font-weight: 700;
}

.status-pill.warn {
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.35);
  color: var(--amber);
}

.status-pill.danger {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.35);
  color: #FB7185;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
}

/* Cards & Surfaces */
.card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.card-compact {
  padding: 14px 16px;
  border-radius: var(--radius-lg);
}

.black-card {
  background:
    radial-gradient(circle at 90% 10%, rgba(229, 193, 88, 0.16), transparent 45%),
    linear-gradient(155deg, #121828 0%, #090D16 65%, #0D121E 100%);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 20px;
  box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.85), inset 0 1px 0 rgba(229, 193, 88, 0.18);
  position: relative;
}

.card-kicker {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  font-weight: 700;
}

.hero-usd {
  font-size: 34px;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin-top: 6px;
  background: linear-gradient(180deg, #FFFFFF 0%, #E2E8F0 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.hero-vnc {
  font-size: 14px;
  font-weight: 700;
  color: var(--gold-light);
  margin-top: 2px;
}

/* Form Elements & Buttons */
.field-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-top: 12px;
}

.field-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
}

.input, .select, .textarea {
  width: 100%;
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  outline: none;
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input:focus, .select:focus, .textarea:focus {
  border-color: var(--gold-light);
  box-shadow: 0 0 0 3px rgba(229, 193, 88, 0.12);
}

.textarea {
  resize: vertical;
  min-height: 92px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
}

.btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid var(--border-subtle);
  background: var(--bg-elevated);
  color: var(--text-main);
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  padding: 13px 16px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: transform 0.12s ease, opacity 0.15s ease, border-color 0.15s ease;
}

.btn:hover:not(:disabled) {
  border-color: rgba(255, 255, 255, 0.22);
}

.btn:active:not(:disabled) {
  transform: scale(0.99);
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-gold {
  background: var(--gold-gradient);
  color: #090B10;
  border: none;
  box-shadow: 0 10px 26px rgba(200, 155, 60, 0.25);
}

.btn-outline-gold {
  background: rgba(229, 193, 88, 0.08);
  border-color: var(--border-gold);
  color: var(--gold-light);
}

.btn-danger {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.4);
  color: #FDA4AF;
}

.btn-ghost {
  background: transparent;
  border-color: transparent;
  color: var(--text-muted);
  font-weight: 600;
  padding: 9px 12px;
}

.btn-sm {
  width: auto;
  padding: 6px 11px;
  font-size: 12px;
  border-radius: 9px;
}

.btn-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
}

/* Address Chips & Compartments */
.addr-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

.addr-chip {
  flex: 1;
  min-width: 170px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 11px;
  background: rgba(7, 9, 15, 0.65);
  border: 1px solid var(--border-subtle);
  border-radius: 11px;
  cursor: pointer;
}

.addr-chip.cyan {
  border-color: rgba(56, 189, 248, 0.28);
}

.addr-chip-tag {
  font-size: 10px;
  font-weight: 800;
  padding: 2px 6px;
  border-radius: 5px;
  background: rgba(229, 193, 88, 0.14);
  color: var(--gold-light);
}

.addr-chip.cyan .addr-chip-tag {
  background: rgba(56, 189, 248, 0.14);
  color: var(--cyan);
}

.comp-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.comp-box {
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
}

.comp-box.ngan1 {
  border-color: rgba(56, 189, 248, 0.25);
}

.comp-box.ngan2 {
  border-color: var(--border-gold);
}

.comp-title {
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
}

.comp-val {
  font-size: 17px;
  font-weight: 800;
  margin-top: 4px;
}

.comp-sub {
  font-size: 11px;
  color: var(--text-dim);
  margin-top: 2px;
}

/* Mnemonic 3x4 Blurred Grid */
.seed-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
  transition: filter 0.2s ease;
}

.seed-grid.blurred {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
}

.seed-word {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: 10px;
  padding: 9px 10px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12.5px;
}

.seed-idx {
  color: var(--text-dim);
  font-size: 11px;
  min-width: 18px;
}

.seed-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.choice-pill {
  padding: 8px 13px;
  border-radius: 10px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  cursor: pointer;
}

.choice-pill.selected {
  background: rgba(229, 193, 88, 0.16);
  border-color: var(--gold-light);
  color: var(--gold-light);
}

/* Banners & Alerts */
.notice {
  padding: 11px 13px;
  border-radius: var(--radius-md);
  font-size: 12.5px;
  line-height: 1.5;
  border: 1px solid var(--border-subtle);
  background: rgba(255, 255, 255, 0.03);
  color: var(--text-muted);
}

.notice.gold {
  background: rgba(229, 193, 88, 0.08);
  border-color: var(--border-gold);
  color: #FDE68A;
}

.notice.danger {
  background: rgba(225, 29, 72, 0.12);
  border-color: rgba(225, 29, 72, 0.42);
  color: #FECDD3;
}

.notice.success {
  background: rgba(16, 185, 129, 0.11);
  border-color: rgba(16, 185, 129, 0.36);
  color: #A7F3D0;
}

.notice.cyan {
  background: rgba(56, 189, 248, 0.09);
  border-color: rgba(56, 189, 248, 0.3);
  color: #BAE6FD;
}

/* Bottom Navigation */
.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 480px;
  background: rgba(13, 18, 30, 0.94);
  backdrop-filter: blur(14px);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 8px 6px calc(8px + env(safe-area-inset-bottom));
  z-index: 40;
}

.nav-btn {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 11px;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 6px 4px;
  cursor: pointer;
}

.nav-btn.active {
  color: var(--gold-light);
}

.nav-ico {
  font-size: 16px;
}

/* Price Strip & Review Sheet */
.price-strip {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  font-size: 11.5px;
  color: var(--text-muted);
}

.review-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 13px;
  margin-top: 12px;
  font-size: 12.5px;
  word-break: break-word;
  white-space: pre-wrap;
  max-height: 210px;
  overflow-y: auto;
}

.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 12px;
  font-size: 12.5px;
  color: var(--text-muted);
  cursor: pointer;
}

.checkbox-row input {
  margin-top: 3px;
  accent-color: var(--gold-light);
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 6, 12, 0.8);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  z-index: 90;
}

.modal-card {
  width: 100%;
  max-width: 360px;
  background: var(--bg-card);
  border: 1px solid var(--border-gold);
  border-radius: var(--radius-xl);
  padding: 20px;
  text-align: center;
}

.qr-frame {
  background: #FFFFFF;
  padding: 10px;
  border-radius: 14px;
  display: inline-block;
  margin: 12px auto;
}

.toast {
  position: fixed;
  top: 16px;
  left: 50%;
  transform: translateX(-50%);
  max-width: 420px;
  width: calc(100% - 32px);
  background: #131B2E;
  border: 1px solid var(--border-gold);
  color: var(--text-main);
  padding: 11px 15px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.7);
  z-index: 120;
  text-align: center;
}

