:root {
  --bg-black: #000000;
  --card: #1a1a1a;
  --card-2: #1e1e1e;
  --card-3: #2a2a2a;
  --border-soft: rgba(255, 255, 255, 0.06);
  --text-primary: #ffffff;
  --text-secondary: #8e8e93;
  --text-tertiary: #666666;
  --positive: #30d158;
  --negative: #ffffff;
  --accent-blue: #0a84ff;
  --danger: #ff3b30;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  scrollbar-width: none;
}
*::-webkit-scrollbar {
  display: none;
}

html,
body {
  height: 100%;
  overscroll-behavior: none;
}

body {
  font-family: var(--font);
  background: #0b0b0d;
  color: var(--text-primary);
  -webkit-font-smoothing: antialiased;
}

/* ─── Stage: centers the phone mockup on desktop ─────────────────────────── */
.stage {
  min-height: 100dvh;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 16px;
  background:
    radial-gradient(ellipse 900px 500px at 50% 0%, rgba(120, 90, 40, 0.16), transparent 60%),
    radial-gradient(ellipse 700px 500px at 90% 100%, rgba(40, 70, 140, 0.14), transparent 60%),
    #0b0b0d;
}

#app-shell {
  position: relative;
  width: 390px;
  height: 844px;
  max-height: 100dvh;
  overflow: hidden;
  background: var(--bg-black);
  border-radius: 46px;
  box-shadow:
    0 0 0 1px rgba(255, 255, 255, 0.08),
    0 0 0 10px #0e0e10,
    0 0 0 11px rgba(255, 255, 255, 0.06),
    0 40px 90px rgba(0, 0, 0, 0.55),
    0 10px 30px rgba(0, 0, 0, 0.45);
  isolation: isolate;
}

/* iPhone-style notch/dynamic island */
#app-shell::before {
  content: "";
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 34px;
  background: #000;
  border-radius: 20px;
  z-index: 999;
  pointer-events: none;
}

@media (max-width: 480px), (display-mode: standalone) {
  .stage {
    padding: 0;
    background: #000;
  }
  #app-shell {
    width: 100vw;
    height: 100dvh;
    max-height: none;
    border-radius: 0;
    box-shadow: none;
  }
  #app-shell::before {
    display: none;
  }
}

.screen {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-black);
}

/* ─── Splash ──────────────────────────────────────────────────────────────── */
.screen-splash {
  background: #ffffff;
  align-items: center;
  justify-content: center;
}
.splash-logo {
  animation: revFadeIn 0.6s cubic-bezier(0.23, 1, 0.32, 1) both;
}
@keyframes revFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.rev-logo {
  display: flex;
  align-items: center;
  user-select: none;
  line-height: 1;
}
.rev-logo .rev-word {
  font-family: var(--font);
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1;
}

/* ─── PIN ─────────────────────────────────────────────────────────────────── */
.screen-pin {
  background: #ffffff;
  align-items: center;
}
.pin-top {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding-bottom: 26px;
  width: 100%;
}
.pin-avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: #8b6914;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 6px 22px rgba(139, 105, 20, 0.35);
  color: #fff;
  font-size: 24px;
  font-weight: 700;
}
.pin-greeting {
  font-size: 26px;
  font-weight: 700;
  color: #050505;
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}
.pin-dots {
  display: flex;
  gap: 15px;
}
.pin-dots.shake {
  animation: pinShake 0.45s ease;
}
@keyframes pinShake {
  0%,
  100% {
    transform: translateX(0);
  }
  20% {
    transform: translateX(-9px);
  }
  40% {
    transform: translateX(9px);
  }
  60% {
    transform: translateX(-5px);
  }
  80% {
    transform: translateX(5px);
  }
}
.pin-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #050505;
  background: transparent;
  transition: all 0.12s ease;
}
.pin-dot.filled {
  background: #050505;
}
.pin-dot.error {
  border-color: var(--danger);
  background: var(--danger);
}
.pin-error-msg {
  color: var(--danger);
  font-size: 13px;
  margin-top: 12px;
  font-weight: 500;
  min-height: 16px;
}
.pin-keypad {
  padding: 0 20px 40px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  width: 100%;
  max-width: 340px;
  gap: 2px;
  flex-shrink: 0;
}
.pin-key {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  background: transparent;
  border: none;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-family: var(--font);
  transition: background 0.08s ease;
  cursor: pointer;
}
.pin-key:active {
  background: rgba(0, 0, 0, 0.08);
}
.pin-key .digit {
  font-size: 30px;
  font-weight: 300;
  color: #050505;
  line-height: 1;
}
.pin-key .sub {
  font-size: 9px;
  font-weight: 600;
  color: #050505;
  letter-spacing: 0.12em;
  margin-top: 2px;
}
.pin-key.empty {
  pointer-events: none;
}

/* ─── Shared header (Home / Transactions) ────────────────────────────────── */
.top-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 58px 16px 8px;
  position: sticky;
  top: 0;
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10;
  flex-shrink: 0;
}
.icon-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-2);
  border: none;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  transition: filter 0.1s ease;
}
.icon-btn:active {
  filter: brightness(1.3);
}
.avatar-circle {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: #8b6914;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  position: relative;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
}
.avatar-badge {
  position: absolute;
  top: 0;
  right: 0;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--danger);
  border: 2px solid #000;
}
.search-pill {
  flex: 1;
  background: var(--card-2);
  border-radius: 24px;
  height: 40px;
  display: flex;
  align-items: center;
  padding-left: 14px;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 15px;
}

/* ─── Balance ─────────────────────────────────────────────────────────────── */
.balance-block {
  text-align: center;
  padding: 20px 16px 8px;
  transition: transform 0.22s cubic-bezier(0.23, 1, 0.32, 1), opacity 0.22s ease;
}
.balance-block.sliding-left {
  transform: translateX(-30px);
  opacity: 0;
}
.balance-block.sliding-right {
  transform: translateX(30px);
  opacity: 0;
}
.account-label {
  color: var(--text-secondary);
  font-size: 14px;
  margin-bottom: 6px;
}
.balance-amount {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 2px;
}
.balance-int {
  font-size: 48px;
  font-weight: 700;
  color: #fff;
  line-height: 1;
  letter-spacing: -0.01em;
}
.balance-dec {
  font-size: 28px;
  font-weight: 700;
  color: #fff;
}
.balance-iban {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  margin-top: 10px;
  color: var(--text-tertiary);
  font-size: 12px;
}
.balance-sub {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  margin-top: 10px;
  color: #aaa;
  font-size: 13px;
}

.dots-indicator {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-bottom: 6px;
}
.dot {
  height: 6px;
  border-radius: 3px;
  background: #333;
  transition: all 0.2s ease;
  cursor: pointer;
}
.dot.active {
  width: 20px;
  background: #fff;
}
.dot:not(.active) {
  width: 6px;
}

.accounts-btn-wrap {
  display: flex;
  justify-content: center;
  margin: 12px 0 18px;
}
.pill-btn {
  background: var(--card-2);
  border: none;
  border-radius: 24px;
  padding: 10px 28px;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  font-family: var(--font);
}

/* ─── Quick actions ───────────────────────────────────────────────────────── */
.actions-row {
  display: flex;
  justify-content: space-around;
  padding: 0 16px 22px;
}
.action-btn {
  background: none;
  border: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  font-family: var(--font);
}
.action-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card-2);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: filter 0.1s ease;
}
.action-btn:active .action-icon {
  filter: brightness(1.3);
}
.action-label {
  font-size: 12px;
  color: #fff;
  text-align: center;
  line-height: 1.25;
  white-space: pre-line;
}

/* ─── Promo card ──────────────────────────────────────────────────────────── */
.promo-card {
  margin: 0 12px 18px;
  background: var(--card);
  border-radius: 18px;
  padding: 16px 16px;
  position: relative;
}
.promo-pro {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 14px;
}
.promo-icon-round {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--card-3);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.promo-title {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
}
.promo-body {
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}
.promo-cta {
  width: 100%;
  background: #fff;
  border: none;
  border-radius: 24px;
  padding: 14px;
  color: #000;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  font-family: var(--font);
}
.promo-simple {
  display: flex;
  align-items: center;
  gap: 12px;
}
.promo-graphic {
  width: 70px;
  height: 70px;
  background: linear-gradient(135deg, rgba(100, 200, 255, 0.18), rgba(200, 100, 255, 0.12));
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.promo-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: none;
  border: none;
  color: var(--text-tertiary);
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

/* ─── Transaction lists ───────────────────────────────────────────────────── */
.section-heading {
  margin: 0 12px 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 4px;
}
.section-title {
  color: #fff;
  font-size: 16px;
  font-weight: 700;
}
.link-btn {
  background: none;
  border: none;
  color: var(--accent-blue);
  font-size: 14px;
  cursor: pointer;
  font-family: var(--font);
}
.tx-card {
  margin: 0 12px 18px;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
}
.tx-row {
  width: 100%;
  background: none;
  border: none;
  padding: 13px 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border-bottom: 1px solid var(--border-soft);
  text-align: left;
  cursor: pointer;
  font-family: var(--font);
  transition: background 0.1s ease;
}
.tx-row:last-of-type {
  border-bottom: none;
}
.tx-row:active {
  background: rgba(255, 255, 255, 0.05);
}
.tx-body {
  flex: 1;
  min-width: 0;
}
.tx-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
}
.tx-name {
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.3;
}
.tx-amount {
  font-size: 15px;
  font-weight: 500;
  flex-shrink: 0;
  text-align: right;
}
.tx-amount.positive {
  color: var(--positive);
}
.tx-amount.negative {
  color: #fff;
}
.tx-sub {
  color: var(--text-tertiary);
  font-size: 12px;
  display: block;
}
.tx-meta {
  display: flex;
  gap: 4px;
  margin-top: 2px;
  color: var(--text-tertiary);
  font-size: 13px;
}
.tx-viewall {
  width: 100%;
  background: none;
  border: none;
  padding: 13px 16px;
  color: var(--accent-blue);
  font-size: 14px;
  font-weight: 500;
  text-align: center;
  cursor: pointer;
  font-family: var(--font);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 48px 16px;
  gap: 14px;
}
.empty-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--card);
  display: flex;
  align-items: center;
  justify-content: center;
}
.empty-text {
  color: var(--text-tertiary);
  font-size: 15px;
}

/* ─── Avatars / icon glyphs ───────────────────────────────────────────────── */
.avatar-wrap {
  position: relative;
  flex-shrink: 0;
}
.avatar-round {
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-weight: 700;
  flex-shrink: 0;
}
.avatar-arrow-badge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  border-radius: 50%;
  background: #2a2a2a;
  border: 2px solid #111;
  display: flex;
  align-items: center;
  justify-content: center;
}
.avatar-subbadge {
  position: absolute;
  bottom: -2px;
  right: -2px;
  border-radius: 50%;
  border: 2px solid #111;
  overflow: hidden;
}

/* ─── Bottom nav ──────────────────────────────────────────────────────────── */
.nav-wrap {
  padding: 6px 12px 30px;
  flex-shrink: 0;
  background: #000;
}
.nav-bar {
  background: var(--card);
  border-radius: 32px;
  padding: 6px 4px;
  display: flex;
  justify-content: space-around;
  align-items: center;
}
.nav-item {
  background: none;
  border: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  cursor: pointer;
  font-family: var(--font);
}
.nav-icon-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-home-circle {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.nav-home-circle.active {
  background: #fff;
}
.nav-dot {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--danger);
}
.nav-label {
  font-size: 11px;
  color: var(--text-tertiary);
}
.nav-label.active {
  color: #fff;
  font-weight: 600;
}

/* ─── Scrollable content wrapper ──────────────────────────────────────────── */
.scroll-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  position: relative;
}
.glow-bg {
  position: absolute;
  top: -80px;
  left: 50%;
  transform: translateX(-50%);
  width: 380px;
  height: 380px;
  pointer-events: none;
  transition: background 0.4s ease;
  z-index: 0;
}

/* ─── Transactions screen ─────────────────────────────────────────────────── */
.tx-header {
  flex-shrink: 0;
  background: rgba(0, 0, 0, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 10;
}
.tx-header-top {
  padding: 58px 16px 0;
  display: flex;
  align-items: center;
}
.tx-balance-block {
  padding: 10px 16px 12px;
}
.tx-balance-amount {
  display: flex;
  align-items: baseline;
  gap: 2px;
}
.tx-balance-int {
  font-size: 44px;
  font-weight: 700;
  color: #fff;
}
.tx-balance-dec {
  font-size: 26px;
  font-weight: 700;
  color: #fff;
}
.tx-balance-label {
  color: var(--text-tertiary);
  font-size: 13px;
  margin-top: 2px;
}
.tx-search-wrap {
  padding: 0 16px 10px;
}
.tx-search-pill {
  background: var(--card-2);
  border-radius: 24px;
  height: 40px;
  display: flex;
  align-items: center;
  padding: 0 14px;
  gap: 8px;
  color: var(--text-tertiary);
  font-size: 15px;
}
.tx-search-pill span {
  flex: 1;
}
.month-tabs {
  display: flex;
  gap: 4px;
  padding: 0 16px 12px;
  overflow-x: auto;
}
.month-tab {
  padding: 7px 16px;
  border-radius: 20px;
  font-size: 14px;
  border: none;
  background: transparent;
  color: var(--text-tertiary);
  white-space: nowrap;
  transition: all 0.15s ease;
  flex-shrink: 0;
  cursor: pointer;
  font-family: var(--font);
}
.month-tab.active {
  background: var(--card-3);
  color: #fff;
}
.tx-list-content {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 12px 24px;
}
.tx-group {
  margin-bottom: 20px;
}
.tx-group-date {
  color: #fff;
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 10px;
  padding-left: 4px;
}

/* ─── Detail screen ───────────────────────────────────────────────────────── */
.detail-header {
  padding: 58px 16px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
}
.detail-nav-btns {
  display: flex;
  gap: 8px;
}
.detail-nav-btn:disabled,
.detail-nav-btn.disabled {
  background: #0a0a0a;
  opacity: 0.25;
}
.detail-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 28px 16px 20px;
}
.detail-amount {
  font-size: 38px;
  font-weight: 700;
  line-height: 1;
  margin-top: 18px;
}
.detail-amount.positive {
  color: var(--positive);
}
.detail-amount.negative {
  color: #fff;
}
.detail-sub {
  color: var(--text-tertiary);
  font-size: 14px;
  margin-top: 6px;
}
.detail-name {
  color: #fff;
  font-size: 18px;
  font-weight: 600;
  margin-top: 12px;
  text-align: center;
}
.detail-note {
  color: #888;
  font-size: 14px;
  margin-top: 4px;
}
.detail-info-card {
  margin: 0 12px 16px;
  background: var(--card);
  border-radius: 18px;
  overflow: hidden;
}
.detail-info-row {
  padding: 14px 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-soft);
}
.detail-info-row:last-child {
  border-bottom: none;
}
.detail-info-label {
  color: var(--text-tertiary);
  font-size: 14px;
}
.detail-info-value {
  color: #fff;
  font-size: 14px;
  font-weight: 500;
}
.detail-actions {
  margin: 0 12px 16px;
  display: flex;
  gap: 10px;
}
.detail-action-btn {
  flex: 1;
  background: var(--card);
  border: none;
  border-radius: 16px;
  padding: 16px 8px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  color: #fff;
  font-size: 12px;
  font-family: var(--font);
}
.detail-dots {
  display: flex;
  justify-content: center;
  gap: 5px;
  padding-bottom: 20px;
}
.detail-swipe-hint {
  text-align: center;
  color: #333;
  font-size: 12px;
  padding-bottom: 20px;
}

/* Utility */
.hidden {
  display: none !important;
}
button {
  -webkit-appearance: none;
  appearance: none;
}
