/* AniCam Pay Wallet — mobile-first app shell */
:root {
  --w-bg: #f6f7f9;
  --w-card: #ffffff;
  --w-ink: #111111;
  --w-muted: #6b7280;
  --w-line: #e8eaed;
  --w-accent: #ff6a00;
  --w-accent-ink: #ffffff;
  --w-ok: #0f9f6e;
  --w-danger: #d92d20;
  --w-radius: 20px;
  --w-shadow: 0 8px 24px rgba(17, 17, 17, 0.06);
  --w-max: 1120px;
}

.wallet-app {
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--w-bg);
  color: var(--w-ink);
  display: flex;
  flex-direction: column;
  padding-bottom: 72px;
}

.wallet-topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--w-line);
}

.wallet-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--w-ink);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.wallet-brand img {
  border-radius: 8px;
  background: #fff;
  padding: 2px;
}

.wallet-topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.wallet-user-chip {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.85rem;
  color: var(--w-muted);
}

.wallet-link-quiet {
  color: var(--w-accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.85rem;
}

.wallet-shell {
  flex: 1;
  display: flex;
  width: 100%;
  max-width: var(--w-max);
  margin: 0 auto;
}

.wallet-sidebar {
  display: none;
}

.wallet-main {
  flex: 1;
  min-width: 0;
}

.wallet-main-inner {
  padding: 16px;
  padding-bottom: 28px;
}

.wallet-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 50;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: #fff;
  border-top: 1px solid var(--w-line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}

.wallet-bnav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  text-decoration: none;
  color: var(--w-muted);
  font-size: 0.68rem;
  font-weight: 600;
  padding: 6px 2px;
  min-height: 48px;
  justify-content: center;
}

.wallet-bnav-item.active {
  color: var(--w-accent);
}

.wallet-bnav-ico {
  font-size: 1.1rem;
  line-height: 1;
}

/* Cards & typography */
.w-card {
  background: var(--w-card);
  border-radius: var(--w-radius);
  box-shadow: var(--w-shadow);
  border: 1px solid rgba(0, 0, 0, 0.03);
  padding: 18px;
}

.w-card + .w-card {
  margin-top: 14px;
}

.w-hello {
  margin: 0 0 4px;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.03em;
}

.w-sub {
  margin: 0 0 16px;
  color: var(--w-muted);
  font-size: 0.92rem;
}

.w-label {
  display: block;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--w-muted);
  font-weight: 700;
  margin-bottom: 8px;
}

.w-balance {
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.04em;
  margin: 0;
}

.w-reserved {
  margin: 8px 0 0;
  color: var(--w-muted);
  font-size: 0.9rem;
}

.w-seg {
  display: inline-flex;
  background: #eef0f3;
  border-radius: 999px;
  padding: 3px;
  margin-bottom: 14px;
}

.w-seg button {
  border: 0;
  background: transparent;
  padding: 8px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--w-muted);
  min-height: 40px;
  cursor: pointer;
}

.w-seg button.active {
  background: #fff;
  color: var(--w-ink);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.w-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 14px 0;
}

.w-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 14px;
  border: 0;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  font-size: 0.95rem;
}

.w-btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.w-btn--primary {
  background: var(--w-accent);
  color: var(--w-accent-ink);
}

.w-btn--secondary {
  background: #fff;
  color: var(--w-ink);
  border: 1px solid var(--w-line);
}

.w-btn--ghost {
  background: #fff;
  color: var(--w-ink);
  border: 1px solid var(--w-line);
}

.w-btn--danger {
  background: #fff;
  color: var(--w-danger);
  border: 1px solid #f3c4c0;
}

.w-btn--block {
  width: 100%;
}

.w-link {
  color: var(--w-accent);
  font-weight: 700;
  text-decoration: none;
  font-size: 0.9rem;
}

.w-vcard {
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  padding: 18px;
  min-height: 150px;
  background: linear-gradient(145deg, #1a1a1a 0%, #333 55%, #ff6a00 160%);
  color: #fff;
  box-shadow: var(--w-shadow);
}

.w-vcard-brand {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.85;
  font-weight: 700;
}

.w-vcard-kind {
  margin-top: 18px;
  font-size: 0.85rem;
  opacity: 0.8;
}

.w-vcard-pan {
  margin-top: 10px;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.w-vcard-foot {
  margin-top: 18px;
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 12px;
}

.w-vcard-name {
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
}

.w-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(255, 255, 255, 0.18);
}

.w-badge--ok { background: rgba(15, 159, 110, 0.18); color: #067647; }
.w-badge--warn { background: rgba(217, 45, 32, 0.12); color: #b42318; }

.w-tx-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--w-line);
}

.w-tx-row:last-child { border-bottom: 0; }

.w-tx-title { font-weight: 650; margin: 0; font-size: 0.95rem; }
.w-tx-meta { margin: 2px 0 0; color: var(--w-muted); font-size: 0.8rem; }
.w-tx-amt { font-weight: 750; white-space: nowrap; }
.w-tx-amt.pos { color: var(--w-ok); }
.w-tx-amt.neg { color: var(--w-ink); }

.w-field {
  margin-bottom: 14px;
}

.w-field label {
  display: block;
  font-weight: 650;
  font-size: 0.85rem;
  margin-bottom: 6px;
}

.w-input {
  width: 100%;
  min-height: 48px;
  border-radius: 12px;
  border: 1px solid var(--w-line);
  background: #fff;
  padding: 12px 14px;
  font-size: 1rem;
}

.w-input:focus {
  outline: 2px solid rgba(255, 106, 0, 0.35);
  border-color: var(--w-accent);
}

.w-alert {
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 0.9rem;
  margin-bottom: 14px;
}

.w-alert--error { background: #fef3f2; color: #b42318; }
.w-alert--info { background: #fff7ed; color: #9a3412; }
.w-alert--ok { background: #ecfdf3; color: #067647; }

.w-empty {
  text-align: center;
  padding: 28px 12px;
  color: var(--w-muted);
}

.w-spinner {
  width: 28px;
  height: 28px;
  border: 3px solid #eee;
  border-top-color: var(--w-accent);
  border-radius: 50%;
  animation: wspin 0.8s linear infinite;
  margin: 24px auto;
}

@keyframes wspin { to { transform: rotate(360deg); } }

.w-login-wrap {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 16px;
  background: linear-gradient(180deg, #fff 0%, var(--w-bg) 100%);
}

.w-login-card {
  width: 100%;
  max-width: 420px;
  background: #fff;
  border-radius: 24px;
  box-shadow: var(--w-shadow);
  padding: 28px 22px;
  border: 1px solid rgba(0, 0, 0, 0.03);
}

.w-login-logo {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.w-login-logo img {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: #fff;
  padding: 4px;
}

.w-login-title {
  text-align: center;
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.w-login-sub {
  text-align: center;
  color: var(--w-muted);
  margin: 0 0 22px;
  font-size: 0.92rem;
}

.w-login-or {
  text-align: center;
  color: #9ca3af;
  font-size: 0.8rem;
  margin: 18px 0;
  letter-spacing: 0.02em;
}

.w-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  background: #eef0f3;
  border-radius: 12px;
  padding: 4px;
  margin-bottom: 18px;
}

.w-tabs button {
  border: 0;
  background: transparent;
  min-height: 42px;
  border-radius: 10px;
  font-weight: 700;
  color: var(--w-muted);
  cursor: pointer;
}

.w-tabs button.active {
  background: #fff;
  color: var(--w-ink);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.w-quote-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 0;
  font-size: 0.9rem;
}

.w-quote-row span:last-child { font-weight: 700; }

.w-swap {
  display: flex;
  justify-content: center;
  margin: 8px 0;
}

.w-swap button {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--w-line);
  background: #fff;
  font-size: 1.2rem;
  cursor: pointer;
}

@media (min-width: 900px) {
  .wallet-app { padding-bottom: 0; }
  .wallet-bottom-nav { display: none; }
  .wallet-sidebar {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    width: 220px;
    padding: 24px 16px;
    border-right: 1px solid var(--w-line);
    background: rgba(255, 255, 255, 0.55);
    position: sticky;
    top: 57px;
    height: calc(100vh - 57px);
  }
  .wallet-side-nav { display: flex; flex-direction: column; gap: 6px; }
  .wallet-nav-item {
    text-decoration: none;
    color: var(--w-muted);
    font-weight: 650;
    padding: 12px 14px;
    border-radius: 12px;
    min-height: 44px;
  }
  .wallet-nav-item.active,
  .wallet-nav-item:hover {
    background: #fff;
    color: var(--w-ink);
  }
  .wallet-nav-item--mute { color: var(--w-accent); }
  .wallet-main-inner { padding: 28px 24px 40px; }
  .w-balance { font-size: 2.35rem; }
}
