/* SONARA — Wallet (artista) */

/* ============= HERO ============= */
.w-hero {
  border-radius: 24px;
  border: 1px solid var(--border);
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(123,85,208,0.20) 0%, transparent 55%),
    radial-gradient(120% 100% at 100% 100%, rgba(245,158,11,0.10) 0%, transparent 60%),
    linear-gradient(135deg, oklch(20% 0.04 290) 0%, oklch(15% 0.03 285) 100%);
  padding: 32px;
  position: relative;
  overflow: hidden;
  margin-bottom: 24px;
  color: white;
}
:root:not(.dark) .w-hero {
  background:
    radial-gradient(120% 100% at 0% 0%, rgba(123,85,208,0.18) 0%, transparent 55%),
    radial-gradient(120% 100% at 100% 100%, rgba(245,158,11,0.08) 0%, transparent 60%),
    linear-gradient(135deg, oklch(28% 0.06 290) 0%, oklch(20% 0.05 285) 100%);
  color: white;
}

.w-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(40% 60% at 90% 0%, rgba(255,255,255,0.06) 0%, transparent 60%);
  pointer-events: none;
}

.w-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: end;
}
@media (max-width: 760px) {
  .w-hero { padding: 24px 20px; }
  .w-hero-grid { grid-template-columns: 1fr; align-items: stretch; gap: 20px; }
}

.w-hero-left { min-width: 0; }
.w-hero-label {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.6);
  font-weight: 500;
  margin-bottom: 16px;
}
.w-hero-label .dot {
  width: 6px; height: 6px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34,197,94,0.18);
}
.w-balance {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 64px;
  letter-spacing: -0.04em;
  line-height: 1;
  color: white;
  display: flex; align-items: baseline; gap: 8px;
}
.w-balance .ccy {
  font-size: 32px;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
}
.w-balance .cents {
  font-size: 32px;
  color: rgba(255,255,255,0.55);
  font-weight: 600;
}
@media (max-width: 540px) { .w-balance { font-size: 48px; } .w-balance .ccy, .w-balance .cents { font-size: 24px; } }

.w-hero-meta {
  margin-top: 12px;
  display: flex; align-items: center; gap: 16px;
  flex-wrap: wrap;
  font-size: 13px;
  color: rgba(255,255,255,0.7);
}
.w-hero-meta .chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.12);
  font-size: 12px;
  color: rgba(255,255,255,0.85);
}
.w-hero-meta .chip strong { color: white; font-weight: 600; }

.w-hero-actions {
  display: flex; gap: 10px;
  flex-direction: column;
  align-items: stretch;
  min-width: 220px;
}
@media (max-width: 760px) {
  .w-hero-actions { flex-direction: row; }
  .w-hero-actions > * { flex: 1; }
}

.w-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 46px;
  padding: 0 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 150ms var(--ease-out);
  white-space: nowrap;
}
.w-btn-primary {
  background: white;
  color: #1a0e3e;
  font-weight: 600;
}
.w-btn-primary:hover { background: rgba(255,255,255,0.92); transform: translateY(-1px); box-shadow: 0 10px 24px -10px rgba(0,0,0,0.4); }
.w-btn-secondary {
  background: rgba(255,255,255,0.10);
  color: white;
  border-color: rgba(255,255,255,0.20);
}
.w-btn-secondary:hover { background: rgba(255,255,255,0.18); border-color: rgba(255,255,255,0.30); }

/* Spend bar inside hero */
.w-spend {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.10);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}
@media (max-width: 540px) { .w-spend { grid-template-columns: repeat(3, 1fr); gap: 12px; } }

.w-spend-item .l {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  margin-bottom: 6px;
}
.w-spend-item .v {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  color: white;
  letter-spacing: -0.01em;
  display: inline-flex; align-items: baseline; gap: 4px;
}
.w-spend-item .v .ccy { font-size: 12px; color: rgba(255,255,255,0.55); font-weight: 500; }
.w-spend-item .d {
  font-size: 11px;
  color: rgba(255,255,255,0.55);
  margin-top: 2px;
}
.w-spend-item .d.pos { color: #4ade80; }
.w-spend-item .d.neg { color: #fca5a5; }

/* ============= GRID ============= */
.w-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 1080px) { .w-grid { grid-template-columns: 1fr; } }

.w-grid[data-layout="single"] { grid-template-columns: 1fr; }

.w-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }

/* ============= TX PANEL ============= */
.w-panel {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  overflow: hidden;
}
.w-panel-head {
  padding: 18px 20px 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--border);
}
.w-panel-title {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
  display: inline-flex; align-items: center; gap: 8px;
}
.w-panel-title .count {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 500;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  letter-spacing: 0;
}

.w-filters {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 999px;
  background: var(--muted);
  border: 1px solid var(--border);
}
.w-filter {
  padding: 6px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  color: var(--muted-foreground);
  display: inline-flex; align-items: center; gap: 5px;
  transition: all 150ms var(--ease-out);
  background: transparent;
  border: 0;
  cursor: pointer;
}
.w-filter:hover { color: var(--foreground); }
.w-filter.active {
  background: var(--card);
  color: var(--foreground);
  box-shadow: var(--shadow-sm);
}
.w-filter .num {
  font-size: 10px;
  padding: 1px 5px;
  border-radius: 999px;
  background: var(--muted);
  color: var(--muted-foreground);
  font-weight: 500;
}
.w-filter.active .num { background: var(--muted); }

/* Day group */
.w-day {
  padding: 6px 20px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--muted-foreground);
  font-weight: 500;
  background: color-mix(in oklab, var(--muted) 50%, transparent);
  border-bottom: 1px solid var(--border);
}

.w-tx {
  display: grid;
  grid-template-columns: 36px 1fr auto auto;
  gap: 14px;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 120ms var(--ease-out);
}
.w-tx:last-child { border-bottom: 0; }
.w-tx:hover { background: var(--muted); }

.w-tx-icon {
  width: 36px; height: 36px;
  border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.w-tx-icon.in {
  background: rgba(34,197,94,0.12);
  color: #16a34a;
  border: 1px solid rgba(34,197,94,0.25);
}
.w-tx-icon.out {
  background: rgba(123,85,208,0.10);
  color: var(--violet-bright, #7b55d0);
  border: 1px solid rgba(123,85,208,0.22);
}
.w-tx-icon.refund {
  background: rgba(245,158,11,0.12);
  color: #f59e0b;
  border: 1px solid rgba(245,158,11,0.28);
}
.w-tx-icon.escrow {
  background: rgba(56,189,248,0.10);
  color: #0ea5e9;
  border: 1px solid rgba(56,189,248,0.25);
}

.w-tx-body { min-width: 0; }
.w-tx-row1 {
  display: flex; align-items: center; gap: 8px;
  font-size: 14px;
  color: var(--foreground);
  font-weight: 500;
  margin-bottom: 2px;
}
.w-tx-row1 .label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.w-tx-row1 .badge {
  font-size: 10px;
  padding: 2px 6px;
  border-radius: 999px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.w-tx-row1 .badge.escrow { background: rgba(56,189,248,0.14); color: #0ea5e9; border: 1px solid rgba(56,189,248,0.3); }
.w-tx-row1 .badge.pending { background: rgba(245,158,11,0.14); color: #f59e0b; border: 1px solid rgba(245,158,11,0.3); }
.w-tx-row1 .badge.refunded { background: rgba(34,197,94,0.14); color: #16a34a; border: 1px solid rgba(34,197,94,0.3); }
.w-tx-row2 {
  font-size: 12px;
  color: var(--muted-foreground);
  display: flex; align-items: center; gap: 8px;
  flex-wrap: wrap;
}
.w-tx-row2 .sep { color: color-mix(in oklab, var(--muted-foreground) 50%, transparent); }
.w-tx-row2 strong { color: var(--foreground); font-weight: 500; }

.w-tx-amount {
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
}
.w-tx-amount.in { color: #16a34a; }
.w-tx-amount.out { color: var(--foreground); }
.w-tx-amount.refund { color: #f59e0b; }

.w-tx-arrow {
  color: var(--muted-foreground);
  opacity: 0.4;
  transition: all 150ms var(--ease-out);
}
.w-tx:hover .w-tx-arrow { opacity: 1; transform: translateX(2px); color: var(--foreground); }

@media (max-width: 600px) {
  .w-tx { grid-template-columns: 36px 1fr auto; padding: 12px 16px; }
  .w-tx-arrow { display: none; }
  .w-tx-row1 { font-size: 13px; }
}

.w-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted-foreground);
  font-size: 13px;
}
.w-empty .ic {
  width: 44px; height: 44px;
  margin: 0 auto 12px;
  border-radius: 12px;
  background: rgba(123,85,208,0.10);
  color: var(--violet-bright, #7b55d0);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(123,85,208,0.25);
}

.w-panel-foot {
  padding: 12px 20px;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
  font-size: 12px;
  color: var(--muted-foreground);
}
.w-panel-foot a {
  color: var(--violet-bright, #7b55d0);
  font-weight: 500;
  text-decoration: none;
}
.w-panel-foot a:hover { text-decoration: underline; }

/* ============= METHODS PANEL ============= */
.w-methods-list {
  display: flex; flex-direction: column;
  padding: 8px;
}
.w-method {
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: background 120ms var(--ease-out);
}
.w-method:hover { background: var(--muted); }

.w-card-art {
  width: 48px; height: 32px;
  border-radius: 6px;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-display);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: white;
  flex-shrink: 0;
  position: relative;
  overflow: hidden;
}
.w-card-art.visa {
  background: linear-gradient(135deg, #1a3a8a 0%, #0e1f4d 100%);
}
.w-card-art.visa::before {
  content: 'VISA';
  font-style: italic;
  font-weight: 800;
  font-size: 11px;
  letter-spacing: 0.05em;
}
.w-card-art.mc {
  background: linear-gradient(135deg, #2a2a2a 0%, #0a0a0a 100%);
  position: relative;
}
.w-card-art.mc::before, .w-card-art.mc::after {
  content: '';
  position: absolute;
  width: 14px; height: 14px;
  border-radius: 999px;
}
.w-card-art.mc::before { background: #eb001b; left: 10px; }
.w-card-art.mc::after { background: #f79e1b; right: 10px; mix-blend-mode: lighten; }
.w-card-art.amex {
  background: linear-gradient(135deg, #2e77b8 0%, #1a4a7a 100%);
}
.w-card-art.amex::before {
  content: 'AMEX';
  font-weight: 700;
  font-size: 9px;
  letter-spacing: 0.04em;
}
.w-card-art.applepay {
  background: linear-gradient(135deg, #000 0%, #1a1a1a 100%);
}
.w-card-art.applepay::before {
  content: ' Pay';
  font-size: 11px;
  font-weight: 500;
}

.w-method-body { min-width: 0; }
.w-method-row1 {
  display: flex; align-items: center; gap: 8px;
  font-size: 13.5px;
  color: var(--foreground);
  font-weight: 500;
}
.w-method-row1 .pill {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(123,85,208,0.14);
  color: var(--violet-bright, #7b55d0);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
.w-method-row2 {
  font-size: 11.5px;
  color: var(--muted-foreground);
  margin-top: 2px;
}
.w-method-row2.expiring { color: #f59e0b; }

.w-method-menu {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  color: var(--muted-foreground);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background 120ms;
}
.w-method-menu:hover { background: var(--muted); color: var(--foreground); }

.w-add-method {
  margin: 4px 8px 8px;
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px dashed var(--border);
  background: transparent;
  color: var(--muted-foreground);
  font-size: 13px;
  font-weight: 500;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  cursor: pointer;
  transition: all 150ms var(--ease-out);
}
.w-add-method:hover {
  border-color: var(--violet-bright, #7b55d0);
  color: var(--violet-bright, #7b55d0);
  background: rgba(123,85,208,0.06);
}

/* ============= DOCUMENTS PANEL ============= */
.w-doc-list {
  padding: 8px;
  display: flex; flex-direction: column; gap: 4px;
}
.w-doc {
  display: grid;
  grid-template-columns: 36px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  transition: background 120ms;
}
.w-doc:hover { background: var(--muted); }
.w-doc-icon {
  width: 36px; height: 36px;
  border-radius: 9px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--muted);
  color: var(--muted-foreground);
  border: 1px solid var(--border);
}
.w-doc-body { min-width: 0; }
.w-doc-name {
  font-size: 13px;
  color: var(--foreground);
  font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.w-doc-size {
  font-size: 11px;
  color: var(--muted-foreground);
  margin-top: 1px;
}
.w-doc-dl {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: transparent;
  color: var(--muted-foreground);
  border: 0;
  cursor: pointer;
  transition: all 120ms;
}
.w-doc:hover .w-doc-dl { color: var(--violet-bright, #7b55d0); background: rgba(123,85,208,0.10); }

/* ============= INFO PANEL (light footer info) ============= */
.w-info-panel {
  border-radius: 20px;
  border: 1px solid var(--border);
  background: var(--card);
  padding: 18px 20px;
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 14px;
  align-items: flex-start;
}
.w-info-panel .ic {
  width: 36px; height: 36px;
  border-radius: 10px;
  background: rgba(56,189,248,0.10);
  color: #0ea5e9;
  border: 1px solid rgba(56,189,248,0.25);
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.w-info-panel .t {
  font-size: 14px;
  font-weight: 600;
  color: var(--foreground);
  margin-bottom: 4px;
}
.w-info-panel .s {
  font-size: 13px;
  color: var(--muted-foreground);
  line-height: 1.55;
}
.w-info-panel .s a {
  color: var(--violet-bright, #7b55d0);
  text-decoration: none;
  font-weight: 500;
}
.w-info-panel .s a:hover { text-decoration: underline; }

/* ============= TOPUP MODAL ============= */
.w-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(8,4,20,0.72);
  backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fade-in 200ms ease-out;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }

.w-modal {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 24px;
  width: 100%;
  max-width: 480px;
  overflow: hidden;
  box-shadow: 0 30px 80px -20px rgba(0,0,0,0.6);
  animation: modal-in 250ms cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes modal-in {
  from { transform: translateY(20px) scale(0.96); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}
.w-modal-head {
  padding: 20px 24px 14px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid var(--border);
}
.w-modal-head .t {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--foreground);
}
.w-modal-close {
  width: 32px; height: 32px;
  border-radius: 999px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--muted);
  color: var(--muted-foreground);
  border: 0;
  cursor: pointer;
}
.w-modal-close:hover { background: var(--border); color: var(--foreground); }
.w-modal-body { padding: 22px 24px; }
.w-modal-section + .w-modal-section { margin-top: 22px; }
.w-modal-label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.10em;
  color: var(--muted-foreground);
  font-weight: 500;
  margin-bottom: 10px;
}

.w-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.w-preset {
  padding: 14px 8px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--background);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  color: var(--foreground);
  letter-spacing: -0.01em;
  cursor: pointer;
  transition: all 150ms var(--ease-out);
}
.w-preset:hover {
  border-color: var(--violet-bright, #7b55d0);
  background: rgba(123,85,208,0.06);
}
.w-preset.active {
  border-color: var(--violet-bright, #7b55d0);
  background: rgba(123,85,208,0.10);
  color: var(--violet-bright, #7b55d0);
}

.w-amount-input {
  width: 100%;
  height: 56px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--background);
  padding: 0 16px;
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  color: var(--foreground);
  letter-spacing: -0.01em;
  outline: none;
  transition: border-color 150ms;
}
.w-amount-input:focus { border-color: var(--violet-bright, #7b55d0); }
.w-amount-input::placeholder { color: var(--muted-foreground); }

.w-method-pick {
  display: flex; flex-direction: column; gap: 6px;
}
.w-method-pick-row {
  display: grid;
  grid-template-columns: 20px 48px 1fr;
  gap: 12px;
  align-items: center;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--background);
  cursor: pointer;
  transition: border-color 150ms;
}
.w-method-pick-row:hover { border-color: var(--muted-foreground); }
.w-method-pick-row.checked {
  border-color: var(--violet-bright, #7b55d0);
  background: rgba(123,85,208,0.06);
}
.w-radio {
  width: 18px; height: 18px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--card);
}
.w-method-pick-row.checked .w-radio {
  border-color: var(--violet-bright, #7b55d0);
}
.w-method-pick-row.checked .w-radio::after {
  content: '';
  width: 9px; height: 9px;
  border-radius: 999px;
  background: var(--violet-bright, #7b55d0);
}

.w-modal-foot {
  padding: 16px 24px;
  border-top: 1px solid var(--border);
  background: color-mix(in oklab, var(--muted) 40%, transparent);
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px;
}
.w-modal-foot .summary {
  font-size: 12px;
  color: var(--muted-foreground);
}
.w-modal-foot .summary strong {
  color: var(--foreground);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 14px;
}
.w-modal-confirm {
  height: 42px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--violet, #7b55d0);
  color: white;
  font-weight: 600;
  font-size: 14px;
  border: 0;
  cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
  transition: all 150ms var(--ease-out);
}
.w-modal-confirm:hover { transform: translateY(-1px); box-shadow: var(--shadow-violet-md); }
.w-modal-confirm:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }

/* ============= COMPACT density ============= */
body[data-density="compact"] .w-hero { padding: 24px; }
body[data-density="compact"] .w-balance { font-size: 52px; }
body[data-density="compact"] .w-tx { padding: 10px 16px; }
body[data-density="compact"] .w-panel-head { padding: 14px 18px 10px; }
body[data-density="compact"] .w-method { padding: 10px; }
