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

:root {
  --bg: #0a0f15;
  --panel: #0e141c;
  --panel-2: #0c1219;
  --panel-3: #0b1016;
  --text: #f4f6f9;
  --muted: #96a0af;
  --blue: #1292f5;
  --blue-soft: #1b5eaa;
  --outline: #1c2736;
  --chip: #222c3b;
  --accent: #18c1f4;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
  margin: 0;
  font-family: "Space Grotesk", "Archivo", sans-serif;
  background: radial-gradient(circle at top, #151c26, #0a0f15 70%);
  color: var(--text);
}

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

.login-screen {
  min-height: 100vh;
  width: 100%;
  display: grid;
  place-items: center;
  background: radial-gradient(circle at top, #141a24, #0a0f15 70%);
}

.login-card {
  width: min(420px, 90vw);
  background: #212a38;
  border: 1px solid #2a3648;
  border-radius: 12px;
  padding: 28px 30px 32px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-align: center;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.4);
}

.login-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.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: 80px 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: linear-gradient(90deg, #0f141d, #0b0f16);
  border-bottom: 1px solid var(--outline);
  position: relative;
}

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

.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #101a25;
  display: grid;
  place-items: center;
  box-shadow: inset 0 0 0 2px #1f2a3a;
}

.brand-mark span {
  font-weight: 700;
  font-size: 14px;
  color: #cfe3ff;
}

.brand-name {
  font-size: 20px;
  font-weight: 600;
  letter-spacing: 0.4px;
}

.brand-accent {
  color: var(--blue);
}

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

.pill-btn {
  padding: 12px 28px;
  border-radius: 999px;
  background: #1f2938;
  border: 1px solid #233149;
  font-weight: 600;
}

.pill-btn.primary {
  background: linear-gradient(120deg, #1292f5, #0b66cc);
  box-shadow: 0 12px 20px rgba(18, 146, 245, 0.35);
}

.pill-btn.secondary {
  background: #232d3b;
}

.pill-btn.ghost {
  padding: 10px 22px;
  background: #1b2330;
}

.pill-btn:disabled,
.pill-btn[disabled] {
  background: #2a3342;
  border-color: #2a3342;
  color: #93a4bd;
  box-shadow: none;
  cursor: not-allowed;
  opacity: 0.85;
}

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

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

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px 22px;
  border-radius: 0;
  color: #c7d1df;
  transition: background 0.2s ease, color 0.2s ease;
}

.nav-item .icon {
  width: 26px;
  height: 26px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: transparent;
  border: 1px solid #1b2535;
  color: #cfe7ff;
}

.nav-item.active {
  background: #202a39;
  color: #fff;
}

.nav-item.active .icon {
  border-color: #2b3a50;
}

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

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

.send-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100%;
  background: linear-gradient(160deg, #0f141d, #0b1018 70%);
  border-left: 1px solid var(--outline);
  transform: translateX(110%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 4;
}

.receive-drawer {
  position: absolute;
  top: 0;
  right: 0;
  width: min(360px, 88vw);
  height: 100%;
  background: linear-gradient(160deg, #0f141d, #0b1018 70%);
  border-left: 1px solid var(--outline);
  transform: translateX(110%);
  transition: transform 0.3s ease;
  display: flex;
  flex-direction: column;
  z-index: 5;
}

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

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

.drawer-header {
  padding: 22px 24px;
  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: 10px;
}

.back-btn {
  width: 34px;
  height: 34px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.back-btn.visible {
  opacity: 1;
  pointer-events: auto;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: #1a2433;
  display: grid;
  place-items: center;
  border: 1px solid #22324a;
}

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

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

.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 #1b2a3f;
  background: #0f1623;
}

.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-size: 13px;
  word-break: break-all;
}

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

.receive-copied.visible {
  opacity: 1;
}

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

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

.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: #0f1623;
  color: var(--text);
  font: inherit;
  cursor: pointer;
}

.asset-option.active {
  background: #2a3648;
}

.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 #233149;
  background: #0c1119;
  color: var(--text);
}

.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 8px;
  border-radius: 999px;
  background: #1a2432;
  border: 1px solid #243148;
  font-size: 11px;
}

.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: #0b6ed3;
  background: #0b6ed3;
  color: #eaf6ff;
}

.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: #4cc2ff;
  font-weight: 600;
}

.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: 18px 22px;
  background: linear-gradient(120deg, #101620, #0d131c);
  border: 1px solid var(--outline);
  border-radius: 8px;
}

.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;
}

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

.asset-table {
  background: var(--panel);
  border-radius: 8px;
  padding: 14px 10px 8px;
  border: 1px solid var(--outline);
}

.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: 34px;
  height: 34px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #0f1a2a;
  border: 1px solid #1f2d42;
  font-weight: 700;
}

.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: 8px;
  padding: 12px 10px 8px;
  border: 1px solid var(--outline);
}

.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: #1ed889;
  font-weight: 600;
}

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

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

.tx-link {
  color: #1aa0ff;
  text-decoration: none;
  font-size: 13px;
}

.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;
}

.avatar-btn {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid #203049;
  background: #0f1724;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.profile-menu {
  position: absolute;
  top: 64px;
  right: 24px;
  width: 260px;
  background: #0f1623;
  border: 1px solid #1b2a3f;
  border-radius: 12px;
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 10px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.4);
  z-index: 10;
}

.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 {
  position: absolute;
  top: 110px;
  right: 24px;
  width: 300px;
  background: #0f1623;
  border: 1px solid #1b2a3f;
  border-radius: 12px;
  padding: 14px;
  display: none;
  flex-direction: column;
  gap: 12px;
  box-shadow: 0 18px 30px rgba(0, 0, 0, 0.4);
  z-index: 11;
}

.change-password.open {
  display: flex;
}

.change-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.change-header h3 {
  margin: 0;
  font-size: 15px;
}

.change-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

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

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

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

.refresh-btn {
  width: 40px;
  height: 40px;
  font-size: 18px;
}

@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;
  }
}
