@import url("https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@400;500;600;700&display=swap");

:root {
  --bg: #080c12;
  --panel: #0c1118;
  --panel-2: #0a0f16;
  --panel-3: #090d13;
  --text: #eef2f7;
  --muted: #7a8899;
  --blue: #00d4ff;
  --blue-soft: #0088b3;
  --outline: #162030;
  --chip: #1a2535;
  --accent: #00d4ff;
  --accent-glow: rgba(0, 212, 255, 0.18);
  --green: #059669;
  --red: #e11d48;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: 'IBM Plex Sans', sans-serif;
  background: #080c12;
  color: var(--text);
}

body {
  display: flex;
  align-items: stretch;
}

.login-screen {
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  background: #080c12;
}

.login-card {
  width: min(420px, 90vw);
  background: #0e1520;
  border: 1px solid #1a2d42;
  border-radius: 16px;
  padding: 32px 34px 36px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  text-align: center;
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.05), 0 40px 80px rgba(0, 0, 0, 0.6);
}

.login-brand .brand-logo {
  height: 48px;
  width: auto;
}

.login-card h2 {
  margin: 0;
  font-size: 20px;
}

.login-card p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  text-align: left;
}

.login-submit {
  margin-top: 8px;
  width: 100%;
}

button {
  font: inherit;
  color: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

.app {
  display: grid;
  grid-template-columns: 280px 1fr;
  grid-template-rows: 60px 1fr;
  width: 100%;
  min-height: 100vh;
  background: var(--panel-3);
  border: 1px solid #0b0f16;
  position: relative;
  overflow: hidden;
}

.topbar {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
  background: #0a1018;
  border-bottom: 1px solid var(--outline);
  position: relative;
  box-shadow: 0 1px 0 rgba(0, 212, 255, 0.06);
}

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

.brand-logo {
  height: 44px;
  width: auto;
}

.top-actions {
  display: flex;
  align-items: center;
  gap: 16px;
}

.pill-btn {
  padding: 12px 28px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.03em;
  font-size: 14px;
  color: var(--text);
  transition: opacity 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

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

.pill-btn.primary {
  background: #4285F4;
  border-color: transparent;
  box-shadow: 0 8px 24px rgba(66, 133, 244, 0.35);
  color: #fff;
}

.pill-btn.primary:hover:not(:disabled) {
  opacity: 0.82;
  box-shadow: 0 10px 28px rgba(66, 133, 244, 0.45);
  border-color: transparent;
}

.pill-btn.secondary {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.14);
}

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

.pill-btn.ghost {
  padding: 10px 22px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.15);
}

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

.pill-btn:disabled,
.pill-btn[disabled] {
  background: #111820;
  border-color: #1a2535;
  color: #3d5068;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.45;
}

.receive-generate:disabled,
.receive-generate[disabled] {
  background: #0e2040;
  border-color: #1e4070;
  color: #7ab4e0;
  opacity: 1;
  cursor: default;
}

.sidebar {
  padding: 14px 0;
  border-right: 1px solid var(--outline);
  background: var(--panel-2);
}

.nav-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 22px;
  border-radius: 0;
  width: 100%;
  color: rgba(226, 230, 240, 0.65);
  font-size: 15px;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
  border-left: 2px solid transparent;
}

.nav-item:hover:not(.disabled) {
  color: #fff;
  background: rgba(255, 255, 255, 0.04);
}

.nav-item .icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(226, 230, 240, 0.5);
  flex-shrink: 0;
  font-size: 20px;
}

.nav-item .icon svg {
  display: block;
}

.nav-item.active {
  background: rgba(66, 133, 244, 0.08);
  color: #fff;
  border-left-color: #4285F4;
}

.nav-item.active .icon {
  border-color: rgba(66, 133, 244, 0.4);
  color: #4285F4;
}

.nav-item.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.content {
  padding: 24px 30px;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.drawer-overlay {
  position: absolute;
  inset: 0;
  z-index: 3;
  background: transparent;
  display: none;
}

.drawer-overlay.active {
  display: block;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
}

.send-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 96vw);
  height: 100%;
  background: #0c1420;
  border-left: 1px solid rgba(0, 212, 255, 0.08);
  transform: translateX(110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 4;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}

.receive-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 96vw);
  height: 100%;
  background: #0c1420;
  border-left: 1px solid rgba(0, 212, 255, 0.08);
  transform: translateX(110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 5;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}

.receive-drawer.drawer-open {
  transform: translateX(0);
}

.send-drawer.drawer-open {
  transform: translateX(0);
}

.drawer-header {
  padding: 16px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--outline);
}

.drawer-header h2 {
  margin: 0;
  font-size: 20px;
}

.drawer-title {
  display: flex;
  align-items: center;
  gap: 0;
}

.back-btn {
  width: 0;
  height: 34px;
  opacity: 0;
  pointer-events: none;
  overflow: hidden;
  margin: 0;
  padding: 0;
  border: none;
  transition: width 0.2s ease, opacity 0.2s ease, margin-right 0.2s ease;
  margin-right: 0;
}

.back-btn.visible {
  opacity: 1;
  pointer-events: auto;
  width: 34px;
  margin-right: 10px;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #0f1a28;
  display: grid;
  place-items: center;
  border: 1px solid #1c3048;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.icon-btn:hover {
  background: #142038;
  border-color: rgba(0, 212, 255, 0.3);
}

.drawer-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.send-section {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid #172840;
  background: #0a1220;
}

.send-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.select-row {
  width: 100%;
  background: transparent;
  border: none;
  padding: 0;
  text-align: left;
}

.send-amount {
  margin-left: auto;
  text-align: right;
  font-weight: 600;
}

.send-fee {
  margin-left: auto;
}

.send-chevron {
  color: var(--muted);
  font-size: 18px;
}

.receive-section {
  padding: 14px 12px;
  border-radius: 14px;
  border: 1px solid #172840;
  background: #0a1220;
}

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

.receive-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 13px;
}

.receive-address {
  margin-top: 8px;
  color: var(--text);
  font-family: monospace;
  font-size: 14px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.receive-copied {
  margin-top: 6px;
  font-size: 12px;
  color: #4cc2ff;
  opacity: 0;
  transition: opacity 0.2s ease;
}

.receive-copied.visible {
  opacity: 1;
  color: var(--accent);
}

.copy-btn {
  width: 32px;
  height: 32px;
}

.qr-box {
  width: 260px;
  height: 260px;
  margin: 8px auto 0;
  background: #fff;
  border-radius: 8px;
  border: 4px solid #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.qr-box.qr-empty {
  background: #0e2040;
  border-color: #1e4070;
}

.qr-box svg {
  width: 100%;
  height: 100%;
  display: block;
}

.receive-generate {
  margin-top: 8px;
  width: 100%;
}

.asset-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.asset-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 12px;
  border: 1px solid transparent;
  background: #0a1220;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.asset-option:hover {
  background: #0f1a2c;
  border-color: rgba(0, 212, 255, 0.15);
}

.asset-option.active {
  background: rgba(0, 212, 255, 0.08);
  border-color: rgba(0, 212, 255, 0.25);
}

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

.amount-display {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 700;
}

.amount-field {
  display: flex;
  align-items: center;
  gap: 6px;
}

.amount-symbol {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
}

.amount-input {
  background: transparent;
  border: none;
  color: var(--text);
  font-size: 28px;
  font-weight: 700;
  letter-spacing: 1px;
  outline: none;
  width: 100%;
}

.amount-input::placeholder {
  color: #3b4a60;
}

.currency {
  font-size: 28px;
  letter-spacing: 1px;
}

.amount-sub {
  font-size: 12px;
  color: var(--muted);
}

.form-group label {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
}

.text-input {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  border: 1px solid #1a2d42;
  background: #07101a;
  color: var(--text);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  outline: none;
}

.text-input:focus {
  border-color: rgba(0, 212, 255, 0.4);
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.08);
}

.send-submit {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
  width: 100%;
}

.send-submit .arrow {
  font-size: 20px;
}

.hidden {
  display: none;
}

.preview-card {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.preview-flow {
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.preview-arrow {
  font-size: 24px;
  color: var(--text);
}

.preview-address {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  font-size: 13px;
}

.pill-badge {
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(0, 212, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.2);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
}

.preview-actions {
  display: flex;
  gap: 12px;
}

.confirm-panel {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

.confirm-steps {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.confirm-step {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  column-gap: 14px;
  color: var(--text);
  font-size: 14px;
}

.confirm-icon-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  position: relative;
  width: 26px;
}

.confirm-check {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 2px solid #24334a;
  color: transparent;
  display: grid;
  place-items: center;
  font-size: 12px;
  transition: all 0.3s ease;
  position: relative;
  z-index: 1;
}

.confirm-line {
  position: absolute;
  top: 26px;
  left: 50%;
  transform: translateX(-50%);
  width: 2px;
  height: 12px;
  background: #24334a;
  border-radius: 999px;
  z-index: 0;
}

.confirm-check.done {
  border-color: #00b8e0;
  background: #4285F4;
  color: #fff;
  box-shadow: 0 0 10px rgba(66, 133, 244, 0.4);
}

.confirm-summary {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}

.confirm-status {
  color: var(--text);
  font-weight: 700;
  font-size: 17px;
}

.confirm-address {
  color: var(--text);
  font-size: 13px;
}

.confirm-amount {
  color: var(--accent);
  font-weight: 600;
  text-shadow: 0 0 12px rgba(0, 212, 255, 0.4);
}

.confirm-done {
  align-self: center;
  padding: 12px 28px;
}

.confirm-done:disabled {
  background: #2b3545;
  border-color: #2b3545;
  color: #8c97aa;
  box-shadow: none;
  cursor: not-allowed;
}

.balance-card {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 22px 26px;
  background: #0d1925;
  border: 1px solid #162840;
  border-radius: 14px;
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.05) inset, 0 12px 40px rgba(0, 0, 0, 0.4);
}

.balance-title {
  text-transform: uppercase;
  letter-spacing: 3px;
  font-size: 12px;
  color: var(--muted);
}

.balance-amount {
  font-size: clamp(34px, 4vw, 52px);
  font-weight: 700;
  margin-top: 6px;
  color: var(--text);
}

.balance-row {
  display: flex;
  align-items: center;
  gap: 14px;
}

.asset-table {
  background: var(--panel);
  border-radius: 14px;
  padding: 14px 10px 8px;
  border: 1px solid var(--outline);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.asset-header,
.asset-row {
  display: grid;
  grid-template-columns: 2fr 1.4fr 1.2fr 1.4fr;
  gap: 10px;
  align-items: center;
  padding: 12px 16px;
}

.asset-header {
  color: var(--muted);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.asset-row {
  border-top: 1px solid #162030;
}

.asset-name {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
}

.coin-badge {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0b1624;
  border: 1px solid #1a3050;
  font-weight: 700;
  color: var(--accent);
  font-size: 16px;
}

.asset-sub {
  font-size: 12px;
  color: var(--muted);
}

.amount-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.percentage {
  color: #bcd9ff;
}

.price {
  font-weight: 600;
}

.tx-table {
  background: var(--panel);
  border-radius: 14px;
  padding: 12px 10px 8px;
  border: 1px solid var(--outline);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.3);
}

.tx-header,
.tx-row {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr 1fr 1.6fr 1.2fr 1.2fr;
  gap: 12px;
  align-items: center;
  padding: 12px 16px;
}

.tx-header {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 2px;
}

.tx-row {
  border-top: 1px solid #162030;
}

.tx-type {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.tx-icon {
  width: 26px;
  height: 26px;
  border-radius: 8px;
  background: #0f1a28;
  border: 1px solid #1f2d42;
  display: grid;
  place-items: center;
}

.tx-asset {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.tx-value {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.tx-value .pos {
  color: #00c97a;
  font-weight: 600;
}

.tx-value .neg {
  color: #ff4d6a;
  font-weight: 600;
}

.tx-address,
.tx-time {
  color: #c3cfdf;
  font-size: 13px;
}

.tx-link {
  color: var(--accent);
  text-decoration: none;
  font-size: 13px;
  opacity: 0.85;
}

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

.auth-panel {
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.auth-label {
  font-size: 14px;
  color: var(--text);
}

.auth-key {
  font-size: 14px;
  color: var(--muted);
  word-break: break-all;
  max-width: 640px;
}

.auth-btn {
  align-self: flex-start;
  padding: 12px 22px;
}

.auth-btn:disabled,
.auth-btn[disabled] {
  background: #0e2040;
  border-color: #1e4070;
  color: #7ab4e0;
  box-shadow: none;
  opacity: 1;
  cursor: default;
  animation: auth-pulse 1.4s ease-in-out infinite;
}

@keyframes auth-pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.55;
  }
}

.auth-hint {
  font-size: 13px;
  color: #7ab4e0;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: auth-pulse 1.4s ease-in-out infinite;
}

.avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid rgba(0, 212, 255, 0.25);
  background: #0c1828;
  font-weight: 700;
  display: grid;
  place-items: center;
  color: var(--accent);
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.avatar-btn:hover {
  box-shadow: 0 0 0 3px rgba(0, 212, 255, 0.12);
  border-color: rgba(0, 212, 255, 0.4);
}

.profile-menu {
  position: absolute;
  top: 64px;
  right: 24px;
  width: 260px;
  background: #0c1420;
  border: 1px solid #1a2d42;
  border-radius: 14px;
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 0 0 1px rgba(0, 212, 255, 0.06), 0 24px 48px rgba(0, 0, 0, 0.6);
  z-index: 10;
  backdrop-filter: blur(8px);
}

.profile-menu.open {
  display: flex;
}

.profile-user {
  padding: 6px 4px 10px;
  border-bottom: 1px solid #1a2638;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.profile-name {
  font-weight: 600;
  font-size: 14px;
}

.profile-id {
  font-size: 11px;
  color: var(--muted);
}

.profile-link {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 6px;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
}

.profile-link.signout {
  justify-content: flex-start;
  color: #3aa4ff;
}

.change-password-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(480px, 96vw);
  height: 100%;
  background: #0c1420;
  border-left: 1px solid rgba(0, 212, 255, 0.08);
  transform: translateX(110%);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  display: flex;
  flex-direction: column;
  z-index: 6;
  box-shadow: -12px 0 40px rgba(0, 0, 0, 0.5);
}

.change-password-drawer.drawer-open {
  transform: translateX(0);
}

.change-input {
  background: #2a3547;
  border: 1px solid #283446;
  border-radius: 8px;
  padding: 8px 10px;
  color: var(--text);
}

.change-pw-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.change-pw-field label {
  font-size: 12px;
  color: var(--muted);
}

.change-pw-success {
  color: #27c77a;
  font-size: 13px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.change-pw-error {
  color: #e05c5c;
  font-size: 13px;
}

.change-submit {
  margin-top: 6px;
  width: 100%;
}

.refresh-btn {
  width: 40px;
  height: 40px;
  font-size: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.2s, color 0.2s;
}

.refresh-btn i {
  display: block;
  line-height: 1;
}

.refresh-btn.spinning {
  color: var(--accent);
  opacity: 0.7;
  cursor: default;
}

.refresh-btn.spinning i {
  animation: spin 0.7s linear;
  transform-origin: center center;
}

.refresh-ok {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 13px;
  font-weight: 500;
  color: #27c77a;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  pointer-events: none;
  white-space: nowrap;
}

.refresh-ok.visible {
  opacity: 1;
  transform: translateY(0);
}

.refresh-ok i {
  font-size: 15px;
}

@keyframes spin {
  from {
    transform: rotate(0deg);
  }

  to {
    transform: rotate(360deg);
  }
}

@media (max-width: 960px) {
  .app {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 1fr;
    min-height: unset;
  }

  .sidebar {
    border-right: none;
    border-bottom: 1px solid var(--outline);
  }

  .nav-list {
    flex-direction: row;
    flex-wrap: wrap;
  }

  .content {
    padding: 20px;
  }

  .asset-header,
  .asset-row {
    grid-template-columns: 1.6fr 1fr 1fr 1fr;
  }

  .send-drawer {
    width: 100%;
  }
}

@media (max-width: 640px) {
  .topbar {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .top-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: space-between;
  }

  .asset-header {
    display: none;
  }

  .asset-row {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .status-bar {
    width: 100%;
    justify-content: space-between;
  }
}