/* Premium wallet — shared by portal + driver-portal */

.wallet-shell {
  display: grid;
  gap: 14px;
  max-width: 560px;
  margin-inline: auto;
}

.wallet-hero {
  position: relative;
  padding: 22px 20px 18px;
  border-radius: 18px;
  background: linear-gradient(145deg, #2e2420 0%, #3d3228 52%, #4a3c30 100%);
  border: 1px solid rgba(201, 146, 63, 0.22);
  box-shadow:
    0 14px 34px rgba(42, 33, 24, 0.22),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--tumicha-text-light, #f2ead8);
  overflow: hidden;
}

.wallet-hero::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--tumicha-gold, #c9923f), transparent);
}

.wallet-hero::after {
  content: '';
  position: absolute;
  top: -40%;
  right: -18%;
  width: 58%;
  height: 120%;
  background: radial-gradient(circle, rgba(201, 146, 63, 0.16) 0%, transparent 68%);
  pointer-events: none;
}

.wallet-hero-label {
  position: relative;
  margin: 0;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--tumicha-cream-muted, #c9b899);
}

.wallet-hero-amount {
  position: relative;
  margin: 6px 0 0;
  font-size: clamp(1.85rem, 6vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.1;
  color: #fff;
}

.wallet-stats {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 16px;
}

.wallet-stat {
  padding: 10px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-align: center;
}

.wallet-stat span {
  display: block;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(242, 234, 216, 0.62);
}

.wallet-stat strong {
  display: block;
  margin-top: 4px;
  font-size: 0.82rem;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-panel {
  border-radius: 16px;
  background: var(--panel, #fff);
  border: 1px solid var(--border, rgba(166, 116, 47, 0.14));
  box-shadow: 0 1px 2px rgba(42, 41, 39, 0.04);
  overflow: hidden;
}

.wallet-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px 10px;
}

.wallet-panel-head h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.wallet-panel-meta {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted, #7a6550);
}

.wallet-tx-scroll {
  max-height: min(42vh, 260px);
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--border, rgba(18, 18, 18, 0.1));
  border-radius: 16px;
  background: var(--panel, #fff);
}

.wallet-tx-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem 0.85rem;
  min-height: 0;
  padding: 0.7rem 0.85rem;
  border: 0;
  border-bottom: 1px solid var(--border, rgba(18, 18, 18, 0.1));
  background: transparent;
}

.wallet-tx-row:last-child {
  border-bottom: none;
}

.wallet-tx-row:hover {
  background: rgba(42, 41, 39, 0.035);
}

.wallet-tx-copy {
  min-width: 0;
}

.wallet-tx-title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1.25;
  color: var(--text, #121212);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-tx-date {
  display: inline-flex;
  margin-top: 0.2rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--muted, #6b6b73);
}

.wallet-tx-amount {
  font-size: 0.84rem;
  font-weight: 750;
  white-space: nowrap;
}

.wallet-tx-amount.is-in {
  color: #1f6b43;
}

.wallet-tx-amount.is-out {
  color: #8b3a34;
}

.wallet-tx-empty {
  padding: 18px 16px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted, #7a6550);
}

.wallet-tx-more {
  display: block;
  width: 100%;
  padding: 10px 16px;
  border: 0;
  border-top: 1px solid var(--border, rgba(166, 116, 47, 0.1));
  background: var(--mist, #f6f4f1);
  color: var(--ink, #121212);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.wallet-tx-more:hover {
  background: #efebe5;
}

.wallet-bank-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  padding: 14px 16px;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.wallet-bank-toggle h3 {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
}

.wallet-bank-toggle span {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--muted, #7a6550);
}

.wallet-bank-chevron {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  color: var(--muted, #7a6550);
  transition: transform 0.18s ease;
}

.wallet-panel.is-open .wallet-bank-chevron {
  transform: rotate(180deg);
}

.wallet-bank-body {
  display: none;
  padding: 0 16px 16px;
  border-top: 1px solid var(--border, rgba(166, 116, 47, 0.1));
}

.wallet-panel.is-open .wallet-bank-body {
  display: block;
}

.wallet-bank-intro {
  margin: 12px 0 10px;
  font-size: 0.82rem;
  line-height: 1.45;
  color: var(--muted, #7a6550);
}

.wallet-bank-saved {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--mist, #f6f4f1);
  font-size: 0.82rem;
  color: var(--text, #2b1a0d);
}

.wallet-form-grid {
  display: grid;
  gap: 10px;
}

.wallet-form-grid label {
  display: grid;
  gap: 5px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted, #7a6550);
}

.wallet-form-grid input {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(166, 116, 47, 0.14));
  background: var(--mist, #f6f4f1);
  color: var(--text, #2b1a0d);
  font: inherit;
  font-size: 0.9rem;
}

.wallet-form-grid input:focus {
  outline: 2px solid rgba(201, 146, 63, 0.35);
  outline-offset: 1px;
}

.wallet-type-field {
  display: grid;
  gap: 6px;
}

.wallet-type-field > span {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted, #7a6550);
}

.wallet-type-pills {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.wallet-type-pill {
  min-height: 38px;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--border, rgba(166, 116, 47, 0.14));
  background: var(--mist, #f6f4f1);
  color: var(--muted, #7a6550);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease;
}

.wallet-type-pill.is-active {
  background: rgba(201, 146, 63, 0.14);
  border-color: rgba(201, 146, 63, 0.45);
  color: var(--ink, #121212);
}

.wallet-form-actions {
  margin-top: 12px;
}

.wallet-form-status {
  margin: 10px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
}

.wallet-form-status.is-error {
  color: #b42318;
}

.wallet-form-status.is-success {
  color: #1f6b43;
}

.wallet-form-hint {
  margin: 8px 0 0;
  font-size: 0.78rem;
  line-height: 1.4;
  color: var(--muted, #7a6550);
}

/* Premium segmented controls (signup, trip type, orders, bank type) */
.account-type-tabs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  padding: 4px;
  border-radius: 14px;
  background: var(--mist, #f6f4f1);
  border: 1px solid var(--border, rgba(166, 116, 47, 0.14));
}

.account-type-btn {
  min-height: 38px;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted, #7a6550);
  font-weight: 600;
  font-size: 0.82rem;
  line-height: 1.2;
  padding: 8px 10px;
  cursor: pointer;
  white-space: nowrap;
  transition:
    background 0.15s ease,
    color 0.15s ease,
    border-color 0.15s ease,
    box-shadow 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.account-type-btn.active {
  background: var(--panel, #fff);
  color: var(--ink, #121212);
  border-color: rgba(166, 116, 47, 0.16);
  box-shadow: 0 1px 3px rgba(42, 41, 39, 0.08);
}

.account-type-hint {
  margin: 10px 0 14px;
  font-size: 0.84rem;
  line-height: 1.45;
  color: var(--muted, #7a6550);
}

@media (max-width: 520px) {
  .wallet-stats {
    grid-template-columns: 1fr;
  }

  .wallet-type-pills {
    grid-template-columns: 1fr;
  }

  .account-type-tabs .account-type-btn {
    font-size: 0.78rem;
    padding: 8px 6px;
  }
}
