/* All Code copyright Sree Kotay 2026 */
/* Qiiro Design System
   =====================
   Dual Theme: Gold & Platinum
   Elegant & Sensual Edition
*/

/* Fonts */
@import url('/app/css/components/shared-list-controls.css');
@import url('/app/css/components/qiiro-splash.css');

w3m-modal {
  z-index: 100000;
}

.colorize-white {
  filter: drop-shadow(0 100vh 0 white);
  transform: translateY(-200vh);
}
/* Reset */
*, *::before, *::after {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --app-desktop-nav-height: 64px;
  --app-font-ui: "Blinker";
  --app-font-stack: "Blinker", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --list-text-size: 15px;
  --list-note-size: 12px;
  --list-text-weight: 700;
  --dark-section-bg: black;
  /*
  radial-gradient(ellipse 80% 60% at 100% 0%, rgba(96, 128, 176, 0.18) 0%, transparent 52%), radial-gradient(ellipse 60% 50% at 0% 100%, rgba(96, 128, 176, 0.12) 0%, transparent 42%), linear-gradient(145deg, #2d3542 0%, #121923 52%, #0c1118 100%);
  */
  
  /* Rich gold palette — warm, elegant, premium (default) */
  --gold-50: #FEFDFB;
  --gold-100: #FBF7F0;
  --gold-200: #F5EBD9;
  --gold-300: #E8D5B0;
  --gold-400: #C9A227;
  --gold-500: #A68521;
  --gold-600: #8B6F1C;
  --gold-700: #6B5516;
  --gold-800: #4A3B10;
  --gold-900: #2D240A;

  /* Metallic gold for special elements */
  --gold-metallic: linear-gradient(135deg, #C9A227 0%, #F5EBD9 25%, #A68521 50%, #8B6F1C 100%);
  --gold-shine: linear-gradient(135deg, #A68521 0%, #C9A227 30%, #E8D5B0 50%, #C9A227 70%, #8B6F1C 100%);
  --gold-glow: 0 0 20px rgba(166, 133, 33, 0.2);
  --gold-glow-soft: 0 0 12px rgba(166, 133, 33, 0.1);
  
  /* Sexy accent colors — subtle rose undertones */
  --rose-glow: rgba(255, 182, 193, 0.15);
  --rose-accent: #E8A4B0;
  --champagne: #F7E7CE;
  
  /* Premium accent */
  --accent: #A68521;
  --accent-soft: rgba(166, 133, 33, 0.08);

  /* Light palette — refined ivory with warm undertones */
  --bg-primary: #FEFDFB;
  --bg-secondary: #FAF8F5;
  --bg-tertiary: #F3EFE9;
  --bg-elevated: #FFFFFF;
  --bg-glass: #FEFDFB;
  --bg-glass-strong: #FEFDFB;

  /* QR / barcode scan surfaces — keep high contrast for cameras */
  --qr-surface: #ffffff;

  /* Overlay stacking — scanner above sheets / RTC mini player */
  --z-scanner-overlay: 99999;

  /* Gradient backgrounds — layered premium atmosphere */
  --bg-gradient:
    radial-gradient(ellipse 138% 72% at 50% -16%, color-mix(in srgb, var(--gold-400) 24%, transparent) 0%, color-mix(in srgb, var(--gold-500) 10%, transparent) 42%, transparent 64%),
    radial-gradient(ellipse 98% 58% at -10% 30%, color-mix(in srgb, var(--gold-500) 16%, transparent) 0%, transparent 52%),
    radial-gradient(ellipse 92% 52% at 108% 72%, color-mix(in srgb, var(--gold-600) 14%, transparent) 0%, transparent 48%),
    radial-gradient(ellipse 74% 46% at 82% 92%, color-mix(in srgb, var(--rose-accent) 13%, transparent) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 46%, var(--bg-tertiary) 100%);
  --bg-gradient-card: linear-gradient(145deg, #FFFFFF 0%, #FEFDFB 100%);
  
  /* Sexy gradient overlays */
  --gradient-sensual: linear-gradient(135deg, rgba(201, 162, 39, 0.08) 0%, rgba(232, 164, 176, 0.06) 50%, rgba(166, 133, 33, 0.08) 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(201, 162, 39, 0.15) 0%, transparent 70%);

  /* Text — warm neutrals with strong contrast */
  --text-primary: #14120D;
  --text-secondary: #4A453B;
  --text-muted: #7A7368;
  --text-inverse: #FEFDFB;
  --text-gold: #7A5F16;

  /* Semantic colors */
  --accent-alert: #0fc41b;
  --success: #0fc41b;
  --success-muted: rgba(5, 150, 105, 0.08);
  --warning: #D97706;
  --warning-muted: rgba(217, 119, 6, 0.08);
  --error: #f55e5e;
  --error-muted: rgba(220, 38, 38, 0.08);

  /* RGB values for dynamic transparency */
  --gold-500-rgb: 166, 133, 33;
  --gold-400-rgb: 201, 162, 39;
  --gold: var(--gold-400);
  --success-rgb: 5, 150, 105;
  --warning-rgb: 217, 119, 6;
  --error-rgb: 245, 94, 94;

  /* Alias tokens used by newer components */
  --surface-primary: var(--bg-elevated);
  --surface-secondary: var(--bg-secondary);
  --surface-tertiary: var(--bg-tertiary);
  --border-primary: var(--border-default);
  --border-secondary: var(--border-gold);

  /* Text on intentionally dark primary CTAs (black fill); not the same as --text-inverse */
  --btn-primary-fg: #f8fafc;

  /* Borders — refined with strong visibility */
  --border-subtle: rgba(153, 153, 153, 0.18);
  --border-default: rgba(20, 18, 13, 0.12);
  --border-gold: rgba(122, 95, 22, 0.25);
  --border-gold-strong: rgba(122, 95, 22, 0.4);
  --list-divider-color: var(--border-subtle);
  --list-divider-line: linear-gradient(
    -90deg,
    rgba(122, 133, 154, 0) 0%,
    rgba(122, 133, 154, 0.25) 40%,
    rgba(122, 133, 154, 0.25) 90%,
    rgba(122, 133, 154, 0.25) 100%
  );
  --list-filter-line-top: linear-gradient(
    to right,
    rgba(207, 218, 236, 0),
    rgba(207, 218, 236, 0.24) 18%,
    rgba(207, 218, 236, 0.28) 82%,
    rgba(207, 218, 236, 0)
  );
  --list-filter-line-bottom: rgba(222, 229, 242, 0.3);
  --list-filter-tab-inactive-opacity: 0.72;
  --list-search-bg: rgb(242 238 228);
  --list-search-border: #d8dde7;
  --list-search-text: #596273;
  --list-search-text-focus: #2e3644;
  --list-search-placeholder: #9ca6b6;
  --list-search-icon: #a7b0be;
  --list-search-focus-border: #c3cada;
  --list-search-focus-ring: rgba(197, 205, 220, 0.24);

  /* Shadows — soft and elegant with depth */
  --shadow-sm: 0 1px 2px rgba(28, 24, 16, 0.03), 0 2px 6px rgba(28, 24, 16, 0.04);
  --shadow-md: 0 2px 4px rgba(28, 24, 16, 0.03), 0 4px 12px rgba(28, 24, 16, 0.06), 0 8px 24px rgba(28, 24, 16, 0.04);
  --shadow-lg: 0 4px 8px rgba(28, 24, 16, 0.04), 0 8px 24px rgba(28, 24, 16, 0.08), 0 16px 48px rgba(28, 24, 16, 0.06);
  --shadow-xl: 0 8px 16px rgba(28, 24, 16, 0.06), 0 16px 48px rgba(28, 24, 16, 0.1), 0 24px 64px rgba(28, 24, 16, 0.08);
  --shadow-gold: 0 4px 16px rgba(166, 133, 33, 0.15), 0 8px 32px rgba(166, 133, 33, 0.08);
  --shadow-gold-lg: 0 8px 32px rgba(166, 133, 33, 0.2), 0 16px 64px rgba(166, 133, 33, 0.12);
  --shadow-glow: 0 0 40px rgba(166, 133, 33, 0.12);
  --shadow-lift: 0 20px 40px rgba(28, 24, 16, 0.12), 0 8px 16px rgba(28, 24, 16, 0.08);

  /* Shared coin texture layers */
  --coin-bg-image: url('/app/icons/coin-bg.png');
  --coin-bg-fade-50: linear-gradient(0deg, rgba(88, 88, 88, 0.75), rgba(255, 255, 255, 0.75), rgba(88, 88, 88, 0.75));
  --coin-bg-faded-stack: var(--coin-bg-fade-50), var(--coin-bg-image);

  /* Radii */
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 20px;
  --radius-2xl: 28px;
  --radius-full: 24px;
  --radius-circle: 9999px;

  /* Border widths */
  --border-width: 1px;

  /* Typography */
  --font-mono: 'JetBrains Mono', monospace;

  /* Motion — buttery smooth */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
  --ease-bounce: cubic-bezier(0.68, -0.55, 0.265, 1.55);
  --ease-smooth: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-sensual: cubic-bezier(0.22, 1, 0.36, 1);
  --duration-fast: 180ms;
  --duration-normal: 300ms;
  --duration-slow: 500ms;
  --duration-sensual: 600ms;

  /* Spacing */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-10: 40px;
  --space-12: 48px;

  /* Safe areas: browser env() on web, native bridge fallback in the Expo shell. */
  --native-safe-top: 0px;
  --native-safe-right: 0px;
  --native-safe-bottom: 0px;
  --native-safe-left: 0px;
  --browser-safe-top: constant(safe-area-inset-top);
  --browser-safe-top: env(safe-area-inset-top, 0px);
  --browser-safe-right: constant(safe-area-inset-right);
  --browser-safe-right: env(safe-area-inset-right, 0px);
  --browser-safe-bottom: constant(safe-area-inset-bottom);
  --browser-safe-bottom: env(safe-area-inset-bottom, 0px);
  --browser-safe-left: constant(safe-area-inset-left);
  --browser-safe-left: env(safe-area-inset-left, 0px);
  --safe-top: max(var(--browser-safe-top), var(--native-safe-top));
  --safe-right: max(var(--browser-safe-right), var(--native-safe-right));
  --safe-bottom: max(var(--browser-safe-bottom), var(--native-safe-bottom));
  --safe-left: max(var(--browser-safe-left), var(--native-safe-left));
  /* Safe bottom that zeros out when the native keyboard is visible — use for
     any bar that is pinned above the keyboard (position:fixed with bottom
     offset by --native-keyboard-inset, or a flex container that shrinks via
     createViewportKeyboardHandler).  Zero-cost when keyboard is closed. */
  --safe-bottom-kb: max(0px, var(--safe-bottom) - var(--native-keyboard-inset, 0px));
}

.asset-list-card {
  padding: 0 20px !important;
  margin-bottom: var(--space-6) !important;
  border: none !important;
}

/* Unified Page Header */
.activity-header-fixed {
  display: flex;
  align-items: center;
  justify-content: space-between;
  _padding: var(--space-1) 0 var(--space-1) 0;
  margin-bottom: var(--space-3);
  position: relative;
  z-index: auto;
  background: transparent;
}

.header-logo {
  display: flex;
  align-items: center;
  gap: var(--space-3);
}

.header-profile-trigger {
  position: relative;
  border: none;
  background: transparent;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  display: none;
}

/* "New activity" dot on the self avatar — mirrors .nav-badge--dot and is
   driven by the same server activity summary (`summary.unread`). */
.header-profile-unread-dot {
  position: absolute;
  top: 1px;
  right: 1px;
  width: 11px;
  height: 11px;
  background: var(--error);
  border: 2px solid var(--bg-secondary);
  border-radius: var(--radius-full);
  z-index: 5;
  pointer-events: none;
}

.header-profile-unread-dot[hidden] {
  display: none;
}

.header-profile-coin {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #dbe7f7 0%, #b8c9df 100%);
  border: 1px solid rgba(15, 23, 42, 0.16);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
  flex: 0 0 auto;
}

.header-profile-coin-img,
.header-profile-coin-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px solid black;
}

.header-profile-coin-img {
  object-fit: cover;
}

.header-profile-coin-placeholder {
  color: rgba(15, 23, 42, 0.72);
}

.header-profile-coin-placeholder svg {
  width: 20px;
  height: 20px;
}

.header-profile-coin.is-generating,
.contacts-balance-coin-shell.is-generating {
  position: relative;
  overflow: hidden;
}

.header-profile-coin.is-generating::after,
.contacts-balance-coin-shell.is-generating::after {
  content: '';
  position: absolute;
  inset: -35%;
  z-index: 4;
  pointer-events: none;
  background: linear-gradient(
    105deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 34%,
    rgba(255, 255, 255, 0.58) 48%,
    rgba(255, 255, 255, 0.18) 54%,
    rgba(255, 255, 255, 0) 68%,
    transparent 100%
  );
  animation: coinPlaceholderShimmer 1.35s ease-in-out infinite;
}

.header-profile-coin-placeholder.is-generating,
.contacts-balance-coin-placeholder.is-generating {
  opacity: 1;
}

@keyframes coinPlaceholderShimmer {
  0% {
    transform: translateX(-110%) rotate(12deg);
  }
  100% {
    transform: translateX(110%) rotate(12deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .header-profile-coin.is-generating::after,
  .contacts-balance-coin-shell.is-generating::after {
    animation: none;
    transform: translateX(0) rotate(12deg);
    opacity: 0.35;
  }
}

[data-theme="dark"] .header-profile-coin {
  background: linear-gradient(180deg, #2a3544 0%, #1a2431 100%);
  border-color: var(--border-default);
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .header-profile-coin-placeholder {
  color: var(--text-muted);
}

.qiiro-logo-small {
  height: 24px;
  width: auto;
  display: block;
  position: relative;
  z-index: 101;
}

.activity-top-actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin: 0;
  padding: 0;
  position: relative;
}

.activity-view .activity-top-actions .glossy-black-btn {
  display: none;
}

.activity-top-actions .glossy-black-btn {
  white-space: nowrap;
  padding: 8px 12px;
}

.activity-view .activity-hero-cluster {
  display: contents;
}

.activity-view .activity-insight-row {
  display: none;
}

.activity-view .activity-insight-row.is-hidden {
  display: none;
}

.activity-view .empty-state-actions [data-action="quick-send"],
.activity-view .empty-state-actions [data-action="quick-request"] {
  display: none;
}

@media (min-width: 768px) {
  .activity-view .activity-hero-cluster {
    display: block;
    margin: 0 0 var(--space-5);
  }

  .activity-view .activity-hero-cluster > .activity-unsettled-summary-container {
    margin-top: var(--space-3);
  }
}

.activity-view .activity-insight-card {
  min-height: 72px;
  border-radius: 14px;
  padding: 10px 12px 9px;
  color: #111111;
  border: 1px solid rgba(17, 17, 17, 0.34);
  background: #ffffff;
  box-shadow: none;
}

.activity-view .activity-insight-action-card {
  width: 100%;
  appearance: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
}

.activity-view .activity-insight-action-card:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--gold-400) 80%, transparent);
  outline-offset: 2px;
}

.activity-view .activity-insight-icon {
  width: 28px;
  height: 28px;
  padding: 5px;
  box-sizing: border-box;
  color: var(--accent-alert, #17A34A);
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--accent-alert, #17A34A);
  background: transparent;
}

.activity-view .activity-insight-icon svg {
  width: 100%;
  height: 100%;
  display: block;
}

.activity-view .activity-insight-label {
  display: flex;
  flex-direction: column;
  gap: 0;
  font-size: 13px;
  line-height: 1.08;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-align: left;
  color: #111111;
}

[data-theme="dark"] .activity-view .activity-insight-card {
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: #0b1016;
}

[data-theme="dark"] .activity-view .activity-insight-label {
  color: #ffffff;
}

[data-theme="soft"] .activity-view .activity-insight-card {
  color: var(--text-primary);
  border: 1px solid rgba(255, 255, 255, 0.55);
  background: var(--neu-face);
  box-shadow: var(--shadow-neu-out-sm), var(--neu-bevel);
  border-radius: 17px;
}

[data-theme="soft"] .activity-view .activity-insight-action-card:active {
  background: var(--neu-face-pressed);
  box-shadow: var(--shadow-neu-in-sm);
  transform: translateY(1px);
}

[data-theme="soft"] .activity-view .activity-insight-label {
  color: var(--text-primary);
}

/* Glossy Black Button Component */
.glossy-black-btn {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 8px 18px;
  background: linear-gradient(180deg, #2a2a2a 0%, #000000 100%);
  color: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.1);
  border-radius: 12px;
  font-size: var(--list-note-size);
  font-family: var(--app-font-stack);
  font-weight: 700;
  cursor: pointer;
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.2),
    inset 0 1px 1px rgba(255, 255, 255, 0.1);
  transition: all 0.2s ease;
  position: relative;
  overflow: hidden;
  background: none;
  box-shadow: none;
  color: rgba(0, 0, 0, .5);
  border-color: rgba(0, 0, 0, .1);
  opacity: 0.8;
}

.glossy-black-btn::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 50%;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.1) 0%, transparent 100%);
  pointer-events: none;
}

.glossy-black-btn:active {
  transform: translateY(1px);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
  background: #000000;
}

.glossy-black-btn svg {
  width: 16px;
  height: 16px;
}

.dark-pill-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-height: var(--dark-pill-action-min-height, 34px);
  padding: var(--dark-pill-action-padding, 3px 16px 3px 4px);
  gap: var(--dark-pill-action-gap, 8px);
  border: 0;
  border-radius: var(--dark-pill-action-radius, 9px);
  color: #fff;
  background: linear-gradient(180deg, #1c2536 0%, #0a111d 100%);
  font-size: var(--dark-pill-action-font-size, 13px);
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.01em;
  white-space: nowrap;
  box-shadow:
    0 4px 10px rgba(15, 23, 42, 0.28),
    0 1px 2px rgba(15, 23, 42, 0.2),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  position: relative;
  left: 5px;
}

.dark-pill-action:active {
  transform: translateY(1px);
  box-shadow:
    0 2px 4px rgba(15, 23, 42, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.dark-pill-action__icon,
.dark-pill-action > svg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--dark-pill-action-icon-size, 26px);
  height: var(--dark-pill-action-icon-size, 26px);
  border-radius: 50%;
  background: radial-gradient(circle at 30% 30%, #2a3447 0%, #050a14 80%);
  color: #fff;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.12),
    inset 0 -1px 1px rgba(0, 0, 0, 0.4);
  flex-shrink: 0;
}

.dark-pill-action > svg {
  padding: var(--dark-pill-action-icon-padding, 6px);
  box-sizing: border-box;
}

.dark-pill-action__icon svg {
  width: var(--dark-pill-action-icon-glyph-size, 14px);
  height: var(--dark-pill-action-icon-glyph-size, 14px);
  display: block;
}

[data-theme="dark"] .dark-pill-action {
  color: #0f172a;
  background: linear-gradient(180deg, #f8fafc 0%, #cbd5e1 100%);
  box-shadow:
    0 4px 10px rgba(0, 0, 0, 0.5),
    0 1px 2px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

[data-theme="dark"] .dark-pill-action__icon,
[data-theme="dark"] .dark-pill-action > svg {
  background: radial-gradient(circle at 30% 30%, #e2e8f0 0%, #94a3b8 80%);
  color: #0f172a;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    inset 0 -1px 1px rgba(0, 0, 0, 0.15);
}

[data-theme="dark"] .glossy-black-btn {
  background: transparent;
  border-color: rgba(238, 242, 247, 0.2);
  color: #f8fafc;
  box-shadow: none;
}


.contact-view .glossy-black-btn {
  color: black;
}

[data-theme="dark"] .activity-top-actions .glossy-black-btn::after {
  content: none;
}

[data-theme="dark"] .activity-top-actions .glossy-black-btn:active {
  background: #e5e7eb;
  box-shadow: none;
}

.balance-transfer-funds-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  margin-top: 12px;
  border: none;
  border-radius: 18px;
  padding: 14px 18px;
  background: #111111;
  color: #ffffff;
  font-size: 16px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.18);
}

.balance-transfer-funds-btn-label {
  line-height: 1;
}

.balance-transfer-funds-btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  opacity: 0.92;
}

.balance-transfer-funds-btn-icon svg {
  width: 18px;
  height: 18px;
}

.balance-transfer-funds-btn:active {
  transform: translateY(1px);
}

/* Minimal Back Button */
.btn-back-minimal {
  padding: 4px;
  margin-left: -8px;
  color: var(--text-muted);
  cursor: pointer;
  border: none;
  background: transparent;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ============================================
   Platinum Theme Override — Sleek & Modern
   ============================================ */
[data-theme="platinum"],
[data-theme="silver"] {
  /* Platinum palette — neutral grayscale */
  --gold-50: #FAFCFE;
  --gold-100: #F1F3F5;
  --gold-200: #E4E7EA;
  --gold-300: #D1D3D5;
  --gold-400: #818994;
  --gold-500: #525660;
  --gold-600: #404650;
  --gold-700: #2C2D2F;
  --gold-800: #1B1D1F;
  --gold-900: #0d1115;

  /* RGB value for dynamic transparency */
  --gold-500-rgb: 82, 88, 99;
  --gold-400-rgb: 101, 106, 116;
  --gold: var(--gold-400);
  --error-rgb: 245, 127, 127;

  /* Metallic platinum for special elements (neutralized) */
  --gold-metallic: linear-gradient(135deg, #D2D2D2 0%, #FAFAFA 25%, #636363 50%, #4E4E4E 100%);
  --gold-shine: linear-gradient(135deg, #4E4E4E 0%, #636363 30%, #D2D2D2 50%, #636363 70%, #3E3E3E 100%);
  --gold-glow: 0 0 20px rgba(78, 78, 78, 0.2);
  --gold-glow-soft: 0 0 12px rgba(78, 78, 78, 0.1);
  
  /* Accent tuned to neutral grayscale */
  --rose-glow: rgba(205, 205, 205, 0.1);
  --rose-accent: #CFCFCF;
  --champagne: #E6E6E6;
  
  /* Premium accent - neutral slate */
  --accent: #535b68;
  --accent-soft: rgba(83, 91, 104, 0.085);

  /* Light palette — clean neutral white */
  --bg-primary: #FAFAFA;
  --bg-secondary: #F2F3F5;
  --bg-tertiary: #E6E8EC;
  --bg-elevated: #FFFFFF;
  --bg-glass: #FAFAFA;
  --bg-glass-strong: #FFFFFF;

  /* Gradient backgrounds — layered premium atmosphere */
  --bg-gradient:
    radial-gradient(ellipse 138% 72% at 50% -16%, color-mix(in srgb, var(--gold-400) 24%, transparent) 0%, color-mix(in srgb, var(--gold-500) 10%, transparent) 42%, transparent 64%),
    radial-gradient(ellipse 98% 58% at -10% 30%, color-mix(in srgb, var(--gold-500) 16%, transparent) 0%, transparent 52%),
    radial-gradient(ellipse 92% 52% at 108% 72%, color-mix(in srgb, var(--gold-600) 14%, transparent) 0%, transparent 48%),
    radial-gradient(ellipse 74% 46% at 82% 92%, color-mix(in srgb, var(--rose-accent) 13%, transparent) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 46%, var(--bg-tertiary) 100%);
  --bg-gradient-card: linear-gradient(145deg, #FFFFFF 0%, #F9FAFC 100%);
  
  /* Neutral gradient overlays */
  --gradient-sensual: linear-gradient(135deg, rgba(82, 88, 99, 0.055) 0%, rgba(206, 210, 217, 0.035) 50%, rgba(82, 88, 99, 0.055) 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(82, 88, 99, 0.085) 0%, transparent 70%);

  /* Text — strong contrast */
  --text-primary: #111111;
  --text-secondary: #4A4A4A;
  --text-muted: #b4b4b4;
  --text-inverse: #FAFBFC;
  --text-gold: #363636;

  /* Semantic colors */
  --success: #1dc427;
  --success-muted: rgba(5, 150, 105, 0.08);
  --warning: #D97706;
  --warning-muted: rgba(217, 119, 6, 0.08);
  --error: #EF4444;
  --error-muted: rgba(220, 38, 38, 0.08);

  /* Borders — clean with strong visibility */
  --border-default: rgba(17, 17, 17, 0.12);
  --border-gold: rgba(82, 88, 99, 0.18);
  --border-gold-strong: rgba(82, 88, 99, 0.44);
  --list-divider-color: var(--border-subtle);
  --list-divider-line: linear-gradient(
    -90deg,
    rgba(128, 128, 128, 0) 0%,
    rgba(128, 128, 128, 0.25) 40%,
    rgba(128, 128, 128, 0.25) 90%,
    rgba(128, 128, 128, 0.25) 100%
  );
  --list-filter-line-top: linear-gradient(
    to right,
    rgba(212, 212, 212, 0),
    rgba(212, 212, 212, 0.24) 18%,
    rgba(212, 212, 212, 0.28) 82%,
    rgba(212, 212, 212, 0)
  );
  --list-filter-line-bottom: rgba(220, 220, 220, 0.3);
  --list-filter-tab-inactive-opacity: 0.72;
  --list-search-bg: var(--gold-100);
  --list-search-border: #dbdbdb;
  --list-search-text: #606060;
  --list-search-text-focus: #2f2f2f;
  --list-search-placeholder: #9d9d9d;
  --list-search-icon: #a9a9a9;
  --list-search-focus-border: #c6ccd5;
  --list-search-focus-ring: rgba(173, 181, 193, 0.22);

  /* Shadows — soft and elegant */
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.03), 0 2px 6px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 2px 4px rgba(0, 0, 0, 0.03), 0 4px 12px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.04);
  --shadow-lg: 0 4px 8px rgba(0, 0, 0, 0.04), 0 8px 24px rgba(0, 0, 0, 0.08), 0 16px 48px rgba(0, 0, 0, 0.06);
  --shadow-xl: 0 8px 16px rgba(0, 0, 0, 0.06), 0 16px 48px rgba(0, 0, 0, 0.1), 0 24px 64px rgba(0, 0, 0, 0.08);
  --shadow-gold: 0 4px 16px rgba(78, 78, 78, 0.12), 0 8px 32px rgba(78, 78, 78, 0.06);
  --shadow-gold-lg: 0 8px 32px rgba(78, 78, 78, 0.16), 0 16px 64px rgba(78, 78, 78, 0.1);
  --shadow-glow: 0 0 40px rgba(78, 78, 78, 0.1);
  --shadow-lift: 0 20px 40px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.06);
}

[data-theme="silver"] {
  --list-search-bg: var(--gold-100);
}

/* ============================================
   Dark Theme Override — Midnight Platinum
   ============================================ */
[data-theme="dark"] {
  --gold-50: #edf2f7;
  --gold-100: #cfd8e3;
  --gold-200: #9aa8ba;
  --gold-300: #758398;
  --gold-400: #aab6c6;
  --gold-500: #718096;
  --gold-600: #566172;
  --gold-700: #3a4454;
  --gold-800: #222a36;
  --gold-900: #121821;

  --gold-500-rgb: 113, 128, 150;
  --gold-400-rgb: 170, 182, 198;
  --gold: var(--gold-400);

  --gold-metallic: linear-gradient(135deg, #d8e0ea 0%, #718096 36%, #2f3846 68%, #eef3f8 100%);
  --gold-shine: linear-gradient(135deg, #2f3846 0%, #718096 40%, #d8e0ea 52%, #718096 68%, #2f3846 100%);
  --gold-glow: 0 0 24px rgba(170, 182, 198, 0.18);
  --gold-glow-soft: 0 0 14px rgba(170, 182, 198, 0.1);

  --rose-glow: rgba(189, 201, 216, 0.06);
  --rose-accent: #aeb9c8;
  --champagne: #dce4ed;

  --accent: #8b9aae;
  --accent-soft: rgba(139, 154, 174, 0.14);

  --bg-primary: #000000;
  --bg-secondary: #121923;
  --bg-tertiary: #1a2431;
  --bg-elevated: #161718;
  --bg-glass: rgba(11, 16, 22, 0.92);
  --bg-glass-strong: rgba(18, 25, 35, 0.96);
  --qr-surface: #ffffff;

  --bg-gradient:
    radial-gradient(ellipse 138% 72% at 50% -16%, color-mix(in srgb, var(--gold-400) 16%, transparent) 0%, color-mix(in srgb, var(--gold-500) 9%, transparent) 42%, transparent 64%),
    radial-gradient(ellipse 98% 58% at -10% 30%, color-mix(in srgb, var(--gold-500) 10%, transparent) 0%, transparent 52%),
    radial-gradient(ellipse 92% 52% at 108% 72%, rgba(112, 134, 164, 0.14) 0%, transparent 48%),
    radial-gradient(ellipse 74% 46% at 82% 92%, color-mix(in srgb, var(--rose-accent) 10%, transparent) 0%, transparent 58%),
    linear-gradient(180deg, var(--bg-primary) 0%, var(--bg-secondary) 46%, #0f1620 100%);
  --bg-gradient-card: linear-gradient(145deg, #182230 0%, #111925 100%);

  --gradient-sensual: linear-gradient(135deg, rgba(170, 182, 198, 0.08) 0%, rgba(96, 116, 144, 0.05) 50%, rgba(170, 182, 198, 0.07) 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(170, 182, 198, 0.1) 0%, transparent 70%);

  --text-primary: #eef2f7;
  --text-secondary: #c5cfdb;
  --text-muted: #8d98a6;
  --text-inverse: #0b1016;
  --text-gold: #d7e0eb;

  --btn-primary-fg: #f1f5f9;

  --success: #2dd4a4;
  --success-muted: rgba(45, 212, 164, 0.12);
  --warning: #f59e0b;
  --warning-muted: rgba(245, 158, 11, 0.12);
  --error: #f87171;
  --error-muted: rgba(248, 113, 113, 0.12);
  --error-rgb: 248, 113, 113;

  --border-subtle: rgba(238, 242, 247, 0.045);
  --border-default: rgba(238, 242, 247, 0.08);
  --border-gold: rgba(170, 182, 198, 0.14);
  --border-gold-strong: rgba(170, 182, 198, 0.24);
  --list-divider-color: var(--border-subtle);
  --list-divider-line: linear-gradient(
    -90deg,
    rgba(170, 182, 198, 0) 0%,
    rgba(170, 182, 198, 0.14) 40%,
    rgba(170, 182, 198, 0.14) 90%,
    rgba(170, 182, 198, 0.14) 100%
  );
  --list-filter-line-top: linear-gradient(
    to right,
    rgba(170, 182, 198, 0),
    rgba(170, 182, 198, 0.18) 18%,
    rgba(170, 182, 198, 0.22) 82%,
    rgba(170, 182, 198, 0)
  );
  --list-filter-line-bottom: rgba(170, 182, 198, 0.16);
  --list-filter-tab-inactive-opacity: 0.82;
  --list-search-bg: rgb(32, 37, 44);
  --list-search-border: #273447;
  --list-search-text: #d3dbe6;
  --list-search-text-focus: #eef2f7;
  --list-search-placeholder: #8c97a5;
  --list-search-icon: #97a2b0;
  --list-search-focus-border: #647487;
  --list-search-focus-ring: rgba(170, 182, 198, 0.18);

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.28), 0 2px 6px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 2px 6px rgba(0, 0, 0, 0.28), 0 10px 24px rgba(0, 0, 0, 0.24);
  --shadow-lg: 0 8px 18px rgba(0, 0, 0, 0.32), 0 18px 44px rgba(0, 0, 0, 0.28);
  --shadow-xl: 0 12px 24px rgba(0, 0, 0, 0.34), 0 22px 60px rgba(0, 0, 0, 0.3);
  --shadow-gold: 0 4px 18px rgba(170, 182, 198, 0.1), 0 10px 32px rgba(0, 0, 0, 0.22);
  --shadow-gold-lg: 0 8px 30px rgba(170, 182, 198, 0.12), 0 18px 56px rgba(0, 0, 0, 0.28);
  --shadow-glow: 0 0 42px rgba(170, 182, 198, 0.08);
  --shadow-lift: 0 20px 40px rgba(0, 0, 0, 0.34), 0 8px 18px rgba(0, 0, 0, 0.24);
}

/* ============================================
   Soft Theme Override — Neumorphic / Soft UI
   ============================================ */
[data-theme="soft"] {
  --gold-50: #F7F8FA;
  --gold-100: #EEF1F5;
  --gold-200: #E2E6ED;
  --gold-300: #CDD3DC;
  --gold-400: #8E949D;
  --gold-500: #6B7280;
  --gold-600: #4B5563;
  --gold-700: #2C333A;
  --gold-800: #1C2227;
  --gold-900: #14181D;

  --gold-500-rgb: 107, 114, 128;
  --gold-400-rgb: 142, 148, 157;
  --gold: var(--gold-400);

  --gold-metallic: linear-gradient(135deg, #D8DDE5 0%, #F4F6F8 25%, #8E949D 50%, #6B7280 100%);
  --gold-shine: linear-gradient(135deg, #6B7280 0%, #8E949D 30%, #D8DDE5 50%, #8E949D 70%, #4B5563 100%);
  --gold-glow: 0 0 20px rgba(107, 114, 128, 0.16);
  --gold-glow-soft: 0 0 12px rgba(107, 114, 128, 0.08);

  --rose-glow: rgba(246, 166, 77, 0.12);
  --rose-accent: #F6A64D;
  --champagne: #F5F2EA;

  --accent: #6B7280;
  --accent-soft: rgba(107, 114, 128, 0.1);

  /* Light eggshell soft-UI surface (warmer than gray, lighter than the
     classic ivory reference). Controls share the page tone and read purely
     through light: they are never a lighter fill on a darker page. */
  --bg-primary: #FBFAF6;
  --bg-secondary: #FBFAF6;
  --bg-tertiary: #F5F2EA;
  --bg-elevated: #FFFEFB;
  --bg-glass: #FEFDFB;
  --bg-glass-strong: #FEFDFB;

  --dark-section-bg: linear-gradient(160deg, #2C333A 0%, #1C2227 58%, #161A1F 100%);

  /* Restrained soft UI: shallow lift, crisp rim, no inflated halo. */
  --neu-highlight: #ffffff;
  --neu-shade: rgba(148, 136, 112, 0.2);
  --neu-face: linear-gradient(180deg, #fff 0%, #FBF9F4 100%);
  --neu-face-pressed: #F3EFE6;
  --neu-bevel:
    inset 0 1px 0 rgba(255, 255, 255, 0.92),
    inset 0 -1px 0 rgba(160, 148, 124, 0.14);
  --shadow-neu-out:
    0 6px 12px rgba(130, 116, 90, 0.22),
    0 2px 4px rgba(130, 116, 90, 0.12);
  --shadow-neu-out-sm:
    0 4px 8px rgba(130, 116, 90, 0.2),
    0 1px 3px rgba(130, 116, 90, 0.42);
  --shadow-neu-in:
    inset 0 2px 6px rgba(148, 136, 112, 0.16),
    inset 0 1px 1px rgba(148, 136, 112, 0.09);
  --shadow-neu-in-sm:
    inset 0 2px 4px rgba(148, 136, 112, 0.12),
    inset 0 1px 1px rgba(148, 136, 112, 0.07);

  --bg-gradient: linear-gradient(180deg, #FCFBF7 0%, #FBFAF6 50%, #F7F4EC 100%);
  --bg-gradient-card: var(--neu-face);

  --gradient-sensual: linear-gradient(135deg, rgba(107, 114, 128, 0.05) 0%, rgba(246, 166, 77, 0.04) 50%, rgba(107, 114, 128, 0.05) 100%);
  --gradient-glow: radial-gradient(ellipse at center, rgba(107, 114, 128, 0.08) 0%, transparent 70%);

  --text-primary: #1A1E23;
  --text-secondary: #7D8592;
  --text-muted: #9AA1AB;
  --text-inverse: #F0F2F5;
  --text-gold: #4B5563;

  --success: #1dc427;
  --success-muted: rgba(5, 150, 105, 0.08);
  --warning: #F6A64D;
  --warning-muted: rgba(246, 166, 77, 0.12);
  --error: #EF4444;
  --error-muted: rgba(220, 38, 38, 0.08);

  --border-subtle: rgba(26, 30, 35, 0.05);
  --border-default: rgba(26, 30, 35, 0.06);
  --border-gold: rgba(107, 114, 128, 0.16);
  --border-gold-strong: rgba(107, 114, 128, 0.32);
  --list-divider-color: rgba(26, 30, 35, 0.08);
  --list-divider-line: linear-gradient(
    -90deg,
    rgba(142, 148, 157, 0) 0%,
    rgba(142, 148, 157, 0.12) 40%,
    rgba(142, 148, 157, 0.12) 90%,
    rgba(142, 148, 157, 0.12) 100%
  );
  --list-filter-line-top: linear-gradient(
    to right,
    rgba(220, 212, 196, 0),
    rgba(220, 212, 196, 0.35) 18%,
    rgba(220, 212, 196, 0.4) 82%,
    rgba(220, 212, 196, 0)
  );
  --list-filter-line-bottom: rgba(220, 212, 196, 0.35);
  --list-filter-tab-inactive-opacity: 0.72;
  --list-search-bg: #FBFAF6;
  --list-search-border: transparent;
  --list-search-text: #4B5563;
  --list-search-text-focus: #1A1E23;
  --list-search-placeholder: #9AA1AB;
  --list-search-icon: #9AA1AB;
  --list-search-focus-border: transparent;
  --list-search-focus-ring: rgba(107, 114, 128, 0.12);

  --shadow-sm: var(--shadow-neu-out-sm);
  --shadow-md: var(--shadow-neu-out);
  --shadow-lg: 0 8px 18px rgba(130, 116, 90, 0.22);
  --shadow-xl: 0 12px 24px rgba(130, 116, 90, 0.24);
  --shadow-gold: var(--shadow-neu-out-sm);
  --shadow-gold-lg: var(--shadow-neu-out);
  --shadow-glow: 0 0 28px rgba(107, 114, 128, 0.08);
  --shadow-lift: var(--shadow-neu-out);

  --radius-sm: 12px;
  --radius-md: 16px;
  --radius-lg: 20px;
  --radius-xl: 24px;
  --radius-2xl: 28px;
  --radius-full: 28px;
}

/* Soft: recessed search field */
[data-theme="soft"] .search-input {
  background: transparent;
  border: none;
  box-shadow: none;
}

[data-theme="soft"] .search-input:focus {
  border: none;
  box-shadow: none;
}

/* Soft: keep balance shells dark charcoal (hero contrast), with soft outer lift.
   Vertical-only offset — full-bleed cards have no horizontal room to cast into. */
[data-theme="soft"] :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell,
[data-theme="soft"] .activity-view .stat-card.stat-card-balance.dark-section-shell {
  background: var(--dark-section-bg) !important;
  border: none;
  box-shadow:
    0 8px 16px rgba(26, 30, 35, 0.2),
    0 2px 4px rgba(26, 30, 35, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

[data-theme="soft"] .bottom-nav {
  background: var(--bg-primary);
  border-top-color: rgba(255, 255, 255, 0.78);
  box-shadow:
    0 -5px 14px rgba(148, 136, 112, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);
}

/* Soft: generic shallow inset field; Contacts gets a specific rule below. */
[data-theme="soft"] .search-container,
[data-theme="soft"] .contact-search-container,
[data-theme="soft"] .search-side-toggle {
  background: #F3EFE6;
  border: 1px solid rgba(158, 146, 126, 0.14) !important;
  border-radius: 15px;
  box-shadow: var(--shadow-neu-in-sm);
}

/* Beat the later shared-search rules, which offset Contacts by -8px and
   reset its background. The target is a straight-edged recessed field. */
[data-theme="soft"] .shared-search-filters .search-container,
[data-theme="soft"] .shared-search-filters .search-side-toggle {
  left: 0;
  padding: 4px 2px;
  background: #F3EFE6;
  border: 1px solid rgba(148, 136, 112, 0.16) !important;
  border-radius: 14px;
  box-shadow:
    inset 0 2px 4px rgba(148, 136, 112, 0.1),
    inset 0 1px 0 rgba(148, 136, 112, 0.06),
    0 1px 0 rgba(255, 255, 255, 0.72);
}

[data-theme="soft"] .shared-search-filters .search-side-toggle {
  padding: 0;
  color: var(--list-search-icon);
}

/* Soft: light extruded avatars — dark fills are reserved for emphasis. */
[data-theme="soft"] .contacts-view .avatar {
  background: #111827;
  background-image: none;
  color: #ffffff;
  box-shadow:
    0 4px 8px rgba(72, 86, 108, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

[data-theme="soft"] .contacts-view .avatar-initials {
  text-shadow: none;
}

/* Soft: quiet section headers with an engraved two-tone rule. */
[data-theme="soft"] .contacts-view .contact-group-header {
  color: var(--text-secondary);
  font-weight: 600;
}

[data-theme="soft"] .contacts-view .contact-group-header .dot {
  display: none;
}

[data-theme="soft"] .contacts-view .contact-group-header::after {
  display: block;
  height: 2px;
  margin-right: 0;
  background:
    linear-gradient(
      to bottom,
      rgba(128, 143, 164, 0.17) 0,
      rgba(128, 143, 164, 0.17) 1px,
      rgba(255, 255, 255, 0.72) 1px,
      rgba(255, 255, 255, 0.72) 2px
    );
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.3), #000 16%, #000 100%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.3), #000 16%, #000 100%);
}

[data-theme="soft"] .contacts-view .contact-card::after {
  height: 2px;
  background:
    linear-gradient(
      to bottom,
      rgba(128, 143, 164, 0.15) 0,
      rgba(128, 143, 164, 0.15) 1px,
      rgba(255, 255, 255, 0.68) 1px,
      rgba(255, 255, 255, 0.68) 2px
    );
}

/* Carry the same engraved rule language into Activity. */
[data-theme="soft"] .activity-view .activity-date::after {
  height: 2px;
  background:
    linear-gradient(
      to bottom,
      rgba(128, 143, 164, 0.17) 0,
      rgba(128, 143, 164, 0.17) 1px,
      rgba(255, 255, 255, 0.72) 1px,
      rgba(255, 255, 255, 0.72) 2px
    );
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.3), #000 16%, #000 100%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.3), #000 16%, #000 100%);
}

[data-theme="soft"] .activity-view .transaction-item::after {
  left: 58px;
  right: 0;
  height: 2px;
  background:
    linear-gradient(
      to bottom,
      rgba(128, 143, 164, 0.15) 0,
      rgba(128, 143, 164, 0.15) 1px,
      rgba(255, 255, 255, 0.68) 1px,
      rgba(255, 255, 255, 0.68) 2px
    );
}

/* Platinum floating orbs */
[data-theme="platinum"] body::after,
[data-theme="silver"] body::after {
  background: 
    radial-gradient(circle 300px at 20% 80%, rgba(78, 78, 78, 0.05) 0%, transparent 50%),
    radial-gradient(circle 200px at 85% 20%, rgba(205, 205, 205, 0.04) 0%, transparent 50%);
}

/* Soft floating orbs — very subtle warm eggshell wash */
[data-theme="soft"] body::after {
  background:
    radial-gradient(circle 280px at 18% 78%, rgba(220, 212, 196, 0.32) 0%, transparent 52%),
    radial-gradient(circle 200px at 84% 18%, rgba(255, 255, 255, 0.5) 0%, transparent 54%);
}

/* Dark floating orbs */
[data-theme="dark"] body::after {
  background:
    radial-gradient(circle 320px at 18% 78%, rgba(170, 182, 198, 0.08) 0%, transparent 52%),
    radial-gradient(circle 220px at 84% 18%, rgba(112, 134, 164, 0.08) 0%, transparent 54%);
}
/* Base */
html {
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  -webkit-tap-highlight-color: transparent;
  /* Kill Android Chrome stretch / iOS rubber-band at document scroll bounds.
     Tab screens (contacts, activity, …) scroll the document; `contain` still
     shows the stretch effect — only `none` removes it. Custom JS pull-to-
     refresh does not rely on native overscroll. */
  overscroll-behavior: none;
}

body {
  font-family: var(--app-font-stack);
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  min-height: 100dvh;
  line-height: 1.5;
  margin: 0;
  padding: 0;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior: none;
}

/* Kill the gray/blue flash on tap; press feedback comes from :active / haptics. */
a,
button,
input,
textarea,
select,
label,
summary,
[role="button"],
[role="tab"],
[role="menuitem"],
[role="option"],
.btn,
.nav-item,
.list-item,
.transaction-item,
.contact-card,
.recipient-card,
.action-btn {
  -webkit-tap-highlight-color: transparent;
}

body.app-safe-top-gradient-visible::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--safe-top, 0px);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(255, 255, 255, 0) 100%);
  pointer-events: none;
  z-index: 10000;
}

[data-theme="dark"] body.app-safe-top-gradient-visible::before {
  background: linear-gradient(180deg, rgba(11, 16, 22, 0.96) 0%, rgba(11, 16, 22, 0) 100%);
}

[data-theme="soft"] body.app-safe-top-gradient-visible::before {
  background: linear-gradient(180deg, rgba(236, 239, 243, 0.96) 0%, rgba(236, 239, 243, 0) 100%);
}

/* Disable WebKit autofill visual styling globally */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--text-primary) !important;
  caret-color: var(--text-primary) !important;
  background-color: transparent !important;
  -webkit-box-shadow: 0 0 0 1000px var(--bg-elevated) inset !important;
  box-shadow: 0 0 0 1000px var(--bg-elevated) inset !important;
  transition: background-color 99999s ease-in-out 0s !important;
}

.name-input-container {
  flex-direction: column;
  display: flex;
  gap: 4px;
}

.name-hint {
  font-size: 12px;
  padding-top: var(--space-1);
}

/* Ambient orb wash — static on purpose.
   Animating background-position/opacity on a full-viewport fixed layer forced
   continuous paint (DevTools paint flashing stayed green at idle). */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  width: 100vw;
  height: 100vh;
  height: 100dvh;
  z-index: -1;
  background:
    radial-gradient(circle 300px at 20% 80%, rgba(201, 162, 39, 0.06) 0%, transparent 50%),
    radial-gradient(circle 200px at 85% 20%, rgba(232, 164, 176, 0.05) 0%, transparent 50%);
  pointer-events: none;
}

/* App Container */
:root {
  --app-viewport-height: var(--native-viewport-height, 100dvh);
  --app-mobile-nav-height: calc(57px + var(--space-4) + max(var(--safe-bottom) - 20px, 10px));
  --app-content-height: calc(var(--app-viewport-height) - var(--app-mobile-nav-height));
}

.app {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  min-height: var(--app-viewport-height);
  position: relative;
  overflow: visible;
}

.app-stage {
  position: relative;
  min-height: calc(100vh - var(--app-mobile-nav-height));
  min-height: var(--app-content-height);
  touch-action: pan-y;
  overscroll-behavior: none;
}

@media (min-width: 768px) {
  :root {
    --app-desktop-nav-offset: calc(var(--app-desktop-nav-height) + var(--safe-top, 0px));
    --app-content-height: calc(var(--app-viewport-height) - var(--app-desktop-nav-offset));
  }

  .app {
    max-width: 1200px;
    padding: var(--app-desktop-nav-offset) var(--space-8) 0;
    display: block;
    overflow: visible;
    min-height: 100vh;
    min-height: 100dvh;
  }

  .app.app-no-nav {
    padding-top: 0;
    max-width: 900px;
  }

  .app-stage {
    min-height: calc(100vh - var(--app-desktop-nav-offset));
    min-height: calc(100dvh - var(--app-desktop-nav-offset));
  }

  .app.app-no-nav .app-stage {
    min-height: 100vh;
    min-height: 100dvh;
  }
}

/* Desktop browser only: viewport wider than phone layout but below the 768px
   desktop breakpoint — present the app as a centered phone-shaped device. */
@media (min-width: 431px) and (max-width: 767.98px) and (hover: hover) and (pointer: fine) {
  :root {
    --app-phone-canvas: #2a2e34;
    --app-phone-frame-radius: 28px;
    --app-phone-frame-width: min(430px, calc(100vw - 48px));
    --app-phone-frame-height: min(900px, calc(100dvh - 48px));
    --app-phone-frame-top: max(36px, calc((100dvh - var(--app-phone-frame-height)) / 2 + 16px));
    --app-phone-frame-bottom: max(20px, calc((100dvh - var(--app-phone-frame-height)) / 2));
    --app-phone-frame-left: calc((100vw - var(--app-phone-frame-width)) / 2);
    --app-phone-frame-shadow:
      0 2px 4px rgba(0, 0, 0, 0.22),
      0 10px 28px rgba(0, 0, 0, 0.34),
      0 28px 60px rgba(0, 0, 0, 0.26);
  }

  html {
    background-color: var(--app-phone-canvas);
  }

  body {
    background-color: var(--app-phone-canvas);
  }

  body::after {
    display: none;
  }

  html,
  body {
    overflow: hidden;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  html::-webkit-scrollbar,
  body::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  #app.app,
  #app.app *,
  .bottom-sheet,
  .bottom-sheet *,
  #loading.loading-screen {
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  #app.app::-webkit-scrollbar,
  #app.app *::-webkit-scrollbar,
  .bottom-sheet::-webkit-scrollbar,
  .bottom-sheet *::-webkit-scrollbar,
  #loading.loading-screen::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
  }

  #app.app {
    position: fixed;
    top: var(--app-phone-frame-top);
    left: var(--app-phone-frame-left);
    right: auto;
    bottom: auto;
    width: var(--app-phone-frame-width);
    max-width: var(--app-phone-frame-width);
    height: var(--app-phone-frame-height);
    max-height: var(--app-phone-frame-height);
    min-height: 0;
    margin: 0;
    border-radius: var(--app-phone-frame-radius);
    box-shadow: var(--app-phone-frame-shadow);
    overflow: hidden;
    background: var(--bg-primary);
    z-index: 1;
    outline: 1px solid rgba(255, 255, 255, 0.06);
    --app-viewport-height: var(--app-phone-frame-height);
    --app-content-height: calc(var(--app-phone-frame-height) - var(--app-mobile-nav-height));
    --app-phone-stage-height: var(--app-content-height);
  }

  #app.app.app-no-nav {
    --app-content-height: var(--app-phone-frame-height);
    --app-phone-stage-height: var(--app-phone-frame-height);
  }

  #app.app {
    display: flex;
    flex-direction: column;
  }

  .app-stage {
    flex: 1 1 auto;
    min-height: 0;
    height: var(--app-phone-stage-height);
    max-height: var(--app-phone-stage-height);
  }

  .bottom-nav {
    left: var(--app-phone-frame-left) !important;
    width: var(--app-phone-frame-width) !important;
    max-width: var(--app-phone-frame-width) !important;
    bottom: var(--app-phone-frame-bottom) !important;
    border-bottom-left-radius: var(--app-phone-frame-radius);
    border-bottom-right-radius: var(--app-phone-frame-radius);
    overflow: hidden;
  }

  .activity-summary-toolbar {
    left: var(--app-phone-frame-left) !important;
    width: var(--app-phone-frame-width) !important;
    max-width: var(--app-phone-frame-width) !important;
    bottom: calc(var(--app-phone-frame-bottom) + var(--app-mobile-nav-height) - 1px) !important;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .push-prompt-bar {
    left: calc(var(--app-phone-frame-left) + (var(--app-phone-frame-width) / 2));
    width: var(--app-phone-frame-width);
    max-width: var(--app-phone-frame-width);
    --push-prompt-x: -50%;
    bottom: calc(var(--app-phone-frame-top) + var(--app-mobile-nav-height) - 1px);
  }

  #loading.loading-screen {
    inset: auto;
    top: var(--app-phone-frame-top);
    left: var(--app-phone-frame-left);
    width: var(--app-phone-frame-width);
    height: var(--app-phone-frame-height);
    border-radius: var(--app-phone-frame-radius);
    overflow: hidden;
    box-shadow: var(--app-phone-frame-shadow);
  }

  .toast.visible {
    left: calc(var(--app-phone-frame-left) + 16px);
    max-width: min(calc(var(--app-phone-frame-width) - 32px), 380px);
  }
}

/* ============================================
   Loading Screen — Premium Entry
   ============================================ */

.loading-screen.loading-screen--show {
  display: flex;
  opacity: 1;
}

.loading-screen::before {
  content: '';
  position: absolute;
  inset: 0;
  animation: none;
}

@keyframes loadingPulse {
  0%, 100% { opacity: 0.5; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.loading-screen.hidden {
  display: none;
  opacity: 0;
  pointer-events: none;
}

.loading-screen.loading-screen--handoff {
  transition-duration: 560ms;
}

.loading-screen.loading-screen--handoff-fast {
  transition-duration: 280ms;
}

.loading-screen--plain {
  gap: 0;
}

.loading-screen--plain::before {
  background: var(--bg-primary);
  animation: none;
  opacity: 1;
}

.loading-screen--plain .loading-logo,
.loading-screen--plain .loading-spinner,
.loading-screen--plain .loading-status {
  display: none;
}

.loading-startup-logo {
  width: min(70vw, 320px);
  max-width: 320px;
  height: auto;
  object-fit: contain;
  position: relative;
  z-index: 1;
}

[data-theme="dark"] .loading-startup-logo,
.loading-screen.loading-screen--dark-boot .loading-startup-logo {
  filter: invert(1) brightness(1.08);
}

.loading-logo {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: 8px;
  color: #fff;
  text-shadow:
    0 0 10px rgba(135, 220, 255, 0.8),
    0 0 22px rgba(70, 170, 255, 0.6);
  animation: logoShimmer 3s ease-in-out infinite;
  position: relative;
  z-index: 1;
}

@keyframes logoShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.loading-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--border-subtle);
  border-top: 3px solid var(--gold-400);
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

.loading-screen .loading-spinner {
  display: none;
  width: 44px;
  height: 44px;
  border: 3px solid rgba(90, 130, 175, 0.26);
  border-top-color: rgba(145, 228, 255, 0.95);
  border-right-color: rgba(95, 190, 255, 0.95);
  border-radius: var(--radius-circle);
  animation: spin 0.8s cubic-bezier(0.4, 0, 0.2, 1) infinite;
  box-shadow: 0 0 20px rgba(80, 176, 255, 0.35);
}

.loading-status {
  display: none;
  font-size: 14px;
  color: rgba(198, 232, 255, 0.84);
  letter-spacing: 0.02em;
  min-height: 22px;
  text-align: center;
  position: relative;
  z-index: 1;
  opacity: 1;
  transform: translateY(0);
  transition: opacity 160ms ease, transform 200ms ease;
}

.loading-status.is-updating {
  opacity: 0.3;
  transform: translateY(2px);
}

.loading-screen.loading-screen--error .loading-spinner {
  display: block;
}

.loading-screen.loading-screen--error .loading-status {
  display: block;
  color: #9f1239;
  font-weight: 600;
}

.loading-retry-btn {
  position: relative;
  z-index: 1;
  border: 1px solid rgba(255, 255, 255, 0.34);
  background: rgba(12, 22, 36, 0.85);
  color: rgba(240, 248, 255, 0.95);
  border-radius: var(--radius-full);
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.loading-retry-btn:active {
  transform: scale(0.98);
}

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

/* ============================================
   Top-Level View Wipes
   Keep --view-wipe-duration aligned with VIEW_WIPE_DURATION_MS (view-transitions.js).
   Transform-only panel slides. No opacity or clip-path.
   ============================================ */
:root {
  --view-wipe-duration: 320ms;
  --view-wipe-neutral-duration: 320ms;
  --view-wipe-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --view-wipe-panel-enter-translate: 100%;
  --view-wipe-panel-enter-translate-inverse: -100%;
  --view-wipe-panel-exit-translate: 100%;
  --view-wipe-panel-exit-translate-inverse: -100%;
  --view-fresh-mount-fade-duration: 300ms;
}

@keyframes viewFreshMountFade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes viewWipeInForward {
  from { transform: translate3d(var(--view-wipe-panel-enter-translate), 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes viewWipeOutForward {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--view-wipe-panel-exit-translate-inverse), 0, 0); }
}

@keyframes viewWipeInReverse {
  from { transform: translate3d(var(--view-wipe-panel-enter-translate-inverse), 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes viewWipeOutReverse {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--view-wipe-panel-exit-translate), 0, 0); }
}

@keyframes viewWipeInNeutral {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes viewWipeOutNeutral {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

/* ============================================
   Views
   ============================================ */
.view {
  /* Normal document flow - no positioning */
  min-height: calc(100vh - var(--app-mobile-nav-height));
  min-height: var(--app-content-height);
  padding: var(--space-6);
  padding-top: calc(var(--safe-top) + var(--space-1));
  padding-left: calc(var(--safe-left) + var(--space-4));
  padding-right: calc(var(--safe-right) + var(--space-4));
  padding-bottom: calc(var(--app-mobile-nav-height) + var(--space-2));
  display: none;
}

.view.view--fullscreen {
  padding: 0;
  min-height: var(--app-viewport-height);
}

.view.active {
  display: block;
  animation: none;
}

.app-stage > .view.active:has(> .transfer-view) {
  box-sizing: border-box;
  height: var(--app-content-height);
  max-height: var(--app-content-height);
  min-height: 0;
  padding: 0;
  overflow: hidden;
}

.app.app-no-nav .app-stage {
  min-height: var(--app-viewport-height);
  height: var(--app-viewport-height);
  max-height: var(--app-viewport-height);
}

.app.app-no-nav .app-stage > .view.active:has(> .transfer-view) {
  height: var(--app-viewport-height);
  max-height: var(--app-viewport-height);
}

.app-stage > .view.active:has(> .transfer-view) .transfer-view {
  height: 100%;
  min-height: 0;
  max-height: 100%;
}

/* Routable sheet routes: real URL + history with a frozen background (`?route=`) */
.view.active.view--sheet-background {
  position: relative;
  z-index: 1;
  pointer-events: none;
}

/* Shell stays in #app after `.contact-view` is lifted to body. Keep it from
   painting a blank full-viewport layer over the frozen background. */
.view.active.view--routable-sheet {
  position: absolute;
  inset: 0;
  z-index: 0;
  min-height: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
  background: transparent;
}

.view.active.view-transition-settled {
  animation: none;
}

.view.active.view-wipe-forward {
  animation: viewWipeInForward var(--view-wipe-duration) var(--view-wipe-ease) both;
}

.view.active.view-wipe-reverse {
  animation: viewWipeInReverse var(--view-wipe-duration) var(--view-wipe-ease) both;
}

.view.active.view-wipe-neutral {
  animation: viewWipeInNeutral var(--view-wipe-neutral-duration) ease both;
}

.view.active.view-fresh-mount-fade {
  animation: viewFreshMountFade var(--view-fresh-mount-fade-duration) ease both;
}

.view.active.view-fresh-mount-fade-pending {
  opacity: 0;
}

.view.active.view-wipe-forward,
.view.active.view-wipe-reverse,
.view.active.view-wipe-neutral {
  position: relative;
  z-index: 2;
}

/* Panel slide owns motion — do not also translate header siblings. */
.view.active.view-wipe-forward:not([data-view-cached-restore="true"]) :is(.page-header, .activity-header-fixed, .view-transition-header) ~ :not(.view-transition-static),
.view.active.view-wipe-reverse:not([data-view-cached-restore="true"]) :is(.page-header, .activity-header-fixed, .view-transition-header) ~ :not(.view-transition-static) {
  animation: none;
  transform: none;
}

/* Activity: parent tab wipe only. Sibling content-fade left the balance card
   (or a static card vs fading list) popping alone on first visit. */
.view.active.view-wipe-forward .activity-view :is(.page-header, .activity-header-fixed, .view-transition-header) ~ *,
.view.active.view-wipe-reverse .activity-view :is(.page-header, .activity-header-fixed, .view-transition-header) ~ * {
  animation: none !important;
  opacity: 1;
  transform: none;
}

.view.active.view-wipe-forward[data-view-cached-restore="true"] :is(.page-header, .activity-header-fixed, .view-transition-header) ~ :not(.view-transition-static),
.view.active.view-wipe-reverse[data-view-cached-restore="true"] :is(.page-header, .activity-header-fixed, .view-transition-header) ~ :not(.view-transition-static) {
  animation: none;
  opacity: 1;
  transform: none;
}

.view.active.view-transition-settled :is(.page-header, .activity-header-fixed, .view-transition-header) ~ :not(.view-transition-static) {
  animation: none;
  opacity: 1;
  transform: none;
}

.view.active.view-wipe-out-forward,
.view.active.view-wipe-out-reverse,
.view.active.view-wipe-out-neutral {
  position: fixed;
  top: calc(-1 * var(--view-exit-scroll-y, 0px));
  right: auto;
  bottom: 0;
  left: var(--view-exit-left, 0px);
  width: var(--view-exit-width, 100vw);
  z-index: 1;
  overflow: hidden;
  pointer-events: none;
  background: var(--bg-primary);
}

.view.active.view-wipe-out-reveal {
  z-index: 3;
}

.view.active.view-wipe-out-forward *,
.view.active.view-wipe-out-reverse *,
.view.active.view-wipe-out-neutral * {
  animation-name: none !important;
}

.view.active.view-wipe-out-forward {
  animation: viewWipeOutForward var(--view-wipe-duration) var(--view-wipe-ease) both;
}

.view.active.view-wipe-out-reverse {
  animation: viewWipeOutReverse var(--view-wipe-duration) var(--view-wipe-ease) both;
}

.view.active.view-wipe-out-neutral {
  animation: viewWipeOutNeutral var(--view-wipe-neutral-duration) ease both;
}

@media (min-width: 768px) {
  @keyframes viewWipeInForwardDesktop {
    from { transform: translate3d(0, var(--view-wipe-panel-enter-translate), 0); }
    to { transform: translate3d(0, 0, 0); }
  }

  @keyframes viewWipeInReverseDesktop {
    from { transform: translate3d(0, var(--view-wipe-panel-enter-translate-inverse), 0); }
    to { transform: translate3d(0, 0, 0); }
  }

  @keyframes viewWipeOutForwardDesktop {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(0, var(--view-wipe-panel-exit-translate-inverse), 0); }
  }

  @keyframes viewWipeOutReverseDesktop {
    from { transform: translate3d(0, 0, 0); }
    to { transform: translate3d(0, var(--view-wipe-panel-exit-translate), 0); }
  }

  .view.active.view-wipe-forward {
    animation-name: viewWipeInForwardDesktop;
  }

  .view.active.view-wipe-reverse {
    animation-name: viewWipeInReverseDesktop;
  }

  .view.active.view-wipe-out-forward {
    animation-name: viewWipeOutForwardDesktop;
  }

  .view.active.view-wipe-out-reverse {
    animation-name: viewWipeOutReverseDesktop;
  }
}

.view.transfer-fixed-shell.active {
  animation: none;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  .view.active.view-wipe-forward,
  .view.active.view-wipe-reverse,
  .view.active.view-wipe-neutral,
  .view.active.view-fresh-mount-fade,
  .view.active.view-wipe-out-forward,
  .view.active.view-wipe-out-reverse,
  .view.active.view-wipe-out-neutral {
    animation: none;
  }
}

/* ============================================
   Tab slide — outgoing slides one way, incoming slides in from the other.
   Keep --flip-duration aligned with VIEW_FLIP_DURATION_MS.
   ============================================ */
:root {
  --flip-duration: 0.4s;
  --flip-slide-distance: 172%;
}

.flip-overlay {
  position: fixed;
  inset: 0;
  z-index: 999;
  pointer-events: none;
  background: var(--bg-primary);
  overflow: hidden;
  isolation: isolate;
}

.flip-overlay .flip-stage,
.flip-overlay .flip-card {
  width: 100%;
  height: 100%;
  position: relative;
}

.flip-overlay .flip-live-wrap,
.flip-overlay .flip-snapshot {
  position: absolute;
  inset: 0;
  overflow: visible;
}

.flip-overlay .flip-face {
  position: absolute;
  inset: 0;
  background: transparent;
}

.flip-overlay .flip-front {
  z-index: 1;
}

.flip-overlay .flip-back {
  z-index: 2;
}

.flip-overlay .flip-face .list-animate-item,
.flip-overlay .flip-face .stagger > *,
.flip-overlay .flip-face .view,
.flip-overlay .flip-face .list-container-enter,
.flip-overlay .flip-face .contacts-list--fade-in,
.flip-overlay .flip-face .activity-list--fade-in,
.flip-overlay .flip-face .assets-list--fade-in,
.flip-overlay .flip-face #contacts-list,
.flip-overlay .flip-face #activity-list,
.flip-overlay .flip-face #crypto-lists,
.flip-overlay .flip-face #managed-wallets-section {
  animation: none !important;
  opacity: 1 !important;
  transform: none !important;
}

.flip-overlay.forward .flip-back {
  transform: translate3d(var(--flip-slide-distance), 0, 0);
}

.flip-overlay.reverse .flip-back {
  transform: translate3d(calc(-1 * var(--flip-slide-distance)), 0, 0);
}

@keyframes flipSlideOutFwd {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(calc(-1 * var(--flip-slide-distance)), 0, 0); }
}

@keyframes flipSlideInFwd {
  from { transform: translate3d(var(--flip-slide-distance), 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

@keyframes flipSlideOutRev {
  from { transform: translate3d(0, 0, 0); }
  to { transform: translate3d(var(--flip-slide-distance), 0, 0); }
}

@keyframes flipSlideInRev {
  from { transform: translate3d(calc(-1 * var(--flip-slide-distance)), 0, 0); }
  to { transform: translate3d(0, 0, 0); }
}

.flip-overlay.forward.animate .flip-front {
  animation: flipSlideOutFwd var(--flip-duration, 0.4s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.flip-overlay.forward.animate .flip-back {
  animation: flipSlideInFwd var(--flip-duration, 0.4s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.flip-overlay.reverse.animate .flip-front {
  animation: flipSlideOutRev var(--flip-duration, 0.4s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.flip-overlay.reverse.animate .flip-back {
  animation: flipSlideInRev var(--flip-duration, 0.4s) cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@media (prefers-reduced-motion: reduce) {
  .flip-overlay.animate .flip-front,
  .flip-overlay.animate .flip-back {
    animation: none;
  }
}

/* Hold first-paint lists. Already-entered Home stays visible through the flip. */
.view[data-view-flip-pending="true"] #contacts-list:not([data-list-container-entered="true"]),
.view[data-view-flip-pending="true"] #activity-list:not([data-list-container-entered="true"]),
.view[data-view-flip-pending="true"] #crypto-lists:not([data-list-container-entered="true"]),
.view[data-view-flip-pending="true"] #managed-wallets-section:not([data-list-container-entered="true"]),
#activity-list:not([data-list-container-entered="true"]):not(.list-container-enter):not(.activity-list--fade-in),
#crypto-lists:not([data-list-container-entered="true"]):not(.list-container-enter),
#managed-wallets-section:not([data-list-container-entered="true"]):not(.assets-list--fade-in) {
  opacity: 0;
}

.list-container-enter,
.contacts-list--fade-in,
.activity-list--fade-in,
.assets-list--fade-in {
  animation: listFadeIn 320ms ease-out both;
}

.profile-view #managed-wallets-section.assets-list--fade-in {
  animation: assetsListFadeIn 320ms ease-out both;
}

@keyframes assetsListFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .list-container-enter,
  .contacts-list--fade-in,
  .activity-list--fade-in,
  .assets-list--fade-in {
    animation: none;
  }
}

/* Skip animation when restoring from cache (e.g. during flip transition) */
.view.active.no-animate {
  animation: none;
}

@media (min-width: 768px) {
  .view {
    position: relative;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    padding: var(--space-6);
    padding-top: var(--space-10);
    padding-bottom: var(--space-10);
  }

  .view.view--fullscreen {
    padding: 0;
  }
  
  .view.active {
    display: block;
    transform: none;
  }
}

/*
 * Phone-frame layout (after global `.view` rules).
 * The device frame is a fixed-size viewport; tab screens scroll in `.app-stage`,
 * while send/chat-style screens fill the stage and scroll internally.
 */
@media (min-width: 431px) and (max-width: 767.98px) and (hover: hover) and (pointer: fine) {
  .app-stage {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: none;
  }

  /* Tab screens: document flow inside the scroll port (contacts, activity, …). */
  .app-stage > .view.active:not(:has(> .transfer-view)):not(.view--fullscreen) {
    box-sizing: border-box;
    min-height: var(--app-content-height);
    height: auto;
    max-height: none;
    overflow: visible;
    padding-top: calc(var(--safe-top) + var(--space-1) + var(--space-3));
    padding-left: calc(var(--safe-left) + var(--space-4));
    padding-right: calc(var(--safe-right) + var(--space-4));
    padding-bottom: calc(var(--app-mobile-nav-height) + var(--space-2));
  }

  /* Internal-scroll screens: fill the stage; do not use viewport (100dvh) units. */
  .app-stage > .view.active:has(> .transfer-view),
  .app-stage > .view.active.view--fullscreen {
    box-sizing: border-box;
    min-height: 0;
    height: var(--app-content-height);
    max-height: var(--app-content-height);
    padding: 0;
    overflow: hidden;
  }

  .app-stage > .view.active:has(> .transfer-view) .transfer-view {
    height: 100%;
    min-height: 0;
    max-height: 100%;
  }

  .app-stage > .view.active:has(> .transfer-view) .transfer-scroll {
    padding-top: calc(var(--safe-top) + var(--space-2));
  }
}

/* ============================================
   Bottom Navigation — Premium Glass
   ============================================ */
.bottom-nav {
  position: fixed !important;
  bottom: 0;
  top: auto;
  left: max(var(--safe-left), calc((100vw - 430px) / 2));
  right: auto;
  margin: 0;
  width: min(430px, calc(100vw - var(--safe-left) - var(--safe-right)));
  max-width: calc(100vw - var(--safe-left) - var(--safe-right));
  background: #fff;
  border-top: 1px solid rgba(78, 78, 78, 1);
  _box-shadow: 0 -8px 32px rgba(28, 24, 16, 0.08), 0 -2px 8px rgba(28, 24, 16, 0.04);
  padding: var(--space-2) var(--space-4);
  padding-left: calc(var(--safe-left) + var(--space-4));
  padding-right: calc(var(--safe-right) + var(--space-4));
  padding-bottom: calc(var(--space-2) + max(var(--safe-bottom) - 20px, 10px));
  display: flex;
  justify-content: space-around;
  z-index: 1000;
  overflow: visible;
  isolation: isolate;
  opacity: 1;
  visibility: visible;
  transform: none;
  translate: 0 0;
  transition:
    translate 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    visibility 0s linear 0s;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

[data-theme="dark"] .bottom-nav {
  background: var(--bg-glass-strong);
  border-top-color: var(--border-default);
  box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.28);
}

@media (min-width: 768px) {
  .bottom-nav {
    position: fixed !important;
    top: 0;
    right: 0;
    bottom: auto;
    left: 0;
    transform: none;
    translate: 0 0;
    width: 100%;
    max-width: none;
    height: var(--app-desktop-nav-offset);
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    padding: calc(var(--space-2) + var(--safe-top, 0px)) calc(max(var(--space-8), calc((100vw - min(1200px, 100vw)) / 2 + var(--space-8))) + var(--space-6)) var(--space-2);
    background: var(--bg-secondary);
    border-top: none;
    border-right: none;
    border-bottom: 1px solid var(--border-subtle);
    gap: var(--space-2);
    box-shadow: none;
    transition:
      translate 220ms cubic-bezier(0.22, 1, 0.36, 1),
      opacity 220ms ease,
      visibility 0s linear 0s;
  }

  [data-theme="dark"] .bottom-nav {
    background: var(--bg-secondary);
    box-shadow: none;
    border-bottom-color: var(--border-default);
  }

  [data-theme="soft"] .bottom-nav {
    border-top: none;
    border-bottom: 1px solid rgba(128, 143, 164, 0.16);
    box-shadow:
      0 5px 14px rgba(128, 143, 164, 0.1),
      inset 0 -1px 0 rgba(255, 255, 255, 0.75);
  }

  .bottom-nav::before {
    content: none;
  }

  .bottom-nav .nav-badge {
    min-width: 18px;
    height: 18px;
    font-size: 10px;
  }

  .bottom-nav .nav-badge--dot {
    min-width: 10px;
    width: 10px;
    height: 10px;
  }
}

.bottom-nav.bottom-nav--hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  translate: 0 calc(100% + var(--safe-bottom) + 16px);
  transition:
    translate 220ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 220ms ease,
    visibility 0s linear 220ms;
}

@media (min-width: 768px) {
  .bottom-nav.bottom-nav--hidden {
    translate: 0 -24px;
  }
}

/* Push Prompt Bar */
.push-prompt-bar {
  --push-prompt-x: -50%;
  position: fixed !important;
  top: auto;
  left: 50vw;
  right: auto;
  bottom: var(--push-prompt-nav-offset, calc(var(--app-mobile-nav-height) - 1px));
  width: min(430px, calc(100vw - var(--safe-left) - var(--safe-right)));
  max-width: calc(100vw - var(--safe-left) - var(--safe-right));
  margin: 0;
  background: var(--accent-alert);
  padding: 12px 16px;
  z-index: 1001; /* Above nav/toolbar, still below sheets */
  box-shadow: 0 -8px 16px rgba(0, 0, 0, 0.16);
  animation: pushBarSlideUp 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  border-bottom: none;
  border-top-left-radius: 18px;
  border-top-right-radius: 18px;
  transform: translate3d(var(--push-prompt-x), 0, 0);
  will-change: transform;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  contain: layout style paint;
}

[data-theme="dark"] .push-prompt-bar:not(.rtc-call-recovery-bar) {
  background: rgb(22, 163, 74);
  border-top-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 -12px 28px rgba(0, 0, 0, 0.34);
}

@media (min-width: 768px) {
  .push-prompt-bar {
    position: fixed;
    left: max(var(--space-8), calc((100vw - min(1200px, 100vw)) / 2 + var(--space-8)));
    right: max(var(--space-8), calc((100vw - min(1200px, 100vw)) / 2 + var(--space-8)));
    bottom: var(--space-4);
    width: auto;
    max-width: none;
    margin: 0;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
    --push-prompt-x: 0px;
    transform: translate3d(var(--push-prompt-x), 0, 0);
  }
}

.push-prompt-bar.hidden {
  display: none;
}

.push-prompt-bar.rtc-call-recovery-bar {
  z-index: 9980;
  background: #1a1c1e;
}

[data-theme="dark"] .push-prompt-bar.rtc-call-recovery-bar {
  background: var(--bg-elevated);
  border-top-color: var(--border-default);
}

.push-prompt-bar.rtc-call-recovery-bar .push-prompt-icon {
  background: rgba(34, 197, 94, 0.18);
  border-radius: 10px;
  color: #86efac;
}

.push-prompt-bar.rtc-call-recovery-bar .push-prompt-btn {
  background: #f8fafc;
  color: #0b1016;
  border: none;
}

.push-prompt-bar.rtc-call-recovery-bar .push-prompt-btn--secondary {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
}

@keyframes pushBarSlideUp {
  from { transform: translate3d(var(--push-prompt-x), calc(100% + 16px), 0); opacity: 0; }
  to { transform: translate3d(var(--push-prompt-x), 0, 0); opacity: 1; }
}

.push-prompt-content {
  display: flex;
  align-items: center;
  gap: 10px;
}

.push-prompt-icon {
  width: 32px;
  height: 32px;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  flex-shrink: 0;
}

.push-prompt-bar:not(.rtc-call-recovery-bar) .push-prompt-icon {
  background: transparent;
  color: #fff;
}

.push-prompt-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
  fill: none;
}

.push-prompt-text {
  flex: 1;
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  line-height: 1.3;
}

.push-prompt-bar:not(.rtc-call-recovery-bar) .push-prompt-text {
  color: #fff;
}

.push-prompt-btn {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
  border-radius: 8px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.1s, background 0.12s ease, color 0.12s ease;
}

.push-prompt-bar:not(.rtc-call-recovery-bar) .push-prompt-btn {
  background: transparent;
  color: #fff;
  border: 1.5px solid rgba(255, 255, 255, 0.92);
}

.push-prompt-btn:active {
  transform: scale(0.95);
}

.push-prompt-close {
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, 0.85);
  padding: 4px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.push-prompt-bar:not(.rtc-call-recovery-bar) .push-prompt-close {
  color: rgba(255, 255, 255, 0.85);
}

.push-prompt-close svg {
  width: 16px;
  height: 16px;
}

/* ============================================
   Documents View - aplyio Style
   ============================================ */

/* Upload Form */
.documents-view .document-upload-form {
  display: grid;
  gap: var(--space-4);
}

.document-upload__dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-6);
  border: 2px dashed var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.document-upload__dropzone svg {
  width: 48px;
  height: 48px;
  opacity: 0.4;
}

@media (hover: hover) and (pointer: fine) {
  .document-upload__dropzone:hover {
  border-color: var(--gold-400);
  background: rgba(var(--gold-500-rgb), 0.05);
}
}
.document-upload__dropzone--active {
  border-color: var(--gold-400);
  background: rgba(var(--gold-500-rgb), 0.05);
}


.document-upload__dropzone--active svg {
  opacity: 0.8;
}

.document-upload__dropzone .link {
  color: var(--gold-400);
  text-decoration: underline;
  cursor: pointer;
}

.document-upload__filename {
  display: none;
  padding: var(--space-2) var(--space-3);
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

/* File List (upload queue) */
.file-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.file-list__item {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
}

.file-list__name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
}

.file-list__size {
  color: var(--text-muted);
  font-size: 0.75rem;
}

.file-list__remove {
  background: none;
  border: none;
  color: var(--text-muted);
  font-size: 1.25rem;
  line-height: 1;
  padding: 0 var(--space-1);
  cursor: pointer;
  opacity: 0.6;
  transition: opacity var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .file-list__remove:hover {
  opacity: 1;
  color: var(--error);

  }
}


.file-list__summary {
  text-align: center;
  font-size: 0.75rem;
  color: var(--text-muted);
  padding-top: var(--space-1);
  border-top: 1px solid var(--border-subtle);
}

/* Upload progress states */
.file-list__status {
  width: 20px;
  text-align: center;
  flex-shrink: 0;
}

.file-list__error {
  font-size: 0.7rem;
  color: var(--error);
}

.file-status--done .file-list__name {
  color: var(--success);
}

.file-status--done .file-list__status {
  color: var(--success);
}

.file-status--skipped {
  opacity: 0.6;
}

.file-status--skipped .file-list__status {
  color: var(--warning);
}

.file-status--failed .file-list__name {
  color: var(--error);
}

.file-status--failed .file-list__status {
  color: var(--error);
}

.file-status--uploading .file-list__name {
  color: var(--gold-400);
}

/* Small inline spinner for upload progress */
.upload-spinner {
  display: inline-block;
  width: 14px;
  height: 14px;
  border: 2px solid var(--border-subtle);
  border-top-color: var(--gold-400);
  border-radius: var(--radius-circle);
  animation: spin 0.8s linear infinite;
}

/* Search Bar */
.search-bar {
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: var(--space-4);
}

.search-bar__icon {
  position: absolute;
  left: var(--space-3);
  width: 18px;
  height: 18px;
  color: var(--text-muted);
  pointer-events: none;
}

.search-bar__input {
  width: 100%;
  padding: var(--space-3) var(--space-3) var(--space-3) var(--space-10);
  background: var(--surface-secondary);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 0.95rem;
  transition: border-color var(--duration-fast), box-shadow var(--duration-fast);
}

.search-bar__input::placeholder {
  color: var(--text-muted);
}

.search-bar__input:focus {
  outline: none;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 3px rgba(var(--gold-400-rgb), 0.1);
}

.search-bar__clear {
  position: absolute;
  right: var(--space-2);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: none;
  border: none;
  border-radius: var(--radius-circle);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .search-bar__clear:hover {
  background: var(--surface-tertiary);
  color: var(--text-primary);

  }
}


.search-bar__clear svg {
  width: 16px;
  height: 16px;
}

/* Document Summary Card */
.document-summary-card {
  margin-bottom: var(--space-6);
  padding: var(--space-5);
  background: linear-gradient(145deg, rgba(var(--gold-500-rgb), 0.1), rgba(28, 25, 23, 0.9));
  border: var(--border-width) solid var(--gold-400);
  transition: all 0.3s var(--ease-out);
}

.document-summary__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  cursor: pointer;
}

.document-summary-card:not(.collapsed) .document-summary__header {
  margin-bottom: var(--space-4);
}

.document-summary__title-area {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  flex: 1;
}

.document-summary__title-area .section-title {
  margin: 0;
}

.document-summary-card .collapse-icon {
  width: 16px;
  height: 16px;
  color: var(--gold-400);
  transition: transform 0.3s var(--ease-out);
  transform: rotate(180deg);
}

.document-summary-card.collapsed .collapse-icon {
  transform: rotate(0deg);
}

.document-summary__collapsible {
  max-height: 1000px;
  overflow: hidden;
  transition: max-height 0.4s var(--ease-out), opacity 0.3s ease;
  opacity: 1;
}

.document-summary-card.collapsed .document-summary__collapsible {
  max-height: 0;
  opacity: 0;
  margin: 0;
}

.document-summary__text {
  flex: 1;
  line-height: 1.4;
  margin-bottom: var(--space-4);
}

.summary-refresh-btn {
  width: 32px;
  height: 32px;
  opacity: 0.5;
  transition: opacity var(--duration-fast), transform var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .summary-refresh-btn:hover {
  opacity: 1;

  }
}


.summary-refresh-btn.loading svg {
  display: none;
}

.summary-refresh-btn.loading .btn-spinner {
  display: block;
  width: 16px;
  height: 16px;
}

.document-summary__highlights {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.summary-chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--bg-tertiary);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.85rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .summary-chip:hover {
  border-color: var(--gold-400);
  background: var(--bg-elevated);
  transform: translateY(-1px);
  color: var(--text-primary);

  }
}


.summary-chip:active {
  transform: translateY(0);
}

.summary-chip__icon {
  font-size: 1rem;
}

/* Global List Styles to prevent cropping */
.contacts-list,
.transaction-list,
.activity-list,
.document-list,
.recipient-list,
.recent-list {
  display: flex;
  flex-direction: column;
  overflow: visible !important;
}

.activity-list {
  margin-top: var(--space-0);
  margin-left: 2px;
  margin-right: 2px;
}

.activity-list-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 140px;
  padding: 28px 16px;
}

/* Document List */
.document-list {
  display: grid;
  gap: var(--space-2);
}

@media (min-width: 1024px) {
  .document-list {
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: var(--space-4);
  }
}

/* Document Card */
.document-card {
  padding: var(--space-4);
}

.document-card__row {
  display: flex;
  gap: var(--space-3);
}

.document-card__icon {
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  color: var(--text-muted);
}

.document-card__icon svg {
  width: 20px;
  height: 20px;
}

.document-card__icon--id {
  background: linear-gradient(135deg, var(--gold-400), var(--gold-500));
  color: var(--surface-primary);
}

.document-card__icon--large {
  width: 64px;
  height: 64px;
}

.document-card__icon--large svg {
  width: 32px;
  height: 32px;
}

.document-card__main {
  flex: 1;
  min-width: 0;
}

.document-card__header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-2);
}

.document-title {
  font-weight: 600;
  line-height: 1.3;
}

.document-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 2px;
}

.document-card__details {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  margin-top: var(--space-2);
  font-size: 0.85rem;
}

.document-card__detail {
  color: var(--text-secondary);
}

.document-card__detail .text-muted {
  color: var(--text-muted);
}

/* Extracted Fields */
.document-card__fields-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-2);
  font-size: 0.8rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: color var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .document-card__fields-toggle:hover {
  color: var(--text-secondary);

  }
}


.document-card__fields-toggle svg {
  transition: transform var(--duration-fast);
}

.document-card__fields-toggle.expanded svg {
  transform: rotate(180deg);
}

.document-card__fields {
  display: none;
  margin-top: var(--space-2);
  padding: var(--space-2);
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  font-size: 0.8rem;
}

.document-card__fields.expanded {
  display: block;
}

.document-card__field {
  display: flex;
  justify-content: space-between;
  padding: var(--space-1) 0;
  border-bottom: 1px solid var(--border-subtle);
}

.document-card__field:last-of-type {
  border-bottom: none;
}

.document-card__field-key {
  color: var(--text-muted);
  cursor: help;
  border-bottom: 1px dotted var(--border-subtle);
}

.document-card__field-value {
  color: var(--text-primary);
  font-weight: 500;
  text-align: right;
}

/* Field type styling */
.document-card__field[data-type="currency"] .document-card__field-value {
  color: var(--gold-400);
  font-variant-numeric: tabular-nums;
}

.document-card__field[data-type="tin"] .document-card__field-value,
.document-card__field[data-type="account"] .document-card__field-value {
  font-family: var(--font-mono, monospace);
  font-size: 0.85em;
  letter-spacing: 0.5px;
}

.document-card__field[data-type="date"] .document-card__field-value,
.document-card__field[data-type="year"] .document-card__field-value {
  font-variant-numeric: tabular-nums;
}

/* More Fields Toggle - Removed as we now show all fields */
.document-card__more-fields {
  display: none;
}

.document-card__hidden-fields {
  display: none;
}

/* Document Card Footer */
.document-card__footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}

.document-card__actions {
  display: flex;
  gap: var(--space-2);
}

/* Selectable Document Cards */
.document-card--selectable {
  cursor: pointer;
  position: relative;
  transition: border-color var(--duration-fast), background var(--duration-fast), transform var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .document-card--selectable:hover {
  border-color: var(--border-gold);

  }
}


.document-card--selectable:active {
  transform: scale(0.98);
}

.document-card__checkbox {
  position: absolute;
  bottom: var(--space-3);
  right: var(--space-3);
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-secondary);
  transition: all var(--duration-fast);
  opacity: 0.6;
}

@media (hover: hover) and (pointer: fine) {
  .document-card--selectable:hover .document-card__checkbox {
  opacity: 1;

  }
}


.document-card__checkbox svg {
  width: 16px;
  height: 16px;
  stroke: transparent;
  transition: stroke var(--duration-fast);
}

.document-card--selected {
  border-color: var(--gold-400);
  border-width: 2px;
  box-shadow: 0 0 0 1px var(--gold-400), inset 0 0 20px rgba(var(--gold-500-rgb), 0.1);
}

.document-card--selected .document-card__checkbox {
  background: var(--gold-400);
  border-color: var(--gold-400);
  opacity: 1;
}

.document-card--selected .document-card__checkbox svg {
  stroke: var(--bg-primary);
}

/* Selection Action Bar */
.selection-bar {
  position: fixed;
  bottom: calc(var(--app-mobile-nav-height) + var(--space-2));
  left: var(--space-3);
  right: var(--space-3);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-elevated);
  border: var(--border-width) solid var(--border-gold);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 9999;
}

.selection-bar[hidden] {
  display: none !important;
}

.selection-bar__info {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 0.85rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.selection-bar__clear {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  padding: 0;
  background: var(--surface-tertiary);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--duration-fast), color var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .selection-bar__clear:hover {
  background: var(--surface-secondary);
  color: var(--text-primary);

  }
}


.selection-bar__clear svg {
  width: 14px;
  height: 14px;
}

.selection-bar__count {
  font-weight: 600;
  color: var(--gold-400);
}

.selection-bar__actions {
  display: flex;
  gap: var(--space-2);
}

.selection-bar__actions .btn {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  font-size: 0.85rem;
}

.selection-bar__actions .btn svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

/* Hide text labels on mobile, show only icons */
.selection-bar__actions .btn-text {
  display: none;
}

@media (min-width: 768px) {
  .selection-bar {
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: auto;
    max-width: 500px;
    bottom: var(--space-8);
    padding: var(--space-3) var(--space-5);
  }
  
  .selection-bar__actions .btn-text {
    display: inline;
  }
}

/* Document Gallery Viewer */
.document-gallery {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
}

.document-gallery__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
}

.document-gallery__container {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: 100%;
  max-width: 1200px;
  max-height: 90vh;
  background: var(--surface-primary);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: var(--space-4);
  box-shadow: var(--shadow-lg);
}

.document-gallery__header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-secondary);
  border-bottom: 1px solid var(--border-primary);
}

.document-gallery__title {
  flex: 1;
  font-weight: 600;
  font-size: 1rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.document-gallery__counter {
  font-size: 0.875rem;
  color: var(--text-secondary);
  white-space: nowrap;
}

.document-gallery__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: var(--radius-sm);
  transition: background var(--duration-fast), color var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .document-gallery__close:hover {
  background: var(--surface-tertiary);
  color: var(--text-primary);

  }
}


.document-gallery__close svg {
  width: 20px;
  height: 20px;
}

.document-gallery__content {
  flex: 1;
  position: relative;
  background: var(--surface-tertiary);
  min-height: 0;
}

.document-gallery__loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.document-gallery__iframe {
  width: 100%;
  height: 100%;
  border: none;
  display: none;
}

.document-gallery__nav {
  display: flex;
  justify-content: space-between;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-secondary);
  border-top: 1px solid var(--border-primary);
}

.document-gallery__nav-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: var(--border-width) solid var(--border-primary);
  background: var(--surface-primary);
  color: var(--text-primary);
  cursor: pointer;
  border-radius: var(--radius-md);
  transition: background var(--duration-fast), border-color var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .document-gallery__nav-btn:hover:not(:disabled) {
  background: var(--surface-secondary);
  border-color: var(--border-secondary);

  }
}


.document-gallery__nav-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.document-gallery__nav-btn svg {
  width: 24px;
  height: 24px;
}

@media (max-width: 767px) {
  .document-gallery__container {
    margin: 0;
    border-radius: 0;
    max-height: 100%;
  }
}

/* ID Document Card - Special Style */
.document-card--id {
  background: linear-gradient(135deg, var(--surface-primary) 0%, rgba(var(--gold-500-rgb), 0.05) 100%);
  border: var(--border-width) solid rgba(var(--gold-500-rgb), 0.2);
}

/* Prompt Card (for ID scan CTA) */
.document-card--prompt {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-5);
}

.document-card__prompt-content {
  flex: 1;
}

.document-card__prompt-content .document-title {
  font-size: 1.1rem;
  margin-bottom: var(--space-1);
}

.document-card__prompt-content p {
  margin-bottom: var(--space-3);
}

/* Freshness Indicators */
.freshness-indicator {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 0.75rem;
  color: var(--text-muted);
}

.freshness-indicator--fresh {
  color: var(--success);
}

.freshness-indicator--aging {
  color: var(--warning);
}

.freshness-indicator--stale {
  color: var(--warning);
}

.freshness-indicator--expired {
  color: var(--error);
}

/* Status Badges */
.badge-doc-verified {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(var(--success-rgb, 34, 197, 94), 0.15);
  color: var(--success);
  border-radius: var(--radius-full);
}

.badge-doc-pending {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(var(--warning-rgb, 234, 179, 8), 0.15);
  color: var(--warning);
  border-radius: var(--radius-full);
}

.badge-doc-expired {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 8px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  background: rgba(var(--error-rgb, 239, 68, 68), 0.15);
  color: var(--error);
  border-radius: var(--radius-full);
}

.badge-count {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  font-size: 0.7rem;
  font-weight: 600;
  background: var(--surface-secondary);
  color: var(--text-muted);
  border-radius: var(--radius-full);
}

/* Document Requests (Share List) */
.document-requests {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
  display: grid;
  gap: var(--space-2);
}

.document-request {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2);
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
}

.document-request__title {
  font-weight: 600;
  font-size: 0.85rem;
}

.document-request__subtitle {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ============================================
   Bottom Sheet Component — Elegant Modal
   ============================================ */
.bottom-sheet {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-sensual);
}

.bottom-sheet.visible {
  /* Wrapper stays pass-through. A leftover full-screen layer used to eat
     every Home tap while the panel was off-screen or empty. */
  pointer-events: none;
  opacity: 1;
}

.bottom-sheet.visible .bottom-sheet__overlay,
.bottom-sheet.visible .bottom-sheet__content {
  pointer-events: auto;
}

.bottom-sheet__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.8) 100%);
}

.bottom-sheet__content {
  position: relative;
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--bg-elevated) 0%, var(--bg-secondary) 100%);
  border: 1px solid var(--border-gold);
  border-bottom: none;
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  max-height: 85vh;
  transform: translateY(100%);
  transition: transform var(--duration-sensual) var(--ease-sensual);
  overflow: hidden;
  box-shadow: 0 -20px 60px rgba(0, 0, 0, 0.2), 0 0 40px rgba(166, 133, 33, 0.1);
}

.bottom-sheet[data-theme] .bottom-sheet__content {
  color: var(--text-primary);
}

.bottom-sheet[data-theme="dark"] .bottom-sheet__title,
.bottom-sheet[data-theme="dark"] #sheet-title {
  color: #eef2f7;
}

.bottom-sheet__content::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(201, 162, 39, 0.5), transparent);
}

.bottom-sheet.visible .bottom-sheet__content {
  transform: translateY(0);
}

.route-sheet,
.route-sheet.visible {
  z-index: 9988;
  pointer-events: none !important;
}

.route-sheet.visible .bottom-sheet__overlay,
.route-sheet.visible .bottom-sheet__content {
  pointer-events: auto;
}

.route-sheet .bottom-sheet__overlay {
  background: rgba(0, 0, 0, 0.18);
}

.route-sheet .bottom-sheet__content {
  width: 100%;
  height: calc(100vh - max(120px, calc(var(--safe-top) + 96px)));
  height: calc(var(--app-viewport-height) - max(120px, calc(var(--safe-top) + 96px)));
  max-height: calc(100vh - max(120px, calc(var(--safe-top) + 96px)));
  max-height: calc(var(--app-viewport-height) - max(120px, calc(var(--safe-top) + 96px)));
  padding: 0;
  background: var(--bg-primary);
  border: 1px solid var(--accent);
  border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  box-shadow: none;
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.route-sheet .bottom-sheet__content::before {
  display: none;
}

.transfer-route-sheet {
  z-index: 9998 !important;
}

.transfer-route-sheet .route-sheet__dismiss,
.transfer-route-sheet .route-sheet__back {
  display: none;
}

.transfer-route-sheet .bottom-sheet__content {
  height: calc(100vh - max(48px, calc(var(--safe-top) + 20px)));
  height: calc(var(--app-viewport-height) - max(48px, calc(var(--safe-top) + 20px)));
  max-height: calc(100vh - max(48px, calc(var(--safe-top) + 20px)));
  max-height: calc(var(--app-viewport-height) - max(48px, calc(var(--safe-top) + 20px)));
}

/* Fill the overlay box (inset: 0). 100vh / --app-viewport-height is unreliable
   in Expo WKWebView and left a Home peek plus a stacked safe-top gap. */
@media (max-width: 767.98px) {
  .transfer-route-sheet .bottom-sheet__overlay {
    pointer-events: none;
  }

  .transfer-route-sheet .bottom-sheet__content {
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    border: none;
  }
}

html.app-native-shell .transfer-route-sheet .bottom-sheet__overlay,
body.app-native-shell .transfer-route-sheet .bottom-sheet__overlay {
  pointer-events: none;
}

/* First 500ms: catch the opening tap so it cannot fall through to Home. */
.transfer-route-sheet.route-sheet--opening .bottom-sheet__overlay {
  pointer-events: auto !important;
}

html.app-native-shell .transfer-route-sheet .bottom-sheet__content,
body.app-native-shell .transfer-route-sheet .bottom-sheet__content {
  height: 100% !important;
  max-height: 100% !important;
  border-radius: 0;
  border: none;
}

.transfer-route-sheet .transfer-view,
.transfer-route-sheet .transfer-container,
.transfer-route-sheet .transfer-in-network-view {
  position: relative !important;
  inset: auto !important;
  width: 100% !important;
  height: 100% !important;
  max-height: 100% !important;
  min-height: 0 !important;
  z-index: auto !important;
}

.transfer-route-sheet.transfer-sheet-content-pending .transfer-scroll > :not(.transfer-header),
.transfer-view.transfer-sheet-content-pending .transfer-scroll > :not(.transfer-header) {
  opacity: 0;
  transform: translateY(10px);
}

.transfer-route-sheet.transfer-sheet-content-ready .transfer-scroll > :not(.transfer-header),
.transfer-view.transfer-sheet-content-ready .transfer-scroll > :not(.transfer-header) {
  animation: transferSheetContentFade 320ms var(--ease-sensual) both;
}

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

@media (prefers-reduced-motion: reduce) {
  .transfer-route-sheet.transfer-sheet-content-pending .transfer-scroll > :not(.transfer-header),
  .transfer-view.transfer-sheet-content-pending .transfer-scroll > :not(.transfer-header),
  .transfer-route-sheet.transfer-sheet-content-ready .transfer-scroll > :not(.transfer-header),
  .transfer-view.transfer-sheet-content-ready .transfer-scroll > :not(.transfer-header) {
    animation: none;
    transform: none;
  }
}

@media (min-width: 768px) {
  .route-sheet.transfer-route-sheet.bottom-sheet {
    justify-content: center;
    align-items: center;
    padding: var(--space-6);
  }

  .route-sheet.transfer-route-sheet .bottom-sheet__overlay {
    background: rgba(0, 0, 0, 0.42);
  }

  .route-sheet.transfer-route-sheet .bottom-sheet__content {
    width: min(640px, calc(100vw - 48px));
    max-width: min(640px, calc(100vw - 48px));
    height: min(calc(100dvh - 80px), 840px);
    max-height: min(calc(100dvh - 80px), 840px);
    margin: 0;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-2xl);
    box-shadow:
      0 28px 72px rgba(15, 23, 42, 0.22),
      0 8px 24px rgba(15, 23, 42, 0.08);
    transform: scale(0.96) translateY(12px);
    transition: transform var(--duration-sensual) var(--ease-sensual);
  }

  .route-sheet.transfer-route-sheet.visible .bottom-sheet__content {
    transform: scale(1) translateY(0);
  }
}

/* Keep full-bleed layout only: closed/open transform comes from .bottom-sheet__content + .visible (slide). */

.route-sheet__dismiss {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  right: 16px;
  z-index: 24;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-glass-strong);
  color: var(--text-muted);
  box-shadow: var(--shadow-md);
}

.route-sheet__dismiss svg {
  width: 18px;
  height: 18px;
}

.route-sheet__back {
  position: absolute;
  top: calc(var(--safe-top) + 10px);
  left: 12px;
  z-index: 24;
  height: 36px;
  min-height: 36px;
  padding: 0 8px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text-primary);
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
}

.bottom-sheet__handle {
  width: 48px;
  height: 5px;
  background: linear-gradient(90deg, var(--border-subtle), var(--border-gold), var(--border-subtle));
  border-radius: var(--radius-full);
  margin: var(--space-4) auto var(--space-2);
  flex-shrink: 0;
  position: relative;
  z-index: 10;
  opacity: 0.6;
}

.bottom-sheet__header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4) var(--space-5);
  background: transparent;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.bottom-sheet__title {
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.scanner-sheet-footer {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-3);
}

.scanner-sheet-wallet-qr-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  min-height: 52px;
  padding: 12px 18px;
  border: 1px solid var(--border-gold-strong);
  border-radius: 999px;
  background: var(--bg-secondary);
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.25;
  cursor: pointer;
  box-sizing: border-box;
}

.scanner-sheet-wallet-qr-cta__or {
  color: var(--text-muted);
  font-size: 15px;
  font-weight: 500;
}

.scanner-sheet-wallet-qr-cta__action {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-primary);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.scanner-sheet-wallet-qr-cta__icon {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
}

@media (hover: hover) and (pointer: fine) {
  .scanner-sheet-wallet-qr-cta:hover .scanner-sheet-wallet-qr-cta__action {
    color: var(--accent-primary, var(--text-primary));
    text-decoration: underline;
  }
}

.bottom-sheet__close {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-glass);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-sensual);
}

@media (hover: hover) and (pointer: fine) {
  .bottom-sheet__close:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-gold);
  color: var(--text-primary);
  transform: rotate(90deg);

  }
}


.bottom-sheet__close svg {
  width: 18px;
  height: 18px;
}

.bottom-sheet.bottom-sheet--hide-close .bottom-sheet__close {
  display: none;
}

.bottom-sheet.bottom-sheet--hide-close .bottom-sheet__header {
  justify-content: flex-start;
}

.bottom-sheet__body {
  flex: 1;
  min-width: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: var(--space-5);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

.bottom-sheet__footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-5);
  padding-bottom: calc(var(--space-5) + var(--safe-bottom));
  background: linear-gradient(180deg, transparent, var(--bg-secondary));
  border-top: 1px solid var(--border-subtle);
}

.bottom-sheet.bottom-sheet--large .bottom-sheet__content {
  width: min(960px, calc(100vw - 24px));
  max-width: 960px;
  height: min(88vh, 980px);
  max-height: min(88vh, 980px);
  margin: 0 auto;
  border-radius: var(--radius-2xl);
  border-bottom: 1px solid var(--border-gold);
  min-height: 0;
}

.bottom-sheet.bottom-sheet--large .bottom-sheet__body {
  flex: 1;
  min-height: 0;
  padding: var(--space-5);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none;
}

.bottom-sheet.bottom-sheet--large .bottom-sheet__body:has(.crypto-sign-sheet) {
  padding: 0;
  overflow: hidden;
}

.bottom-sheet.bottom-sheet--large .bottom-sheet__footer {
  padding-top: var(--space-4);
}

.crypto-sign-sheet {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--bg-primary);
}

.crypto-sign-sheet__frame {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 0;
  background: var(--bg-elevated);
}

@media (max-width: 720px) {
  .bottom-sheet.bottom-sheet--large .bottom-sheet__content {
    width: 100%;
    height: 92vh;
    max-height: 92vh;
    border-left: none;
    border-right: none;
    border-bottom: none;
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
  }
}

/* Footer with horizontal buttons */
.bottom-sheet__footer--horizontal {
  flex-direction: row;
  gap: var(--space-3);
}

.bottom-sheet__footer--horizontal .btn {
  flex: 1;
}

.card-onramp-confirm-sheet .bottom-sheet__content {
  max-width: 420px;
  margin: 0 auto;
}

.card-onramp-provider-toggle {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
}

.card-onramp-provider-label,
.card-onramp-confirm-label {
  display: block;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0;
  text-align: left;
}

.card-onramp-provider-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.card-onramp-provider-option {
  min-height: 44px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--bg-glass);
  color: var(--text-secondary);
  font-weight: 800;
}

.card-onramp-provider-option.is-active {
  border-color: var(--text-primary);
  background: var(--text-primary);
  color: var(--bg-primary);
}

.card-onramp-confirm-sheet__summary {
  display: grid;
  gap: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: var(--bg-glass);
  margin-bottom: 22px;
}

.card-onramp-confirm-sheet__line {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 800;
}

.card-onramp-confirm-sheet__line span:first-child {
  color: var(--text-muted);
  font-weight: 600;
}

.card-onramp-confirm-sheet__line span:last-child {
  text-align: right;
}

.card-onramp-confirm-row {
  margin-bottom: 14px;
}

.card-onramp-confirm-input {
  width: 100%;
  min-height: 54px;
  padding: 0 18px;
  border: 2px solid var(--text-primary);
  border-radius: 18px;
  background: var(--bg-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 16px;
  font-weight: 500;
  outline: none;
  box-sizing: border-box;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.card-onramp-confirm-input:focus {
  border-color: var(--gold-500);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--gold-500) 20%, transparent);
}

.card-onramp-confirm-note {
  margin: 8px 0 0;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.card-onramp-confirm-terms {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}

.card-onramp-confirm-terms input {
  margin-top: 2px;
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  accent-color: var(--gold-500);
}

.card-onramp-confirm-error {
  display: none;
  color: var(--error);
  font-size: 13px;
  margin: 0 0 12px;
  text-align: left;
}

.card-onramp-confirm-error.is-visible {
  display: block;
}

.card-onramp-confirm-sheet .bottom-sheet__footer {
  padding-top: 0;
}

.card-onramp-confirm-sheet .btn-primary {
  min-height: 52px;
  border-radius: 18px;
  font-size: 16px;
  font-weight: 800;
}

.workflow-detail-footer-actions {
  display: flex;
  gap: var(--space-3);
  width: 100%;
}

.workflow-detail-footer-actions .btn {
  flex: 1;
}

.workflow-detail-action-stack {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.chat-group-sheet .bottom-sheet__body {
  padding: var(--space-4);
}

.chat-group-sheet .menu-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.chat-group-sheet .menu-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
  padding: 12px 16px;
  border: 1px solid var(--border-subtle);
  border-radius: 16px;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

@media (hover: hover) and (pointer: fine) {
  .chat-group-sheet .menu-option:hover {
  background: var(--bg-secondary);
  border-color: var(--gold-300);

  }
}


.chat-group-sheet .menu-option:active {
  transform: scale(0.99);
}

.chat-group-sheet .menu-option.danger {
  color: var(--danger);
  border-color: rgba(220, 38, 38, 0.16);
  background: rgba(220, 38, 38, 0.04);
}

@media (hover: hover) and (pointer: fine) {
  .chat-group-sheet .menu-option.danger:hover {
  border-color: rgba(220, 38, 38, 0.28);
  background: rgba(220, 38, 38, 0.08);

  }
}


.chat-group-sheet .menu-option--static {
  padding: 10px 14px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.65);
  cursor: default;
}

.chat-group-sheet .menu-option--static:active {
  transform: none;
}

.chat-group-sheet .chat-group-members-list,
.chat-group-sheet .chat-group-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.chat-group-sheet .chat-group-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.chat-group-sheet .chat-group-actions .menu-option:only-child {
  grid-column: 1 / -1;
}

.chat-group-sheet .chat-group-member-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
  width: 100%;
}

.chat-group-sheet .chat-group-member-meta {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.chat-group-sheet .chat-group-member-link {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 0;
  margin: 0;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.2;
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

.chat-group-sheet .chat-group-member-role {
  font-size: 12px;
  color: var(--text-muted);
}

.chat-group-sheet .chat-group-member-remove {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 4px 0;
  margin: 0;
  flex-shrink: 0;
  color: var(--danger);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .chat-group-sheet .chat-group-member-link:hover,
  .chat-group-sheet .chat-group-member-remove:hover {
  opacity: 0.75;

  }
}


/* Desktop: centered dialog style */
@media (min-width: 768px) {
  .bottom-sheet {
    justify-content: center;
    align-items: center;
  }
  
  .bottom-sheet__content {
    width: 100%;
    max-width: 460px;
    max-height: 90vh;
    border-radius: var(--radius-2xl);
    border-bottom: 1px solid var(--border-gold);
    transform: scale(0.9) translateY(30px);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.25), 0 0 60px rgba(166, 133, 33, 0.15);
  }
  
  .bottom-sheet.visible .bottom-sheet__content {
    transform: scale(1) translateY(0);
  }
  
  .bottom-sheet__handle {
    display: none;
  }

  /* Full-width route sheets (e.g. contact): stay bottom-anchored with top peek; don't use centered scale dialog. */
  .route-sheet.bottom-sheet {
    justify-content: flex-end;
    align-items: stretch;
  }

  .route-sheet .bottom-sheet__content {
    max-width: none;
    width: 100%;
    transform: translateY(100%);
  }

  .route-sheet.visible .bottom-sheet__content {
    transform: translateY(0);
  }
}

/* Phone-frame overlays: must follow base .bottom-sheet { inset: 0 } rules above. */
@media (min-width: 431px) and (max-width: 767.98px) and (hover: hover) and (pointer: fine) {
  .bottom-sheet,
  .route-sheet.bottom-sheet,
  #global-sheet.bottom-sheet,
  .document-gallery,
  .scanner-overlay.active,
  .coin-intro-overlay,
  .matrix-burst-overlay {
    inset: auto !important;
    top: var(--app-phone-frame-top) !important;
    left: var(--app-phone-frame-left) !important;
    right: auto !important;
    bottom: auto !important;
    width: var(--app-phone-frame-width) !important;
    height: var(--app-phone-frame-height) !important;
    max-width: var(--app-phone-frame-width) !important;
    max-height: var(--app-phone-frame-height) !important;
    border-radius: var(--app-phone-frame-radius);
    overflow: hidden;
  }

  .bottom-sheet,
  .route-sheet.bottom-sheet,
  #global-sheet.bottom-sheet {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: stretch;
  }

  .bottom-sheet .bottom-sheet__overlay,
  .route-sheet .bottom-sheet__overlay {
    position: absolute;
    inset: 0;
    border-radius: inherit;
  }

  .bottom-sheet__content {
    width: 100%;
    max-width: 100%;
    margin: 0;
    max-height: min(85%, calc(var(--app-phone-frame-height) - 48px));
    border-radius: var(--radius-2xl) var(--radius-2xl) 0 0;
    transform: translateY(100%);
  }

  .bottom-sheet.visible .bottom-sheet__content {
    transform: translateY(0);
  }

  .route-sheet .bottom-sheet__content {
    height: calc(var(--app-phone-frame-height) - max(96px, calc(var(--safe-top) + 72px)));
    max-height: calc(var(--app-phone-frame-height) - max(96px, calc(var(--safe-top) + 72px)));
    width: 100%;
    max-width: 100%;
  }

  .transfer-route-sheet .bottom-sheet__content {
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    border: none;
  }

  .bottom-sheet.bottom-sheet--large {
    justify-content: flex-end;
    align-items: stretch;
  }

  .bottom-sheet.bottom-sheet--large .bottom-sheet__content {
    width: 100%;
    max-width: 100%;
    height: min(88%, calc(var(--app-phone-frame-height) - 40px));
    max-height: min(88%, calc(var(--app-phone-frame-height) - 40px));
    margin: 0;
    transform: translateY(100%);
  }

  .bottom-sheet.bottom-sheet--large.visible .bottom-sheet__content {
    transform: translateY(0);
  }

  .selection-bar:not([hidden]) {
    inset: auto !important;
    left: calc(var(--app-phone-frame-left) + var(--space-3)) !important;
    right: auto !important;
    width: calc(var(--app-phone-frame-width) - (var(--space-3) * 2)) !important;
    bottom: calc(var(--app-phone-frame-bottom) + var(--app-mobile-nav-height) + var(--space-2)) !important;
    transform: none !important;
  }

  .document-gallery {
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .document-gallery__backdrop {
    border-radius: inherit;
  }
}


/* Radio Group */
.radio-group {
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
}

.radio-option {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-secondary);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .radio-option:hover {
  background: var(--surface-tertiary);

  }
}


.radio-option input[type="radio"] {
  accent-color: var(--gold-400);
}

.radio-option input[type="radio"]:checked + span {
  color: var(--gold-400);
  font-weight: 500;
}

/* Collapsible Header improvements */
.collapsible-header__content {
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.collapsible-header__icon {
  width: 20px;
  height: 20px;
  color: var(--text-muted);
}

/* Utility */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.btn-block {
  width: 100%;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-2) var(--space-4);
  background: none;
  border: none;
  cursor: pointer;
  border-radius: var(--radius-lg);
  transition: all var(--duration-normal) var(--ease-sensual);
  position: relative;
  z-index: 2;
}

.nav-item[hidden],
.nav-item.nav-item--hidden {
  display: none !important;
  pointer-events: none;
}

.nav-item::before {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 50%;
  transform: translateX(-50%) scaleX(0);
  width: 28px;
  height: 3px;
  background: var(--accent-alert, #1dc427);
  border-radius: var(--radius-full);
  transition: transform var(--duration-normal) var(--ease-spring);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent-alert, #1dc427) 40%, transparent);
  z-index: 0;
}

[data-theme="dark"] .nav-item::before {
  background: var(--accent-alert, #1dc427);
  box-shadow: 0 0 12px color-mix(in srgb, var(--accent-alert, #1dc427) 40%, transparent);
}

.nav-item.active::before {
  transform: translateX(-50%) scaleX(1);
}

.nav-item::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  background: radial-gradient(ellipse at center bottom, rgba(15, 23, 42, 0.08) 0%, transparent 70%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
  z-index: 0;
}

[data-theme="dark"] .nav-item::after {
  background: rgba(248, 250, 252, 0.08);
}

.nav-item > * {
  position: relative;
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .nav-item:hover::after {
  opacity: 0.5;

  }
}


.nav-item.active::after {
  opacity: 1;
}

.nav-item:active {
  transform: scale(0.92);
}

@media (min-width: 768px) {
  .nav-item {
    flex: 0 0 auto;
    flex-direction: row;
    max-width: none;
    gap: 8px;
    padding: var(--space-2) var(--space-3);
    min-height: 0;
    justify-content: center;
    align-items: center;
  }

  .bottom-nav .nav-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    color: var(--text-secondary);
  }

  .bottom-nav .nav-label {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.01em;
    color: var(--text-secondary);
    text-align: left;
    line-height: 1;
  }

  @media (hover: hover) and (pointer: fine) {
    .bottom-nav .nav-item:hover .nav-icon,
    .bottom-nav .nav-item:hover .nav-label {
      color: var(--text-primary);
    }
  }

  .bottom-nav .nav-item.active .nav-icon,
  .bottom-nav .nav-item.active .nav-label {
    color: var(--text-primary);
  }

  .bottom-nav .nav-item.active .nav-label {
    font-weight: 700;
  }

  [data-theme="dark"] .bottom-nav .nav-item.active .nav-icon,
  [data-theme="dark"] .bottom-nav .nav-item.active .nav-label {
    color: var(--text-primary);
  }
}

.nav-icon {
  width: 24px;
  height: 24px;
  color: var(--text-muted);
  transition: all var(--duration-normal) var(--ease-sensual);
}

.nav-label {
  font-size: 12px;
  font-weight: 400;
  letter-spacing: 0.02em;
  color: var(--text-muted);
  transition: all var(--duration-normal) var(--ease-sensual);
}

@media (hover: hover) and (pointer: fine) {
  .nav-item:hover .nav-icon {
  color: var(--text-secondary);
  transform: translateY(-1px);

  }
}


@media (hover: hover) and (pointer: fine) {
  .nav-item:hover .nav-label {
  color: var(--text-secondary);

  }
}


.nav-item.active {
  background: transparent;
}

.nav-item.active .nav-icon {
  color: var(--text-primary);
  filter: none;
  stroke-width: 2.4;
  transform: scale(1.25);
}

[data-theme="dark"] .nav-item.active .nav-icon {
  color: var(--text-primary);
  filter: none;
}

.nav-item.active .nav-label {
  color: var(--text-primary);
  font-weight: 700;
}

[data-theme="dark"] .nav-item.active .nav-label {
  color: var(--text-primary);
}

.nav-icon-wrapper {
  position: relative;
  display: inline-flex;
}

.nav-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  background: var(--error);
  border: 2px solid var(--bg-secondary);
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.nav-badge--dot {
  top: -3px;
  right: -3px;
  min-width: 9px;
  width: 9px;
  height: 9px;
  padding: 0;
  border-width: 2px;
}

.nav-badge[hidden] {
  display: none;
}

/* ============================================
   Modals & Sheets (Legacy - kept for compatibility)
   ============================================ */

/* Transaction Detail Modal Styles */
.tx-detail-header {
  text-align: center;
  padding-top: var(--space-2);
  margin-bottom: var(--space-5);
}

.tx-detail-header-external {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.06), rgba(59, 130, 246, 0));
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 14px;
  padding: 12px 12px 8px;
}

.tx-detail-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
  padding: 4px 10px;
  border-radius: var(--radius-full);
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: rgba(59, 130, 246, 0.08);
  color: #2d4f88;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}

.tx-detail-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto var(--space-3);
}

.tx-detail-icon.received {
  background: var(--success-muted);
}

.tx-detail-icon.received svg {
  stroke: var(--success);
}

.tx-detail-icon.sent {
  background: var(--error-muted);
}

.tx-detail-icon.sent svg {
  stroke: var(--error);
}

.tx-detail-icon svg {
  width: 24px;
  height: 24px;
  stroke-width: 2;
}

.tx-detail-amount {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: var(--space-1);
}

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

.tx-detail-amount.is-terminal {
  color: #8a93a3 !important;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: #a7afbc;
  text-decoration-skip-ink: auto;
}

.tx-detail-type {
  font-size: 14px;
  color: var(--text-muted);
}

.tx-detail-rows {
  display: flex;
  flex-direction: column;
  padding: 0 var(--space-4);
  margin-bottom: var(--space-4);
}

.tx-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) 0;
  border-bottom: 1px solid var(--list-divider-color);
}

.tx-detail-row:last-child {
  border-bottom: none;
}

.tx-detail-label {
  font-size: 13px;
  color: var(--text-muted);
}

.tx-detail-value {
  font-size: 13px;
  font-weight: 500;
  text-align: right;
  max-width: 60%;
  word-break: break-word;
}

.tx-detail-user-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  cursor: pointer;
}

.tx-detail-user-name {
  text-decoration: underline;
  text-underline-offset: 2px;
}

.tx-detail-id {
  font-size: 11px;
}

.tx-detail-explorer-link {
  color: var(--accent, #3b82f6);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
}

@media (hover: hover) and (pointer: fine) {
  .tx-detail-explorer-link:hover {
  opacity: 0.9;

  }
}


.tx-detail-note {
  margin-bottom: var(--space-4);
}

.tx-detail-note-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: var(--space-1);
}

.tx-detail-note-label--with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.tx-detail-note-label--with-action .tx-detail-inline-link {
  font-size: 11px;
  text-transform: none;
  letter-spacing: normal;
}

.tx-detail-note-text {
  font-size: 14px;
}

.memo-illustration-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 6px;
}

.memo-illustration-heading .tx-detail-note-text {
  margin: 0;
  flex: 1;
}

.memo-illustration-share-btn {
  flex-shrink: 0;
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  background: var(--surface-secondary, var(--bg-secondary));
}

@media (hover: hover) and (pointer: fine) {
  .memo-illustration-share-btn:hover {
  color: var(--text-primary);
  border-color: var(--border-strong, var(--border-default));
  background: var(--surface-tertiary, var(--bg-tertiary));
}
}
.memo-illustration-share-btn:focus-visible {
  color: var(--text-primary);
  border-color: var(--border-strong, var(--border-default));
  background: var(--surface-tertiary, var(--bg-tertiary));
}


.memo-illustration-share-btn svg {
  width: 18px;
  height: 18px;
}

.tx-detail-memo-illustration {
  margin-top: 0;
  border: 1px solid transparent;
  border-radius: 12px;
  overflow: hidden;
  max-width: min(280px, 100%);
  max-height: 0;
  opacity: 0;
  transform: scale(0);
  transform-origin: center center;
  transition:
    max-height 320ms cubic-bezier(0.2, 0.9, 0.2, 1),
    margin-top 240ms ease,
    opacity 220ms ease,
    transform 320ms cubic-bezier(0.2, 0.9, 0.2, 1),
    border-color 220ms ease;
}

.tx-detail-memo-illustration.is-loaded {
  margin-top: 8px;
  max-height: 420px;
  opacity: 1;
  border-color: var(--border-default);
  transform: scale(1);
}

.tx-detail-memo-illustration img {
  width: 100%;
  display: block;
}

@media (prefers-reduced-motion: reduce) {
  .tx-detail-memo-illustration {
    transition: none;
  }
}

.memo-mood-badges-wrap {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    grid-template-rows 240ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 240ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease;
  opacity: 0;
}

.memo-mood-badges-wrap.is-visible {
  grid-template-rows: 1fr;
  margin-top: 6px;
  opacity: 1;
  pointer-events: auto;
}

.memo-mood-badges-wrap > .memo-mood-badges {
  min-height: 0;
  overflow: hidden;
}

.memo-illustration-mood-block {
  margin-top: 6px;
}

.memo-mood-badges {
  margin-top: 0;
}

.memo-mood-badges-row {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
  padding-bottom: 1px;
}

.memo-mood-badges-row::-webkit-scrollbar {
  display: none;
}

.memo-mood-badge {
  flex: 0 0 auto;
  border: 1px solid var(--border-default, rgba(0, 0, 0, 0.12));
  background: var(--surface-raised, #fff);
  color: var(--text-secondary, rgba(0, 0, 0, 0.72));
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  line-height: 1.25;
  white-space: nowrap;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease, transform 120ms ease;
}

@media (hover: hover) and (pointer: fine) {
  .memo-mood-badge:hover {
  border-color: var(--accent, #6ea8ff);
  color: var(--text-primary, #fff);

  }
}


.memo-mood-badge.is-active {
  background: #000;
  border-color: #000;
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .memo-mood-badge.is-active:hover {
  background: #111;
  border-color: #111;
  color: #fff;

  }
}


.memo-illustration-generating {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 8px;
  font-size: 13px;
  color: var(--text-muted, rgba(0, 0, 0, 0.55));
}

.memo-illustration-generating-text {
  line-height: 1.3;
}

.memo-illustration-regenerate-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.memo-illustration-regenerate-row.is-busy .btn {
  display: none;
}

.memo-illustration-spinner {
  display: inline-block;
  width: 18px;
  height: 18px;
  border: 2px solid rgba(0, 0, 0, 0.12);
  border-top-color: rgba(0, 0, 0, 0.55);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  flex-shrink: 0;
}

.memo-illustration-spinner--sm {
  width: 14px;
  height: 14px;
  border-width: 2px;
}

[data-theme="dark"] .memo-illustration-spinner {
  border-color: rgba(255, 255, 255, 0.2);
  border-top-color: rgba(255, 255, 255, 0.75);
}

@media (prefers-reduced-motion: reduce) {
  .memo-mood-badges-wrap {
    transition: none;
  }
}

html.contact-list-actions-hidden .contacts-view .contact-card[data-pair-id][data-user-id] .contact-action-btn[data-action="open-chat"],
html.contact-list-actions-hidden .contacts-view .contact-card[data-pair-id][data-user-id] .contact-action-btn[data-action="send"],
html.contact-list-actions-hidden .contacts-view .contact-card[data-pair-id][data-user-id] .contact-action-btn[data-action="send-to-user"],
html.contact-list-actions-hidden .activity-view .user-search-item .activity-user-action-btn[data-action="open-chat"],
html.contact-list-actions-hidden .activity-view .user-search-item .activity-user-action-btn[data-action="send"],
html.contact-list-actions-hidden .activity-view .user-search-item .activity-user-action-btn[data-action="send-to-user"] {
  display: none;
}

.tx-detail-inline-link {
  border: none;
  background: transparent;
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  font-size: 13px;
  font-weight: 700;
  padding: 0;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .tx-detail-inline-link:hover {
  color: var(--text-secondary);

  }
}


/* Legacy tx-detail-actions - now handled by bottom-sheet__footer */
.tx-detail-actions {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

/* ============================================
   Toast — Sleek Notifications (inverted for contrast)
   ============================================ */
.toast {
  position: fixed;
  top: calc(var(--safe-top) + 88px);
  left: 16px;
  transform: translateX(calc(-100% - 24px));
  background: color-mix(in srgb, #0f1419 88%, transparent);
  backdrop-filter: blur(18px) saturate(1.15);
  -webkit-backdrop-filter: blur(18px) saturate(1.15);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--radius-lg, 16px);
  padding: 12px 14px 12px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.28),
    0 4px 12px rgba(0, 0, 0, 0.16);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.24s ease, transform 0.32s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 10001;
  cursor: pointer;
  max-width: min(calc(100vw - 32px), 380px);
  color: #f7f8fa;
}

[data-theme="dark"] .toast {
  background: color-mix(in srgb, #f4f5f7 92%, transparent);
  border-color: rgba(0, 0, 0, 0.08);
  color: #0b1016;
  box-shadow:
    0 12px 36px rgba(0, 0, 0, 0.35),
    0 4px 12px rgba(0, 0, 0, 0.18);
}

.toast.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}

.toast.toast-dismiss-immediate {
  transition: opacity 0.12s ease, transform 0.12s ease;
}

.toast-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  color: #e8c76a;
  opacity: 0.95;
}

[data-theme="dark"] .toast-icon {
  color: var(--gold-500, #A68521);
}

.toast-message {
  flex: 1;
  min-width: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
}

.toast .toast-open {
  flex-shrink: 0;
  margin-left: 2px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-transform: none;
  color: #0b1016;
  background: #f4f5f7;
  border: none;
  border-radius: var(--radius-sm, 8px);
  cursor: pointer;
  box-shadow: none;
  transition: transform 0.12s ease, background 0.12s ease, opacity 0.12s ease;
}

[data-theme="dark"] .toast .toast-open {
  background: #111;
  color: #fff;
}

@media (hover: hover) and (pointer: fine) {
  .toast .toast-open:hover {
    opacity: 0.92;
  }
}

.toast .toast-open:active {
  transform: scale(0.97);
  box-shadow: none;
}

[data-theme="dark"] .toast .toast-open:active {
  box-shadow: none;
}

/* ============================================
   Typography
   ============================================ */
a {
  text-decoration: underline;
}
.text-display {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.text-title {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  letter-spacing: -0.01em;
  margin-bottom: var(--space-6);
}

.text-heading {
  font-size: 20px;
  font-weight: 600;
  line-height: 1.3;
}

.text-body {
  font-size: 16px;
  font-weight: 400;
  line-height: 1.6;
}

.text-small {
  font-size: 14px;
  line-height: 1.5;
}

.text-caption {
  font-size: 12px;
  line-height: 1.4;
  letter-spacing: 0.01em;
}

.text-mono {
  font-family: 'JetBrains Mono', monospace;
}

.text-gold {
  color: var(--gold-400);
}

.text-gold-gradient {
  background: var(--gold-shine);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

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

.text-error {
  color: var(--error);
}

.text-secondary {
  color: var(--text-secondary);
}

/* ============================================
   Buttons — Sensual Interactions
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-5);
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border: none;
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-sensual);
  position: relative;
  overflow: hidden;
}

.btn::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2) 0%, transparent 50%);
  opacity: 0;
  transition: opacity var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .btn:hover::before {
  opacity: 1;

  }
}


.btn:active {
  transform: scale(0.97);
}

.btn-primary {
  background: linear-gradient(135deg, var(--gold-400) 0%, var(--gold-500) 50%, var(--gold-600) 100%);
  background: black;
  background-size: 200% 200%;
  background-position: 50% 50%;
  color: var(--btn-primary-fg);
  border: 1px solid var(--gold-500);
  box-shadow: var(--shadow-gold), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover {
  background-position: 0% 0%;
  box-shadow: var(--shadow-gold-lg), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transform: translateY(-2px);

  }
}


.btn-primary:active {
  background-position: 100% 100%;
  transform: translateY(0) scale(0.98);
  box-shadow: var(--shadow-sm), inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.btn-secondary {
  background: var(--bg-glass-strong);
  color: var(--text-primary);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) and (pointer: fine) {
  .btn-secondary:hover {
  background: var(--bg-elevated);
  border-color: var(--border-gold);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);

  }
}


.btn-secondary:active {
  box-shadow: var(--shadow-sm);
  transform: translateY(0) scale(0.98);
}

.btn-sm {
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  min-height: 0;
  border-radius: var(--radius-md, 10px);
}

.btn-ghost {
  background: transparent;
  color: var(--text-secondary);
  border: 1px solid transparent;
}

@media (hover: hover) and (pointer: fine) {
  .btn-ghost:hover {
  color: var(--text-primary);
  background: var(--bg-glass);
  border-color: var(--border-subtle);

  }
}


.btn-outline-gold {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(254, 253, 251, 0.8));
  color: var(--gold-600);
  border: 1px solid var(--border-gold);
  box-shadow: var(--shadow-sm);
}

@media (hover: hover) and (pointer: fine) {
  .btn-outline-gold:hover {
  background: linear-gradient(145deg, rgba(201, 162, 39, 0.1), rgba(166, 133, 33, 0.05));
  border-color: var(--gold-400);
  box-shadow: var(--shadow-gold);
  transform: translateY(-1px);

  }
}


.btn-lg {
  padding: var(--space-4) var(--space-8);
  font-size: 16px;
  border-radius: var(--radius-full);
  letter-spacing: 0.02em;
}

.btn-full {
  width: 100%;
}

.btn-icon {
  width: 32px;
  height: 32px;
  padding: 0;
  border-radius: var(--radius-full);
}

.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  filter: grayscale(0.3);
}

/* Button Loading State */
.btn .btn-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid transparent;
  border-top-color: currentColor;
  border-radius: var(--radius-circle);
  animation: spin 0.8s linear infinite;
}

.btn.loading .btn-text {
  opacity: 0;
}

.btn.loading .btn-spinner {
  display: block;
  position: absolute;
  left: 50%;
  top: 50%;
  margin-left: -8px;
  margin-top: -8px;
}

.btn.loading {
  position: relative;
  pointer-events: none;
}

/* ============================================
   Cards — Elegant Glassmorphism
   ============================================ */
.card {
  background: var(--gold-100);
  border: var(--border-width) solid var(--border-subtle);
  _border: 2px solid var(--gold-500);
  border-radius: var(--radius-xl);
  padding: var(--space-5);
  box-shadow: var(--shadow-sm);
  transition: all var(--duration-normal) var(--ease-sensual);
  position: relative;
  overflow: hidden;
}

.card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.8), transparent);
  opacity: 0.6;
}

@media (hover: hover) and (pointer: fine) {
  .card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-gold);

  }
}


.card-gold {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-gold);
  position: relative;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.95), rgba(254, 253, 251, 0.9));
}

.card-gold::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, var(--gold-400) 0%, transparent 40%, transparent 60%, var(--gold-500) 100%);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
  opacity: 0.7;
  transition: opacity var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .card-gold:hover::before {
  opacity: 1;

  }
}


.card-gold::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-glow);
  opacity: 0;
  transition: opacity var(--duration-sensual) var(--ease-out);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .card-gold:hover::after {
  opacity: 0.5;

  }
}


.card-elevated {
  background: var(--bg-elevated);
  box-shadow: var(--shadow-lg);
  border: none;
}

@media (hover: hover) and (pointer: fine) {
  .card-elevated:hover {
  box-shadow: var(--shadow-xl);
  transform: translateY(-4px);

  }
}


/* Shared translucent card shell (profile + contact detail) */
.profile-view .trust-card,
.profile-view .balance-card,
.contact-view .trust-card,
.contact-view .contact-header,
.contact-view .limits-card,
.tx-detail-rows {
  _background: var(--bg-elevated);
  _border: 1px solid var(--border-gold);
  _box-shadow: var(--shadow-sm);
}


@media (hover: hover) and (pointer: fine) {
  .profile-view .trust-card:hover,
  .profile-view .balance-card:hover {
  border-color: #c8d1de;
  box-shadow: var(--shadow-glow);
  transform: none;

  }
}


.profile-view .balance-card,
.contact-view .trust-card,
.contact-view .contact-header,
.contact-view .limits-card,
.tx-detail-rows,
.tx-detail-note {
  border-radius: var(--radius-lg);
}

.tx-detail-note {
  box-shadow: var(--shadow-md);
}

.tx-detail-rows {
  border: 1px solid var(--border-gold);
}

.profile-view .balance-card,
.tx-detail-note {
  padding: var(--space-4);
}

/* ============================================
   Inputs — Elegant Forms
   ============================================ */
#registration-phone, #registration-phone-error {
  text-align: center;
  padding: 20px;
}

#registration-phone-error {
  color: red;
}

#registration-phone-form {
  padding: 0 16px;
}

@media (min-width: 768px) {
  #registration-phone-form {
    padding: 0;
  }

  .onboarding .name-input-container,
  .onboarding .display-name-editor {
    width: 100%;
  }
}

/* Registration text inputs match list-search styling */
.onboarding [data-step="name"] .name-input-container .input,
.onboarding [data-step="phone-entry"] .name-input-container .input,
.onboarding [data-step="phone-verify"] .name-input-container .input,
.onboarding [data-step="phone-verify"] .code-input {
  background: var(--list-search-bg);
  border: 1px solid transparent;
  border-radius: var(--radius-full);
  padding: 13px 16px;
  color: var(--list-search-text);
  outline: none;
  box-shadow: none;
  transition: border-color 160ms ease, color 160ms ease, background-color 160ms ease;
}

.onboarding [data-step="name"] .name-input-container .input:focus,
.onboarding [data-step="phone-entry"] .name-input-container .input:focus,
.onboarding [data-step="phone-verify"] .name-input-container .input:focus,
.onboarding [data-step="phone-verify"] .code-input:focus {
  /* Single focus edge — no outer ring (avoids double-line with field silhouette). */
  border: 1px solid var(--list-search-focus-border) !important;
  box-shadow: none !important;
  outline: none;
  background: var(--list-search-bg);
  color: var(--list-search-text-focus);
}

/* Soft theme focus-border is transparent; keep one visible edge without a halo. */
:root[data-theme="soft"] .onboarding [data-step="name"] .name-input-container .input:focus,
:root[data-theme="soft"] .onboarding [data-step="phone-entry"] .name-input-container .input:focus,
:root[data-theme="soft"] .onboarding [data-step="phone-verify"] .name-input-container .input:focus,
:root[data-theme="soft"] .onboarding [data-step="phone-verify"] .code-input:focus {
  border-color: rgba(107, 114, 128, 0.28) !important;
}

/* Autofill must match list-search fill (global autofill uses --bg-elevated). */
.onboarding [data-step="name"] .name-input-container .input:-webkit-autofill,
.onboarding [data-step="name"] .name-input-container .input:-webkit-autofill:hover,
.onboarding [data-step="name"] .name-input-container .input:-webkit-autofill:focus,
.onboarding [data-step="phone-entry"] .name-input-container .input:-webkit-autofill,
.onboarding [data-step="phone-entry"] .name-input-container .input:-webkit-autofill:hover,
.onboarding [data-step="phone-entry"] .name-input-container .input:-webkit-autofill:focus,
.onboarding [data-step="phone-verify"] .name-input-container .input:-webkit-autofill,
.onboarding [data-step="phone-verify"] .name-input-container .input:-webkit-autofill:hover,
.onboarding [data-step="phone-verify"] .name-input-container .input:-webkit-autofill:focus,
.onboarding [data-step="phone-verify"] .code-input:-webkit-autofill,
.onboarding [data-step="phone-verify"] .code-input:-webkit-autofill:hover,
.onboarding [data-step="phone-verify"] .code-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--list-search-text) !important;
  caret-color: var(--list-search-text-focus) !important;
  background-color: var(--list-search-bg) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--list-search-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--list-search-bg) inset !important;
  transition: background-color 99999s ease-in-out 0s !important;
}

.onboarding [data-step="name"] .name-input-container .input:-webkit-autofill:focus,
.onboarding [data-step="phone-entry"] .name-input-container .input:-webkit-autofill:focus,
.onboarding [data-step="phone-verify"] .name-input-container .input:-webkit-autofill:focus,
.onboarding [data-step="phone-verify"] .code-input:-webkit-autofill:focus {
  -webkit-text-fill-color: var(--list-search-text-focus) !important;
  border: 1px solid var(--list-search-focus-border) !important;
  -webkit-box-shadow: 0 0 0 1000px var(--list-search-bg) inset !important;
  box-shadow: 0 0 0 1000px var(--list-search-bg) inset !important;
}

:root[data-theme="soft"] .onboarding [data-step="name"] .name-input-container .input:-webkit-autofill:focus,
:root[data-theme="soft"] .onboarding [data-step="phone-entry"] .name-input-container .input:-webkit-autofill:focus,
:root[data-theme="soft"] .onboarding [data-step="phone-verify"] .name-input-container .input:-webkit-autofill:focus,
:root[data-theme="soft"] .onboarding [data-step="phone-verify"] .code-input:-webkit-autofill:focus {
  border-color: rgba(107, 114, 128, 0.28) !important;
}

.biometric-review-scores {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  width: 100%;
  margin-top: var(--space-5);
}

.biometric-review-score {
  border: 1px solid var(--border-subtle, rgba(255, 255, 255, 0.12));
  border-radius: var(--radius-md, 12px);
  padding: var(--space-3) var(--space-4);
  background: var(--surface-elevated, rgba(255, 255, 255, 0.04));
}

.biometric-review-score--pass {
  border-color: rgba(52, 199, 89, 0.45);
}

.biometric-review-score--fail {
  border-color: rgba(255, 69, 58, 0.5);
}

.biometric-review-score--warn {
  border-color: rgba(255, 214, 10, 0.45);
}

.biometric-review-score__header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--space-3);
}

.biometric-review-score__label {
  font-size: 0.95rem;
  font-weight: 600;
}

.biometric-review-score__value {
  font-size: 1.1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.biometric-review-score__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-1);
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.biometric-review-score--pass .biometric-review-score__status {
  color: #34c759;
}

.biometric-review-score--fail .biometric-review-score__status {
  color: #ff453a;
}

.biometric-review-error {
  color: #ff453a;
  margin-bottom: var(--space-2);
}

.biometric-review-spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid rgba(255, 255, 255, 0.15);
  border-top-color: var(--accent, #fff);
  border-radius: 50%;
  animation: biometric-review-spin 0.8s linear infinite;
  margin: 0 auto var(--space-4);
}

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

.onboarding [data-step="name"] .name-input-container .input::placeholder,
.onboarding [data-step="phone-entry"] .name-input-container .input::placeholder,
.onboarding [data-step="phone-verify"] .name-input-container .input::placeholder,
.onboarding [data-step="phone-verify"] .code-input::placeholder {
  color: var(--list-search-placeholder);
}
.input {
  width: 100%;
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  padding: var(--space-4) var(--space-5);
  font-family: inherit;
  font-size: 16px;
  color: var(--text-primary);
  outline: none;
  transition: all var(--duration-normal) var(--ease-sensual);
}

@media (hover: hover) and (pointer: fine) {
  .input:hover {
  border-color: var(--border-gold);

  }
}


.input:focus {
  border: none !important;
  border-color: var(--gold-400);
  box-shadow: 0 0 0 4px rgba(var(--gold-300-rgb), 0.15), var(--shadow-gold);
  background: var(--bg-elevated);
}

.input::placeholder {
  color: var(--text-muted);
  transition: color var(--duration-fast) var(--ease-out);
}

.input:focus::placeholder {
  color: var(--gold-400);
  opacity: 0.5;
}

.input-lg {
  padding: var(--space-5) var(--space-6);
  font-size: 18px;
  border-radius: var(--radius-full);
}

/* Contacts add button variant */
.contacts-view .contacts-wordmark-title {
  display: flex;
  align-items: center;
  margin: 0;
}

.contacts-view .contacts-wordmark-title img {
  display: block;
  height: 24px;
  width: auto;
}

[data-theme="dark"] .contacts-view .contacts-wordmark-title img {
  filter: invert(1) brightness(1.08);
}

.contacts-view .btn-primary-soft {
  background: rgba(255, 255, 255, 0.92);
  color: #0b0f14;
  box-shadow: none;
  opacity: 1;
  border-radius: 50%;
  border: 1px solid var(--gold-200);
}

@media (hover: hover) and (pointer: fine) {
  .contacts-view .btn-primary-soft:hover {
  background: #fff;
  border-color: var(--gold-300);
  box-shadow: none;

  }
}


/* ============================================
   Trust Bar — Elegant Progress
   ============================================ */
.trust-bar {
  height: 10px;
  background: var(--bg-tertiary);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

.trust-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--gold-500) 0%, var(--gold-400) 50%, var(--gold-500) 100%);
  background-size: 200% 100%;
  border-radius: var(--radius-full);
  transition: width var(--duration-sensual) var(--ease-sensual);
  position: relative;
  box-shadow: 0 0 20px rgba(166, 133, 33, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  animation: trustGradient 3s ease-in-out infinite;
}

@keyframes trustGradient {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.trust-bar-fill::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
  border-radius: inherit;
}

.trust-bar-fill::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 0%, rgba(255, 255, 255, 0.5) 50%, transparent 100%);
  animation: shimmer 2s ease-in-out infinite;
}

@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}

/* Compact trust bars used in list row metadata */
.contacts-view .trust-bar,
.transfer-view .recipient-meta .trust-bar {
  width: 36px;
  height: 3px;
  background: rgba(160, 175, 200, 0.25);
  border-radius: 2px;
  overflow: hidden;
}

.contacts-view .trust-bar-fill,
.transfer-view .recipient-meta .trust-bar-fill {
  height: 100%;
  background: #5b8af5;
  border-radius: 2px;
}

/* Trust card-specific palette in profile view */
.profile-view .trust-card .trust-bar {
  background: rgba(122, 139, 168, 0.22);
  box-shadow: inset 0 1px 2px rgba(40, 53, 72, 0.18);
}

.profile-view .trust-card .trust-bar-fill {
  background: linear-gradient(90deg, #5f7698 0%, #7f96b7 50%, #5f7698 100%);
  box-shadow: 0 0 10px rgba(112, 137, 175, 0.26), inset 0 1px 0 rgba(255, 255, 255, 0.26);
}

/* ============================================
   Badges — Elegant Pills
   ============================================ */
.badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: var(--space-1);
  padding: 5px var(--space-3);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border-radius: var(--radius-full);
  transition: all var(--duration-fast) var(--ease-out);
}

.badge-fresh {
  background: linear-gradient(135deg, rgba(5, 150, 105, 0.15), rgba(5, 150, 105, 0.08));
  color: var(--success);
  box-shadow: 0 0 12px rgba(5, 150, 105, 0.15);
}

.badge-verified {
  background: linear-gradient(135deg, rgba(166, 133, 33, 0.15), rgba(166, 133, 33, 0.08));
  color: var(--gold-600);
  box-shadow: 0 0 12px rgba(166, 133, 33, 0.15);
}

.badge-recent {
  background: linear-gradient(135deg, rgba(52, 211, 153, 0.15), rgba(52, 211, 153, 0.08));
  color: #059669;
}

.badge-warm {
  background: linear-gradient(135deg, rgba(217, 119, 6, 0.15), rgba(217, 119, 6, 0.08));
  color: var(--warning);
  box-shadow: 0 0 12px rgba(217, 119, 6, 0.15);
}

.badge-cool {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.12), rgba(220, 38, 38, 0.06));
  color: #DC2626;
}

.badge-dormant {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.08));
  color: var(--error);
}

.badge-gold {
  background: linear-gradient(135deg, rgba(166, 133, 33, 0.2), rgba(201, 162, 39, 0.1));
  color: var(--gold-600);
  box-shadow: 0 0 16px rgba(166, 133, 33, 0.2);
}

.badge-muted {
  background: var(--bg-glass);
  color: var(--text-muted);
  border: 1px solid var(--border-subtle);
}

.badge-error {
  background: linear-gradient(135deg, rgba(220, 38, 38, 0.15), rgba(220, 38, 38, 0.08));
  color: var(--error);
  box-shadow: 0 0 12px rgba(220, 38, 38, 0.1);
}

.badge-level {
  background: var(--bg-glass-strong);
  color: var(--text-secondary);
  border: 1px solid var(--border-subtle);
}

/* ============================================
   Avatars — Premium Polish
   ============================================ */
.avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #111827;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--text-inverse);
  flex-shrink: 0;
  position: relative;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.2);
  overflow: hidden;
  transition: all var(--duration-normal) var(--ease-sensual);
}

.avatar::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gold-700);
  border-radius: inherit;
  z-index: 0;
  display: none;
}

.avatar::after {
  content: '';
  position: absolute;
  inset: -50%;
  _background: linear-gradient(135deg, transparent 40%, rgba(255, 255, 255, 0.3) 50%, transparent 60%);
  transform: rotate(45deg);
  transition: all var(--duration-sensual) var(--ease-out);
  z-index: 1;
}

@media (hover: hover) and (pointer: fine) {
  .list-item:hover .avatar::after,
  .transaction-item:hover .avatar::after {
  transform: rotate(45deg) translateX(100%);

  }
}


.avatar-initials {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  position: relative;
  /* Sit under .avatar-photo; coins often have transparent centers so we also
     hide initials whenever a photo is present (see :has rule below). */
  z-index: 1;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.avatar-photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
  border-radius: 50%;
}

/* Initials are fallback-only: hide them (incl. bare text nodes) while a coin
   / photo is in the avatar. data-img-fallback="remove" drops the img on error
   and this rule stops matching so initials reappear. */
.avatar:has(> .avatar-photo),
.avatar:has(> .avatar-photo) .avatar-initials,
[data-theme="soft"] .contacts-view .avatar:has(> .avatar-photo),
[data-theme="soft"] .contacts-view .avatar:has(> .avatar-photo) .avatar-initials {
  color: transparent;
  text-shadow: none;
}

.avatar:has(> .avatar-photo) .avatar-initials {
  visibility: hidden;
}

.avatar-photo--coin {
  transform: none;
  transform-origin: center;
  border-radius: 50%;
  overflow: hidden;
}

.pending-icon.pending-icon--coin,
.pending-icon.pending-icon--coin img,
.profile-badge-coin {
  border-radius: 50%;
}

.avatar-badge {
  position: absolute;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 6;
  pointer-events: none;
}

.avatar-badge--online {
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: var(--accent-alert);
  border: 2px solid var(--avatar-badge-border, var(--bg-secondary));
}

.avatar-badge--unread {
  top: -5px;
  right: -5px;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  background: var(--error);
  border: 2px solid var(--avatar-badge-border, var(--bg-secondary));
  color: white;
  font-size: 10px;
  font-weight: 800;
  line-height: 14px;
}

.avatar-sm {
  width: 36px;
  height: 36px;
  font-size: 14px;
}

.avatar-md {
  width: 44px;
  height: 44px;
  font-size: 16px;
}

.avatar-lg {
  width: 110px;
  height: 110px;
  font-size: 32px;
  box-shadow: var(--shadow-gold-lg);
}

.avatar-xl {
  width: 256px;
  height: 256px;
  font-size: 36px;
  box-shadow: var(--shadow-gold-lg), 0 0 60px rgba(166, 133, 33, 0.2);
}

/* Entity type colors: silver for people, gunmetal for business */
.avatar-person {
  background-image:
    var(--coin-bg-faded-stack),
    linear-gradient(145deg, #CBD5E1 0%, #94A3B8 50%, #64748B 100%);
  background-size: 100% 100%, cover, 100% 100%;
  background-position: center center, center center, center center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.avatar-business {
  background-image:
    var(--coin-bg-faded-stack),
    linear-gradient(145deg, #475569 0%, #334155 50%, #1E293B 100%);
  background-size: 100% 100%, cover, 100% 100%;
  background-position: center center, center center, center center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  box-shadow: var(--shadow-md), inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

/* ============================================
   Money Format
   ============================================ */
.money-format {
  display: inline-flex;
  align-items: baseline;
  white-space: nowrap;
  line-height: 1;
}

.money-sign,
.money-whole {
  line-height: 1;
}

.money-cents {
  display: inline-block;
  font-size: 0.56em;
  line-height: 1;
  transform: translateY(-0.26em);
  border-bottom: 1px solid currentColor;
  padding-bottom: 0.02em;
  margin-left: 0.04em;
  opacity: 0.95;
}

/* ============================================
   Shared Top Action Controls (Activity + Profile + Contact)
   ============================================ */
.activity-view .top-action-center,
.profile-view .top-action-center,
.contact-view .top-action-center {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
}

.activity-view .top-action-btn,
.profile-view .top-action-btn,
.contact-view .top-action-btn {
  border: none;
  background: transparent;
  color: #0b0d10;
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.01em;
  padding: 4px;
  cursor: pointer;
  opacity: 0.9;
}

.activity-view .top-action-divider,
.profile-view .top-action-divider,
.contact-view .top-action-divider {
  width: 1px;
  height: 24px;
  align-self: center;
  margin: 0 2px;
  opacity: 0.95;
  background: #c8ced8;
}

.activity-view .top-icon-btn,
.profile-view .top-icon-btn,
.contact-view .top-icon-btn {
  border: none;
  background: transparent;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(11, 13, 16, 0.78);
  padding: 0;
  cursor: pointer;
}

.activity-view .top-icon-btn svg,
.activity-view .top-icon-static svg,
.profile-view .top-icon-btn svg,
.profile-view .top-icon-static svg,
.contact-view .top-icon-btn svg,
.contact-view .top-icon-static svg {
  width: 26px;
  height: 26px;
}

.activity-view .top-icon-static,
.profile-view .top-icon-static,
.contact-view .top-icon-static {
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(11, 13, 16, 0.62);
}

/* ============================================
   Shared Dark Section Sheen
   ============================================ */
.dark-section-shell,
.activity-view .stat-card-balance {
  position: relative;
  background: black;
  background: var(--dark-section-bg);
  border: 1px solid #1f2430;
  overflow: hidden;
  _box-shadow:
    0 4px 8px rgba(23, 31, 45, 0.42),
    0 8px 18px rgba(8, 10, 14, 0.08);
}

[data-theme="dark"] .dark-section-shell,
[data-theme="dark"] .activity-view .stat-card-balance,
[data-theme="dark"] .activity-view .stat-card.dark-section-shell,
[data-theme="dark"] .contact-tx-summary.dark-section-shell {
  border-color: rgba(170, 182, 198, 0.22);
}

.dark-section-shell > *,
.activity-view .stat-card-balance > * {
  position: relative;
  z-index: 1;
}

.dark-section-shell::before,
.activity-view .stat-card-balance::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  _background: linear-gradient(90deg, #4c5f7a, #b8c6dc, #4c5f7a);
  z-index: 2;
  pointer-events: none;
}

.dark-section-shell::after,
.activity-view .stat-card-balance::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0) 70%,
    transparent 100%
  );
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 1;
  animation: sectionSheenSweep 1.2s ease-out 4s forwards;
}

.dark-section-shell.sheen-replay::after,
.activity-view .stat-card-balance.sheen-replay::after {
  animation: sectionSheenSweep 1.2s ease-out forwards;
}

/* Activity balance card: no delayed auto-sheen. Settling the tab used to
   restart the 4s CSS animation and glimmer the card after every visit. */
.activity-view .stat-card-balance.dark-section-shell::after,
.activity-view .stat-card-balance::after {
  animation: none;
  opacity: 0;
}

.activity-view .stat-card-balance.sheen-replay::after {
  animation: sectionSheenSweep 1.2s ease-out forwards;
  opacity: 1;
}

/* Don't run balance sheen on a tab that isn't the settled front view —
   otherwise cached restores / deferred exits replay glimmer under/on the outgoing tab. */
.view:not(.active) .dark-section-shell::after,
.view:not(.view-transition-settled):not(.no-animate) .dark-section-shell::after,
.view[data-view-exit-deferred="true"] .dark-section-shell::after,
.view[data-view-exit-token] .dark-section-shell::after,
.view:not(.active) .activity-view .stat-card-balance::after,
.view:not(.view-transition-settled):not(.no-animate) .activity-view .stat-card-balance::after,
.view[data-view-exit-deferred="true"] .activity-view .stat-card-balance::after,
.view[data-view-exit-token] .activity-view .stat-card-balance::after {
  animation: none !important;
  opacity: 0;
}

:root:not([data-theme]) :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell,
[data-theme="gold"] :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell,
:root:not([data-theme]) .activity-view .stat-card.stat-card-balance.dark-section-shell,
[data-theme="gold"] .activity-view .stat-card.stat-card-balance.dark-section-shell {
  background:
    radial-gradient(ellipse 80% 120% at 86% 50%, rgba(232, 213, 176, 0.26), transparent 52%),
    repeating-linear-gradient(
      150deg,
      rgba(166, 133, 33, 0.058) 0,
      rgba(166, 133, 33, 0.058) 1px,
      transparent 1px,
      transparent 9px
    ),
    #FEFDFB;
  border: 1px solid var(--gold-300);
  box-shadow: none;
  color: #14120D;
}

:root:not([data-theme]) :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell::before,
:root:not([data-theme]) :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell::after,
[data-theme="gold"] :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell::before,
[data-theme="gold"] :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell::after,
:root:not([data-theme]) .activity-view .stat-card.stat-card-balance.dark-section-shell::before,
:root:not([data-theme]) .activity-view .stat-card.stat-card-balance.dark-section-shell::after,
[data-theme="gold"] .activity-view .stat-card.stat-card-balance.dark-section-shell::before,
[data-theme="gold"] .activity-view .stat-card.stat-card-balance.dark-section-shell::after {
  content: none;
}

:root:not([data-theme]) .crypto-balance-card .crypto-balance-total,
:root:not([data-theme]) .crypto-balance-card .crypto-balance-eyebrow,
:root:not([data-theme]) .crypto-balance-card .crypto-balance-note,
:root:not([data-theme]) .assets-balance-card .assets-balance-total,
:root:not([data-theme]) .assets-balance-card .assets-balance-eyebrow,
:root:not([data-theme]) .assets-balance-card .assets-balance-note,
:root:not([data-theme]) .assets-balance-card .assets-balance-action-btn,
:root:not([data-theme]) .contacts-balance-card .contacts-balance-amount,
:root:not([data-theme]) .contacts-balance-card .contacts-balance-label,
:root:not([data-theme]) .contacts-balance-card .balance-rollup-badge,
:root:not([data-theme]) .contact-tx-summary .trust-stat-value,
:root:not([data-theme]) .contact-tx-summary .contact-collapse-chevron,
:root:not([data-theme]) .activity-view .stat-card-balance .activity-summary-label,
:root:not([data-theme]) .activity-view .stat-card-balance .summary-scope-line,
:root:not([data-theme]) .activity-view .stat-card-balance .summary-suffix,
:root:not([data-theme]) .activity-view .stat-card-balance .summary-range-bound,
:root:not([data-theme]) .activity-view .stat-card-balance .stat-range-arrow,
:root:not([data-theme]) .activity-view .stat-card-balance .activity-metric-label,
:root:not([data-theme]) .activity-view .stat-card-balance .activity-metric-value,
:root:not([data-theme]) .activity-view .activity-search-row .search-container .search-input,
:root:not([data-theme]) .activity-view .stat-card-balance .stat-range-field-head,
:root:not([data-theme]) .activity-view .stat-card-balance .stat-range-preview,
[data-theme="gold"] .crypto-balance-card .crypto-balance-total,
[data-theme="gold"] .crypto-balance-card .crypto-balance-eyebrow,
[data-theme="gold"] .crypto-balance-card .crypto-balance-note,
[data-theme="gold"] .assets-balance-card .assets-balance-total,
[data-theme="gold"] .assets-balance-card .assets-balance-eyebrow,
[data-theme="gold"] .assets-balance-card .assets-balance-note,
[data-theme="gold"] .assets-balance-card .assets-balance-action-btn,
[data-theme="gold"] .contacts-balance-card .contacts-balance-amount,
[data-theme="gold"] .contacts-balance-card .contacts-balance-label,
[data-theme="gold"] .contacts-balance-card .balance-rollup-badge,
[data-theme="gold"] .contact-tx-summary .trust-stat-value,
[data-theme="gold"] .contact-tx-summary .contact-collapse-chevron,
[data-theme="gold"] .activity-view .stat-card-balance .activity-summary-label,
[data-theme="gold"] .activity-view .stat-card-balance .summary-scope-line,
[data-theme="gold"] .activity-view .stat-card-balance .summary-suffix,
[data-theme="gold"] .activity-view .stat-card-balance .summary-range-bound,
[data-theme="gold"] .activity-view .stat-card-balance .stat-range-arrow,
[data-theme="gold"] .activity-view .stat-card-balance .activity-metric-label,
[data-theme="gold"] .activity-view .stat-card-balance .activity-metric-value,
[data-theme="gold"] .activity-view .activity-search-row .search-container .search-input,
[data-theme="gold"] .activity-view .stat-card-balance .stat-range-field-head,
[data-theme="gold"] .activity-view .stat-card-balance .stat-range-preview {
  color: #14120D;
}

:root:not([data-theme]) .crypto-balance-card .crypto-balance-eyebrow,
:root:not([data-theme]) .crypto-balance-card .crypto-balance-note,
:root:not([data-theme]) .assets-balance-card .assets-balance-eyebrow,
:root:not([data-theme]) .assets-balance-card .assets-balance-note,
:root:not([data-theme]) .assets-balance-card .assets-balance-action-btn,
:root:not([data-theme]) .contacts-balance-card .contacts-balance-label,
:root:not([data-theme]) .contacts-balance-card .balance-rollup-badge,
:root:not([data-theme]) .contact-tx-summary .trust-stat-label,
:root:not([data-theme]) .activity-view .stat-card-balance .activity-summary-label,
:root:not([data-theme]) .activity-view .stat-card-balance .summary-scope-line,
:root:not([data-theme]) .activity-view .stat-card-balance .summary-suffix,
:root:not([data-theme]) .activity-view .stat-card-balance .summary-range-bound,
:root:not([data-theme]) .activity-view .stat-card-balance .stat-range-arrow,
:root:not([data-theme]) .activity-view .stat-card-balance .activity-metric-label,
:root:not([data-theme]) .activity-view .activity-search-row .search-container .search-input::placeholder,
:root:not([data-theme]) .activity-view .activity-search-row .search-container .search-icon,
[data-theme="gold"] .crypto-balance-card .crypto-balance-eyebrow,
[data-theme="gold"] .crypto-balance-card .crypto-balance-note,
[data-theme="gold"] .assets-balance-card .assets-balance-eyebrow,
[data-theme="gold"] .assets-balance-card .assets-balance-note,
[data-theme="gold"] .assets-balance-card .assets-balance-action-btn,
[data-theme="gold"] .contacts-balance-card .contacts-balance-label,
[data-theme="gold"] .contacts-balance-card .balance-rollup-badge,
[data-theme="gold"] .contact-tx-summary .trust-stat-label,
[data-theme="gold"] .activity-view .stat-card-balance .activity-summary-label,
[data-theme="gold"] .activity-view .stat-card-balance .summary-scope-line,
[data-theme="gold"] .activity-view .stat-card-balance .summary-suffix,
[data-theme="gold"] .activity-view .stat-card-balance .summary-range-bound,
[data-theme="gold"] .activity-view .stat-card-balance .stat-range-arrow,
[data-theme="gold"] .activity-view .stat-card-balance .activity-metric-label,
[data-theme="gold"] .activity-view .activity-search-row .search-container .search-input::placeholder,
[data-theme="gold"] .activity-view .activity-search-row .search-container .search-icon {
  opacity: 1;
  color: rgba(20, 18, 13, 0.64);
}

:root:not([data-theme]) .activity-view .stat-card-balance .activity-metric-value.positive,
[data-theme="gold"] .activity-view .stat-card-balance .activity-metric-value.positive,
:root:not([data-theme]) .contact-tx-summary .trust-stat-value.positive,
[data-theme="gold"] .contact-tx-summary .trust-stat-value.positive {
  color: var(--success);
}

:root:not([data-theme]) .activity-view .stat-card-balance .activity-metric-value.negative,
[data-theme="gold"] .activity-view .stat-card-balance .activity-metric-value.negative,
:root:not([data-theme]) .contact-tx-summary .trust-stat-value.negative,
[data-theme="gold"] .contact-tx-summary .trust-stat-value.negative {
  color: var(--error);
}

:root:not([data-theme]) .activity-view .stat-card-balance .stat-range-panel,
[data-theme="gold"] .activity-view .stat-card-balance .stat-range-panel {
  border-top-color: rgba(20, 18, 13, 0.12);
}

:root:not([data-theme]) .activity-view .stat-card-balance .stat-range-field,
[data-theme="gold"] .activity-view .stat-card-balance .stat-range-field {
  color: rgba(20, 18, 13, 0.64);
}

:root:not([data-theme]) .activity-view .stat-card-balance .stat-range-field input,
[data-theme="gold"] .activity-view .stat-card-balance .stat-range-field input {
  border: 1px solid var(--gold-300);
  background: transparent;
  color: #14120D;
}

:root:not([data-theme]) .activity-view .stat-card-balance .stat-summary-chops,
[data-theme="gold"] .activity-view .stat-card-balance .stat-summary-chops {
  border-top-color: rgba(20, 18, 13, 0.12);
  border-bottom-color: rgba(20, 18, 13, 0.12);
}

:root:not([data-theme]) .activity-view .stat-card-balance .stat-summary-chops-label,
[data-theme="gold"] .activity-view .stat-card-balance .stat-summary-chops-label {
  color: rgba(20, 18, 13, 0.64);
}

:root:not([data-theme]) .activity-view .stat-card-balance .stat-range-chip,
[data-theme="gold"] .activity-view .stat-card-balance .stat-range-chip {
  border: 1px solid rgba(20, 18, 13, 0.28);
  background: transparent;
  color: rgba(20, 18, 13, 0.64);
}

:root:not([data-theme]) .activity-view .stat-card-balance .stat-range-chip.active,
[data-theme="gold"] .activity-view .stat-card-balance .stat-range-chip.active {
  background: var(--gold-800);
  border: 2px solid #000;
  color: #ffffff;
}


:root:not([data-theme]) .shared-search-filters .search-container,
:root:not([data-theme]) .shared-search-filters .search-container.is-expanded,
:root:not([data-theme]) .shared-search-filters .search-container:focus-within,
:root:not([data-theme]) .shared-search-filters .search-side-toggle,
:root:not([data-theme]) .crypto-search-shell,
:root:not([data-theme]) .crypto-search-shell:focus-within,
[data-theme="gold"] .shared-search-filters .search-container,
[data-theme="gold"] .shared-search-filters .search-container.is-expanded,
[data-theme="gold"] .shared-search-filters .search-container:focus-within,
[data-theme="gold"] .shared-search-filters .search-side-toggle,
[data-theme="gold"] .crypto-search-shell,
[data-theme="gold"] .crypto-search-shell:focus-within {
  background: transparent;
  border: 1px solid var(--gold-300) !important;
  box-shadow: none;
  position: relative;
  border: none !important;
  left: -8px;
  margin-bottom: var(--space-2) !important;
}

:root:not([data-theme]) .shared-search-filters .search-side-toggle,
[data-theme="gold"] .shared-search-filters .search-side-toggle {
  left: 0;
  margin-bottom: 0 !important;
  color: var(--list-search-icon);
}

:root:not([data-theme]) .activity-view .activity-search-row .search-container .activity-filters,
[data-theme="gold"] .activity-view .activity-search-row .search-container .activity-filters {
  background: transparent;
}

:root:not([data-theme]) .activity-view .activity-search-row .search-container .filter-slider-bg,
[data-theme="gold"] .activity-view .activity-search-row .search-container .filter-slider-bg {
  background: var(--gold-800);
  border: none;
  box-shadow: none;
}

:root:not([data-theme]) .activity-view .activity-search-row .search-container .filter-tab,
[data-theme="gold"] .activity-view .activity-search-row .search-container .filter-tab {
  color: rgba(20, 18, 13, 0.64);
}

:root:not([data-theme]) .activity-view .activity-search-row .search-container .filter-tab.active,
[data-theme="gold"] .activity-view .activity-search-row .search-container .filter-tab.active {
  color: #ffffff;
}

:root:not([data-theme]) .activity-view .activity-search-row .search-container .filter-count-badge,
:root:not([data-theme]) .activity-view .activity-search-row .search-container .search-clear,
[data-theme="gold"] .activity-view .activity-search-row .search-container .filter-count-badge,
[data-theme="gold"] .activity-view .activity-search-row .search-container .search-clear {
  background: rgba(20, 18, 13, 0.08);
  border-color: rgba(20, 18, 13, 0.12);
  color: rgba(20, 18, 13, 0.74);
}

:root:not([data-theme]) .contacts-view .contacts-balance-card .contacts-balance-qr,
[data-theme="gold"] .contacts-view .contacts-balance-card .contacts-balance-qr {
  background: #ffffff;
  border: 1px solid var(--gold-300);
  color: #14120D;
  box-shadow: 0 8px 18px rgba(122, 95, 22, 0.1);
}

:root:not([data-theme]) .crypto-balance-card .crypto-period-selector,
[data-theme="gold"] .crypto-balance-card .crypto-period-selector {
  background: transparent;
  border: 1px solid var(--gold-300);
}

:root:not([data-theme]) .crypto-balance-card .crypto-period-tab,
[data-theme="gold"] .crypto-balance-card .crypto-period-tab {
  color: rgba(20, 18, 13, 0.64);
}

:root:not([data-theme]) .crypto-balance-card .crypto-period-tab.active,
[data-theme="gold"] .crypto-balance-card .crypto-period-tab.active {
  background: var(--gold-800);
  border: 3px solid #000;
  color: #ffffff;
  box-shadow: none;
}

:root:not([data-theme]) .crypto-balance-card .crypto-period-note-separator,
[data-theme="gold"] .crypto-balance-card .crypto-period-note-separator {
  color: rgba(20, 18, 13, 0.38);
}

:root:not([data-theme]) .profile-view .assets-search-shell,
:root:not([data-theme]) .profile-view .assets-search-shell.is-expanded,
:root:not([data-theme]) .profile-view .assets-search-shell:focus-within,
:root:not([data-theme]) .profile-view .assets-search-filters,
[data-theme="gold"] .profile-view .assets-search-shell,
[data-theme="gold"] .profile-view .assets-search-shell.is-expanded,
[data-theme="gold"] .profile-view .assets-search-shell:focus-within,
[data-theme="gold"] .profile-view .assets-search-filters {
  background: var(--gold-100);
}

:root:not([data-theme]) .profile-view .assets-search-input,
[data-theme="gold"] .profile-view .assets-search-input {
  color: #14120D;
}

:root:not([data-theme]) .profile-view .assets-search-input::placeholder,
:root:not([data-theme]) .profile-view .assets-search-icon,
[data-theme="gold"] .profile-view .assets-search-input::placeholder,
[data-theme="gold"] .profile-view .assets-search-icon {
  color: rgba(20, 18, 13, 0.64);
}

:root:not([data-theme]) .profile-view :is(#assets-balance-section, .assets-balance-section),
[data-theme="gold"] .profile-view :is(#assets-balance-section, .assets-balance-section) {
  background:
    radial-gradient(ellipse 80% 120% at 86% 50%, rgba(232, 213, 176, 0.26), transparent 52%),
    repeating-linear-gradient(
      150deg,
      rgba(166, 133, 33, 0.058) 0,
      rgba(166, 133, 33, 0.058) 1px,
      transparent 1px,
      transparent 9px
    ),
    #FEFDFB;
  border-color: var(--gold-300) !important;
  color: #14120D;
}

:root:not([data-theme]) .profile-view .assets-compact-total-row,
:root:not([data-theme]) .profile-view .assets-balance-card.dark-section-shell,
[data-theme="gold"] .profile-view .assets-compact-total-row,
[data-theme="gold"] .profile-view .assets-balance-card.dark-section-shell {
  background:
    radial-gradient(ellipse 80% 120% at 86% 50%, rgba(232, 213, 176, 0.26), transparent 52%),
    repeating-linear-gradient(
      150deg,
      rgba(166, 133, 33, 0.058) 0,
      rgba(166, 133, 33, 0.058) 1px,
      transparent 1px,
      transparent 9px
    ),
    #FEFDFB;
  border: 1px solid var(--gold-300);
  color: #14120D;
  box-shadow: none;
}

:root:not([data-theme]) .profile-view .assets-compact-total-label,
:root:not([data-theme]) .profile-view .assets-compact-total-value,
:root:not([data-theme]) .profile-view .assets-balance-card .assets-balance-total,
[data-theme="gold"] .profile-view .assets-compact-total-label,
[data-theme="gold"] .profile-view .assets-compact-total-value,
[data-theme="gold"] .profile-view .assets-balance-card .assets-balance-total {
  color: #14120D;
}

:root:not([data-theme]) .profile-view .assets-balance-card .assets-balance-eyebrow,
:root:not([data-theme]) .profile-view .assets-balance-card .assets-balance-note,
:root:not([data-theme]) .profile-view .assets-balance-card .assets-balance-action-btn,
[data-theme="gold"] .profile-view .assets-balance-card .assets-balance-eyebrow,
[data-theme="gold"] .profile-view .assets-balance-card .assets-balance-note,
[data-theme="gold"] .profile-view .assets-balance-card .assets-balance-action-btn {
  color: rgba(20, 18, 13, 0.64);
}

[data-theme="silver"] :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell,
[data-theme="silver"] .activity-view .stat-card.stat-card-balance.dark-section-shell {
  background:
    radial-gradient(ellipse 80% 120% at 86% 50%, rgba(209, 211, 213, 0.225), transparent 52%),
    repeating-linear-gradient(
      150deg,
      rgba(129, 137, 148, 0.056) 0,
      rgba(129, 137, 148, 0.056) 1px,
      transparent 1px,
      transparent 9px
    ),
    #ffffff;
  border: 1px solid var(--gold-300);
  color: #0b0f14;
}

[data-theme="silver"] :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell::before,
[data-theme="silver"] :is(.contacts-balance-card, .crypto-balance-card, .assets-balance-card, .contact-tx-summary).dark-section-shell::after,
[data-theme="silver"] .activity-view .stat-card.stat-card-balance.dark-section-shell::before,
[data-theme="silver"] .activity-view .stat-card.stat-card-balance.dark-section-shell::after {
  content: none;
}

[data-theme="silver"] .crypto-balance-card .crypto-balance-total,
[data-theme="silver"] .crypto-balance-card .crypto-balance-eyebrow,
[data-theme="silver"] .crypto-balance-card .crypto-balance-note,
[data-theme="silver"] .assets-balance-card .assets-balance-total,
[data-theme="silver"] .assets-balance-card .assets-balance-eyebrow,
[data-theme="silver"] .assets-balance-card .assets-balance-note,
[data-theme="silver"] .assets-balance-card .assets-balance-action-btn,
[data-theme="silver"] .contacts-balance-card .contacts-balance-amount,
[data-theme="silver"] .contacts-balance-card .contacts-balance-label,
[data-theme="silver"] .contacts-balance-card .balance-rollup-badge,
[data-theme="silver"] .contact-tx-summary .trust-stat-value,
[data-theme="silver"] .contact-tx-summary .contact-collapse-chevron,
[data-theme="silver"] .activity-view .stat-card-balance .activity-summary-label,
[data-theme="silver"] .activity-view .stat-card-balance .summary-scope-line,
[data-theme="silver"] .activity-view .stat-card-balance .summary-suffix,
[data-theme="silver"] .activity-view .stat-card-balance .summary-range-bound,
[data-theme="silver"] .activity-view .stat-card-balance .stat-range-arrow,
[data-theme="silver"] .activity-view .stat-card-balance .activity-metric-label,
[data-theme="silver"] .activity-view .stat-card-balance .activity-metric-value,
[data-theme="silver"] .activity-view .activity-search-row .search-container .search-input,
[data-theme="silver"] .activity-view .stat-card-balance .stat-range-field-head,
[data-theme="silver"] .activity-view .stat-card-balance .stat-range-preview {
  color: #0b0f14;
}

[data-theme="silver"] .crypto-balance-card .crypto-balance-eyebrow,
[data-theme="silver"] .crypto-balance-card .crypto-balance-note,
[data-theme="silver"] .assets-balance-card .assets-balance-eyebrow,
[data-theme="silver"] .assets-balance-card .assets-balance-note,
[data-theme="silver"] .assets-balance-card .assets-balance-action-btn,
[data-theme="silver"] .contacts-balance-card .contacts-balance-label,
[data-theme="silver"] .contacts-balance-card .balance-rollup-badge,
[data-theme="silver"] .contact-tx-summary .trust-stat-label,
[data-theme="silver"] .activity-view .stat-card-balance .activity-summary-label,
[data-theme="silver"] .activity-view .stat-card-balance .summary-scope-line,
[data-theme="silver"] .activity-view .stat-card-balance .summary-suffix,
[data-theme="silver"] .activity-view .stat-card-balance .summary-range-bound,
[data-theme="silver"] .activity-view .stat-card-balance .stat-range-arrow,
[data-theme="silver"] .activity-view .stat-card-balance .activity-metric-label,
[data-theme="silver"] .activity-view .activity-search-row .search-container .search-input::placeholder,
[data-theme="silver"] .activity-view .activity-search-row .search-container .search-icon {
  opacity: 1;
  color: rgba(11, 15, 20, 0.62);
}

[data-theme="silver"] .activity-view .stat-card-balance .activity-metric-value.positive {
  color: var(--success);
}

[data-theme="silver"] .activity-view .stat-card-balance .activity-metric-value.negative {
  color: var(--error);
}

[data-theme="silver"] .contact-tx-summary .trust-stat-value.positive {
  color: var(--success);
}

[data-theme="silver"] .contact-tx-summary .trust-stat-value.negative {
  color: var(--error);
}

[data-theme="silver"] .activity-view .stat-card-balance .stat-range-panel {
  border-top-color: rgba(11, 15, 20, 0.12);
}

[data-theme="silver"] .activity-view .stat-card-balance .stat-range-field {
  color: rgba(11, 15, 20, 0.62);
}

[data-theme="silver"] .activity-view .stat-card-balance .stat-range-field input {
  border: 1px solid var(--gold-300);
  background: transparent;
  color: #0b0f14;
}

[data-theme="silver"] .activity-view .stat-card-balance .stat-summary-chops {
  border-top-color: rgba(11, 15, 20, 0.12);
  border-bottom-color: rgba(11, 15, 20, 0.12);
}

[data-theme="silver"] .activity-view .stat-card-balance .stat-summary-chops-label {
  color: rgba(11, 15, 20, 0.62);
}

[data-theme="silver"] .activity-view .stat-card-balance .stat-range-chip {
  border: 1px solid rgba(11, 15, 20, 0.28);
  background: transparent;
  color: rgba(11, 15, 20, 0.62);
}

[data-theme="silver"] .activity-view .stat-card-balance .stat-range-chip.active {
  background: var(--gold-800);
  border: 2px solid #000;
  color: #ffffff;
}


[data-theme="silver"] .shared-search-filters .search-input {
  font-size: 18px;
}

[data-theme="silver"] .shared-search-filters .search-container,
[data-theme="silver"] .shared-search-filters .search-container.is-expanded,
[data-theme="silver"] .shared-search-filters .search-container:focus-within,
[data-theme="silver"] .shared-search-filters .search-side-toggle,
[data-theme="silver"] .crypto-search-shell,
[data-theme="silver"] .crypto-search-shell:focus-within {
  background: transparent;
  border: 1px solid var(--gold-300) !important;
  box-shadow: none;
  position: relative;
  border: none !important;
  left: -8px;
  margin-bottom: var(--space-2) !important;
}

[data-theme="silver"] .shared-search-filters .search-side-toggle {
  left: 0;
  margin-bottom: 0 !important;
  color: var(--list-search-icon);
}

[data-theme="silver"] .activity-view .activity-search-row .search-container .activity-filters {
  background: transparent;
}

[data-theme="silver"] .activity-view .activity-search-row .search-container .filter-slider-bg {
  background: var(--gold-800);
  border: none;
  box-shadow: none;
}

[data-theme="silver"] .activity-view .activity-search-row .search-container .filter-tab {
  color: rgba(11, 15, 20, 0.62);
}

[data-theme="silver"] .activity-view .activity-search-row .search-container .filter-tab.active {
  color: #ffffff;
}

[data-theme="silver"] .activity-view .activity-search-row .search-container .filter-count-badge,
[data-theme="silver"] .activity-view .activity-search-row .search-container .search-clear {
  background: rgba(11, 15, 20, 0.08);
  border-color: rgba(11, 15, 20, 0.12);
  color: rgba(11, 15, 20, 0.74);
}

[data-theme="silver"] .contacts-view .contacts-balance-card .contacts-balance-qr {
  background: #ffffff;
  border: 1px solid var(--gold-300);
  color: #0b0f14;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
}

[data-theme="silver"] .crypto-balance-card .crypto-period-selector {
  background: transparent;
  border: 1px solid var(--gold-300);
}

[data-theme="silver"] .crypto-balance-card .crypto-period-tab {
  color: rgba(11, 15, 20, 0.62);
}

[data-theme="silver"] .crypto-balance-card .crypto-period-tab.active {
  background: var(--gold-800);
  border: 3px solid #000;
  color: #ffffff;
  box-shadow: none;
}

[data-theme="silver"] .crypto-balance-card .crypto-period-note-separator {
  color: rgba(11, 15, 20, 0.38);
}

[data-theme="silver"] .profile-view .assets-search-shell,
[data-theme="silver"] .profile-view .assets-search-shell.is-expanded,
[data-theme="silver"] .profile-view .assets-search-shell:focus-within,
[data-theme="silver"] .profile-view .assets-search-filters {
  background: var(--gold-100);
}

[data-theme="silver"] .profile-view .assets-search-input {
  color: #0b0f14;
}

[data-theme="silver"] .profile-view .assets-search-input::placeholder,
[data-theme="silver"] .profile-view .assets-search-icon {
  color: rgba(11, 15, 20, 0.62);
}

[data-theme="silver"] .profile-view :is(#assets-balance-section, .assets-balance-section) {
  background:
    radial-gradient(ellipse 80% 120% at 86% 50%, rgba(209, 211, 213, 0.225), transparent 52%),
    repeating-linear-gradient(
      150deg,
      rgba(129, 137, 148, 0.056) 0,
      rgba(129, 137, 148, 0.056) 1px,
      transparent 1px,
      transparent 9px
    ),
    #ffffff;
  border-color: var(--gold-300) !important;
  color: #0b0f14;
}

[data-theme="silver"] .profile-view .assets-compact-total-row,
[data-theme="silver"] .profile-view .assets-balance-card.dark-section-shell {
  background:
    radial-gradient(ellipse 80% 120% at 86% 50%, rgba(209, 211, 213, 0.225), transparent 52%),
    repeating-linear-gradient(
      150deg,
      rgba(129, 137, 148, 0.056) 0,
      rgba(129, 137, 148, 0.056) 1px,
      transparent 1px,
      transparent 9px
    ),
    #ffffff;
  border: 1px solid var(--gold-300);
  color: #0b0f14;
  box-shadow: none;
}

[data-theme="silver"] .profile-view .assets-compact-total-label,
[data-theme="silver"] .profile-view .assets-compact-total-value,
[data-theme="silver"] .profile-view .assets-balance-card .assets-balance-total {
  color: #0b0f14;
}

[data-theme="silver"] .profile-view .assets-balance-card .assets-balance-eyebrow,
[data-theme="silver"] .profile-view .assets-balance-card .assets-balance-note,
[data-theme="silver"] .profile-view .assets-balance-card .assets-balance-action-btn {
  color: rgba(11, 15, 20, 0.62);
}

[data-theme="silver"] .profile-view .assets-allocation-card {
  background: #ffffff;
  border-color: transparent;
  box-shadow: none;
}

/* Hoisted from contact-dark-shell.css for direct-entry safety */
.contact-header.dark-section-shell .contact-name-large {
  color: #ffffff;
}

.contact-header.dark-section-shell .contact-meta-large {
  color: rgba(255, 255, 255, 0.72);
}

.contact-header.dark-section-shell .contact-type-badge {
  background: rgba(255, 255, 255, 0.16);
  color: rgba(255, 255, 255, 0.9);
}

.contact-header.dark-section-shell .contact-header-details {
  border-top-color: rgba(255, 255, 255, 0.14);
}

.contact-header.dark-section-shell .contact-header-details-toggle {
  color: rgba(255, 255, 255, 0.7);
}

.contact-header.dark-section-shell .contact-detail-label {
  color: rgba(255, 255, 255, 0.58);
}

.contact-header.dark-section-shell .contact-detail-value {
  color: rgba(255, 255, 255, 0.9);
}

.contact-header.dark-section-shell .badge {
  border: 1px solid currentColor;
}

.contact-header.dark-section-shell .contact-message-btn--inline {
  background: rgba(220, 220, 220, 0);
  border: 1px solid rgba(255, 255, 255, 0.38);
  color: rgba(255, 255, 255, 0.92);
}

@media (hover: hover) and (pointer: fine) {
  .contact-header.dark-section-shell .contact-message-btn--inline:hover {
  background: rgba(224, 224, 224, 0.12);
  border-color: rgba(255, 255, 255, 0.5);
  color: #ffffff;

  }
}


/* Shared dark transaction summary shell */
.contact-tx-summary.dark-section-shell {
  background: var(--dark-section-bg);
  border: 1px solid #1f2430;
  _box-shadow:
    0 4px 8px rgba(23, 31, 45, 0.42),
    0 8px 18px rgba(8, 10, 14, 0.08);
  border-radius: var(--radius-full);
  padding: var(--space-5) var(--space-6);
  overflow: hidden;
}

.contact-tx-summary.dark-section-shell .trust-stat-value {
  color: #ffffff;
  font-weight: 700;
  line-height: 1;
}

.contact-tx-summary.dark-section-shell .trust-stat-value.positive {
  color: var(--success);
}

.contact-tx-summary.dark-section-shell .trust-stat-value.negative {
  color: var(--error);
}

.contact-tx-summary.dark-section-shell .trust-stat-value.is-shuffling {
  filter: blur(1.4px);
  transform: translateY(-1px) scale(1.03);
  letter-spacing: 0.7px;
}

.contact-tx-summary.dark-section-shell .trust-stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.72);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.contact-tx-summary.dark-section-shell .trust-stats {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.contact-tx-summary.dark-section-shell .trust-stat {
  flex: 1 1 0;
  text-align: center;
}

.contact-tx-summary.dark-section-shell .stat-digit {
  display: inline-block;
  min-width: 0.3em;
}

.contact-tx-summary.dark-section-shell .stat-digit.changed {
  animation: statDigitSettle 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--d, 0) * 20ms);
}

/* Contacts stats bar layout + typography */
.contacts-view .stats-bar {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
  margin-top: var(--space-3);
  border-radius: var(--radius-xl);
}

/* Default .dark-section-shell uses overflow:hidden; allow stats row + labels to breathe */
.contacts-view .stats-bar.dark-section-shell {
  overflow: visible;
}

/* Contacts: compact search + My Contacts / All Users (shared defaults are tall + 16px type) */
.shared-search-filters .search-container {
  padding: var(--space-2) 4px;
  margin: var(--space-3) 0;
  margin-top: 0;
  max-height: none;
  overflow: visible;
}

.shared-search-filters .search-container:not(.is-expanded) .contacts-filters {
  display: none;
}

.shared-search-filters .search-container.is-expanded {
  padding-bottom: 3px;
}

.shared-search-filters .search-container.is-expanded .contacts-filters {
  display: flex;
  opacity: 1;
  pointer-events: auto;
  overflow: visible;
  margin-top: 3px;
  padding: 2px 2px 3px;
  border-radius: 9px;
}

.shared-search-filters .search-input {
  padding: 5px 10px 5px 32px;
  font-size: 18px;
  line-height: 1.25;
}

.shared-search-filters .search-container { /* joe */
  border-radius: 16px;
  position: relative;
  left: 0px;
  _border: 1px solid var(--gold-300) !important;
  margin-bottom: var(--space-3);
}

[data-theme="dark"] .shared-search-filters .search-input {
  color: rgba(248, 250, 252, 0.94);
}

[data-theme="dark"] .shared-search-filters .search-input::placeholder {
  color: rgba(226, 232, 240, 0.58);
}

[data-theme="dark"] .shared-search-filters .search-icon {
  color: rgba(226, 232, 240, 0.68);
}

.shared-search-filters .search-icon {
  left: 10px;
  width: 15px;
  height: 15px;
}

.shared-search-filters .filter-slider-bg {
  top: 2px;
  left: 2px;
  height: calc(100% - 4px);
  border-radius: 7px;
}

.shared-search-filters .filter-tab {
  padding: 4px 8px;
  font-size: 12px;
  line-height: 1.15;
}

.contacts-view .stat {
  flex: 1;
  background: transparent;
  border: none;
  border-radius: var(--radius-lg);
  padding: 8px 10px;
  text-align: center;
}

.contacts-view .stat-value {
  display: block;
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
}

.contacts-view .stat-label {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.78);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Ensure balance shell wins over generic .stat-card styling */
.activity-view .stat-card.dark-section-shell {
  background: var(--dark-section-bg);
  border: 1px solid #1f2430;
  _box-shadow:
    0 4px 8px rgba(23, 31, 45, 0.42),
    0 8px 18px rgba(8, 10, 14, 0.08);
}

.activity-view .stat-card.dark-section-shell::before {
 display: none;
}

/* Activity balance card ownership is centralized here */
.activity-view .activity-summary-label {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 1);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding-bottom: var(--space-1);
}

.activity-view .stat-card {
  background: rgba(255, 255, 255, 0.95);
  border: 0 solid #d8deea;
  border-radius: var(--radius-lg);
  padding: var(--space-3);
}

.activity-view .stat-card-balance {
  _padding: var(--space-3) var(--space-6) var(--space-2);
  padding-bottom: 8px;
}

.activity-view .stat-card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 4px;
}

.activity-view .stat-range-arrow {
  opacity: 0.82;
  font-size: 18px;
  position: relative;
  top: 0;
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1;
  transition: transform 180ms ease, opacity 180ms ease;
}

.activity-view .stat-card-balance.is-range-expanded .stat-range-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.activity-view .stat-range-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin-top: 0;
  transition: max-height 1460ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease, margin-top 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

.activity-view .stat-card-balance.is-range-expanded .stat-range-panel {
  margin-top: 12px;
  max-height: 320px;
  opacity: 1;
  pointer-events: auto;
}

.activity-view .activity-search-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 var(--space-3);
}

.activity-view .activity-search-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.activity-view .activity-search-input-row .search-container {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.activity-view .activity-search-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-view .activity-search-stack.has-active-filters {
  gap: 8px;
}

.activity-view .activity-search-stack.has-active-filters .activity-search-filters {
  max-height: 160px;
  opacity: 1;
  pointer-events: auto;
}

.activity-view .activity-search-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    max-height 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms ease;
}

.activity-view .activity-search-row.is-search-filters-open {
  overflow: hidden;
}

.activity-view .activity-search-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(128, 143, 164, 0.18);
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  padding: 8px 10px 8px 12px;
  font-size: 12px;
  line-height: 1.2;
}

.activity-view .activity-search-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-view .activity-search-chip-clear {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(128, 143, 164, 0.2);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: rgba(17, 24, 39, 0.72);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.activity-view .search-container .activity-filters {
  display: none !important;
}


.activity-view .stat-range-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.activity-view .stat-range-field {
  display: flex;
  flex-direction: column;
  font-size: 10px;
  color: rgba(255, 255, 255, 0.8);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.activity-view .stat-range-field-head {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  font-weight: 900;
}

.activity-view .stat-range-preview {
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-transform: none;
  color: rgba(255, 255, 255, 0.6);
}

.activity-view .stat-range-field input {
  border: 1px solid rgba(255, 255, 255, 0.28);
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 13px;
  padding: 8px 12px;
  margin: 4px -2px 0;
  outline: none;
}

.activity-view .stat-range-field input:focus {
  border-color: rgba(255, 255, 255, 0.58);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.08);
}

.activity-view .stat-range-presets {
  margin-top: 10px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.activity-view .stat-summary-chops {
  margin-top: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  border-bottom: 1px solid rgba(255, 255, 255, 0.25);
  margin-left: -10px;
  margin-right: -10px;
  padding: 0 10px;
  opacity: 60%;
}

.activity-view .stat-summary-chops:not(.is-visible) {
  display: none;
}

.activity-view .stat-summary-chops-label {
  flex: 0 0 auto;
  padding: 12px 0;
  font-size: 10px;
  font-weight: 900;
  color: rgba(255, 255, 255, 0.62);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.activity-view .stat-summary-chops-options {
  display: flex;
  flex: 1 1 auto;
  align-items: center;
  justify-content: stretch;
  gap: 8px;
  min-width: 0;
}

.activity-view .stat-summary-chops-options .stat-range-chip {
  flex: 1 1 0;
  text-align: center;
}

.activity-view .stat-range-chip {
  border: 1px solid rgba(255, 255, 255, 0.35);
  background: transparent;
  color: rgba(255, 255, 255, 0.82);
  border-radius: 8px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
  cursor: pointer;
}

.activity-view .stat-range-chip.active {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.72);
  color: #fff;
}

.activity-summary-toolbar {
  --activity-summary-toolbar-height: 52px;
  position: fixed !important;
  top: auto;
  left: max(var(--safe-left), calc((100vw - 430px) / 2));
  right: auto;
  bottom: calc(var(--app-mobile-nav-height) - 1px);
  width: min(430px, calc(100vw - var(--safe-left) - var(--safe-right)));
  max-width: calc(100vw - var(--safe-left) - var(--safe-right));
  box-sizing: border-box;
  margin: 0;
  padding: 10px 16px;
  padding-left: calc(var(--safe-left) + var(--space-4));
  padding-right: calc(var(--safe-right) + var(--space-4));
  background: #ffffff;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  z-index: 999;
  transform: none;
  translate: 0 0;
}

.activity-summary-toolbar.is-animating-in {
  animation: activitySummaryToolbarSlideUp 0.42s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes activitySummaryToolbarSlideUp {
  from {
    transform: translate3d(0, calc(100% + 12px), 0);
    opacity: 0;
  }
  to {
    transform: translate3d(0, 0, 0);
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .activity-summary-toolbar.is-animating-in {
    animation: none;
  }
}

.activity-summary-toolbar[hidden] {
  display: none !important;
}

[data-theme="soft"] .activity-summary-toolbar {
  background: #ffffff;
  border-top-color: rgba(128, 143, 164, 0.16);
  box-shadow:
    0 -4px 12px rgba(128, 143, 164, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

[data-theme="dark"] .activity-summary-toolbar {
  background: var(--bg-primary);
  border-top-color: var(--border-default);
}

.view:has(> .activity-view) {
  padding-bottom: calc(
    var(--app-mobile-nav-height)
    + var(--activity-summary-toolbar-height, 52px)
    + var(--space-2)
  );
}

@media (min-width: 768px) {
  .activity-summary-toolbar {
    left: max(var(--space-8), calc((100vw - min(1200px, 100vw)) / 2 + var(--space-8)));
    width: min(
      1200px - (2 * var(--space-8)),
      calc(100vw - (2 * max(var(--space-8), calc((100vw - min(1200px, 100vw)) / 2 + var(--space-8)))))
    );
    max-width: none;
    bottom: 0;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }

  .view:has(> .activity-view) {
    padding-bottom: calc(var(--activity-summary-toolbar-height, 52px) + var(--space-4));
  }
}

.activity-summary-toolbar .activity-summary-by {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-summary-toolbar .activity-summary-by-label {
  flex: 0 0 auto;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.activity-summary-toolbar .activity-summary-by-options {
  display: flex;
  flex: 1 1 auto;
  justify-content: flex-end;
  gap: 8px;
}

.activity-summary-toolbar .activity-summary-chip {
  border: 1px solid var(--border-subtle);
  background: var(--bg-secondary);
  color: var(--text-primary);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 11px;
  font-weight: 300;
  line-height: 1.2;
  cursor: pointer;
  flex: auto;
}

.activity-summary-toolbar .activity-summary-chip.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-primary);
}

.activity-view .activity-filter-person {
  margin: 0 0 12px;
  padding: 0 2px;
}

.activity-view .activity-filter-person-label {
  margin-bottom: 8px;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
}

.activity-view .activity-filter-person .transaction-item {
  padding: 0;
  cursor: default;
}

.activity-view .summary-rollup-sheet {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-glass-strong);
  margin-bottom: 12px;
}

.activity-view .summary-rollup-table-head,
.activity-view .summary-rollup-row {
  display: grid;
  grid-template-columns:
    minmax(7.5rem, 1.35fr)
    minmax(3.2rem, 0.55fr)
    minmax(5.5rem, 1fr)
    minmax(3.2rem, 0.55fr)
    minmax(5.5rem, 1fr)
    minmax(5.5rem, 1fr);
  align-items: center;
}

.activity-view .summary-rollup-table-head {
  padding: 0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: none;
  padding-top: 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-view .summary-rollup-table-head .summary-rollup-col {
  padding: 7px 10px;
}

.activity-view .summary-rollup-row {
  min-height: 42px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .activity-view .summary-rollup-row:hover {
    background: color-mix(in srgb, var(--text-primary) 4%, transparent);
  }
}

.activity-view .summary-rollup-entry:last-child .summary-rollup-row {
  border-bottom: 0;
}

.activity-view .summary-rollup-col,
.activity-view .summary-rollup-cell {
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
}

.activity-view .summary-rollup-col--period {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
  text-align: left;
}

.activity-view .summary-rollup-period-btn {
  appearance: none;
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 2px 10px;
  margin: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  text-decoration: none;
}

.activity-view .summary-rollup-period-btn:hover,
.activity-view .summary-rollup-period-btn:focus-visible {
  text-decoration: none;
  outline: none;
}

.activity-view .summary-rollup-row.is-period-selected {
  background: color-mix(in srgb, var(--text-primary, #111) 6%, transparent);
  border-radius: 0px;
}

.activity-view .summary-rollup-col--count,
.activity-view .summary-rollup-col--amount,
.activity-view .summary-rollup-col--net,
.activity-view .summary-rollup-cell {
  text-align: right;
}

.activity-view .summary-rollup-cell {
  border: 0;
  background: transparent;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
  transition: background-color 0.16s ease;
}

.activity-view .summary-rollup-cell.is-empty {
  cursor: default;
  pointer-events: none;
}

.activity-view .summary-rollup-cell.is-expanded {
  background: var(--gold-300);
}

.activity-view .summary-rollup-amount {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.activity-view .summary-rollup-amount.is-shuffling {
  filter: blur(1.2px);
  transform: translateY(-1px) scale(1.02);
  letter-spacing: 0.6px;
}

.activity-view .summary-rollup-cell--debit .summary-rollup-amount {
  color: #b42318;
}

.activity-view .summary-rollup-cell--credit .summary-rollup-amount {
  color: var(--success);
}

.activity-view .summary-rollup-amount--net.positive {
  color: var(--success);
}

.activity-view .summary-rollup-amount--net.negative {
  color: #b42318;
}

.activity-view .summary-rollup-drilldown {
  margin: 0;
  padding: 4px 8px 8px;
  border-top: 1px dashed var(--border-subtle);
  background: rgba(255, 255, 255, 0.35);
}

@media (max-width: 767px) {
  .activity-view .summary-rollup-sheet {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .activity-view .summary-rollup-table-head,
  .activity-view .summary-rollup-row {
    min-width: 17.5rem;
    grid-template-columns:
      minmax(6.25rem, 1.15fr)
      minmax(5.75rem, 1fr)
      minmax(5.75rem, 1fr);
  }

  .activity-view .summary-rollup-table-head > :nth-child(2),
  .activity-view .summary-rollup-table-head > :nth-child(4),
  .activity-view .summary-rollup-table-head > :nth-child(6),
  .activity-view .summary-rollup-row > :nth-child(2),
  .activity-view .summary-rollup-row > :nth-child(4),
  .activity-view .summary-rollup-row > :nth-child(6) {
    display: none;
  }

  .activity-view .summary-rollup-table-head > :nth-child(1),
  .activity-view .summary-rollup-row > :nth-child(1) {
    grid-column: 1;
  }

  .activity-view .summary-rollup-table-head > :nth-child(3),
  .activity-view .summary-rollup-row > :nth-child(3) {
    grid-column: 2;
  }

  .activity-view .summary-rollup-table-head > :nth-child(5),
  .activity-view .summary-rollup-row > :nth-child(5) {
    grid-column: 3;
  }

  .activity-view .summary-rollup-col--period {
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
  }

  .activity-view .summary-rollup-col,
  .activity-view .summary-rollup-cell,
  .activity-view .summary-rollup-table-head .summary-rollup-col {
    padding-left: 8px;
    padding-right: 6px;
  }

  .activity-view .summary-rollup-amount {
    font-size: 12px;
  }
}

.activity-view .activity-stat-main,
.activity-view .activity-stat-aside {
  display: contents;
}

.activity-view .activity-metric-grid {
  display: flex;
  justify-content: space-between;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.activity-view .activity-metric {
  min-width: 0;
  display: flex;
  flex-direction: column-reverse;
  align-items: flex-start;
  gap: 3px;
}

.activity-view .activity-metric-label {
  color: rgba(255, 255, 255, 0.66);
  font-size: 10px;
  font-weight: 500;
  line-height: 1.15;
  white-space: nowrap;
}

.activity-view .activity-metric-value {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #ffffff;
  font-size: clamp(16px, 4.2vw, 22px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}

.activity-view .stat-action-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  border-radius: var(--radius-full);
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

.activity-view .stat-action-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.activity-view .balance-rollup-badge {
  display: inline-flex;
  display: none;
  align-items: center;
  padding: 3px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.4);
  background: rgba(255, 255, 255, 0.16);
  color: #ffffff;
  font-size: 11px;
  font-weight: 600;
  line-height: 1;
  white-space: nowrap;
}

.activity-view .stat-value {
  font-size: 15px;
  font-weight: 700;
  color: #4d5666;
  transition: filter 140ms ease, transform 140ms ease, letter-spacing 140ms ease;
  letter-spacing: -0.005em;
  line-height: 1;
}

.activity-view .activity-metric-value.stat-value {
  font-size: clamp(14px, 4.2vw, 16px);
  color: #ffffff;
}

.activity-view .stat-month-summary {
  position: relative;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.86);
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: var(--space-8);
  margin-top: var(--space-1);
  line-height: 1.35;
}

.activity-view .summary-net-line,
.activity-view .summary-scope-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.activity-view .summary-net-line {
  gap: 6px;
}

.activity-view .summary-scope-line {
  justify-content: flex-end;
  gap: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.62;
  text-align: right;
}

.activity-view .summary-prefix,
.activity-view .summary-suffix {
  color: rgba(255, 255, 255, 0.78);
  opacity: 0.9;
  font-weight: 500;
}

.activity-view .summary-net {
  font-size: 16px;
  font-weight: 700;
  text-shadow: none;
}

.activity-view .summary-count {
  font-size: 16px;
  font-weight: 700;
  color: #ffffff;
}

.activity-view .stat-value.is-shuffling {
  filter: blur(1.4px);
  transform: translateY(-1px) scale(1.03);
  letter-spacing: 0.7px;
}

.activity-view .stat-value.positive {
  color: var(--success);
}

.activity-view .stat-value.negative {
  color: var(--error);
}

.activity-view .stat-digit {
  display: inline-block;
  min-width: 0.3em;
}

.activity-view .stat-digit.changed {
  animation: statDigitSettle 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--d, 0) * 20ms);
}

/* Don't settle-animate rolling digits on a tab that isn't the settled front view. */
.view:not(.active) .activity-view .stat-digit.changed,
.view:not(.view-transition-settled):not(.no-animate) .activity-view .stat-digit.changed,
.view[data-view-exit-deferred="true"] .activity-view .stat-digit.changed,
.view[data-view-exit-token] .activity-view .stat-digit.changed {
  animation: none !important;
}

@keyframes statDigitSettle {
  0% {
    opacity: 0.15;
    transform: translateY(8px) scale(0.9);
    filter: blur(2px);
  }
  60% {
    opacity: 1;
    transform: translateY(-1px) scale(1.08);
    filter: blur(0) drop-shadow(0 0 8px rgba(251, 191, 36, 0.55));
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

@keyframes sectionSheenSweep {
  0% { left: -100%; opacity: 0; }
  10% { opacity: 1; }
  100% { left: 150%; opacity: 0; }
}

/* ============================================
   Shared Icon Action Buttons
   ============================================ */
.activity-view .activity-user-action-btn,
.contacts-view .contact-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-2xl);
  cursor: pointer;
  transition: all var(--duration-fast);
}

/* ============================================
   Shared Person Rows (Contacts + Transfer)
   ============================================ */
.contacts-view .contact-card,
.transfer-view .recipient-card {
  display: flex;
  align-items: center;
  gap: var(--space-1);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-out);
  position: relative;
  overflow: hidden;
  _background: #f0f1f3;
  _margin-bottom: 4px;
}

.contacts-view .contact-card {
  padding: 4px 3px;
}

.transfer-view .recipient-card {
  padding: 0 var(--space-1) 0 0;
  margin-bottom: var(--space-2);
}

.user-search-item {
  padding-top: 4px !important;
  padding-bottom: 4px !important;
}

.user-search-item .transaction-note {
  display: none !important;
}

.contacts-view .contact-card::before,
.transfer-view .recipient-card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-400) 0%, var(--gold-500) 100%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.contacts-view .contact-card::after,
.transfer-view .recipient-card::after {
  content: '';
  position: absolute;
  left: 58px;
  right: 0;
  bottom: 0;
  height: 1px;
  _background: var(--list-divider-line);
  pointer-events: none;
}

/* Remove divider from last item in each group and at end of list */
.contacts-view .contact-card:last-child::after,
.contacts-view .contact-card:has(+ .contact-group-header)::after {
  display: none;
}

@media (hover: hover) and (pointer: fine) {
  .contacts-view .contact-card:hover::before,
  .transfer-view .recipient-card:not(.no-hover):hover::before {
  opacity: 0;

  }
}


@media (hover: hover) and (pointer: fine) {
  .contacts-view .contact-card:hover,
  .transfer-view .recipient-card:not(.no-hover):hover {
  background: color-mix(in srgb, var(--text-primary) 7%, transparent);

  }
}


.contacts-view .contact-card:active,
.transfer-view .recipient-card:not(.no-hover):active {
  transform: scale(0.99);
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
}

.contacts-view .contact-avatar,
.transfer-view .recipient-avatar {
  position: relative;
  --avatar-badge-border: var(--bg-secondary);
}

.contacts-view .contact-avatar .avatar,
.transfer-view .recipient-avatar .avatar {
  width: 44px;
  height: 44px;
  font-size: 14px;
  border-radius: 50%;
  border: 1px solid rgba(200,200,200);
}

[data-theme="dark"] .contacts-view .contact-avatar .avatar {
  color: rgba(255, 255, 255, 0.9);
}

.contacts-view .contact-avatar .avatar.institution,
.transfer-view .recipient-avatar .avatar.institution {
  _background-image:
    var(--coin-bg-faded-stack),
    linear-gradient(135deg, var(--bg-tertiary), var(--bg-secondary));
  background-size: 100% 100%, cover, 100% 100%;
  background-position: center center, center center, center center;
  background-repeat: no-repeat, no-repeat, no-repeat;
  font-size: 20px;
}

.transfer-view .recipient-avatar .online-indicator {
  position: absolute;
  bottom: 0;
  right: 0;
  width: 14px;
  height: 14px;
  background: var(--success);
  border: 2px solid var(--avatar-badge-border, var(--bg-secondary));
  border-radius: var(--radius-full);
  z-index: 6;
}

.contacts-view .contact-info,
.transfer-view .recipient-info {
  flex: 1;
  min-width: 0;
  margin-left: var(--space-2);
}

.contacts-view .contact-name,
.transfer-view .recipient-name {
  font-size: var(--list-text-size);
  font-weight: var(--list-text-weight);
  line-height: 1.2;
  color: var(--text-primary);
  transition: color var(--duration-fast) var(--ease-out);
}

.contacts-view .contact-name-row {
  display: flex;
  align-items: baseline;
  justify-content: flex-start;
  gap: 8px;
  min-width: 0;
}

.contacts-view .contact-name-row .contact-name {
  min-width: 0;
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.contacts-view .contact-name-row .contact-recent-money,
.contacts-view .contact-name-row .contact-last-active {
  flex: 0 0 auto;
}

.contacts-view .contact-name-row .contact-request-status {
  margin-left: auto;
  flex: 0 0 auto;
  align-self: center;
}

@media (hover: hover) and (pointer: fine) {
  .contacts-view .contact-card:hover .contact-name,
  .transfer-view .recipient-card:not(.no-hover):hover .recipient-name {
  color: inherit;

  }
}


.contacts-list {
  padding-bottom: 6px;
}

.contacts-view .contact-group-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  width: 100%;
  padding: 12px 6px 12px;
  border: 0;
  background: transparent;
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 300;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.contacts-view .contact-group-header::before,
.contacts-view .contact-group-header::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  max-width: none;
}

.contacts-view .contact-group-header::before {
  display: none;
}

.contacts-view .contact-group-header::after {
  background: var(--list-divider-line);
  margin-right: 20%;
}

.contacts-view .contact-group-header--with-add::after {
  display: none;
}

.contacts-view .contact-group-header-rule {
  flex: 1 1 auto;
  height: 1px;
  min-width: 12px;
  background: var(--list-divider-line);
}

.contacts-view .contact-group-add {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid rgba(15, 23, 42, 0.82);
  border-radius: 50%;
  background: #fff;
  color: #111;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.14),
    inset 0 1px 0 rgba(255, 255, 255, 0.85);
  cursor: pointer;
}

.contacts-view .contact-group-add svg {
  width: 14px;
  height: 14px;
  display: block;
}

.contacts-view .contact-group-add:active {
  transform: translateY(1px);
}

[data-theme="dark"] .contacts-view .contact-group-add {
  color: #0f172a;
  background: #f8fafc;
  border-color: rgba(248, 250, 252, 0.35);
}

[data-theme="soft"] .contacts-view .contact-group-header--with-add::after {
  display: none;
}

[data-theme="soft"] .contacts-view .contact-group-header-rule {
  height: 2px;
  background:
    linear-gradient(
      to bottom,
      rgba(128, 143, 164, 0.17) 0,
      rgba(128, 143, 164, 0.17) 1px,
      rgba(255, 255, 255, 0.72) 1px,
      rgba(255, 255, 255, 0.72) 2px
    );
  -webkit-mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.3), #000 16%, #000 100%);
  mask-image: linear-gradient(to right, rgba(0, 0, 0, 0.3), #000 16%, #000 100%);
}

.contacts-view .contact-group-header .dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.contacts-view .contact-group-header .dot.fresh { background: var(--success); }
.contacts-view .contact-group-header .dot.warm { background: var(--warning); }
.contacts-view .contact-group-header .dot.cool { background: var(--text-muted); }

.contacts-view .contact-group-header--toggle {
  cursor: pointer;
}

.contacts-view .contact-group-toggle-meta {
  color: var(--text-muted);
  letter-spacing: 0.08em;
}

.contacts-view .contact-meta--group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  margin-top: 2px;
}

.contacts-view .group-member-status {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.2;
}

.contacts-view .group-member-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: rgba(143, 152, 170, 0.35);
  flex: 0 0 auto;
}

.contacts-view .group-member-status.is-online .group-member-status-dot {
  background: var(--success);
  box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.14);
}

.contacts-view .contact-last-active {
  font-size: 12px;
  font-weight: 400;
  color: #9ba5b7;
  white-space: nowrap;
}

.contacts-view .contact-recent-money {
  font-size: 11px;
  font-weight: 650;
  letter-spacing: 0.01em;
  white-space: nowrap;
  line-height: 1.15;
}

.contacts-view .contact-recent-money.positive {
  color: var(--success);
}

.contacts-view .contact-recent-money.negative {
  color: var(--error, #c45b5b);
}

.contacts-view .contact-recent-money.neutral {
  color: #9ba5b7;
}

.contacts-view .contact-request-status {
  padding: 2px 7px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.2;
  white-space: nowrap;
}

.contacts-view .contact-request-status.is-request {
  background: rgba(196, 91, 91, 0.14);
  color: var(--error, #c45b5b);
}

/* ============================================
   Transaction Item (shared across views)
   ============================================ */
.transaction-item {
  margin-left: 12px;
  display: flex;
  align-items: flex-end;
  gap: var(--space-2);
  padding: var(--space-1) 0;
  padding-bottom: 0;
  background: var(--gold-100);
  border: 1px solid var(--gold-300);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-sensual);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.transaction-item.is-unsettled {
  overflow: visible;
}

.transaction-unsettled-marker {
  position: absolute;
  right: -14px;
  top: 50%;
  transform: translateY(-50%);
  width: 0;
  height: 0;
  border-top: 7px solid transparent;
  border-bottom: 7px solid transparent;
  border-right: 9px solid var(--gold-300);
  pointer-events: none;
  opacity: 0.95;
  z-index: 2;
}

.transaction-item::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--gold-400) 0%, var(--gold-500) 100%);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .transaction-item:hover::before {
  opacity: 1;

  }
}


@media (hover: hover) and (pointer: fine) {
  .transaction-item:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-lg), 0 0 20px rgba(166, 133, 33, 0.08);

  }
}


.transaction-item:active {
  box-shadow: var(--shadow-sm);
}

.transaction-info {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.transaction-name {
  transition: color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .transaction-item:hover .transaction-name {
  color: var(--gold-700);

  }
}


.transaction-note {
  color: var(--text-muted);
}

.transaction-amount {
  text-align: right;
  flex-shrink: 0;
  line-height: 1.0;
}

.transaction-value {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 2px;
  font-variant-numeric: tabular-nums;
}

.transaction-value-row {
  display: flex;
  /* Status badge (Pending / Held / …) sits under the amount, both
     right-aligned with the amount column. */
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
}

.transaction-value.positive {
  color: var(--success);
}

.transaction-time {
  font-size: 11px;
  color: var(--text-muted);
  opacity: 0.78;
}

.transaction-status {
  display: inline-flex;
  align-items: center;
  position: relative;
  top: 0;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: var(--radius-sm);
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  margin-top: 0;
  font-weight: 500;
  line-height: 1.2;
}

.activity-date {
  position: relative;
}
.activity-date-group {
  _padding-bottom: 10px;
  margin-bottom: 6px;
}

.activity-view .activity-date {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 11px;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  margin: 12px 0 8px;
}

.activity-view .activity-date::before,
.activity-view .activity-date::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  max-width: none;
}

.activity-view .activity-date::before {
  display: none;
  background: linear-gradient(to right, rgba(160, 175, 200, 0.4), rgba(160, 175, 200, 0));
}

.activity-view .activity-date::after {
  background: var(--list-divider-line, rgba(0,0,0,0.06));
}

.activity-view .activity-items {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}

.activity-view .activity-user-search-group {
  margin-bottom: var(--space-4);
}

.activity-view .activity-user-search-header {
  font-size: 12px;
  font-weight: 600;
  color: #667083;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.activity-view .activity-user-search-subheader {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: var(--space-3) 0 var(--space-1);
}

.contact-view .activity-date, 
.transfer-view .activity-date {
  display: none !important;
}

.contact-view .transaction-item,
.transfer-view .transaction-item {
  padding-bottom: 0px !important;
}


/* ============================================
  Flat transaction rows (shared: activity + profile)
   ============================================ */
.activity-view .transaction-item,
.profile-view .recent-list .transaction-item,
.contact-view .transaction-item {
  padding: 15px 2px 15px 0;
  margin-left: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 14px;
  transition: background 120ms ease, transform 120ms ease;
}

.contact-view .transaction-item {
  align-items: baseline;
}

.activity-view .transaction-item {
  overflow: visible;
}

.flat-transaction-list .transaction-item {
  margin-left: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 14px;
  transition: background 120ms ease, transform 120ms ease;
}

.flat-transaction-list .transaction-item::before {
  display: none;
}

.flat-transaction-list .transaction-item::after {
  content: '';
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 0;
  height: 1px;
  background: var(--list-divider-line);
  pointer-events: none;
}

@media (hover: hover) and (pointer: fine) {
  .flat-transaction-list .transaction-item:hover {
  border-color: transparent;
  box-shadow: none;
  background: color-mix(in srgb, var(--text-primary) 7%, transparent);

  }
}


.flat-transaction-list .transaction-item:active {
  _transform: scale(0.99);
  _background: color-mix(in srgb, var(--text-primary) 10%, transparent);
}

.flat-transaction-list .transaction-item:last-child::after {
  display: none;
}

.workflow-participant-list .transaction-item {
  cursor: default;
  padding: 8px 0;
  align-items: flex-start;
}

/* Whole-row click for user participants. The row still contains an
   inline name button for keyboard focus; mouse/touch users get the
   larger row target. closest('[data-action]') in the sheet handler
   ensures inner buttons (Remove, name link) still resolve to their
   own action. */
.workflow-participant-list .workflow-participant-item--clickable {
  cursor: pointer;
  border-radius: 8px;
  margin: 0 -8px;
  padding: 8px 8px;
  transition: background-color var(--duration-fast);
}

@media (hover: hover) and (pointer: fine) {
  .workflow-participant-list .workflow-participant-item--clickable:hover {
  background: rgba(15, 23, 42, 0.04);
  outline: none;
}
}
.workflow-participant-list .workflow-participant-item--clickable:focus-visible {
  background: rgba(15, 23, 42, 0.04);
  outline: none;
}


.workflow-participant-secondary {
  display: contents;
}

.workflow-participant-secondary[hidden] {
  display: none;
}

.workflow-participant-more-toggle {
  align-self: flex-start;
  margin-top: 6px;
  padding: 4px 0;
  background: transparent;
  border: 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(120, 130, 150, 0.35);
}

@media (hover: hover) and (pointer: fine) {
  .workflow-participant-more-toggle:hover {
  color: var(--text-primary);
  text-decoration-color: rgba(120, 130, 150, 0.65);

  }
}


.workflow-participant-more-toggle:focus-visible {
  outline: 2px solid rgba(120, 130, 150, 0.5);
  outline-offset: 2px;
  border-radius: 4px;
}

.workflow-participant-list .transaction-info {
  flex: 1 1 0;
  min-width: 0;
}

.workflow-participant-list .workflow-participant-amounts {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
  margin-left: 8px;
  max-width: 48%;
}

.workflow-participant-list .workflow-participant-amounts .transaction-value {
  margin-left: 0;
  white-space: nowrap;
  line-height: 1.3;
}

.workflow-participant-list .transaction-item::before {
  display: none;
}

.workflow-participant-list .transaction-item::after {
  display: none;
}

.workflow-participant-list .transaction-item .avatar {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(120, 130, 150, 0.25);
  background: #111827;
  color: rgba(255, 255, 255, 0.75);
  box-shadow: none;
  font-size: 13px;
}

.workflow-participant-list .transaction-name {
  font-size: var(--list-text-size);
  font-weight: var(--list-text-weight);
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 2px;
}

.workflow-participant-list .transaction-name .tx-detail-inline-link {
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  line-height: inherit;
  text-decoration: none;
}

.workflow-participant-list .transaction-note {
  font-size: var(--list-note-size);
  color: var(--text-primary);
  opacity: 0.5;
  line-height: 1.15;
}

.workflow-participant-list .transaction-value {
  font-size: var(--list-text-size);
  font-weight: 900;
  margin-left: auto;
  white-space: nowrap;
}

.workflow-participant-list .transaction-value.positive {
  color: #16a34a;
}

.workflow-participant-list .transaction-value.negative {
  color: #dc2626;
}

.workflow-state-block {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
}

.workflow-state-line {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
}

.workflow-state-line__label {
  font-size: var(--list-text-size);
  color: var(--text-primary);
  font-weight: 600;
}

.workflow-state-line__value {
  font-size: var(--list-text-size);
  color: var(--text-primary);
}

.workflow-state-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.workflow-state-pill--failed {
  color: #fff;
  background: var(--error);
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--error) 45%, transparent);
}

.workflow-state-pill--pending {
  color: var(--text-primary);
  background: color-mix(in srgb, #f59e0b 22%, transparent);
}

.workflow-state-pill--partial {
  color: var(--text-primary);
  background: color-mix(in srgb, #f59e0b 16%, transparent);
  box-shadow: 0 0 0 1px color-mix(in srgb, #f59e0b 35%, transparent);
}

.workflow-failure-reason,
.workflow-failure-reason-list {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--error) 12%, transparent);
  border: 1px solid color-mix(in srgb, var(--error) 35%, transparent);
  color: var(--error);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workflow-failure-reason-list {
  list-style: none;
  padding-left: 14px;
  max-height: min(420px, 60vh);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.workflow-failure-reason-item {
  min-width: 0;
  overflow: visible;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workflow-failure-reason-item + .workflow-failure-reason-item {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--error) 28%, transparent);
}

.workflow-failure-reason-text,
.workflow-failure-reason-context,
.workflow-failure-reason-headline,
.workflow-failure-reason-technical {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.workflow-failure-reason-context {
  font-size: 13px;
  font-weight: 700;
  opacity: 0.9;
}

.workflow-failure-reason-headline {
  margin-top: 4px;
  font-size: 16px;
  font-weight: 800;
}

.workflow-failure-reason-facts {
  margin: 6px 0 0;
  padding-left: 18px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.45;
}

.workflow-failure-reason-facts li {
  margin: 2px 0;
}

.workflow-failure-reason-facts__transfer-group {
  list-style: none;
  margin-left: -18px;
  padding-left: 0;
}

.workflow-failure-transfer-legs {
  margin: 4px 0 0;
  padding-left: 18px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.45;
}

.workflow-failure-transfer-legs li {
  margin: 2px 0;
}

.workflow-failure-reason-details {
  margin-top: 8px;
}

.workflow-failure-reason-details > summary {
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  opacity: 0.85;
  list-style: none;
}

.workflow-failure-reason-details > summary::-webkit-details-marker {
  display: none;
}

.workflow-failure-reason-technical {
  margin-top: 8px;
  padding: 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--error) 8%, transparent);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  white-space: pre-wrap;
  max-height: min(240px, 42vh);
  overflow-x: hidden;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.workflow-failure-reason--unknown {
  font-weight: 500;
  opacity: 0.9;
}

.workflow-inline-error {
  margin-top: 8px;
  font-size: 13px;
  color: var(--error);
}

.workflow-status-banner {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--bg-secondary);
  border: 2px solid var(--gold-500);
}

.workflow-status-banner .tx-detail-note-label {
  margin-bottom: 6px;
}

.workflow-status-banner--error {
  border-color: color-mix(in srgb, var(--error) 45%, var(--border-default));
  background: color-mix(in srgb, var(--error) 10%, var(--bg-secondary));
}

.workflow-status-banner--error .tx-detail-note-text {
  color: var(--error);
}

.workflow-status-banner--pending {
  border-color: color-mix(in srgb, var(--warning, #c9a227) 40%, var(--border-default));
  background: color-mix(in srgb, var(--warning, #c9a227) 8%, var(--bg-secondary));
}

.flat-transaction-list .activity-date {
  flex-direction: row-reverse;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  color: #8a95a8;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  padding: 6px 0 4px;
}

.flat-transaction-list .activity-date::before,
.flat-transaction-list .activity-date::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  max-width: none;
}

.flat-transaction-list .activity-date::before {
  display: none;
}

.flat-transaction-list .activity-date::after {
  background: linear-gradient(to left, rgba(160, 175, 200, 0.2), rgba(160, 175, 200, 0));
}

.flat-transaction-list .activity-items {
  display: flex;
  flex-direction: column;
}

.activity-view .transaction-item::before,
.profile-view .recent-list .transaction-item::before,
.contact-view .transaction-item::before {
  display: none;
}

.activity-view .transaction-item::after,
.profile-view .recent-list .transaction-item::after,
.transfer-view .transaction-item::after {
  content: '';
  position: absolute;
  left: 58px;
  right: 0;
  bottom: 0;
  height: 1px;
  background: none;
  pointer-events: none;
}

.activity-view .transaction-item::after {
  left: 0;
  z-index: 5;
}


/* Direction badge — sized like an avatar, colored by direction */
.contact-tx-dir-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.contact-tx-dir-badge.received {
  background: rgba(22, 163, 74, 0.1);
  color: #16a34a;
}

.contact-tx-dir-badge.sent {
  background: rgba(220, 38, 38, 0.08);
  color: #dc2626;
}

.contact-tx-dir-badge svg {
  width: 18px;
  height: 18px;
}

@media (hover: hover) and (pointer: fine) {
  .activity-view .transaction-item:hover,
  .profile-view .recent-list .transaction-item:hover,
  .contact-view .transaction-item:hover,
  .transfer-view .transaction-item:hover {
  border-color: transparent;
  box-shadow: none;
  _background: color-mix(in srgb, var(--text-primary) 7%, transparent);

  }
}


.activity-view .transaction-item:active,
.profile-view .recent-list .transaction-item:active,
.contact-view .transaction-item:active,
.transfer-view .transaction-item:active {
  _transform: scale(0.99);
  _background: color-mix(in srgb, var(--text-primary) 10%, transparent);
}

.activity-view .transaction-item .avatar,
.profile-view .recent-list .transaction-item .avatar {
  width: 40px;
  height: 40px;
  border: 1px solid rgba(120, 130, 150, 0.25);
  background: #111827;
  color: rgba(255, 255, 255, 0.75);
  box-shadow: none;
  font-size: 13px;
}

.activity-view .transaction-item .transaction-name,
.profile-view .recent-list .transaction-item .transaction-name,
.contact-view .transaction-item .transaction-name,
.transfer-view .transaction-item .transaction-name {
  font-size: var(--list-text-size);
  font-weight: var(--list-text-weight);
  color: var(--text-primary);
  line-height: 1.5;
}

.activity-view .transaction-item .transaction-name {
  display: flex;
  align-items: center;
  gap: 5px;
}

.activity-view .transaction-item .transaction-name-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-view .transaction-item .activity-memo-indicators {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  color: var(--text-muted);
  opacity: 0.62;
}

.activity-view .transaction-item .activity-memo-indicator {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 15px;
  height: 15px;
}

.activity-view .transaction-item .activity-memo-indicator--picture {
  display: none;
}

.activity-view .transaction-item .activity-memo-indicator--picture.is-visible {
  display: inline-flex;
}

.activity-view .transaction-item .activity-memo-indicator svg {
  width: 13px;
  height: 13px;
}

.activity-view .transaction-item .transaction-note-emoji {
  display: inline-block;
  filter: saturate(80%);
  font-size: 10px;
}

.activity-view .transaction-item .transaction-note,
.profile-view .recent-list .transaction-item .transaction-note,
.contact-view .transaction-item .transaction-note,
.transfer-view .transaction-item .transaction-note {
  font-size: var(--list-note-size);
  color: var(--text-primary);
  opacity: 0.5;
  line-height: 1.15;
}

.activity-view .transaction-item .transaction-note {
  opacity: 0.7;
  display: flex;
  align-items: center;
  min-width: 0;
  overflow: hidden;
  white-space: nowrap;
}

.activity-view .transaction-item .transaction-note-date,
.activity-view .transaction-item .transaction-note-dot,
.activity-view .transaction-item .transaction-meta-currency {
  flex: 0 0 auto;
}

.activity-view .transaction-item .transaction-note-dot {
  margin: 0 3px;
}

.activity-view .transaction-item .transaction-meta-currency {
  opacity: 0.5;
}

.activity-view .transaction-item .transaction-note-memo {
  flex: 0 1 auto;
  max-width: 50%;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-view .transaction-item .transaction-value,
.profile-view .recent-list .transaction-item .transaction-value,
.contact-view .transaction-item .transaction-value,
.transfer-view .transaction-item .transaction-value {
  _font-family: 'JetBrains Mono', monospace !important;
}

.activity-view .transaction-item .transaction-value.positive,
.profile-view .recent-list .transaction-item .transaction-value.positive,
.contact-view .transaction-item .transaction-value.positive,
.transfer-view .transaction-item .transaction-value.positive {
  color: var(--accent-alert);
}

.activity-view .transaction-item .transaction-value:not(.positive),
.profile-view .recent-list .transaction-item .transaction-value:not(.positive),
.contact-view .transaction-item .transaction-value:not(.positive),
.transfer-view .transaction-item .transaction-value:not(.positive) {
  color: #dc2626;
}

.activity-view .transaction-item .transaction-time,
.profile-view .recent-list .transaction-item .transaction-time,
.contact-view .transaction-item .transaction-time,
.transfer-view .transaction-item .transaction-time {
  font-size: var(--list-note-size);
  font-size: 12px;
  color: var(--text-muted);
  opacity: 0.82;
  margin-top: 1px;
  line-height: 1.15;
}

.activity-view .transaction-item .transaction-meta-currency,
.profile-view .recent-list .transaction-item .transaction-meta-currency,
.contact-view .transaction-item .transaction-meta-currency,
.transfer-view .transaction-item .transaction-meta-currency {
  color: #9ba5b7;
  font-size: 12px;
  font-weight: 500;
}

.activity-view .transaction-item .transaction-status,
.profile-view .recent-list .transaction-item .transaction-status,
.contact-view .transaction-item .transaction-status,
.transfer-view .transaction-item .transaction-status {
  margin-top: 3px;
  font-size: 11px;
  background: var(--bg-tertiary);
  color: var(--text-secondary);
  border-radius: var(--radius-full);
  padding: 3px 9px;
}

.activity-view .transaction-item .transaction-status.transaction-status-inline,
.profile-view .recent-list .transaction-item .transaction-status.transaction-status-inline,
.contact-view .transaction-item .transaction-status.transaction-status-inline,
.transfer-view .transaction-item .transaction-status.transaction-status-inline {
  top: 0;
  margin-top: 0;
  padding: 1px 7px;
  font-size: 10px;
  line-height: 1.2;
}

.activity-view .transaction-item .transaction-status.is-pending,
.profile-view .recent-list .transaction-item .transaction-status.is-pending,
.contact-view .transaction-item .transaction-status.is-pending,
.transfer-view .transaction-item .transaction-status.is-pending {
  background: var(--gold-200);
  color: var(--gold-600);
  _border: 1px solid var(--gold-400);
  font-weight: 700;
}

.activity-view .transaction-item .transaction-status.is-request,
.profile-view .recent-list .transaction-item .transaction-status.is-request,
.contact-view .transaction-item .transaction-status.is-request,
.transfer-view .transaction-item .transaction-status.is-request {
  background: rgba(196, 91, 91, 0.14);
  color: var(--error, #c45b5b);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.activity-view .transaction-item .transaction-status.is-held,
.profile-view .recent-list .transaction-item .transaction-status.is-held,
.contact-view .transaction-item .transaction-status.is-held,
.transfer-view .transaction-item .transaction-status.is-held {
  background: #e8f0ff;
  color: #1d4fbf;
  font-weight: 700;
}

.activity-view .transaction-item.is-held,
.profile-view .recent-list .transaction-item.is-held,
.contact-view .transaction-item.is-held {
  border-left: 3px solid #1d4fbf;
  padding-left: 3px;
  margin-left: -6px;
}

.activity-view .transaction-item .transaction-status.is-terminal,
.profile-view .recent-list .transaction-item .transaction-status.is-terminal,
.contact-view .transaction-item .transaction-status.is-terminal,
.transfer-view .transaction-item .transaction-status.is-terminal {
  background: #eef1f5;
  color: #6d7788;
  font-weight: 700;
}

.activity-view .transaction-item .transaction-value.is-terminal,
.profile-view .recent-list .transaction-item .transaction-value.is-terminal,
.contact-view .transaction-item .transaction-value.is-terminal,
.transfer-view .transaction-item .transaction-value.is-terminal {
  color: #8a93a3 !important;
  text-decoration: line-through;
  text-decoration-thickness: 1.5px;
  text-decoration-color: #a7afbc;
  text-decoration-skip-ink: auto;
}

.transaction-item.is-unsettled .transaction-value-row {
  position: relative;
}

/* The Pending/Held badge under the amount is the status marker.
   The old hanging caret sat on top of that pill. */
.transaction-item.is-unsettled .transaction-value-row::after {
  content: none;
}

/* Transaction direction icon styles */
.tx-direction {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  color: var(--text-secondary);
  flex-shrink: 0;
  margin-right: 8px;
  opacity: 0.75;
  margin-left: -2px;
  position: relative;
  top: 4px;
}

.tx-direction.sent {
  color: #e23b45;
}

.tx-direction.received {
  color: #18a34a;
}

.transaction-item[data-tx-id] .avatar[data-user-id]:not([data-user-id=""]),
.transaction-item[data-tx-id] .tx-direction[data-user-id]:not([data-user-id=""]) {
  cursor: pointer;
}

.transaction-item.is-unsettled .tx-direction {
  color: var(--gold-600);
  opacity: 1;
}

.tx-direction svg {
  width: 16px;
  height: 16px;
  stroke-width: 3;
  transform: translateY(1px);
}

.contact-view .transaction-list .transaction-item:last-child::after {
  display: none;
}

.activity-view .activity-items .transaction-item:last-child::after,
.contact-view .activity-items .transaction-item:last-child::after {
  display: none;
}

/* ============================================
   Verified Badge — Premium Seal
   ============================================ */
.verified-badge {
  width: 20px;
  height: 20px;
  background: linear-gradient(145deg, var(--gold-400), var(--gold-500), var(--gold-600));
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(166, 133, 33, 0.4), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  position: relative;
}

.verified-badge::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
}

.verified-badge svg {
  width: 12px;
  height: 12px;
  stroke: var(--text-inverse);
  stroke-width: 3;
  filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.2));
}

.profile-badge-coin {
  width: 18px;
  height: 18px;
  border-radius: var(--radius-circle);
  object-fit: cover;
  object-position: center;
  border: 1px solid var(--gold-400);
  box-shadow: 0 1px 4px rgba(166, 133, 33, 0.25);
  display: inline-block;
  vertical-align: middle;
  transform: scale(1.1);
  transform-origin: center;
}

.profile-badge-coin--seal {
  width: 22px;
  height: 22px;
  border-width: 1.5px;
}

/* ============================================
   Page Layout — Elegant Headers
   ============================================ */
.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-3);
  position: relative;
}

.page-header-actions {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}


@media (min-width: 768px) {
  .page-header {
    align-items: flex-end;
  }
  
  .page-title {
    font-size: 48px;
  }
}

.page-title {
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.03em;
  color: var(--text-primary);
  position: relative;
  cursor: pointer;
}

.page-title::after {
  _content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--gold-500), var(--gold-400));
  border-radius: var(--radius-full);
  opacity: 0.4;
}

html[data-env-badge="QA"] .page-title,
html[data-env-badge="DEV"] .page-title,
html[data-env-badge="NEXT"] .page-title {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

html[data-env-badge] .contacts-view .contacts-wordmark-title {
  gap: 8px;
}

html[data-env-badge="QA"] .page-title::after,
html[data-env-badge="DEV"] .page-title::after,
html[data-env-badge="NEXT"] .page-title::after {
  content: none;
  position: static;
  inset: auto;
  width: auto;
  height: auto;
  margin: 0;
  padding: 3px 6px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.88);
  color: #F8FAFC;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  line-height: 1;
  opacity: 1;
  pointer-events: none;
}

html[data-env-badge="QA"] .page-title::after {
  content: 'QA';
}

html[data-env-badge="DEV"] .page-title::after {
  content: 'DEV';
  background: #D97706;
}

html[data-env-badge="NEXT"] .page-title::after {
  content: 'NEXT';
  background: #7C3AED;
}

/* View-specific page header/title overrides */
.activity-view .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.activity-view .page-title {
  margin: 0;
  line-height: 1;
  letter-spacing: -0.02em;
}

/* Shared “In progress” strip (Activity + Contacts). Tucks under the balance card. */
.activity-view .stat-card-balance,
.contacts-view .contacts-balance-card {
  position: relative;
  z-index: 1;
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-direction: row-reverse;
  margin: 0;
  position: relative;
  padding: 10px 12px;
  background: var(--gold-50);
  margin-top: -36px;
  padding-top: 28px;
  border-bottom-left-radius: 12px;
  border-bottom-right-radius: 12px;
  border: 1px solid var(--text-primary);
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary-container {
  margin-top: 0;
  margin-bottom: 0;
  max-height: 0;
  opacity: 0;
  overflow: visible;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateY(-10px);
  position: relative;
  z-index: 0;
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary-container.is-visible {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  max-height: 60px;
  opacity: 1;
  transform: translateY(0);
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary-container.hidden {
  display: none;
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary-count {
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: var(--radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 800;
  color: var(--gold-800);
  background: rgba(var(--gold-500-rgb), 0.18);
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary-net {
  font-size: 12px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary-net.positive {
  color: #1f9c59;
}

:is(.activity-view, .contacts-view) .activity-unsettled-summary-net.negative {
  color: #c95757;
}

.activity-view .activity-unsettled-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text-secondary);
  user-select: none;
}
.activity-view .activity-unsettled-toggle span {
  opacity:0.5;
}

.activity-view .activity-unsettled-toggle input[type='checkbox'] {
  width: 14px;
  height: 14px;
  accent-color: var(--gold-500);
}

/* Contacts has no pending-only toggle — keep the label under the balance (left). */
.contacts-view .activity-unsettled-summary {
  justify-content: flex-end;
}

/*
 * Home “In progress” height: animate grid rows so Send/Banks/Rewards don’t jump.
 * Keep overflow visible on the outer shell so the strip can still tuck under the balance card.
 */
.contacts-view .activity-unsettled-summary-container {
  display: grid;
  grid-template-rows: 0fr;
  max-height: none;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  overflow: visible;
  transform: none;
  pointer-events: none;
  transition:
    grid-template-rows 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    margin-bottom 0.38s cubic-bezier(0.22, 1, 0.36, 1),
    opacity 0.28s ease;
}

.contacts-view .activity-unsettled-summary-container.is-visible {
  grid-template-rows: 1fr;
  max-height: none;
  margin-top: 0;
  margin-bottom: var(--space-3);
  opacity: 1;
  transform: none;
  pointer-events: auto;
}

/* Search focus / query collapses the Home hero; keep In progress with it. */
.contacts-view .activity-unsettled-summary-container.is-visible.is-search-hidden {
  grid-template-rows: 0fr;
  margin-top: 0;
  margin-bottom: 0;
  opacity: 0;
  pointer-events: none;
}

.contacts-view .activity-unsettled-summary-container.hidden {
  display: grid;
}

.contacts-view .activity-unsettled-summary-container > .activity-unsettled-summary {
  min-height: 0;
  overflow: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .contacts-view .activity-unsettled-summary-container {
    transition: none;
  }
}

.activity-view .invite-contact-item,
.activity-view .native-contacts-cta-item,
.contacts-view .invite-contact-item,
.contacts-view .native-contacts-cta-item,
.profile-view .invite-contact-item,
.transfer-view .invite-contact-item {
  margin-top: var(--space-1);
  margin-left: 0;
  background: rgba(255, 255, 255, 0.65);
  border: 2px dashed var(--accent-alert);
  padding: 12px 12px;
}

.contacts-view button.invite-contact-item {
  width: 100%;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

[data-theme="dark"] .activity-view .invite-contact-item,
[data-theme="dark"] .activity-view .native-contacts-cta-item,
[data-theme="dark"] .contacts-view .invite-contact-item,
[data-theme="dark"] .contacts-view .native-contacts-cta-item,
[data-theme="dark"] .profile-view .invite-contact-item,
[data-theme="dark"] .transfer-view .invite-contact-item {
  background: rgba(226, 232, 240, 0.08);
  border-color: rgba(226, 232, 240, 0.18);
}

.invite-contact-item:after {
  display: none;
}

.activity-view .invite-contact-item .transaction-name,
.activity-view .native-contacts-cta-item .transaction-name,
.contacts-view .invite-contact-item .transaction-name,
.contacts-view .native-contacts-cta-item .transaction-name {
  color: #2f3747;
}

.contacts-view .invite-contact-item .avatar,
.contacts-view .native-contacts-cta-item .avatar,
.profile-view .invite-contact-item .avatar,
.transfer-view .invite-contact-item .avatar {
  color: var(--accent-alert, #17A34A);
  border: 2px solid var(--accent-alert, #17A34A);
  box-shadow: none;
  background: transparent;
}

.contacts-view .invite-contact-item .avatar-initials,
.contacts-view .native-contacts-cta-item .avatar-initials,
.profile-view .invite-contact-item .avatar-initials,
.transfer-view .invite-contact-item .avatar-initials {
  color: inherit;
  text-shadow: none;
}

.contacts-view .invite-contact-item .transaction-name,
.contacts-view .native-contacts-cta-item .transaction-name,
.profile-view .invite-contact-item .transaction-name,
.transfer-view .invite-contact-item .transaction-name {
  color: var(--text-primary);
}

[data-theme="dark"] .contacts-view .invite-contact-item .avatar,
[data-theme="dark"] .contacts-view .native-contacts-cta-item .avatar,
[data-theme="dark"] .contacts-view .invite-contact-item .activity-user-action-btn,
[data-theme="dark"] .profile-view .invite-contact-item .avatar,
[data-theme="dark"] .profile-view .invite-contact-item .activity-user-action-btn,
[data-theme="dark"] .transfer-view .invite-contact-item .avatar,
[data-theme="dark"] .transfer-view .invite-contact-item .activity-user-action-btn {
  background: transparent;
  color: var(--accent-alert, #17A34A);
  border-color: var(--accent-alert, #17A34A);
}

[data-theme="dark"] .activity-view .invite-contact-item .transaction-name,
[data-theme="dark"] .activity-view .native-contacts-cta-item .transaction-name,
[data-theme="dark"] .contacts-view .invite-contact-item .transaction-name,
[data-theme="dark"] .contacts-view .native-contacts-cta-item .transaction-name {
  color: rgba(248, 250, 252, 0.92);
}

.activity-view .invite-contact-item .transaction-note,
.activity-view .native-contacts-cta-item .transaction-note,
.contacts-view .invite-contact-item .transaction-note,
.contacts-view .native-contacts-cta-item .transaction-note,
.profile-view .invite-contact-item .transaction-note,
.profile-view .assets-transfer-section .transaction-note,
.transfer-view .invite-contact-item .transaction-note {
  color: var(--text-primary);
  font-size: 12px;
}

[data-theme="dark"] .activity-view .invite-contact-item .transaction-note,
[data-theme="dark"] .activity-view .native-contacts-cta-item .transaction-note,
[data-theme="dark"] .contacts-view .invite-contact-item .transaction-note,
[data-theme="dark"] .contacts-view .native-contacts-cta-item .transaction-note {
  color: rgba(203, 213, 225, 0.62);
}

.activity-view .asset-link-action-item .avatar svg,
.contacts-view .asset-link-action-item .avatar svg,
.profile-view .asset-link-action-item .avatar svg,
.transfer-view .asset-link-action-item .avatar svg {
  width: 20px;
  height: 20px;
  position: relative;
  z-index: 1;
}

.activity-view .native-contacts-cta-btn,
.contacts-view .native-contacts-cta-btn {
  min-width: 88px;
  height: 36px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.15);
  border: var(--border-width) solid var(--gold-400);
  color: var(--text-primary);
}

.contacts-view .native-contacts-cta-btn {
  background: #fff;
  border-color: var(--accent-alert, #17A34A);
  color: var(--accent-alert, #17A34A);
}

@media (hover: hover) and (pointer: fine) {
  .activity-view .native-contacts-cta-btn:hover,
  .contacts-view .native-contacts-cta-btn:hover {
  background: var(--gold-400);
  color: var(--text-inverse);

  }
}


[data-theme="dark"] .activity-view .native-contacts-cta-btn,
[data-theme="dark"] .contacts-view .native-contacts-cta-btn {
  background: rgba(226, 232, 240, 0.12);
  border-color: rgba(226, 232, 240, 0.18);
  color: rgba(248, 250, 252, 0.9);
}

@media (hover: hover) and (pointer: fine) {
  [data-theme="dark"] .activity-view .native-contacts-cta-btn:hover,
  [data-theme="dark"] .contacts-view .native-contacts-cta-btn:hover {
  background: rgba(226, 232, 240, 0.92);
  border-color: rgba(226, 232, 240, 0.92);
  color: #0f172a;

  }
}


.contacts-view .page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.contacts-view .page-title {
  font-weight: 700;
  margin: 0;
  line-height: 1;
}

.contact-view .page-header {
  margin-bottom: var(--space-4);
}


.settings-view .page-header {
  margin-bottom: var(--space-6);
}

.transfer-view .page-header {
  margin-bottom: var(--space-6);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.transfers-view .page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-5);
}

/* ============================================
   Sections
   ============================================ */
.section {
  margin-bottom: var(--space-3);
}

@media (min-width: 1024px) {
  .section-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
  }
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.section-title {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-action {
  font-size: 13px;
  font-weight: 500;
  color: var(--gold-400);
  cursor: pointer;
  transition: color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .section-action:hover {
  color: var(--gold-300);

  }
}


/* ============================================
   List Items — Elegant Interactions
   ============================================ */
.list-item {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4);
  background: var(--bg-glass-strong);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-normal) var(--ease-sensual);
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.list-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--gradient-sensual);
  opacity: 0;
  transition: opacity var(--duration-normal) var(--ease-out);
}

.list-item::after {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 50%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
  transition: left var(--duration-sensual) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .list-item:hover::after {
  left: 150%;

  }
}


@media (min-width: 768px) {
  .list-item {
    padding: var(--space-6);
  }
  
  .list-item-title {
    font-size: 18px;
  }
}

@media (hover: hover) and (pointer: fine) {
  .list-item:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-lg), var(--shadow-glow);
  _transform: translateY(-3px) scale(1.01);

  }
}


@media (hover: hover) and (pointer: fine) {
  .list-item:hover::before {
  opacity: 1;

  }
}


.list-item:active {
  _transform: translateY(-1px) scale(0.99);
  box-shadow: var(--shadow-md);
}

.list-item + .list-item {
  margin-top: var(--space-2);
}

.list-item-content {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.list-item-title {
  font-weight: 600;
  margin-bottom: 2px;
  transition: color var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .list-item:hover .list-item-title {
  color: var(--gold-700);

  }
}


.list-item-subtitle {
  font-size: 13px;
  color: var(--text-secondary);
}

.list-item-value {
  text-align: right;
  position: relative;
  z-index: 1;
}

.list-item-amount {
  font-size: 15px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.list-item-amount.positive {
  color: var(--success);
}

.list-item-amount.negative {
  color: var(--text-primary);
}

.list-item-time {
  font-size: 12px;
  color: var(--text-muted);
}

/* ============================================
   Balance Display — Statement Piece
   ============================================ */
.balance-display {
  text-align: center;
  padding: var(--space-8) 0;
  position: relative;
}

@media (min-width: 768px) {
  .balance-display {
    text-align: left;
    padding: var(--space-10) 0;
  }
}

.balance-amount {
  font-weight: 700;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, var(--text-primary) 0%, var(--gold-500) 40%, var(--gold-400) 60%, var(--text-primary) 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: balanceShimmer 4s ease-in-out infinite;
  position: relative;
}

@keyframes balanceShimmer {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

.balance-currency {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  margin-top: var(--space-2);
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

/* ============================================
   Action Buttons Row
   ============================================ */
.action-buttons {
  display: flex;
  gap: var(--space-4);
  justify-content: center;
  margin-top: var(--space-6);
}

@media (min-width: 768px) {
  .action-buttons {
    justify-content: flex-start;
  }
}

.action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4);
  min-width: 80px;
  background: var(--bg-elevated);
  border: var(--border-width) solid var(--border-default);
  border-radius: var(--radius-xl);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
  .action-btn:hover {
  border-color: var(--border-gold);
  box-shadow: var(--shadow-lg);

  }
}


.action-btn:active {
  _transform: scale(0.95);
  box-shadow: var(--shadow-sm);
}

.action-btn-icon {
  width: 32px;
  height: 32px;
  background: var(--gold-500);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-inverse);
}

.action-btn-label {
  font-size: 12px;
  font-weight: 500;
  color: var(--text-secondary);
}

/* Contact detail action buttons use a denser card variant */
.contact-view .action-btn {
  flex: 1;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  color: var(--text-primary);
  font-size: 13px;
  border-color: var(--border-subtle);
}

@media (hover: hover) and (pointer: fine) {
  .contact-view .action-btn:hover {
  border-color: var(--border-subtle);
  box-shadow: none;

  }
}


.contact-view .action-btn:active {
  _transform: scale(0.96);
}

.contact-view .action-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.contact-view .action-btn svg {
  width: 24px;
  height: 24px;
}

.contact-view .action-btn-icon-wrapper {
  position: relative;
  display: inline-flex;
}

.contact-view .action-btn-badge {
  position: absolute;
  top: -6px;
  right: -8px;
  min-width: 16px;
  height: 16px;
  background: var(--error);
  border: 2px solid var(--bg-secondary);
  border-radius: var(--radius-full);
  font-size: 9px;
  font-weight: 700;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3px;
}

.contact-view .action-btn-badge[hidden] {
  display: none;
}

.contact-view .action-btn.primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  border-color: var(--gold-400);
  color: var(--text-inverse);
}

/* ============================================
   QR Code Container
   ============================================ */
.qr-container {
  background: var(--qr-surface);
  padding: var(--space-5);
  border-radius: var(--radius-xl);
  box-shadow: var(--gold-glow);
  position: relative;
}

.qr-container::before {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: calc(var(--radius-xl) + 3px);
  background: var(--gold-metallic);
  z-index: -1;
  animation: qrPulse 3s ease-in-out infinite;
}

@keyframes qrPulse {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 0.8; }
}

/* ============================================
   Utilities
   ============================================ */
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: var(--space-1); }
.gap-2 { gap: var(--space-2); }
.gap-3 { gap: var(--space-3); }
.gap-4 { gap: var(--space-4); }
.gap-6 { gap: var(--space-6); }
.gap-8 { gap: var(--space-8); }
.flex-1 { flex: 1; }
.text-center { text-align: center; }
.text-right { text-align: right; }
.w-full { width: 100%; }
.hidden { display: none !important; }

/* UI displayMultiplier amounts (e.g. TQRDC ×10000) — gray superscript asterisk. */
.display-multiplier-amount {
  position: relative;
  display: inline-block;
}

.display-multiplier-amount::after {
  content: '*';
  position: absolute;
  top: 0.05em;
  right: -0.5em;
  font-size: 1em;
  line-height: 1;
  font-weight: 500;
  color: var(--text-muted);
  pointer-events: none;
}
.mt-auto { margin-top: auto; }
.mb-0 { margin-bottom: 0; }

/* ============================================
   Animations
   ============================================ */
@keyframes listFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

.activity-view .transaction-item.list-animate-item {
  animation: none;
}

/* List item entry animation - apply to any list item (not Activity rows). */
.list-animate-item {
  transform: none;
  animation: listFadeIn 180ms ease-out both;
  animation-delay: var(--anim-delay, 0ms);
}

@keyframes goldPulse {
  0%, 100% {
    box-shadow: var(--gold-glow-soft);
  }
  50% {
    box-shadow: var(--gold-glow);
  }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

.animate-fade-in {
  animation: none;
}

.animate-slide-up {
  animation: none;
}

.animate-scale-in {
  animation: none;
}

.animate-gold-pulse {
  animation: goldPulse 2s ease-in-out infinite;
}

.animate-float {
  animation: float 3s ease-in-out infinite;
}

/* Stagger children — Elegant Cascade */
.stagger > * {
    opacity: 1;
  transform: none;
  animation: none;
}

/* ============================================
   Success Animation — Celebration
   ============================================ */
.success-check {
  width: 90px;
  height: 90px;
  border-radius: var(--radius-full);
  background: linear-gradient(145deg, var(--gold-400), var(--gold-500), var(--gold-600));
  display: flex;
  align-items: center;
  justify-content: center;
  animation: successPop 0.6s var(--ease-spring);
  box-shadow: var(--shadow-gold-lg), 0 0 60px rgba(166, 133, 33, 0.3);
  position: relative;
}

.success-check::before {
  content: '';
  position: absolute;
  inset: -4px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--gold-300), transparent, var(--gold-400));
  z-index: -1;
  animation: successRing 1s var(--ease-sensual) forwards;
  opacity: 0;
}

@keyframes successRing {
  0% { transform: scale(0.8); opacity: 0; }
  50% { opacity: 1; }
  100% { transform: scale(1.3); opacity: 0; }
}

.success-check::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.4) 0%, transparent 50%);
}

.success-check svg {
  width: 44px;
  height: 44px;
  stroke: var(--text-inverse);
  stroke-width: 3;
  stroke-dasharray: 100;
  stroke-dashoffset: 100;
  animation: drawCheck 0.5s ease-out 0.3s forwards;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

@keyframes successPop {
  0% { transform: scale(0) rotate(-10deg); }
  60% { transform: scale(1.15) rotate(3deg); }
  80% { transform: scale(0.95) rotate(-1deg); }
  100% { transform: scale(1) rotate(0deg); }
}

@keyframes drawCheck {
  to { stroke-dashoffset: 0; }
}

/* ============================================
   Empty State
   ============================================ */
.empty-state {
  text-align: center;
  padding: var(--space-12) var(--space-6);
  height: 80dvh;
}

.empty-state-icon {
  width: 64px;
  height: 64px;
  margin: 0 auto var(--space-4);
  color: var(--text-muted);
  opacity: 0.5;
}

.empty-state-icon svg {
  width: 100%;
  height: 100%;
  stroke: currentColor;
}

.empty-state-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: var(--space-2);
}

.empty-state-text {
  color: var(--text-secondary);
  margin-bottom: var(--space-6);
}

.empty-state-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-3);
}

.empty-state-actions .btn {
  min-width: 140px;
}

.view-empty-reveal {
  opacity: 0;
  visibility: hidden;
  transition:
    opacity var(--view-empty-reveal-duration, 320ms) cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear var(--view-empty-reveal-duration, 320ms);
}

.view-empty-reveal.view-empty-reveal--visible {
  opacity: 1;
  visibility: visible;
  transition:
    opacity var(--view-empty-reveal-duration, 320ms) cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.view-empty-reveal.view-empty-reveal--pending {
  opacity: 0;
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  .view-empty-reveal {
    transition: none;
  }
}

/* ============================================
   Divider
   ============================================ */
.divider {
  height: 1px;
  background: var(--list-divider-line);
  margin: var(--space-6) 0;
}

.divider-gold {
  background: linear-gradient(90deg, transparent, var(--border-gold), transparent);
}

/* ============================================
   Enhanced Toast (overrides base toast)
   ============================================ */
.toast.toast-success {
  border-color: color-mix(in srgb, var(--success, #22c55e) 55%, rgba(255, 255, 255, 0.14));
  background: color-mix(in srgb, #22c55e 42%, #1a2420);
}

.toast.toast-success .toast-icon {
  color: #bbf7d0;
}

.toast.toast-error {
  border-color: color-mix(in srgb, var(--error, #ef4444) 45%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--error, #dc2626) 24%, #0f1419);
}

.toast.toast-error .toast-icon {
  color: #fca5a5;
}

[data-theme="dark"] .toast.toast-success {
  border-color: color-mix(in srgb, var(--success, #16a34a) 40%, rgba(0, 0, 0, 0.08));
  background: color-mix(in srgb, var(--success, #16a34a) 16%, #f4f5f7);
}

[data-theme="dark"] .toast.toast-success .toast-icon {
  color: var(--success, #16a34a);
}

[data-theme="dark"] .toast.toast-error {
  border-color: color-mix(in srgb, var(--error, #dc2626) 40%, rgba(0, 0, 0, 0.08));
  background: color-mix(in srgb, var(--error, #dc2626) 16%, #f4f5f7);
}

[data-theme="dark"] .toast.toast-error .toast-icon {
  color: var(--error, #dc2626);
}

/* ============================================
   Pull to Refresh
   ============================================ */
.pull-indicator {
  position: absolute;
  top: -50px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-gold);
  opacity: 0;
  transition: opacity 0.2s, transform 0.2s;
}

.pull-indicator.visible {
  opacity: 1;
}

.pull-indicator.refreshing {
  animation: spin 1s linear infinite;
}

.pull-indicator svg {
  width: 20px;
  height: 20px;
  stroke: var(--gold-400);
}

/* ============================================
   Tap Highlight (native feel)
   ============================================ */
.tap-highlight {
  position: relative;
  overflow: hidden;
}

.tap-highlight::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at var(--tap-x, 50%) var(--tap-y, 50%), 
    var(--accent-soft) 0%, 
    transparent 70%);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
}

.tap-highlight:active::after {
  opacity: 1;
}

/* ============================================
   ID Scan View
   ============================================ */
.id-scan-view {
  padding-bottom: var(--space-6);
}

[data-theme="dark"] .id-scan-view .card {
  background: var(--bg-secondary);
  border-color: var(--border-subtle);
  box-shadow: none;
  color: var(--text-primary);
}

[data-theme="dark"] .id-scan-view .card::before {
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.14), transparent);
  opacity: 0.28;
}

.id-scan-view .page-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.id-scan-view .page-title {
  font-size: 1.5rem;
  margin: 0;
}

.id-scan-view .scan-content {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.id-scan-view .scan-actions {
  display: flex;
  gap: var(--space-3);
  justify-content: center;
}

.id-scan-view .scan-actions .btn {
  flex: 1;
  max-width: 180px;
}

/* QR Scanner (Html5Qrcode) styles */
.scanner-container {
  position: relative;
  width: 100%;
  max-width: 300px;
  min-height: 300px;
  margin: 0 auto;
  border-radius: var(--radius-lg);
  background: #111;
  transform-origin: center center;
  overflow: visible;
  isolation: isolate;
}

.scanner-container.is-capture-pulse,
#qr-reader-scanner.is-capture-pulse,
#qr-reader-profile.is-capture-pulse {
  animation: scanner-capture-pulse 520ms cubic-bezier(0.45, 0, 0.2, 1);
}

@keyframes scanner-capture-pulse {
  0%,
  100% {
    transform: scale(1);
  }
  42% {
    transform: scale(1.016);
  }
}

#qr-reader,
#qr-reader-profile,
#qr-reader-scanner,
#wallet-link-address-scanner,
#transfer-ephemeral-address-scanner {
  width: 100% !important;
  min-height: 300px !important;
  border: none !important;
  border-radius: var(--radius-lg);
  overflow: hidden;
  position: relative;
}

/* Force video to be visible */
#qr-reader video,
#qr-reader-profile video,
#qr-reader-scanner video,
#wallet-link-address-scanner video,
#transfer-ephemeral-address-scanner video {
  display: block !important;
  visibility: visible !important;
  opacity: 1 !important;
  width: 100% !important;
  height: auto !important;
  min-height: 300px !important;
  object-fit: cover !important;
  position: relative !important;
  z-index: 1 !important;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

/* Desktop webcams are front-facing: mirror the preview so it reads naturally.
   Decoding uses the raw stream, so scanning is unaffected. */
@media (min-width: 768px) {
  #qr-reader video,
  #qr-reader-profile video,
  #qr-reader-scanner video,
  #wallet-link-address-scanner video,
  #transfer-ephemeral-address-scanner video {
    -webkit-transform: translateZ(0) scaleX(-1);
    transform: translateZ(0) scaleX(-1);
  }
}

/* Hide all Html5Qrcode overlays and UI */
#qr-reader__dashboard,
#qr-reader-profile__dashboard,
#qr-reader-scanner__dashboard,
#wallet-link-address-scanner__dashboard,
#transfer-ephemeral-address-scanner__dashboard,
#qr-reader__scan_region img,
#qr-reader-profile__scan_region img,
#qr-reader-scanner__scan_region img,
#wallet-link-address-scanner__scan_region img,
#transfer-ephemeral-address-scanner__scan_region img,
#qr-reader__scan_region canvas,
#qr-reader-profile__scan_region canvas,
#qr-reader-scanner__scan_region canvas,
#wallet-link-address-scanner__scan_region canvas,
#transfer-ephemeral-address-scanner__scan_region canvas {
  display: none !important;
}

/* Make the shaded region transparent */
#qr-reader__scan_region,
#qr-reader-profile__scan_region,
#qr-reader-scanner__scan_region,
#wallet-link-address-scanner__scan_region,
#transfer-ephemeral-address-scanner__scan_region {
  background: transparent !important;
  box-shadow: none !important;
}

.scanner-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
  margin-top: var(--space-4);
}

.scanner-qr-detected {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-1);
  margin-top: var(--space-3);
  padding: 0 var(--space-2);
  text-align: center;
}

.scanner-qr-detected-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.scanner-qr-detected-link {
  display: inline-block;
  max-width: 100%;
  font-size: 13px;
  font-weight: 500;
  color: var(--accent-primary, #6ea8fe);
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-all;
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  font-family: inherit;
}

@media (hover: hover) and (pointer: fine) {
  .scanner-qr-detected-link:hover {
  color: var(--accent-primary-hover, #8bb9ff);
}
}
.scanner-qr-detected-link:focus-visible {
  color: var(--accent-primary-hover, #8bb9ff);
}


.scanner-manual-address {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-top: var(--space-4);
  padding: var(--space-3);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  background: var(--surface-secondary);
}

.scanner-manual-address__label {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-secondary);
}

.scanner-manual-address .wallet-link-sheet-address-preview {
  margin: 0;
}

.scanner-container--tap-capture {
  cursor: pointer;
}

.scanner-container--tap-capture::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.scanner-status {
  text-align: center;
  font-size: 14px;
  font-weight: 500;
  margin-top: var(--space-3);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-md);
}

.scanner-status.scanning {
  color: var(--text-muted);
}

.scanner-status.success {
  color: var(--success);
  background: rgba(34, 197, 94, 0.1);
}

.scanner-status.error {
  color: var(--error);
  background: rgba(239, 68, 68, 0.1);
}

.scanner-status.error.camera-error-status,
.wallet-link-sheet-status.camera-error-status,
.status-message.is-error.camera-error-status {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.camera-error-status__help {
  appearance: none;
  background: none;
  border: none;
  color: inherit;
  font: inherit;
  font-weight: 600;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
}

.camera-error-status__help-body {
  text-align: left;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-secondary);
}

.camera-error-status__help-body .steps {
  margin-top: var(--space-2);
  padding-left: var(--space-5);
}

.wallet-link-sheet-status.camera-error-status,
.wallet-link-sheet-status.is-error {
  color: var(--error);
}

.scanner-found {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-6) var(--space-4) var(--space-2);
  text-align: center;
}

.scanner-found-avatar {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  overflow: hidden;
  background: #0a0c0e;
  box-shadow: var(--shadow-lg), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-found-avatar-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.scanner-found-avatar-fallback {
  color: #fff;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.03em;
}

.scanner-found-name {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-primary);
}

.scanner-found-subtitle {
  margin: 0;
  font-size: 14px;
  color: var(--text-muted);
}

/* Guess-the-price bubbles (idle scanner overlay) */
.scanner-guess-layer {
  position: absolute;
  inset: 0;
  z-index: 6;
  pointer-events: none;
  overflow: visible;
  border-radius: inherit;
}

.scanner-guess-shimmer {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: 0;
  background: linear-gradient(
    105deg,
    transparent 38%,
    rgba(255, 255, 255, 0.08) 44%,
    rgba(255, 255, 255, 0.42) 50%,
    rgba(255, 255, 255, 0.08) 56%,
    transparent 62%
  );
  background-size: 220% 100%;
  background-position: 130% 0;
}

.scanner-guess-shimmer.is-active {
  animation: scanner-guess-shimmer 520ms cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

.scanner-guess-markers {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
}

.scanner-guess-connectors {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.scanner-guess-connector {
  stroke: rgba(255, 255, 255, 0.72);
  stroke-width: 1.4;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  animation: scanner-guess-connector-in 320ms cubic-bezier(0.45, 0, 0.2, 1) both;
}

.scanner-guess-connector--person {
  stroke: rgba(245, 210, 104, 0.86);
}

.scanner-guess-connector-dot {
  fill: rgba(255, 255, 255, 0.92);
  stroke: rgba(10, 12, 14, 0.34);
  stroke-width: 0.35;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.35));
  animation: scanner-guess-connector-in 320ms cubic-bezier(0.45, 0, 0.2, 1) both;
}

.scanner-guess-connector-dot--person,
.scanner-guess-connector-dot.scanner-guess-connector--person {
  fill: rgba(245, 210, 104, 0.96);
}

.scanner-guess-hotspot {
  position: absolute;
  width: 16px;
  height: 16px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  pointer-events: none;
  border: none;
  background: transparent;
  box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65);
  animation: scanner-guess-hotspot-pulse 640ms cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

.scanner-guess-hotspot--person {
  box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.85);
  animation: scanner-guess-hotspot-pulse-person 760ms cubic-bezier(0.34, 1.2, 0.48, 1) forwards;
}

.scanner-guess-bubble {
  position: absolute;
  display: flex;
  flex-direction: column;
  gap: 3px;
  max-width: 112px;
  max-height: 112px;
  overflow: hidden;
  animation: scanner-guess-bubble-in 280ms cubic-bezier(0.45, 0, 0.2, 1) both;
}

.scanner-guess-markers.is-exiting .scanner-guess-bubble {
  animation: scanner-guess-bubble-out 220ms cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

.scanner-guess-markers.is-exiting .scanner-guess-connector {
  animation: scanner-guess-connector-out 180ms cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

.scanner-guess-markers.is-exiting .scanner-guess-connector-dot {
  animation: scanner-guess-connector-out 180ms cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

.scanner-guess-markers.is-exiting .scanner-guess-hotspot {
  animation: scanner-guess-hotspot-out 180ms cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

.scanner-guess-bubble--align-center {
  transform: translate(-50%, -100%);
  align-items: center;
}

.scanner-guess-bubble--align-left {
  transform: translate(-50%, -50%);
  align-items: flex-start;
}

.scanner-guess-bubble--align-right {
  transform: translate(-50%, -50%);
  align-items: flex-end;
}

.scanner-guess-bubble-label {
  padding: 6px 10px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.94);
  color: #0a0c0e;
  font-family: var(--app-font-stack);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
  border: 1px solid rgba(10, 12, 14, 0.08);
}

.scanner-guess-bubble-tag {
  padding: 3px 9px;
  border-radius: 999px;
  background: #0a0c0e;
  color: #fff;
  font-family: var(--app-font-stack);
  font-size: 11px;
  font-weight: 400;
  letter-spacing: 0.01em;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.scanner-guess-bubble--person {
  max-width: min(52vw, 188px);
  width: max-content;
  align-items: center;
}

.scanner-guess-bubble--person .scanner-guess-bubble-label {
  background: rgba(251, 247, 240, 0.96);
  color: var(--gold-800);
  border-color: rgba(201, 162, 39, 0.35);
  font-size: 10px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.scanner-guess-bubble-comment {
  max-width: 104px;
  padding: 4px 8px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--gold-600) 0%, var(--gold-400) 100%);
  color: #fff;
  font-family: var(--app-font-stack);
  font-size: 10px;
  font-weight: 400;
  line-height: 1.2;
  text-align: center;
  box-shadow: 0 3px 12px rgba(107, 85, 22, 0.35);
}

.scanner-guess-bubble--person .scanner-guess-bubble-comment {
  max-width: min(52vw, 188px);
  width: 100%;
  overflow: hidden;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  text-overflow: ellipsis;
  word-break: break-word;
}

.scanner-guess-bubble--person.scanner-guess-bubble--align-left .scanner-guess-bubble-comment {
  text-align: center;
}

.scanner-guess-bubble--person.scanner-guess-bubble--align-right .scanner-guess-bubble-comment {
  text-align: center;
}

.scanner-guess-bubble--person.scanner-guess-bubble--align-center .scanner-guess-bubble-comment {
  text-align: center;
}

.scanner-status.has-guess-hint {
  color: var(--text-secondary);
}

.scanner-people-worth {
  max-width: 300px;
  margin: var(--space-3) auto 0;
  padding: 8px 10px;
  max-height: 96px;
  overflow: hidden;
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(201, 162, 39, 0.16), rgba(255, 255, 255, 0.06));
  border: 1px solid rgba(201, 162, 39, 0.22);
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.35;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.08);
  transform-origin: top center;
  animation: scanner-people-worth-in 260ms cubic-bezier(0.45, 0, 0.2, 1) both;
}

.scanner-people-worth.is-exiting {
  animation: scanner-people-worth-out 220ms cubic-bezier(0.45, 0, 0.2, 1) forwards;
}

.scanner-people-worth-kicker {
  display: block;
  margin-bottom: 2px;
  color: var(--gold-700);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.scanner-people-worth-item strong {
  color: var(--text-primary);
}

.scanner-people-worth-separator {
  color: var(--text-muted);
}

@keyframes scanner-guess-shimmer {
  0% {
    opacity: 0;
    background-position: 130% 0;
  }
  18% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    background-position: -30% 0;
  }
}

@keyframes scanner-guess-hotspot-pulse {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.5);
    box-shadow: 0 0 0 0 rgba(255, 255, 255, 0.65);
  }
  38% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
    box-shadow: 0 0 0 5px rgba(255, 255, 255, 0.5);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.12);
    box-shadow: 0 0 0 14px rgba(255, 255, 255, 0);
  }
}

@keyframes scanner-guess-hotspot-pulse-person {
  0% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.45);
    box-shadow: 0 0 0 0 rgba(201, 162, 39, 0.9);
  }
  28% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.05);
    box-shadow: 0 0 0 4px rgba(232, 213, 176, 0.55);
  }
  52% {
    opacity: 0.85;
    transform: translate(-50%, -50%) scale(0.92);
    box-shadow: 0 0 0 8px rgba(201, 162, 39, 0.25);
  }
  76% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1.08);
    box-shadow: 0 0 0 5px rgba(245, 235, 217, 0.45);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.18);
    box-shadow: 0 0 0 16px rgba(201, 162, 39, 0);
  }
}

@keyframes scanner-guess-bubble-in {
  from {
    opacity: 0;
    filter: blur(1px);
    max-height: 0;
  }
  to {
    opacity: 1;
    filter: blur(0);
    max-height: 112px;
  }
}

@keyframes scanner-guess-connector-in {
  from {
    opacity: 0;
    stroke-dasharray: 1 7;
  }
  to {
    opacity: 1;
    stroke-dasharray: 1 0;
  }
}

@keyframes scanner-guess-bubble-out {
  from {
    opacity: 1;
    filter: blur(0);
    max-height: 112px;
  }
  to {
    opacity: 0;
    filter: blur(1px);
    max-height: 0;
  }
}

@keyframes scanner-guess-connector-out {
  from {
    opacity: 1;
  }
  to {
    opacity: 0;
  }
}

@keyframes scanner-guess-hotspot-out {
  from {
    opacity: 0.5;
  }
  to {
    opacity: 0;
  }
}

@keyframes scanner-people-worth-in {
  from {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    transform: translateY(-4px);
  }
  to {
    opacity: 1;
    max-height: 96px;
    padding-top: 8px;
    padding-bottom: 8px;
    margin-top: var(--space-3);
    transform: translateY(0);
  }
}

@keyframes scanner-people-worth-out {
  from {
    opacity: 1;
    max-height: 96px;
    padding-top: 8px;
    padding-bottom: 8px;
    margin-top: var(--space-3);
    transform: translateY(0);
  }
  to {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-top: 0;
    transform: translateY(-4px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .scanner-container.is-capture-pulse,
  #qr-reader-scanner.is-capture-pulse,
  #qr-reader-profile.is-capture-pulse {
    animation: none;
  }

  .scanner-guess-shimmer.is-active {
    animation: none;
    opacity: 0.35;
  }

  .scanner-guess-hotspot,
  .scanner-guess-hotspot--person {
    animation: none;
    opacity: 0;
  }

  .scanner-guess-bubble {
    animation: none;
  }

  .scanner-guess-connector {
    animation: none;
  }

  .scanner-people-worth,
  .scanner-people-worth.is-exiting {
    animation: none;
  }
}

/* Full-screen scanner overlay (BlinkID) — single z-index source for all views */
.scanner-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: var(--z-scanner-overlay, 99999);
  background: #000;
}

.scanner-overlay.active {
  display: flex;
  align-items: center;
  justify-content: center;
}

.scanner-overlay .blinkid-host {
  position: absolute;
  top: var(--safe-top);
  right: var(--safe-right);
  bottom: var(--safe-bottom);
  left: var(--safe-left);
  width: auto !important;
  height: auto !important;
}

/* Scanner loading indicator */
.scanner-loading {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  color: white;
  z-index: 10;
  gap: var(--space-4);
}

.scanner-loading.hidden {
  display: none;
}

.scanner-loading p {
  font-size: 16px;
  color: var(--text-secondary);
  margin: 0;
}

.scanner-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(255, 255, 255, 0.2);
  border-top-color: var(--gold);
  border-radius: var(--radius-circle);
  animation: spin 1s linear infinite;
}

.scanner-overlay .blinkid-host > *,
.scanner-overlay .blinkid-host > * > * {
  width: 100% !important;
  height: 100% !important;
}

.scanner-overlay video {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

/* Live scan coaching sits below BlinkID's flash / camera / close bar. */
.scanner-live-status {
  position: absolute;
  top: calc(var(--safe-top) + 56px + var(--space-3));
  left: calc(var(--safe-left) + var(--space-4));
  right: calc(var(--safe-right) + var(--space-4));
  z-index: 20;
  margin: 0 auto;
  max-width: 26rem;
  box-sizing: border-box;
  padding: 10px 16px;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.72);
  color: #fff;
  font-size: 15px;
  line-height: 1.35;
  text-align: center;
  pointer-events: none;
}

.scanner-live-status.hidden {
  display: none;
}

.scanner-live-status.is-error {
  background: rgba(80, 24, 24, 0.82);
}

.scanner-live-status.is-ok {
  background: rgba(16, 64, 36, 0.82);
}

/* App-owned fallback exit for the ID scanner. Hidden unless the SDK's own
   close control fails to render (see id-scanner.js close-control check). */
.scanner-fallback-exit-btn {
  position: fixed;
  top: calc(var(--safe-top) + var(--space-4));
  right: calc(var(--safe-right) + var(--space-4));
  z-index: calc(var(--z-scanner-overlay, 99999) + 1);
  color: #fff;
  background: rgba(0, 0, 0, 0.5);
}

.scanner-fallback-exit-btn.hidden {
  display: none;
}

/* Coin portrait intro splash shown on app load */
.coin-intro-overlay {
  position: fixed;
  inset: 0;
  z-index: 200000;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  opacity: 0;
  animation: coinIntroOverlayFade 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* Hidden easter egg matrix burst */
.matrix-burst-overlay {
  position: fixed;
  inset: 0;
  pointer-events: auto;
  z-index: 10001;
  opacity: 0;
  background:
    radial-gradient(circle at center, rgba(0, 28, 64, 0.08) 0%, rgba(0, 0, 0, 0.86) 78%),
    linear-gradient(180deg, rgba(0, 10, 24, 0.3) 0%, rgba(0, 0, 0, 0.72) 100%);
  animation: matrixBurstFade 5000ms ease forwards;
}

.matrix-burst-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  opacity: 0.82;
}

@keyframes matrixBurstFade {
  0% { opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { opacity: 0; }
}

.coin-intro-glow {
  position: absolute;
  width: min(86vw, 560px);
  height: min(86vw, 560px);
  border-radius: var(--radius-circle);
  background: radial-gradient(
    circle,
    rgba(88, 170, 230, 0.28) 0%,
    rgba(48, 118, 170, 0.14) 42%,
    rgba(26, 58, 90, 0.06) 65%,
    rgba(0, 0, 0, 0) 100%
  );
  filter: blur(6px);
  animation: coinIntroGlowPulse 700ms ease-out forwards;
}

.coin-intro-image {
  position: relative;
  width: min(64vw, 360px);
  height: min(64vw, 360px);
  border-radius: var(--radius-circle);
  object-fit: cover;
  object-position: center;
  box-shadow:
    0 0 0 1px rgba(176, 214, 238, 0.44),
    0 0 24px rgba(84, 166, 228, 0.36),
    0 0 52px rgba(46, 116, 173, 0.28);
  animation: coinIntroImagePop 700ms cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

@keyframes coinIntroOverlayFade {
  0% { opacity: 0; }
  12% { opacity: 1; }
  62% { opacity: 1; }
  100% { opacity: 0; }
}

@keyframes coinIntroImagePop {
  0% {
    opacity: 0;
    transform: scale(0.84);
    filter: blur(2px) brightness(1.15);
  }
  20% {
    opacity: 1;
    transform: scale(1.02);
    filter: blur(0) brightness(1.06);
  }
  100% {
    opacity: 0;
    transform: scale(1.12);
    filter: blur(0.6px) brightness(1.03);
  }
}

@keyframes coinIntroGlowPulse {
  0% {
    opacity: 0;
    transform: scale(0.75);
  }
  26% {
    opacity: 1;
    transform: scale(1);
  }
  100% {
    opacity: 0;
    transform: scale(1.08);
  }
}

/* Upload panel */
.id-scan-view .upload-card {
  display: none;
}

.id-scan-view .upload-card.visible {
  display: block;
}

.id-scan-view .upload-grid {
  display: grid;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.id-scan-view .upload-panel {
  border-radius: var(--radius-lg);
  border: var(--border-width) solid var(--border-subtle);
  background: var(--bg-glass);
  padding: var(--space-3);
  display: grid;
  gap: var(--space-2);
  cursor: pointer;
}

.upload-panel .panel-label {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  line-height: 1.25;
  text-align: center;
}

.id-scan-view .upload-panel.hidden {
  display: none;
}

.id-scan-view .upload-panel input[type="file"] {
  width: 100%;
  font-size: 0.9rem;
}

.id-scan-view .upload-status {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: var(--space-3);
  text-align: center;
}

.id-scan-view .upload-status.is-error {
  color: var(--error);
}

/* Results card */
.id-scan-view .results-card {
  margin-top: var(--space-2);
}

.id-scan-view .scan-results {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}

.id-scan-view .scan-results .result-item {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.id-scan-view .scan-results dt {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.id-scan-view .scan-results dd {
  margin: 0;
  font-weight: 500;
  font-size: 0.95rem;
}

.id-scan-view .face-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-2);
}

.id-scan-view .id-image-previews {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  margin-bottom: var(--space-4);
}

.id-scan-view .preview-label {
  margin-bottom: var(--space-1);
  text-align: center;
}

.id-scan-view .license-preview-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.id-scan-view .license-preview-item {
  min-width: 0;
}

.id-scan-view .license-frame {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.id-scan-view .license-frame img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  background: #111;
}

.id-scan-view .license-placeholder {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 0 8px;
}

.id-scan-view .license-frame.has-image img {
  display: block;
}

.id-scan-view .license-frame.has-image .license-placeholder {
  display: none;
}

.id-scan-view .face-frame {
  width: 120px;
  height: 120px;
  border-radius: var(--radius-circle);
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-subtle);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}

.id-scan-view .face-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}

.id-scan-view .face-placeholder {
  font-size: 12px;
  color: var(--text-muted);
  text-align: center;
  padding: 0 8px;
}

.id-scan-view .face-frame.has-image img {
  display: block;
}

.id-scan-view .face-frame.has-image .face-placeholder {
  display: none;
}

.id-scan-view .status-message {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  min-height: 1.5em;
}

.id-scan-view .status-message:empty {
  display: none;
}

.id-scan-view .status-message.is-error {
  color: var(--error);
}

/* ============================================
   DMV Experiment View
   ============================================ */
.dmv-view {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  max-width: 760px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-4) var(--space-8);
}

.dmv-hero {
  padding: var(--space-5);
}

.dmv-hero h1 {
  margin: var(--space-1) 0 var(--space-2);
  font-size: clamp(2rem, 9vw, 3.5rem);
  line-height: 0.95;
  letter-spacing: -0.06em;
}

.dmv-hero p {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.5;
}

.dmv-kicker {
  color: var(--gold-500);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.dmv-form {
  display: grid;
  gap: var(--space-4);
  padding: var(--space-4);
}

.dmv-form .form-group {
  display: grid;
  gap: var(--space-2);
  margin: 0;
}

.dmv-license-input {
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}

.dmv-status {
  min-height: 1.4em;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dmv-status[data-tone="error"] {
  color: var(--error);
}

.dmv-status[data-tone="success"] {
  color: var(--success);
}

.dmv-results-card {
  padding: var(--space-4);
}

.dmv-results-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--space-3);
  margin: var(--space-3) 0 0;
}

.dmv-result-row {
  min-width: 0;
  padding: var(--space-3);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-primary) 82%, transparent);
}

.dmv-result-row dt {
  margin-bottom: var(--space-1);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dmv-result-row dd {
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-family: var(--font-mono, "JetBrains Mono", monospace);
  font-size: 0.92rem;
}

.dmv-notes {
  display: grid;
  gap: var(--space-2);
  margin-top: var(--space-4);
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.dmv-notes p {
  margin: 0;
}

.dmv-provider-state {
  display: grid;
  gap: var(--space-1);
  margin-top: var(--space-3);
  padding: var(--space-3);
  border-radius: var(--radius-md);
  border: var(--border-width) solid var(--border-subtle);
  color: var(--text-secondary);
}

.dmv-provider-state strong {
  color: var(--text-primary);
}

.dmv-provider-state--ok {
  border-color: color-mix(in srgb, var(--success) 35%, var(--border-subtle));
}

.dmv-provider-state--error {
  border-color: color-mix(in srgb, var(--error) 35%, var(--border-subtle));
}

.dmv-raw-details {
  margin-top: var(--space-4);
}

.dmv-legacy-details {
  margin-top: var(--space-4);
}

.dmv-legacy-details summary,
.dmv-raw-details summary {
  cursor: pointer;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.dmv-raw-details pre {
  overflow: auto;
  max-height: 360px;
  margin: var(--space-3) 0 0;
  padding: var(--space-3);
  border-radius: var(--radius-md);
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 0.78rem;
  line-height: 1.45;
}

@media (max-width: 640px) {
  .dmv-results-grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================
   Collapsible Card
   ============================================ */
.collapsible-card {
  overflow: hidden;
}

.collapsible-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: var(--space-3) var(--space-4);
  background: transparent;
  border: none;
  cursor: pointer;
  color: var(--text-primary);
  text-align: left;
}

@media (hover: hover) and (pointer: fine) {
  .collapsible-header:hover {
  background: var(--bg-tertiary);

  }
}


.collapsible-header .section-title {
  margin: 0;
}

.collapse-icon {
  width: 20px;
  height: 20px;
  stroke: var(--text-muted);
  transition: transform 0.2s ease;
}

.collapsible-card.expanded .collapse-icon {
  transform: rotate(180deg);
}

.collapsible-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
  padding: 0 var(--space-4);
}

.collapsible-card.expanded .collapsible-content {
  max-height: 500px; /* Fallback for content height */
  padding-bottom: var(--space-4);
}


/* ==============================================
   Recovery Codes Shared Styles
   ============================================== */
.recovery-warning-box {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
  background: var(--warning-muted);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-4);
}

.recovery-warning-box.with-icon {
  flex-direction: row;
  gap: var(--space-3);
}

.recovery-warning-box svg {
  width: 24px;
  height: 24px;
  flex-shrink: 0;
  stroke: var(--warning);
}

.recovery-warning-box strong {
  display: block;
  color: var(--warning);
  margin-bottom: var(--space-1);
}

.recovery-warning-box p {
  font-size: 13px;
  color: var(--warning);
  margin: 0;
}

.recovery-codes-display {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-2);
  margin-bottom: var(--space-4);
}

.recovery-codes-display.with-card {
  background: var(--bg-secondary);
  border-radius: var(--radius-lg);
  padding: var(--space-4);
}

.recovery-codes-display .code {
  font-family: "JetBrains Mono", monospace;
  font-size: 13px;
  padding: var(--space-2);
  background: var(--bg-tertiary);
  border-radius: var(--radius-sm);
  text-align: center;
  user-select: all;
}

/* ============================================
   BlinkID Camera - Hidden during preload
   ============================================ */
#camera-manager-mount-point.preload-hidden {
  display: none !important;
}

/* ============================================
   Pagination Controls (shared)
   ============================================ */
.pagination-container {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-4);
  padding: var(--space-4) 0 var(--space-8);
}

.pagination-container.hidden {
  display: none;
}

.pagination-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast);
}

.pagination-btn svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-secondary);
}

@media (hover: hover) and (pointer: fine) {
  .pagination-btn:hover:not(:disabled) {
  border-color: var(--gold-400);

  }
}


@media (hover: hover) and (pointer: fine) {
  .pagination-btn:hover:not(:disabled) svg {
  stroke: var(--gold-400);

  }
}


.pagination-btn:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.show-more-btn,
.activity-show-more-btn {
  width: auto;
  min-width: 180px;
  height: 44px;
  padding: 0 var(--space-5);
  color: var(--text-secondary);
  font-size: 14px;
  font-weight: 700;
}

.pagination-container--inlist {
  padding: var(--space-3) 0 var(--space-2);
}

.pagination-info {
  font-size: 14px;
  color: var(--text-muted);
  min-width: 100px;
  text-align: center;
}

/* Crypto Styles */
.crypto-view {
  padding-bottom: var(--space-6);
}

.crypto-content {
  margin: 0 calc(-1 * var(--space-4));
}

.crypto-list {
  overflow: hidden;
  margin: 0 -10px var(--space-2);
}

/* ── Crypto Balance Card ───────────────────────────────────────── */
.crypto-balance-card {
  border-radius: var(--radius-lg);
  padding: 16px;
  margin: 0 var(--space-4) var(--space-3);
  color: #f8fafc;
}

.crypto-balance-eyebrow {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
}

.crypto-balance-total {
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.crypto-balance-total.is-shuffling {
  filter: blur(1.4px);
  transform: translateY(-1px) scale(1.03);
  letter-spacing: 0.7px;
}

/* Baseline $0.00 / unsettled placeholder — shimmer so it reads as loading, not zero. */
.is-balance-pending {
  color: transparent !important;
  background-image: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0.28) 20%,
    rgba(255, 255, 255, 0.92) 50%,
    rgba(255, 255, 255, 0.28) 80%
  );
  background-size: 220% 100%;
  background-position: 100% 0;
  -webkit-background-clip: text;
  background-clip: text;
  animation: balance-amount-pending-shimmer 1.15s ease-in-out infinite;
}

/* Light Assets rows (Banks / Stablecoins list) need a dark shimmer sweep. */
.is-balance-pending.is-balance-pending--on-light,
.profile-view .asset-type-total-value.is-balance-pending,
.profile-view .linked-sub-balance.is-balance-pending {
  background-image: linear-gradient(
    100deg,
    rgba(15, 23, 42, 0.14) 20%,
    rgba(15, 23, 42, 0.55) 50%,
    rgba(15, 23, 42, 0.14) 80%
  );
}

.deferred-asset-img:not(.is-loaded) {
  opacity: 0;
}

.deferred-asset-img.is-loaded {
  opacity: 1;
}

@keyframes balance-amount-pending-shimmer {
  0% { background-position: 100% 0; }
  100% { background-position: -100% 0; }
}

@media (prefers-reduced-motion: reduce) {
  .is-balance-pending {
    animation: none;
    color: inherit !important;
    background-image: none;
    opacity: 0.45;
  }
}

.crypto-balance-total .stat-digit {
  display: inline-block;
  min-width: 0.3em;
}

.crypto-balance-total .stat-digit.changed {
  animation: statDigitSettle 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--d, 0) * 20ms);
}

.crypto-balance-note {
  font-size: 14px;
  color: rgba(226, 232, 240, 0.6);
  line-height: 1.45;
  display: flex;
  gap: 6px;
}

.crypto-balance-top-row {
  margin-bottom: 14px;
}

.crypto-balance-block {
  display: flex;
  flex-direction: column;
}

.crypto-period-selector {
  display: flex;
  gap: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 3px;
}

.crypto-period-tab {
  flex: 1;
  border: 2px solid transparent;
  background: transparent;
  color: rgba(226, 232, 240, 0.55);
  font-size: 12px;
  font-weight: 600;
  padding: 6px 4px;
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
  letter-spacing: 0.02em;
}

.crypto-period-tab.active {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
  border: 3px solid rgba(255, 255, 255, 0.95);
}

/* ── Crypto Search ─────────────────────────────────────────────── */
.crypto-search {
  margin: 0 var(--space-4) var(--space-3);
}

.crypto-search-shell {
  _background: var(--list-search-bg);
  border-radius: 14px;
  margin-left: -8px;
  transition: border-color 0.15s ease;
}

.crypto-search-input-wrapper {
  position: relative;
}

.crypto-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--text-muted);
  pointer-events: none;
}

.crypto-search-input {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.4;
  padding: 11px 44px 11px 36px;
  outline: none;
  text-transform: uppercase;
}

.crypto-search-input::placeholder {
  color: var(--text-muted);
}

.crypto-search-input::-webkit-search-cancel-button,
.crypto-search-input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
  display: none;
}

.crypto-search-clear {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  background: var(--bg-tertiary);
  border: none;
  border-radius: var(--radius-full);
  color: var(--text-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.crypto-search-clear svg {
  width: 12px;
  height: 12px;
}

.crypto-search-clear.hidden {
  display: none;
}

.contacts-view .search-input {
  padding-right: 44px;
}

/* ── Crypto Section headers ────────────────────────────────────── */
.crypto-section {
  margin: var(--space-2);
}

.crypto-section-header {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--text-primary);
  padding: var(--space-4) var(--space-5);
}

.crypto-section-header::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: var(--list-divider-line, rgba(0,0,0,0.06));
}

/* ── My Crypto rows ────────────────────────────────────────────── */
.crypto-my-list {
  _background: var(--bg-secondary);
  margin: 0 var(--space-2);
  overflow: hidden;
}

.crypto-my-row {
  align-items: center;
}

.crypto-my-amount {
  font-size: var(--list-note-size);
  font-weight: 400;
  color: var(--text-secondary);
  margin-top: 3px;
  opacity: 0.5;
}

.crypto-my-value-block {
  text-align: right;
  flex-shrink: 0;
  line-height: 1.2;
}

.crypto-my-total {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.crypto-my-per-token {
  font-size: var(--list-note-size);
  color: var(--text-primary);
  white-space: nowrap;
  margin-top: 2px;
  opacity: 0.5;
}

/* ── Trade list wrapper ────────────────────────────────────────── */
.crypto-section .crypto-list {
  _background: var(--bg-secondary);
  margin: 0 var(--space-2);
  overflow: hidden;
}

.crypto-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-2);
  _border-bottom: var(--border-width) solid var(--border-subtle);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out);
}

.crypto-row:last-child {
  border-bottom: none;
}

@media (hover: hover) and (pointer: fine) {
  .crypto-row:hover {
  background: var(--bg-tertiary);

  }
}


.crypto-row:active {
  background: var(--bg-elevated);
}


.crypto-row-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  flex-shrink: 0;
}

.crypto-row-name-line {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  margin-bottom: 2px;
  min-width: 0;
}

.crypto-row-name {
  font-size: var(--list-text-size);
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
}

.crypto-row-change {
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
  color: var(--text-primary);
}

.crypto-row-change.positive {
  color: var(--success, #22c55e);
}

.crypto-row-change.negative {
  color: var(--error, #ef4444);
}

.crypto-row-change.neutral {
  color: var(--text-primary);
}

.crypto-row-main {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: var(--space-3);
}

.crypto-row-info {
  flex: 1;
  min-width: 0;
  line-height: 1.2;
}

.crypto-row-identity {
  flex: 1;
  min-width: 0;
}

.crypto-row-symbol-line {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
  min-width: 0;
}

.crypto-row-symbol-large {
  font-size: var(--list-text-size);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  text-transform: uppercase;
  white-space: nowrap;
}

.crypto-row-name-subtle {
  margin-top: 2px;
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.crypto-row-market-cap {
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
}

.crypto-row-value-stack {
  flex: 0 0 auto;
  min-width: 0;
  margin-left: auto;
  text-align: right;
  display: grid;
  gap: 2px;
}

.crypto-row-primary-value {
  font-size: 16px;
  font-weight: 700;
  line-height: 1.15;
  color: var(--text-primary);
  white-space: nowrap;
}

.crypto-row-primary-value.positive,
.crypto-my-total.positive,
.crypto-my-per-token.positive {
  color: var(--success, #22c55e);
}

.crypto-row-primary-value.negative,
.crypto-my-total.negative,
.crypto-my-per-token.negative {
  color: var(--error, #ef4444);
}

.crypto-row-primary-value.neutral,
.crypto-my-total.neutral,
.crypto-my-per-token.neutral {
  color: var(--text-primary);
}

.crypto-row-secondary-value {
  font-size: 12px;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: nowrap;
}

.crypto-row-secondary-value--change.positive {
  color: var(--success, #22c55e);
}

.crypto-row-secondary-value--change.negative {
  color: var(--error, #ef4444);
}

.crypto-row-secondary-value--change.neutral {
  color: var(--text-primary);
}

.crypto-row-info,
.crypto-row-name-line,
.crypto-row-name,
.crypto-row-change,
.crypto-row-meta {
  min-width: 0;
}

.crypto-row-symbol {
  white-space: nowrap;
}

.crypto-row-mcap,
.crypto-row-vol,
.crypto-row-holding,
.crypto-row-holding-amount,
.crypto-row-holding-value,
.crypto-row-price,
.crypto-row-price-value,
.crypto-row-price-unit,
.crypto-my-amount,
.crypto-my-value-block,
.crypto-my-total,
.crypto-my-per-token {
  white-space: nowrap;
}

.crypto-row-arrow {
  flex-shrink: 0;
  color: var(--text-muted);
  opacity: 0.4;
}

.crypto-row-arrow svg {
  width: 16px;
  height: 16px;
}

.crypto-row-trend {
  flex: 0 0 68px;
  width: 68px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: cryptoTrendFadeIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.crypto-row-trend svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.crypto-row-trend-line {
  fill: none;
  stroke: rgba(107, 114, 128, 0.82);
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.crypto-row-trend-dot {
  fill: #2563eb;
  stroke: #ffffff;
  stroke-width: 1.25;
}

.crypto-row-trend--positive .crypto-row-trend-line {
  stroke: rgba(34, 197, 94, 0.78);
}

.crypto-row-trend--negative .crypto-row-trend-line {
  stroke: rgba(239, 68, 68, 0.72);
}

.crypto-row-trend-na {
  flex: 0 0 68px;
  width: 68px;
  text-align: right;
  font-size: 12px;
  font-weight: 600;
  color: rgba(107, 114, 128, 0.55);
}

@keyframes cryptoTrendFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
  .crypto-row-trend,
  .coin-detail-chart-ready-inner {
    animation: none;
  }
}

.crypto-icon-shell {
  --crypto-icon-size: 38px;
  --crypto-icon-fallback-font-size: 16px;
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--crypto-icon-size);
  height: var(--crypto-icon-size);
  flex: 0 0 var(--crypto-icon-size);
}

.crypto-icon-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: var(--crypto-icon-size);
  height: var(--crypto-icon-size);
  border-radius: 999px;
  background: #64748b;
  color: #f8fafc;
  font-size: var(--crypto-icon-fallback-font-size);
  font-weight: 700;
}

.crypto-icon-image {
  position: absolute;
  inset: 0;
  z-index: 1;
  opacity: 0;
  transition: opacity 120ms ease;
}

.crypto-state-card {
  padding: 3rem;
}

.crypto-state-icon {
  width: 48px;
  height: 48px;
  opacity: 0.5;
  margin-bottom: 1rem;
  color: var(--error);
}

.crypto-state-retry {
  margin-top: 1rem;
}

.crypto-empty-search {
  padding: 24px;
  text-align: center;
  color: var(--text-muted);
  font-size: 14px;
}

.crypto-loading-hint {
  padding: 20px 8px 8px;
  text-align: center;
}

.crypto-balance-loading {
  display: inline-block;
}

.crypto-period-note-change.positive {
  color: var(--success, #22c55e);
}

.crypto-period-note-change.negative {
  color: var(--error, #ef4444);
}

.crypto-period-note-separator {
  color: rgba(226, 232, 240, 0.45);
}

.crypto-footer {
  padding: var(--space-2) 0 var(--space-4);
}

.crypto-sheet-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.assets-view-toggle {
  display: flex;
  background: var(--bg-subtle, rgba(0,0,0,0.05));
  border-radius: 6px;
  padding: 2px;
  gap: 1px;
}

.assets-toggle-btn {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 3px 10px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  white-space: nowrap;
}

.assets-toggle-btn.active {
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: 0 1px 2px rgba(0,0,0,0.08);
}

.assets-balance-card {
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0;
  position: relative;
  padding: 12px 16px 16px;
  background: linear-gradient(180deg, #111827 0%, #0b1220 100%);
  border: 1px solid rgba(148, 163, 184, 0.18);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.18);
  color: #f8fafc;
}

.profile-view .assets-balance-card::after {
  z-index: 3;
}

.profile-view .assets-balance-card::before {
  z-index: 4;
}

.assets-compact-total-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0 12px 8px;
  color: var(--text-primary);
  border: 0.5px solid rgba(238, 242, 247, 0.3);
  margin: 0;
  width: 100%;
  background: transparent;
  border-left: 0;
  border-right: 0;
  cursor: pointer;
  position: relative;
  text-align: left;
  background: var(--dark-section-bg);
  border-radius: var(--radius-full);
}

.assets-compact-total-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: white;
  padding-left: 12px;
}

.assets-compact-total-value {
  font-size: 26px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: white;
  text-align: right;
  white-space: nowrap;
  padding: 12px 12px;
  padding-right: 18px;
  padding-bottom: 0;
}

.assets-compact-total-value-wrap {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.assets-compact-total-row .assets-total-check {
  position: absolute;
  top: 19px;
  right: -12px;
  transform: none;
  flex: 0 0 auto;
}

.profile-view .assets-balance-card .assets-view-toggle {
  position: absolute;
  top: 10px;
  right: 8px;
  left: auto;
  margin: 0;
  z-index: 2;
}

.profile-view .assets-balance-total.is-shuffling {
  filter: blur(1.4px);
  transform: translateY(-1px) scale(1.03);
  letter-spacing: 0.7px;
}

.profile-view .assets-balance-total .stat-digit {
  display: inline-block;
  min-width: 0.3em;
}

.profile-view .assets-balance-total .stat-digit.changed {
  animation: statDigitSettle 340ms cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--d, 0) * 20ms);
}

.assets-balance-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.72);
  padding-right: 170px;
  margin-bottom: 12px;
}

.assets-balance-total {
  font-size: 32px;
  line-height: 1;
  font-weight: 800;
  color: #ffffff;
  letter-spacing: -0.03em;
}

.assets-balance-top-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.assets-balance-block {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.assets-balance-action-btn {
  border: none;
  background: transparent;
  color: rgba(255, 255, 255, 0.72);
  border-radius: 999px;
  padding: 6px 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  flex: 0 0 auto;
}

.assets-balance-refresh-btn {
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.78);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex: 0 0 auto;
}

@media (hover: hover) and (pointer: fine) {
  .assets-balance-refresh-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;

  }
}


.assets-balance-refresh-btn:disabled,
.assets-balance-refresh-btn[aria-disabled="true"] {
  cursor: wait;
  opacity: 0.74;
}

.assets-balance-refresh-btn svg {
  width: 16px;
  height: 16px;
}

.assets-balance-refresh-btn.is-loading svg {
  animation: assetsBalanceRefreshSpin 820ms linear infinite;
}

.assets-balance-refresh-btn--compact {
  width: 30px;
  height: 30px;
  background: rgba(20, 18, 13, 0.08);
  color: var(--assets-total-row-fg);
}

.assets-balance-refresh-btn--label {
  width: 24px;
  height: 24px;
  background: rgba(255, 255, 255, 0.1);
}

.assets-balance-refresh-btn--label svg,
.assets-balance-refresh-btn--compact svg {
  width: 14px;
  height: 14px;
}

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

.assets-balance-action-btn svg {
  width: 14px;
  height: 14px;
  opacity: 0.9;
}

.assets-balance-note {
  font-size: 12px;
  color: rgba(226, 232, 240, 0.82);
  line-height: 1.45;
  opacity: 0.6;
  padding-right: 24px;
}

.assets-search {
  margin-top: 14px;
}

.assets-search-shell {
  background: rgba(255, 255, 255, 0.15);
  border-radius: 14px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.assets-search-shell.is-expanded,
.assets-search-shell:focus-within {
  border-color: rgba(226, 232, 240, 0.54);
  box-shadow: 0 0 0 3px rgba(226, 232, 240, 0.12);
}

.assets-search-input-wrapper {
  position: relative;
  z-index: 2;
}

.assets-search-icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: rgba(226, 232, 240, 0.68);
  pointer-events: none;
}

.assets-search-input {
  width: 100%;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #ffffff;
  font-size: 14px;
  line-height: 1.4;
  padding: 12px 12px 11px 38px;
  outline: none;
  box-shadow: none;
}

.assets-search-input::placeholder {
  color: rgba(226, 232, 240, 0.58);
}

.assets-allocation-card {
  margin-top: 6px;
  overflow: visible;
}

.assets-allocation-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 16px;
}

.assets-allocation-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.assets-allocation-bar {
  display: flex;
  display: none;
  align-items: stretch;
  gap: 3px;
  height: 5px;
  margin: 3px 6px 0 6px;
  border-radius: 999px;
  background: rgba(226, 232, 240, 0.9);
  overflow: hidden;
}

.assets-allocation-bar-segment {
  display: block;
  height: 100%;
  min-width: 0;
}

.assets-allocation-bar-segment--banks,
.assets-allocation-dot--banks {
  background: #1f2937;
}

.assets-allocation-bar-segment--stablecoins,
.assets-allocation-dot--stablecoins {
  background: #6b7280;
}

.assets-allocation-bar-segment--other,
.assets-allocation-dot--other {
  background: #9ca3af;
}

.assets-allocation-list {
  display: flex;
  flex-direction: column;
  padding-bottom: 0;
  padding-right: 12px;
  padding-left: 30px;
}

#managed-wallets-section {
  margin: 0;
}
.assets-allocation-row {
  width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 2px 34px 4px 6px;
  border: 0;
  _border-top: 1px solid var(--border-subtle);
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease;
  position: relative;
}

.assets-allocation-row:first-child {
  border-top: 0;
}

/*
.assets-allocation-row:hover {
  background: color-mix(in srgb, var(--text-primary) 7%, transparent);
}

.assets-allocation-row:active {
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
}
.assets-allocation-row.is-active {
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
}
*/

.assets-allocation-row-main {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.assets-allocation-copy {
  min-width: 0;
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}

.assets-allocation-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  flex: 0 0 auto;
  border: 0.5px solid rgba(238, 242, 247, 0.6);
}

.assets-allocation-label {
  min-width: 0;
  font-size: var(--list-note-size);
  color: var(--text-primary);
}

.assets-allocation-percent {
  font-size: var(--list-note-size);
  font-weight: 600;
  color: var(--text-muted);
  white-space: nowrap;
}

.assets-allocation-value {
  font-size: var(--list-text-size);
  color: var(--text-primary);
  white-space: nowrap;
  justify-self: end;
  text-align: right;
}

.assets-allocation-check {
  width: 22px;
  height: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid rgba(203, 213, 225, 0.95);
  color: transparent;
  background: rgba(255, 255, 255, 0.9);
  opacity: 1;
  transition: opacity 0.15s ease, color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
  position: absolute;
  top: calc(50% - 2px);
  right: 4px;
  transform: translateY(-50%);
  pointer-events: none;
  z-index: 1;
}

.assets-allocation-check svg {
  width: 12px;
  height: 12px;
  opacity: 0;
}

.assets-allocation-check.is-visible {
  opacity: 1;
  color: var(--text-primary);
  border-color: var(--text-primary);
  background: var(--bg-elevated);
  color: white;
  background: black;
  border: 1px solid white;
}

.assets-allocation-check.is-visible svg {
  opacity: 1;
}

.assets-search-filters {
  --assets-filter-index: 0;
  --assets-filter-count: 4;
  display: flex;
  align-items: stretch;
  gap: 0;
  position: relative;
  margin-top: 4px;
  padding: 2px;
  border-radius: 11px;
  background: var(--bg-tertiary);
  overflow: hidden;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.assets-search-shell.is-expanded .assets-search-filters,
.assets-search-shell:focus-within .assets-search-filters {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.assets-search-filters-slider {
  position: absolute;
  top: 2px;
  left: 2px;
  width: calc((100% - 4px) / var(--assets-filter-count));
  height: calc(100% - 4px);
  border-radius: 9px;
  background: var(--bg-elevated);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
  transform: translateX(calc(var(--assets-filter-index) * 100%));
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.assets-search-filter-tab {
  position: relative;
  z-index: 1;
  flex: 1 1 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  padding: 8px 4px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.1;
  border-radius: 9px;
  cursor: pointer;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.assets-search-filter-tab.active {
  color: var(--text-primary);
}

.assets-search-filter-tab .filter-count-badge {
  position: static;
  margin-left: 2px;
  font-size: 10px;
  font-weight: 600;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: rgba(12, 17, 24, 0.7);
  border: 1px solid rgba(226, 234, 246, 0.7);
  color: rgba(245, 249, 255, 0.95);
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.35);
  line-height: 1;
  flex-shrink: 0;
}

.assets-search-filter-tab.active .filter-count-badge {
  background: rgba(9, 13, 19, 0.95);
  border: 1px solid rgba(250, 253, 255, 0.9);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 0 10px rgba(182, 198, 224, 0.38);
}

.assets-balance-breakdown {
  display: flex;
  flex-direction: column;
}

.assets-balance-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.assets-balance-row-main {
  min-width: 0;
  flex: 1 1 auto;
}

.assets-balance-row-label {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-primary, #111827);
}

.assets-balance-row-subtitle {
  font-size: 12px;
  color: var(--text-muted, #6b7280);
  margin-top: 2px;
}

.assets-balance-row-value {
  flex: 0 0 auto;
  text-align: right;
  font-size: 16px;
  font-weight: 700;
  color: var(--text-primary, #111827);
  white-space: nowrap;
}

.asset-type-card {
  padding: 0 !important;
  margin-bottom: 0 !important;
  position: relative;
}

.asset-type-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--list-divider-line, rgba(0,0,0,0.06));
  pointer-events: none;
}

[data-theme="dark"] .asset-type-card::after {
  background: rgba(238, 242, 247, 0.2);
}

.profile-view .assets-type-list-group {
  margin: 0 0 24px;
  position: relative;
}

.profile-view .assets-type-group-surface {
  --assets-group-surface-bg: rgba(255, 255, 255, 0.1);
  --assets-group-footer-bg: rgba(255, 255, 255, 0.34);
  --assets-group-tab-bg: #fff;
  --assets-group-line: color-mix(in srgb, var(--border-gold-strong) 70%, transparent);
  position: relative;
  background: var(--assets-group-surface-bg);
  border: 0.5px solid var(--border-gold-strong);
  border-radius: 24px;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}

.profile-view .assets-type-group-header.activity-date {
  display: flex !important;
  padding-left: 18px !important;
}

:is(#assets-balance-section, .assets-balance-section) {
  border-bottom: none !important;
  background: none !important;
}
.asset-type-row {
  padding: 12px 0 12px 6px !important;
}

:is(#assets-balance-section, .assets-balance-section) {
  padding: 0 !important; 
  margin: 0 !important;
  border: 0.5px solid var(--border-gold-strong) !important;
  margin-bottom: 24px !important;
  box-shadow: var(--shadow-sm) !important;
}

.profile-view .assets-type-group-footer {
  display: flex !important;
}
.profile-view .assets-type-list-group:first-of-type {
  margin-top: 0;
}

.profile-view .assets-type-group-items {
  display: flex;
  flex-direction: column;
  padding: 0 15px;
  position: relative;
  z-index: 1;
}

.profile-view .assets-type-group-header.activity-date {
  position: relative;
  z-index: 1;
}

.profile-view .assets-type-group-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 54px;
  padding: 0 14px 0 20px;
  position: relative;
  z-index: 1;
  background: transparent;
}

.profile-view .assets-type-list-group:not(.is-empty) .assets-type-group-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 20px;
  right: 20px;
  height: 1px;
  background: var(--list-divider-line, rgba(0,0,0,0.06));
  opacity: 0.5;
  pointer-events: none;
  z-index: 1;
}

.profile-view .assets-type-list-group.is-empty .assets-type-group-footer {
  margin-top: 0;
}

.profile-view .assets-type-list-group.is-empty .assets-type-group-header.activity-date {
  padding-bottom: 12px;
  padding-left: 12px;
  padding-right: 14px;
}

.profile-view .assets-type-list-group.is-empty .assets-type-group-header.activity-date .assets-type-group-action {
  margin-left: auto;
  flex: 0 0 auto;
}

.profile-view .assets-type-group-total {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 10px 0 12px;
  min-width: 0;
  position: relative;
  z-index: 1;
}

.profile-view .assets-type-group-total-label {
  font-size: 9px;
  font-weight: 800;
  color: var(--text-muted);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.profile-view .assets-type-group-total-value {
  font-size: var(--list-text-size);
  font-weight: 850;
  color: var(--text-primary);
  line-height: 1.05;
}

.profile-view .assets-type-group-action {
  z-index: 2;
  left: 0;
}

.profile-view .assets-type-group-action-label {
  display: inline-block;
  padding-right: 2px;
}

[data-theme="dark"] .profile-view .assets-type-group-action.dark-pill-action {
  color: #f8fafc;
  background: transparent;
  border: 1px solid rgba(238, 242, 247, 0.35);
  box-shadow: none;
}

[data-theme="dark"] .profile-view .assets-type-group-action.dark-pill-action:active {
  background: transparent;
  box-shadow: none;
}

[data-theme="dark"] .profile-view .assets-type-group-action .dark-pill-action__icon,
[data-theme="dark"] .profile-view .assets-type-group-action.dark-pill-action > svg {
  background: transparent;
  color: #f8fafc;
  border: 1px solid rgba(238, 242, 247, 0.35);
  box-shadow: none;
}

[data-theme="dark"] .profile-view .assets-type-group-surface {
  --assets-group-surface-bg: rgba(15, 23, 42, 0.42);
  --assets-group-footer-bg: rgba(15, 23, 42, 0.45);
  --assets-group-tab-bg: #0f172a;
  --assets-group-line: rgba(248, 250, 252, 0.2);
  border-color: rgba(248, 250, 252, 0.2);
}

.profile-view .assets-type-group-header.activity-date {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 2px 4px;
  font-size: 11px;
  font-weight: 700;
  color: #8a95a8;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  display: none;
}

.profile-view .assets-type-group-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex: 0 0 auto;
  border: 0.5px solid rgba(255,255,255,0.5)
}

.profile-view .assets-type-group-dot--banks {
  background: #1f2937;
}

.profile-view .assets-type-group-dot--stablecoins {
  background: #6b7280;
}

.profile-view .assets-type-group-dot--other {
  background: #9ca3af;
}

.profile-view .assets-type-group-header.activity-date::after {
  content: '';
  opacity: 0.5;
  flex: 1 1 auto;
  height: 1px;
  background: var(--list-divider-line, rgba(0,0,0,0.06));
}

.asset-type-row {
  --assets-tab-icon-size: 30px;
  display: flex;
  align-items: center;
  gap: var(--space-3);
  cursor: pointer;
  margin-right: 0 !important;
  transition: background 120ms ease;
  border-radius: 14px;
}

@media (hover: hover) and (pointer: fine) {
  .asset-type-row:hover {
  _background: color-mix(in srgb, var(--text-primary) 7%, transparent);

  }
}


.asset-type-row:active {
  _background: color-mix(in srgb, var(--text-primary) 10%, transparent);
  transform: scale(0.99);
}

.asset-type-row .linked-account-icon,
.asset-type-row .linked-account-icon-img {
  width: var(--assets-tab-icon-size);
  height: var(--assets-tab-icon-size);
  font-size: 14px;
}

.asset-type-row .asset-type-icon-shell {
  width: var(--assets-tab-icon-size);
  height: var(--assets-tab-icon-size);
  flex: 0 0 var(--assets-tab-icon-size);
}

.wallet-source-icon-img {
  object-fit: cover;
  background: transparent;
  border: 0;
  padding: 0;
}

.linked-account-icon-img.wallet-source-icon-img {
  width: 32px;
  height: 32px;
}

.source-row {
  gap: var(--space-2);
  padding-left: 0 !important;
}

.source-row .linked-sub-label {
  flex: 1;
  min-width: 0;
  text-align: left;
}

.source-row-text {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 1px;
  padding-left: 10px;
}

.source-row-note {
  font-size: 11px;
  line-height: 1.2;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.source-row-icon {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.source-icon-img {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  object-fit: contain;
  background: #fff;
  border: 1.5px solid #111827;
  padding: 2px;
  box-sizing: border-box;
}

.source-icon-fallback {
  width: 20px;
  height: 20px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 700;
  color: #111827;
  background: #fff;
  border: 1.5px solid #111827;
  box-sizing: border-box;
}

.source-icon-fallback.bank {
  color: #111827;
}

.source-icon-fallback.bank svg,
.source-icon-fallback.managed svg {
  width: 12px;
  height: 12px;
}

.source-icon-fallback.wallet {
  color: #047857;
}

:is(#assets-balance-section, .assets-balance-section) {
  border-radius: 24px;
  margin: 0;
  padding: 0;
  padding-bottom: 24px;
  border-bottom: 1px solid #ddd;
}

[data-theme="dark"] :is(#assets-balance-section, .assets-balance-section) {
  border-bottom-color: rgba(238, 242, 247, 0.06);
}

.linked-accounts-section:empty {
  display: none;
}

.linked-group {
  margin-bottom: var(--space-3);
}

.linked-group-header {
  display: none;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
  padding: 0 3px;
}

.profile-grid {
  padding: 0 4px;
}

.linked-account-card {
  margin-bottom: 0;
  position: relative;
}

.no-divider-card {
  padding-top:5px;
  padding-bottom:15px;
}

.linked-account-card::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--list-divider-line, rgba(0,0,0,0.06));
  background: #ddd;
  pointer-events: none;
}

[data-theme="dark"] .linked-account-card::after {
  background: rgba(238, 242, 247, 0.075);
}

.linked-account-card:last-child::after,
.linked-account-card.no-divider-card::after {
  display: none;
}

.profile-view .assets-type-group-items > .asset-type-card::after {
  content: '';
  display: block;
  position: absolute;
  /* Match .assets-type-group-items horizontal padding (15–16px), not safe+42. */
  left: -16px;
  right: -16px;
  bottom: 0;
  height: 1px;
  background: #eee;
  pointer-events: none;
}

[data-theme="dark"] .profile-view .assets-type-group-items > .asset-type-card::after {
  background: rgba(238, 242, 247, 0.06);
}

.linked-empty-action {
  padding: 0;
}

.linked-empty-action::after {
  left: 0;
}

.linked-empty-action-inner {
  display: flex;
  flex-direction: column;
}

.linked-empty-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 14px 0;
}

.linked-empty-row + .linked-empty-row {
  border-top: 1px solid var(--list-divider-line, rgba(0,0,0,0.06));
}

.linked-empty-copy {
  flex: 1;
  min-width: 0;
  display: grid;
  gap: 3px;
}

.linked-empty-title {
  font-size: var(--list-text-size, 15px);
  font-weight: var(--list-text-weight, 600);
  color: var(--text-primary);
  line-height: 1.2;
}

.linked-empty-note {
  font-size: var(--list-note-size, 12px);
  color: var(--text-muted);
  opacity: 0.82;
  line-height: 1.25;
}

.linked-empty-note strong {
  font-weight: 700;
}

.linked-empty-icon-wallet {
  color: white;
}

.linked-empty-action-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 16px;
  border: none;
  border-radius: 16px;
  background: #111827;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  flex-shrink: 0;
}

.linked-empty-action-btn:active {
  transform: translateY(1px);
}

.linked-account-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: 13px 2px 4px 0;
  position: relative;
}

.linked-account-divider {
  display: none;
}

.linked-account-icon-img {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
  object-fit: contain;
  background: #fff;
  border: 1.5px solid #111827;
  padding: 6px;
  box-sizing: border-box;
}

/* CoinGecko / token logos are already circular — fill the shell (no white pad). */
.linked-account-icon-img.crypto-asset-icon-img,
.source-icon-img.crypto-asset-icon-img,
.asset-type-row .crypto-asset-icon-img {
  object-fit: cover;
  background: transparent;
  border: 0;
  padding: 0;
}

.asset-type-row .linked-account-icon-img.crypto-asset-icon-img {
  width: var(--assets-tab-icon-size);
  height: var(--assets-tab-icon-size);
}

.linked-account-icon {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
  color: #eee;
  background: #333;
  border: 1.5px solid rgb(159, 159, 159);
  box-sizing: border-box;
}

.linked-account-icon.wallet {
  color: white;
}

#managed-wallets-section .linked-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.linked-account-name {
  font-size: var(--list-text-size, 15px);
  font-weight: var(--list-text-weight, 600);
  color: var(--text-primary);
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1;
}

.linked-account-menu-btn {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  border: none;
  background: var(--bg-subtle, rgba(0,0,0,0.06));
  color: var(--text-muted, #6b7280);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1px;
  line-height: 1;
  flex-shrink: 0;
  transition: background 0.15s;
  position: relative;
}

@media (hover: hover) and (pointer: fine) {
  .linked-account-menu-btn:hover {
  background: var(--bg-elevated, rgba(0,0,0,0.08));
  color: var(--text-primary, #1a1a1a);

  }
}


.linked-method-popup {
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 4px;
  background: var(--bg-primary, #fff);
  border: 1px solid var(--border-default, rgba(0,0,0,0.12));
  border-radius: var(--radius-md, 8px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.12);
  z-index: 20;
  min-width: 140px;
  padding: 4px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
  transition: opacity 0.15s, transform 0.15s;
}

.linked-method-popup.open {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.linked-method-popup-item {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: none;
  background: none;
  cursor: pointer;
  font-size: 13px;
  font-family: var(--app-font-stack);
  color: var(--text-danger, #dc2626);
  border-radius: var(--radius-sm, 6px);
  transition: background 0.12s;
}

@media (hover: hover) and (pointer: fine) {
  .linked-method-popup-item:hover {
  background: var(--bg-subtle, rgba(0,0,0,0.04));

  }
}


.linked-method-popup-item svg {
  width: 14px;
  height: 14px;
}

.linked-sub-account {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px var(--space-1) 12px;
  border-top: none;
}

.qiiro-managed-group-card {
  cursor: default;
}

.qiiro-managed-group-card .linked-account-header {
  padding-bottom: 10px;
}

.qiiro-managed-subwallet {
  display: block;
  padding-bottom: 10px;
  cursor: pointer;
}

.qiiro-managed-subwallet + .qiiro-managed-subwallet {
  border-top: 1px solid var(--list-divider-line, rgba(0,0,0,0.06));
}

.qiiro-managed-subwallet-copy {
  display: grid;
  gap: 4px;
}

.qiiro-managed-subwallet-name {
  font-size: var(--list-text-size);
  color: var(--text-primary);
  line-height: 1.9;
}

.qiiro-managed-subwallet-walletref {
  font-weight: 600;
}

.qiiro-managed-subwallet-meta {
  color: var(--text-muted);
}

.qiiro-managed-subwallet-meta a {
  color: var(--gold-600);
  text-decoration: none;
}

.qiiro-managed-subwallet-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.2;
}

.qiiro-managed-subwallet-line-value {
  font-weight: 700;
  font-size: var(--list-text-size, 16px);
  color: var(--text-primary);
  text-align: right;
  white-space: nowrap;
}

.by-source-asset-line-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
}

.by-source-asset-line-copy {
  padding-left: 6px;
  font-size: 12px;
  min-width: 0;
}

.by-source-asset-line-icon {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  flex: 0 0 18px;
  object-fit: cover;
  background: transparent;
  border: 0;
  padding: 0;
}

.by-source-asset-line-icon-fallback {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 18px;
  font-size: 10px;
  font-weight: 700;
  color: #f8fafc;
  background: #64748b;
}

.qiiro-managed-subwallet-line-value.negative {
  color: var(--error, #b42318);
}

.linked-sub-label {
  font-size: var(--list-note-size, 12px);
  color: var(--text-primary);
  opacity: 0.5;
  line-height: 1.15;
}

.linked-sub-label .sub-last4 {
  opacity: 0.7;
  font-size: 11px;
}

.sub-last4.sub-last4--negative {
  color: var(--error, #b42318);
}

.linked-sub-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) 0;
}

.linked-sub-action-row .linked-sub-label {
  flex: 1;
  min-width: 0;
}

/* Bank re-auth / link status — quiet list treatment, one CTA, no amber box. */
.bank-link-status-inline {
  display: grid;
  gap: 8px;
  margin: 4px 0 2px;
  padding: 0 2px;
}

.bank-link-status-inline-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.bank-link-status-inline-copy {
  flex: 1;
  min-width: 0;
  color: var(--text-secondary, rgba(15, 23, 42, 0.62));
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.bank-link-status-accounts {
  display: grid;
  gap: 2px;
  padding: 0 0 4px;
}

.asset-type-card--bank-link-status .bank-link-status-accounts {
  padding: 0 14px 12px 58px;
}

.bank-link-status-account-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-height: 28px;
  padding: 4px 0;
}

.bank-link-status-account-name {
  flex: 1;
  min-width: 0;
  color: var(--text-primary, #0f172a);
  font-size: 13px;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

.bank-link-status-account-tag {
  flex-shrink: 0;
  color: var(--text-tertiary, rgba(15, 23, 42, 0.45));
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.asset-type-card--bank-link-status.is-attention {
  position: relative;
}

.asset-type-card--bank-link-status.is-attention::before {
  content: '';
  position: absolute;
  left: 0;
  top: 10px;
  bottom: 10px;
  width: 2px;
  border-radius: 2px;
  background: var(--error, #f55e5e);
}

.asset-type-row--bank-link-status {
  cursor: default;
  gap: 10px;
  align-items: center;
}

.asset-type-row--bank-link-status:active {
  transform: none;
}

.asset-type-row--bank-link-status .bank-link-relink-btn {
  align-self: center;
  margin-top: 0;
  margin-right: 2px;
}

.asset-type-row--whop-link-status {
  gap: 10px;
  align-items: center;
}

.asset-type-row--whop-link-status .asset-type-total {
  display: flex;
  align-items: center;
  margin-right: 0;
  left: 0;
}

.asset-type-row--whop-link-status .asset-type-total-value--status {
  font-size: var(--list-text-size, 15px);
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: 0;
}

.asset-type-total-value--status {
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.asset-type-chevron--spacer {
  visibility: hidden;
  pointer-events: none;
}

.bank-link-relink-btn {
  appearance: none;
  border: 1px solid color-mix(in srgb, var(--text-primary, #0f172a) 14%, transparent);
  background: color-mix(in srgb, var(--text-primary, #0f172a) 4%, transparent);
  color: var(--text-primary, #0f172a);
  border-radius: 999px;
  padding: 7px 14px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0.01em;
  flex-shrink: 0;
  white-space: nowrap;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .bank-link-relink-btn:hover {
  background: color-mix(in srgb, var(--text-primary, #0f172a) 8%, transparent);

  }
}


.bank-link-relink-btn:active {
  transform: scale(0.98);
}

/* Legacy class kept for Whop / other callouts still using the soft panel. */
.bank-link-status-callout {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  box-sizing: border-box;
  margin: 8px 0 2px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--text-primary, #0f172a) 10%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--text-primary, #0f172a) 3.5%, transparent);
}

.bank-link-status-callout .linked-sub-action-btn,
.bank-link-status-callout .bank-link-relink-btn {
  margin-top: 1px;
}

.bank-link-status-callout-copy {
  flex: 1;
  min-width: 0;
  color: var(--text-secondary, rgba(15, 23, 42, 0.72));
  font-size: 12px;
  font-weight: 500;
  line-height: 1.35;
}

.bank-link-status-callout-message {
  margin: 0;
}

.bank-link-status-account-list {
  list-style: none;
  margin: 6px 0 0;
  padding: 0;
  display: grid;
  gap: 3px;
}

.bank-link-status-account-list li {
  color: var(--text-primary, rgba(15, 23, 42, 0.88));
  font-size: 12px;
  font-weight: 600;
  line-height: 1.3;
}

.bank-link-status-account-list li::before {
  content: '•';
  margin-right: 6px;
  color: var(--text-tertiary, rgba(15, 23, 42, 0.45));
}

.linked-sub-action-btn {
  border: 1px solid color-mix(in srgb, var(--text-primary, #0f172a) 14%, transparent);
  background: color-mix(in srgb, var(--text-primary, #0f172a) 4%, transparent);
  color: var(--text-primary, #0f172a);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  flex-shrink: 0;
  white-space: nowrap;
  flex: 0 0 auto;
}

.linked-sub-balance {
  font-size: var(--list-text-size, 12px);
  color: var(--text-primary);
  text-align: right;
}

.linked-sub-balance .balance-label {
  display: none;
}

.linked-accounts-loading {
  font-size: 12px;
  color: var(--text-muted);
  padding: var(--space-2) var(--space-1);
}

.profile-view .header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex: 1;
}

.profile-view .waitlist-copy-block {
  margin-top: var(--space-4);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--space-2);
  padding: 0 var(--space-5);
}

.profile-view .waitlist-copy-title {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
}

.profile-view .waitlist-copy-subtitle {
  max-width: 320px;
  font-size: 14px;
  line-height: 1.45;
  color: var(--text-muted);
}

.profile-view .waitlist-copy-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: var(--space-2);
}

.profile-view .waitlist-sign-out-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--text-primary);
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}

.profile-view .waitlist-delete-account-link {
  color: var(--danger-500, #dc2626);
}

.profile-view .waitlist-copy-action-sep {
  color: var(--text-muted);
}

.profile-view .waitlist-admin-footer {
  flex-basis: 100%;
  margin-top: var(--space-3);
}

.profile-view .waitlist-unwaitlist-link {
  border: none;
  background: none;
  padding: 0;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.profile-view .linked-accounts-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.profile-view .fund-account-cta-row {
  margin: 0;
  padding: 0 0 14px;
}

.transfer-view .fund-account-cta-row {
  margin: 10px 0 2px;
  padding: 0;
}

.profile-view .fund-account-cta-row .invite-contact-item,
.transfer-view .fund-account-cta-row .invite-contact-item {
  width: 100%;
  margin: 0;
}

.transfer-view .fund-account-cta-row .invite-contact-item {
  align-items: center;
  box-shadow: none;
  overflow: visible;
  /* Beat .transfer-view .transaction-item { padding-bottom: 0 !important } */
  padding: 12px !important;
}

.transfer-view .fund-account-cta-row .invite-contact-item::before,
.transfer-view .fund-account-cta-row .invite-contact-item::after {
  display: none;
}

.transfer-view .fund-account-cta-row .invite-contact-item .avatar::before,
.transfer-view .fund-account-cta-row .invite-contact-item .avatar::after {
  display: none;
}

.transfer-view .fund-account-cta-row .invite-contact-item .activity-user-action-btn {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  flex-shrink: 0;
}

.transfer-view .fund-account-cta-row .invite-contact-item .activity-user-action-btn svg {
  width: 16px;
  height: 16px;
}

.fund-account-sheet {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fund-account-method-picker {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.fund-account-bottom-sheet #sheet-title.fund-account-sheet-title {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  line-height: 1.15;
}

.fund-account-bottom-sheet .fund-account-sheet-title__main {
  display: block;
  font-size: inherit;
  font-weight: inherit;
  color: inherit;
}

.fund-account-bottom-sheet .fund-account-sheet-title__sub {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--accent-alert, #0fc41b);
}

.fund-account-bottom-sheet .bottom-sheet__content {
  will-change: height;
  transition:
    transform var(--duration-sensual) var(--ease-sensual),
    height 320ms cubic-bezier(0.22, 1, 0.36, 1);
}

.profile-view .assets-link-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  margin-top: var(--space-3);
}

.profile-view .assets-link-actions .glossy-black-btn {
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
  font-size: var(--list-text-size);
  margin-top: 10px;
  padding: 16px 16px;
}

.move-crypto-sheet {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 2px 0 6px;
}

.move-crypto-bottom-sheet .move-crypto-provider {
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.move-crypto-bottom-sheet .move-crypto-provider-label {
  flex: 0 0 auto;
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--text-primary);
  white-space: nowrap;
}

.move-crypto-bottom-sheet .move-crypto-provider-actions {
  display: flex;
  flex: 1 1 auto;
  flex-direction: row;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  min-width: 0;
}

.move-crypto-bottom-sheet .move-crypto-provider-actions .btn {
  flex: 1 1 0;
  min-width: 96px;
  max-width: 132px;
  width: auto;
  min-height: 44px;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 14px;
}

.move-crypto-bottom-sheet .bottom-sheet__body {
  padding-top: 20px;
}

.profile-view .linked-accounts-logo {
  margin-left: 0;
  justify-content: flex-start;
  flex: 0 1 auto;
}

.profile-view .profile-header-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
  flex: 0 0 auto;
}

.profile-view .profile-primary-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-2);
}

.profile-view .profile-header-text-btn {
  border: none;
  background: transparent;
  color: #5c6678;
  font-size: var(--list-text-size);
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 4px 2px;
  opacity: 0.5;
  cursor: pointer;
}

.profile-view .profile-top-actions {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: var(--space-5) auto var(--space-6);
  align-items: center;
  gap: 8px;
}

.impersonation-banner {
  position: sticky;
  top: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: #1a1a1a;
  background: #e8c56a;
  border-bottom: 1px solid color-mix(in srgb, #1a1a1a 12%, transparent);
}

.impersonation-banner.hidden,
.impersonation-banner[hidden] {
  display: none;
}

body.impersonation-active .app {
  padding-top: 0;
}

@media (min-width: 768px) {
  body.impersonation-active .app:not(.app-no-nav) {
    padding-top: var(--app-desktop-nav-offset);
  }
}

.pending-requests-banner {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-4);
  background: var(--bg-elevated);
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-3);
}

/* Run entrance only when JS adds this class (hidden → visible), so repeat renders
   do not replay the open animation — fixes double-play on Activity first load. */
.pending-requests-banner.pending-requests-banner--enter {
  overflow: hidden;
  animation: pendingBannerOpen 0.34s var(--ease-out);
}

.pending-requests-banner.hidden {
  display: none;
}

/* Shared emphasis for top-of-tab callouts (e.g. Activity connection requests, Contacts new activity). */
.pending-requests-banner.pending-requests-banner--callout {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--gold-400) 15%, transparent),
    color-mix(in srgb, var(--gold-400) 8%, transparent)
  );
  border-color: var(--gold-400);
}

.pending-requests-banner.pending-requests-banner--callout .pending-icon {
  background: #000;
}

.pending-requests-banner.pending-requests-banner--callout .pending-icon svg {
  stroke: #fff;
}

.pending-requests-banner.pending-requests-banner--callout .pending-icon.pending-icon--coin {
  background: transparent;
  overflow: hidden;
}

.pending-requests-banner.pending-requests-banner--callout .pending-icon.pending-icon--coin svg {
  display: none;
}

.pending-requests-banner.pending-requests-banner--callout .pending-icon img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  display: block;
}

.pending-requests-banner.pending-requests-banner--callout .pending-icon:not(.pending-icon--coin) img,
.pending-requests-banner.pending-requests-banner--callout .pending-icon img:not([src]) {
  display: none;
}

@keyframes pendingBannerOpen {
  from {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(-10px);
  }

  to {
    max-height: 160px;
    padding-top: var(--space-4);
    padding-bottom: var(--space-4);
    margin-bottom: var(--space-3);
    opacity: 1;
    transform: translateY(0);
  }
}

.pending-icon {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  background: var(--gold-shine);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pending-icon svg {
  width: 20px;
  height: 20px;
  stroke: var(--text-inverse);
}

.pending-content {
  flex: 1;
  min-width: 0;
}

.pending-title {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 2px;
}

.pending-subtitle {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.section.profile-trust-section {
  margin-top: 64px;
  display: none;
}

.asset-list-header {
  padding: var(--space-3) var(--space-4) var(--space-2);
  padding-left: 0;
  border-bottom: 1px solid var(--border-subtle);
}

.asset-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-5) 0;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: opacity var(--duration-fast);
}

[data-theme="dark"] .asset-list-header,
[data-theme="dark"] .asset-row {
  border-color: rgba(238, 242, 247, 0.055);
}

.asset-row:last-child {
  border-bottom: none;
}

.asset-row:active {
  opacity: 0.7;
}

.asset-icon {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
}

.asset-icon.qrdc-preview { background: linear-gradient(135deg, #10B981, #059669); }
.asset-icon.qrdc-test { background: linear-gradient(135deg, #0F766E, #115E59); }
.asset-icon.qrdc { background: linear-gradient(135deg, var(--gold-400), var(--gold-600)); }
.asset-icon.qrc { background: linear-gradient(135deg, #6366F1, #4F46E5); }
.asset-icon.usdc { background: linear-gradient(135deg, #2563EB, #1D4ED8); }
.asset-icon.eth { background: linear-gradient(135deg, #627EEA, #3C4FBD); }
.asset-icon.hbar { background: linear-gradient(135deg, #222222, #454545); }
.asset-icon.sol { background: linear-gradient(135deg, #9945FF, #14F195); }
.asset-icon.default { background: linear-gradient(135deg, #64748B, #475569); }

.asset-icon-letter {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.02em;
}

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

.asset-name {
  font-size: 15px;
  font-weight: 600;
  color: #1a2332;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-ticker-row {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  margin-top: 2px;
}

.asset-ticker {
  font-size: 12px;
  color: #617089;
}

.asset-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 5px;
  border-radius: var(--radius-sm);
  background: color-mix(in srgb, var(--gold-400) 15%, transparent);
  color: var(--gold-600);
  letter-spacing: 0.04em;
}

.asset-balance {
  text-align: right;
  flex: 0 0 auto;
}

.asset-amount {
  font-size: 15px;
  font-weight: 600;
  color: #1a2332;
}

.asset-sub {
  font-size: 12px;
  color: #617089;
  margin-top: 2px;
}

.asset-chevron {
  flex: 0 0 auto;
  color: #b0bac8;
}

.profile-view .trust-card .text-muted {
  color: #617089;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.profile-view .trust-card #trust-level,
.profile-view .trust-card #connection-count {
  color: #293344;
  font-weight: 700;
}

.escrow-summary {
  /* Bleed exactly to the view edges — never more than .view horizontal padding. */
  margin-left: calc(-1 * (var(--safe-left) + var(--space-4)));
  margin-right: calc(-1 * (var(--safe-right) + var(--space-4)));
  margin-bottom: var(--space-4);
  padding: var(--space-3) calc(var(--safe-left) + var(--space-4) + var(--space-3));
  padding-right: calc(var(--safe-right) + var(--space-4) + var(--space-3));
  background: var(--gold-300);
  border: var(--border-width) solid var(--border-subtle);
  box-shadow: inset 0 2px 8px rgba(82, 88, 99, 0.40);
  cursor: pointer;
  overflow: hidden;
  transition: all var(--duration-fast);
  animation: escrowSummaryOpen 360ms cubic-bezier(0.22, 1, 0.36, 1) both;
  transform-origin: top center;
}

.escrow-summary:active {
  transform: scale(0.98);
}

@media (hover: hover) and (pointer: fine) {
  .escrow-summary:hover {
  border-color: var(--gold-400);

  }
}


.escrow-summary.hidden {
  display: none;
}

@keyframes escrowSummaryOpen {
  from {
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: 0;
    opacity: 0;
    transform: translateY(-8px);
  }
  to {
    max-height: 150px;
    padding-top: var(--space-3);
    padding-bottom: var(--space-3);
    margin-bottom: var(--space-4);
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .escrow-summary {
    animation: none;
  }
}

.escrow-row {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: var(--space-1) 0;
  gap: 8px;
}

.escrow-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 13px;
}

.escrow-label svg {
  color: var(--gold-400);
}

.escrow-amount {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
}

.escrow-amount.text-success {
  color: var(--success);
}

.escrow-hint {
  margin-top: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid var(--border-subtle);
  font-size: 12px;
  color: var(--gold-400);
  text-align: center;
}

.recent-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3);
  background: var(--bg-secondary);
  border: var(--border-width) solid var(--border-subtle);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
}

.recent-item:active {
  transform: scale(0.98);
}

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

.recent-name {
  font-size: 14px;
  font-weight: 500;
  margin-bottom: var(--space-1);
  display: flex;
  align-items: center;
  gap: var(--space-2);
}

.recent-meta {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 12px;
  color: var(--text-muted);
}

.recent-amount {
  text-align: right;
}

.recent-amount-value {
  font-size: 14px;
  font-weight: 600;
}

.recent-amount-value.positive {
  color: var(--success);
}

.recent-time {
  font-size: 11px;
  color: var(--text-muted);
}

.trust-dots {
  display: flex;
  gap: 2px;
}

.trust-dot {
  width: 8px;
  height: 4px;
  background: var(--bg-tertiary);
  border-radius: 2px;
}

.trust-dot.filled {
  background: var(--gold-400);
}

.sheet-body-pad {
  padding: var(--space-3) var(--space-4);
}

.sheet-body-stack {
  display: grid;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
}

.sheet-stack-sm {
  display: grid;
  gap: 8px;
}

.sheet-text-secondary {
  font-size: 14px;
  color: var(--text-secondary);
}

.sheet-text-muted {
  font-size: 12px;
  color: var(--text-muted);
}

.sheet-actions-row {
  display: grid;
  gap: 8px;
}

.sheet-actions-row--single {
  grid-template-columns: 1fr;
}

.sheet-actions-row--two {
  grid-template-columns: 1fr 1fr;
}

.sheet-form-input {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border-primary, rgba(15,23,42,0.12));
  border-radius: 14px;
  background: var(--surface-primary, #fff);
  color: var(--text-primary, #111827);
  font-size: 16px;
}

.sheet-preset-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.wallet-detail-grid {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  align-items: baseline;
}

.wallet-detail-info-card {
  border: 2px solid #111;
  border-radius: 18px;
  background: var(--surface-primary, var(--bg-elevated, #fff));
  padding: 14px 16px;
  box-sizing: border-box;
}

.wallet-detail-info-card .wallet-detail-grid {
  gap: 10px 14px;
}

.wallet-detail-info-card .wallet-detail-disclosure--technical {
  border-top: 1px solid var(--border-subtle);
  margin-top: 12px;
  padding-top: 10px;
}

.wallet-detail-section-card {
  border: 2px solid #111;
  border-radius: 18px;
  background: var(--surface-primary, var(--bg-elevated, #fff));
  padding: 14px 16px;
  box-sizing: border-box;
}

.wallet-detail-section-card .wallet-detail-section-title {
  margin-bottom: 8px;
}

.wallet-detail-section-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 72px;
  padding: 12px 8px;
  box-sizing: border-box;
}

.wallet-detail-section-loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border-default);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.wallet-detail-section-loading-copy {
  margin: 0;
  font-size: 13px;
  line-height: 1.35;
  color: var(--text-muted);
  text-align: center;
}

.wallet-detail-balances-host.is-loading {
  position: relative;
}

.wallet-detail-balances-host.is-loading > .wallet-detail-section-loading {
  margin-bottom: 10px;
}

.wallet-detail-balance-value {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 0.35em;
  text-align: right;
}

.wallet-detail-balance-amount {
  font-weight: 600;
  color: var(--success, var(--text-primary));
  font-variant-numeric: tabular-nums;
}

.wallet-detail-balance-value--negative .wallet-detail-balance-amount,
.wallet-detail-balance-value.wallet-detail-balance-value--negative .wallet-detail-balance-amount {
  color: var(--error, #b42318);
}

.wallet-detail-balance-token {
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 500;
  line-height: 1.2;
  color: var(--text-primary);
}

.bottom-sheet__title.wallet-detail-title-host {
  flex: 1;
  min-width: 0;
}

.wallet-detail-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.wallet-detail-title-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.wallet-detail-qr-toggle {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--bg-secondary);
  color: var(--text-primary);
  cursor: pointer;
  transition:
    background var(--duration-normal) var(--ease-sensual),
    border-color var(--duration-normal) var(--ease-sensual),
    color var(--duration-normal) var(--ease-sensual),
    transform var(--duration-normal) var(--ease-sensual);
}

.wallet-detail-qr-toggle svg {
  width: 17px;
  height: 17px;
}

@media (hover: hover) and (pointer: fine) {
  .wallet-detail-qr-toggle:hover {
  border-color: var(--border-gold);
  background: var(--bg-tertiary);
  color: var(--gold-700);
}
}
.wallet-detail-qr-toggle.is-active {
  border-color: var(--border-gold);
  background: var(--bg-tertiary);
  color: var(--gold-700);
}


.wallet-detail-qr-toggle.is-active {
  transform: scale(0.96);
}

.wallet-detail-qr-panel {
  max-height: 0;
  margin-bottom: 0;
  overflow: hidden;
  opacity: 0;
  transform: translateY(-6px);
  transition:
    max-height 260ms var(--ease-sensual),
    margin-bottom 260ms var(--ease-sensual),
    opacity 220ms ease,
    transform 260ms var(--ease-sensual);
}

.wallet-detail-qr-panel.is-open {
  max-height: 300px;
  margin-bottom: var(--space-4);
  opacity: 1;
  transform: translateY(0);
}

.wallet-detail-qr-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 14px;
  border: 1px solid var(--border-subtle);
  border-radius: 18px;
  background: var(--bg-secondary);
}

.wallet-detail-qr-code {
  width: 168px;
  height: 168px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  border-radius: 16px;
  background: #fff;
}

.wallet-detail-qr-copy {
  width: 100%;
  min-width: 0;
  text-align: center;
}

.wallet-detail-qr-label-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 6px;
}

.wallet-detail-qr-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.wallet-detail-qr-value-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.wallet-detail-qr-value {
  min-width: 0;
  max-width: 100%;
  padding: 0;
  border: 0 !important;
  outline: 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  box-shadow: none;
  text-align: center;
  cursor: pointer;
}

.wallet-detail-qr-value,
.wallet-detail-qr-fallback {
  font-family: monospace;
  font-size: 11px;
  line-height: 1.35;
  color: var(--text-secondary);
  white-space: pre-wrap;
  word-break: break-all;
}

.wallet-detail-qr-open-link {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wallet-detail-qr-status {
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-secondary);
  text-align: center;
}

.wallet-detail-qr-status[hidden] {
  display: none !important;
}

@media (hover: hover) and (pointer: fine) {
  .wallet-detail-qr-value:hover,
  .wallet-detail-qr-copy-button:hover {
  color: var(--gold-700);

  }
}


.wallet-detail-qr-value:focus-visible {
  color: var(--gold-700);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.wallet-detail-qr-copy-button {
  min-width: 46px;
  height: 28px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  background: var(--bg-primary);
  color: var(--text-muted);
  cursor: pointer;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    background var(--duration-normal) var(--ease-sensual),
    border-color var(--duration-normal) var(--ease-sensual),
    color var(--duration-normal) var(--ease-sensual),
    transform var(--duration-normal) var(--ease-sensual);
}

@media (hover: hover) and (pointer: fine) {
  .wallet-detail-qr-copy-button:hover {
  border-color: var(--border-gold);
  background: var(--bg-tertiary);
  transform: translateY(-1px);

  }
}


.wallet-detail-row {
  display: contents;
}

.wallet-detail-row.is-absent {
  display: none !important;
}

.wallet-detail-key {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.wallet-detail-key.wallet-detail-key--block {
  display: block;
}

.wallet-detail-val {
  font-size: 14px;
  color: var(--text-primary, #1a1a1a);
  min-width: 0;
}

.wallet-detail-val--mono {
  font-family: monospace;
}

.wallet-detail-val--mono-sm {
  font-family: monospace;
  font-size: 11px;
  word-break: break-all;
}

.wallet-detail-val--mono-md {
  font-family: monospace;
  font-size: 12px;
}

.wallet-detail-val--stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.wallet-detail-link {
  color: var(--gold-600);
  text-decoration: none;
}

.wallet-detail-linked-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wallet-detail-linked-label {
  font-size: 11px;
  color: var(--text-muted);
}

.wallet-detail-linked-value {
  font-family: monospace;
  font-size: 11px;
  word-break: break-all;
}

.wallet-detail-chain-id {
  opacity: 0.4;
}

.wallet-detail-section {
  margin-top: var(--space-4);
}

.wallet-detail-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

/* Diagnostic bank sections (Teller / Brale) — closed by default. */
.wallet-detail-disclosure {
  border-top: 1px solid color-mix(in srgb, var(--text-primary, #0f172a) 8%, transparent);
  padding-top: var(--space-3);
  min-width: 0;
  max-width: 100%;
}

.wallet-detail-disclosure + .wallet-detail-disclosure {
  margin-top: var(--space-2);
}

.wallet-detail-disclosure-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  list-style: none;
  cursor: pointer;
  user-select: none;
  padding: 2px 0;
}

.wallet-detail-disclosure-summary::-webkit-details-marker {
  display: none;
}

.wallet-detail-disclosure-summary .wallet-detail-section-title {
  margin-bottom: 0;
}

.wallet-detail-disclosure-summary::after {
  content: '';
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid var(--text-muted, #94a3b8);
  border-bottom: 1.5px solid var(--text-muted, #94a3b8);
  transform: rotate(45deg);
  transition: transform 140ms ease;
  flex-shrink: 0;
  margin-right: 2px;
}

.wallet-detail-disclosure[open] > .wallet-detail-disclosure-summary::after {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.wallet-detail-disclosure-body {
  padding-top: var(--space-2);
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.wallet-detail-disclosure-body > .wallet-detail-section-header.brale-payout-header {
  margin-bottom: 0.5rem;
  justify-content: flex-start;
  width: 100%;
  min-width: 0;
}

/* Account-detail Transactions — white card; sits above the sheet header rule. */
.bottom-sheet:has(#wallet-detail-transactions) .bottom-sheet__header {
  border-bottom: none;
}

.sheet-body-pad:has(> .sheet-body-stack > .wallet-detail-transactions),
.sheet-body-pad:has(> .wallet-detail-transactions) {
  padding-top: 0;
}

.wallet-detail-transactions.wallet-detail-section-card {
  margin: 0;
  min-width: 0;
  padding: 12px 16px;
}

.wallet-detail-tx-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 2px 0;
  border: 0;
  outline: none;
  box-shadow: none;
  background: transparent;
  cursor: pointer;
  user-select: none;
  text-align: left;
  color: inherit;
  -webkit-tap-highlight-color: transparent;
}

.wallet-detail-tx-toggle:focus,
.wallet-detail-tx-toggle:focus-visible {
  outline: none;
  box-shadow: none;
}

.wallet-detail-tx-toggle .wallet-detail-section-title {
  margin-bottom: 0;
}

.wallet-detail-transactions.is-expanded .wallet-detail-tx-toggle,
.wallet-detail-transactions:has(.wallet-detail-tx-recent:not(.hidden)) .wallet-detail-tx-toggle {
  border-bottom: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.08));
  padding-bottom: 10px;
  margin-bottom: 4px;
}

.wallet-detail-tx-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--text-primary, #0f172a) 8%, transparent);
  border: 1px solid var(--border-subtle, rgba(15, 23, 42, 0.1));
  font-size: 11px;
  font-weight: 600;
  color: var(--text-primary, #0f172a);
  margin-left: auto;
}

.wallet-detail-tx-badge[hidden] {
  display: none;
}

.wallet-detail-tx-chevron {
  width: 0.45em;
  height: 0.45em;
  border-right: 1.5px solid var(--text-muted, #94a3b8);
  border-bottom: 1.5px solid var(--text-muted, #94a3b8);
  transform: rotate(45deg);
  transition: transform 140ms ease;
  flex-shrink: 0;
  margin-right: 2px;
}

.wallet-detail-tx-badge[hidden] + .wallet-detail-tx-chevron {
  margin-left: auto;
}

.wallet-detail-tx-toggle[aria-expanded="true"] .wallet-detail-tx-chevron {
  transform: rotate(-135deg);
  margin-top: 4px;
}

.wallet-detail-tx-recent {
  padding-top: var(--space-1);
}

.wallet-detail-tx-recent.hidden {
  display: none;
}

.wallet-detail-tx-recent-list .activity-date-group {
  margin-bottom: 0;
}

.wallet-detail-tx-body {
  max-height: var(--wallet-detail-tx-body-height, 1600px);
  opacity: 1;
  overflow: hidden;
  transform: translateY(0);
  transition:
    max-height 260ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 180ms ease,
    margin-top 260ms cubic-bezier(0.22, 1, 0.36, 1),
    transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
  margin-top: var(--space-1);
}

.wallet-detail-tx-body.is-collapsed {
  margin-top: 0;
  max-height: 0;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-4px);
}

.wallet-detail-tx-body .transaction-list,
.wallet-detail-tx-recent-list {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

/* Match contact/activity flat rows — not the default gold card chrome. */
.wallet-detail-transactions .activity-date {
  display: none !important;
}

.wallet-detail-transactions .transaction-item {
  padding: 10px 2px 14px 0;
  margin-left: 0;
  margin-right: 0;
  border: none;
  box-shadow: none;
  background: transparent;
  border-radius: 0;
  align-items: baseline;
  overflow: visible;
  transition: background 120ms ease, transform 120ms ease;
}

.wallet-detail-transactions .transaction-item::before {
  display: none;
}

.wallet-detail-transactions .transaction-item::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--list-divider-line, color-mix(in srgb, var(--text-primary, #0f172a) 8%, transparent));
  pointer-events: none;
}

.wallet-detail-transactions .transaction-item:last-child::after,
.wallet-detail-transactions .activity-items .transaction-item:last-child::after {
  display: none;
}

.wallet-detail-transactions .transaction-item .transaction-name {
  font-weight: 600;
  color: var(--text-primary, #0f172a);
}

.wallet-detail-transactions .transaction-item .transaction-amount {
  white-space: nowrap;
}

.wallet-detail-transactions .transaction-item .transaction-time,
.wallet-detail-transactions .transaction-item .transaction-subtitle {
  color: var(--text-muted, #667184);
}

@media (hover: hover) and (pointer: fine) {
  .wallet-detail-transactions .transaction-item:hover {
    border-color: transparent;
    box-shadow: none;
    background: color-mix(in srgb, var(--text-primary) 7%, transparent);
  }
}

.wallet-detail-transactions .transaction-item:active {
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
}

.wallet-detail-transactions .empty-state {
  padding: var(--space-3) 0;
}

.wallet-detail-section-title.wallet-detail-section-title--warning {
  color: var(--warning, orange);
}

.wallet-detail-section-note {
  font-size: 11px;
  color: var(--text-muted);
  margin-bottom: var(--space-2);
}

/* Brale payout — summary + expandable full detail */
.brale-payout-header {
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
  min-width: 0;
  max-width: 100%;
}

.brale-payout-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.35rem 0.65rem;
  min-width: 0;
  max-width: 100%;
  width: 100%;
}

.brale-payout-toolbar .btn {
  flex: 0 1 auto;
  white-space: nowrap;
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 600;
  border-radius: 8px;
}

.brale-payout-cache-hint {
  white-space: nowrap;
}

.brale-payout-rail-mode {
  white-space: nowrap;
  color: var(--text-muted, #6b7280);
}

.brale-payout-rail-mode--warn {
  color: var(--warning-text, #b45309);
  font-weight: 600;
}

.brale-payout-hint--rail-mismatch {
  border-left: 3px solid var(--warning-text, #b45309);
  padding-left: 10px;
}

.brale-payout-callout {
  margin: 12px 0 4px;
  padding: 14px 14px;
  border-radius: 12px;
  border: 1px solid var(--gold-300);
  background: var(--bg-secondary, #fff);
}

.brale-payout-callout--warn {
  border-color: color-mix(in srgb, var(--warning-text, #b45309) 45%, var(--gold-300));
  background: color-mix(in srgb, var(--warning-text, #b45309) 8%, var(--bg-secondary, #fff));
}

.brale-payout-callout .brale-payout-hint {
  margin-bottom: 8px;
}

.brale-payout-callout .btn {
  margin-top: 4px;
}

.brale-payout-summary {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: var(--space-2);
  padding: 12px;
  border: 1px solid var(--gold-300);
  border-radius: 12px;
  min-width: 0;
  max-width: 100%;
  width: 100%;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-wrap: anywhere;
}

.wallet-detail-json {
  margin: 0;
  padding: 10px;
  border: 1px solid var(--border-color, #e5e7eb);
  border-radius: 10px;
  background: var(--bg-tertiary, #f8fafc);
  color: var(--text-primary, #111827);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.45;
  max-height: min(340px, 45vh);
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.brale-payout-lead {
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-primary, #1a1a1a);
  margin: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.brale-payout-status {
  font-weight: 600;
}

.brale-payout-status--ok {
  color: var(--success, #067647);
}

.brale-payout-status--warn {
  color: var(--warning, #b54708);
}

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

.brale-payout-chip {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--surface-elevated, rgba(0, 0, 0, 0.05));
  color: var(--text-primary, #1a1a1a);
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  cursor: default;
}

.brale-payout-profiles {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.brale-payout-profiles th,
.brale-payout-profiles td {
  text-align: left;
  padding: 6px 8px 6px 0;
  vertical-align: top;
  border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
}

.brale-payout-profiles th {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.brale-payout-profiles td.brale-payout-mono {
  font-family: monospace;
  font-size: 11px;
}

/* Fixed-layout rail table — stays inside sheet width; long IDs wrap. */
.brale-payout-table-wrap {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.brale-payout-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  font-size: 12px;
}

.brale-payout-table__col-rail { width: 70%; }
.brale-payout-table__col-status { width: 30%; }

.brale-payout-table th,
.brale-payout-table td {
  text-align: left;
  vertical-align: top;
  padding: 8px 6px 8px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  overflow-wrap: anywhere;
  word-break: break-word;
}

.brale-payout-table th {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
  padding-top: 0;
}

.brale-payout-table__rail {
  font-weight: 700;
  color: var(--text-primary, #1a1a1a);
}

.brale-payout-table__status {
  white-space: nowrap;
  text-align: right;
}

.brale-payout-table th:last-child {
  text-align: right;
}

.brale-payout-table__empty {
  color: var(--text-muted);
}

.brale-payout-table__detail td {
  padding-top: 0;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.12));
}

.brale-payout-table__detail-row {
  display: grid;
  grid-template-columns: 4.75rem minmax(0, 1fr);
  gap: 4px 8px;
  align-items: start;
  margin-top: 4px;
  min-width: 0;
}

.brale-payout-table__detail-row--address {
  align-items: center;
  margin-top: 2px;
  margin-bottom: 2px;
}

.brale-payout-table__k {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--text-muted);
  padding-top: 1px;
}

.brale-payout-table__v {
  min-width: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-primary, #1a1a1a);
  overflow-wrap: anywhere;
  word-break: break-word;
}

.brale-payout-table__address {
  display: block;
  min-width: 0;
  margin: 0;
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.1));
  background: var(--bg-elevated, #fff);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-primary, #1a1a1a);
  word-break: break-all;
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}

.brale-payout-hint {
  font-size: 11px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.35;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.brale-addr-list {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.brale-addr-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border-color, rgba(0, 0, 0, 0.08));
  border-radius: 10px;
}

.brale-addr-main {
  min-width: 0;
  flex: 1 1 auto;
}

.brale-addr-title {
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.brale-addr-meta {
  font-size: 11px;
  color: var(--text-muted);
  margin-top: 2px;
  word-break: break-word;
}

.brale-addr-status {
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.02em;
  padding: 1px 6px;
  border-radius: 999px;
  background: var(--surface-muted, rgba(0, 0, 0, 0.06));
  color: var(--text-muted);
}

.brale-addr-status--active {
  background: rgba(34, 197, 94, 0.15);
  color: #16a34a;
}

.brale-addr-status--archived {
  background: rgba(0, 0, 0, 0.08);
  color: var(--text-muted);
}

.brale-addr-status--warn {
  background: rgba(234, 179, 8, 0.16);
  color: #b45309;
}

.brale-addr-delete {
  flex-shrink: 0;
  color: var(--danger, #dc2626);
}

.brale-payout-details {
  margin-top: var(--space-2);
  min-width: 0;
  max-width: 100%;
}

.brale-payout-details > summary {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.brale-payout-details > summary::-webkit-details-marker {
  display: none;
}

.brale-payout-details > summary::before {
  content: '▸ ';
}

.brale-payout-details[open] > summary::before {
  content: '▾ ';
}

.brale-payout-details .wallet-detail-grid {
  margin-top: var(--space-2);
  min-width: 0;
  max-width: 100%;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr);
}

.brale-payout-details .wallet-detail-key {
  white-space: normal;
  overflow-wrap: anywhere;
}

.brale-payout-details .wallet-detail-val,
.brale-payout-details .wallet-detail-val--mono,
.brale-payout-details .wallet-detail-val--mono-sm,
.brale-payout-details .wallet-detail-val--mono-md {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-all;
}

.transfer-funds-brale-prepare {
  margin: var(--space-2) 0;
  padding: 10px 12px;
  border-radius: 8px;
  background: var(--surface-elevated, rgba(0, 0, 0, 0.04));
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
}

.transfer-funds-brale-prepare-line {
  font-size: 13px;
  line-height: 1.4;
  margin: 0 0 6px;
  color: var(--text-primary, #1a1a1a);
}

.transfer-funds-brale-prepare-line:last-child {
  margin-bottom: 0;
}

.transfer-funds-brale-prepare-line--ok {
  color: var(--success, #067647);
}

.transfer-funds-brale-prepare-line--warn {
  color: var(--warning, #b54708);
}

.transfer-funds-brale-prepare-hint {
  font-size: 11px;
  line-height: 1.35;
  margin: 4px 0 0;
  color: var(--text-muted);
}

.transfer-funds-brale-prepare-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.transfer-funds-brale-prepare-summary {
  flex: 1 1 auto;
  min-width: 0;
}

.transfer-funds-brale-prepare-summary .transfer-funds-brale-prepare-line {
  margin: 0;
}

.transfer-funds-brale-prepare-chevron {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  transition: transform 180ms var(--ease-sensual, ease);
}

.transfer-funds-brale-prepare-chevron svg {
  width: 16px;
  height: 16px;
}

.transfer-funds-brale-prepare.is-expanded .transfer-funds-brale-prepare-chevron {
  transform: rotate(180deg);
}

.transfer-funds-brale-prepare-details {
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  transition:
    grid-template-rows 240ms var(--ease-sensual, ease),
    opacity 180ms var(--ease-sensual, ease);
}

.transfer-funds-brale-prepare.is-expanded .transfer-funds-brale-prepare-details {
  grid-template-rows: 1fr;
  opacity: 1;
}

.transfer-funds-brale-prepare-details-inner {
  overflow: hidden;
  min-height: 0;
}

.transfer-funds-brale-prepare.is-expanded .transfer-funds-brale-prepare-details-inner {
  padding-top: 8px;
}

.transfer-funds-brale-prepare-details-inner .transfer-funds-brale-prepare-line:first-child,
.transfer-funds-brale-prepare-details-inner .transfer-funds-brale-prepare-hint:first-child {
  margin-top: 0;
}

.transfer-funds-brale-wire-form {
  display: grid;
  gap: 10px;
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  border-radius: 14px;
  background: var(--surface-elevated, rgba(0, 0, 0, 0.02));
  text-align: left;
}

.transfer-funds-brale-wire-form__hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--text-secondary, #666);
  text-align: left;
}

.transfer-funds-view .transfer-funds-brale-wire-form .transfer-funds-field-label {
  display: grid;
  gap: 4px;
  margin: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text-secondary, #555);
  text-align: left;
  text-transform: none;
}

.transfer-funds-view .transfer-funds-brale-wire-form .transfer-funds-field-label__text {
  display: inline-flex;
  align-items: baseline;
  gap: 6px;
}

.transfer-funds-view .transfer-funds-brale-wire-form .transfer-funds-field-label__optional {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-muted, #888);
}

.transfer-funds-view .transfer-funds-brale-wire-form .transfer-funds-field-input {
  width: 100%;
  box-sizing: border-box;
  min-height: 42px;
  padding: 10px 12px;
  border: 1px solid var(--border-default, #ccc);
  border-radius: 10px;
  background: var(--surface-primary, #fff);
  color: var(--text-primary, #111);
  font-size: 15px;
  font-weight: 500;
  text-align: left;
}

.transfer-funds-view .transfer-funds-brale-wire-form .transfer-funds-field-input:focus {
  outline: none;
  border-color: #111;
}

.transfer-funds-brale-wire-form__locality {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) 72px minmax(0, 0.9fr);
  gap: 8px;
  align-items: start;
}

.transfer-funds-brale-wire-form__account-row {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 8px;
  align-items: start;
}

.transfer-funds-brale-wire-form__state .transfer-funds-field-input {
  text-transform: uppercase;
}

@media (max-width: 420px) {
  .transfer-funds-brale-wire-form__locality {
    grid-template-columns: 1fr 64px 1fr;
  }
  .transfer-funds-brale-wire-form__account-row {
    grid-template-columns: 1fr;
  }
}

.transfer-funds-wire-panel {
  --fund-wire-copy-col: 4.75rem;
  margin: var(--space-3) 0 0;
  padding: 12px;
  border-radius: 8px;
  border: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.08));
  background: var(--surface-elevated, rgba(0, 0, 0, 0.03));
}

.transfer-funds-wire-panel__header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--fund-wire-copy-col);
  align-items: center;
  column-gap: 12px;
  margin-bottom: 8px;
}

.transfer-funds-wire-panel__header .btn {
  width: 100%;
  justify-self: stretch;
  text-align: center;
}

.transfer-funds-wire-panel__title {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
}

.transfer-funds-wire-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--fund-wire-copy-col);
  align-items: start;
  column-gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--border-subtle, rgba(0, 0, 0, 0.06));
}

.transfer-funds-wire-row__meta {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.transfer-funds-wire-row__label {
  font-size: 11px;
  color: var(--text-muted);
}

.transfer-funds-wire-row__value {
  font-size: 13px;
  line-height: 1.35;
  word-break: break-word;
}

.transfer-funds-wire-row__copy {
  flex: none;
  width: 100%;
  margin-top: 14px;
  padding: 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-align: center;
  color: var(--text-link, var(--accent, #2563eb));
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.transfer-funds-wire-row__copy:focus-visible {
  outline: 2px solid var(--gold-500, currentColor);
  outline-offset: 2px;
  border-radius: 4px;
}

.transfer-funds-wire-panel__actions {
  margin-top: 12px;
}

.wallet-detail-balance-row {
  display: flex;
  justify-content: space-between;
  padding: 6px 0;
  border-bottom: 1px solid var(--border-subtle, rgba(0,0,0,0.04));
  font-size: 14px;
}

.wallet-detail-balance-row--sub {
  padding-left: 12px;
  font-size: 13px;
}

.wallet-detail-balance-row--sub .wallet-detail-balance-label,
.wallet-detail-balance-row--sub .wallet-detail-balance-value {
  font-weight: 400;
  color: var(--text-muted, var(--text-secondary));
}

/* Reconcile delta the guard is holding (finality wait, pending ingress, …). */
.wallet-detail-pending-finalization .wallet-detail-pending-finalization__label,
.wallet-detail-pending-finalization .wallet-detail-pending-finalization__value {
  color: var(--danger, #dc2626);
}

.wallet-detail-pending-finalization .wallet-detail-pending-finalization__value {
  font-weight: 600;
}

/* Funds visible at the latest block but not yet past chain finality. The
   headline balance shows the latest total; this row explains the part that
   Spendable (finalized-only) does not include yet. */
.wallet-detail-awaiting-finality .wallet-detail-awaiting-finality__label,
.wallet-detail-awaiting-finality .wallet-detail-awaiting-finality__value {
  color: var(--warning, #d97706);
}

.wallet-detail-awaiting-finality .wallet-detail-awaiting-finality__value {
  font-weight: 600;
}

/* The part of a reserve gap that is a non-deliverable basket asset (USDT/SBC)
   awaiting conversion, not a missing reserve. Still the user's money, so this
   reads as a warning rather than a deficit. */
.wallet-detail-convert-needed .wallet-detail-balance-label,
.wallet-detail-convert-needed .wallet-detail-balance-value {
  color: var(--warning, #d97706);
}

.wallet-detail-convert-needed .wallet-detail-balance-value {
  font-weight: 600;
}

.wallet-detail-balance-label {
  color: var(--text-secondary);
}

.sheet-spinner-state {
  text-align: center;
  padding: var(--space-6) var(--space-4);
}

.sheet-spinner-state-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid var(--border-default);
  border-top-color: var(--text-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto;
}

.sheet-spinner-state-copy {
  margin-top: var(--space-4);
  font-size: 14px;
  color: var(--text-secondary);
}

.sheet-spinner-state-note {
  margin-top: var(--space-2);
  font-size: 12px;
  color: var(--text-muted);
}

.wallet-link-sheet {
  padding: var(--space-4);
  display: grid;
  gap: 14px;
}

.wallet-link-sheet-copy {
  font-size: 14px;
  color: var(--text-secondary);
}

.whop-details-sheet {
  gap: 18px;
}

.whop-details-mode-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--text-secondary) 10%, transparent);
  border: 1px solid color-mix(in srgb, var(--text-secondary) 14%, transparent);
}

.whop-details-mode-btn {
  margin: 0;
  padding: 10px 8px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
}

.whop-details-mode-btn[aria-pressed="true"] {
  background: color-mix(in srgb, var(--text-primary) 10%, transparent);
  color: var(--text-primary);
}

.whop-details-mode-btn:focus-visible {
  outline: 2px solid color-mix(in srgb, var(--text-primary) 35%, transparent);
  outline-offset: 1px;
}

.whop-details-field {
  display: grid;
  gap: 6px;
}

.whop-details-field[hidden],
.whop-details-actions[hidden],
.whop-details-actions .btn[hidden],
.whop-details-actions .sheet-actions-row[hidden] {
  display: none !important;
}

.whop-details-field .wallet-link-sheet-label,
.whop-details-field > label {
  margin: 0;
}

.whop-details-hint {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--text-muted);
}

.whop-details-destination {
  margin: 0;
  font-size: 16px;
  font-weight: 650;
  line-height: 1.35;
  color: var(--text);
}

.whop-details-link {
  justify-self: start;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .whop-details-link:hover {
  color: var(--text-primary);

  }
}


.whop-details-banner {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.45;
  color: var(--text-primary);
  background: var(--surface-muted, color-mix(in srgb, var(--text-secondary) 10%, transparent));
  border: 1px solid color-mix(in srgb, var(--text-secondary) 18%, transparent);
}

.whop-details-banner[hidden] {
  display: none !important;
}

.whop-details-banner--warning {
  color: var(--warning);
  background: var(--warning-muted);
  border-color: color-mix(in srgb, var(--warning) 35%, transparent);
}

.whop-details-banner--error,
.whop-details-banner.text-error {
  color: var(--error, #b91c1c);
  background: var(--error-muted, rgba(185, 28, 28, 0.08));
  border-color: color-mix(in srgb, var(--error, #b91c1c) 35%, transparent);
}

.whop-details-banner--info {
  color: var(--text-primary);
  background: color-mix(in srgb, var(--text-secondary) 8%, transparent);
  border-color: color-mix(in srgb, var(--text-secondary) 16%, transparent);
}

.whop-details-reserve {
  padding-top: 2px;
  border-top: 1px solid color-mix(in srgb, var(--text-secondary) 14%, transparent);
}

/* legacy class names kept for live status updates */
.whop-details-notice,
.whop-details-status {
  font-size: 13px;
  line-height: 1.45;
}

.whop-details-secondary {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  justify-content: flex-start;
}

.wallet-link-sheet-status {
  font-size: 12px;
  color: var(--text-muted);
}

.wallet-link-sheet-section {
  display: grid;
  gap: 8px;
}

.wallet-link-sheet-section--nested {
  margin-top: 4px;
  padding: 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-secondary, var(--surface-primary));
}

.wallet-link-sheet-section[hidden],
.wallet-link-sheet-hint-action[hidden] {
  display: none !important;
}

.wallet-link-sheet-hint {
  margin: 0;
  color: var(--text-secondary);
  line-height: 1.35;
}

.wallet-link-sheet-hint-action {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--text-link, var(--accent, #2563eb));
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 0;
  text-align: left;
  cursor: pointer;
}

.wallet-link-sheet-section--actions {
  gap: 10px;
}

.wallet-link-sheet-field {
  display: grid;
  gap: 6px;
}

.wallet-link-sheet-field[hidden] {
  display: none !important;
}

.wallet-link-sheet-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-secondary);
}

.wallet-link-sheet-input {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  padding: 11px 12px;
}

/* Google Places dropdown is appended to <body>; sit above the bank-entry sheet. */
.pac-container {
  z-index: 10050;
  margin-top: 4px;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  font: inherit;
  overflow: hidden;
}

.pac-item {
  padding: 10px 12px;
  font-size: 14px;
  line-height: 1.35;
  cursor: pointer;
}

.pac-item-query {
  font-size: 14px;
}

.wallet-link-sheet-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.35;
}

.wallet-link-sheet-check input {
  margin-top: 2px;
}

.wallet-link-sheet-toggle {
  gap: 8px;
  margin-bottom: 2px;
}

.wallet-link-sheet-toggle-btn {
  min-height: 44px;
}

.wallet-link-sheet-toggle-btn--active {
  pointer-events: none;
}

.receive-managed-other-networks {
  margin-top: 8px;
}

.receive-managed-wallet-list {
  margin-top: 4px;
}

.receive-managed-other-networks .receive-managed-wallet-list {
  margin-top: 8px;
}

.wallet-link-sheet-address-section {
  display: grid;
  gap: 8px;
}

.wallet-link-sheet-address-summary {
  cursor: pointer;
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.wallet-link-sheet-address-summary::-webkit-details-marker {
  display: none;
}

.wallet-link-sheet-address-summary::after {
  content: '';
  width: 7px;
  height: 7px;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: rotate(-45deg);
  transform-origin: center;
  transition: transform 0.15s ease;
  margin-top: -2px;
}

.wallet-link-sheet-address-section[open] > .wallet-link-sheet-address-summary::after {
  transform: rotate(45deg);
  margin-top: -4px;
}

.wallet-link-sheet-address-input {
  width: 100%;
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  background: var(--surface-primary);
  color: var(--text-primary);
  font: inherit;
  font-size: 14px;
  padding: 11px 12px;
}

.wallet-link-sheet-address-preview {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.wallet-link-sheet-address-preview--valid {
  color: var(--success);
}

.wallet-link-sheet-address-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.wallet-link-sheet-address-scanner {
  display: grid;
  gap: 8px;
}

.wallet-link-sheet-section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--text-primary);
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.wallet-link-sheet-linked-list {
  display: grid;
  gap: 8px;
}

.wallet-link-sheet-linked-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid var(--border-subtle);
  border-radius: 14px;
  background: var(--surface-secondary);
}

.wallet-link-sheet-linked-row--clickable {
  cursor: pointer;
}

.wallet-link-sheet-linked-row--clickable:focus-visible {
  outline: 2px solid var(--focus-ring, #2563eb);
  outline-offset: 2px;
}

.wallet-link-sheet-linked-row.receive-managed-wallet-row {
  width: 100%;
  text-align: left;
  padding: 10px 12px;
}

.receive-managed-wallet-icon {
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: rgba(255, 255, 255, 0.94);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: -0.04em;
  overflow: hidden;
}

.receive-managed-wallet-icon span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

.receive-managed-wallet-icon--base {
  background: #3f6fd9;
}

.receive-managed-wallet-icon--solana {
  background: linear-gradient(135deg, #56b890 0%, #7f5ccf 58%, #4ba7c8 100%);
}

.receive-managed-wallet-icon--arbitrum {
  background: linear-gradient(135deg, #3f63c8 0%, #398fc5 100%);
}

.receive-managed-wallet-icon--polygon {
  background: #7650c5;
}

.receive-managed-wallet-icon--ethereum {
  background: linear-gradient(135deg, #6d7fbf 0%, #4c5364 100%);
}

.receive-managed-wallet-icon--hedera {
  background: #2f3542;
}

.receive-managed-wallet-icon--generic {
  background: #334155;
}

.wallet-link-sheet-linked-main {
  flex: 1 1 auto;
  min-width: 0;
}

.wallet-link-sheet-linked-name {
  display: block;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.wallet-link-sheet-linked-address {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.wallet-link-sheet-linked-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-width: 0;
}

.wallet-link-sheet-linked-chain {
  font-size: 12px;
  color: var(--text-muted);
  white-space: nowrap;
  align-self: center;
}

.wallet-link-sheet-remove-btn {
  border: 1px solid color-mix(in srgb, var(--error) 40%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--error) 8%, transparent);
  color: var(--error);
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  padding: 7px 9px;
  white-space: nowrap;
}

.wallet-link-sheet-remove-btn:active {
  transform: scale(0.98);
}

.wallet-link-sheet-empty {
  font-size: 13px;
  color: var(--text-secondary);
}

.linked-account-card--clickable,
.linked-sub-account--clickable,
.source-row--clickable {
  cursor: pointer;
}

.linked-sub-label--tight {
  margin-top: 1px;
}

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

.trust-card-header {
  margin-bottom: var(--space-3);
}

.trust-card-footer {
  margin-top: var(--space-3);
}

.sheet-confirm {
  padding: var(--space-4);
  text-align: center;
}

.sheet-confirm-title {
  font-size: 15px;
  color: var(--text-primary);
  margin-bottom: var(--space-2);
}

.sheet-confirm-copy {
  font-size: 13px;
  color: var(--text-secondary);
  margin-bottom: var(--space-5);
}

.sheet-confirm-actions {
  display: flex;
  gap: var(--space-2);
  justify-content: center;
}

.sheet-confirm-btn {
  flex: 1;
  padding: 12px;
  border-radius: var(--radius-full);
  font-size: 14px;
  font-weight: 600;
  font-family: var(--app-font-stack);
  cursor: pointer;
}

.sheet-confirm-btn--secondary {
  border: 1px solid var(--border-default);
  background: transparent;
}

.sheet-confirm-btn--danger {
  border: none;
  background: #dc2626;
  color: #fff;
}

.link-code-display {
  margin: var(--space-6) 0;
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 4px;
  color: var(--gold-400);
}

.qr-code-fallback {
  padding: 20px;
  text-align: center;
  color: #666;
  font-size: 12px;
}

@media (min-width: 1024px) {
  .profile-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    column-gap: var(--space-8);
    row-gap: var(--space-5);
    align-items: start;
  }

  .profile-view .section {
    margin-bottom: var(--space-5);
  }

  .profile-assets-section,
  .profile-trust-section {
    grid-column: 1 / -1;
    overflow: visible;
  }
}

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

.asset-type-info .linked-account-name {
  font-size: var(--list-text-size, 15px);
  font-weight: 300;
  color: var(--text-primary);
  line-height: 1.5;
  margin-bottom: 2px;
}

.profile-view .currency-class-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.3;
  text-transform: uppercase;
  color: var(--text-muted);
  background: rgba(17, 17, 17, 0.06);
}

.profile-view .currency-class-badge.is-preview {
  color: #0f766e;
  background: rgba(15, 118, 110, 0.1);
}

.profile-view .currency-class-badge.is-test {
  color: #9a3412;
  background: rgba(154, 52, 18, 0.1);
}

.profile-view .linked-sub-balance-stack {
  display: grid;
  justify-items: end;
  align-content: center;
  gap: 4px;
  flex-shrink: 0;
}

.asset-type-info .asset-type-source-count {
  font-weight: 400;
  opacity: 0.5;
}

.asset-type-rail,
.source-row-rail {
  font-weight: 400;
  opacity: 0.5;
}

.asset-type-info .linked-sub-label {
  font-size: var(--list-note-size, 12px);
  border-top: none;
  padding: 0;
}

.asset-type-total {
  color: var(--text-primary);
  flex-shrink: 0;
  text-align: right;
  margin-right: 0;
  display: grid;
  justify-items: end;
  gap: 3px;
  position: relative;
  left: 0;
}

.asset-type-total-value {
  font-weight: 800;
  font-size: var(--list-text-size, 15px);
  line-height: 1;
}

.asset-type-total-label {
  font-size: 10px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #c5c5c5;
  display: none;
}

.asset-type-total.negative,
.asset-type-sources .linked-sub-balance.negative,
.linked-sub-balance.negative {
  color: var(--error);
  opacity: 1;
}

.asset-type-total.muted,
.asset-type-sources .linked-sub-balance.muted,
.linked-sub-balance.muted {
  color: var(--text-muted);
  opacity: 1;
}

.asset-type-chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform 0.2s;
  display: flex;
  align-items: center;
  transform: rotate(-90deg);
}

.asset-type-chevron.expanded {
  transform: rotate(0deg);
}

.asset-type-sources {
  padding-left: 12px;
  padding-right: 12px;
  padding-bottom: var(--space-2);
}

.asset-type-sources .linked-sub-account {
  border-top: none;
  padding: var(--space-1) 0;
  padding-bottom: 0;
}

.asset-type-sources .linked-sub-label {
  font-size: var(--list-note-size, 12px);
  color: var(--text-primary);
  opacity: 0.82;
}

.asset-type-sources .linked-sub-balance {
  opacity: 0.6;
}

.asset-type-cash {
  font-weight: 800;
  font-size: 20px;
}

.profile-view .asset-type-row .linked-account-icon {
  background: #0b0f14;
  border-color: #0b0f14;
  color: #fff;
}

.profile-view .asset-type-row .linked-account-icon svg {
  color: #fff;
  stroke: currentColor;
}

.profile-view .asset-type-row .asset-type-cash {
  font-size: 16px;
}

.profile-view .linked-account-card:not(.asset-type-card) .linked-account-icon.bank {
  width: 26px;
  height: 26px;
  font-size: 13px;
  border-radius: 5px;
}

.profile-view .linked-account-card:not(.asset-type-card) .linked-account-icon.bank svg {
  width: 14px;
  height: 14px;
}

/* Assets sections mirror the rounded contact-detail section cards. */
.profile-view {
  --assets-section-card-bg: rgba(255, 255, 255, 0.94);
  --assets-section-card-border: 2px solid rgba(15, 23, 42, 0.76);
  --assets-section-card-radius: 18px;
  --assets-section-card-shadow: 0 10px 22px rgba(15, 23, 42, 0.09);
  --assets-section-divider: 1px solid rgba(15, 23, 42, 0.08);
  --assets-total-row-rule: rgba(15, 23, 42, 0.1);
  --assets-section-fg: #17202a;
  --assets-section-muted-fg: rgba(15, 23, 42, 0.54);
  --assets-section-icon-bg: rgba(15, 23, 42, 0.06);
  --assets-total-row-fg: var(--assets-section-fg);
  --assets-total-row-divider: var(--assets-section-divider);
  --assets-total-row-bg:
    radial-gradient(ellipse 80% 120% at 86% 50%, rgba(232, 213, 176, 0.26), transparent 52%),
    repeating-linear-gradient(
      150deg,
      rgba(166, 133, 33, 0.058) 0,
      rgba(166, 133, 33, 0.058) 1px,
      transparent 1px,
      transparent 9px
    ),
    #FEFDFB;
}

[data-theme="dark"] .profile-view {
  --assets-section-card-bg: rgba(15, 23, 32, 0.96);
  --assets-section-card-border: 1px solid rgba(148, 163, 184, 0.18);
  --assets-section-card-shadow: 0 10px 24px rgba(0, 0, 0, 0.28);
  --assets-section-divider: 1px solid rgba(148, 163, 184, 0.16);
  --assets-total-row-rule: rgba(148, 163, 184, 0.22);
  --assets-section-fg: rgba(248, 250, 252, 0.94);
  --assets-section-muted-fg: rgba(148, 163, 184, 0.86);
  --assets-section-icon-bg: rgba(248, 250, 252, 0.08);
  --assets-total-row-bg: var(--dark-section-bg);
}

[data-theme="silver"] .profile-view {
  --assets-section-fg: #0b0f14;
  --assets-section-muted-fg: rgba(11, 15, 20, 0.62);
  --assets-total-row-bg:
    radial-gradient(ellipse 80% 120% at 86% 50%, rgba(209, 211, 213, 0.225), transparent 52%),
    repeating-linear-gradient(
      150deg,
      rgba(129, 137, 148, 0.056) 0,
      rgba(129, 137, 148, 0.056) 1px,
      transparent 1px,
      transparent 9px
    ),
    #ffffff;
}

[data-theme="soft"] .profile-view {
  --assets-total-row-bg: var(--dark-section-bg);
  --assets-total-row-fg: rgba(248, 250, 252, 0.96);
  --assets-total-row-divider: 1px solid rgba(170, 182, 198, 0.22);
}

[data-theme="platinum"] .profile-view {
  --assets-total-row-bg: var(--dark-section-bg);
  --assets-total-row-fg: rgba(248, 250, 252, 0.96);
  --assets-total-row-divider: 1px solid rgba(170, 182, 198, 0.22);
}

.profile-view :is(#assets-balance-section, .assets-balance-section),
.profile-view .assets-type-group-surface {
  overflow: hidden;
  border: var(--assets-section-card-border) !important;
  border-radius: var(--assets-section-card-radius);
  background: var(--assets-section-card-bg) !important;
  box-shadow: var(--assets-section-card-shadow) !important;
}

:root:not([data-theme]) .profile-view :is(#assets-balance-section, .assets-balance-section),
[data-theme="gold"] .profile-view :is(#assets-balance-section, .assets-balance-section),
[data-theme="silver"] .profile-view :is(#assets-balance-section, .assets-balance-section),
[data-theme="dark"] .profile-view :is(#assets-balance-section, .assets-balance-section) {
  border: var(--assets-section-card-border) !important;
  background: var(--assets-section-card-bg) !important;
  box-shadow: var(--assets-section-card-shadow) !important;
}

.profile-view :is(#assets-balance-section, .assets-balance-section) {
  margin: 0 0 14px !important;
  padding: 0 !important;
  --assets-section-card-bg: var(--dark-section-bg);
  --assets-section-card-border: 1px solid rgba(255, 255, 255, 0.12);
  --assets-section-fg: rgba(248, 250, 252, 0.96);
  --assets-section-muted-fg: rgba(226, 232, 240, 0.62);
  --assets-total-row-bg: var(--dark-section-bg);
  --assets-total-row-fg: #ffffff;
  --assets-total-row-divider: 1px solid rgba(255, 255, 255, 0.44);
  --assets-total-row-rule: transparent;
  background: var(--dark-section-bg) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
  color: #f8fafc;
}

.profile-view :is(#assets-balance-section, .assets-balance-section) .assets-allocation-card {
  background: transparent !important;
  box-shadow: none;
}

.profile-view :is(#assets-balance-section, .assets-balance-section) .assets-allocation-label,
.profile-view :is(#assets-balance-section, .assets-balance-section) .assets-allocation-value,
.profile-view :is(#assets-balance-section, .assets-balance-section) .assets-allocation-title {
  color: rgba(248, 250, 252, 0.96);
}

.profile-view :is(#assets-balance-section, .assets-balance-section) .assets-allocation-percent {
  color: rgba(226, 232, 240, 0.58);
}

.profile-view :is(#assets-balance-section, .assets-balance-section) .assets-allocation-dot {
  border-color: rgba(248, 250, 252, 0.35);
}

.profile-view :is(#assets-balance-section, .assets-balance-section) .assets-allocation-check {
  background: transparent;
  border-color: rgba(226, 232, 240, 0.38);
}

.profile-view :is(#assets-balance-section, .assets-balance-section) .assets-allocation-check.is-visible {
  background: #f8fafc;
  border-color: #f8fafc;
  color: #111111;
}

:root:not([data-theme]) .profile-view :is(#assets-balance-section, .assets-balance-section),
[data-theme="gold"] .profile-view :is(#assets-balance-section, .assets-balance-section),
[data-theme="silver"] .profile-view :is(#assets-balance-section, .assets-balance-section),
[data-theme="dark"] .profile-view :is(#assets-balance-section, .assets-balance-section) {
  background: var(--dark-section-bg) !important;
  border: 1px solid rgba(255, 255, 255, 0.12) !important;
}

:root:not([data-theme]) .profile-view :is(#assets-balance-section, .assets-balance-section) .assets-compact-total-label,
:root:not([data-theme]) .profile-view :is(#assets-balance-section, .assets-balance-section) .assets-compact-total-value,
[data-theme="gold"] .profile-view :is(#assets-balance-section, .assets-balance-section) .assets-compact-total-label,
[data-theme="gold"] .profile-view :is(#assets-balance-section, .assets-balance-section) .assets-compact-total-value,
[data-theme="silver"] .profile-view :is(#assets-balance-section, .assets-balance-section) .assets-compact-total-label,
[data-theme="silver"] .profile-view :is(#assets-balance-section, .assets-balance-section) .assets-compact-total-value {
  color: #ffffff;
}

.profile-view :is(#assets-balance-section, .assets-balance-section) .linked-group {
  margin: 0;
}

.profile-view .assets-compact-total-row {
  min-height: 76px;
  align-items: center;
  padding: 14px 20px !important;
  border: 0 !important;
  border-bottom: var(--assets-total-row-divider) !important;
  border-radius: 0;
  background: var(--assets-total-row-bg) !important;
  box-shadow: inset 0 0 0 1px var(--assets-total-row-rule) !important;
}

.profile-view .assets-compact-total-label {
  padding-left: 0;
  color: var(--assets-total-row-fg);
  font-size: 26px;
  font-weight: 300;
  letter-spacing: -0.01em;
  text-transform: none;
}

.profile-view .assets-compact-total-value {
  padding: 0;
  padding-right: 38px;
  color: var(--assets-total-row-fg);
  font-size: 24px;
}

.profile-view .assets-compact-total-row .assets-total-check {
  top: 50%;
  right: 16px;
  transform: translateY(-50%);
}

.profile-view .assets-type-list-group {
  margin: 0 0 14px;
}

/* --- Assets filter panel transitions ---------------------------------------
   Scoped to user-driven filter / view-mode changes: profile.js adds
   `assets-panel-transition` to <html> around a document.startViewTransition
   render. Names only exist under that class so the app's own tab wipes and
   any other native view transitions never pick these panels up. Root snaps
   instantly (0s) — only the named panels animate: leavers fade/slide out,
   enterers fade/slide in, survivors morph position and height. */
html.assets-panel-transition .profile-view #managed-wallets-section {
  view-transition-name: assets-panels;
}

html.assets-panel-transition .profile-view .assets-type-list-group--banks {
  view-transition-name: assets-group-banks;
}

html.assets-panel-transition .profile-view .assets-type-list-group--stablecoins {
  view-transition-name: assets-group-stablecoins;
}

html.assets-panel-transition .profile-view .assets-type-list-group--other {
  view-transition-name: assets-group-other;
}

html.assets-panel-transition::view-transition-old(root),
html.assets-panel-transition::view-transition-new(root) {
  animation-duration: 0s;
}

html.assets-panel-transition::view-transition-group(*) {
  animation-duration: 280ms;
  animation-timing-function: cubic-bezier(0.22, 1, 0.36, 1);
}

/* Panels only present in the new state: fade + rise in. */
html.assets-panel-transition::view-transition-new(*):only-child {
  animation: assetsPanelEnter 280ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Panels only present in the old state: fade + sink out. */
html.assets-panel-transition::view-transition-old(*):only-child {
  animation: assetsPanelExit 200ms ease both;
}

@keyframes assetsPanelEnter {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes assetsPanelExit {
  from {
    opacity: 1;
    transform: none;
  }
  to {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}

.profile-view .assets-type-group-header.activity-date {
  min-height: 64px;
  padding: 10px 12px !important;
  gap: 10px;
  color: var(--assets-section-fg);
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: none;
}

.profile-view .assets-type-list-group.is-empty .assets-type-group-header.activity-date {
  min-height: 82px;
  padding-right: 14px !important;
}

.profile-view .assets-type-group-header.activity-date::after {
  content: none;
}

.profile-view .assets-type-group-dot {
  position: relative;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 2px solid var(--assets-section-fg);
  background: #fff;
  color: var(--assets-section-fg);
}

[data-theme="dark"] .profile-view .assets-type-group-dot {
  background: transparent;
}

.profile-view .assets-type-group-dot::after {
  content: '';
  position: absolute;
  inset: 50% auto auto 50%;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: currentColor;
  transform: translate(-50%, -50%);
}

.profile-view .assets-type-group-dot--banks {
  color: var(--assets-section-fg);
}

.profile-view .assets-type-group-dot--banks::after {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 21h18M3 10h18M5 6l7-3 7 3M4 10v11M20 10v11M8 14v4M12 14v4M16 14v4' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M3 21h18M3 10h18M5 6l7-3 7 3M4 10v11M20 10v11M8 14v4M12 14v4M16 14v4' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.profile-view .assets-type-group-dot--stablecoins {
  color: var(--assets-section-fg);
}

.profile-view .assets-type-group-dot--stablecoins::after {
  width: auto;
  height: auto;
  background: transparent;
  color: currentColor;
  content: '$';
  font-size: 20px;
  font-weight: 850;
  line-height: 1;
}

.profile-view .assets-type-group-dot--other {
  color: var(--assets-section-fg);
}

.profile-view .assets-transfer-section {
  display: block;
  width: 100%;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
  -webkit-appearance: none;
  appearance: none;
}

.profile-view .assets-transfer-section-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-width: 0;
  gap: 2px;
}

.profile-view .assets-transfer-section .transaction-note {
  font-weight: 400;
  letter-spacing: 0;
  line-height: 1.15;
  text-transform: none;
}

.profile-view .assets-transfer-section .assets-type-group-surface {
  pointer-events: none;
}

.profile-view .assets-type-group-dot--transfer {
  color: var(--assets-section-fg);
}

.profile-view .assets-type-group-dot--transfer::after {
  width: 20px;
  height: 20px;
  border-radius: 0;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 8h10M13 4l4 4-4 4M17 16H7M11 12l-4 4 4 4' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M7 8h10M13 4l4 4-4 4M17 16H7M11 12l-4 4 4 4' fill='none' stroke='black' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

.profile-view .assets-type-group-items {
  padding: 0 16px;
}

.profile-view .assets-type-list-group:not(.is-empty) .assets-type-group-items {
  border-top: var(--assets-section-divider);
}

.profile-view .assets-type-group-footer {
  min-height: 58px;
  padding: 0 14px 0 20px;
}

.profile-view .assets-type-list-group:not(.is-empty) .assets-type-group-footer::before {
  left: 20px;
  right: 20px;
  background: none;
  opacity: 1;
}

.profile-view .assets-type-group-total-label {
  color: var(--assets-section-muted-fg);
}

.profile-view .assets-type-group-total-value {
  color: var(--assets-section-fg);
}

/* ── Coin Detail Sheet ─────────────────────────────────────────── */
.coin-detail {
  display: flex;
  flex-direction: column;
  gap: var(--space-5);
  padding: var(--space-3);
}

.coin-detail-header {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-4);
  border-bottom: 1px solid var(--border-subtle);
}

.coin-detail-icon {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
}

.coin-detail-title-block {
  flex: 1;
  min-width: 0;
}

.coin-detail-name {
  font-size: 17px;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.2;
}

.coin-detail-symbol {
  font-size: 13px;
  color: var(--text-muted);
  font-family: var(--font-mono);
  margin-top: 2px;
}

.coin-detail-price-block {
  text-align: right;
  flex-shrink: 0;
}

.coin-detail-price {
  font-size: 20px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
  line-height: 1.2;
}

.coin-detail-change {
  font-size: 13px;
  font-weight: 600;
  margin-top: 2px;
}

.coin-detail-change.positive { color: var(--success); }
.coin-detail-change.negative { color: var(--error); }

.coin-detail-holdings {
  display: flex;
  flex-direction: column;
}

.coin-detail-holdings-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.coin-detail-holdings-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.coin-detail-holdings-amount {
  font-size: 18px;
  font-weight: 700;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

.coin-detail-holdings-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-secondary);
  font-family: var(--font-mono);
  text-align: right;
}

.coin-detail-chart {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--bg-secondary);
}

.coin-detail-chart-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.coin-detail-chart-title {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.coin-detail-chart-range-change {
  font-size: 13px;
  font-weight: 600;
  font-family: var(--font-mono);
  color: var(--text-secondary);
}

.coin-detail-chart-range-change--positive { color: var(--success); }
.coin-detail-chart-range-change--negative { color: var(--error); }

.coin-detail-chart-canvas {
  min-height: 148px;
}

.coin-detail-chart-ready-inner {
  color: #6b7280;
  animation: cryptoTrendFadeIn 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.coin-detail-chart-ready-inner--positive { color: rgba(34, 197, 94, 0.95); }
.coin-detail-chart-ready-inner--negative { color: rgba(239, 68, 68, 0.9); }

.coin-detail-chart-ready-inner svg {
  width: 100%;
  height: 132px;
  display: block;
  overflow: visible;
}

.coin-detail-chart-area {
  fill: url(#coin-detail-chart-fill);
}

.coin-detail-chart-line {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.coin-detail-chart-dot {
  fill: currentColor;
  stroke: #ffffff;
  stroke-width: 1.5;
}

.coin-detail-chart-loading,
.coin-detail-chart-empty,
.coin-detail-chart-error {
  min-height: 132px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  gap: var(--space-2);
}

.coin-detail-chart-error {
  flex-direction: column;
}

.coin-detail-chart-spinner {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(107, 114, 128, 0.25);
  border-top-color: rgba(37, 99, 235, 0.85);
  animation: coin-detail-chart-spin 0.8s linear infinite;
}

@keyframes coin-detail-chart-spin {
  to { transform: rotate(360deg); }
}

.coin-detail-period-changes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.coin-detail-period-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border-radius: 12px;
  border: 2px solid var(--border-subtle);
  background: var(--bg-primary);
  padding: 6px 6px;
  font-size: 11px;
  cursor: pointer;
  appearance: none;
  font: inherit;
  color: inherit;
  transition: border-color 120ms ease;
}

.coin-detail-period-chip.active {
  border: 3px solid #000;
}

[data-theme="dark"] .coin-detail-period-chip.active {
  border-color: #fff;
}

.coin-detail-period-chip-label {
  color: var(--text-muted);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.1;
  font-size: 12px;
}

.coin-detail-period-chip-value {
  font-family: var(--font-mono);
  font-weight: 700;
  font-size: 12px;
  line-height: 1.1;
}

.coin-detail-period-chip--positive .coin-detail-period-chip-value { color: var(--success); }
.coin-detail-period-chip--negative .coin-detail-period-chip-value { color: var(--error); }
.coin-detail-period-chip--neutral .coin-detail-period-chip-value { color: var(--text-secondary); }

.coin-detail-ath-distance {
  font-size: 12px;
  font-weight: 600;
  font-family: var(--font-mono);
}

.coin-detail-ath-distance.positive { color: var(--success); }
.coin-detail-ath-distance.negative { color: var(--error); }

.coin-detail-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3) var(--space-4);
}

.coin-detail-stat {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.coin-detail-stat-label {
  font-size: 11px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.coin-detail-stat-value {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-primary);
  font-family: var(--font-mono);
}

/* ── Buy / Sell action footer ───────────────────────────────────── */
.coin-detail-actions {
  display: flex;
  gap: var(--space-3);
  width: 100%;
}

.btn-trade {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  padding: 14px var(--space-4);
  border-radius: var(--radius-lg);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.02em;
  border: none;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
}

.btn-trade svg {
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}

.btn-trade:active {
  transform: scale(0.97);
  opacity: 0.85;
}

.btn-buy {
  background: var(--success);
  color: #fff;
}

.btn-sell {
  background: var(--error);
  color: #fff;
}

.btn-trade-disabled,
.btn-trade:disabled {
  background: var(--bg-tertiary);
  color: var(--text-muted);
  cursor: not-allowed;
  opacity: 0.65;
}

.btn-trade-disabled:active,
.btn-trade:disabled:active {
  transform: none;
  opacity: 0.65;
}

/* Activity view — canonical styles (formerly activity.js inline <style>) */

.activity-view {
  padding-bottom: var(--space-6);
  position: relative;
}

.activity-view .activity-date {
  _flex-direction: row-reverse;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  font-size: 11px;
  color:var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.09em;
  _padding: 6px 0 0 2px;
}

.activity-view .activity-date::before,
.activity-view .activity-date::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  max-width: none;
}

.activity-view .activity-date::before {
  display: none;
  background: linear-gradient(to right, rgba(160, 175, 200, 0.4), rgba(160, 175, 200, 0));
}
.activity-view .activity-date::after {
  background: var(--list-divider-line, rgba(0,0,0,0.06));
}

.activity-view .activity-items {
  display: flex;
  flex-direction: column;
  margin-bottom: 4px;
}

.activity-view .activity-user-search-group {
  margin-bottom: var(--space-4);
}

.activity-view .activity-user-search-header {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-2);
}

.activity-view .activity-user-search-subheader {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: var(--space-3) 0 var(--space-1);
}

.activity-view .activity-user-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-view .activity-user-action-btn {
  width: 36px;
  height: 36px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--gold-200);
  color: #0b0f14;
  border-radius: var(--radius-full);
  box-shadow: none;
  opacity: 1;
  transition:
    background 140ms ease,
    border-color 140ms ease,
    color 140ms ease,
    transform 140ms ease,
    box-shadow 140ms ease;
}

.activity-view .activity-user-action-btn:hover {
  background: #fff;
  border-color: var(--gold-300);
  color: #05070a;
  box-shadow: none;
}

.activity-view .activity-user-action-btn:active {
  transform: translateY(1px) scale(0.98);
}

[data-theme="dark"] .activity-view .activity-user-action-btn {
  background: rgba(15, 23, 42, 0.74);
  border-color: var(--gold-300);
  color: rgba(248, 250, 252, 0.9);
  box-shadow: none;
}

[data-theme="dark"] .activity-view .activity-user-action-btn:hover {
  background: rgba(30, 41, 59, 0.92);
  border-color: var(--gold-300);
  color: #fff;
}

.activity-view .activity-user-action-btn svg {
  width: 20px;
  height: 20px;
  stroke-width: 2.2;
}

/* The "Select" pill replaces the fixed-size circle action button when
   the user search has more than one result. It uses the same surface
   as the icon button so the row weight feels identical, but auto-
   sizes to its text label and gets a touch more horizontal padding. */
.activity-view .activity-user-action-btn.activity-user-select-btn {
  width: auto;
  height: 34px;
  padding: 0 var(--space-3);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--text-primary);
}

[data-theme="dark"] .activity-view .activity-user-action-btn.activity-user-select-btn {
  color: rgba(226, 232, 240, 0.95);
}

.activity-view .activity-stats {
  position: relative;
  z-index: 10;
  margin-bottom: var(--space-4);
}

@media (min-width: 768px) {
  .activity-view .activity-hero-cluster {
    margin: 0 0 var(--space-5);
  }

  .activity-view .activity-hero-cluster .activity-stats {
    margin-bottom: 0;
  }
}

.activity-view .stat-card-balance {
  cursor: pointer;
  padding-bottom: 8px;
  transition: box-shadow 220ms ease, transform 220ms ease;
}

.activity-view .stat-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.activity-view .stat-month-summary {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.86);
}

.activity-view .summary-net-line,
.activity-view .summary-scope-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
}

.activity-view .summary-net-line {
  gap: 6px;
}

.activity-view .summary-scope-line {
  justify-content: flex-end;
  gap: 4px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 12px;
  line-height: 1.25;
  opacity: 0.62;
  text-align: right;
}

.activity-view .summary-net {
  font-size: 20px;
  line-height: 1.1;
}

.activity-view .summary-suffix,
.activity-view .summary-range-bound {
  color: rgba(255, 255, 255, 0.82);
  font-weight: 600;
}

.activity-view .summary-count {
  color: #ffffff;
  font-weight: 700;
}

.activity-view .stat-range-arrow {
  opacity: 0.82;
  font-size: 18px;
  position: relative;
  top: 0;
  margin-left: 4px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1;
  transition: transform 180ms ease, opacity 180ms ease;
}

.activity-view .stat-card-balance.is-range-expanded .stat-range-arrow {
  transform: rotate(180deg);
  opacity: 1;
}

.activity-view .stat-range-panel {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  margin-top: 0;
  transition: max-height 1460ms cubic-bezier(0.22, 1, 0.36, 1), opacity 320ms ease, margin-top 460ms cubic-bezier(0.22, 1, 0.36, 1);
}

.activity-view .stat-card-balance.is-range-expanded .stat-range-panel {
  margin-top: 12px;
  max-height: 320px;
  opacity: 1;
  pointer-events: auto;
}

.activity-view .activity-search-row {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  margin: 0 0 var(--space-3);
}

.activity-view .activity-search-row .search-container {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.activity-view .activity-search-stack {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

.activity-view .activity-search-stack.has-active-filters {
  gap: 8px;
}

.activity-view .activity-search-input-row {
  display: flex;
  align-items: stretch;
  gap: 8px;
}

.activity-view .activity-search-input-row .search-container {
  flex: 1;
  min-width: 0;
  margin: 0;
}

.activity-view .activity-search-row .search-container .search-input-wrapper .search-side-toggle--inline {
  position: absolute;
  top: 50%;
  right: 4px;
  left: auto;
  width: 40px;
  height: 40px;
  min-height: 0;
  padding: 0;
  margin: 0 !important;
  border: none !important;
  border-radius: var(--radius-full);
  background: transparent;
  box-shadow: none;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-50%) translateX(6px) scale(0.7);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 220ms;
}

.activity-view .activity-search-row .search-container:focus-within .search-input-wrapper .search-side-toggle--inline,
.activity-view .activity-search-row.is-search-suggest-open .search-container .search-input-wrapper .search-side-toggle--inline {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-50%) translateX(0) scale(1);
  transition:
    opacity 180ms ease,
    transform 220ms cubic-bezier(0.22, 1, 0.36, 1),
    visibility 0s linear 0s;
}

.activity-view .activity-search-row .search-container .search-input-wrapper .search-clear {
  right: 10px;
  transition: right 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.activity-view .activity-search-row .search-container:focus-within .search-input-wrapper .search-clear,
.activity-view .activity-search-row.is-search-suggest-open .search-container .search-input-wrapper .search-clear {
  right: 46px;
}

.activity-view .activity-search-row .search-container .search-input-wrapper .search-input {
  padding-right: 44px;
}

.activity-view .activity-search-row .search-container:focus-within .search-input-wrapper .search-input,
.activity-view .activity-search-row.is-search-suggest-open .search-container .search-input-wrapper .search-input {
  padding-right: 80px;
}

@media (prefers-reduced-motion: reduce) {
  .activity-view .activity-search-row .search-container .search-input-wrapper .search-side-toggle--inline,
  .activity-view .activity-search-row .search-container .search-input-wrapper .search-clear {
    transition: none;
  }
}

.activity-view .activity-search-stack .search-container {
  margin: 0;
}

.activity-view .activity-search-row.is-search-suggest-open {
  overflow: hidden;
}


.activity-view .search-container .activity-filters {
  display: none !important;
}


.activity-summary-toolbar {
  --activity-summary-toolbar-height: 52px;
  position: fixed !important;
  top: auto;
  left: max(var(--safe-left), calc((100vw - 430px) / 2));
  right: auto;
  bottom: calc(var(--app-mobile-nav-height) - 1px);
  width: min(430px, calc(100vw - var(--safe-left) - var(--safe-right)));
  max-width: calc(100vw - var(--safe-left) - var(--safe-right));
  box-sizing: border-box;
  margin: 0;
  padding: 10px 16px;
  padding-left: calc(var(--safe-left) + var(--space-4));
  padding-right: calc(var(--safe-right) + var(--space-4));
  background: #ffffff;
  border-top: 1px solid rgba(17, 24, 39, 0.08);
  z-index: 999;
  transform: none;
  translate: 0 0;
}

@media (min-width: 768px) {
  .activity-summary-toolbar {
    left: max(var(--space-8), calc((100vw - min(1200px, 100vw)) / 2 + var(--space-8)));
    width: min(
      1200px - (2 * var(--space-8)),
      calc(100vw - (2 * max(var(--space-8), calc((100vw - min(1200px, 100vw)) / 2 + var(--space-8)))))
    );
    max-width: none;
    bottom: 0;
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}

.activity-summary-toolbar .activity-summary-by {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.activity-summary-toolbar .activity-summary-by-label {
  font-size: 11px;
  font-weight: unset;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.activity-summary-toolbar .activity-summary-by-options {
  display: flex;
  gap: 4px;
}

.activity-summary-toolbar .activity-summary-chip {
  background: none;
  color: var(--text-primary);
  border-radius: 8px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 300;
  cursor: pointer;
}

.activity-summary-toolbar .activity-summary-chip.active {
  background: var(--text-primary);
  border-color: var(--text-primary);
  color: var(--bg-primary);
}

.activity-view .activity-filter-person {
  margin: 0 0 12px;
  padding: 0 2px;
}

.activity-view .activity-filter-person-label {
  margin-bottom: 8px;
  font-size: 12px;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.activity-view .activity-filter-person .transaction-item {
  padding: 0;
  cursor: default;
}

.activity-view .summary-rollup-sheet {
  border: 1px solid var(--border-subtle);
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-glass-strong);
  margin-bottom: 12px;
}

.activity-view .summary-rollup-table-head,
.activity-view .summary-rollup-row {
  display: grid;
  grid-template-columns:
    minmax(7.5rem, 1.35fr)
    minmax(3.2rem, 0.55fr)
    minmax(5.5rem, 1fr)
    minmax(3.2rem, 0.55fr)
    minmax(5.5rem, 1fr)
    minmax(5.5rem, 1fr);
  align-items: center;
}

.activity-view .summary-rollup-table-head {
  padding: 0;
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-muted);
  background: none;
  padding-top: 6px;
  border-bottom: 1px solid var(--border-subtle);
}

.activity-view .summary-rollup-table-head .summary-rollup-col {
  padding: 7px 10px;
}

.activity-view .summary-rollup-row {
  min-height: 42px;
  border-bottom: 1px solid var(--border-subtle);
  cursor: pointer;
}

@media (hover: hover) and (pointer: fine) {
  .activity-view .summary-rollup-row:hover {
    background: color-mix(in srgb, var(--text-primary) 4%, transparent);
  }
}

.activity-view .summary-rollup-entry:last-child .summary-rollup-row {
  border-bottom: 0;
}

.activity-view .summary-rollup-col,
.activity-view .summary-rollup-cell {
  padding: 8px 10px;
  font-variant-numeric: tabular-nums;
}

.activity-view .summary-rollup-col--period {
  font-size: 12px;
  font-weight: 700;
  text-align: left;
}

.activity-view .summary-rollup-period-btn {
  appearance: none;
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  padding: 2px 10px;
  margin: 0;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text-primary);
  text-align: left;
  cursor: pointer;
  border-radius: 6px;
  text-decoration: none;
}

.activity-view .summary-rollup-period-btn:hover,
.activity-view .summary-rollup-period-btn:focus-visible {
  text-decoration: none;
  outline: none;
}

.activity-view .summary-rollup-row.is-period-selected {
  background: color-mix(in srgb, var(--text-primary, #111) 6%, transparent);
  border-radius: 0px;
}

.activity-view .summary-rollup-col--count,
.activity-view .summary-rollup-col--amount,
.activity-view .summary-rollup-col--net,
.activity-view .summary-rollup-cell {
  text-align: right;
}

.activity-view .summary-rollup-cell {
  border: 0;
  background: transparent;
  margin: 0;
  cursor: pointer;
  font: inherit;
  color: inherit;
}

.activity-view .summary-rollup-cell.is-expanded {
  background: var(--gold-200);
}

.activity-view .summary-rollup-amount {
  display: block;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
  white-space: nowrap;
}

.activity-view .summary-rollup-cell--debit .summary-rollup-amount {
  color: #b42318;
}

.activity-view .summary-rollup-cell--credit .summary-rollup-amount {
  color: var(--success);
}

.activity-view .summary-rollup-amount--net.positive {
  color: var(--success);
}

.activity-view .summary-rollup-amount--net.negative {
  color: #b42318;
}

.activity-view .summary-rollup-drilldown {
  margin: 0;
  padding: 4px 8px 8px;
  border-top: 1px dashed var(--border-subtle);
}

@media (max-width: 767px) {
  .activity-view .summary-rollup-sheet {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .activity-view .summary-rollup-table-head,
  .activity-view .summary-rollup-row {
    min-width: 17.5rem;
    grid-template-columns:
      minmax(6.25rem, 1.15fr)
      minmax(5.75rem, 1fr)
      minmax(5.75rem, 1fr);
  }

  .activity-view .summary-rollup-table-head > :nth-child(2),
  .activity-view .summary-rollup-table-head > :nth-child(4),
  .activity-view .summary-rollup-table-head > :nth-child(6),
  .activity-view .summary-rollup-row > :nth-child(2),
  .activity-view .summary-rollup-row > :nth-child(4),
  .activity-view .summary-rollup-row > :nth-child(6) {
    display: none;
  }

  .activity-view .summary-rollup-table-head > :nth-child(1),
  .activity-view .summary-rollup-row > :nth-child(1) {
    grid-column: 1;
  }

  .activity-view .summary-rollup-table-head > :nth-child(3),
  .activity-view .summary-rollup-row > :nth-child(3) {
    grid-column: 2;
  }

  .activity-view .summary-rollup-table-head > :nth-child(5),
  .activity-view .summary-rollup-row > :nth-child(5) {
    grid-column: 3;
  }

  .activity-view .summary-rollup-col--period {
    font-size: 11px;
    line-height: 1.15;
    white-space: normal;
  }

  .activity-view .summary-rollup-col,
  .activity-view .summary-rollup-cell,
  .activity-view .summary-rollup-table-head .summary-rollup-col {
    padding-left: 8px;
    padding-right: 6px;
  }

  .activity-view .summary-rollup-amount {
    font-size: 12px;
  }
}

.activity-view .search-container {
  position: relative;
  z-index: 8;
}

.activity-view .activity-search-anchor {
  position: relative;
}

.activity-view .activity-search-filters {
  display: flex;
  flex-direction: column;
  gap: 6px;
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  pointer-events: none;
  transition:
    max-height 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms ease;
}

.activity-view .activity-search-stack.has-active-filters .activity-search-filters {
  max-height: 160px;
  opacity: 1;
  pointer-events: auto;
}

.activity-view .activity-search-row.is-search-filters-open {
  overflow: hidden;
}

.activity-view .activity-search-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid rgba(128, 143, 164, 0.18);
  background: #ffffff;
  color: #111827;
  border-radius: 12px;
  padding: 8px 10px 8px 12px;
  font-size: 12px;
  line-height: 1.2;
}

.activity-view .activity-search-chip-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.activity-view .activity-search-chip-clear {
  flex: 0 0 auto;
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  margin: 0;
  padding: 0;
  border: 1px solid rgba(128, 143, 164, 0.2);
  border-radius: 999px;
  background: rgba(17, 24, 39, 0.06);
  color: rgba(17, 24, 39, 0.72);
  font: inherit;
  line-height: 1;
  cursor: pointer;
}

.activity-view .activity-search-suggest[hidden] {
  display: none;
}

.activity-view .activity-search-suggest {
  display: grid;
  box-sizing: border-box;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(0, 1fr);
  margin-top: 0;
  padding-top: 0;
  border-top: 1px solid transparent;
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-8px);
  pointer-events: none;
  visibility: hidden;
  transition:
    max-height 320ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 240ms ease,
    transform 280ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 240ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms ease,
    visibility 0s linear 320ms;
}

.activity-view .activity-search-suggest.is-open {
  margin-top: 12px;
  border-top-color: rgba(128, 143, 164, 0.18);
  max-height: min(360px, 50vh);
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  visibility: visible;
  transition:
    max-height 360ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms ease,
    transform 320ms cubic-bezier(0.22, 1, 0.36, 1),
    margin-top 280ms cubic-bezier(0.22, 1, 0.36, 1),
    border-color 200ms ease,
    visibility 0s;
  background: var(--gold-100);
}

@keyframes activity-suggest-col-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .activity-view .activity-search-suggest,
  .activity-view .activity-search-suggest.is-open {
    transition: none;
    transform: none;
  }

  .activity-view .activity-search-suggest.is-open .activity-search-suggest-col {
    animation: none;
  }
}

.activity-view .activity-search-suggest.is-open .activity-search-suggest-col {
  animation: activity-suggest-col-in 320ms cubic-bezier(0.22, 1, 0.36, 1) both;
}

.activity-view .activity-search-suggest.is-open .activity-search-suggest-col:nth-child(2) {
  animation-delay: 70ms;
}

.activity-view .activity-search-suggest-col {
  position: relative;
  padding: 12px 10px 16px;
  min-width: 0;
  min-height: 0;
  max-height: min(320px, 45vh);
  overflow-y: auto;
  overscroll-behavior: none;
  scrollbar-width: thin;
  scrollbar-color: rgba(148, 163, 184, 0.35) transparent;
}

.activity-view .activity-search-suggest-col::before,
.activity-view .activity-search-suggest-col::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 28px;
  pointer-events: none;
  z-index: 2;
  opacity: 0;
  transition: opacity 180ms ease;
}

.activity-view .activity-search-suggest-col::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg-primary, #ffffff) 0%, transparent 100%);
}

.activity-view .activity-search-suggest-col::after {
  bottom: 0;
  background:
    linear-gradient(to top, var(--bg-primary, #ffffff) 0%, rgba(255, 255, 255, 0) 100%);
}

.activity-view .activity-search-suggest-col.can-scroll-up::before {
  opacity: 1;
}

.activity-view .activity-search-suggest-col.can-scroll-down::after {
  opacity: 1;
}

.activity-view .activity-search-suggest-col.can-scroll-down .activity-search-suggest-scroll-hint {
  opacity: 1;
}

.activity-view .activity-search-suggest-scroll-hint {
  position: absolute;
  left: 50%;
  bottom: 6px;
  transform: translateX(-50%);
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  color: rgba(17, 24, 39, 0.45);
  pointer-events: none;
  z-index: 3;
  opacity: 0;
  transition: opacity 180ms ease;
}

.activity-view .activity-search-suggest-scroll-hint svg {
  width: 14px;
  height: 14px;
}

.activity-view .activity-search-suggest-col + .activity-search-suggest-col {
  border-left: 1px solid rgba(128, 143, 164, 0.18);
}

.activity-view .activity-search-suggest-col h4 {
  margin: 0 0 8px;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(17, 24, 39, 0.5);
}

.activity-view .activity-search-suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  color: #111827;
  font: inherit;
  padding: 8px 8px;
  border-radius: 10px;
  margin-bottom: 4px;
  cursor: pointer;
}

.activity-view .activity-search-suggest-item:hover,
.activity-view .activity-search-suggest-item.is-selected {
  background: rgba(128, 143, 164, 0.12);
}

.activity-view .activity-search-suggest-item.is-ingress .activity-search-suggest-name {
  color: #34d399;
}

.activity-view .activity-search-suggest-item.is-egress .activity-search-suggest-name {
  color: #f87171;
}

.activity-view .activity-search-suggest-name {
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
}

.activity-view .activity-search-suggest-meta {
  margin-top: 2px;
  font-size: 11px;
  color: rgba(17, 24, 39, 0.5);
}

.activity-view .activity-search-suggest-empty {
  font-size: 12px;
  color: rgba(17, 24, 39, 0.4);
  padding: 6px 4px;
}

.activity-view .activity-unsettled-summary-container {
  margin-top: 0;
  margin-bottom: 0;
  max-height: 0;
  opacity: 0;
  overflow: visible;
  transition: all 0.4s cubic-bezier(0.22, 1, 0.36, 1);
  transform: translateY(-10px);
  position: relative;
  z-index: -1;
}

.activity-view .activity-unsettled-summary-container.is-visible {
  margin-top: var(--space-4);
  margin-bottom: var(--space-4);
  max-height: 60px;
  opacity: 1;
  transform: translateY(0);
}

.activity-view .activity-unsettled-summary-container.hidden {
  display: none;
}

.activity-view .activity-unsettled-summary-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.activity-view .activity-unsettled-summary-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-primary);
}

.activity-view .activity-unsettled-summary-count {
  font-size: 12px;
  font-weight: 700;
  background: var(--bg-tertiary);
  color: var(--text-primary);
  padding: 2px 8px;
  border-radius: 6px;
}

.activity-view .activity-unsettled-summary-net {
  font-size: 13px;
  font-weight: 700;
}

.activity-view .activity-unsettled-summary-net.positive {
  color: #18a34a;
}

.activity-view .activity-unsettled-summary-net.negative {
  color: #e23b45;
}

.activity-view .activity-unsettled-toggle input {
  width: 16px;
  height: 16px;
  cursor: pointer;
}

.activity-view .invite-contact-item {
  margin-top: var(--space-3);
  background: var(--bg-glass);
  border: 1px dashed var(--accent-alert);
}

[data-theme="dark"] .activity-view .invite-contact-item {
  background: rgba(226, 232, 240, 0.08);
  border-color: rgba(226, 232, 240, 0.18);
}

.activity-view .invite-contact-item .transaction-name {
  color: var(--text-primary);
}

.activity-view .invite-contact-item .transaction-note {
  color: var(--text-muted);
}

.activity-view .native-contacts-cta-item {
  margin-top: var(--space-3);
  background: var(--bg-glass);
  border: 1px dashed var(--border-default);
}

[data-theme="dark"] .activity-view .native-contacts-cta-item {
  background: rgba(226, 232, 240, 0.08);
  border-color: rgba(226, 232, 240, 0.18);
}

.activity-view .native-contacts-cta-item .transaction-name {
  color: var(--text-primary);
}

.activity-view .native-contacts-cta-item .transaction-note {
  color: var(--text-muted);
}

.activity-view .native-contacts-cta-btn {
  min-width: 88px;
  height: 36px;
  border-radius: 999px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.15);
  border: var(--border-width) solid var(--gold-400);
  color: var(--text-primary);
}

.activity-view .native-contacts-cta-btn:hover {
  background: var(--gold-400);
  color: var(--text-inverse);
}

/* Same first-paint fade as Home: no per-row motion, container only. */
.activity-view .transaction-item.list-animate-item {
  animation: none;
}

.activity-view #activity-list:not([data-list-container-entered="true"]):not(.activity-list--fade-in) {
  opacity: 0;
}

.activity-view #activity-list.activity-list--fade-in {
  animation: activityListFadeIn 320ms ease-out both;
}

@keyframes activityListFadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Help agent deep-link flash */
.help-anchor-flash,
[data-help-anchor].help-anchor-flash {
  outline: 2px solid var(--accent-primary, #3fb950);
  outline-offset: 4px;
  border-radius: 12px;
  transition: outline-color 0.2s ease;
}
