
:root {
  --bg: #0b1220;
  --surface: #121b2b;
  --surface-raised: #172236;
  --surface-soft: #1a263a;
  --surface-hover: #1e2c42;
  --border: #26344a;
  --border-strong: #33445e;
  --text: #f4f7fb;
  --text-soft: #d8deea;
  --text-muted: #95a0b2;
  --accent: #8b9cff;
  --accent-strong: #a7b3ff;
  --accent-soft: rgba(139, 156, 255, 0.14);
  --accent-border: rgba(139, 156, 255, 0.38);
  --brand-warm: #59c8f7;
  --rise: #39d49a;
  --rise-soft: rgba(57, 212, 154, 0.12);
  --drop: #ff6b7c;
  --drop-soft: rgba(255, 107, 124, 0.12);
  --neutral: #7f9fbe;
  --warning: #f3b64c;
  --danger: #ff6b7c;
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.18);
  --shadow-md: 0 14px 40px rgba(0, 0, 0, 0.28);
  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 26px;
  --header-height: 62px;
  --bottom-nav-height: 76px;
  --content-width: 760px;
  --transition: 180ms cubic-bezier(.2, .8, .2, 1);
}

:root[data-theme="light"] {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --surface-soft: #eef2f8;
  --surface-hover: #f1f4f9;
  --border: #e2e7ef;
  --border-strong: #cfd7e3;
  --text: #141b28;
  --text-soft: #394354;
  --text-muted: #6c7686;
  --accent: #4b5fd1;
  --accent-strong: #394bb8;
  --accent-soft: rgba(75, 95, 209, 0.10);
  --accent-border: rgba(75, 95, 209, 0.28);
  --brand-warm: #2f8fb8;
  --rise: #0f9d73;
  --rise-soft: rgba(15, 157, 115, 0.09);
  --drop: #d94c61;
  --drop-soft: rgba(217, 76, 97, 0.09);
  --neutral: #6483a1;
  --warning: #b9790f;
  --danger: #d94c61;
  --shadow-sm: 0 1px 2px rgba(20, 30, 50, 0.05);
  --shadow-md: 0 18px 45px rgba(20, 30, 50, 0.12);
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
  color-scheme: dark;
  font-size: 16px;
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
}

html[data-theme="light"] {
  color-scheme: light;
}

body {
  min-height: 100vh;
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

body.drawer-open,
body.modal-open {
  overflow: hidden;
}

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

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  color: inherit;
}

img {
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  color: var(--text);
  letter-spacing: -0.035em;
}

h1 {
  font-size: clamp(1.8rem, 5vw, 2.4rem);
  line-height: 1.08;
}

h2 {
  font-size: clamp(1.55rem, 4.5vw, 2rem);
  line-height: 1.12;
}

h3 {
  font-size: 1.12rem;
}

a {
  color: var(--accent);
}

/* App chrome */
.app-header {
  position: sticky;
  top: 0;
  z-index: 700;
  height: var(--header-height);
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  border-bottom: 1px solid color-mix(in srgb, var(--border) 78%, transparent);
  backdrop-filter: blur(18px) saturate(145%);
  -webkit-backdrop-filter: blur(18px) saturate(145%);
}

.app-header__inner {
  width: min(100%, 1120px);
  height: 100%;
  margin: 0 auto;
  padding: 0 20px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  color: var(--text);
  text-decoration: none;
  font-weight: 750;
  font-size: 1.22rem;
  letter-spacing: -0.045em;
}

.brand-dot {
  color: var(--brand-warm);
  margin: 0 1px;
}

.desktop-primary-nav,
.desktop-utility-nav {
  display: flex;
  align-items: center;
}

.desktop-primary-nav {
  gap: 4px;
}

.desktop-primary-nav a {
  min-height: 36px;
  padding: 8px 12px;
  border-radius: 10px;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 600;
  transition: color var(--transition), background var(--transition);
}

.desktop-primary-nav a:hover,
.desktop-primary-nav a.active {
  color: var(--text);
  background: var(--surface-soft);
}

.desktop-primary-nav a.active {
  color: var(--accent-strong);
}

.desktop-utility-nav {
  margin-left: auto;
  gap: 18px;
}

.desktop-utility-nav a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 500;
}

.desktop-utility-nav a:hover {
  color: var(--text);
}

.app-main,
.container {
  width: min(100%, var(--content-width));
  margin: 0 auto;
  padding: 18px 20px 48px;
}

.control-bar {
  min-height: 46px;
  margin-bottom: 22px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.control-bar__preferences,
.control-bar__actions,
.top-actions-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.icon-button {
  width: 42px;
  height: 42px;
  padding: 0;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text-soft);
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.icon-button:hover {
  background: var(--surface-hover);
  border-color: var(--border-strong);
  color: var(--text);
}

.icon-button:active {
  transform: scale(.97);
}

.theme-icon {
  display: inline-flex;
}

.theme-icon--sun {
  display: none;
}

:root[data-theme="light"] .theme-icon--sun {
  display: inline-flex;
}

:root[data-theme="light"] .theme-icon--moon {
  display: none;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.language-option {
  height: 34px;
  padding: 0 10px;
  margin: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 650;
  cursor: pointer;
}

.language-option.active {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.top-add-btn {
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 22%, transparent);
  transition: background var(--transition), transform var(--transition), box-shadow var(--transition);
}

.top-add-btn:hover {
  background: var(--accent-strong);
}

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

/* Page headings */
.page-heading,
.section-header {
  margin-bottom: 18px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.page-heading__copy,
.section-header > div:first-child {
  min-width: 0;
}

.page-heading h1,
.section-header h2 {
  margin: 0;
}

.page-heading__subtitle,
.subtitle {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.page-link {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
}

.page-link:hover {
  color: var(--accent-strong);
}

.gesture-hint {
  width: fit-content;
  margin: -5px 0 12px auto;
  padding: 6px 9px;
  display: flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface-soft);
  font-size: 0.69rem;
  font-weight: 600;
  opacity: 1;
  transition: opacity 220ms ease, transform 220ms ease;
}

.gesture-hint.is-hiding {
  opacity: 0;
  transform: translateX(-8px);
}

/* Summary */
.portfolio-summary,
.portfolio-value-card {
  position: relative;
  overflow: hidden;
  margin-bottom: 18px;
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background:
    radial-gradient(circle at 90% -15%, var(--accent-soft), transparent 44%),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.portfolio-summary::after {
  content: "";
  position: absolute;
  width: 160px;
  height: 160px;
  right: -90px;
  bottom: -110px;
  border: 1px solid var(--accent-border);
  border-radius: 50%;
  opacity: .55;
  pointer-events: none;
}

.summary-label,
.portfolio-value-card .label {
  margin-bottom: 7px;
  color: var(--text-muted);
  font-size: 0.8rem;
  font-weight: 550;
}

.summary-values,
.portfolio-value-card .value {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 10px;
  font-variant-numeric: tabular-nums;
}

.summary-primary,
.portfolio-value-card .value > span:first-child {
  color: var(--text);
  font-size: clamp(1.72rem, 7vw, 2.45rem);
  font-weight: 750;
  letter-spacing: -0.045em;
  line-height: 1.12;
}

.summary-secondary,
.portfolio-value-card .value > span:not(:first-child) {
  color: var(--text-muted);
  font-size: clamp(1rem, 4vw, 1.25rem);
  font-weight: 650;
}

.summary-change {
  margin-top: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.98rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.summary-change.positive {
  color: var(--rise);
}

.summary-change.negative {
  color: var(--drop);
}

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

.summary-period {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 600;
}

/* Compact asset lists */
.asset-list {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.asset-entry {
  position: relative;
  background: var(--surface);
}

.asset-entry:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.swipe-shell {
  position: relative;
  overflow: hidden;
  background: var(--surface-soft);
  touch-action: pan-y;
}

.swipe-actions {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: max-content;
  min-width: max-content;
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  z-index: 0;
}

.swipe-action {
  width: 76px;
  min-width: 76px;
  flex: 0 0 76px;
  padding: 8px 5px;
  margin: 0;
  border: 0;
  border-left: 1px solid color-mix(in srgb, var(--border) 70%, transparent);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  color: var(--text-soft);
  background: var(--surface-soft);
  text-decoration: none;
  font-size: 0.68rem;
  font-weight: 650;
  cursor: pointer;
}

.swipe-action:hover {
  background: var(--surface-hover);
  color: var(--text);
}

.swipe-action--alert {
  color: var(--warning);
}

.swipe-action--order {
  color: var(--accent-strong);
}

.swipe-action--details,
.swipe-action--history {
  color: var(--text-soft);
}

.swipe-surface {
  position: relative;
  z-index: 1;
  min-height: 92px;
  background: var(--surface);
  transform: translate3d(0, 0, 0);
  transition: transform 250ms cubic-bezier(.22, .72, .22, 1);
  will-change: transform;
}

.swipe-shell.is-open .swipe-surface {
  transform: translate3d(calc(-1 * var(--swipe-width, 228px)), 0, 0);
}

.swipe-shell.is-dragging .swipe-surface {
  transition: none;
}

.asset-row {
  min-height: 92px;
  padding: 15px 14px 15px 16px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(112px, auto) 32px;
  align-items: center;
  gap: 12px;
}

.portfolio-asset-row {
  min-height: 102px;
}

.asset-identity,
.asset-price-block {
  min-width: 0;
}

.asset-symbol-line {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.coin-logo {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  flex: 0 0 auto;
  object-fit: cover;
  background: var(--surface-soft);
}

.asset-symbol {
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.trend-indicator {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: 0.62rem;
  font-weight: 800;
}

.trend-indicator.up {
  color: var(--rise);
  background: var(--rise-soft);
}

.trend-indicator.down {
  color: var(--drop);
  background: var(--drop-soft);
}

.trend-indicator.flat {
  color: var(--neutral);
  background: color-mix(in srgb, var(--neutral) 12%, transparent);
}

.asset-meta {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.asset-meta strong {
  color: var(--text-soft);
  font-weight: 600;
}

.asset-meta--stacked {
  display: grid;
  gap: 3px;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
}

.asset-unit-price,
.asset-holding-quantity {
  display: block;
  min-width: 0;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.asset-unit-price {
  color: var(--text-soft);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.asset-holding-quantity {
  color: var(--text-muted);
  font-size: 0.71rem;
}

.asset-price-block {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.asset-primary-value {
  color: var(--text);
  font-size: 0.97rem;
  font-weight: 700;
  letter-spacing: -0.018em;
  white-space: nowrap;
}

.asset-secondary-line {
  margin-top: 5px;
  display: flex;
  align-items: baseline;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.asset-converted-value {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 550;
}

.asset-change {
  font-size: 0.76rem;
  font-weight: 750;
}

.asset-change.positive {
  color: var(--rise);
}

.asset-change.negative {
  color: var(--drop);
}

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

.asset-overflow {
  width: 32px;
  height: 42px;
  padding: 0;
  margin: 0;
  border: 0;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
}

.asset-overflow:hover,
.asset-overflow[aria-expanded="true"] {
  background: var(--surface-soft);
  color: var(--text);
}

.asset-detail-panel {
  padding: 16px;
  border-top: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface-soft) 50%, var(--surface));
  opacity: 1;
  transform-origin: top;
  will-change: height, opacity, transform;
}

.asset-detail-panel[hidden] {
  display: none;
}

@media (prefers-reduced-motion: reduce) {
  .asset-detail-panel {
    will-change: auto;
  }
}

.asset-detail-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.detail-stat {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.detail-stat__label {
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 600;
}

.detail-stat__value {
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-soft);
  font-size: 0.8rem;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.detail-stat__secondary {
  margin-top: 2px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 0.69rem;
  font-weight: 620;
  font-variant-numeric: tabular-nums;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.asset-detail-actions {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-bottom: 14px;
}

.asset-history-list {
  max-height: 250px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
}

.asset-history-row {
  padding: 9px 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  font-size: 0.77rem;
}

.asset-history-row:not(:last-child) {
  border-bottom: 1px solid var(--border);
}

.asset-history-row form {
  flex: 0 0 auto;
  margin: 0;
}

.asset-history-row form button[type="submit"] {
  width: auto;
  margin: 0;
}

.asset-history-type {
  font-weight: 700;
}

.asset-history-type.buy {
  color: var(--rise);
}

.asset-history-type.sell {
  color: var(--drop);
}

.asset-history-type.adjustment {
  color: var(--neutral);
}

.asset-history-date,
.asset-history-recorded,
.asset-history-empty,
.asset-history-note {
  color: var(--text-muted);
}

.asset-history-recorded {
  margin-top: 2px;
  font-size: 0.65rem;
  line-height: 1.35;
}

.asset-history-cost-basis {
  margin-top: 1px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.asset-history-cost-basis--secondary {
  color: var(--text-muted);
  font-size: 0.62rem;
}

.asset-history-amount {
  flex: 0 0 auto;
  color: var(--text-soft);
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.asset-history-note {
  margin: 10px 0 0;
  text-align: center;
  font-size: 0.67rem;
}

.asset-history-empty {
  margin: 0;
  padding: 8px 0;
  text-align: center;
  font-size: 0.77rem;
}

/* Compatibility price and item cards for other screens */
.price-card,
.item-card,
.history-stat {
  margin-bottom: 12px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.item-card.trend-up,
.item-card.trend-down,
.item-card.trend-flat,
.price-card.trend-up,
.price-card.trend-down,
.price-card.trend-flat {
  background: var(--surface);
}

.item-card.trend-up,
.price-card.trend-up {
  border-left: 3px solid var(--rise);
}

.item-card.trend-down,
.price-card.trend-down {
  border-left: 3px solid var(--drop);
}

.item-card.trend-flat,
.price-card.trend-flat {
  border-left: 3px solid var(--neutral);
}

.item-row,
.item-card .item-row,
.price-card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.item-title,
.item-card .item-title,
.price-card .symbol {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 700;
}

.item-sub,
.item-card .item-sub,
.price-card .sell {
  color: var(--text-muted);
  font-size: 0.78rem;
}

.price-card .prices {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.trend-arrow.up {
  color: var(--rise);
}

.trend-arrow.down {
  color: var(--drop);
}

.trend-arrow.flat {
  color: var(--neutral);
}

/* Buttons */
.btn,
button[type="submit"],
.btn-secondary,
.btn-danger {
  min-height: 44px;
  padding: 11px 15px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  background: var(--accent);
  color: #fff;
  text-align: center;
  text-decoration: none;
  font-size: 0.87rem;
  font-weight: 700;
  line-height: 1.1;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition), transform var(--transition);
}

button[type="submit"] {
  width: 100%;
  margin-top: 20px;
}

.btn:hover,
button[type="submit"]:hover {
  background: var(--accent-strong);
}

.btn:active,
button[type="submit"]:active,
.btn-secondary:active,
.btn-danger:active {
  transform: translateY(1px);
}

.btn-secondary {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-soft);
}

.btn-secondary:hover {
  border-color: var(--border-strong);
  background: var(--surface-hover);
  color: var(--text);
}

.btn-danger {
  border-color: color-mix(in srgb, var(--danger) 45%, var(--border));
  background: transparent;
  color: var(--danger);
}

.btn-danger:hover {
  background: var(--drop-soft);
  border-color: var(--danger);
}

.btn-compact {
  min-height: 40px;
  padding: 9px 13px;
  font-size: 0.8rem;
}

.btn-icon-only {
  width: 42px;
  min-width: 42px;
  padding: 0;
}

/* Forms */
label {
  display: block;
  margin: 16px 0 7px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 600;
}

input[type="email"],
input[type="password"],
input[type="number"],
input[type="text"],
input[type="date"],
select,
textarea {
  width: 100%;
  min-height: 46px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  color: var(--text);
  font-size: 0.92rem;
  outline: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input::placeholder,
textarea::placeholder {
  color: color-mix(in srgb, var(--text-muted) 78%, transparent);
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

select {
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, var(--text-muted) 50%),
    linear-gradient(135deg, var(--text-muted) 50%, transparent 50%);
  background-position:
    calc(100% - 17px) calc(50% - 2px),
    calc(100% - 12px) calc(50% - 2px);
  background-size: 5px 5px, 5px 5px;
  background-repeat: no-repeat;
  padding-right: 36px;
}

.toggle-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.toggle-group input[type="radio"] {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.toggle-group label {
  min-height: 42px;
  margin: 0;
  padding: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
  cursor: pointer;
}

.toggle-group input[type="radio"]:checked + label,
.toggle-group label.checked {
  border-color: var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-strong);
}

/* Drawer and filters */
.drawer-overlay,
.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  justify-content: flex-end;
  background: rgba(5, 9, 17, 0.58);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--transition), visibility var(--transition);
}

.drawer-overlay.open,
.modal-overlay.open {
  opacity: 1;
  visibility: visible;
}

.app-drawer {
  width: min(88vw, 390px);
  height: 100%;
  padding: 22px 18px calc(24px + env(safe-area-inset-bottom));
  overflow-y: auto;
  background: var(--surface);
  border-left: 1px solid var(--border);
  box-shadow: var(--shadow-md);
  transform: translateX(100%);
  transition: transform 260ms cubic-bezier(.22, .72, .22, 1);
}

.drawer-overlay.open .app-drawer {
  transform: translateX(0);
}

.drawer-header {
  margin-bottom: 20px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.drawer-header h2 {
  margin: 2px 0 0;
  font-size: 1.55rem;
}

.drawer-eyebrow {
  color: var(--accent-strong);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.drawer-filters:empty {
  display: none;
}

.menu-filter-group {
  margin-bottom: 9px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.menu-filter-group summary {
  min-height: 50px;
  padding: 13px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 650;
  cursor: pointer;
  list-style: none;
}

.menu-filter-group summary::-webkit-details-marker {
  display: none;
}

.menu-filter-group summary::after {
  content: "";
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border-right: 1.6px solid var(--text-muted);
  border-bottom: 1.6px solid var(--text-muted);
  transform: rotate(45deg) translateY(-2px);
  transition: transform var(--transition);
}

.menu-filter-group[open] summary::after {
  transform: rotate(225deg) translate(-2px, -1px);
}

.menu-filter-form {
  padding: 0 12px 12px;
}

.menu-filter-form select {
  margin: 0;
  min-height: 42px;
  font-size: 0.82rem;
}

.drawer-nav {
  margin-top: 18px;
  border-top: 1px solid var(--border);
}

.drawer-nav a {
  min-height: 55px;
  padding: 0 8px;
  display: grid;
  grid-template-columns: 28px 1fr 20px;
  align-items: center;
  gap: 10px;
  border-bottom: 1px solid var(--border);
  color: var(--text-soft);
  text-decoration: none;
  font-size: 0.91rem;
  font-weight: 600;
}

.drawer-nav a.active {
  color: var(--accent-strong);
}

.drawer-nav__icon {
  color: currentColor;
}

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

.drawer-secondary-nav {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.drawer-secondary-nav a {
  min-height: 70px;
  padding: 9px 5px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
  color: var(--text-muted);
  text-decoration: none;
  text-align: center;
  font-size: 0.69rem;
  font-weight: 650;
}

.drawer-secondary-nav a:hover {
  color: var(--text);
  border-color: var(--border-strong);
}

/* Bottom navigation */
.bottom-nav {
  display: none;
}

/* Modals */
.modal-overlay {
  z-index: 2400;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-card {
  width: min(100%, 430px);
  max-height: min(88vh, 760px);
  overflow-y: auto;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-md);
  transform: translateY(12px) scale(.985);
  transition: transform var(--transition);
}

.modal-overlay.open .modal-card {
  transform: translateY(0) scale(1);
}

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

.modal-header h3 {
  margin: 0;
}

.modal-section {
  margin-bottom: 12px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  background: var(--surface);
}

.modal-section:last-child {
  margin-bottom: 0;
}

.modal-section__title {
  margin-bottom: 8px;
  color: var(--text-soft);
  font-size: 0.82rem;
  font-weight: 700;
}

.modal-section form {
  display: grid;
  gap: 8px;
}

.modal-section form button[type="submit"] {
  margin-top: 2px;
}

.help-text {
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 0.69rem;
  line-height: 1.45;
}

.modal-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.modal-actions form {
  width: 100%;
  margin: 0;
}

.modal-actions button,
.modal-actions form button {
  width: 100%;
  margin-top: 0;
}

/* States and utility */
.flash-stack {
  margin-bottom: 16px;
}

.flash {
  margin-bottom: 8px;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--danger) 32%, var(--border));
  border-radius: 12px;
  background: var(--drop-soft);
  color: var(--drop);
  font-size: 0.82rem;
  font-weight: 600;
}

.empty-state {
  padding: 44px 20px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  color: var(--text-muted);
  text-align: center;
}

.empty-state p {
  margin-bottom: 16px;
}

.empty-state .btn {
  width: min(100%, 250px);
  margin: 8px auto 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
}

.badge.pending {
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.badge.executed {
  background: var(--rise-soft);
  color: var(--rise);
}

.badge.cancelled {
  background: var(--drop-soft);
  color: var(--drop);
}

.market-footnote {
  margin: 22px auto 0;
  max-width: 600px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.7rem;
  line-height: 1.55;
}

.secondary-links {
  margin-top: 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 16px;
}

.secondary-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.76rem;
  font-weight: 550;
}

.secondary-links a:hover {
  color: var(--accent-strong);
}

.history-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 18px;
}

.history-stat .label {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.history-stat .value {
  margin-top: 4px;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.auth-wrap {
  width: min(100%, 420px);
  margin: 52px auto 0;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.auth-wrap h1 {
  margin-bottom: 6px;
}

.auth-wrap .subtitle {
  margin-bottom: 24px;
}

.auth-switch {
  margin-top: 18px;
  color: var(--text-muted);
  text-align: center;
  font-size: 0.8rem;
}

.auth-switch a {
  color: var(--accent-strong);
  text-decoration: none;
  font-weight: 650;
}

.fab {
  position: fixed;
  right: 22px;
  bottom: 94px;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  text-decoration: none;
  font-size: 1.5rem;
  font-weight: 700;
  box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 30%, transparent);
}

button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Tablet and mobile */
@media (max-width: 900px) {
  .desktop-primary-nav {
    display: none;
  }

  .desktop-utility-nav {
    margin-left: auto;
  }
}

@media (max-width: 680px) {
  :root {
    --header-height: 58px;
  }

  body.is-authenticated {
    padding-bottom: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
  }

  .app-header__inner {
    padding: 0 18px;
  }

  .brand {
    font-size: 1.16rem;
  }

  .desktop-utility-nav {
    display: none;
  }

  .app-main,
  .container {
    padding: 15px 14px 34px;
  }

  .control-bar {
    margin-bottom: 18px;
  }

  .page-heading,
  .section-header {
    align-items: center;
    margin-bottom: 16px;
  }

  .page-heading__subtitle,
  .subtitle {
    font-size: 0.83rem;
  }

  .portfolio-summary,
  .portfolio-value-card {
    padding: 19px 18px;
  }

  .asset-row {
    min-height: 88px;
    padding: 14px 10px 14px 14px;
    grid-template-columns: minmax(0, 1fr) minmax(106px, auto) 30px;
    gap: 8px;
  }

  .portfolio-asset-row {
    min-height: 98px;
  }

  .coin-logo {
    width: 24px;
    height: 24px;
  }

  .asset-symbol {
    font-size: 0.96rem;
  }

  .asset-primary-value {
    font-size: 0.91rem;
  }

  .asset-meta,
  .asset-change,
  .asset-converted-value {
    font-size: 0.71rem;
  }

  .asset-unit-price {
    font-size: 0.72rem;
  }

  .asset-holding-quantity {
    font-size: 0.68rem;
  }

  .swipe-action {
    width: 72px;
    min-width: 72px;
    flex-basis: 72px;
  }

  .asset-detail-panel {
    padding: 14px;
  }

  .bottom-nav {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 900;
    height: calc(var(--bottom-nav-height) + env(safe-area-inset-bottom));
    padding: 7px 8px env(safe-area-inset-bottom);
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid var(--border);
    background: color-mix(in srgb, var(--surface) 94%, transparent);
    box-shadow: 0 -10px 28px rgba(0, 0, 0, 0.10);
    backdrop-filter: blur(18px) saturate(150%);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
  }

  .bottom-nav a,
  .bottom-nav button {
    min-width: 0;
    margin: 0;
    padding: 7px 3px 5px;
    border: 0;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    background: transparent;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.66rem;
    font-weight: 650;
    line-height: 1;
    cursor: pointer;
  }

  .bottom-nav a.active,
  .bottom-nav button.active {
    color: var(--accent-strong);
    background: var(--accent-soft);
  }

  .bottom-nav__icon {
    flex: 0 0 auto;
  }

  .gesture-hint {
    display: flex;
  }

  .auth-wrap {
    margin-top: 32px;
    padding: 20px;
  }
}

@media (min-width: 681px) {
  .gesture-hint {
    display: none;
  }

  .menu-trigger {
    display: inline-flex;
  }

  .asset-overflow {
    opacity: .75;
  }

  .asset-entry:hover .asset-overflow {
    opacity: 1;
  }
}

@media (max-width: 390px) {
  .language-option {
    padding: 0 8px;
  }

  .top-add-btn {
    padding: 0 12px;
  }

  .asset-row {
    grid-template-columns: minmax(0, 1fr) minmax(96px, auto) 28px;
    gap: 6px;
  }

  .asset-symbol-line {
    gap: 6px;
  }

  .asset-primary-value {
    font-size: 0.86rem;
  }

  .asset-secondary-line {
    gap: 5px;
  }
}

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

/* Portfolio platform switcher and expanded market range */
.portfolio-heading-copy {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.portfolio-heading-copy h1 {
  margin-bottom: 0;
}

.platform-selector {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

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

.platform-selector select {
  width: auto;
  min-width: 132px;
  margin: 0;
  padding: 9px 34px 9px 12px;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background-color: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 760;
  letter-spacing: 0.04em;
  cursor: pointer;
}

.detail-stat--range .detail-stat__value {
  white-space: normal;
}

.detail-stat__meta {
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 0.64rem;
  line-height: 1.35;
}

.market-range-summary {
  margin-bottom: 12px;
}

.market-rate-summary {
  margin-bottom: 10px;
}

.price-checkpoints {
  padding-top: 2px;
}

/* Portfolio placeholders */
.coming-soon-card {
  padding: clamp(24px, 5vw, 38px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.coming-soon-card__badge,
.modal-eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: var(--accent-strong);
  font-size: 0.68rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coming-soon-card h2 {
  margin-bottom: 8px;
}

.coming-soon-card p {
  max-width: 600px;
  color: var(--text-muted);
}

.coming-soon-card__status {
  margin: 22px 0;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-soft);
  color: var(--text-soft);
  font-size: 0.78rem;
}

.status-dot {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--warning);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 14%, transparent);
}

/* Orders and external-wallet handoff */
.order-list {
  display: grid;
  gap: 12px;
}

.order-card {
  margin-bottom: 0;
}

.order-card__row {
  align-items: flex-start;
}

.order-card__main {
  min-width: 0;
}

.order-card__amount {
  margin-left: 5px;
  color: var(--text-muted);
  font-size: 0.75rem;
  font-weight: 600;
}

.order-provider,
.order-card__time,
.order-card__execution {
  color: var(--text-muted);
  font-size: 0.7rem;
}

.order-provider {
  margin-top: 5px;
}

.order-card__status {
  max-width: 210px;
  text-align: right;
}

.order-card__time {
  margin-top: 5px;
}

.order-card__execution {
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid var(--border);
}

.order-card__actions {
  margin-top: 12px;
  display: flex;
  justify-content: flex-end;
}

.order-card__actions form {
  margin: 0;
}

.order-choice-modal {
  max-width: 480px;
}

.provider-choice-grid {
  display: grid;
  gap: 10px;
  margin: 18px 0 12px;
}

.provider-choice-grid form {
  margin: 0;
}

.provider-choice {
  width: 100%;
  margin: 0;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: var(--surface);
  color: var(--text);
  text-align: left;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.provider-choice:hover {
  border-color: var(--accent-border);
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.provider-choice__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  font-weight: 800;
}

.provider-choice--gcash .provider-choice__mark {
  background: #1769e0;
}

.provider-choice--maya .provider-choice__mark {
  background: #5b2bc9;
}

.provider-choice strong,
.provider-choice small {
  display: block;
}

.provider-choice strong {
  font-size: 0.86rem;
}

.provider-choice small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 500;
}

.order-not-now {
  display: flex;
  justify-content: center;
  text-decoration: none;
}

.handoff-disclaimer {
  margin: 14px 0 0;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.45;
  text-align: center;
}

.handoff-page {
  width: min(100%, 560px);
  margin: 8px auto 0;
  padding: clamp(22px, 5vw, 34px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.handoff-page__icon {
  width: 58px;
  height: 58px;
  margin-bottom: 18px;
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--accent);
  color: #fff;
  font-size: 1.35rem;
  font-weight: 820;
  box-shadow: 0 12px 28px color-mix(in srgb, var(--accent) 25%, transparent);
}

.handoff-page__copy h1 {
  margin-bottom: 8px;
}

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

.handoff-open-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.handoff-launch-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: center;
}

.handoff-fallback {
  display: block;
  margin-top: 10px;
  color: var(--text-muted);
  font-size: 0.72rem;
  text-align: center;
}

.handoff-divider {
  height: 1px;
  margin: 26px 0;
  background: var(--border);
}

.handoff-confirmation {
  opacity: 0.72;
  transition: opacity var(--transition);
}

.handoff-confirmation.is-ready {
  opacity: 1;
}

.handoff-confirmation h2 {
  margin-bottom: 6px;
}

.handoff-complete-form {
  margin-top: 18px;
}

.handoff-order-summary {
  margin-bottom: 16px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.74rem;
}

.handoff-order-summary strong {
  color: var(--text);
  font-size: 0.88rem;
}

.handoff-status-actions {
  margin-top: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.handoff-status-actions form {
  margin: 0;
}

.handoff-status-actions button {
  margin: 0;
}

@media (max-width: 680px) {
  .portfolio-page-heading {
    align-items: flex-start;
  }

  .portfolio-heading-copy {
    gap: 10px;
  }

  .platform-selector select {
    min-width: 118px;
    padding: 8px 30px 8px 10px;
    font-size: 0.66rem;
  }

  .detail-stat__value {
    font-size: 0.76rem;
  }

  .order-card__row {
    gap: 10px;
  }

  .order-card__status {
    max-width: 150px;
  }

  .badge {
    white-space: normal;
    text-align: center;
  }

  .provider-choice {
    padding: 12px;
  }

  .handoff-page {
    margin-top: 0;
    padding: 20px 16px;
  }
}

/* Pass 2.4 — lean notifications, compare, and cascaded navigation */
.nav-with-badge,
.bottom-nav-alert {
  position: relative;
}

.nav-badge,
.bottom-nav-badge,
.drawer-count {
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: var(--drop);
  color: #fff;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

.nav-badge {
  margin-left: 4px;
}

.bottom-nav-badge {
  position: absolute;
  top: 8px;
  left: calc(50% + 7px);
  border: 2px solid var(--surface);
}

.drawer-count {
  justify-self: end;
}

.drawer-overlay .drawer-header,
.drawer-overlay .drawer-filters > *,
.drawer-overlay .drawer-nav > *,
.drawer-overlay .drawer-secondary-nav > * {
  opacity: 0;
  transform: translateX(18px);
  transition:
    opacity 170ms cubic-bezier(.2, .8, .2, 1),
    transform 220ms cubic-bezier(.22, .72, .22, 1);
  transition-delay: 0ms;
}

.drawer-overlay.open .drawer-header,
.drawer-overlay.open .drawer-filters > *,
.drawer-overlay.open .drawer-nav > *,
.drawer-overlay.open .drawer-secondary-nav > * {
  opacity: 1;
  transform: translateX(0);
  transition-delay: calc(75ms + (var(--cascade-index, 0) * 32ms));
}

.menu-filter-group .menu-filter-form {
  display: block;
  max-height: 0;
  padding-top: 0;
  padding-bottom: 0;
  opacity: 0;
  overflow: hidden;
  transform: translateY(-6px);
  transition:
    max-height 260ms cubic-bezier(.22, .72, .22, 1),
    padding 220ms cubic-bezier(.22, .72, .22, 1),
    opacity 160ms ease,
    transform 220ms cubic-bezier(.22, .72, .22, 1);
}

.menu-filter-group[open] .menu-filter-form {
  max-height: 180px;
  padding-top: 0;
  padding-bottom: 12px;
  opacity: 1;
  transform: translateY(0);
}

.section-eyebrow {
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-size: 0.69rem;
  font-weight: 800;
  letter-spacing: .11em;
  text-transform: uppercase;
}

.compare-heading p,
.section-header p {
  max-width: 600px;
  margin: 7px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
}

.compare-disclaimer {
  margin: 16px 0 18px;
  padding: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 42%, var(--border));
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--warning) 10%, var(--surface));
}

.compare-disclaimer__icon {
  width: 27px;
  height: 27px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--warning);
  color: #15110a;
  font-weight: 900;
}

.compare-disclaimer strong {
  display: block;
  color: var(--text);
  font-size: 0.84rem;
}

.compare-disclaimer p {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: 0.73rem;
  line-height: 1.55;
}

.compare-form,
.compare-results {
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.compare-form {
  margin-bottom: 18px;
  padding: 18px;
}

.compare-pickers {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 12px;
}

.compare-picker label,
.compare-budget-row label {
  margin-top: 0;
}

.compare-picker select {
  margin-bottom: 0;
}

.compare-versus {
  width: 34px;
  height: 34px;
  margin-bottom: 5px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.66rem;
  font-weight: 850;
}

.compare-budget-row {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 12px;
}

.money-input {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--surface-soft);
  overflow: hidden;
}

.money-input:focus-within {
  border-color: var(--accent-border);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.money-input span {
  padding-left: 12px;
  color: var(--text-muted);
  font-weight: 750;
}

.money-input input {
  margin: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.compare-submit {
  min-width: 120px;
  margin: 0;
}

.compare-results {
  overflow: hidden;
}

.compare-asset-heads {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border-bottom: 1px solid var(--border);
}

.compare-asset-head {
  min-width: 0;
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-align: left;
}

.compare-asset-head + .compare-asset-head {
  border-left: 1px solid var(--border);
}

.compare-asset-head .coin-logo {
  width: 34px;
  height: 34px;
}

.compare-asset-head span {
  display: block;
  color: var(--text-muted);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.compare-asset-head strong {
  display: block;
  color: var(--text);
  font-size: 1.1rem;
}

.compare-metrics {
  display: grid;
}

.compare-metric {
  min-height: 58px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(104px, .75fr) minmax(0, 1fr);
  align-items: center;
  border-bottom: 1px solid var(--border);
}

.compare-metric > div {
  min-width: 0;
  padding: 12px 10px;
  color: var(--text);
  font-size: 0.79rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.compare-metric > div:first-child {
  text-align: right;
}

.compare-metric > div:last-child {
  text-align: left;
}

.compare-metric > span {
  height: 100%;
  padding: 10px 8px;
  display: grid;
  place-items: center;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-muted);
  text-align: center;
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.25;
}

.compare-metric--major > div {
  font-size: 0.91rem;
}

.compare-metric small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.61rem;
  font-weight: 600;
}

.compare-metric .positive {
  color: var(--rise);
}

.compare-metric .negative {
  color: var(--drop);
}

.compare-observations {
  padding: 18px;
}

.compare-observations h3 {
  margin-bottom: 12px;
}

.compare-observation {
  padding: 11px 0;
  display: grid;
  grid-template-columns: 22px 1fr;
  gap: 9px;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.compare-observation:first-of-type {
  border-top: 0;
}

.compare-observation svg {
  color: var(--accent-strong);
}

.compare-observation p {
  margin: 0;
  font-size: 0.75rem;
  line-height: 1.55;
}

.compare-final-note {
  padding: 14px 18px;
  border-top: 1px solid var(--border);
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.7rem;
  line-height: 1.55;
}

.compare-consent-card p {
  color: var(--text-muted);
  font-size: 0.79rem;
  line-height: 1.6;
}

.settings-stack {
  display: grid;
  gap: 14px;
}

.settings-card {
  padding: 16px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.settings-card--vertical {
  display: block;
}

.settings-card__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.settings-card__heading,
.push-status-line {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.settings-label,
.settings-card small,
.settings-footnote {
  display: block;
  color: var(--text-muted);
  font-size: 0.7rem;
}

.settings-card h3 {
  margin: 0 0 4px;
}

.settings-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.76rem;
  line-height: 1.5;
}

.preference-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.check-row {
  margin: 0 0 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--text);
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex: 0 0 auto;
}

.check-row strong {
  display: block;
  font-size: 0.8rem;
}

.check-row small {
  margin-top: 3px;
}

.push-device-panel {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface-soft);
}

.status-dot {
  width: 10px;
  height: 10px;
  margin-top: 6px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--neutral);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--neutral) 14%, transparent);
}

.status-dot--good {
  background: var(--rise);
  box-shadow: 0 0 0 4px var(--rise-soft);
}

.status-dot--bad {
  background: var(--drop);
  box-shadow: 0 0 0 4px var(--drop-soft);
}

.status-dot--pending {
  background: var(--warning);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--warning) 16%, transparent);
}

.push-status-line strong {
  display: block;
  color: var(--text);
  font-size: 0.8rem;
}

.push-status-line small {
  margin-top: 3px;
}

.button-row {
  margin-top: 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.button-row button,
.button-row a {
  margin: 0;
}

.btn-text {
  min-height: 38px;
  padding: 7px 9px;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 0.73rem;
  font-weight: 700;
}

.btn-text:hover {
  color: var(--accent-strong);
}

.settings-footnote {
  margin-top: 11px !important;
  line-height: 1.5;
}

.alert-section {
  margin-top: 22px;
}

.subsection-heading {
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.subsection-heading h3 {
  margin: 0;
}

.subsection-heading > span {
  min-width: 24px;
  height: 24px;
  padding: 0 7px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.subsection-heading p {
  margin: 2px 0 0;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.compact-empty {
  padding: 22px 16px;
}

.alert-card__main {
  min-width: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.notification-symbol {
  width: 48px;
  height: 48px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  background: var(--accent-soft);
  color: var(--accent-strong);
}

.notification-symbol--small {
  width: 34px;
  height: 34px;
  margin: 0;
  flex: 0 0 auto;
  border-radius: 10px;
}

.triggered-notification-card {
  text-align: center;
}

.triggered-notification-card h3 {
  margin: 5px 0 8px;
}

.triggered-notification-card > p {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.notification-more {
  color: var(--accent-strong) !important;
  font-size: 0.7rem !important;
  font-weight: 700;
}

.triggered-list {
  display: grid;
  gap: 8px;
}

.triggered-event {
  padding: 13px;
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 11px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
  transition: border-color var(--transition), background var(--transition), transform var(--transition);
}

.triggered-event.is-unread {
  border-color: var(--accent-border);
  background: color-mix(in srgb, var(--accent-soft) 55%, var(--surface));
}

.triggered-event.is-highlighted {
  border-color: var(--warning);
  transform: translateY(-2px);
}

.triggered-event__heading {
  display: flex;
  align-items: center;
  gap: 7px;
}

.triggered-event__heading strong {
  color: var(--text);
  font-size: 0.79rem;
}

.triggered-event p {
  margin: 4px 0 5px;
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.triggered-event time {
  color: var(--text-muted);
  font-size: 0.63rem;
}

.unread-pill {
  padding: 2px 6px;
  border-radius: 999px;
  background: var(--accent);
  color: #fff;
  font-size: 0.56rem;
  font-weight: 800;
  text-transform: uppercase;
}

.foreground-notification {
  position: fixed;
  z-index: 3200;
  top: calc(var(--header-height) + 12px);
  left: 50%;
  width: min(calc(100% - 28px), 420px);
  padding: 13px 15px;
  display: grid;
  gap: 3px;
  border: 1px solid var(--accent-border);
  border-radius: 13px;
  background: var(--surface-raised);
  box-shadow: var(--shadow-md);
  color: var(--text);
  text-decoration: none;
  opacity: 0;
  transform: translate(-50%, -14px);
  transition: opacity 220ms ease, transform 240ms cubic-bezier(.22, .72, .22, 1);
}

.foreground-notification.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.foreground-notification strong {
  font-size: 0.8rem;
}

.foreground-notification span {
  color: var(--text-muted);
  font-size: 0.7rem;
}

@media (max-width: 560px) {
  .compare-form {
    padding: 14px;
  }

  .compare-pickers {
    gap: 7px;
  }

  .compare-versus {
    width: 28px;
    height: 28px;
    margin-bottom: 8px;
    font-size: 0.58rem;
  }

  .compare-picker select {
    padding-left: 9px;
    padding-right: 28px;
    font-size: 0.78rem;
  }

  .compare-budget-row {
    grid-template-columns: 1fr;
  }

  .compare-submit {
    width: 100%;
  }

  .compare-asset-head {
    padding: 14px 10px;
  }

  .compare-asset-head .coin-logo {
    width: 28px;
    height: 28px;
  }

  .compare-metric {
    grid-template-columns: minmax(0, 1fr) 88px minmax(0, 1fr);
  }

  .compare-metric > div {
    padding: 10px 6px;
    font-size: 0.69rem;
  }

  .compare-metric--major > div {
    font-size: 0.76rem;
  }

  .compare-metric > span {
    padding: 8px 4px;
    font-size: 0.59rem;
  }

  .section-header {
    align-items: flex-start;
  }

  .alert-card .item-row {
    align-items: flex-start;
  }

  .button-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .button-row .btn-text {
    grid-column: 1 / -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-overlay .drawer-header,
  .drawer-overlay .drawer-filters > *,
  .drawer-overlay .drawer-nav > *,
  .drawer-overlay .drawer-secondary-nav > *,
  .menu-filter-group .menu-filter-form,
  .foreground-notification {
    transition: none !important;
  }
}

/* =========================================================
   Pass 2.5 — sharper finance UI, dual currency and order data
   ========================================================= */
:root {
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 10px;
  --radius-xl: 12px;
  --shadow-sm: 0 1px 1px rgba(0, 0, 0, 0.13);
  --shadow-md: 0 12px 32px rgba(0, 0, 0, 0.24);
}

:root[data-theme="light"] {
  --shadow-sm: 0 1px 1px rgba(20, 30, 50, 0.035);
  --shadow-md: 0 12px 30px rgba(20, 30, 50, 0.09);
}

.brand {
  gap: 8px;
}

.brand-mark {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border-radius: 4px;
}

.portfolio-summary,
.portfolio-value-card,
.asset-list,
.item-card,
.compare-form,
.compare-results,
.settings-card,
.coming-soon-card {
  border-radius: 8px;
}

.asset-list,
.portfolio-summary,
.item-card,
.compare-form,
.compare-results,
.settings-card {
  box-shadow: var(--shadow-sm);
}

.modal-card {
  border-radius: 12px;
}

.asset-overflow,
.icon-button,
.top-add-btn,
button,
.btn,
.btn-secondary,
.btn-danger,
input,
select,
textarea,
.money-input,
.provider-choice {
  border-radius: 7px;
}

.asset-row {
  position: relative;
}

.market-movement--up .swipe-surface {
  box-shadow: inset 4px 0 0 var(--rise);
}

.market-movement--down .swipe-surface {
  box-shadow: inset 4px 0 0 var(--drop);
}

.market-movement--flat .swipe-surface {
  box-shadow: inset 4px 0 0 color-mix(in srgb, var(--neutral) 48%, transparent);
}

.market-movement--up .asset-row,
.market-movement--down .asset-row,
.market-movement--flat .asset-row {
  padding-left: 20px;
}

.asset-history-amount small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.64rem;
  font-weight: 600;
}

.order-card__time {
  display: block;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* Currency selection inside the mobile menu */
.currency-picker-form {
  padding: 11px 12px 13px;
}

.currency-picker-help {
  margin: 0 0 9px;
  color: var(--text-muted);
  font-size: 0.68rem;
  line-height: 1.45;
}

.currency-picker-list {
  display: grid;
  gap: 4px;
}

.currency-picker-row {
  min-height: 38px;
  padding: 6px 7px;
  border: 1px solid var(--border);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--surface);
}

.currency-check,
.currency-primary-choice {
  margin: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
}

.currency-check {
  color: var(--text);
  font-size: 0.76rem;
}

.currency-check input,
.currency-primary-choice input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--accent);
}

.currency-flag {
  width: 20px;
  height: 14px;
  display: inline-grid;
  place-items: center;
  overflow: hidden;
}

.currency-primary-choice {
  color: var(--text-muted);
  font-size: 0.62rem;
  font-weight: 650;
}

.currency-primary-choice input:checked + span {
  color: var(--accent-strong);
}

.currency-picker-message {
  min-height: 17px;
  margin: 6px 0 5px;
  color: var(--text-muted);
  font-size: 0.62rem;
}

.currency-picker-form .btn-compact {
  width: 100%;
  margin: 0;
}

/* Context-rich order entry */
.order-page-heading {
  margin-bottom: 14px;
}

.order-market-card,
.order-entry-form {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.order-market-card {
  margin-bottom: 14px;
  overflow: hidden;
}

.order-market-card__header {
  min-height: 62px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.order-market-coin {
  display: flex;
  align-items: center;
  gap: 10px;
}

.order-market-coin .coin-logo {
  width: 34px;
  height: 34px;
}

.order-market-coin strong {
  display: block;
  color: var(--text);
  font-size: 1.08rem;
}

.order-market-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.order-market-stat {
  min-width: 0;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border);
}

.order-market-stat:nth-child(odd) {
  border-right: 1px solid var(--border);
}

.order-market-stat:nth-last-child(-n + 2) {
  border-bottom: 0;
}

.order-market-stat span,
.order-estimate-box span {
  display: block;
  color: var(--text-muted);
  font-size: 0.67rem;
  font-weight: 600;
}

.order-market-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--text);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.order-market-stat small {
  display: block;
  min-height: 16px;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.62rem;
  font-variant-numeric: tabular-nums;
}

.order-entry-form {
  padding: 16px;
}

.order-money-input {
  margin-bottom: 0;
}

.order-calculation-note {
  min-height: 18px;
  margin: 6px 0 14px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.order-calculation-note.positive {
  color: var(--rise);
}

.order-calculation-note.negative {
  color: var(--drop);
}

.order-mode-fields {
  margin-top: 2px;
}

.order-estimate-box {
  margin: 9px 0 14px;
  padding: 11px 12px;
  border-left: 3px solid var(--accent);
  background: var(--surface-soft);
}

.order-estimate-box strong {
  display: block;
  margin-top: 3px;
  color: var(--text);
  font-size: 0.92rem;
  font-variant-numeric: tabular-nums;
}

.order-label-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.order-label-row label {
  margin-bottom: 7px;
}

.text-button {
  width: auto;
  min-height: 30px;
  margin: 0 0 5px;
  padding: 4px 8px;
  border: 1px solid var(--accent-border);
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.65rem;
  font-weight: 800;
  cursor: pointer;
}

.order-disclaimer {
  margin-top: 4px;
}

@media (min-width: 720px) {
  .order-market-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .order-market-stat,
  .order-market-stat:nth-child(odd),
  .order-market-stat:nth-last-child(-n + 2) {
    border-bottom: 0;
    border-right: 1px solid var(--border);
  }

  .order-market-stat:last-child {
    border-right: 0;
  }
}

@media (max-width: 420px) {
  .order-card__status {
    max-width: 148px;
  }

  .order-card__time {
    font-size: 0.62rem;
  }
}

/* Remove decorative softness from primary financial surfaces. */
.portfolio-summary,
.portfolio-value-card {
  background: var(--surface);
}

.portfolio-summary::after {
  display: none;
}

.asset-list {
  border-radius: 5px;
}

.item-card,
.order-market-card,
.order-entry-form {
  border-radius: 6px;
}

/* === Pass 2.6: verified portfolio sources and denser finance card hierarchy === */
.platform-selector-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
  min-width: 0;
}

.platform-selector-row .platform-selector {
  min-width: min(250px, 72vw);
}

.platform-mark {
  --platform-mark-size: 30px;
  width: var(--platform-mark-size);
  height: var(--platform-mark-size);
  flex: 0 0 var(--platform-mark-size);
  display: inline-grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  box-shadow: 0 2px 8px color-mix(in srgb, var(--shadow) 35%, transparent);
  overflow: hidden;
}

.platform-mark svg {
  width: 76%;
  height: 76%;
  display: block;
}

.platform-mark--coinbase {
  border-color: color-mix(in srgb, #1652f0 36%, var(--border));
  background: #1652f0;
}
.platform-mark--coinbase svg circle { fill: #1652f0; }
.platform-mark--coinbase svg path { fill: #fff; }


.platform-mark--generic {
  color: var(--accent-strong);
  background: var(--surface-soft);
}
.platform-mark--generic svg path,
.platform-mark--combined svg path,
.platform-mark--combined svg circle,
.platform-mark--gcrypto svg path,
.platform-mark--gcrypto svg circle { fill: currentColor; }

.platform-mark--gcrypto {
  border-color: color-mix(in srgb, #1677d2 36%, var(--border));
  background: #1677d2;
}
.platform-mark--gcrypto svg circle { fill: #1677d2; }
.platform-mark--gcrypto svg path {
  fill: none;
  stroke: #fff;
  stroke-width: 3.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.platform-mark--combined {
  color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.portfolio-asset-row {
  min-height: 106px;
  grid-template-columns: minmax(150px, 1.15fr) minmax(116px, .86fr) minmax(135px, 1fr) 32px;
  gap: 10px;
}

.portfolio-card-zone {
  min-width: 0;
  font-variant-numeric: tabular-nums;
}

.portfolio-card-zone--basis {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-inline: 12px;
  border-left: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  border-right: 1px solid color-mix(in srgb, var(--border) 82%, transparent);
  text-align: center;
}

.portfolio-card-zone--holding {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
}

.portfolio-card-label {
  margin: 7px 0 3px;
  color: var(--text-muted);
  font-size: .64rem;
  font-weight: 720;
  letter-spacing: .055em;
  line-height: 1.1;
  text-transform: uppercase;
  white-space: nowrap;
}

.portfolio-card-zone--basis .portfolio-card-label,
.portfolio-card-zone--holding .portfolio-card-label {
  margin-top: 0;
}

.portfolio-card-main-value {
  min-width: 0;
  color: var(--text);
  font-size: .86rem;
  font-weight: 690;
  letter-spacing: -.015em;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.portfolio-card-main-value--muted { color: var(--text-muted); font-weight: 560; }

.portfolio-card-sub-value {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: .68rem;
  white-space: nowrap;
}

.portfolio-card-partial {
  margin-top: 3px;
  color: var(--warning);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.portfolio-card-zone--holding .asset-holding-quantity {
  margin-top: 4px;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.platform-breakdown {
  margin: 2px 0 14px;
  border: 1px solid var(--border);
  background: var(--surface-soft);
}

.platform-breakdown__row {
  padding: 9px 11px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-soft);
  font-size: .78rem;
}
.platform-breakdown__row + .platform-breakdown__row { border-top: 1px solid var(--border); }
.platform-breakdown__row strong { color: var(--text); font-variant-numeric: tabular-nums; }

.asset-history-platform {
  margin-left: 5px;
  padding: 2px 5px;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
}

.source-security-note {
  margin-bottom: 18px;
  padding: 13px 14px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid color-mix(in srgb, var(--rise) 28%, var(--border));
  background: color-mix(in srgb, var(--rise) 6%, var(--surface));
  color: var(--rise);
}
.source-security-note div { display: grid; gap: 3px; }
.source-security-note strong { color: var(--text); font-size: .85rem; }
.source-security-note span { color: var(--text-soft); font-size: .76rem; line-height: 1.45; }
.source-security-note--warning {
  border-color: color-mix(in srgb, var(--warning) 40%, var(--border));
  background: color-mix(in srgb, var(--warning) 7%, var(--surface));
  color: var(--warning);
}

.source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(245px, 1fr));
  gap: 13px;
}

.source-card,
.source-investigation-card,
.import-upload-card,
.import-history-card {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.source-card { padding: 16px; }
.source-card--active { border-color: color-mix(in srgb, var(--accent) 42%, var(--border)); }
.source-card__header,
.source-title-line,
.import-history-source {
  display: flex;
  align-items: center;
  gap: 11px;
}
.source-card h2,
.source-title-line h1,
.import-history-source strong { margin: 0; }
.source-card h2 { font-size: 1rem; }
.source-card p { min-height: 44px; color: var(--text-soft); font-size: .78rem; line-height: 1.5; }
.source-card__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.source-card__actions .btn,
.source-card__actions .btn-secondary { flex: 1 1 120px; text-align: center; }

.source-status {
  display: inline-block;
  margin-top: 3px;
  color: var(--rise);
  font-size: .65rem;
  font-weight: 760;
  letter-spacing: .045em;
  text-transform: uppercase;
}
.source-status--muted { color: var(--text-muted); }

.source-investigation-card {
  margin-top: 14px;
  padding: 15px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.source-investigation-card h2 { margin: 0 0 4px; font-size: .95rem; }
.source-investigation-card p { margin: 0; color: var(--text-soft); font-size: .76rem; line-height: 1.45; }

.import-recent-section { margin-top: 24px; }
.import-batch-list,
.import-history-list { display: grid; gap: 8px; }
.import-batch-row {
  padding: 10px 12px;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.import-batch-row div { min-width: 0; display: grid; }
.import-batch-row small,
.import-history-source small { color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.import-batch-count { color: var(--text-soft); font-size: .72rem; }

.import-upload-card { padding: 17px; }
.import-step-label { margin-bottom: 12px; color: var(--text-muted); font-size: .68rem; font-weight: 750; text-transform: uppercase; }
.import-upload-form { display: grid; gap: 12px; }
.file-drop {
  min-height: 155px;
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 7px;
  border: 1px dashed color-mix(in srgb, var(--accent) 48%, var(--border));
  background: var(--surface-soft);
  color: var(--accent-strong);
  cursor: pointer;
  text-align: center;
}
.file-drop strong { color: var(--text); }
.file-drop span { color: var(--text-muted); font-size: .76rem; }
.file-drop input { width: min(100%, 310px); margin-top: 8px; color: var(--text-soft); }

.import-help-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.import-help-grid .item-card { border-radius: 6px; }
.import-help-grid h2 { margin: 0 0 6px; font-size: .9rem; }
.import-help-grid p { color: var(--text-soft); font-size: .76rem; line-height: 1.5; }

.import-summary-strip {
  margin-bottom: 12px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.import-summary-strip span {
  padding: 6px 9px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--rise);
  font-size: .72rem;
}
.import-summary-strip .warning { color: var(--warning); }
.import-summary-strip .muted { color: var(--text-muted); }

.import-preview-list { display: grid; gap: 7px; }
.import-preview-row {
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  gap: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
}
.import-preview-row--warning { border-left: 3px solid var(--warning); }
.import-preview-row--skipped { opacity: .67; border-left: 3px solid var(--neutral); }
.import-preview-check { padding-top: 2px; }
.import-preview-check input { width: 18px; height: 18px; }
.import-skip-icon { color: var(--text-muted); font-size: 1.1rem; }
.import-preview-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.import-row-number { margin-left: auto; color: var(--text-muted); font-size: .65rem; }
.import-preview-values { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 7px 14px; color: var(--text-soft); font-size: .75rem; font-variant-numeric: tabular-nums; }
.import-row-message { margin: 6px 0 0; color: var(--warning); font-size: .72rem; }
.import-preview-row--skipped .import-row-message { color: var(--text-muted); }
.import-row-notes { margin: 4px 0 0; color: var(--text-muted); font-size: .68rem; }
.sticky-confirm-bar { position: sticky; bottom: calc(var(--bottom-nav-height, 0px) + 8px); z-index: 20; margin-top: 12px; padding: 9px; border: 1px solid var(--border); background: color-mix(in srgb, var(--surface) 94%, transparent); backdrop-filter: blur(10px); }
.sticky-confirm-bar .btn { width: 100%; }
.import-cancel-form { margin-top: 8px; }
.import-cancel-form .btn-secondary { width: 100%; }

.import-history-card {
  padding: 13px 14px;
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(220px, auto) auto;
  align-items: center;
  gap: 14px;
}
.import-history-card--rolled-back { opacity: .66; }
.import-history-source div { min-width: 0; display: grid; }
.import-history-stats { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px 12px; color: var(--text-muted); font-size: .7rem; }

@media (max-width: 720px) {
  .portfolio-asset-row {
    min-height: 106px;
    padding: 12px 7px 12px 12px;
    grid-template-columns: minmax(0, 1.12fr) minmax(74px, .82fr) minmax(86px, 1fr) 25px;
    gap: 5px;
  }
  .portfolio-card-zone--basis { padding-inline: 6px; }
  .portfolio-card-label { font-size: .55rem; letter-spacing: .035em; }
  .portfolio-card-main-value { font-size: .72rem; }
  .portfolio-card-sub-value { font-size: .61rem; }
  .portfolio-card-zone--holding .asset-primary-value { font-size: .78rem; }
  .portfolio-card-zone--holding .asset-secondary-line { gap: 4px; }
  .portfolio-card-zone--holding .asset-holding-quantity { font-size: .62rem; }
  .portfolio-asset-row .asset-symbol-line { gap: 5px; }
  .portfolio-asset-row .trend-indicator { width: 15px; height: 15px; font-size: .52rem; }
  .portfolio-asset-row .coin-logo { width: 21px; height: 21px; }
  .portfolio-asset-row .asset-symbol { font-size: .86rem; }
  .source-grid,
  .import-help-grid { grid-template-columns: 1fr; }
  .source-investigation-card { align-items: flex-start; flex-direction: column; }
  .import-history-card { grid-template-columns: 1fr; }
  .import-history-stats { justify-content: flex-start; }
}

@media (max-width: 380px) {
  .portfolio-asset-row {
    grid-template-columns: minmax(0, 1.05fr) minmax(67px, .76fr) minmax(80px, .96fr) 23px;
  }
  .portfolio-card-main-value { font-size: .67rem; }
  .portfolio-card-sub-value,
  .portfolio-card-zone--holding .asset-holding-quantity { font-size: .57rem; }
  .portfolio-card-label { font-size: .5rem; }
  .portfolio-card-zone--holding .asset-primary-value { font-size: .72rem; }
}

/* === Pass 2.6.1: user-owned CSV exports === */
.data-export-form {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: grid;
  gap: 8px;
}

.data-export-form label {
  color: var(--text-muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.data-export-form select {
  width: min(100%, 360px);
}

@media (max-width: 560px) {
  .data-export-form .button-row {
    grid-template-columns: 1fr;
  }
}

/* === Pass 2.6.2: verified Binance and Kraken portfolio sources === */
.platform-mark--binance {
  color: #181a20;
  background: #f3ba2f;
  border-color: color-mix(in srgb, #f3ba2f 70%, var(--border));
}
.platform-mark--binance svg path { fill: currentColor; }

.platform-mark--kraken {
  color: #fff;
  background: #5741d9;
  border-color: color-mix(in srgb, #5741d9 70%, var(--border));
}
.platform-mark--kraken svg path { fill: currentColor; }

.sample-download-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}
.sample-download-list .btn-secondary {
  margin: 0;
}

/* =========================================================
   Pass 2.6.3 — source-linked tracker orders and executions
   ========================================================= */
.order-source-fieldset {
  min-width: 0;
  margin: 0 0 18px;
  padding: 0;
  border: 0;
}

.order-source-fieldset legend {
  margin-bottom: 8px;
  color: var(--text);
  font-size: .75rem;
  font-weight: 720;
}

.order-source-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.order-source-option {
  min-width: 0;
  padding: 11px 12px;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition), box-shadow var(--transition);
}

.order-source-option:hover {
  border-color: var(--accent-border);
  background: var(--surface-hover);
}

.order-source-option.is-selected {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent-soft) 58%, var(--surface));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 35%, transparent);
}

.order-source-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.order-source-option strong,
.order-source-option small {
  display: block;
  min-width: 0;
}

.order-source-option strong {
  color: var(--text);
  font-size: .78rem;
}

.order-source-option small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: .62rem;
  line-height: 1.3;
}

.order-card__source-line {
  margin-bottom: 7px;
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 720;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.order-card__actions--split {
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.order-card__actions--split form {
  margin-left: auto;
}

.provider-choice.is-selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 32%, transparent);
}

.handoff-page__icon--platform {
  width: auto;
  height: auto;
  display: block;
  background: transparent;
  box-shadow: none;
}

.handoff-page__icon--platform .platform-mark {
  box-shadow: var(--shadow-sm);
}

.handoff-launch-note--static {
  display: block;
}

.execution-source-select {
  margin-bottom: 14px;
}

.execution-fee-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(120px, .65fr);
  gap: 10px;
}

.execution-fee-grid > div {
  min-width: 0;
}

.field-note {
  margin: -7px 0 13px;
  color: var(--text-muted);
  font-size: .62rem;
  line-height: 1.45;
}

.optional-label {
  color: var(--text-muted);
  font-size: .61rem;
  font-weight: 560;
}

.handoff-disclaimer--strong {
  padding: 11px 12px;
  border: 1px solid color-mix(in srgb, var(--warning) 32%, var(--border));
  background: color-mix(in srgb, var(--warning) 7%, var(--surface));
  color: var(--text-muted);
  font-weight: 650;
}

.modal-actions--order {
  grid-template-columns: 1fr 1fr;
}

.modal-actions--order > :last-child {
  grid-column: 1 / -1;
}

@media (max-width: 560px) {
  .order-source-grid {
    grid-template-columns: 1fr;
  }

  .order-card__actions--split {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .order-card__actions--split form {
    grid-column: 1 / -1;
    width: 100%;
    margin-left: 0;
  }

  .order-card__actions--split a,
  .order-card__actions--split button {
    width: 100%;
    justify-content: center;
  }

  .execution-fee-grid {
    grid-template-columns: 1fr;
  }
}


/* === Pass 2.6.4: exchange choice contrast and source-selector alignment === */
.provider-choice-grid button.provider-choice {
  margin-top: 0;
  background: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 82%, #ffffff 18%);
  color: #ffffff;
}

.provider-choice-grid button.provider-choice:hover {
  background: var(--accent-strong);
  border-color: color-mix(in srgb, var(--accent-strong) 76%, #ffffff 24%);
  color: #ffffff;
}

.provider-choice-grid .provider-choice strong,
.provider-choice-grid .provider-choice small,
.provider-choice-grid .provider-choice > svg {
  color: #ffffff;
}

.provider-choice-grid .provider-choice small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.84);
  line-height: 1.25;
}

.provider-choice-grid .provider-choice.is-selected {
  border-color: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.platform-selector-row {
  width: min(100%, 380px);
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.platform-selector-row .platform-selector {
  flex: 1 1 auto;
  min-width: 0;
}

.platform-selector-row .platform-selector select {
  width: 100%;
  min-width: 0;
  min-height: 64px;
  padding: 12px 42px 12px 16px;
  font-size: 0.76rem;
}

.platform-selector-row > .platform-mark {
  width: 64px;
  height: 64px;
  flex-basis: 64px;
  border-radius: 10px;
  box-shadow: 0 3px 10px color-mix(in srgb, var(--shadow) 32%, transparent);
}

@media (max-width: 680px) {
  .platform-selector-row {
    width: min(100%, 360px);
    gap: 10px;
  }

  .platform-selector-row .platform-selector select {
    min-width: 0;
    min-height: 60px;
    padding: 11px 38px 11px 14px;
    font-size: 0.72rem;
  }

  .platform-selector-row > .platform-mark {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }
}

/* === Pass 2.6.6: final market cohesion and source visibility === */
.price-scope-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0 0 16px;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
}

.price-scope-switch__option {
  padding: 8px 11px;
  border-radius: 4px;
  color: var(--text-muted);
  font-size: .72rem;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

.price-scope-switch__option:hover,
.price-scope-switch__option:focus-visible {
  color: var(--text);
  background: color-mix(in srgb, var(--accent) 8%, var(--surface));
}

.price-scope-switch__option.is-active {
  color: var(--accent-strong);
  background: var(--surface);
  box-shadow: 0 1px 3px color-mix(in srgb, var(--shadow) 28%, transparent);
}

.asset-exchange-icons,
.asset-source-icons {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  min-width: 0;
}

.asset-exchange-icons {
  margin-top: 6px;
}

.asset-source-icons {
  margin-left: 5px;
}

.asset-exchange-icons .platform-mark,
.asset-source-icons .platform-mark {
  border-radius: 4px;
  box-shadow: none;
}

.detail-exchange-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--surface-soft);
}

.detail-exchange-row__label {
  color: var(--text-muted);
  font-size: .66rem;
  font-weight: 750;
  letter-spacing: .05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.asset-exchange-icons--detail {
  margin-top: 0;
}

.market-footnote--availability {
  margin-top: 4px;
  font-size: .68rem;
}

@media (max-width: 520px) {
  .price-scope-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
  }

  .price-scope-switch__option {
    padding-inline: 7px;
    text-align: center;
    font-size: .66rem;
  }

  .asset-source-icons {
    gap: 3px;
  }
}

.portfolio-card-zone--market .asset-symbol-line {
  flex-wrap: wrap;
}

.portfolio-card-zone--market .asset-source-icons {
  flex-basis: 100%;
  margin: 1px 0 0 35px;
}
/* Pass 2.6.10 — explicit transaction-date confirmation */
.transaction-review-intro {
  color: var(--text-muted);
  font-size: .85rem;
  margin-top: -4px;
}
.transaction-date-group {
  margin: 18px 0 24px;
}
.transaction-date-panel {
  background: var(--surface-raised, var(--surface));
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 16px;
  box-shadow: var(--shadow-sm, none);
}
.transaction-date-heading,
.transaction-review-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.transaction-date-heading strong {
  display: block;
  margin-top: 3px;
  font-size: 1rem;
}
.transaction-date-kicker {
  display: block;
  color: var(--text-muted);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.transaction-count-badge {
  flex: 0 0 auto;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-soft, var(--text-muted));
  font-size: .72rem;
  font-weight: 700;
  padding: 5px 9px;
}
.transaction-date-input-label {
  margin-top: 14px;
}
.transaction-date-input {
  width: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: 'Inter', sans-serif;
  font-size: 1rem;
  padding: 12px 13px;
}
.transaction-date-input:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 22%, transparent);
  outline-offset: 1px;
}
.transaction-date-warning,
.transaction-date-hint,
.transaction-date-status {
  font-size: .78rem;
  margin: 8px 0 0;
}
.transaction-date-warning {
  color: var(--warning);
}
.transaction-date-hint {
  color: var(--text-muted);
}
.report-date-note {
  display: grid;
  gap: 3px;
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 9%, transparent);
  font-size: .78rem;
}
.report-date-note span {
  color: var(--text-muted);
}
.transaction-date-confirmation {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.4;
}
.transaction-date-confirmation input,
.transaction-include-label input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}
.transaction-date-status {
  min-height: 1.1em;
  color: var(--rise);
  font-weight: 700;
}
.transaction-review-rows {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.transaction-review-card {
  margin: 0;
}
.transaction-review-card-head {
  margin-bottom: 10px;
}
.transaction-include-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0;
  color: var(--text-muted);
  font-size: .78rem;
  cursor: pointer;
}
.transaction-review-note {
  color: var(--text-muted);
  font-size: .78rem;
  margin: 6px 0 0;
}
.transaction-review-note--source {
  color: var(--accent);
}
.transaction-review-retry {
  display: block;
  text-align: center;
  margin-top: 16px;
  color: var(--text-muted);
  font-size: .85rem;
}
#confirm-import-button:disabled {
  cursor: not-allowed;
  opacity: .48;
}

@media (max-width: 520px) {
  .transaction-date-panel {
    padding: 14px;
  }
  .transaction-date-heading {
    align-items: flex-start;
  }
  .transaction-count-badge {
    font-size: .68rem;
  }
}

/* Pass 2.6.10 revised — overlap review */
.transaction-review-card--possible-duplicate {
  border-color: color-mix(in srgb, var(--warning) 58%, var(--border));
}
.transaction-overlap-warning {
  margin: 0 0 12px;
  padding: 10px 12px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--warning) 12%, transparent);
  color: var(--warning);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.4;
}


/* Pass 2.6.11-2.6.13 — persistence, transaction repair and corrected Prices scope */
.swipe-action--manage { color: var(--accent-strong); }
.transaction-review-toolbar, .transaction-bulk-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin:12px 0; }
.transaction-review-summary { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:center; }
.transaction-card-open { border:0; background:transparent; color:var(--text); text-align:left; padding:4px; cursor:pointer; }
.transaction-card-open strong, .transaction-card-open span { display:block; }
.transaction-card-open span { color:var(--text-muted); font-size:.76rem; margin-top:3px; }
.transaction-review-edit, .transaction-edit-form { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin-top:12px; }
.transaction-review-edit[hidden] { display:none; }
.transaction-review-card.is-removed { opacity:.52; border-style:dashed; }
.transaction-review-card.is-removed .transaction-card-open { text-decoration:line-through; }
.transaction-manager-filters { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; margin:14px 0; }
.transaction-manager-card { margin:10px 0; }
.transaction-manager-head { display:grid; grid-template-columns:auto minmax(0,1fr) auto; gap:10px; align-items:center; }
.transaction-manager-head span, .transaction-manager-value span { display:block; color:var(--text-muted); font-size:.75rem; margin-top:3px; }
.transaction-manager-value { text-align:right; }
.transaction-manager-card details { margin-top:10px; border-top:1px solid var(--border); padding-top:10px; }
.transaction-manager-card summary { cursor:pointer; color:var(--accent-strong); font-weight:700; }
.transaction-delete-one { margin-top:10px; }
@media (max-width:560px){ .transaction-review-edit,.transaction-edit-form,.transaction-manager-filters{grid-template-columns:1fr;} .transaction-review-summary{grid-template-columns:auto minmax(0,1fr);} .transaction-review-summary .transaction-remove-row{grid-column:1/-1;width:100%;} .transaction-manager-head{grid-template-columns:auto minmax(0,1fr);} .transaction-manager-value{grid-column:2;text-align:left;} }

/* Pass 2.6.18: CoinGecko prices on order and mover cards. */
.order-card__prices {
  display: grid;
  gap: 4px;
  margin-top: 7px;
}

.order-card__price-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 4px 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
}

.order-card__price-line strong {
  color: var(--text);
  font-size: 0.86rem;
}

.order-card__price-line small {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.order-card__price-line--current strong {
  color: var(--accent);
}

.order-card__distance {
  font-size: 0.74rem;
  font-weight: 700;
}

.order-card__distance--above {
  color: var(--rise);
}

.order-card__distance--below {
  color: var(--drop);
}

.order-card__distance--at {
  color: var(--accent);
}

.mover-market-price {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 5px 8px;
  margin-top: 9px;
  font-size: 0.78rem;
  color: var(--text-muted);
}

.mover-market-price strong {
  color: var(--text);
  font-size: 0.92rem;
}

.mover-market-price small {
  color: var(--text-muted);
  font-size: 0.72rem;
}
