/* BIDZ PAY — Gateway application shell */
:root {
  --blue-50: #eef6fc;
  --blue-100: #d6ebf9;
  --blue-500: #0a7ad1;
  --blue-600: #0670cc;
  --blue-700: #045aa8;
  --blue-800: #034078;
  --blue-900: #0b1f33;
  --grad: linear-gradient(135deg, #0670cc 0%, #00a3e0 100%);
  --ink: #0c1b2a;
  --ink-2: #243b53;
  --muted: #627d98;
  --line: #e2e8f0;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --success: #0d9f6e;
  --success-bg: #e6f7f0;
  --danger: #d14343;
  --danger-bg: #fdecec;
  --warn: #b45309;
  --warn-bg: #fff7ed;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 8px 30px rgba(12, 27, 42, 0.08);
  --shadow-lg: 0 20px 50px rgba(2, 44, 84, 0.14);
  --nav-w: 260px;
  --font: "Inter", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: var(--blue-600);
}

img {
  display: block;
  max-width: 100%;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
}

/* API offline banner */
.api-banner {
  display: none;
  background: #7f1d1d;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  text-align: center;
  line-height: 1.45;
  position: sticky;
  top: 0;
  z-index: 300;
}

.api-banner.show {
  display: block;
}

.api-banner a {
  color: #fde68a;
  font-weight: 700;
}

.api-banner code {
  background: rgba(0, 0, 0, 0.25);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.8rem;
}

.api-banner .muted {
  opacity: 0.85;
  font-size: 0.8rem;
}

/* ——— Auth layout ——— */
.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

.auth-brand {
  background:
    radial-gradient(ellipse 80% 50% at 18% 18%, rgba(0, 163, 224, 0.32), transparent 52%),
    radial-gradient(ellipse 55% 45% at 88% 78%, rgba(6, 112, 204, 0.4), transparent 55%),
    linear-gradient(155deg, #011c38 0%, #023a6b 42%, #0670cc 100%);
  color: #fff;
  padding: clamp(2rem, 4.5vw, 3.5rem) clamp(2rem, 5vw, 4.5rem)
    clamp(1.75rem, 4vw, 2.75rem);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.25rem;
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

.auth-brand::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 60%, rgba(1, 20, 40, 0.25) 100%);
  pointer-events: none;
  z-index: 0;
}

.auth-brand::after {
  content: "";
  position: absolute;
  width: min(520px, 70vw);
  height: min(520px, 70vw);
  border-radius: 50%;
  border: 48px solid rgba(255, 255, 255, 0.055);
  right: -140px;
  bottom: -100px;
  z-index: 0;
}

/* Hero copy — large, vertically + horizontally centered in the brand column */
.auth-brand-hero {
  position: relative;
  z-index: 1;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  max-width: min(40rem, 100%);
  width: 100%;
  margin: 0 auto;
  padding: 0.5rem 0 1rem;
}

/* Staggered fade-in — slow, deliberate */
@keyframes brandIn {
  from {
    opacity: 0;
    transform: translateY(22px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.brand-fade {
  opacity: 0;
  animation: brandIn 1.15s cubic-bezier(0.22, 1, 0.36, 1) forwards;
  animation-delay: var(--d, 0s);
}

@media (prefers-reduced-motion: reduce) {
  .brand-fade {
    opacity: 1;
    animation: none;
    transform: none;
  }
}

.auth-logo {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  font-weight: 800;
  font-size: 1.55rem;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: #fff;
  margin: 0;
  width: fit-content;
  flex-shrink: 0;
}

.auth-logo img {
  width: 58px;
  height: auto;
  filter: drop-shadow(0 6px 16px rgba(0, 0, 0, 0.28));
}

.auth-logo span span {
  color: #7dd3fc;
}

.auth-kicker {
  margin: 0;
  font-size: clamp(0.82rem, 1.1vw, 0.95rem);
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(125, 211, 252, 0.98);
}

.auth-headline,
.auth-brand h1.auth-headline {
  margin: 1.1rem 0 0;
  font-size: clamp(2.65rem, 5.2vw, 4.35rem);
  line-height: 1.05;
  letter-spacing: -0.042em;
  font-weight: 800;
  max-width: 14ch;
  text-wrap: balance;
  text-align: center;
}

/* Sharp underline emphasis on key words */
.auth-headline .em {
  position: relative;
  display: inline;
  white-space: nowrap;
  color: #fff;
}

.auth-headline .em::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0.05em;
  height: 0.13em;
  border-radius: 2px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: underlineDraw 0.85s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.auth-headline .em-speed::after {
  background: #7dd3fc;
  animation-delay: 1.2s;
  box-shadow: 0 0 18px rgba(125, 211, 252, 0.45);
}

.auth-headline .em-trust::after {
  background: #fbbf24;
  animation-delay: 1.55s;
  box-shadow: 0 0 18px rgba(251, 191, 36, 0.4);
}

@keyframes underlineDraw {
  from { transform: scaleX(0); opacity: 0.4; }
  to { transform: scaleX(1); opacity: 1; }
}

.auth-lead {
  margin: 1.5rem 0 0;
  max-width: 34ch;
  color: rgba(255, 255, 255, 0.92);
  font-size: clamp(1.2rem, 1.85vw, 1.55rem);
  line-height: 1.55;
  font-weight: 450;
  text-align: center;
}

.auth-lead .em-line {
  position: relative;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
}

.auth-lead .em-line::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2.5px;
  background: rgba(125, 211, 252, 0.9);
  border-radius: 1px;
  transform-origin: left center;
  transform: scaleX(0);
  animation: underlineDraw 0.65s ease forwards;
  animation-delay: 1.8s;
}

.auth-points {
  list-style: none;
  margin: 2rem auto 0;
  padding: 0;
  display: grid;
  gap: 0.85rem;
  width: fit-content;
  text-align: left;
}

.auth-points li {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-size: clamp(1.12rem, 1.45vw, 1.35rem);
  font-weight: 600;
  color: rgba(255, 255, 255, 0.96);
  letter-spacing: -0.01em;
}

.auth-points .pt-mark {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  background: #7dd3fc;
  box-shadow: 0 0 0 6px rgba(125, 211, 252, 0.22);
  flex-shrink: 0;
}

.auth-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0;
  padding-top: 0.5rem;
  position: relative;
  z-index: 1;
  align-self: stretch;
  flex-shrink: 0;
}

.auth-pills span {
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.16);
  padding: 0.5rem 0.9rem;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  backdrop-filter: blur(6px);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: var(--surface);
}

.auth-card {
  width: min(100%, 420px);
}

.auth-card h2 {
  margin: 0 0 0.35rem;
  font-size: 1.65rem;
  letter-spacing: -0.02em;
}

.auth-card .sub {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.auth-tabs {
  display: flex;
  gap: 0.25rem;
  background: var(--bg);
  padding: 4px;
  border-radius: 999px;
  margin-bottom: 1.5rem;
}

.auth-tabs button {
  flex: 1;
  border: 0;
  background: transparent;
  padding: 0.6rem;
  border-radius: 999px;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
}

.auth-tabs button.active {
  background: #fff;
  color: var(--blue-700);
  box-shadow: 0 2px 8px rgba(12, 27, 42, 0.08);
}

.field {
  margin-bottom: 1rem;
}

.field label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 0.35rem;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 0.75rem 0.9rem;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  outline: none;
  background: #fff;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(6, 112, 204, 0.12);
}

.pin-field input {
  letter-spacing: 0.35em;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  font-size: 1.25rem;
  text-align: center;
}
.pin-modal-card {
  max-width: 420px;
  width: 100%;
}
.pin-summary {
  background: var(--blue-50, #eef6fc);
  border: 1px solid var(--blue-100, #d6ebf9);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  display: grid;
  gap: 0.45rem;
}
.pin-summary-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  font-size: 0.92rem;
  color: var(--ink-2, #334);
}
.pin-summary-row strong {
  color: var(--ink, #0b1b2b);
  font-variant-numeric: tabular-nums;
  text-align: right;
}
.pin-summary-total {
  margin-top: 0.25rem;
  padding-top: 0.5rem;
  border-top: 1px dashed rgba(6, 112, 204, 0.25);
  font-weight: 600;
}
.pin-modal-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  margin-top: 1.1rem;
  flex-wrap: wrap;
}
.field-hint {
  font-size: 0.75rem;
  color: var(--muted);
  margin-top: 0.3rem;
}

.field-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: -0.25rem 0 1rem;
}

.field-row a {
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

.field-row a:hover {
  text-decoration: underline;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-weight: 700;
  border-radius: 999px;
  padding: 0.7rem 1.2rem;
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.12s, background 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}

.btn:hover {
  transform: translateY(-1px);
  text-decoration: none;
}

.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-primary {
  background: var(--blue-600);
  color: #fff;
  box-shadow: 0 6px 16px rgba(6, 112, 204, 0.28);
}

.btn-primary:hover:not(:disabled) {
  background: var(--blue-700);
  color: #fff;
}

.btn-secondary {
  background: var(--blue-50);
  color: var(--blue-800);
}

.btn-ghost {
  background: transparent;
  color: var(--ink-2);
  border-color: var(--line);
}

.btn-danger {
  background: var(--danger-bg);
  color: var(--danger);
}

.btn-block {
  width: 100%;
}

.btn-lg {
  padding: 0.85rem 1.4rem;
  font-size: 1rem;
}

.btn-sm {
  padding: 0.4rem 0.85rem;
  font-size: 0.8rem;
}

.auth-foot {
  margin-top: 1.5rem;
  text-align: center;
  font-size: 0.9rem;
  color: var(--muted);
}

.demo-box {
  margin-top: 1.25rem;
  background: var(--blue-50);
  border: 1px dashed var(--blue-100);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  font-size: 0.82rem;
  color: var(--ink-2);
}

.demo-box strong {
  color: var(--blue-800);
}

.alert {
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  font-size: 0.875rem;
  margin-bottom: 1rem;
  display: none;
}

.alert.show {
  display: block;
}

.alert-error {
  background: var(--danger-bg);
  color: var(--danger);
  border: 1px solid #f5c2c2;
}

.alert-success {
  background: var(--success-bg);
  color: #066;
  border: 1px solid #b6e6d4;
}

.alert-info {
  background: var(--blue-50);
  color: var(--blue-800);
  border: 1px solid var(--blue-100);
}

/* Recovery wizard */
.steps {
  display: flex;
  gap: 0.35rem;
  margin-bottom: 1.5rem;
}

.steps span {
  flex: 1;
  height: 4px;
  border-radius: 999px;
  background: var(--line);
}

.steps span.on {
  background: var(--blue-600);
}

.step-panel[hidden] {
  display: none;
}

/* ——— App shell ——— */
.app-shell {
  display: grid;
  grid-template-columns: var(--nav-w) minmax(0, 1fr);
  grid-template-areas: "sidebar main";
  min-height: 100vh;
  width: 100%;
  background: var(--bg, #f4f7fb);
}

/* Backdrop is NOT a grid child — fixed overlay for mobile drawer only */
.sidebar-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(12, 27, 42, 0.45);
  z-index: 40;
  border: 0;
  padding: 0;
  margin: 0;
}

.sidebar-backdrop.show {
  display: block;
}

.sidebar {
  grid-area: sidebar;
  background: var(--blue-900);
  color: #fff;
  padding: 1.25rem 1rem;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
  width: var(--nav-w);
  max-width: var(--nav-w);
  box-sizing: border-box;
  z-index: 30;
}

.side-brand {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 0.65rem 1.25rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-decoration: none;
  color: #fff;
}

.side-brand img {
  width: 36px;
  height: auto;
}

.side-brand span span {
  color: #7dd3fc;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}

.side-nav button,
.side-nav a {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  text-align: left;
  background: transparent;
  border: 0;
  color: rgba(255, 255, 255, 0.78);
  padding: 0.75rem 0.85rem;
  border-radius: 12px;
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  text-decoration: none;
}

.side-nav button:hover,
.side-nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.side-nav button.active {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.nav-ico {
  width: 22px;
  text-align: center;
  opacity: 0.9;
  font-size: 1rem;
}

.side-user {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
  margin-top: 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.avatar {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--grad);
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.9rem;
  flex-shrink: 0;
  color: #fff;
  overflow: hidden;
  position: relative;
}
.avatar.has-photo {
  background: #e8f1fa;
  padding: 0;
}
.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 50%;
}
.tx-modal-peer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.tx-modal-avatar {
  width: 52px !important;
  height: 52px !important;
  font-size: 1.1rem;
}

.side-user .meta {
  min-width: 0;
  flex: 1;
}

.side-user strong {
  display: block;
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user span {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
}

.main {
  grid-area: main;
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  max-width: 100%;
  background: var(--bg, #f4f7fb);
  overflow-x: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 20;
  width: 100%;
  box-sizing: border-box;
}

.topbar h1 {
  margin: 0;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.balance-chip {
  background: var(--grad);
  color: #fff;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  font-weight: 800;
  font-size: 0.9rem;
  letter-spacing: -0.02em;
  box-shadow: 0 6px 16px rgba(6, 112, 204, 0.25);
}

.menu-btn {
  display: none;
  border: 0;
  background: var(--bg);
  width: 40px;
  height: 40px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1.2rem;
}

.content {
  padding: 1.25rem clamp(1rem, 2vw, 2rem) 2.5rem;
  width: 100%;
  max-width: none;
  margin: 0;
  box-sizing: border-box;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.content > .view {
  width: 100%;
  max-width: none;
}

.content > .view.active {
  display: flex !important;
  flex-direction: column;
  gap: 1.25rem;
  flex: 1;
}

/* Forms / panels use full width */
.form-card,
.send-layout,
.receive-layout,
.tx-panel,
.dev-panel {
  width: 100%;
  max-width: none;
}

.view {
  display: none;
  animation: fadeIn 0.25s ease;
}

.view.active {
  display: block !important;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Cards / grid — stretch across full content width */
.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.9fr);
  gap: 1.25rem;
  width: 100%;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  width: 100%;
}

#view-home,
#view-send,
#view-receive,
#view-transactions,
#view-developers {
  width: 100%;
  max-width: none;
}

#view-home .card,
#view-transactions .card,
#view-developers .card {
  width: 100%;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem;
  box-shadow: 0 1px 2px rgba(12, 27, 42, 0.03);
}

.card h3 {
  margin: 0 0 0.35rem;
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.card .muted {
  color: var(--muted);
  font-size: 0.875rem;
  margin: 0 0 1rem;
}

.stat-card {
  padding: 1.25rem;
}

.stat-card .label {
  font-size: 0.8rem;
  color: var(--muted);
  font-weight: 600;
  margin: 0 0 0.35rem;
}

.stat-card .value {
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  margin: 0;
}

.stat-card .delta {
  font-size: 0.8rem;
  color: var(--success);
  margin-top: 0.35rem;
  font-weight: 600;
}

.hero-balance {
  background: var(--grad);
  color: #fff;
  border: 0;
  position: relative;
  overflow: hidden;
  min-height: 200px;
  width: 100%;
}

.hero-balance::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  right: -40px;
  top: -40px;
}

.hero-balance .label {
  color: rgba(255, 255, 255, 0.85);
}

.hero-balance .value {
  font-size: 2.4rem;
  margin: 0.25rem 0;
}

.hero-balance .delta {
  color: rgba(255, 255, 255, 0.9);
}

.quick-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.quick-row button {
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: #fff;
  border-radius: 14px;
  padding: 0.85rem 0.5rem;
  cursor: pointer;
  font-weight: 700;
  font-size: 0.8rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
}

.quick-row button:hover {
  background: rgba(255, 255, 255, 0.25);
}

.quick-row .qico {
  font-size: 1.15rem;
}

/* Recipient resolve */
.resolve-result {
  display: none;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: var(--blue-50);
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--blue-100);
}

.resolve-result.show {
  display: flex;
}

.resolve-result .name {
  font-weight: 700;
  font-size: 0.9rem;
}

.resolve-result .handle {
  font-size: 0.8rem;
  color: var(--muted);
}

.amount-wrap {
  position: relative;
}

.amount-wrap .currency {
  position: absolute;
  left: 0.9rem;
  top: 2.15rem;
  font-weight: 700;
  color: var(--muted);
  pointer-events: none;
}

.amount-wrap input {
  padding-left: 2rem;
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* Send autocomplete — horizontal avatar row under the field */
.send-to-field {
  position: relative;
}

.send-to-wrap {
  position: relative;
}

.send-suggest,
.send-suggest-row {
  position: static;
  z-index: 5;
  display: flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.55rem 0 0;
  padding: 0.45rem 0.15rem 0.15rem;
  list-style: none;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: thin;
}

.send-suggest[hidden] {
  display: none !important;
}

.send-suggest-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem;
  width: 4.25rem;
  min-width: 4.25rem;
  max-width: 4.25rem;
  padding: 0.25rem 0.15rem;
  border-radius: 12px;
  cursor: pointer;
  flex: 0 0 auto;
  text-align: center;
}

.send-suggest-item:hover,
.send-suggest-item.is-active {
  background: rgba(6, 112, 204, 0.1);
}

.send-suggest-item .sg-av,
.send-suggest-item .sg-av.avatar {
  width: 2.75rem;
  height: 2.75rem;
  overflow: hidden;
  border-radius: 50%;
  min-width: 2.75rem;
  min-height: 2.75rem;
  max-width: 2.75rem;
  max-height: 2.75rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #023a6b, #0670cc);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 0.95rem;
  overflow: hidden;
  flex-shrink: 0;
  border: 2px solid #fff;
  box-shadow: 0 2px 10px rgba(2, 24, 55, 0.18);
  position: relative;
}

/* Initial letter when no image / after image error */
.send-suggest-item .sg-av[data-fallback]::before {
  content: attr(data-fallback);
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-weight: 800;
  z-index: 0;
}

.send-suggest-item .sg-av img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
  position: relative;
  z-index: 1;
}

.send-suggest-item .sg-name {
  display: block;
  width: 100%;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--ink-2, #334155);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.15;
}

.send-suggest-item .sg-body {
  display: none;
}

.resolve-box {
  display: none;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.65rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  background: rgba(6, 112, 204, 0.07);
  border: 1px solid rgba(6, 112, 204, 0.18);
}

.resolve-box.show,
.resolve-box:not([hidden]) {
  display: flex;
}

.resolve-avatar {
  width: 2.4rem;
  height: 2.4rem;
  min-width: 2.4rem;
  min-height: 2.4rem;
  border-radius: 50%;
  background: linear-gradient(145deg, #011c38, #0670cc);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  overflow: hidden;
  flex-shrink: 0;
}

.resolve-avatar img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  max-height: 100%;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  display: block;
}

.resolve-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
}

.resolve-meta strong {
  font-size: 0.98rem;
  letter-spacing: -0.01em;
}

.resolve-clear {
  border: 0;
  background: transparent;
  color: var(--ink-3, #64748b);
  font-size: 1.25rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.25rem 0.4rem;
  border-radius: 8px;
}

.resolve-clear:hover {
  background: rgba(15, 23, 42, 0.06);
  color: var(--ink);
}

/* QR receive */
.qr-box {
  text-align: center;
  padding: 1rem 0;
}

.qr-box #qrImg,
.qr-box img#qrImg,
.qr-box img {
  display: block;
  margin: 0 auto 1rem;
  width: min(300px, 92%);
  max-width: 320px;
  height: auto;
  aspect-ratio: 1;
  object-fit: contain;
  background: #fff;
  padding: 0.65rem;
  box-shadow: 0 16px 40px rgba(2, 24, 55, 0.14);
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px;
}

.qr-meta {
  font-size: 0.85rem;
  color: var(--muted);
  word-break: break-all;
}

.qr-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 1rem;
}

/* ── Businesses that accept Bidz Pay ───────────────────────── */
.biz-section {
  margin-top: 1.25rem;
}
.biz-section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}
.biz-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  height: 1.75rem;
  padding: 0 0.55rem;
  border-radius: 999px;
  background: var(--blue-50, #eef6fc);
  color: var(--blue-700, #045aa8);
  font-size: 0.78rem;
  font-weight: 700;
}
.biz-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 0.75rem;
}
.biz-toolbar select {
  height: 2.4rem;
  border-radius: 0.65rem;
  border: 1px solid var(--border, #d7e3ef);
  background: var(--surface, #fff);
  padding: 0 0.7rem;
  font: inherit;
  color: inherit;
  max-width: 100%;
}
.biz-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.85rem;
}
.biz-chip {
  border: 1px solid var(--border, #d7e3ef);
  background: var(--surface, #fff);
  color: inherit;
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
}
.biz-chip.active {
  background: var(--blue-600, #0670cc);
  border-color: var(--blue-600, #0670cc);
  color: #fff;
}
.biz-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}
.biz-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 0.85rem;
  border-radius: 0.9rem;
  border: 1px solid var(--border, #d7e3ef);
  background: var(--surface-2, #f8fbfe);
  min-width: 0;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}
.biz-card:hover {
  border-color: var(--blue-500, #0a7ad1);
  box-shadow: 0 8px 22px rgba(6, 112, 204, 0.08);
  transform: translateY(-1px);
}
.biz-card-top {
  display: flex;
  gap: 0.7rem;
  align-items: flex-start;
  min-width: 0;
}
.biz-logo {
  width: 52px;
  height: 52px;
  border-radius: 0.75rem;
  object-fit: cover;
  background: #e8f1fa;
  flex-shrink: 0;
  border: 1px solid var(--border, #d7e3ef);
}
.biz-logo.placeholder {
  display: grid;
  place-items: center;
  font-weight: 800;
  color: var(--blue-700, #045aa8);
  font-size: 1rem;
}
.biz-card-title {
  margin: 0;
  font-size: 0.98rem;
  font-weight: 700;
  line-height: 1.25;
  word-break: break-word;
}
.biz-card-meta {
  margin: 0.15rem 0 0;
  font-size: 0.78rem;
  color: var(--muted, #5b6b7c);
}
.biz-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  margin-top: 0.35rem;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  background: rgba(16, 185, 129, 0.12);
  color: #047857;
  font-size: 0.7rem;
  font-weight: 700;
}
.biz-badge.discount {
  background: rgba(6, 112, 204, 0.12);
  color: var(--blue-700, #045aa8);
  margin-left: 0.3rem;
}
.biz-info {
  display: grid;
  gap: 0.28rem;
  font-size: 0.8rem;
  color: var(--text, #0f1b2d);
}
.biz-info a {
  color: var(--blue-700, #045aa8);
  text-decoration: none;
  word-break: break-word;
}
.biz-info a:hover {
  text-decoration: underline;
}
.biz-info .row {
  display: flex;
  gap: 0.4rem;
  align-items: flex-start;
  min-width: 0;
}
.biz-info .ico {
  flex-shrink: 0;
  width: 1rem;
  text-align: center;
  opacity: 0.7;
}
.biz-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.15rem;
}
.biz-actions .btn {
  flex: 1 1 auto;
}

/* Transactions */
.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1rem;
}
.tx-toolbar-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  align-items: center;
}
#exportTxPdf {
  border: 1.5px solid var(--blue-100);
  background: var(--blue-50);
  color: var(--blue-800);
  font-weight: 700;
}
#exportTxPdf:hover {
  border-color: var(--blue-500);
  background: #fff;
  color: var(--blue-700);
}

.chip-filter {
  border: 1.5px solid var(--line);
  background: #fff;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-weight: 600;
  font-size: 0.8rem;
  color: var(--ink-2);
  cursor: pointer;
}

.chip-filter.active {
  border-color: var(--blue-600);
  background: var(--blue-50);
  color: var(--blue-800);
}

.tx-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.tx-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  cursor: pointer;
  transition: box-shadow 0.15s, border-color 0.15s;
}

.tx-item:hover {
  border-color: var(--blue-100);
  box-shadow: var(--shadow);
}

.tx-item .avatar {
  width: 42px;
  height: 42px;
  min-width: 42px;
  min-height: 42px;
  font-size: 0.85rem;
  flex-shrink: 0;
  overflow: hidden;
  border-radius: 50%;
}
.tx-item .avatar.has-photo {
  background: #e8f1fa;
  color: transparent;
  padding: 0;
}
.tx-item .avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.tx-item .body {
  flex: 1;
  min-width: 0;
}

.tx-item .body strong {
  display: block;
  font-size: 0.92rem;
}

.tx-item .body span {
  font-size: 0.78rem;
  color: var(--muted);
}

.tx-item .amt {
  font-weight: 800;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
}

.tx-item .amt.in {
  color: var(--success);
}

.tx-item .amt.out {
  color: var(--ink);
}

.tx-status {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: var(--success-bg);
  color: var(--success);
}

.empty {
  text-align: center;
  padding: 2.5rem 1rem;
  color: var(--muted);
}

.empty strong {
  display: block;
  color: var(--ink);
  margin-bottom: 0.35rem;
}

/* Developers */
.code-block {
  background: #0b1f33;
  color: #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  overflow-x: auto;
  line-height: 1.55;
  margin: 0;
}

.key-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
}

.key-row:last-child {
  border-bottom: 0;
}

.mono {
  font-family: var(--mono);
  font-size: 0.85rem;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 1rem;
}

.modal[hidden] {
  display: none;
}

/* Full statement export — no browser pop-up required */
.export-modal {
  z-index: 120;
  place-items: stretch;
  padding: 0.75rem;
}
.export-modal-card {
  width: min(960px, 100%);
  max-width: 100%;
  height: min(92vh, 900px);
  margin: auto;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 16px;
}
.export-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1.1rem 0.85rem;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--blue-50), #fff);
  flex-shrink: 0;
}
.export-modal-head h3 {
  margin: 0;
  color: var(--blue-800);
  font-size: 1.05rem;
}
.export-modal-sub {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
}
.export-modal-actions {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  flex-shrink: 0;
}
.export-frame {
  flex: 1 1 auto;
  width: 100%;
  border: 0;
  background: #fff;
  min-height: 0;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 27, 42, 0.5);
  backdrop-filter: blur(4px);
}

.modal-card {
  position: relative;
  background: #fff;
  border-radius: 18px;
  padding: 1.5rem;
  width: min(100%, 440px);
  box-shadow: var(--shadow-lg);
  z-index: 1;
}

.modal-card h3 {
  margin: 0 0 0.5rem;
}

.modal-close {
  position: absolute;
  top: 0.75rem;
  right: 0.85rem;
  border: 0;
  background: transparent;
  font-size: 1.4rem;
  color: var(--muted);
  cursor: pointer;
}

/* Toast */
.toast-host {
  position: fixed;
  bottom: 1.25rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  pointer-events: none;
}

.toast {
  background: var(--blue-900);
  color: #fff;
  padding: 0.75rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.875rem;
  box-shadow: var(--shadow-lg);
  animation: toastIn 0.25s ease;
  max-width: min(90vw, 420px);
  text-align: center;
}

.toast.error {
  background: #7f1d1d;
}

@keyframes toastIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Loading */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

.btn-secondary .spinner,
.btn-ghost .spinner {
  border-color: rgba(6, 112, 204, 0.25);
  border-top-color: var(--blue-600);
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.skeleton {
  background: linear-gradient(90deg, #eef2f6 25%, #f8fafc 50%, #eef2f6 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 8px;
  height: 1em;
}

@keyframes shimmer {
  to {
    background-position: -200% 0;
  }
}

/* Screens hidden until boot — JS also toggles inline display as backup */
#screen-auth,
#screen-app {
  display: none !important;
}

#screen-auth.show {
  display: block !important;
}

#screen-app.show {
  display: grid !important;
  grid-template-columns: var(--nav-w) minmax(0, 1fr) !important;
  grid-template-areas: "sidebar main" !important;
  min-height: 100vh;
  width: 100%;
}

body.is-app #apiBanner:not(.show) {
  display: none !important;
}

/* Responsive */
@media (max-width: 960px) {
  .auth-shell {
    grid-template-columns: 1fr;
  }

  .auth-brand {
    min-height: auto;
    padding: 1.5rem 1.35rem 1.6rem;
    gap: 1.1rem;
  }

  .auth-brand-hero {
    flex: 0 1 auto;
    justify-content: center;
    padding: 1.25rem 0 1.5rem;
    max-width: none;
  }

  .auth-logo {
    margin-bottom: 0;
  }

  .auth-kicker {
    margin-top: 0;
  }

  .auth-headline,
  .auth-brand h1.auth-headline {
    margin-top: 0.75rem;
    font-size: clamp(2.15rem, 8vw, 2.85rem);
    max-width: 14ch;
  }

  .auth-lead {
    margin-top: 1.1rem;
    font-size: clamp(1.08rem, 3.8vw, 1.25rem);
    max-width: 32ch;
  }

  .auth-points {
    margin-top: 1.35rem;
    grid-template-columns: 1fr;
    gap: 0.7rem;
  }

  .auth-points li {
    font-size: 1.08rem;
    justify-content: center;
  }

  .auth-pills {
    justify-content: center;
  }

  #screen-app.show,
  .app-shell {
    grid-template-columns: minmax(0, 1fr) !important;
    grid-template-areas: "main" !important;
  }

  .sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: min(var(--nav-w), 86vw);
    max-width: min(var(--nav-w), 86vw);
    z-index: 50;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    grid-area: unset;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .main {
    grid-area: main;
  }

  .menu-btn {
    display: grid;
    place-items: center;
  }

  .grid-2,
  .grid-3 {
    grid-template-columns: 1fr;
  }

  .quick-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .content {
    padding: 1rem 1rem 2.5rem;
  }
}

@media (max-width: 560px) {
  .topbar {
    padding: 0.85rem 1rem;
  }

  .balance-chip {
    font-size: 0.8rem;
  }
}
