/* ================================================================
   Gather Community Bank
   Bright, blue, PayPal-inspired fintech.
   ================================================================ */

:root {
  --paper: #f5f8fc;
  --paper-deep: #eaf1f8;
  --card: #ffffff;
  --ink: #0b1f3a;
  --ink-2: #2f4664;
  --muted: #63758e;
  --line: #dbe5f1;
  --line-strong: #c4d3e5;
  --blue-950: #001c64;
  --blue-900: #003087;
  --blue-800: #0046a8;
  --blue-700: #005ea6;
  --blue-600: #0070e0;
  --blue-100: #e8f1fb;
  --success: #0f8a4d;
  --success-soft: #e8f7ef;
  --gold: #f5b700;
  --red: #c0392b;
  --shadow-sm: 0 1px 2px rgba(11, 31, 58, 0.06);
  --shadow-md: 0 22px 45px -30px rgba(11, 31, 58, 0.3);
  --shadow-lg: 0 40px 80px -40px rgba(11, 31, 58, 0.38);
  --display: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --sans: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Arial, sans-serif;
  --radius: 18px;
}

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

[hidden] {
  display: none !important;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--sans);
  color: var(--ink);
  background-color: var(--paper);
  background-image:
    radial-gradient(1200px 620px at 92% -8%, #ffffff 0%, rgba(255, 255, 255, 0) 62%),
    radial-gradient(900px 520px at -10% 108%, #e9f2fd 0%, rgba(233, 242, 253, 0) 58%);
  background-attachment: fixed;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, p {
  margin: 0;
}

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

button {
  cursor: pointer;
}

a {
  color: inherit;
}

::selection {
  background: var(--blue-900);
  color: #ffffff;
}

:focus-visible {
  outline: 2px solid var(--blue-600);
  outline-offset: 2px;
}

.icon {
  width: 20px;
  height: 20px;
  display: inline-block;
  flex-shrink: 0;
}

.icon.xs {
  width: 13px;
  height: 13px;
}

body.modal-open {
  overflow: hidden;
}

.noscript {
  padding: 40px;
  text-align: center;
}

/* ------------------------------------------------
   Buttons & shared bits
   ------------------------------------------------ */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 12px 20px;
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease,
    transform 0.15s ease, box-shadow 0.18s ease;
}

.btn:active {
  transform: translateY(1px);
}

.btn[disabled] {
  opacity: 0.58;
  cursor: wait;
  transform: none;
}

.btn .icon {
  width: 17px;
  height: 17px;
}

.btn-primary {
  background: var(--blue-600);
  color: #ffffff;
  box-shadow: 0 10px 20px -14px rgba(0, 48, 135, 0.4);
}

.btn-primary:hover {
  background: var(--blue-700);
}

.btn-accent {
  background: #ffffff;
  color: var(--blue-900);
  box-shadow: 0 12px 22px -14px rgba(0, 28, 100, 0.4);
}

.btn-accent:hover {
  background: var(--blue-100);
}

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

.btn-outline:hover {
  background: var(--paper-deep);
}

.btn-ghost {
  background: transparent;
  color: var(--muted);
}

.btn-ghost:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.btn-glass {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
  color: #ffffff;
}

.btn-glass:hover {
  background: rgba(255, 255, 255, 0.16);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 9px 13px;
  font-size: 12.5px;
  border-radius: 999px;
}

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: inherit;
  transition: background 0.18s ease, color 0.18s ease;
}

.icon-btn:hover {
  background: rgba(255, 255, 255, 0.12);
}

.icon-btn.on-paper:hover {
  background: var(--paper-deep);
}

.link {
  color: var(--blue-700);
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.link:hover {
  text-decoration: underline;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-600);
}

.eyebrow.light {
  color: rgba(255, 255, 255, 0.66);
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.muted {
  color: var(--muted);
}

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
  user-select: none;
  font-family: var(--sans);
}

.avatar-xs { width: 28px; height: 28px; font-size: 10.5px; }
.avatar-sm { width: 36px; height: 36px; font-size: 12px; }
.avatar-md { width: 44px; height: 44px; font-size: 13.5px; }
.avatar-lg { width: 56px; height: 56px; font-size: 17px; }
.avatar-xl { width: 88px; height: 88px; font-size: 27px; }

.avatar-stack {
  display: flex;
}

.avatar-stack .avatar {
  border: 2px solid var(--blue-900);
  margin-left: -9px;
}

.avatar-stack .avatar:first-child {
  margin-left: 0;
}

/* ------------------------------------------------
   Brand
   ------------------------------------------------ */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  color: var(--ink);
}

.logo-mark {
  width: 38px;
  height: 38px;
  display: block;
}

.logo-bg { fill: var(--blue-900); }
.logo-dot { fill: #ffffff; }
.logo-line { stroke: #ffffff; stroke-opacity: 0.45; }

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-name {
  font-family: var(--display);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 8.5px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.19em;
  color: var(--muted);
  margin-top: 4px;
}

/* ------------------------------------------------
   Auth
   ------------------------------------------------ */

.auth {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  min-height: 100vh;
}

.auth-brand {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 4vw, 54px) clamp(28px, 5vw, 76px);
  background:
    radial-gradient(120% 100% at 100% 0%, #0070e0 0%, rgba(0, 112, 224, 0) 55%),
    linear-gradient(160deg, #0046a8 0%, var(--blue-950) 78%);
  color: #ffffff;
}

.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.auth-brand::before {
  width: 620px;
  height: 620px;
  right: -260px;
  top: -260px;
}

.auth-brand::after {
  width: 420px;
  height: 420px;
  right: -160px;
  top: -160px;
}

.auth-brand .brand {
  position: relative;
  z-index: 1;
  color: #ffffff;
}

.auth-brand .brand-sub {
  color: rgba(255, 255, 255, 0.55);
}

.auth-brand .logo-bg { fill: #ffffff; }
.auth-brand .logo-dot { fill: var(--blue-900); }
.auth-brand .logo-line { stroke: var(--blue-900); stroke-opacity: 0.4; }

.auth-brand-copy {
  position: relative;
  z-index: 1;
  max-width: 560px;
  padding: 48px 0 40px;
  animation: rise 0.55s ease both;
}

.auth-brand-copy h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(38px, 4.8vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 20px 0 22px;
}

.auth-brand-copy h1 em {
  font-style: normal;
  color: #8ec5ff;
}

.auth-brand-copy .lede {
  max-width: 440px;
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.72);
}

.auth-mini-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(100%, 380px);
  margin-top: 34px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(10px);
}

.auth-mini-card .mini-copy {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.auth-mini-card .mini-copy strong {
  font-size: 13px;
  font-weight: 600;
}

.auth-mini-card .mini-copy span {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.55);
  margin-top: 2px;
}

.auth-mini-card .mini-amount {
  font-family: var(--display);
  font-size: 19px;
  font-weight: 700;
  color: #8ec5ff;
}

.auth-perks {
  position: relative;
  z-index: 1;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 26px;
  max-width: 620px;
}

.auth-perks li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
}

.auth-perks .icon {
  width: 14px;
  height: 14px;
  color: rgba(142, 197, 255, 0.95);
}

.auth-brand .fine {
  position: relative;
  z-index: 1;
  margin-top: 30px;
  font-size: 11px;
  letter-spacing: 0.04em;
  color: rgba(255, 255, 255, 0.38);
}

.auth-panel {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(30px, 5vw, 64px) clamp(22px, 5vw, 72px);
  background: rgba(255, 255, 255, 0.65);
}

.auth-form-wrap {
  width: 100%;
  max-width: 430px;
  animation: rise 0.45s ease both;
}

.auth-switch {
  display: inline-flex;
  gap: 3px;
  padding: 4px;
  margin-bottom: 32px;
  border-radius: 12px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
}

.auth-switch button {
  border: 0;
  background: transparent;
  border-radius: 8px;
  padding: 8px 18px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.auth-switch button.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.auth-form-wrap h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(30px, 3.4vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.1;
}

.auth-sub {
  color: var(--muted);
  font-size: 14px;
  margin: 9px 0 28px;
}

.auth-form-wrap .tiny-note {
  margin-top: 16px;
  text-align: center;
}

.demo-peek {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.demo-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 10px;
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.demo-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--ink-2);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.demo-chip:hover {
  border-color: var(--blue-600);
  background: var(--blue-100);
}

/* ------------------------------------------------
   Forms
   ------------------------------------------------ */

.field {
  display: flex;
  flex-direction: column;
  gap: 7px;
  margin-bottom: 17px;
}

.field > label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-2);
}

.field input,
.field textarea,
.field select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line-strong);
  border-radius: 12px;
  background: #ffffff;
  padding: 0 14px;
  font-family: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  height: auto;
  min-height: 86px;
  padding: 12px 14px;
  resize: vertical;
}

.field input::placeholder,
.field textarea::placeholder {
  color: #93a7bf;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px rgba(0, 112, 224, 0.16);
}

.field-help {
  display: flex;
  align-items: flex-start;
  gap: 5px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
}

.field-help .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.input-affix {
  position: relative;
}

.input-affix > span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  font-size: 14px;
  pointer-events: none;
}

.input-affix input {
  padding-left: 30px;
}

.form-alert {
  border: 1px solid #f5c6c2;
  background: #fdecea;
  color: #b3261e;
  border-radius: 11px;
  padding: 10px 13px;
  font-size: 12.5px;
  line-height: 1.45;
  margin-bottom: 15px;
}

.form-alert[hidden] {
  display: none;
}

.tiny-note {
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--muted);
}

.tiny-note.center {
  text-align: center;
}

.tiny-note strong {
  color: var(--ink-2);
}

/* ------------------------------------------------
   App shell
   ------------------------------------------------ */

.app-shell {
  display: grid;
  grid-template-columns: 264px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding: 28px 20px 22px;
  border-right: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  backdrop-filter: blur(12px);
  z-index: 10;
}

.sidebar-head {
  padding: 0 6px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 14px;
  border-radius: 12px;
  color: var(--ink-2);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: background 0.16s ease, color 0.16s ease, box-shadow 0.16s ease;
}

.nav-item .icon {
  width: 19px;
  height: 19px;
  color: var(--muted);
  transition: color 0.16s ease;
}

.nav-item:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.nav-item.active {
  background: var(--blue-900);
  color: #ffffff;
  box-shadow: 0 12px 22px -14px rgba(0, 48, 135, 0.28);
}

.nav-item.active .icon {
  color: #cfe4ff;
}

.sidebar-spacer {
  flex: 1;
}

.side-note {
  display: flex;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: linear-gradient(150deg, #eef5fe, #e2eefb);
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--ink-2);
}

.side-note .icon {
  width: 16px;
  height: 16px;
  color: var(--blue-700);
  margin-top: 1px;
}

.side-note strong {
  display: block;
  font-size: 11.5px;
  color: var(--ink);
  margin-bottom: 1px;
}

.side-user-row {
  display: flex;
  align-items: center;
  gap: 4px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.side-user {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 0;
  padding: 6px;
  border-radius: 12px;
  text-decoration: none;
  color: inherit;
  transition: background 0.16s ease;
}

.side-user:hover {
  background: var(--paper-deep);
}

.side-user-text {
  min-width: 0;
  flex: 1;
  display: flex;
  flex-direction: column;
  line-height: 1.35;
}

.side-user-text strong {
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.side-user-text span {
  font-size: 11.5px;
  color: var(--muted);
}

.side-user > .side-chev {
  width: 14px;
  height: 14px;
  color: var(--muted);
}

.side-logout {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  flex-shrink: 0;
}

.side-logout:hover {
  background: var(--blue-100);
  color: var(--blue-700);
}

.side-logout .icon {
  width: 17px;
  height: 17px;
}

.mobile-bar,
.bottom-nav {
  display: none;
}

.main {
  min-width: 0;
  padding: 42px clamp(24px, 4vw, 58px) 84px;
}

.page {
  max-width: 1140px;
  margin: 0 auto;
}

.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 28px;
  animation: rise 0.4s ease both;
}

.page-head h1 {
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(31px, 3.6vw, 43px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}

.page-head .page-sub {
  color: var(--muted);
  font-size: 14px;
  margin-top: 7px;
}

.page-head .page-date {
  color: var(--muted);
  font-size: 12px;
  margin-bottom: 8px;
  letter-spacing: 0.01em;
}

.page-actions {
  display: flex;
  align-items: center;
  gap: 9px;
  flex-shrink: 0;
  padding-bottom: 3px;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------
   Cards & overview
   ------------------------------------------------ */

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.card-head h2 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 21px;
  letter-spacing: -0.015em;
}

.card-head .card-count {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  background: var(--paper-deep);
  border-radius: 999px;
  padding: 3px 8px;
  margin-left: 6px;
  vertical-align: 2px;
}

.overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.62fr) minmax(292px, 0.88fr);
  gap: 24px;
  align-items: start;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
  min-width: 0;
}

.balance-card {
  position: relative;
  overflow: hidden;
  border-radius: 26px;
  padding: 30px 32px 27px;
  color: #ffffff;
  background:
    radial-gradient(130% 170% at 100% 0%, #0070e0 0%, rgba(0, 112, 224, 0) 55%),
    linear-gradient(155deg, #0046a8 0%, var(--blue-950) 100%);
  box-shadow: 0 30px 55px -34px rgba(0, 28, 100, 0.4);
  animation: rise 0.45s ease both;
}

.balance-card::before,
.balance-card::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  pointer-events: none;
}

.balance-card::before {
  width: 430px;
  height: 430px;
  right: -140px;
  top: -200px;
}

.balance-card::after {
  width: 290px;
  height: 290px;
  right: -74px;
  top: -130px;
}

.balance-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.balance-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: rgba(255, 255, 255, 0.58);
}

.balance-amount {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(44px, 5.4vw, 62px);
  letter-spacing: -0.035em;
  line-height: 1;
  margin: 12px 0 6px;
  font-variant-numeric: tabular-nums;
}

.balance-wallet {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  padding: 6px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.09);
  border: 1px solid rgba(255, 255, 255, 0.15);
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.72);
}

.balance-wallet .wallet-handle {
  color: #ffffff;
  font-weight: 600;
}

.balance-wallet .wallet-divider {
  width: 3px;
  height: 3px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
}

.balance-wallet .wallet-email {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.balance-actions {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 25px;
}

.balance-hint {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 17px;
  font-size: 11px;
  color: rgba(255, 255, 255, 0.42);
}

.balance-hint .icon {
  width: 13px;
  height: 13px;
}

.mini-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.stat-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 17px 19px;
  box-shadow: var(--shadow-sm);
  animation: rise 0.45s ease both;
}

.stat-card:nth-child(2) { animation-delay: 0.04s; }
.stat-card:nth-child(3) { animation-delay: 0.08s; }

.stat-label {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.stat-value {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-top: 6px;
  font-variant-numeric: tabular-nums;
}

.stat-card .stat-foot {
  font-size: 10.5px;
  color: var(--muted);
  margin-top: 3px;
}

/* Transaction rows */

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

.tx-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.tx-row:first-child {
  border-top: 0;
  padding-top: 2px;
}

.tx-row:last-child {
  padding-bottom: 1px;
}

.tx-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.tx-icon .icon {
  width: 16px;
  height: 16px;
}

.tx-icon.out {
  background: var(--blue-100);
  color: var(--blue-700);
}

.tx-icon.in {
  background: var(--success-soft);
  color: var(--success);
}

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

.tx-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-amount {
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  padding-left: 6px;
}

.tx-amount.positive { color: var(--success); }
.tx-amount.negative { color: var(--ink); }

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 26px 14px;
  color: var(--muted);
}

.empty-state .empty-icon {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--paper-deep);
  color: var(--blue-700);
  margin-bottom: 4px;
}

.empty-state strong {
  font-size: 13.5px;
  color: var(--ink);
}

.empty-state p {
  font-size: 12px;
  max-width: 260px;
  line-height: 1.5;
}

.people-list {
  display: flex;
  flex-direction: column;
}

.person-row {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.person-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.person-row:last-child {
  padding-bottom: 0;
}

.person-main {
  flex: 1;
  min-width: 0;
}

.person-main strong {
  display: block;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-main span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.person-send {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  color: var(--blue-700);
  flex-shrink: 0;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease;
}

.person-send .icon {
  width: 14px;
  height: 14px;
}

.person-row:hover .person-send {
  background: var(--blue-900);
  border-color: var(--blue-900);
  color: #ffffff;
}

.birthday-list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.birthday-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.birthday-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.birthday-main {
  flex: 1;
  min-width: 0;
}

.birthday-main strong {
  display: block;
  font-size: 12.5px;
  font-weight: 600;
}

.birthday-main span {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.birthday-when {
  font-size: 10.5px;
  font-weight: 700;
  color: var(--blue-700);
  background: var(--blue-100);
  border-radius: 999px;
  padding: 4px 8px;
  white-space: nowrap;
}

.birthday-when.soon {
  background: var(--blue-100);
  color: var(--blue-700);
}

.note-card {
  padding: 20px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background:
    radial-gradient(120% 100% at 100% 0%, #eef5ff 0%, rgba(238, 245, 255, 0) 70%),
    linear-gradient(150deg, #e9f2fc, #dcebfa);
  box-shadow: var(--shadow-sm);
}

.note-card .eyebrow {
  font-size: 9.5px;
  letter-spacing: 0.14em;
  margin-bottom: 8px;
}

.note-card p {
  font-size: 12px;
  line-height: 1.6;
  color: var(--ink-2);
}

.note-card strong {
  color: var(--ink);
}

/* ------------------------------------------------
   Send money
   ------------------------------------------------ */

.send-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.48fr) minmax(272px, 0.78fr);
  gap: 24px;
  align-items: start;
}

.form-card {
  padding: 28px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow-sm);
  animation: rise 0.42s ease both;
}

.recipient-picker {
  position: relative;
}

.bank-location {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  padding: 7px 8px 7px 12px;
  border: 1px solid #cfe0f5;
  border-radius: 12px;
  background: #eef5fe;
}

.bank-location-label {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  color: var(--blue-900);
  font-size: 11.5px;
  font-weight: 600;
}

.bank-location-label .icon {
  width: 15px;
  height: 15px;
  color: var(--blue-600);
}

.bank-location select {
  min-width: 0;
  max-width: 56%;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #ffffff;
  padding: 6px 8px;
  color: var(--blue-900);
  font-family: inherit;
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
}

.bank-location select:focus {
  outline: none;
  border-color: var(--blue-600);
  box-shadow: 0 0 0 3px rgba(0, 112, 224, 0.14);
}

.recipient-input {
  position: relative;
}

.recipient-input > .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--muted);
  pointer-events: none;
}

.recipient-input input {
  padding-left: 41px;
}

.combo-menu {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  z-index: 25;
  max-height: 288px;
  overflow-y: auto;
  padding: 6px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
}

.combo-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  text-align: left;
  font-family: inherit;
  transition: background 0.14s ease;
}

.combo-option:hover,
.combo-option:focus {
  background: #eef5fd;
  outline: none;
}

.combo-opt-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  line-height: 1.35;
}

.combo-opt-text strong {
  font-size: 13px;
  font-weight: 600;
}

.combo-opt-text span {
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.combo-empty {
  padding: 18px 14px;
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.5;
}

.selected-person {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #f2f8fe;
}

.selected-info {
  flex: 1;
  min-width: 0;
}

.selected-info strong {
  display: block;
  font-size: 14px;
}

.selected-info span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.text-btn {
  border: 0;
  background: transparent;
  padding: 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--blue-700);
}

.text-btn:hover {
  text-decoration: underline;
}

.amount-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.amount-input-wrap {
  position: relative;
  flex: 1;
}

.amount-input-wrap .currency {
  position: absolute;
  left: 17px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--display);
  font-weight: 600;
  font-size: 26px;
  color: var(--muted);
  pointer-events: none;
}

.amount-input-wrap input {
  height: 66px;
  padding: 0 16px 0 40px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 30px;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
  background: #ffffff;
}

.amount-input-wrap input::placeholder {
  color: #a9bbd1;
}

.quick-amounts {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 2px;
}

.quick-chip {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-2);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 11.5px;
  font-weight: 600;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.quick-chip:hover {
  background: var(--blue-100);
  border-color: #b9d6f7;
}

.transfer-summary {
  margin: 6px 0 18px;
  padding: 16px 17px;
  border-radius: 14px;
  background: #f2f8fe;
  border: 1px solid var(--line);
}

.summary-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 18px;
  font-size: 12.5px;
  color: var(--muted);
  padding: 4px 0;
}

.summary-row strong {
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  text-align: right;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.summary-row .free {
  color: var(--success);
}

.summary-row.total {
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px dashed var(--line-strong);
  color: var(--ink-2);
  font-weight: 600;
}

.summary-row.total strong {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 700;
}

.mini-balance {
  padding: 22px;
  border-radius: 18px;
  background: var(--blue-900);
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.mini-balance::after {
  content: "";
  position: absolute;
  width: 200px;
  height: 200px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 50%;
  right: -76px;
  top: -106px;
}

.mini-balance .label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.mini-balance .value {
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.03em;
  margin-top: 5px;
  font-variant-numeric: tabular-nums;
}

.mini-balance .sub {
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.5);
  margin-top: 4px;
}

.tip-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 13px;
}

.tip-list li {
  display: flex;
  gap: 9px;
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
}

.tip-list .icon {
  width: 14px;
  height: 14px;
  margin-top: 2px;
  color: var(--blue-700);
}

/* ------------------------------------------------
   Withdraw page
   ------------------------------------------------ */

.withdraw-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.32fr) minmax(272px, 0.68fr);
  gap: 24px;
  align-items: start;
}

.bank-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 46px;
  height: 46px;
  padding: 0 9px;
  border-radius: 13px;
  background: linear-gradient(150deg, var(--blue-600) 0%, var(--blue-900) 100%);
  font-weight: 700;
  color: #ffffff;
  font-family: var(--display);
  font-size: 13px;
  line-height: 1;
  text-align: center;
}

.bank-mark.sm {
  min-width: 38px;
  height: 38px;
  padding: 0 7px;
  border-radius: 10px;
  font-size: 10.5px;
}

.withdraw-requests {
  margin-top: 24px;
}

.tracker-tools {
  display: flex;
  align-items: center;
  gap: 10px;
}

.live-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-700);
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue-600);
  animation: breathe 2.4s ease-in-out infinite;
}

.request-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.request-card {
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fbfdff;
}

.request-top {
  display: flex;
  align-items: center;
  gap: 12px;
}

.request-main {
  flex: 1;
  min-width: 0;
}

.request-main strong {
  display: block;
  font-size: 13.5px;
  font-weight: 600;
}

.request-main span {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  color: var(--muted);
}

.request-side {
  flex-shrink: 0;
  text-align: right;
}

.request-amount {
  display: block;
  margin-top: 5px;
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.status-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.status-badge.pending {
  background: #f6ecd6;
  color: #8a6114;
}

.status-badge.processing {
  background: #e3f0fb;
  color: #1c5a8a;
}

.status-badge.completed {
  background: var(--success-soft);
  color: var(--success);
}

.request-note {
  margin-top: 8px;
  font-size: 11.5px;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.request-timeline {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-top: 15px;
  padding-top: 13px;
  border-top: 1px dashed var(--line);
  list-style: none;
}

.request-timeline li {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
}

.request-timeline li::before {
  content: "";
  position: absolute;
  left: 26px;
  right: 6px;
  top: 9px;
  height: 1px;
  background: var(--line);
}

.request-timeline li:last-child::before {
  display: none;
}

.request-timeline li.line-done::before {
  background: var(--success);
}

.timeline-dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 19px;
  height: 19px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  background: var(--card);
  color: var(--muted);
  font-size: 9.5px;
  font-weight: 700;
}

.timeline-dot .icon {
  width: 11px;
  height: 11px;
}

.request-timeline li.done .timeline-dot {
  border-color: var(--success);
  background: var(--success);
  color: #ffffff;
}

.request-timeline li.current .timeline-dot {
  border-color: var(--blue-600);
  box-shadow: 0 0 0 4px var(--blue-100);
}

.request-timeline li > div {
  min-width: 0;
}

.request-timeline strong {
  display: block;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.request-timeline li > div span {
  display: block;
  margin-top: 1px;
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.search-empty {
  display: none;
  padding: 44px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line-strong);
  border-radius: 16px;
}

.search-empty.visible {
  display: block;
}

/* ------------------------------------------------
   History page
   ------------------------------------------------ */

.history-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, 0.72fr);
  gap: 24px;
  align-items: start;
}

.segmented {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--paper-deep);
}

.segmented button {
  border: 0;
  border-radius: 7px;
  background: transparent;
  padding: 7px 13px;
  font-size: 11.5px;
  font-weight: 600;
  color: var(--muted);
  transition: background 0.15s ease, color 0.15s ease;
}

.segmented button.active {
  background: var(--card);
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.history-list {
  display: flex;
  flex-direction: column;
}

.history-group {
  margin-top: 20px;
}

.history-group:first-child {
  margin-top: 0;
}

.history-group h3 {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 4px;
}

.history-row {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.history-group .history-row:first-of-type {
  border-top: 0;
}

.history-main {
  flex: 1;
  min-width: 0;
}

.history-title {
  font-size: 13.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-sub {
  font-size: 11.5px;
  color: var(--muted);
  margin-top: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.history-right {
  text-align: right;
  flex-shrink: 0;
}

.history-right .tx-amount {
  display: block;
  padding: 0;
}

.history-time {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 3px;
}

.flow-card .flow-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  padding: 13px 0;
  border-top: 1px solid var(--line);
}

.flow-card .flow-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.flow-label {
  font-size: 12px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 7px;
}

.flow-label .icon {
  width: 14px;
  height: 14px;
}

.flow-value {
  font-family: var(--display);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.015em;
  font-variant-numeric: tabular-nums;
}

.flow-value.in { color: var(--success); }

/* ------------------------------------------------
   Profile
   ------------------------------------------------ */

.profile-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: start;
}

.profile-card {
  position: relative;
  overflow: hidden;
  text-align: center;
  padding: 32px 26px 26px;
  border-radius: 22px;
  background:
    radial-gradient(130% 130% at 50% -10%, #0070e0 0%, rgba(0, 112, 224, 0) 55%),
    linear-gradient(165deg, #0046a8 0%, var(--blue-950) 100%);
  color: #ffffff;
  box-shadow: 0 28px 50px -34px rgba(0, 28, 100, 0.4);
}

.profile-card::before {
  content: "";
  position: absolute;
  width: 300px;
  height: 300px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  border-radius: 50%;
  left: 50%;
  transform: translateX(-50%);
  top: -205px;
}

.profile-card .avatar {
  position: relative;
  z-index: 1;
  border: 3px solid rgba(255, 255, 255, 0.22);
}

.profile-card h2 {
  position: relative;
  z-index: 1;
  font-family: var(--display);
  font-weight: 700;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin-top: 13px;
}

.profile-handle {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.13);
  font-size: 12px;
  color: rgba(255, 255, 255, 0.8);
}

.profile-card .email {
  position: relative;
  z-index: 1;
  display: block;
  margin-top: 9px;
  font-size: 11.5px;
  color: rgba(255, 255, 255, 0.48);
  overflow-wrap: anywhere;
}

.profile-card .joined {
  position: relative;
  z-index: 1;
  font-size: 10.5px;
  color: rgba(255, 255, 255, 0.4);
  margin-top: 14px;
}

.profile-actions {
  position: relative;
  z-index: 1;
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 19px;
}

.detail-list {
  display: flex;
  flex-direction: column;
}

.detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.detail-row:first-child {
  border-top: 0;
  padding-top: 0;
}

.detail-row:last-child {
  padding-bottom: 0;
}

.detail-label {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
  color: var(--muted);
}

.detail-label .icon {
  width: 15px;
  height: 15px;
}

.detail-value {
  font-size: 13px;
  font-weight: 600;
  text-align: right;
  overflow-wrap: anywhere;
}

.detail-value.mono {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.profile-note {
  margin-top: 18px;
  display: flex;
  gap: 10px;
  padding: 14px;
  border-radius: 13px;
  border: 1px solid var(--line);
  background: #f2f8fe;
  font-size: 11.5px;
  line-height: 1.55;
  color: var(--ink-2);
}

.profile-note .icon {
  width: 16px;
  height: 16px;
  color: var(--blue-700);
  flex-shrink: 0;
  margin-top: 1px;
}

.profile-note strong {
  color: var(--ink);
}

.signout-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.65);
}

.signout-card p {
  font-size: 12px;
  color: var(--muted);
}

.signout-card strong {
  display: block;
  font-size: 13px;
  color: var(--ink);
  margin-bottom: 2px;
}

/* ------------------------------------------------
   Modals
   ------------------------------------------------ */

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(0, 20, 60, 0.5);
  backdrop-filter: blur(6px);
  animation: fade-in 0.18s ease both;
}

.modal {
  width: min(100%, 460px);
  max-height: min(90vh, 720px);
  overflow-y: auto;
  padding: 26px;
  border-radius: 22px;
  background: var(--card);
  border: 1px solid var(--line);
  box-shadow: 0 50px 100px -30px rgba(0, 28, 100, 0.35);
  animation: modal-in 0.24s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}

.modal.wide {
  width: min(100%, 540px);
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.modal-head h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 27px;
  letter-spacing: -0.02em;
  line-height: 1.1;
  margin-top: 5px;
}

.modal-head .icon-btn {
  margin: -4px -6px 0 0;
  color: var(--muted);
}

.modal-head .icon-btn:hover {
  background: var(--paper-deep);
  color: var(--ink);
}

.modal-sub {
  font-size: 12.5px;
  line-height: 1.6;
  color: var(--muted);
  margin-bottom: 18px;
}

.modal-sub strong {
  color: var(--ink-2);
}

.review-person {
  display: flex;
  align-items: center;
  gap: 13px;
  padding: 14px;
  border-radius: 14px;
  background: #f2f8fe;
  border: 1px solid var(--line);
  margin-bottom: 16px;
}

.review-person .info {
  min-width: 0;
}

.review-person strong {
  display: block;
  font-size: 14.5px;
}

.review-person span {
  display: block;
  font-size: 11.5px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.receipt {
  border-top: 1px dashed var(--line-strong);
  border-bottom: 1px dashed var(--line-strong);
  padding: 8px 0;
  margin-bottom: 16px;
}

.receipt-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 7px 0;
  font-size: 12.5px;
  color: var(--muted);
}

.receipt-row strong {
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.receipt-row .free {
  color: var(--success);
}

.receipt-row.total {
  border-top: 1px solid var(--line);
  margin-top: 4px;
  padding-top: 12px;
  color: var(--ink-2);
  font-weight: 600;
}

.receipt-row.total strong {
  font-family: var(--display);
  font-size: 21px;
  font-weight: 700;
}

.receipt-note {
  max-width: 62%;
  text-align: right;
  color: var(--ink-2);
  font-style: italic;
  overflow-wrap: anywhere;
}

.modal .btn + .btn {
  margin-top: 8px;
}

.success-view {
  text-align: center;
  padding: 8px 4px 2px;
}

.success-badge {
  width: 64px;
  height: 64px;
  margin: 0 auto 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--success-soft);
  color: var(--success);
  animation: pop 0.4s cubic-bezier(0.2, 1.3, 0.4, 1) both;
}

.success-badge .icon {
  width: 30px;
  height: 30px;
  stroke-width: 2.2;
}

.success-view h3 {
  font-family: var(--display);
  font-weight: 700;
  font-size: 34px;
  letter-spacing: -0.03em;
  margin: 6px 0 4px;
}

.success-view .receipt {
  text-align: left;
  margin-top: 20px;
}

.success-view .btn {
  margin-top: 8px;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes modal-in {
  from { opacity: 0; transform: translateY(14px) scale(0.985); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes pop {
  from { opacity: 0; transform: scale(0.6); }
  to { opacity: 1; transform: scale(1); }
}

/* ------------------------------------------------
   Toasts & boot
   ------------------------------------------------ */

.toasts {
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 220px;
  max-width: 340px;
  padding: 12px 15px;
  border-radius: 12px;
  background: var(--blue-950);
  color: #ffffff;
  font-size: 12.5px;
  line-height: 1.45;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.25s ease, transform 0.25s ease;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.toast .toast-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8fc4ff;
  flex-shrink: 0;
}

.toast.error {
  background: #3d1410;
}

.toast.error .toast-dot {
  background: #ff9b8a;
}

.boot {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  color: var(--muted);
  font-size: 13px;
}

.boot .logo-mark {
  width: 46px;
  height: 46px;
  animation: breathe 1.6s ease-in-out infinite;
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.94); opacity: 0.7; }
}

/* ------------------------------------------------
   Small screens
   ------------------------------------------------ */

@media (max-width: 1060px) {
  .overview-grid,
  .send-grid,
  .withdraw-grid,
  .history-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .overview-grid .side-stack {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }

  .overview-grid .side-stack .note-card {
    grid-column: 1 / -1;
  }

  .send-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .withdraw-aside {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }

  .withdraw-aside .note-card {
    grid-column: 1 / -1;
  }

  .profile-grid {
    grid-template-columns: minmax(260px, 0.8fr) minmax(0, 1.2fr);
  }
}

@media (max-width: 920px) {
  .app-shell {
    display: block;
  }

  .sidebar {
    display: none;
  }

  .mobile-bar {
    position: sticky;
    top: 0;
    z-index: 30;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(245, 248, 252, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
  }

  .mobile-bar .brand-name {
    font-size: 21px;
  }

  .mobile-bar .logo-mark {
    width: 34px;
    height: 34px;
  }

  .mobile-avatar {
    display: flex;
    border-radius: 50%;
    padding: 2px;
    border: 1px solid var(--line);
  }

  .main {
    padding: 24px 18px 108px;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 2px;
    padding: 8px 8px calc(9px + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(16px);
    border-top: 1px solid var(--line);
  }

  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 5px 2px;
    border-radius: 9px;
    text-decoration: none;
    color: var(--muted);
    font-size: 9.5px;
    font-weight: 600;
  }

  .bottom-nav .icon {
    width: 21px;
    height: 21px;
  }

  .bottom-nav a.active {
    color: var(--blue-900);
    background: var(--blue-100);
  }

  .page-head {
    margin-bottom: 22px;
    flex-wrap: wrap;
  }

  .auth {
    display: block;
  }

  .auth-brand {
    min-height: auto;
    padding: 26px 24px 38px;
    border-radius: 0 0 26px 26px;
  }

  .auth-brand-copy {
    padding: 34px 0 26px;
  }

  .auth-brand-copy h1 {
    font-size: clamp(34px, 8vw, 46px);
    margin: 14px 0 16px;
  }

  .auth-brand-copy .lede {
    font-size: 14px;
  }

  .auth-mini-card {
    margin-top: 24px;
  }

  .auth-perks {
    display: none;
  }

  .auth-brand .fine {
    display: none;
  }

  .auth-panel {
    padding: 30px 20px 46px;
    background: transparent;
  }
}

@media (max-width: 680px) {
  .overview-cta {
    display: none;
  }

  .mini-stats {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .overview-grid .side-stack {
    display: flex;
    flex-direction: column;
  }

  .send-aside {
    display: flex;
    flex-direction: column;
  }

  .withdraw-aside {
    display: flex;
    flex-direction: column;
  }

  .withdraw-aside .note-card {
    grid-column: auto;
  }

  .balance-card {
    padding: 25px 22px 23px;
    border-radius: 22px;
  }

  .balance-actions .btn {
    flex: 1;
    min-width: 128px;
  }

  .card {
    padding: 19px;
    border-radius: 17px;
  }

  .form-card {
    padding: 20px;
    border-radius: 18px;
  }

  .withdraw-requests .card-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .tracker-tools .live-pill {
    display: none;
  }

  .request-card {
    padding: 14px;
  }

  .request-top {
    flex-wrap: wrap;
  }

  .request-side {
    order: 3;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
  }

  .request-amount {
    margin-top: 0;
  }

  .field-row {
    grid-template-columns: 1fr;
    gap: 0;
  }

  .field-row .field {
    margin-bottom: 17px;
  }

  .profile-grid {
    grid-template-columns: 1fr;
  }

  .segmented {
    width: 100%;
  }

  .segmented button {
    flex: 1;
  }

  .history-grid .card-head {
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .history-grid .segmented {
    margin-top: 2px;
  }

  .page-head h1 {
    font-size: 31px;
  }

  .page-actions {
    width: 100%;
  }

  .page-actions .btn {
    flex: 1;
  }

  .toasts {
    left: 14px;
    right: 14px;
    top: 12px;
    align-items: center;
  }

  .toast {
    width: 100%;
    max-width: 420px;
  }

  .modal {
    padding: 21px;
    border-radius: 18px;
  }

  .signout-card {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}
