:root {
  --bg: #06080f;
  --bg-soft: #0b0f18;
  --card: rgba(16, 20, 32, 0.72);
  --card-solid: #101420;
  --card-2: rgba(22, 28, 44, 0.85);
  --border: rgba(148, 163, 184, 0.12);
  --border-bright: rgba(148, 163, 184, 0.22);
  --text: #f1f5f9;
  --muted: #94a3b8;
  --faint: #64748b;
  --ikas: #2dd4bf;
  --ikas-dim: rgba(45, 212, 191, 0.14);
  --igra: #c4b5fd;
  --igra-dim: rgba(196, 181, 253, 0.14);
  --value: #38bdf8;
  --value-dim: rgba(56, 189, 248, 0.14);
  --good: #34d399;
  --good-dim: rgba(52, 211, 153, 0.14);
  --warn: #fbbf24;
  --warn-dim: rgba(251, 191, 36, 0.14);
  --info: #64748b;
  --danger: #fb7185;
  --danger-dim: rgba(251, 113, 133, 0.14);
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 0 1px rgba(45, 212, 191, 0.08), 0 12px 40px rgba(0, 0, 0, 0.35);
  --radius: 16px;
  --radius-sm: 10px;
  --font: "DM Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* ---------- ambient background ---------- */
.ambient {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  overflow: hidden;
}
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(90px);
  opacity: 0.45;
  animation: orb-drift 22s var(--ease) infinite alternate;
}
.orb-a {
  width: 520px; height: 520px;
  top: -12%; right: 8%;
  background: radial-gradient(circle, rgba(45, 212, 191, 0.35) 0%, transparent 70%);
}
.orb-b {
  width: 480px; height: 480px;
  bottom: 5%; left: -8%;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.28) 0%, transparent 70%);
  animation-delay: -8s;
}
.orb-c {
  width: 360px; height: 360px;
  top: 42%; left: 38%;
  background: radial-gradient(circle, rgba(56, 189, 248, 0.18) 0%, transparent 70%);
  animation-delay: -14s;
}
.grid-noise {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(ellipse 80% 60% at 50% 0%, black 20%, transparent 75%);
}
@keyframes orb-drift {
  from { transform: translate(0, 0) scale(1); }
  to { transform: translate(24px, -18px) scale(1.06); }
}

/* Scope stacking context to legacy dashboard markup only — not the Next.js site navbar */
#dashboard-root > :not(.ambient) { position: relative; z-index: 1; }

h1, h2 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 17px; }
h2 {
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
}

/* ---------- topbar ---------- */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 28px;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(6, 8, 15, 0.75);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand .logo {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--ikas) 0%, #5eead4 40%, var(--igra) 100%);
  color: #04121a;
  font-size: 18px;
  font-weight: 800;
  box-shadow: 0 4px 20px rgba(45, 212, 191, 0.25);
}
.brand .sub { margin: 4px 0 0; color: var(--faint); font-size: 12px; max-width: 340px; }

.status { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--card-2);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: border-color 0.2s, box-shadow 0.2s;
}
#modePill.live {
  color: var(--good);
  border-color: rgba(52, 211, 153, 0.35);
  background: var(--good-dim);
  box-shadow: 0 0 20px rgba(52, 211, 153, 0.08);
}
#modePill.dry {
  color: var(--warn);
  border-color: rgba(251, 191, 36, 0.35);
  background: var(--warn-dim);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
.pill.on .dot {
  background: var(--good);
  box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.2), 0 0 12px rgba(52, 211, 153, 0.5);
  animation: pulse-dot 2s ease infinite;
}
.pill.off .dot { background: var(--danger); }
@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.65; }
}
.meta {
  color: var(--faint);
  font-size: 11.5px;
  font-family: var(--mono);
  font-weight: 500;
}

/* ---------- layout ---------- */
.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 20px;
  padding: 22px 28px 10px;
  max-width: 1560px;
  margin: 0 auto;
}
.col-main, .col-side { display: flex; flex-direction: column; gap: 18px; min-width: 0; }

/* ---------- cards ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.card:hover { border-color: var(--border-bright); }
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  gap: 10px;
}
.hint { color: var(--faint); font-size: 11.5px; }

body.dashboard-ready .col-main > .card,
body.dashboard-ready .col-main > .kpis > .card,
body.dashboard-ready .col-main > .charts > .card,
body.dashboard-ready .col-side > .card {
  animation: card-in 0.55s var(--ease) both;
}
body.dashboard-ready .col-main > *:nth-child(1) { animation-delay: 0.04s; }
body.dashboard-ready .col-main > *:nth-child(2) { animation-delay: 0.08s; }
body.dashboard-ready .col-main > *:nth-child(3) { animation-delay: 0.12s; }
body.dashboard-ready .col-main > *:nth-child(4) { animation-delay: 0.16s; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- health strip ---------- */
.health-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
  padding: 14px 18px;
  background: linear-gradient(135deg, rgba(45, 212, 191, 0.06) 0%, var(--card) 40%, rgba(167, 139, 250, 0.05) 100%);
}
.health-item { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.health-label {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  font-weight: 600;
}
.health-value {
  font-size: 15px;
  font-weight: 700;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
.health-actions { align-items: flex-end; justify-content: center; }

/* ---------- goals ---------- */
.goals {
  background:
    linear-gradient(160deg, rgba(45, 212, 191, 0.08) 0%, transparent 42%),
    linear-gradient(220deg, rgba(167, 139, 250, 0.1) 0%, transparent 45%),
    var(--card);
  box-shadow: var(--shadow-glow);
}
.goal-row { margin: 12px 0; }
.goal-row-primary .goal-label span:first-child { color: var(--text); font-weight: 600; }
.goal-label {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
}
.goal-label span:last-child {
  color: var(--text);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12.5px;
}
.bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  border: 1px solid var(--border);
  position: relative;
}
.fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  transition: width 0.8s var(--ease);
  min-width: 3px;
  position: relative;
}
.fill::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
  animation: shimmer 2.5s ease infinite;
}
@keyframes shimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(200%); }
}
.fill.ikas { background: linear-gradient(90deg, #0d9488, var(--ikas)); box-shadow: 0 0 16px rgba(45, 212, 191, 0.35); }
.fill.igra { background: linear-gradient(90deg, #7c3aed, var(--igra)); box-shadow: 0 0 16px rgba(196, 181, 253, 0.3); }
.fill.value { background: linear-gradient(90deg, #0284c7, var(--value)); box-shadow: 0 0 16px rgba(56, 189, 248, 0.35); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 16px 18px;
  position: relative;
  overflow: hidden;
}
.kpi::before {
  content: "";
  position: absolute;
  top: 0; left: 18px; right: 18px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, var(--ikas), var(--igra));
  opacity: 0.7;
}
.kpi:nth-child(2)::before { background: linear-gradient(90deg, var(--igra), #8b5cf6); }
.kpi:nth-child(3)::before { background: linear-gradient(90deg, var(--value), #0ea5e9); }
.kpi:nth-child(4)::before { background: linear-gradient(90deg, var(--good), var(--ikas)); }
.kpi:nth-child(5)::before { background: linear-gradient(90deg, var(--warn), #f59e0b); }
.kpi-label { color: var(--muted); font-size: 11.5px; font-weight: 500; }
.kpi-value {
  font-size: 26px;
  font-weight: 700;
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
.kpi-sub { color: var(--faint); font-size: 11px; }
#kpiIkas { color: var(--ikas); }
#kpiIgra { color: var(--igra); }
.pos { color: var(--good) !important; }
.neg { color: var(--danger) !important; }

/* ---------- charts ---------- */
.charts { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.chart-card.wide { grid-column: span 2; }
.chart-wrap {
  position: relative;
  height: 268px;
  border-radius: var(--radius-sm);
  background: rgba(0, 0, 0, 0.2);
  border: 1px solid rgba(255, 255, 255, 0.04);
  padding: 8px 4px 4px;
}
.chart-wrap.doughnut { height: 268px; display: grid; place-items: center; }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; }
.tab {
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  border-radius: 999px;
  cursor: pointer;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--muted);
  transition: all 0.2s var(--ease);
}
.tab:hover { color: var(--text); border-color: var(--border-bright); }
.tab.active {
  color: var(--text);
  border-color: rgba(56, 189, 248, 0.5);
  background: var(--value-dim);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.12);
}

/* ---------- tables ---------- */
.table-wrap {
  overflow-x: auto;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(255, 255, 255, 0.04);
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 11px 14px; white-space: nowrap; }
th {
  color: var(--faint);
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  position: sticky;
  top: 0;
}
td {
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
  font-family: var(--mono);
  font-size: 12.5px;
  font-weight: 500;
}
tbody tr { transition: background 0.15s; }
tbody tr:hover td { background: rgba(255, 255, 255, 0.025); }
tr:last-child td { border-bottom: none; }
.num { text-align: right; }
.tag {
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  font-family: var(--font);
  letter-spacing: 0.02em;
}
.tag.accumulate { background: var(--igra-dim); color: var(--igra); }
.tag.opportunistic { background: var(--value-dim); color: var(--value); }
.tag.hold_only { background: rgba(100, 116, 139, 0.16); color: var(--muted); }
.tag.value-only { background: rgba(212, 167, 77, 0.16); color: #e8c468; }
.tag.origin-native { background: var(--ikas-dim); color: var(--ikas); }
.tag.origin-hyperlane { background: var(--value-dim); color: var(--value); }
.tag.origin-wrapped { background: rgba(100, 116, 139, 0.16); color: var(--muted); }
.pair-name { font-weight: 650; font-family: var(--font); }
.pair-alias { color: var(--faint); font-weight: 500; font-size: 11px; }
.pair-cell { min-width: 120px; }
.table-section-row td {
  padding: 12px 14px 8px;
  border-bottom: none;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--faint);
  font-family: var(--font);
}
.table-section-row .section-hint {
  float: right;
  font-weight: 500;
  text-transform: none;
  letter-spacing: 0;
  color: var(--muted);
  font-size: 11px;
}
.table-toggle-row td { padding: 8px 14px 12px; border-bottom: none; }
.table-toggle {
  background: rgba(0, 0, 0, 0.2);
  border: 1px dashed var(--border);
  color: var(--muted);
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  width: 100%;
  font-family: var(--font);
  transition: all 0.2s var(--ease);
}
.table-toggle:hover {
  border-color: rgba(56, 189, 248, 0.45);
  color: var(--text);
  background: var(--value-dim);
}
.table-toggle.sm { width: auto; padding: 8px 14px; font-size: 11.5px; }
.pair-row-dormant td { opacity: 0.55; }

/* Scoped — global .hidden breaks Tailwind responsive utilities on the Next.js navbar */
#dashboard-root .hidden { display: none !important; }

.skip-link {
  position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden;
}
.skip-link:focus {
  position: fixed; left: 16px; top: 16px; width: auto; height: auto; z-index: 100;
  padding: 10px 14px; background: var(--card-solid); border: 1px solid var(--value); border-radius: 8px;
}

/* ---------- loading ---------- */
.loading-shell {
  position: fixed; inset: 0; z-index: 50;
  display: grid; place-items: center;
  background: rgba(6, 8, 15, 0.92);
  backdrop-filter: blur(12px);
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.loading-shell.hidden { opacity: 0; visibility: hidden; pointer-events: none; }
.loading-card { text-align: center; color: var(--muted); max-width: 280px; }
.logo-ring {
  display: inline-grid; place-items: center;
  width: 64px; height: 64px; margin-bottom: 16px;
  border-radius: 16px;
  background: linear-gradient(135deg, var(--ikas), var(--igra));
  box-shadow: 0 8px 32px rgba(45, 212, 191, 0.3);
  animation: logo-pulse 1.8s ease infinite;
}
.loading-card .logo {
  font-size: 26px; font-weight: 800; color: #04121a;
  background: none; width: auto; height: auto; box-shadow: none; border-radius: 0;
}
.loading-title { margin: 0 0 6px; font-size: 16px; font-weight: 700; color: var(--text); }
.loading-sub { margin: 0 0 20px; font-size: 13px; }
.loading-bar {
  height: 3px; border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}
.loading-bar span {
  display: block; height: 100%; width: 40%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--ikas), var(--igra));
  animation: load-slide 1.2s ease infinite;
}
@keyframes logo-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.04); }
}
@keyframes load-slide {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

/* ---------- access banner ---------- */
.access-banner {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 10px 28px; font-size: 12.5px; color: var(--muted);
  border-bottom: 1px solid var(--border);
  background: rgba(56, 189, 248, 0.06);
}
.access-banner.public { background: rgba(100, 116, 139, 0.1); }
.access-badge {
  font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em;
  padding: 4px 10px; border-radius: 999px;
  background: var(--value-dim); color: var(--value);
  border: 1px solid rgba(56, 189, 248, 0.25);
}

.pill.strategy { color: var(--igra); border-color: rgba(196, 181, 253, 0.35); background: var(--igra-dim); }
.pill.warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.35); background: var(--warn-dim); }

.viewer-panel-copy { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }

body[data-access="viewer"] #walletCard,
body[data-access="public"] #walletCard { display: none !important; }
body[data-access="owner"] #viewerPanel { display: none !important; }

/* ---------- deposits ---------- */
.deposit-feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.deposit-feed li {
  display: flex; flex-direction: column; gap: 3px;
  padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s;
}
.deposit-feed li:hover { border-color: var(--border-bright); }
.deposit-feed .deposit-main { font-weight: 650; font-size: 13px; font-family: var(--mono); }
.deposit-feed .deposit-meta { font-size: 11px; color: var(--faint); }
.deposit-feed .deposit-in .deposit-main { color: var(--good); }
.deposit-feed .deposit-out .deposit-main { color: var(--warn); }
.deposit-empty { color: var(--faint); font-size: 12.5px; padding: 8px 2px; border: none; background: none; }

@media (prefers-reduced-motion: reduce) {
  .fill, .insight-detail, .insight-chev, .orb, .fill::after,
  .loading-bar span, .logo-ring, body.dashboard-ready .card { animation: none !important; transition: none !important; }
}

.tag.regime-up { background: var(--good-dim); color: var(--good); }
.tag.regime-down { background: var(--danger-dim); color: var(--danger); }
.tag.regime-range { background: var(--value-dim); color: var(--value); }
.tag.regime-dead { background: rgba(100, 116, 139, 0.16); color: var(--muted); }
.badge.ta-active { color: var(--good); border: 1px solid rgba(52, 211, 153, 0.35); background: var(--good-dim); }
.badge.ta-shadow { color: var(--muted); }
.side-buy { color: var(--ikas); font-weight: 600; font-family: var(--font); }
.side-sell { color: var(--igra); font-weight: 600; font-family: var(--font); }

/* ---------- insights ---------- */
.insights-list { display: flex; flex-direction: column; gap: 8px; }
.insight {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: rgba(0, 0, 0, 0.2);
  transition: border-color 0.2s;
}
.insight:hover { border-color: var(--border-bright); }
.insight-head {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; cursor: pointer; user-select: none;
}
.insight-head:hover { background: rgba(255, 255, 255, 0.02); }
.insight .idot { width: 8px; height: 8px; border-radius: 50%; flex: none; }
.insight.good .idot { background: var(--good); box-shadow: 0 0 8px rgba(52, 211, 153, 0.5); }
.insight.warn .idot { background: var(--warn); box-shadow: 0 0 8px rgba(251, 191, 36, 0.4); }
.insight.info .idot { background: var(--info); }
.insight-title { font-size: 13px; font-weight: 550; flex: 1; line-height: 1.4; }
.insight-chev { color: var(--faint); transition: transform 0.2s var(--ease); font-size: 11px; }
.insight.open .insight-chev { transform: rotate(90deg); }
.insight-detail {
  max-height: 0; opacity: 0; padding: 0 14px;
  color: var(--muted); font-size: 12.5px; line-height: 1.65;
  transition: max-height 0.35s var(--ease), opacity 0.25s, padding 0.35s var(--ease);
}
.insight.open .insight-detail { max-height: 360px; opacity: 1; padding: 0 14px 14px; }
.badge {
  display: inline-grid; place-items: center;
  min-width: 20px; height: 20px; padding: 0 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: var(--text);
  font-size: 10px; font-weight: 700;
  font-family: var(--mono);
}

.legend-list { margin: 0; padding-left: 18px; color: var(--muted); font-size: 12.5px; line-height: 1.85; }
.legend-list b { color: var(--text); font-weight: 600; }

.foot {
  padding: 18px 28px 32px;
  color: var(--faint);
  font-size: 11.5px;
  text-align: center;
  border-top: 1px solid rgba(255, 255, 255, 0.04);
  margin-top: 8px;
}

/* ---------- wallet panel ---------- */
.wallet .hidden { display: none; }
.wallet-pickers { display: flex; flex-direction: column; gap: 8px; }
.wallet-pick {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 13px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text); font-size: 13px; font-weight: 600;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.1s, box-shadow 0.2s;
}
.wallet-pick:hover {
  border-color: rgba(196, 181, 253, 0.45);
  box-shadow: 0 4px 20px rgba(167, 139, 250, 0.1);
}
.wallet-pick:active { transform: translateY(1px); }
.wallet-pick:disabled { opacity: 0.55; cursor: default; }
.wallet-pick img { border-radius: 8px; }

.wallet-acct { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.wallet-acct-id { display: flex; align-items: center; gap: 8px; }
.wallet-chip {
  font-family: var(--mono);
  font-size: 11.5px; color: var(--text);
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border);
  border-radius: 8px; padding: 5px 9px;
  cursor: pointer;
  transition: border-color 0.2s;
}
.wallet-chip:hover { border-color: var(--value); }
.wallet-chip.sm { font-size: 10.5px; padding: 3px 7px; }
.wallet-link { background: none; border: none; color: var(--faint); font-size: 12px; cursor: pointer; }
.wallet-link:hover { color: var(--danger); }

.wallet-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 10px 0 4px; }
.wallet-net {
  font-size: 11px; font-weight: 700;
  padding: 4px 10px; border-radius: 999px;
  border: 1px solid var(--border);
  letter-spacing: 0.02em;
}
.wallet-net.ok { color: var(--good); border-color: rgba(52, 211, 153, 0.4); background: var(--good-dim); }
.wallet-net.warn { color: var(--warn); border-color: rgba(251, 191, 36, 0.4); background: var(--warn-dim); }
.wallet-bal { color: var(--muted); font-size: 12px; margin-left: auto; font-family: var(--mono); }
.wallet-bal.sub { display: block; margin: 6px 0 0; font-size: 11px; }
.wallet-mini {
  font-size: 11px; font-weight: 700; cursor: pointer; color: var(--bg);
  background: var(--warn); border: none; border-radius: 8px; padding: 4px 10px;
}

.wallet-sec { margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.wallet-sec h3 {
  margin: 0 0 10px;
  font-size: 10px; color: var(--muted);
  text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700;
}
.wallet-note { margin: 0 0 8px; color: var(--faint); font-size: 11.5px; line-height: 1.55; }
.wallet-bridge-callout {
  margin: 0 0 10px; padding: 11px 12px; border-radius: var(--radius-sm);
  font-size: 11.5px; line-height: 1.55;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
}
.wallet-bridge-callout.warn { border-color: rgba(251, 191, 36, 0.35); background: var(--warn-dim); color: var(--muted); }
.wallet-bridge-callout.info { border-color: rgba(56, 189, 248, 0.3); background: var(--value-dim); color: var(--muted); }
.wallet-bridge-callout a { color: var(--value); text-decoration: none; font-weight: 600; }
.wallet-bridge-callout a:hover { text-decoration: underline; }
.wallet-bridge-callout .mono {
  display: block; margin-top: 6px;
  font-family: var(--mono); font-size: 10.5px;
  color: var(--faint); word-break: break-all;
}
.wallet-form { display: flex; flex-direction: column; gap: 8px; }
.wallet-form input, .wallet-form select {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.35);
  color: var(--text); font-size: 13px; font-family: var(--font);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.wallet-form input:focus, .wallet-form select:focus {
  outline: none;
  border-color: rgba(56, 189, 248, 0.5);
  box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}
.wallet-amt { position: relative; display: flex; align-items: center; }
.wallet-amt input { padding-right: 52px; font-family: var(--mono); }
.wallet-max {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 10px; font-weight: 700; letter-spacing: 0.05em; cursor: pointer;
  color: var(--value); background: var(--value-dim);
  border: none; border-radius: 6px; padding: 5px 8px;
}
.wallet-send {
  padding: 11px; border-radius: var(--radius-sm); border: none; cursor: pointer;
  font-size: 13px; font-weight: 700; color: #04121a;
  background: linear-gradient(135deg, var(--ikas) 0%, #5eead4 50%, var(--igra) 100%);
  box-shadow: 0 4px 20px rgba(45, 212, 191, 0.25);
  transition: filter 0.2s, transform 0.1s;
}
.wallet-send:hover { filter: brightness(1.08); }
.wallet-send:active { transform: translateY(1px); }
.wallet-send:disabled { opacity: 0.55; cursor: default; filter: none; }
.wallet-send.ghost {
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  border: 1px solid var(--border);
  box-shadow: none;
}

.wallet-sig { display: block; margin-top: 8px; }
.wallet-txs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wallet-txs li {
  display: flex; justify-content: space-between; gap: 8px;
  font-size: 12px; color: var(--muted); font-family: var(--mono);
}
.wallet-txs a { color: var(--value); text-decoration: none; }
.wallet-txs a:hover { text-decoration: underline; }

.wallet-status { margin: 10px 0 0; font-size: 12px; color: var(--muted); min-height: 16px; }
.wallet-status.ok { color: var(--good); }
.wallet-status.warn { color: var(--warn); }

/* ---------- IGRA Vault casino ---------- */
.casino.viewer-locked .casino-bet-controls { display: none; }
.casino-brand {
  display: flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.casino-full-link {
  display: inline-block; margin-bottom: 10px; font-size: 12px; color: #49eacb; text-decoration: none;
}
.casino-full-link:hover { text-decoration: underline; }
.casino-logo {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; font-size: 18px;
  background: linear-gradient(135deg, #0d4d3a 0%, #1a7a5c 100%);
  border: 1px solid rgba(73, 234, 203, 0.35);
  color: #49eacb;
}
.casino-tag { display: block; font-size: 11px; color: var(--faint); margin-top: 2px; }
.casino-stats {
  display: flex; gap: 12px; font-size: 11px; color: var(--muted); margin-bottom: 10px;
  font-family: var(--mono);
}
.casino-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.casino-tab {
  padding: 6px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(0,0,0,0.25); color: var(--muted); font-size: 11px; font-weight: 700; cursor: pointer;
}
.casino-tab.active {
  border-color: rgba(73, 234, 203, 0.45); background: rgba(13, 77, 58, 0.55); color: #49eacb;
}
.casino-table.felt {
  border-radius: var(--radius-sm);
  padding: 14px;
  background:
    radial-gradient(ellipse at 50% 0%, rgba(73, 234, 203, 0.08), transparent 55%),
    linear-gradient(180deg, #0b3d2e 0%, #062a20 100%);
  border: 1px solid rgba(73, 234, 203, 0.2);
  min-height: 120px;
}
.casino-table.poker { min-height: 140px; }
.hand { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; min-height: 52px; }
.casino-card {
  width: 42px; height: 58px; border-radius: 6px;
  background: linear-gradient(180deg, #fff 0%, #e8e8e8 100%);
  border: 1px solid #ccc;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  font-family: var(--mono); font-weight: 700; color: #111;
  box-shadow: 0 2px 6px rgba(0,0,0,0.35);
}
.casino-card.red { color: #c0392b; }
.casino-card.hidden-card { background: linear-gradient(135deg, #1e3a5f, #0f172a); color: #49eacb; border-color: #334155; }
.zone-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.45); }
.dealer-zone, .player-zone { margin-bottom: 10px; }
.casino-actions, .holdem-actions, .baccarat-bets {
  display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px;
}
.casino-actions button, .holdem-actions button, .baccarat-bets button {
  padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(0,0,0,0.35); color: var(--text); font-size: 12px; font-weight: 700; cursor: pointer;
}
.casino-actions button:first-child, .baccarat-bets button {
  background: linear-gradient(135deg, #49eacb 0%, #2dd4bf 100%); color: #04121a; border: none;
}
.casino-bet-controls { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.casino-bet-controls label { font-size: 10px; color: var(--faint); text-transform: uppercase; }
.casino-bet-controls input {
  padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(0,0,0,0.35); color: var(--text);
}
.casino-bet-quick { display: flex; gap: 6px; }
.casino-bet-quick button {
  flex: 1; padding: 6px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(0,0,0,0.25); color: var(--muted); cursor: pointer; font-size: 11px;
}
.casino-live-rooms, .casino-recent { margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }
.casino-live-rooms h3, .casino-recent h3 {
  margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--faint);
}
.casino-room-list, .casino-recent ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.casino-room-btn {
  width: 100%; text-align: left; padding: 8px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0,0,0,0.22); color: var(--muted);
  font-size: 11px; cursor: pointer; font-family: var(--mono);
}
.casino-room-btn:hover { border-color: rgba(73, 234, 203, 0.35); color: #49eacb; }
.casino-recent li { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.casino-recent .status.won { color: var(--good); }
.casino-recent .status.lost { color: var(--danger); }
.casino-result, .casino-status, .casino-viewer-note {
  margin: 8px 0 0; font-size: 12px; color: var(--muted); line-height: 1.5;
}
.baccarat-zones { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.capital-intro { margin: 0 0 10px; font-size: 12px; color: var(--muted); line-height: 1.5; }
.capital-form { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.capital-form select, .capital-form input {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: rgba(0,0,0,0.35); color: var(--text); font-size: 13px;
}
.capital-btn {
  padding: 10px; border: none; border-radius: var(--radius-sm); cursor: pointer;
  font-weight: 700; font-size: 12px; color: #04121a;
  background: linear-gradient(135deg, var(--ikas), #5eead4);
}
.capital-quote { margin-top: 8px; }
.capital-rec { margin: 0 0 8px; font-size: 12px; color: var(--value); }
.capital-routes { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.capital-route {
  padding: 8px 10px; border-radius: var(--radius-sm); border: 1px solid var(--border);
  background: rgba(0,0,0,0.2); display: flex; flex-direction: column; gap: 3px;
}
.capital-route.best { border-color: rgba(45, 212, 191, 0.45); background: var(--good-dim); }
.capital-route-name { font-size: 12px; font-weight: 700; color: var(--text); }
.capital-route-meta { font-size: 11px; color: var(--muted); font-family: var(--mono); }
.capital-route-follow { font-size: 10.5px; color: var(--faint); }
.capital-note, .capital-empty { font-size: 11px; color: var(--faint); line-height: 1.5; margin: 8px 0 0; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .layout { grid-template-columns: 1fr; padding: 18px 20px 8px; }
  .topbar { padding: 14px 20px; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .charts { grid-template-columns: 1fr; }
  .chart-card.wide { grid-column: span 1; }
  .health-strip { grid-template-columns: repeat(2, 1fr); }
  .health-actions { grid-column: span 2; }
}
@media (max-width: 560px) {
  .topbar { flex-direction: column; align-items: flex-start; }
  .status { justify-content: flex-start; }
  .kpis { grid-template-columns: 1fr; }
  .kpi-value { font-size: 22px; }
  .orb { opacity: 0.3; }
}
