/*!*****************************************************************************************************************************************************************************************************************************************************************!*\
  !*** css ./node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[2]!./node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js??ruleSet[1].rules[14].oneOf[10].use[3]!./src/app/globals.css ***!
  \*****************************************************************************************************************************************************************************************************************************************************************/
/* ── Reset ──────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

/* ── Design tokens ──────────────────────────────────────────────────────── */
:root {
  /* Eggplant — dark (default) */
  --bg:               #0d0f17;
  --surface:          #13161f;
  --surface-2:        #1c2030;
  --border:           #252840;
  --primary:          #6366f1;
  --primary-h:        #4f52c9;
  --primary-wash:     #1a1040;
  --primary-wash-b:   #312e81;
  --primary-wash-t:   #a5b4fc;
  --text:             #dde1f0;
  --muted:            #5a6080;
  --success:          #10b981;
  --danger:           #ef4444;
  --warning:          #f59e0b;
  --radius:           8px;
  --nav-w:            220px;
  --nav-w-collapsed:  68px;
  --font:             "Inter", system-ui, -apple-system, sans-serif;
}

/* ── Organic — dark ── */
[data-scheme="organic"] {
  --bg:             #0d1210;
  --surface:        #131915;
  --surface-2:      #1a2419;
  --border:         #222e27;
  --primary:        #0a9478;
  --primary-h:      #087d64;
  --primary-wash:   #0d2518;
  --primary-wash-b: #145032;
  --primary-wash-t: #6ee7b7;
  --muted:          #5a7068;
}

/* ── Steel — dark ── */
[data-scheme="steel"] {
  --bg:             #0f1115;
  --surface:        #161920;
  --surface-2:      #1e2228;
  --border:         #282e38;
  --primary:        #5a6778;
  --primary-h:      #49566a;
  --primary-wash:   #191c24;
  --primary-wash-b: #374151;
  --primary-wash-t: #9ca3af;
  --muted:          #616b7a;
}

/* ── Eggplant — dim ── */
[data-theme="dim"] {
  --bg:        #18192a;
  --surface:   #1f2138;
  --surface-2: #252845;
  --border:    #303456;
  --text:      #c5c9dd;
  --muted:     #6570a0;
}

/* ── Organic — dim ── */
[data-theme="dim"][data-scheme="organic"] {
  --bg:        #17191a;
  --surface:   #1e2120;
  --surface-2: #242825;
  --border:    #2d3430;
  --text:      #c8d4cd;
  --muted:     #5a6e65;
}

/* ── Steel — dim ── */
[data-theme="dim"][data-scheme="steel"] {
  --bg:        #18191d;
  --surface:   #1f2228;
  --surface-2: #262930;
  --border:    #2f343c;
  --text:      #c5c8ce;
  --muted:     #5a6370;
}

/* ── Eggplant — light ── */
[data-theme="light"] {
  --bg:             #f2f4f9;
  --surface:        #ffffff;
  --surface-2:      #e8ecf4;
  --border:         #d0d5e8;
  --primary-wash:   #ede9fe;
  --primary-wash-b: #a5b4fc;
  --primary-wash-t: #4338ca;
  --text:           #1a1d2e;
  --muted:          #7a80a0;
}

/* ── Organic — light ── */
[data-theme="light"][data-scheme="organic"] {
  --bg:             #f2f5f3;
  --surface:        #ffffff;
  --surface-2:      #e8f0eb;
  --border:         #ccd8d2;
  --primary:        #087d64;
  --primary-h:      #066b55;
  --primary-wash:   #d1fae5;
  --primary-wash-b: #6ee7b7;
  --primary-wash-t: #065f46;
  --text:           #1a2820;
  --muted:          #6a8070;
}

/* ── Steel — light ── */
[data-theme="light"][data-scheme="steel"] {
  --bg:             #f3f4f6;
  --surface:        #ffffff;
  --surface-2:      #e9eaed;
  --border:         #d1d5db;
  --primary:        #4a5568;
  --primary-h:      #374151;
  --primary-wash:   #e9eaed;
  --primary-wash-b: #9ca3af;
  --primary-wash-t: #374151;
  --text:           #111827;
  --muted:          #6b7280;
}

/* ── Base ────────────────────────────────────────────────────────────────── */
html, body { margin: 0; height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { margin: 0 0 .5rem; line-height: 1.2; font-weight: 600; }
h1 { font-size: 1.5rem; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }

/* ── Layout shell ────────────────────────────────────────────────────────── */
.shell {
  display: flex;
  min-height: 100vh;
}

/* ── Sidebar nav ─────────────────────────────────────────────────────────── */
.nav {
  width: var(--nav-w);
  min-width: var(--nav-w);
  background: var(--surface);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  padding: 1.25rem 0;
  position: -webkit-sticky;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width .22s ease, min-width .22s ease;
  flex-shrink: 0;
}

/* ── Collapsed nav ── */
.nav--collapsed {
  width: var(--nav-w-collapsed);
  min-width: var(--nav-w-collapsed);
}

/* ── Logo area ── */
.nav-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 1.25rem 1.25rem;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  flex-shrink: 0;
  overflow: hidden;
}
.nav-logo:hover { text-decoration: none; opacity: .85; }

.nav-logo-img {
  width: 100%;
  max-width: 172px;
  height: auto;
  display: block;
  flex-shrink: 0;
}

.nav-logo-fav {
  width: 54px;
  height: 54px;
  object-fit: contain;
  flex-shrink: 0;
}

.nav--collapsed .nav-logo { padding: 0 0 1rem; }

/* ── BTC spot-price card (under the logo) ── */
.nav-btc-price {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: .5rem;
  margin: .75rem .75rem 0;
  padding: .5rem .75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.nav-btc-price-label {
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .03em;
  color: var(--muted);
  text-transform: uppercase;
}
.nav-btc-price-value {
  font-size: 1rem;
  font-weight: 700;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  color: var(--btc, #f7931a);
}

/* ── Nav links ── */
.nav-links {
  flex: 1 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 1rem .75rem;
}
.nav--collapsed .nav-links { padding: 1rem .5rem; }

.nav-link {
  display: flex;
  align-items: center;
  gap: .65rem;
  padding: .55rem .75rem;
  border-radius: var(--radius);
  color: var(--muted);
  font-weight: 500;
  transition: background .15s, color .15s;
  text-decoration: none;
  cursor: pointer;
  border: none;
  background: none;
  width: 100%;
  font-size: 16px;        /* 14px +50% then -25% ≈ 16px */
  font-family: var(--font);
  white-space: nowrap;
  overflow: hidden;
}
.nav-link:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav-link.active { background: var(--primary); color: #fff; }

/* Icons: 14px ×2 then ×0.75 = 21px */
.nav-link-icon {
  font-size: 21px;
  width: 26px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.nav-link-icon svg {
  display: block;
  stroke: currentColor;
}

/* Label text hidden when collapsed */
.nav-link-label { flex: 1 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; text-align: left; }
.nav--collapsed .nav-link-label { display: none; }

/* Collapsed link: centre the icon */
.nav--collapsed .nav-link {
  justify-content: center;
  padding: .55rem .5rem;
  gap: 0;
}

/* ── Premium nav link — shiny gold ──────────────────────────────────────── */
.nav-link-premium {
  background: linear-gradient(135deg,
    rgba(253, 230, 138, 0.18) 0%,
    rgba(245, 158, 11, 0.28) 50%,
    rgba(253, 230, 138, 0.18) 100%);
  background-size: 200% 200%;
  border: 1px solid rgba(202, 138, 4, 0.55);
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.18),
    0 0 8px rgba(251, 191, 36, 0.28);
  animation: nav-link-premium-shine 4s ease-in-out infinite;
}
.nav-link-premium .nav-link-icon,
.nav-link-premium .nav-link-label {
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 35%, #f59e0b 65%, #fde68a 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  font-weight: 700;
  text-shadow: 0 0 12px rgba(251, 191, 36, 0.35);
  animation: nav-link-premium-text-shine 4s ease-in-out infinite;
}
.nav-link-premium:hover {
  background: linear-gradient(135deg,
    rgba(253, 230, 138, 0.30) 0%,
    rgba(245, 158, 11, 0.42) 50%,
    rgba(253, 230, 138, 0.30) 100%);
  background-size: 200% 200%;
  border-color: rgba(202, 138, 4, 0.85);
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.32),
    0 0 12px rgba(251, 191, 36, 0.55);
}
.nav-link-premium.active {
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 35%, #f59e0b 65%, #fde68a 100%);
  background-size: 200% 200%;
  border-color: #b8860b;
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.5),
    0 0 14px rgba(251, 191, 36, 0.7),
    inset 0 1px 0 rgba(255, 255, 255, 0.55);
  animation: nav-link-premium-shine 3.5s ease-in-out infinite;
}
.nav-link-premium.active .nav-link-icon,
.nav-link-premium.active .nav-link-label {
  background: none;
  -webkit-text-fill-color: #3a2700;
  color: #3a2700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.45);
  animation: none;
}

/* SVG icons can't use background-clip:text — colour the stroke directly */
.nav-link-premium .nav-link-icon svg {
  stroke: #fbbf24;
  filter: drop-shadow(0 0 4px rgba(251, 191, 36, 0.45));
}
.nav-link-premium.active .nav-link-icon svg {
  stroke: #3a2700;
  filter: none;
}
@keyframes nav-link-premium-shine {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
@keyframes nav-link-premium-text-shine {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
[data-theme="light"] .nav-link-premium {
  background: linear-gradient(135deg,
    rgba(253, 230, 138, 0.45) 0%,
    rgba(245, 158, 11, 0.32) 50%,
    rgba(253, 230, 138, 0.45) 100%);
  background-size: 200% 200%;
  border-color: rgba(161, 98, 7, 0.55);
}
[data-theme="light"] .nav-link-premium .nav-link-icon,
[data-theme="light"] .nav-link-premium .nav-link-label {
  background: linear-gradient(135deg, #b45309 0%, #d97706 50%, #b45309 100%);
  background-size: 200% 200%;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

/* CoinGecko attribution — sits at the bottom, just below the collapse button */
.nav-attribution {
  display: block;
  margin: 0 -.75rem -1rem;        /* bleed past nav-links padding (sides + bottom) so it's flush with both rules */
  padding: .4rem 1.5rem;          /* pad text back to align with nav-link labels */
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
  line-height: 1.4;
  transition: color .15s;
}
.nav-attribution:hover { color: var(--text); text-decoration: none; }
.nav-attribution strong { font-weight: 600; color: var(--text); }
.nav-attribution-mini { display: none; }
.nav--collapsed .nav-attribution { text-align: center; margin: 0 -.5rem -1rem; padding: .4rem .5rem; }
.nav--collapsed .nav-attribution-full { display: none; }
.nav--collapsed .nav-attribution-mini { display: inline; }

/* Collapse toggle button */
.nav-collapse-btn { margin-top: auto; }

/* ── Nav footer ── */
.nav-footer {
  padding: 1rem .75rem;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
}

/* ── Tax recalc nav action (extends .nav-link, recolours/enables by state) ── */
.nav-recalc:disabled { cursor: default; }
/* Stale: a recalc is actually needed — brighter than a normal muted link so it
   reads as actionable. Inherits .nav-link hover. */
.nav-recalc--stale { color: var(--text); }
/* Current: nothing to do — muted and dimmed, no hover affordance. */
.nav-recalc--current,
.nav-recalc--current:hover { color: var(--muted); opacity: .55; background: none; }
.nav-recalc--running,
.nav-recalc--running:hover { color: #d97706; background: none; }
.nav-recalc--done { color: #16a34a; }
.nav-recalc--running .nav-link-icon {
  animation: nav-spin 1s linear infinite;
}
@keyframes nav-spin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.nav--collapsed .nav-footer {
  padding: .75rem .5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .5rem;
}
.nav--collapsed .nav-user-card    { justify-content: center; margin: .5rem -.5rem; padding: .5rem 0; }
.nav--collapsed .nav-user-meta    { display: none; }
.nav--collapsed .nav-theme-toggle { display: none; }

/* ── Main content ────────────────────────────────────────────────────────── */
.content {
  flex: 1 1;
  padding: 2rem;
  max-width: 1100px;
  overflow-x: auto;
}

/* ── Auth pages ──────────────────────────────────────────────────────────── */
.auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg);
}
.auth-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  width: 100%;
  max-width: 400px;
}
.auth-title { font-size: 1.5rem; margin-bottom: .25rem; }
.auth-sub { color: var(--muted); margin-bottom: 1.5rem; }
.auth-logo { width: 100%; max-width: 300px; height: auto; margin-bottom: 1rem; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  grid-gap: 1rem;
  gap: 1rem;
  margin-bottom: 1.5rem;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
}
.stat-label { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: .5rem; }
.stat-value { font-size: 1.75rem; font-weight: 700; }

/* ── Forms ───────────────────────────────────────────────────────────────── */
.form-group { margin-bottom: 1rem; }
.form-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: .4rem;
}
.form-input,
.form-select,
.form-textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  padding: .5rem .75rem;
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .15s;
}
.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  border-color: var(--primary);
}
.form-input::placeholder { color: var(--muted); }
.form-select { cursor: pointer; }
.form-hint { font-size: 12px; color: var(--muted); margin-top: .3rem; }

/* ── Modal ───────────────────────────────────────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  -webkit-backdrop-filter: blur(2px);
          backdrop-filter: blur(2px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1.5rem;
  animation: modal-overlay-in 0.15s ease-out;
}
.modal {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
  max-width: 100%;
  max-height: calc(100vh - 3rem);
  overflow: auto;
  animation: modal-in 0.18s ease-out;
}
[data-theme="light"] .modal {
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}
.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.5rem 1.75rem 0.5rem;
}
.modal-title {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 700;
}
.modal-body {
  padding: 1rem 1.75rem 1.75rem;
}
.modal-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 18px;
  cursor: pointer;
  padding: .25rem .5rem;
  border-radius: var(--radius);
}
.modal-close:hover { background: var(--surface-2); color: var(--text); }
@keyframes modal-overlay-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes modal-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── Buttons ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1rem;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 500;
  font-family: var(--font);
  border: none;
  cursor: pointer;
  transition: background .15s, opacity .15s;
  white-space: nowrap;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover:not(:disabled) { background: var(--primary-h); }
.btn-secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }
.btn-secondary:hover:not(:disabled) { background: var(--border); }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover:not(:disabled) { background: #c53030; }
.btn-sm { padding: .3rem .7rem; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn-link { background: none; border: none; color: var(--primary); padding: 0; font-size: inherit; }
.btn-link:hover { text-decoration: underline; }

/* Horizontally-scrollable tab bar that never shows a scrollbar. */
.report-tabs { scrollbar-width: none; -ms-overflow-style: none; }
.report-tabs::-webkit-scrollbar { display: none; }

/* Notification panel: scrollable, but no visible scrollbar chrome. */
.notif-scroll { scrollbar-width: none; -ms-overflow-style: none; }
.notif-scroll::-webkit-scrollbar { display: none; }

/* Per-notification action buttons (mark-read ✓, dismiss ×) — only on row hover. */
.notif-row { position: relative; }
.notif-dismiss, .notif-mark {
  position: absolute; top: 4px;
  width: 18px; height: 18px; padding: 0;
  display: flex; align-items: center; justify-content: center;
  border: none; border-radius: 4px; cursor: pointer;
  background: transparent; color: var(--muted);
  opacity: 0; transition: opacity .12s ease, background .12s ease;
}
.notif-dismiss { right: 4px; }
.notif-mark { right: 26px; }
.notif-row:hover .notif-dismiss, .notif-row:hover .notif-mark { opacity: 1; }
.notif-dismiss:hover, .notif-mark:hover { background: var(--surface-2); color: var(--text); }

/* ── Tables ──────────────────────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; }
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
th {
  text-align: left;
  padding: .5rem .75rem;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  border-bottom: 1px solid var(--border);
}
td {
  padding: .65rem .75rem;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--surface-2); }

/* ── Badges / pills ──────────────────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: .15rem .5rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.badge-in     { background: #0d2d22; color: var(--success); }
.badge-out    { background: #2d1010; color: var(--danger); }
.badge-buy    { background: #0d2d22; color: var(--success); }
.badge-sell   { background: #2d1010; color: var(--danger); }
.badge-transfer { background: #1a2640; color: #60a5fa; }
.badge-reward { background: var(--primary-wash); color: var(--primary-wash-t); }
.badge-airdrop{ background: #0d2830; color: #22d3ee; }
.badge-fee    { background: #2d1f00; color: var(--warning); }
.badge-neutral{ background: var(--surface-2); color: var(--muted); }

/* ── Premium badge — shiny gold ─────────────────────────────────────────── */
.badge-premium {
  display: inline-block;
  padding: .2rem .6rem;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: #3a2700;
  background: linear-gradient(135deg, #fde68a 0%, #fbbf24 35%, #f59e0b 65%, #fde68a 100%);
  background-size: 200% 200%;
  border: 1.5px solid #b8860b;
  box-shadow:
    0 0 0 1px rgba(255, 215, 0, 0.35),
    0 0 8px rgba(255, 191, 36, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.4);
  animation: badge-premium-shine 3.5s ease-in-out infinite;
  white-space: nowrap;
}
.badge-premium-sm {
  padding: .1rem .45rem;
  font-size: 10px;
  letter-spacing: .05em;
  border-width: 1px;
}
@keyframes badge-premium-shine {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}
[data-theme="light"] .badge-premium {
  color: #4a2f00;
  border-color: #a16207;
  box-shadow:
    0 0 0 1px rgba(202, 138, 4, 0.35),
    0 0 6px rgba(251, 191, 36, 0.55),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

/* ── Alerts ──────────────────────────────────────────────────────────────── */
.alert {
  padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: 13px;
  margin-bottom: 1rem;
}
.alert-error { background: #2d1010; border: 1px solid #7f1d1d; color: #fca5a5; }
.alert-success { background: #0d2d22; border: 1px solid #064e3b; color: #6ee7b7; }
.alert-info { background: var(--primary-wash); border: 1px solid var(--primary-wash-b); color: var(--primary-wash-t); }

/* ── Misc ────────────────────────────────────────────────────────────────── */
.page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}
.page-title { font-size: 1.4rem; font-weight: 700; }
.spacer { flex: 1 1; }

.empty {
  text-align: center;
  padding: 3rem;
  color: var(--muted);
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }

.spinner {
  width: 20px; height: 20px;
  border: 2px solid var(--border);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

.loading-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
}

.mono { font-family: "SF Mono", "Fira Code", monospace; font-size: 12px; }

.row { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; }

/* ── DateTimeInput ───────────────────────────────────────────────────────── */
/* Suppress the browser-native calendar icon so our custom one shows instead */
input[type="datetime-local"]::-webkit-calendar-picker-indicator,
input[type="date"]::-webkit-calendar-picker-indicator {
  opacity: 0; position: absolute; right: 0;
  width: 2.5rem; height: 100%; cursor: pointer;
}
.dt-input-wrap { position: relative; }
.dt-input { padding-right: 2.5rem; }
.dt-input-icon {
  position: absolute; right: 0.6rem; top: 50%; transform: translateY(-50%);
  background: none; border: none; padding: 0.2rem; cursor: pointer;
  display: inline-flex; align-items: center; border-radius: 3px;
  /* High-contrast icon that inverts cleanly in light/dark */
  color: var(--text); opacity: 0.55;
  transition: opacity .15s, background .15s;
  pointer-events: auto;
}
.dt-input-icon:hover:not(:disabled) { opacity: 1; background: rgba(128,128,128,.15); }
.dt-input-icon:disabled { pointer-events: none; opacity: 0.25; }

/* ── Transaction flyout ──────────────────────────────────────────────────── */
.tx-flyout-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.35);
}
.tx-flyout {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 201;
  width: 400px; max-width: 100vw;
  background: var(--surface); border-left: 1px solid var(--border);
  box-shadow: -6px 0 32px rgba(0,0,0,.5);
  overflow-y: auto; padding: 1.5rem;
  animation: flyout-in .18s ease;
}
@keyframes flyout-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0);    }
}
.tx-flyout-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 1.25rem;
}
.tx-flyout-title { font-size: .95rem; font-weight: 600; }
.tx-flyout-close {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1.1rem; padding: .2rem .4rem;
  border-radius: 4px; transition: background .12s, color .12s;
  line-height: 1;
}
.tx-flyout-close:hover { background: var(--surface-2); color: var(--text); }
.tx-flyout-field {
  display: flex; gap: .5rem; padding: .42rem 0;
  border-bottom: 1px solid rgba(255,255,255,.04);
  font-size: .82rem;
}
.tx-flyout-label {
  flex: 0 0 120px; color: var(--muted); padding-top: 1px;
}
.tx-flyout-value { flex: 1 1; word-break: break-all; }
.tx-flyout-copy {
  margin-right: .4rem; padding: 0;
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: .85rem; line-height: 1;
  vertical-align: baseline;
}
.tx-flyout-copy:hover { color: var(--text); }
.tx-flyout-section {
  font-size: .75rem; font-weight: 600; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
  margin: 1rem 0 .3rem; border-top: 1px solid var(--border);
  padding-top: .75rem;
}
.badge-transfer { background: #0d1f3d; color: #60a5fa; }

/* ── Lineage modal (Lot Explorer) ────────────────────────────────────────── */
.lineage-backdrop {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(0,0,0,.5);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.lineage-modal {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px;
  width: 100%; max-width: 1400px;
  height: 100%; max-height: 90vh;
  display: flex; flex-direction: column;
  box-shadow: 0 24px 64px rgba(0,0,0,.4);
  overflow: hidden;
}
.lineage-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  gap: 1rem;
}
.lineage-tabs {
  display: inline-flex; background: var(--surface-2);
  border-radius: 6px; padding: 2px;
}
.lineage-tab {
  background: transparent; border: none; cursor: pointer;
  color: var(--muted); font-size: .82rem;
  padding: .35rem .8rem; border-radius: 4px;
  transition: background .12s, color .12s;
}
.lineage-tab:hover { color: var(--text); }
.lineage-tab.active { background: var(--surface); color: var(--text); }
.lineage-body {
  flex: 1 1; overflow: auto; position: relative;
}

/* ── React Flow theming ──────────────────────────────────────────────────── */
/* React Flow v12 reads --xy-* custom properties; setting them on the root
   .react-flow element makes controls/minimap/edges blend with our theme
   instead of using the library's bright-white defaults. */
.react-flow {
  --xy-controls-button-background-color: var(--surface);
  --xy-controls-button-background-color-default: var(--surface);
  --xy-controls-button-background-color-hover: var(--surface-2);
  --xy-controls-button-background-color-hover-default: var(--surface-2);
  --xy-controls-button-color: var(--text);
  --xy-controls-button-color-default: var(--text);
  --xy-controls-button-color-hover: var(--text);
  --xy-controls-button-color-hover-default: var(--text);
  --xy-controls-button-border-color: var(--border);
  --xy-controls-button-border-color-default: var(--border);
  --xy-controls-box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  --xy-minimap-background-color: var(--surface);
  --xy-minimap-background-color-default: var(--surface);
  --xy-minimap-mask-background-color: rgba(0, 0, 0, 0.35);
  --xy-minimap-mask-background-color-default: rgba(0, 0, 0, 0.35);
  --xy-minimap-mask-stroke-color: var(--border);
  --xy-minimap-mask-stroke-color-default: var(--border);
  --xy-edge-label-background-color: var(--surface);
  --xy-edge-label-background-color-default: var(--surface);
  --xy-edge-label-color: var(--text);
  --xy-edge-label-color-default: var(--text);
  --xy-background-pattern-color: var(--border);
  --xy-background-pattern-color-default: var(--border);
  --xy-attribution-background-color: transparent;
  --xy-attribution-background-color-default: transparent;
}
.react-flow__minimap {
  border: 1px solid var(--border);
  border-radius: 4px;
}
.react-flow__controls {
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
}

/* ── Row action menu ─────────────────────────────────────────────────────── */
.row-menu-trigger {
  background: none; border: none; cursor: pointer;
  color: var(--muted); font-size: 1.1rem; line-height: 1;
  padding: 2px 6px; border-radius: 4px;
  transition: background .15s, color .15s;
}
.row-menu-trigger:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.row-menu-trigger:disabled { opacity: .4; cursor: not-allowed; }

.portal-dropdown {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 6px; box-shadow: 0 4px 16px rgba(0,0,0,.4);
  overflow: hidden;
}
.row-menu-item {
  display: block; width: 100%; text-align: left;
  background: none; border: none; cursor: pointer; text-decoration: none;
  padding: .45rem .85rem; font-size: .82rem; color: var(--text);
  transition: background .12s;
}
.row-menu-item:hover { background: var(--border); }
.row-menu-item-danger { color: var(--danger); }
.row-menu-item-danger:hover { background: rgba(239,68,68,.12); }
.gap-sm { gap: .5rem; }

.type-badge-row { display: flex; gap: .4rem; flex-wrap: wrap; }

/* ── Report viewer: jump nav + collapsible sections ──────────────────────── */
.report-jump-chip {
  background: var(--surface-2); border: 1px solid var(--border);
  border-radius: 999px; cursor: pointer;
  padding: .2rem .65rem; font-size: .78rem; color: var(--muted);
  transition: background .12s, color .12s, border-color .12s;
}
.report-jump-chip:hover { background: var(--border); color: var(--text); border-color: var(--muted); }
.report-jump-link {
  background: none; border: none; cursor: pointer;
  font-size: .76rem; color: var(--muted); padding: 0;
  -webkit-text-decoration: underline dotted;
          text-decoration: underline dotted;
}
.report-jump-link:hover { color: var(--text); }
.report-section { border-bottom: 1px solid var(--border); }
.report-section-header {
  display: flex; align-items: center; gap: .55rem;
  width: 100%; text-align: left; cursor: pointer;
  background: none; border: none; padding: .7rem .15rem;
  color: var(--text); transition: background .12s;
}
.report-section-header:hover { background: var(--surface-2); }
.report-section-count {
  margin-left: auto; font-size: .72rem; color: var(--muted);
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  background: var(--surface-2); border-radius: 999px; padding: .05rem .5rem;
}

/* ── Wallet type picker ──────────────────────────────────────────────────── */
.wallet-type-category { margin-bottom: 1.25rem; }
.wallet-type-category-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--muted);
  margin-bottom: .5rem;
}
.wallet-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  grid-gap: .75rem;
  gap: .75rem;
}
.wallet-type-card {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 1rem;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  text-align: center;
}
.wallet-type-card:hover { border-color: var(--primary); background: var(--surface-2); }
.wallet-type-card.selected { border-color: var(--primary); background: var(--primary-wash); }
.wallet-type-icon { font-size: 1.5rem; margin-bottom: .4rem; line-height: 1; }
.wallet-type-img { width: 40px; height: 40px; border-radius: 9px; object-fit: contain; display: inline-block; vertical-align: middle; }
.wallet-type-label { font-weight: 600; font-size: 13px; }
.wallet-type-sub { font-size: 11px; color: var(--muted); margin-top: .2rem; }

/* ── Import status ───────────────────────────────────────────────────────── */
.import-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: 12px;
  color: var(--muted);
}

/* ── Filters bar ─────────────────────────────────────────────────────────── */
.filters {
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  margin-bottom: 1rem;
  padding: 1rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.filters .form-group { margin-bottom: 0; min-width: 140px; }
/* Advanced (power-user) filters — own row below the simple ones, with a divider */
.filters-advanced {
  flex-basis: 100%;
  display: flex;
  gap: .75rem;
  flex-wrap: wrap;
  align-items: flex-end;
  padding-top: .85rem;
  margin-top: .1rem;
  border-top: 1px solid var(--border);
}

/* ── Settings page ───────────────────────────────────────────────────────── */
.settings-section { margin-bottom: 2rem; }
.settings-section h2 { margin-bottom: 1rem; padding-bottom: .5rem; border-bottom: 1px solid var(--border); }
.settings-subhead { margin: 0 0 1rem; font-size: .95rem; font-weight: 600; color: var(--text); }
.settings-card-divider { border-top: 1px solid var(--border); margin: 1.25rem 0; }

/* ── Segment control (BTC/sats toggle) ──────────────────────────────────── */
.segment-control {
  display: inline-flex;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.segment-btn {
  background: none;
  border: none;
  padding: .4rem 1rem;
  font-size: 13px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.segment-btn + .segment-btn { border-left: 1px solid var(--border); }
.segment-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.segment-btn.active { background: var(--primary); color: #fff; }
.segment-btn:disabled { opacity: .5; cursor: not-allowed; }

.now-btn {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: .2rem .55rem;
  font-size: 11px;
  font-weight: 500;
  font-family: var(--font);
  color: var(--muted);
  cursor: pointer;
  transition: background .15s, color .15s;
}
.now-btn:hover:not(:disabled) { background: var(--surface-2); color: var(--text); }
.now-btn:disabled { opacity: .5; cursor: not-allowed; }

/* ── Nav theme icons ─────────────────────────────────────────────────────── */
/* User identity card: avatar + name/email, consistent with the icon+label
   nav links above. The whole card is a button that opens the avatar uploader. */
/* Identity row: avatar (opens the uploader) + name/email + display-mode toggle.
   The text colour is set here because the name has none of its own. */
.nav-user-card {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
  /* Full-width divider lines above/below, matching the nav-footer top border.
     Negative horizontal margin breaks out of the footer's padding so the rules
     reach the sidebar edges. */
  margin: .5rem -.75rem;
  padding: .6rem .75rem;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.nav-avatar-btn {
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  border-radius: 50%;
  line-height: 0;
  flex-shrink: 0;
  transition: opacity .12s;
}
.nav-avatar-btn:hover { opacity: .8; }
.nav-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  border: 1px solid var(--border);
  background: var(--surface-2);
}
.nav-user-meta {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1;
}
.nav-user-name {
  font-weight: 600;
  font-size: 1.05rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-theme-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 1.1rem;
  color: var(--muted);
  line-height: 1;
  flex-shrink: 0;
  transition: background .12s, color .12s;
}
.nav-theme-toggle:hover { background: var(--surface-2); color: var(--text); }

/* ── Light theme overrides for hardcoded dark badge/alert colours ────────── */
[data-theme="light"] .badge-in     { background: #d1fae5; color: #065f46; }
[data-theme="light"] .badge-out    { background: #fee2e2; color: #991b1b; }
[data-theme="light"] .badge-buy    { background: #d1fae5; color: #065f46; }
[data-theme="light"] .badge-sell   { background: #fee2e2; color: #991b1b; }
[data-theme="light"] .badge-transfer { background: #dbeafe; color: #1e40af; }
[data-theme="light"] .badge-reward { background: var(--primary-wash); color: var(--primary-wash-t); }
[data-theme="light"] .badge-airdrop { background: #cffafe; color: #155e75; }
[data-theme="light"] .badge-fee    { background: #fef3c7; color: #92400e; }
[data-theme="light"] .alert-error  { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
[data-theme="light"] .alert-success { background: #d1fae5; border-color: #6ee7b7; color: #065f46; }
[data-theme="light"] .alert-info   { background: var(--primary-wash); border-color: var(--primary-wash-b); color: var(--primary-wash-t); }
[data-theme="light"] .wallet-type-card.selected { background: var(--primary-wash); }
[data-theme="light"] .tx-flyout { box-shadow: -6px 0 32px rgba(0,0,0,.15); }

/* ── Flip clock (Halving countdown) ─────────────────────────────────────────── */
.flip-clock { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.flip-group { display: flex; flex-direction: column; align-items: center; gap: 0.45rem; }
.flip-group-label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); font-weight: 600; }
.flip-group-digits { display: flex; gap: 5px; }
.flip-colon { font-size: 2.4rem; font-weight: 800; color: var(--muted); align-self: center; padding-bottom: 0.15rem; }

.flip-digit {
  position: relative;
  width: 52px; height: 78px;
  perspective: 240px;
  background: #0e1626;            /* seam colour shown in the 2px gap between halves */
  border-radius: 9px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
  font-weight: 800; font-size: 3.1rem; font-feature-settings: "tnum"; font-variant-numeric: tabular-nums;
}
.flip-half, .flip-fold {
  position: absolute; left: 0; right: 0; height: calc(50% - 1px);
  overflow: hidden; display: flex; justify-content: center;
  background: #e2e8f0; color: #18233b; -webkit-backface-visibility: hidden; backface-visibility: hidden;
}
.flip-half span, .flip-fold span { display: block; height: 78px; line-height: 78px; }
.flip-half--top, .flip-fold--top { top: 0; border-radius: 9px 9px 0 0; }
.flip-half--bottom, .flip-fold--bottom { bottom: 0; border-radius: 0 0 9px 9px; }
.flip-half--bottom span, .flip-fold--bottom span { transform: translateY(-50%); }

.flip-fold--top { transform-origin: bottom; animation: flip-fold-top 0.3s ease-in forwards; z-index: 3; }
.flip-fold--bottom { transform-origin: top; transform: rotateX(90deg); animation: flip-fold-bottom 0.3s ease-out 0.3s forwards; z-index: 3; }

@keyframes flip-fold-top { from { transform: rotateX(0deg); } to { transform: rotateX(-90deg); } }
@keyframes flip-fold-bottom { from { transform: rotateX(90deg); } to { transform: rotateX(0deg); } }

