/* E-wallet. Bank colors, no new Tailwind classes required. */
.ew-hero {
  background: linear-gradient(145deg, #06366A 0%, #0A4D8C 58%, #009CDE 140%);
  color: #fff;
  border-radius: 16px;
  padding: 20px 20px 18px;
  box-shadow: 0 12px 40px rgba(10, 77, 140, 0.14);
}
.ew-kicker {
  margin: 0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
}
.ew-total {
  margin: 6px 0 0;
  font-size: 34px;
  line-height: 1.1;
  font-weight: 750;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.ew-note {
  margin: 8px 0 0;
  max-width: 42rem;
  font-size: 12px;
  line-height: 1.45;
  color: rgba(255, 255, 255, 0.82);
}
.ew-actions {
  display: flex;
  gap: 8px;
  margin-top: 16px;
}
.ew-actions button {
  flex: 1;
  min-height: 42px;
  justify-content: center;
}
.ew-asset {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid #E8ECF2;
}
.ew-asset:first-child { border-top: 0; }
.ew-logo {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: block;
  flex: 0 0 auto;
  background: #E8ECF2;
}
.ew-asset-name { font-weight: 650; font-size: 14px; }
.ew-asset-sub { font-size: 12px; color: #414042; margin-top: 1px; }
.ew-asset-amt {
  margin-left: auto;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.ew-asset-qty { font-weight: 700; font-size: 14px; }
.ew-asset-val { font-size: 12px; color: #414042; margin-top: 2px; }
.ew-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}
@media (min-width: 720px) {
  .ew-grid-2 { grid-template-columns: 1fr 1fr; }
}
.ew-preview {
  border: 1px solid #E8ECF2;
  background: rgba(232, 236, 242, 0.45);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
  line-height: 1.45;
  color: #1A1A1A;
}
.ew-recv-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}
@media (min-width: 800px) {
  .ew-recv-layout { grid-template-columns: 220px 1fr; }
}
.ew-qr {
  width: min(220px, 72vw);
  background: #fff;
  border: 1px solid #E8ECF2;
  border-radius: 12px;
  padding: 8px;
}
.ew-qr svg { width: 100%; height: auto; display: block; }
.ew-address {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-all;
  background: #F5F7FA;
  border: 1px solid #E8ECF2;
  border-radius: 12px;
  padding: 12px;
  margin: 0;
}
.ew-wallet-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: flex-start;
  justify-content: space-between;
  padding: 12px 0;
  border-top: 1px solid #E8ECF2;
}
.ew-wallet-row:first-child { border-top: 0; }
.ew-wallet-addr {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  word-break: break-all;
  margin-top: 4px;
}
.ew-row-actions { display: flex; gap: 8px; flex: 0 0 auto; }

.font-semibold .ew-logo { display: inline-block; vertical-align: middle; margin-right: 8px; }

.ew-hero .btn-primary { background: #fff; color: #06366A; }
.ew-hero .btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }

.ew-recv-drawer { width: min(480px, 100%); }
#ew-recv-empty[hidden],
#ew-recv-body[hidden],
#ew-recv-overlay[hidden] { display: none !important; }

button.ew-asset {
  width: 100%;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}
button.ew-asset:hover,
button.ew-asset:focus-visible {
  background: #F4F7FB;
}
#ew-chart-drawer.gc-drawer { width: 100%; }
#ew-chart-bar[hidden] { display: none !important; }
.ew-chart-note {
  margin: 0 0 8px;
  font-size: 13px;
  line-height: 1.45;
  color: #414042;
}
.ew-chart-note:empty { display: none; }
#ew-chart-plot { background: #ffffff; }
.ew-svg-chart {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ffffff;
}
.ew-svg-chart svg {
  display: block;
  width: 100%;
  height: 100%;
  background: #ffffff;
  touch-action: pan-y;
}
.ew-svg-readout {
  position: absolute;
  z-index: 1;
  top: 8px;
  left: 12px;
  padding: 4px 8px;
  border: 1px solid #e6e8eb;
  border-radius: 8px;
  background: #ffffff;
  color: #1a1a1a;
  font-size: 12px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  pointer-events: none;
}
.ew-svg-readout[hidden] { display: none !important; }
/* Cash (USD) has no market series — collapse the empty plot. */
#ew-chart-plot.is-cash-empty {
  height: auto;
  min-height: 0;
  max-height: none;
  overflow: hidden;
  padding: 0;
  margin: 0;
}
#ew-chart-logo { display: flex; align-items: center; }
#ew-chart-logo:empty { display: none; }

.ew-swap-modal {
  width: min(440px, 100%);
  background: #0e1420;
  color: #f4f7fb;
  border-radius: 24px;
  padding: 18px 18px 16px;
  box-shadow: 0 30px 80px rgba(5, 43, 82, 0.45);
  outline: none;
  text-align: left;
}
.ew-swap-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}
.ew-swap-head h2 {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.ew-swap-head p {
  margin: 4px 0 0;
  font-size: 12px;
  line-height: 1.4;
  color: #9aa6b8;
}
.ew-swap-stack { display: flex; flex-direction: column; }
.ew-token {
  background: #1a2230;
  border-radius: 18px;
  padding: 12px 14px 14px;
}
.ew-token-kicker {
  display: block;
  font-size: 12px;
  color: #9aa6b8;
}
.ew-token-line {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
}
.ew-token-pick {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #0e1420;
  border-radius: 999px;
  padding: 4px 12px 4px 4px;
  min-width: 0;
}
.ew-token-pick select {
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  color: #fff;
  border: 0;
  font: inherit;
  font-weight: 750;
  font-size: 16px;
  padding: 0 2px 0 0;
  cursor: pointer;
}
.ew-token-pick select option { color: #111; background: #fff; }
.ew-token-input {
  margin-left: auto;
  width: 46%;
  min-width: 0;
  background: transparent;
  border: 0;
  color: #fff;
  font-size: 26px;
  font-weight: 700;
  text-align: right;
  outline: none;
}
.ew-token-input[readonly] { color: #d5dbe6; cursor: default; }
.ew-token-input::placeholder { color: #6d7888; }
.ew-flip {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 4px solid #0e1420;
  background: #1a2230;
  color: #fff;
  margin: -16px auto;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.ew-flip:hover { background: #243044; }
.ew-swap-preview {
  margin: 14px 2px;
  font-size: 13px;
  line-height: 1.45;
  color: #c5ceda;
}
.ew-swap-confirm {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  background: #3d7eff;
  color: #fff;
  font-weight: 750;
  font-size: 16px;
  cursor: pointer;
}
.ew-swap-confirm:hover { background: #2f6fe8; }
.ew-swap-modal .result-panel { margin-top: 12px; }

.ew-asset-static { cursor: default; }
.ew-asset-static:hover { background: transparent; }
.ew-chart-hold {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin: 8px 0 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: #F4F7FB;
  border: 1px solid #E8ECF2;
  font-variant-numeric: tabular-nums;
}
.ew-chart-hold[hidden] { display: none !important; }
.ew-chart-hold-qty { font-weight: 700; font-size: 14px; color: #1A1A1A; }
.ew-chart-hold-val { margin-left: auto; font-size: 12px; color: #414042; text-align: right; }
