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

:root {
  --bg:       #0a0a0f;
  --surface:  #13131a;
  --surface2: #1c1c27;
  --border:   #2a2a3d;
  --accent:   #7c6aff;
  --accent2:  #ff6a6a;
  --accent3:  #6affb4;
  --text:     #e8e8f0;
  --muted:    #6b6b88;
  --gold:     #ffd166;
  --silver:   #b0b8cc;
  --bronze:   #d4845a;
  --bnav-h:   64px;
  --header-h: 52px;
}

html, body {
  height: 100%;
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
}

/* Grid + glow */
body::before {
  content: '';
  position: fixed; inset: 0;
  background-image:
    linear-gradient(rgba(124,106,255,0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(124,106,255,0.04) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none; z-index: 0;
}
.glow-orb { position: fixed; border-radius: 50%; filter: blur(120px); pointer-events: none; z-index: 0; }
.glow-orb-1 { width: 500px; height: 500px; background: rgba(124,106,255,0.12); top: -150px; left: -150px; }
.glow-orb-2 { width: 350px; height: 350px; background: rgba(106,255,180,0.08); bottom: -80px; right: -80px; }

/* ──────────────────────────────────────────────
   LANDING PAGE
────────────────────────────────────────────── */
.landing-page {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.landing-main {
  position: relative; z-index: 1;
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 28px;
  padding-bottom: calc(40px + env(safe-area-inset-bottom));
  text-align: center;
  gap: 0;
}

.landing-content { width: 100%; max-width: 480px; }

.logo-eyebrow {
  display: inline-block;
  font-family: 'Syne', sans-serif;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .32em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 24px;
}

.landing-h1 {
  font-family: 'Syne', sans-serif;
  font-size: clamp(2.4rem, 9vw, 3.8rem);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -.03em;
  margin-bottom: 18px;
}

.grad {
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.landing-sub {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 300;
  margin-bottom: 44px;
  max-width: 360px;
  margin-left: auto;
  margin-right: auto;
}

.cta-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  height: 56px;
  background: #fff;
  color: #1a1a2e;
  border: none;
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  font-weight: 500;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
}
.btn-google:hover  { opacity: .92; }
.btn-google:active { transform: scale(.98); }

.btn-ghost {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 56px;
  background: transparent;
  color: var(--muted);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  cursor: pointer;
  transition: border-color .15s, color .15s, transform .1s;
}
.btn-ghost:hover  { border-color: rgba(124,106,255,.5); color: var(--text); }
.btn-ghost:active { transform: scale(.98); }

/* ── Auth card ── */
.auth-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 20px;
  padding: 24px;
  width: 100%;
  max-width: 380px;
  margin: 0 auto;
}

.auth-tabs {
  display: flex;
  background: var(--surface2);
  border-radius: 10px;
  padding: 3px;
  margin-bottom: 24px;
  gap: 2px;
}
.auth-tab {
  flex: 1;
  padding: 8px;
  background: none;
  border: none;
  border-radius: 8px;
  font-family: 'DM Sans', sans-serif;
  font-size: .875rem;
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.auth-tab.active { background: var(--surface); color: var(--text); font-weight: 500; }

.auth-form { display: none; flex-direction: column; gap: 14px; }
.auth-form.active { display: flex; }

.auth-form .field { margin-bottom: 0; }
.auth-form .field label {
  font-family: 'DM Mono', monospace;
  font-size: .68rem; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 6px; display: block;
}
.auth-form input {
  width: 100%; height: 48px;
  padding: 0 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem; color: var(--text);
  outline: none;
  transition: border-color .2s;
}
.auth-form input:focus { border-color: var(--accent); }
.auth-form input::placeholder { color: var(--muted); }

.auth-error {
  background: rgba(255,106,106,.1);
  border: 1px solid rgba(255,106,106,.25);
  color: var(--accent2);
  border-radius: 8px;
  padding: 10px 14px;
  font-size: .85rem;
  line-height: 1.5;
}

.auth-divider {
  display: flex; align-items: center; gap: 12px;
  margin: 16px 0;
  color: var(--muted); font-size: .8rem;
}
.auth-divider::before, .auth-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--border);
}

.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 10px;
  width: 100%; height: 48px;
  background: #fff; color: #1a1a2e;
  border: none; border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem; font-weight: 500;
  cursor: pointer; text-decoration: none;
  transition: opacity .15s, transform .1s;
}
.btn-google:hover  { opacity: .92; }
.btn-google:active { transform: scale(.98); }

.landing-footer {
  position: relative; z-index: 1;
  text-align: center;
  color: var(--muted);
  font-family: 'DM Mono', monospace;
  font-size: .7rem;
  letter-spacing: .05em;
  padding: 16px 24px;
  padding-bottom: calc(16px + env(safe-area-inset-bottom));
}

/* ── Bottom Sheet ── */
.sheet-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0);
  z-index: 50;
  pointer-events: none;
  transition: background .25s;
}
.sheet-overlay.show {
  background: rgba(0,0,0,.65);
  pointer-events: all;
}

.bottom-sheet {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  border-top: 1px solid var(--border);
  z-index: 51;
  transform: translateY(100%);
  transition: transform .3s cubic-bezier(0.32, 0.72, 0, 1);
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-sheet.show { transform: translateY(0); }

.sheet-handle {
  width: 36px; height: 4px;
  background: var(--border);
  border-radius: 2px;
  margin: 12px auto 0;
}
.sheet-body {
  padding: 24px 28px 32px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.sheet-icon { font-size: 2.4rem; }
.sheet-title {
  font-family: 'Syne', sans-serif;
  font-size: 1.3rem;
  font-weight: 700;
}
.sheet-desc {
  color: var(--muted);
  font-size: .9rem;
  line-height: 1.65;
  max-width: 340px;
}
.sheet-desc strong { color: var(--accent2); }
.btn-text {
  background: none; border: none;
  color: var(--muted); font-family: 'DM Sans', sans-serif;
  font-size: .9rem; cursor: pointer;
  padding: 8px 16px;
  transition: color .15s;
}
.btn-text:hover { color: var(--text); }

/* ──────────────────────────────────────────────
   APP PAGE
────────────────────────────────────────────── */
.app-page {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* App header */
.app-header {
  position: relative; z-index: 5;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  border-bottom: 1px solid var(--border);
  background: rgba(10,10,15,.85);
  backdrop-filter: blur(12px);
  flex-shrink: 0;
}
.brand {
  font-family: 'Syne', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .25em;
  text-transform: uppercase;
  color: var(--accent);
}
/* ── User menu ── */
.user-menu { position: relative; }

.user-btn {
  display: flex; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px;
  padding: 5px 12px 5px 5px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  -webkit-tap-highlight-color: transparent;
}
.user-btn:hover { border-color: rgba(124,106,255,.5); background: var(--surface2); }

.user-avatar {
  width: 28px; height: 28px; border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent3));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif;
  font-size: .78rem; font-weight: 700;
  color: #fff; flex-shrink: 0;
}
.user-name {
  font-family: 'DM Sans', sans-serif;
  font-size: .82rem; color: var(--text);
  max-width: 100px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.chevron { color: var(--muted); flex-shrink: 0; transition: transform .2s; }
.user-btn[aria-expanded="true"] .chevron { transform: rotate(180deg); }

.user-dropdown {
  position: absolute; top: calc(100% + 8px); right: 0;
  min-width: 200px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 16px 40px rgba(0,0,0,.5);
  z-index: 20;
  animation: dropIn .15s ease;
}
@keyframes dropIn {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.dropdown-info { padding: 14px 16px 12px; }
.dropdown-name {
  font-family: 'Syne', sans-serif;
  font-size: .9rem; font-weight: 700;
  color: var(--text); margin-bottom: 3px;
}
.dropdown-mode {
  font-family: 'DM Mono', monospace;
  font-size: .68rem; color: var(--muted);
  letter-spacing: .04em;
}
.dropdown-divider { height: 1px; background: var(--border); }
.dropdown-logout {
  display: flex; align-items: center; gap: 10px;
  width: 100%; padding: 12px 16px;
  background: none; border: none;
  color: var(--accent2);
  font-family: 'DM Sans', sans-serif; font-size: .875rem;
  cursor: pointer; text-align: left;
  transition: background .15s;
  -webkit-tap-highlight-color: transparent;
}
.dropdown-logout::before {
  content: '→';
  font-size: .85rem;
}
.dropdown-logout:hover { background: rgba(255,106,106,.07); }

/* ── Sheet name field ── */
.sheet-field { width: 100%; text-align: left; }
.sheet-label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: .7rem; color: var(--muted);
  letter-spacing: .06em; text-transform: uppercase;
  margin-bottom: 7px;
}
.sheet-input {
  width: 100%; height: 50px;
  background: var(--surface2); border: 1.5px solid var(--border);
  border-radius: 12px;
  padding: 0 16px;
  font-family: 'DM Sans', sans-serif; font-size: 1rem;
  color: var(--text); outline: none;
  transition: border-color .2s;
}
.sheet-input:focus { border-color: var(--accent); }
.sheet-input::placeholder { color: var(--muted); }

.btn-primary:disabled {
  opacity: .35; cursor: not-allowed;
}

/* App body — scrollable area between header and bottom nav */
.app-body {
  flex: 1;
  overflow: hidden;
  position: relative; z-index: 1;
}

.tab { display: none; height: 100%; }
.tab.active { display: flex; flex-direction: column; height: 100%; }

.tab-scroll {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  padding: 24px 20px;
  padding-bottom: 24px;
}

/* Search tab hero */
.search-hero { margin-bottom: 24px; }
.search-title {
  font-family: 'Syne', sans-serif;
  font-size: clamp(1.8rem, 7vw, 2.6rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -.03em;
  margin-bottom: 6px;
}
.search-hint { color: var(--muted); font-size: .875rem; }

/* Search input */
.search-wrapper {
  position: relative;
  margin-bottom: 16px;
}
.search-icon {
  position: absolute; left: 16px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted); pointer-events: none;
}
#search {
  width: 100%;
  height: 54px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 0 16px 0 46px;
  font-family: 'DM Sans', sans-serif;
  font-size: 1rem;
  color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
#search::placeholder { color: var(--muted); }
#search:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(124,106,255,.14);
}

/* Category chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.chip {
  font-family: 'DM Mono', monospace;
  font-size: .7rem;
  padding: 7px 14px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  letter-spacing: .03em;
  transition: all .15s;
  -webkit-tap-highlight-color: transparent;
}
.chip:active, .chip.active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(124,106,255,.1);
}

/* Results */
.results-header {
  font-family: 'Syne', sans-serif;
  font-size: .72rem; font-weight: 600;
  letter-spacing: .2em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 14px;
}
.cards-grid { display: grid; gap: 12px; }

.card-result {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 18px;
  padding: 20px;
  display: grid;
  grid-template-columns: 48px 1fr auto;
  gap: 16px;
  align-items: center;
  position: relative; overflow: hidden;
  opacity: 0; transform: translateY(12px);
  animation: fadeUp .28s forwards;
  transition: border-color .2s;
}
.card-result:nth-child(2) { animation-delay: .06s; }
.card-result:nth-child(3) { animation-delay: .12s; }
.card-result::before {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(135deg, rgba(124,106,255,.03) 0%, transparent 60%);
  pointer-events: none;
}
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

.rank {
  width: 48px; height: 48px; border-radius: 13px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.4rem; flex-shrink: 0;
}
.rank-1 { background: rgba(255,209,102,.12); border: 1.5px solid rgba(255,209,102,.3); }
.rank-2 { background: rgba(176,184,204,.1);  border: 1.5px solid rgba(176,184,204,.25); }
.rank-3 { background: rgba(212,132,90,.1);   border: 1.5px solid rgba(212,132,90,.25); }

.card-name {
  font-family: 'Syne', sans-serif;
  font-size: .95rem; font-weight: 700; margin-bottom: 3px;
}
.card-issuer { font-size: .78rem; color: var(--muted); }
.offer-tag {
  display: inline-block;
  background: rgba(106,255,180,.1); color: var(--accent3);
  border: 1px solid rgba(106,255,180,.2);
  border-radius: 4px;
  font-family: 'DM Mono', monospace;
  font-size: .65rem; padding: 1px 6px; margin-top: 4px;
}

.card-rate { text-align: right; flex-shrink: 0; }
.rate-value {
  font-family: 'Syne', sans-serif;
  font-size: 1.8rem; font-weight: 800;
  letter-spacing: -.02em; line-height: 1;
}
.rate-label {
  font-family: 'DM Mono', monospace;
  font-size: .65rem; color: var(--muted);
  letter-spacing: .05em; margin-top: 3px;
}

/* Empty states */
.empty-state, .no-results {
  text-align: center; padding: 56px 0; color: var(--muted);
}
.empty-icon { font-size: 2.4rem; margin-bottom: 12px; opacity: .5; }
.empty-state p, .no-results p { font-size: .9rem; line-height: 1.7; }

/* ── Wallet tab ── */
.tab-header { margin-bottom: 20px; }
.tab-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 1.5rem; font-weight: 800;
  letter-spacing: -.02em; margin-bottom: 4px;
}
.tab-header p { color: var(--muted); font-size: .875rem; }

/* Accordion cards */
.acc-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: border-color .2s;
}
.acc-card.in-wallet { border-color: rgba(124,106,255,.5); }

.acc-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.acc-header:active { background: rgba(255,255,255,.03); }

.acc-card-icon {
  width: 40px; height: 40px; border-radius: 12px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: flex; align-items: center; justify-content: center;
  font-family: 'Syne', sans-serif; font-size: 1rem; font-weight: 800;
  color: #fff;
  overflow: hidden;
}
.issuer-logo {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}

.acc-card-info { flex: 1; min-width: 0; }
.acc-card-name {
  font-family: 'Syne', sans-serif; font-size: .9rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.acc-card-meta { font-size: .75rem; color: var(--muted); margin-top: 2px; }

.wallet-toggle {
  flex-shrink: 0;
  font-family: 'DM Mono', monospace; font-size: .72rem; font-weight: 500;
  padding: 6px 12px; border-radius: 20px;
  border: 1.5px solid var(--border);
  background: transparent; color: var(--muted);
  cursor: pointer; transition: all .15s;
  white-space: nowrap;
}
.wallet-toggle:hover { border-color: var(--accent); color: var(--accent); }
.wallet-toggle.active {
  background: rgba(124,106,255,.15);
  border-color: var(--accent); color: var(--accent);
}
.wallet-toggle:disabled { opacity: .5; cursor: default; }

.acc-chevron {
  flex-shrink: 0; width: 16px; height: 16px;
  color: var(--muted); transition: transform .2s;
}
.acc-chevron.open { transform: rotate(180deg); }

.acc-body { padding: 0 16px 16px; }

.acc-section { margin-bottom: 18px; }
.acc-section:last-child { margin-bottom: 0; }

.acc-section-label {
  font-family: 'DM Mono', monospace;
  font-size: .65rem; font-weight: 500;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 10px;
}

.acc-rates-grid { display: flex; flex-direction: column; gap: 4px; }
.acc-rate-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 7px 10px; border-radius: 8px;
  background: var(--surface2);
}
.acc-rate-row.highlight { background: rgba(124,106,255,.1); }
.acc-cat-label { font-size: .82rem; color: var(--muted); }
.acc-rate-row.highlight .acc-cat-label { color: var(--text); }
.acc-rate-val {
  font-family: 'DM Mono', monospace; font-size: .82rem; font-weight: 500;
  color: var(--muted);
}
.acc-rate-row.highlight .acc-rate-val { color: var(--accent); }

.acc-offer-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 6px 0;
  border-bottom: 1px solid var(--border);
}
.acc-offer-row:last-child { border-bottom: none; }
.acc-offer-cat { font-size: .82rem; flex: 1; }

.acc-benefits-list {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 6px;
}
.acc-benefits-list li {
  font-size: .82rem; color: var(--muted);
  padding-left: 14px; position: relative; line-height: 1.5;
}
.acc-benefits-list li::before {
  content: '·'; position: absolute; left: 0; color: var(--accent);
}

.acc-empty { font-size: .8rem; color: var(--muted); font-style: italic; margin: 0; }

/* ── Offers tab ── */
.surface-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 20px;
  margin-bottom: 20px;
}
.section-label {
  font-family: 'Syne', sans-serif;
  font-size: .7rem; font-weight: 600;
  letter-spacing: .18em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 16px;
}
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.field:last-of-type { margin-bottom: 0; }
.field label {
  font-family: 'DM Mono', monospace;
  font-size: .68rem; color: var(--muted);
  letter-spacing: .05em; text-transform: uppercase;
}
.field select,
.field input[type=text],
.field input[type=number],
.field input[type=date] {
  height: 48px;
  padding: 0 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem;
  color: var(--text);
  outline: none;
  width: 100%;
  transition: border-color .2s;
  -webkit-appearance: none;
}
.field select:focus,
.field input:focus { border-color: var(--accent); }
.field select option { background: var(--surface2); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 12px; }
.field-row .field { margin-bottom: 0; }

/* Offers list */
.offer-item {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.offer-item-info { flex: 1; min-width: 0; }
.offer-card-name {
  font-family: 'Syne', sans-serif;
  font-size: .88rem; font-weight: 700;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.offer-meta {
  display: flex; align-items: center; gap: 8px; margin-top: 5px; flex-wrap: wrap;
}
.offer-cat  { font-size: .78rem; color: var(--muted); text-transform: capitalize; }
.rate-chip {
  font-family: 'DM Mono', monospace; font-size: .75rem; font-weight: 500;
  background: rgba(106,255,180,.1); color: var(--accent3);
  border: 1px solid rgba(106,255,180,.2);
  padding: 1px 7px; border-radius: 4px;
}
.expire-chip {
  font-family: 'DM Mono', monospace; font-size: .72rem;
  color: var(--gold); background: rgba(255,209,102,.08);
  border: 1px solid rgba(255,209,102,.2);
  padding: 1px 7px; border-radius: 4px;
}
.btn-delete {
  background: none; border: 1px solid var(--border);
  color: var(--accent2); padding: 7px 12px;
  border-radius: 8px; font-size: .78rem; cursor: pointer;
  flex-shrink: 0;
  transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
}
.btn-delete:active { background: rgba(255,106,106,.08); border-color: var(--accent2); }

/* ── Custom combobox ── */
.combobox-wrap { position: relative; }
.combobox-input {
  width: 100%; height: 48px;
  padding: 0 14px;
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-family: 'DM Sans', sans-serif;
  font-size: .9rem; color: var(--text);
  outline: none;
  transition: border-color .2s;
  box-sizing: border-box;
  -webkit-appearance: none;
}
.combobox-input:focus { border-color: var(--accent); }
.combobox-dropdown {
  position: absolute;
  top: calc(100% + 6px); left: 0; right: 0;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  overflow-y: auto;
  max-height: 220px;
  z-index: 200;
  box-shadow: 0 12px 40px rgba(0,0,0,.5);
}
.combobox-option {
  padding: 10px 16px;
  font-size: .88rem; color: var(--text);
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background .1s, color .1s;
  display: flex; align-items: center; gap: 10px;
}
.combobox-option:last-child { border-bottom: none; }
.combobox-option:hover { background: rgba(124,106,255,.12); color: var(--accent); }
.combo-opt-icon {
  width: 22px; height: 22px;
  object-fit: contain; flex-shrink: 0;
}
.combobox-empty {
  padding: 12px 16px;
  font-size: .85rem; color: var(--muted);
  font-style: italic;
}

/* ── Add card section ── */
.add-card-section { margin-bottom: 16px; }

.btn-add-card-toggle {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(124,106,255,.12);
  border: 1.5px solid rgba(124,106,255,.3);
  color: var(--accent);
  border-radius: 12px; padding: 10px 16px;
  font-family: 'DM Sans', sans-serif; font-size: .88rem; font-weight: 500;
  cursor: pointer; transition: background .15s, border-color .15s;
  -webkit-tap-highlight-color: transparent;
  margin-bottom: 14px;
}
.btn-add-card-toggle:hover { background: rgba(124,106,255,.2); border-color: var(--accent); }

#add-card-form {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  margin-bottom: 16px;
}

.add-card-widget {
  background: var(--surface2);
  border: 1.5px solid var(--border);
  border-radius: 14px;
  padding: 16px;
  margin-top: 12px;
}
.widget-card-header {
  display: flex; align-items: center; gap: 12px; margin-bottom: 4px;
}

/* Accordion nickname badge */
.acc-nickname {
  font-family: 'DM Mono', monospace; font-size: .68rem;
  color: var(--muted);
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 1px 6px; border-radius: 4px;
  margin-left: 6px; vertical-align: middle;
}

/* ── Inline offer management ── */
.acc-offer-row {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}
.acc-offer-row:last-of-type { border-bottom: none; }
.acc-offer-cat { font-size: .82rem; flex: 1; min-width: 80px; }

.expire-chip.no-exp { color: var(--muted); background: transparent; border-color: var(--border); }

.offer-actions { display: flex; gap: 6px; margin-left: auto; flex-shrink: 0; }
.offer-btn {
  font-size: .72rem; font-family: 'DM Mono', monospace;
  padding: 3px 8px; border-radius: 6px;
  border: 1px solid var(--border); background: transparent;
  cursor: pointer; transition: all .15s;
}
.offer-btn-edit  { color: var(--accent); }
.offer-btn-edit:hover  { border-color: var(--accent); background: rgba(124,106,255,.1); }
.offer-btn-delete { color: var(--accent2); }
.offer-btn-delete:hover { border-color: var(--accent2); background: rgba(255,106,106,.08); }

.btn-add-offer {
  font-size: .78rem; font-family: 'DM Mono', monospace;
  color: var(--accent); background: transparent;
  border: 1px dashed rgba(124,106,255,.4);
  border-radius: 8px; padding: 6px 12px;
  cursor: pointer; margin-top: 10px;
  transition: border-color .15s, background .15s;
  display: block; width: 100%;
}
.btn-add-offer:hover { border-color: var(--accent); background: rgba(124,106,255,.06); }

.acc-offer-form { margin-top: 10px; }
.offer-form-actions { display: flex; gap: 8px; }
.offer-form-actions .btn-primary { flex: 1; height: 40px; font-size: .85rem; }

.btn-outline {
  flex: 1; height: 40px;
  background: transparent;
  border: 1.5px solid var(--border);
  color: var(--muted);
  border-radius: 12px;
  font-family: 'DM Sans', sans-serif; font-size: .85rem; font-weight: 500;
  cursor: pointer; transition: border-color .15s, color .15s;
}
.btn-outline:hover { border-color: var(--text); color: var(--text); }

/* Remove card danger zone */
.acc-danger-zone { margin-top: 4px; padding-top: 14px; border-top: 1px solid var(--border); }
.btn-remove-card {
  font-size: .78rem; color: var(--accent2);
  background: transparent; border: 1px solid rgba(255,106,106,.3);
  padding: 7px 14px; border-radius: 8px;
  cursor: pointer; transition: background .15s, border-color .15s;
}
.btn-remove-card:hover { background: rgba(255,106,106,.08); border-color: var(--accent2); }

/* ── Shared buttons ── */
.btn-primary {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 52px;
  background: var(--accent); color: #fff;
  border: none; border-radius: 12px;
  font-family: 'DM Sans', sans-serif;
  font-size: .95rem; font-weight: 500;
  cursor: pointer;
  transition: opacity .15s, transform .1s;
  -webkit-tap-highlight-color: transparent;
}
.btn-primary.full-width { width: 100%; }
.btn-primary:active { transform: scale(.98); opacity: .9; }

/* ── Bottom nav ── */
.bottom-nav {
  position: relative; z-index: 5;
  height: calc(var(--bnav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: rgba(10,10,15,.92);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border);
  display: flex; align-items: flex-start;
  flex-shrink: 0;
}
.bnav-item {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  gap: 5px;
  height: var(--bnav-h);
  background: none; border: none;
  color: var(--muted);
  font-family: 'DM Sans', sans-serif;
  font-size: .68rem; font-weight: 500;
  letter-spacing: .02em;
  cursor: pointer;
  transition: color .15s;
  -webkit-tap-highlight-color: transparent;
}
.bnav-item svg { width: 22px; height: 22px; transition: transform .15s; }
.bnav-item.active { color: var(--accent); }
.bnav-item.active svg { transform: scale(1.1); }

/* ── Toast ── */
#toast {
  position: fixed; bottom: calc(var(--bnav-h) + env(safe-area-inset-bottom) + 12px); right: 16px;
  display: flex; flex-direction: column; gap: 8px;
  z-index: 99; pointer-events: none;
}
.toast-msg {
  background: var(--surface2); border: 1px solid var(--border); color: var(--text);
  padding: 11px 16px; border-radius: 10px;
  font-size: .85rem;
  box-shadow: 0 8px 32px rgba(0,0,0,.4);
  display: flex; align-items: center; gap: 9px;
  animation: slideIn .2s ease; min-width: 180px;
}
.toast-msg::before { content: ''; width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.toast-msg.success::before { background: var(--accent3); }
.toast-msg.error::before   { background: var(--accent2); }
@keyframes slideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Responsive (tablet/desktop) ── */
@media (min-width: 600px) {
  .wallet-grid { grid-template-columns: repeat(3, 1fr); }
  .field-row { grid-template-columns: 1fr 1fr; }
  .card-result { grid-template-columns: 48px 1fr auto; }
}

@media (min-width: 768px) {
  .tab-scroll { max-width: 680px; margin: 0 auto; }
  .search-title { font-size: 2.6rem; }
}
