/* The dashboard (DashboardView.swift): sizes, colours and shadows from the app, which copied dashboard.css. */

.dashboard {
  position: relative;
  min-height: 100vh;
}

/* Header background: the streaks behind the greeting and balance (a dark version in Dark Mode), edge to edge,
   fading out above Quick access (HeaderBackground in DashboardView.swift). */
.dash-header {
  position: relative;
  isolation: isolate;
}
.dash-header::before {
  content: '';
  position: absolute;
  z-index: -1;
  top: -12px;
  left: -20px;
  right: -20px;
  bottom: 0;
  pointer-events: none;
  background: url('../img/dashboard-header.jpg') top center / 100% auto no-repeat;
  -webkit-mask-image: linear-gradient(to bottom, #000 60%, transparent);
  mask-image: linear-gradient(to bottom, #000 60%, transparent);
}
:root[data-btc-theme='dark'] .dash-header::before {
  background-image: url('../img/dashboard-header-dark.jpg');
}

/* MARK: Top bar */

.top-bar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  /* Solid, so the page never shows through it while it scrolls. */
  background: var(--surface);
  border-bottom: 1px solid var(--topbar-line);
}
.top-bar-row {
  max-width: 540px;
  margin: 0 auto;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.top-bar-actions {
  display: flex;
  gap: 10px;
}
/* 44pt round button with a light border and soft shadow (.icon-btn). */
.round-button {
  position: relative;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--icon-border);
  box-shadow: 0 4px 14px var(--button-shadow);
}
.round-button:active {
  opacity: 0.7;
}
/* The Support and Notifications icons: brand-blue duotone (ui.js), lighter in Dark Mode. */
.round-button .brand-icon {
  font-size: 22px;
  color: var(--nav-active);
}
.admin-button {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 700;
}
/* The red number: a 17pt capsule with a 2pt surface-coloured edge. */
.badge {
  position: absolute;
  top: -5px;
  right: -5px;
  min-width: 19px;
  height: 19px;
  padding: 0 4px;
  border-radius: 10px;
  border: 2px solid var(--surface);
  background: var(--badge);
  color: #fff;
  font-size: 9px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* MARK: Content */

.dashboard-content {
  position: relative;
  max-width: 540px;
  margin: 0 auto;
  padding: 4px 20px 38px;
}
@media (min-width: 900px) {
  .dashboard-content {
    padding-top: 24px;
  }
}

/* Profile (logo + greeting) */
.profile-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0 16px;
}
.profile-mark {
  width: 46px;
  height: 46px;
  border-radius: 50%;
  object-fit: cover;
}
.profile-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.greeting {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
}
.first-name {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Balance */
.balance-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 10px 0 6px;
}
.balance-title {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 600;
}
.flag-badge {
  width: 58px;
  height: 58px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--flag-circle);
  border: 1px solid var(--icon-border);
}
.ng-flag {
  width: 30px;
  height: 20px;
  border-radius: 3px;
  overflow: hidden;
  display: flex;
  border: 1px solid var(--flag-line);
}
.ng-flag span {
  flex: 1;
  background: var(--nigeria-green);
}
.ng-flag span:nth-child(2) {
  background: #fff;
}
.balance-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 2px;
  max-width: 100%;
}
.balance-amount {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  white-space: nowrap;
  min-width: 0;
  opacity: 0.9;
}
.balance-shown {
  font-size: clamp(22px, 8.5vw, 32px);
  letter-spacing: -1.5px;
  font-variant-numeric: tabular-nums;
}
.balance-hidden {
  font-size: 29px;
  letter-spacing: 2px;
}
.kobo {
  color: var(--kobo);
}
.eye-button {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 21px;
  color: var(--eye);
}
.withdraw-button {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  /* The logo's navy → a deep brand blue (white text 5.4:1 or better), with a soft blue glow. */
  background: linear-gradient(90deg, #1430aa 0%, #1d5fe8 100%);
  box-shadow: 0 6px 16px var(--cta-glow);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.withdraw-button .icon {
  font-size: 16px;
}
.withdraw-button:active {
  transform: scale(0.96);
  transition-duration: 0.12s;
}
@media (prefers-reduced-motion: reduce) {
  .withdraw-button,
  .withdraw-button:active {
    transition: none;
    transform: none;
  }
}

.section-head {
  padding: 27px 0 14px;
}
.section-head h2 {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.3px;
}

/* MARK: Quick access (neumorphic) */
.quick-tray {
  display: flex;
  gap: 12px;
  padding: 14px;
  border-radius: 26px;
  background: var(--neu-background);
  box-shadow: inset 2px 2px 5px var(--neu-dark), inset -2px -2px 5px var(--highlight);
}
.quick-tile {
  flex: 1;
  min-width: 0;
  min-height: 94px;
  padding: 12px 2px;
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 9px;
  color: var(--neu-text);
  background: var(--neu-background);
  box-shadow: 5px 5px 12px var(--neu-dark), -5px -5px 12px var(--highlight);
  transition: transform 0.2s ease-out;
}
.quick-tile:active {
  transform: scale(0.98);
}
.quick-icon {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  background: var(--neu-background);
  box-shadow: inset 3px 3px 6px var(--neu-dark), inset -3px -3px 6px var(--highlight);
}
.quick-label {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: -0.1px;
  text-align: center;
  line-height: 1.2;
}

/* MARK: Announcements carousel */
.promo {
  margin-top: 35px;
}
.promo-clip {
  border-radius: 18px;
  overflow: hidden;
}
.promo-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.promo-track::-webkit-scrollbar {
  display: none;
}
.promo-slide {
  position: relative;
  flex: 0 0 100%;
  scroll-snap-align: start;
  min-height: 112px;
  padding: 13px 16px 14px;
  overflow: hidden;
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}
.promo-theme-0 {
  background: linear-gradient(135deg, #0d1c42, #2a3f8f);
}
.promo-theme-1 {
  background: linear-gradient(135deg, #5b317d, #8d5cff);
}
.promo-theme-2 {
  background: linear-gradient(135deg, #17352e, #2f7d62);
}
/* Decorative circles (.promo-slide::after) */
.promo-slide::before,
.promo-slide::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.promo-slide::before {
  width: 170px;
  height: 170px;
  right: -20px;
  top: 20px;
  background: rgba(255, 255, 255, 0.05);
}
.promo-slide::after {
  width: 150px;
  height: 150px;
  right: -40px;
  top: -40px;
  background: rgba(255, 255, 255, 0.09);
}
.promo-tag {
  position: relative;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.4px;
  background: rgba(255, 255, 255, 0.16);
}
.promo-title {
  position: relative;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 22px;
  padding: 7px 50px 3px 0;
}
.promo-body {
  position: relative;
  font-size: 12.5px;
  line-height: 18px;
  color: rgba(255, 255, 255, 0.78);
  padding: 0 40px 9px 0;
}
.promo-cta {
  position: relative;
  padding: 6px 12px;
  border-radius: 9px;
  font-size: 12.5px;
  font-weight: 700;
  color: #16171b;
  background: #fff;
}
.promo-cta:active {
  opacity: 0.85;
}
.promo-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 8px;
}
.promo-dot {
  width: 7px;
  height: 7px;
  border-radius: 4px;
  background: var(--dot);
  transition: width 0.25s ease-out, background-color 0.25s;
  /* A bigger tap area than the dot itself. */
  position: relative;
}
.promo-dot::after {
  content: '';
  position: absolute;
  inset: -8px -4px;
}
.promo-dot.is-current {
  width: 20px;
  background: var(--purple);
}

/* MARK: Today's card rates */
.rates-empty {
  text-align: center;
  padding: 20px;
  border-radius: 18px;
  font-size: 13px;
  color: var(--muted);
  background: var(--box);
}
/* The search field above the rates: the card's white surface and soft shadow, a yellow ring while typing. */
.rates-search {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 6px 0 16px;
  margin-bottom: 14px;
  border-radius: 16px;
  background: var(--surface);
  border: 1px solid rgba(16, 24, 40, 0.08);
  box-shadow: 0 4px 18px var(--card-shadow);
  cursor: text;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rates-search:focus-within {
  border-color: var(--rate-accent);
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.25), 0 4px 18px var(--card-shadow);
}
[data-btc-theme='dark'] .rates-search {
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: none;
}
[data-btc-theme='dark'] .rates-search:focus-within {
  border-color: var(--rate-accent);
  box-shadow: 0 0 0 3px rgba(242, 201, 76, 0.18);
}
.rates-search-icon {
  display: flex;
  font-size: 19px;
  color: var(--rail-text);
}
.rates-search:focus-within .rates-search-icon {
  color: var(--selected-text);
}
.rates-search-input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  font-family: 'Outfit', sans-serif;
  font-size: 16px; /* 16px or more: iPhones don't zoom in on the field */
  color: var(--row-text);
  -webkit-appearance: none;
  appearance: none;
}
.rates-search-input::placeholder {
  color: var(--rail-text);
}
.rates-search-input::-webkit-search-cancel-button {
  -webkit-appearance: none; /* our own clear button instead */
}
.rates-search-input:focus-visible {
  outline: none; /* the field's ring shows focus */
}
.rates-search-clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  font-size: 19px;
  color: var(--rail-text);
}
.rates-search-clear:hover,
.rates-search-clear:focus-visible {
  color: var(--selected-text);
  background: var(--rail);
}
/* Nothing found: in place of the rates card. */
.rates-no-match {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 30px 24px;
  border-radius: 20px;
  text-align: center;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: 0 6px 32px var(--card-shadow);
  font-size: 13px;
  color: var(--muted);
}
[data-btc-theme='dark'] .rates-no-match {
  border-color: transparent;
  box-shadow: none;
}
.rates-no-match-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  border-radius: 16px;
  font-size: 22px;
  color: var(--rail-text);
  background: var(--rail);
}
.rates-no-match strong {
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: var(--selected-text);
  overflow-wrap: anywhere;
}
.rates-no-match-clear {
  margin-top: 10px;
  padding: 9px 18px;
  border-radius: 12px;
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--selected-text);
  background: var(--rail);
}
.rates-card {
  display: flex;
  border-radius: 20px;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid rgba(0, 0, 0, 0.03);
  box-shadow: 0 6px 32px var(--card-shadow);
}
[data-btc-theme='dark'] .rates-card {
  border-color: transparent;
  box-shadow: none;
}
.rates-rail {
  width: 112px;
  flex: none;
  background: var(--rail);
}
.rail-item {
  position: relative;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 7px;
  padding: 13px 8px;
}
/* The chosen card: a white tab that joins the rates panel, rounded on the left, with a yellow bar. */
.rail-item.is-selected {
  background: var(--surface);
  border-radius: 16px 0 0 16px;
}
.rail-accent {
  position: absolute;
  left: 0;
  top: 16px;
  bottom: 16px;
  width: 4px;
  border-radius: 2px;
  background: var(--rate-accent);
  display: none;
}
.rail-item.is-selected .rail-accent {
  display: block;
}
.rail-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--selected-text);
  background: var(--surface);
  opacity: 0.55;
  filter: grayscale(1);
}
.rail-item.is-selected .rail-icon {
  opacity: 1;
  filter: none;
  box-shadow: 0 3px 12px rgba(16, 24, 40, 0.1);
}
.rail-name {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  color: var(--rail-text);
  text-align: center;
  line-height: 1.2;
}
.rail-item.is-selected .rail-name {
  font-weight: 700;
  color: var(--selected-text);
}
/* "+18 / MORE" after the first cards (and "Show less" once they're all shown). */
.rail-more {
  gap: 2px;
  padding: 18px 8px;
  color: var(--rail-text);
}
.rail-more-count {
  font-family: 'Outfit', sans-serif;
  font-size: 30px;
  font-weight: 700;
  line-height: 1;
}
.rail-more-label {
  font-family: 'DM Sans', sans-serif;
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.rail-more-less {
  font-family: 'Outfit', sans-serif;
  font-size: 14px;
  font-weight: 600;
}
.rail-more:hover,
.rail-more:focus-visible {
  color: var(--selected-text);
}
.rates-rows {
  flex: 1;
  min-width: 0;
  padding: 8px 18px 8px 16px;
}
.rates-rows.is-fading {
  animation: rates-fade 0.28s ease-out;
}
@keyframes rates-fade {
  from {
    opacity: 0;
  }
}
.rate-row {
  width: 100%;
  min-height: 46px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rate-row:active {
  opacity: 0.6;
}
.rate-flag {
  width: 28px;
  display: flex;
  justify-content: center;
  flex: none;
}
.rate-currency {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.rate-code {
  font-family: 'Outfit', sans-serif;
  font-size: 17px;
  color: var(--row-text);
}
.rate-type {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
/* "≈ ₦974": a quiet "about" sign, a lighter ₦, and the number in semibold, all on one baseline. */
.rate-amount {
  display: inline-flex;
  align-items: baseline;
  gap: 1px;
  margin-left: 8px;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -0.1px;
  color: var(--amount);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.rate-approx {
  margin-right: 4px;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.rate-naira {
  font-size: 14px;
  font-weight: 500;
}

/* Guest page (signed out): the locked parts are one "Sign in" target each; the rate rows only show. */
.guest-lock {
  cursor: pointer;
}
.guest-locked {
  pointer-events: none;
}
.rate-row.is-static:active {
  opacity: 1;
}
