/* ═══════════════════════════════════════════════════════════════════
   LIVE vs PAPER Visual Separation Tokens
   ─────────────────────────────────────────────────────────────────
   Phase 6 of the Chimera UX Overhaul.
   • LIVE accent: success-neon cyan-green
   • PAPER accent: amber
   • ctx-chip system for unambiguous surface labelling
   ═══════════════════════════════════════════════════════════════════ */

:root {
    /* ── LIVE / PAPER accent tokens ────────────────────────────────── */
    --live-accent: #00e68a;
    --live-accent-dim: rgba(0, 230, 138, 0.55);
    --live-bg-tint: rgba(0, 230, 138, 0.06);
    --live-border-tint: rgba(0, 230, 138, 0.18);
    --live-glow: rgba(0, 230, 138, 0.25);

    --paper-accent: #f5a623;
    --paper-accent-dim: rgba(245, 166, 35, 0.55);
    --paper-bg-tint: rgba(245, 166, 35, 0.06);
    --paper-border-tint: rgba(245, 166, 35, 0.18);
    --paper-glow: rgba(245, 166, 35, 0.25);
}

/* ── Context Chips (LIVE · WALLET · PAPER) ────────────────────────── */
.ctx-chip {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 1px 7px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', 'Fira Code', monospace;
    line-height: 1.6;
    white-space: nowrap;
    user-select: none;
    transition: all 0.2s ease;
}

.ctx-chip--live,
.ctx-chip--wallet {
    color: var(--live-accent);
    background: var(--live-bg-tint);
    border: 1px solid var(--live-border-tint);
    box-shadow: 0 0 6px var(--live-glow);
}

.ctx-chip--live::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--live-accent);
    box-shadow: 0 0 4px var(--live-accent);
    animation: ctx-chip-pulse 2s ease-in-out infinite;
}

.ctx-chip--wallet::before {
    content: '◆';
    font-size: 6px;
    color: var(--live-accent);
}

.ctx-chip--paper {
    color: var(--paper-accent);
    background: var(--paper-bg-tint);
    border: 1px solid var(--paper-border-tint);
    box-shadow: 0 0 6px var(--paper-glow);
}

.ctx-chip--paper::before {
    content: '';
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--paper-accent);
    opacity: 0.7;
}

@keyframes ctx-chip-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.45; }
}

/* ── Surface Tints ────────────────────────────────────────────────── */
.surface--live {
    background: var(--live-bg-tint) !important;
    border-left: 2px solid var(--live-accent) !important;
}

.surface--paper {
    background: var(--paper-bg-tint) !important;
    border-left: 2px solid var(--paper-accent) !important;
}

/* ── Wallet Header Card ────────────────────────────────────────────── */
.wallet-header-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 12px;
    border-radius: 8px;
    background: linear-gradient(135deg, rgba(0, 230, 138, 0.08) 0%, rgba(0, 212, 255, 0.04) 100%);
    border: 1px solid var(--live-border-tint);
    margin-bottom: 8px;
}

.wallet-header-card .wallet-addr-row {
    display: flex;
    align-items: center;
    gap: 8px;
    justify-content: space-between;
}

.wallet-header-card .wallet-addr {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    color: var(--text-primary);
    cursor: pointer;
    transition: color 0.15s ease;
}

.wallet-header-card .wallet-addr:hover {
    color: var(--live-accent);
}

.wallet-header-card .chain-pill {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 9px;
    font-weight: 600;
    background: rgba(0, 212, 255, 0.12);
    color: var(--primary-neon, #00d4ff);
    border: 1px solid rgba(0, 212, 255, 0.2);
}

.wallet-header-card .wallet-equity-row {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.wallet-header-card .wallet-equity {
    font-size: 20px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.wallet-header-card .wallet-delta {
    font-size: 11px;
    font-weight: 600;
    font-family: 'JetBrains Mono', monospace;
}

.wallet-header-card .wallet-delta.up {
    color: var(--live-accent);
}

.wallet-header-card .wallet-delta.down {
    color: var(--error-neon, #ff3b5c);
}

.wallet-header-card .wallet-delta-fresh {
    color: var(--live-accent);
}

.wallet-header-card .wallet-delta-lagging {
    color: var(--warning-neon, #facc15);
}

.wallet-header-card .wallet-delta-stale {
    color: var(--error-neon, #ff3b5c);
}

/* ── Balances List ────────────────────────────────────────────────── */
.balances-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin-top: 6px;
}

.wallet-token-summary {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    margin-bottom: 8px;
}

.wallet-token-summary > div {
    min-width: 0;
    padding: 6px 7px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.wallet-token-summary span {
    display: block;
    font-size: 8px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.wallet-token-summary strong {
    display: block;
    margin-top: 2px;
    color: var(--text-primary);
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-token-toolbar {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 4px;
    margin-bottom: 6px;
}

.wallet-token-filter {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    min-height: 24px;
    padding: 3px 4px;
    border-radius: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-muted);
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
}

.wallet-token-filter span {
    color: var(--text-dim);
    font-family: 'JetBrains Mono', monospace;
    font-size: 8px;
}

.wallet-token-filter.active {
    color: var(--live-accent);
    background: rgba(0, 230, 138, 0.10);
    border-color: rgba(0, 230, 138, 0.28);
}

.wallet-token-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    max-height: 248px;
    overflow-y: auto;
    padding-right: 2px;
}

.balance-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 6px 8px;
    border-radius: 6px;
    transition: background 0.15s ease;
    cursor: default;
}

.balance-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.balance-row .token-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1 1 auto;
    min-width: 0;
}

.balance-row .token-icon {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--live-accent), var(--primary-neon, #00d4ff));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 9px;
    font-weight: 700;
    color: #000;
}

.balance-row .token-symbol {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.balance-row .token-name-block {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.balance-row .token-route-chip {
    width: fit-content;
    max-width: 92px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-dim);
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.balance-row .token-route-chip.is-tradable {
    color: var(--live-accent);
    background: rgba(0, 230, 138, 0.10);
    border-color: rgba(0, 230, 138, 0.22);
}

.balance-row .token-chip-row {
    display: flex;
    align-items: center;
    gap: 3px;
    max-width: 118px;
    min-width: 0;
}

.balance-row .token-chain-chip {
    width: fit-content;
    max-width: 58px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    padding: 1px 5px;
    border-radius: 4px;
    font-size: 7px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-family: 'JetBrains Mono', monospace;
    color: var(--primary-neon, #00d4ff);
    background: rgba(0, 212, 255, 0.08);
    border: 1px solid rgba(0, 212, 255, 0.18);
}

.balance-row .token-values {
    text-align: right;
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 0 0 74px;
    min-width: 0;
}

.balance-row .token-qty {
    font-size: 11px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.balance-row .token-usd {
    font-size: 9px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-muted);
}

.balance-row .token-price {
    font-size: 8px;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-dim);
}

.balance-row .token-price-fresh {
    color: rgba(0, 230, 138, 0.8);
}

.balance-row .token-price-lagging {
    color: var(--warning-neon, #facc15);
}

.balance-row .token-price-stale {
    color: var(--error-neon, #ff3b5c);
}

.balance-row .token-action {
    flex: 0 0 46px;
    display: flex;
    justify-content: flex-end;
}

.token-trade-btn {
    min-height: 22px;
    padding: 2px 7px;
    border-radius: 5px;
    border: 1px solid rgba(0, 230, 138, 0.35);
    background: rgba(0, 230, 138, 0.12);
    color: var(--live-accent);
    font-size: 8px;
    font-weight: 800;
    cursor: pointer;
}

.token-trade-btn:hover {
    background: rgba(0, 230, 138, 0.22);
}

.token-route-note {
    max-width: 46px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: var(--text-dim);
    font-size: 8px;
}

.wallet-token-footnote,
.wallet-empty-mini {
    padding: 6px 2px 0;
    color: var(--text-dim);
    font-size: 8px;
    line-height: 1.35;
}

.wallet-empty-mini {
    text-align: center;
}

.wallet-empty-mini span {
    display: block;
    margin-top: 3px;
    color: var(--warning-neon, #facc15);
}

.wallet-market-freshness {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    min-height: 22px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.14);
    background: rgba(0, 0, 0, 0.2);
    color: var(--text-muted);
    font-size: 8px;
    text-transform: uppercase;
}

.wallet-market-freshness strong {
    color: var(--text-primary);
    font-size: 9px;
}

.wallet-market-freshness em {
    color: var(--live-accent);
    font-style: normal;
}

.wallet-market-freshness.fresh {
    border-color: rgba(0, 230, 138, 0.28);
}

.wallet-market-freshness.lagging {
    border-color: rgba(250, 204, 21, 0.3);
}

.wallet-market-freshness.stale {
    border-color: rgba(255, 59, 92, 0.3);
}

.wallet-parity-strip,
.wallet-panel-tabs {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
}

.wallet-parity-strip {
    justify-content: space-between;
    min-height: 22px;
    padding: 4px 6px;
    border-radius: 6px;
    border: 1px solid rgba(0, 212, 255, 0.14);
    background: rgba(0, 0, 0, 0.18);
    color: var(--text-muted);
    font-size: 8px;
    text-transform: uppercase;
}

.wallet-parity-strip strong {
    color: var(--text-primary);
    font-size: 9px;
}

.wallet-parity-strip em {
    color: var(--live-accent);
    font-style: normal;
}

.wallet-parity-strip.high {
    border-color: rgba(0, 230, 138, 0.26);
}

.wallet-parity-strip.partial {
    border-color: rgba(250, 204, 21, 0.3);
}

.wallet-parity-strip.limited {
    border-color: rgba(255, 59, 92, 0.3);
}

.wallet-panel-tabs {
    padding: 2px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
}

.wallet-panel-tab {
    flex: 1;
    min-height: 22px;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--text-dim);
    font-size: 8px;
    font-weight: 800;
    text-transform: uppercase;
    cursor: pointer;
}

.wallet-panel-tab.active {
    color: var(--live-accent);
    background: rgba(0, 230, 138, 0.1);
}

.wallet-agent-notes {
    margin-top: 6px;
    padding: 6px 7px;
    border-radius: 6px;
    background: rgba(0, 212, 255, 0.045);
    border: 1px solid rgba(0, 212, 255, 0.12);
}

.wallet-agent-notes > span {
    display: block;
    margin-bottom: 3px;
    color: var(--primary-neon, #00d4ff);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.wallet-agent-notes p {
    margin: 0 0 3px;
    color: var(--text-muted);
    font-size: 8px;
    line-height: 1.35;
}

.wallet-agent-notes p:last-child {
    margin-bottom: 0;
}

.truth-cockpit-strip {
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 6px;
    padding: 8px 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    background: rgba(2, 8, 14, 0.88);
}

.truth-cockpit-strip span {
    min-width: 0;
    padding: 6px 7px;
    border: 1px solid rgba(125, 239, 255, 0.13);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.25;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.truth-cockpit-strip b {
    color: var(--text-dim);
    font-size: 8px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.truth-cockpit-strip.ready span {
    border-color: rgba(0, 230, 138, 0.24);
}

.truth-cockpit-strip.degraded span,
.truth-cockpit-strip.loading span {
    border-color: rgba(245, 166, 35, 0.24);
}

@media (max-width: 1100px) {
    .truth-cockpit-strip {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

.wallet-live-cockpit-strip {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    margin-top: 8px;
}

.wallet-live-cockpit-strip span {
    min-width: 0;
    padding: 4px 5px;
    border: 1px solid rgba(255, 255, 255, 0.09);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.22);
    color: var(--text-dim);
    font-size: 8px;
    font-weight: 700;
    line-height: 1.2;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-live-cockpit-strip.ready span {
    border-color: rgba(0, 230, 138, 0.22);
}

.wallet-curation-panel {
    margin-bottom: 8px;
    padding: 8px;
    border: 1px solid rgba(0, 212, 255, 0.14);
    border-radius: 6px;
    background: rgba(0, 212, 255, 0.035);
}

.wallet-curation-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
}

.wallet-curation-grid div {
    padding: 5px;
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.2);
}

.wallet-curation-grid span,
.wallet-curation-moves span,
.wallet-curation-foot {
    color: var(--text-dim);
    font-size: 8px;
    line-height: 1.25;
}

.wallet-curation-grid strong {
    display: block;
    margin-top: 2px;
    color: var(--text-primary);
    font-size: 10px;
}

.wallet-curation-moves {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.wallet-curation-moves span {
    padding: 3px 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.18);
}

.wallet-curation-foot {
    margin-top: 6px;
}

.wallet-signals-panel {
    margin-top: 10px;
    padding: 9px;
    border: 1px solid rgba(0, 212, 255, 0.16);
    background: rgba(0, 10, 18, 0.38);
    border-radius: 6px;
}

.wallet-signals-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    margin-bottom: 8px;
}

.wallet-signals-title span {
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
}

.wallet-signals-title small {
    color: var(--text-dim);
    font-size: 9px;
    text-transform: uppercase;
}

.wallet-signal-card {
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.035);
    border-radius: 6px;
    margin-bottom: 7px;
    overflow: visible;
}

.wallet-signal-card.ready {
    border-color: rgba(0, 230, 138, 0.26);
    background: rgba(0, 230, 138, 0.055);
}

.wallet-signal-card.executable {
    border-color: rgba(0, 230, 138, 0.3);
    background: rgba(0, 230, 138, 0.06);
}

.wallet-signal-card.blocked {
    border-color: rgba(255, 170, 0, 0.18);
}

.wallet-signal-card.review_only {
    border-color: rgba(0, 212, 255, 0.2);
    background: rgba(0, 212, 255, 0.035);
}

.wallet-signal-card.watch {
    border-color: rgba(0, 212, 255, 0.22);
    background: rgba(0, 212, 255, 0.045);
}

.wallet-signal-card.micro {
    border-color: rgba(168, 85, 247, 0.22);
    background: rgba(168, 85, 247, 0.045);
}

.wallet-signal-card.hygiene {
    border-color: rgba(148, 163, 184, 0.18);
    background: rgba(148, 163, 184, 0.035);
}

.wallet-signal-main,
.wallet-signal-move,
.wallet-signal-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.wallet-signal-main strong {
    display: block;
    font-size: 12px;
    color: var(--text-primary);
}

.wallet-signal-main span,
.wallet-signal-chain,
.wallet-signal-move span,
.wallet-signal-blockers,
.wallet-signal-meta,
.wallet-signal-coverage,
.wallet-signal-empty,
.wallet-signal-disclaimer {
    color: var(--text-dim);
    font-size: 9px;
    line-height: 1.35;
}

.wallet-signal-value {
    color: var(--text-primary);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.wallet-signal-chain {
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-signal-chart-row {
    display: grid;
    grid-template-columns: minmax(74px, 1fr) auto;
    gap: 8px;
    align-items: center;
    margin-top: 7px;
}

.wallet-signal-sparkline {
    width: 100%;
    min-width: 74px;
    height: 34px;
    color: #00e68a;
    background: rgba(0, 0, 0, 0.22);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
}

.wallet-signal-sparkline.negative {
    color: #ff3b5c;
}

.wallet-signal-sparkline.muted {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-dim);
    font-size: 8px;
    text-transform: uppercase;
    line-height: 1.2;
    padding: 0 6px;
}

.wallet-signal-chart-metrics,
.wallet-signal-chips,
.wallet-signal-status-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    justify-content: flex-end;
}

.wallet-signal-chart-metrics span,
.wallet-signal-chips span,
.wallet-signal-status-strip span {
    color: var(--text-dim);
    font-size: 8px;
    line-height: 1.2;
    padding: 2px 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
}

.wallet-signal-priority {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 6px;
    color: var(--text-dim);
    font-size: 9px;
    line-height: 1.35;
    min-width: 0;
}

.wallet-signal-priority span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wallet-signal-status-strip {
    justify-content: flex-start;
    margin-top: 5px;
}

.wallet-signal-status-strip span:first-child {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-signal-freshness.fresh {
    color: var(--live-accent);
    border-color: rgba(0, 230, 138, 0.25);
}

.wallet-signal-freshness.lagging {
    color: var(--warning-neon, #facc15);
    border-color: rgba(250, 204, 21, 0.25);
}

.wallet-signal-freshness.stale {
    color: var(--error-neon, #ff3b5c);
    border-color: rgba(255, 59, 92, 0.25);
}

.wallet-signal-move {
    margin-top: 6px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.wallet-signal-move span {
    padding: 2px 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
}

.wallet-signal-blockers {
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-signal-meta,
.wallet-signal-coverage {
    margin-top: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-signal-details {
    margin-top: 5px;
    color: var(--text-dim);
    font-size: 9px;
    line-height: 1.35;
}

.wallet-signal-details summary {
    cursor: pointer;
    color: #00d4ff;
    list-style: none;
    width: max-content;
}

.wallet-signal-details summary::-webkit-details-marker {
    display: none;
}

.wallet-signal-details div {
    display: grid;
    gap: 2px;
    margin-top: 4px;
}

.wallet-signal-details span {
    color: var(--text-dim);
    overflow-wrap: anywhere;
}

.wallet-signal-card-slim,
.wallet-signal-card-row {
    padding: 7px 8px;
}

.wallet-signal-card-slim .wallet-signal-main span,
.wallet-signal-card-row .wallet-signal-main span {
    display: block;
    max-width: 190px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-signal-compact-row {
    display: grid;
    grid-template-columns: 70px minmax(0, 1fr);
    gap: 7px;
    align-items: center;
    margin-top: 6px;
}

.wallet-signal-compact-row .wallet-signal-sparkline {
    min-width: 0;
    height: 28px;
}

.wallet-signal-compact-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-top: 6px;
}

.wallet-signal-compact-row .wallet-signal-compact-metrics {
    margin-top: 0;
}

.wallet-signal-compact-metrics span {
    color: var(--text-dim);
    font-size: 8px;
    line-height: 1.2;
    padding: 2px 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.2);
    text-transform: uppercase;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wallet-signal-source {
    color: #00d4ff;
    text-decoration: none;
    margin-left: 4px;
}

.wallet-signal-actions {
    justify-content: flex-end;
    margin-top: 7px;
    flex-wrap: wrap;
    row-gap: 5px;
}

.wallet-signal-btn {
    flex: 0 1 auto;
    min-width: 0;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-primary);
    border-radius: 5px;
    padding: 4px 7px;
    font-size: 9px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}

.wallet-signal-btn.primary {
    border-color: rgba(0, 230, 138, 0.3);
    color: #00e68a;
}

.wallet-signal-btn.secondary {
    border-color: rgba(255, 255, 255, 0.08);
    background: rgba(255, 255, 255, 0.025);
    color: var(--text-dim);
}

.wallet-signal-btn.prepare {
    border-color: rgba(0, 212, 255, 0.24);
    color: #00d4ff;
}

.wallet-signal-btn:disabled,
.wallet-signal-btn[aria-disabled="true"],
.wallet-signal-btn-blocked {
    opacity: 0.45;
    cursor: not-allowed;
}

.wallet-signal-action-state {
    margin-top: 7px;
    padding: 6px 7px;
    border: 1px solid rgba(0, 212, 255, 0.16);
    border-radius: 5px;
    background: rgba(0, 212, 255, 0.055);
    color: var(--text-secondary);
    font-size: 9px;
    line-height: 1.35;
}

.wallet-signal-action-state.success {
    border-color: rgba(0, 230, 138, 0.22);
    background: rgba(0, 230, 138, 0.07);
    color: #00e68a;
}

.wallet-signal-action-state.warning {
    border-color: rgba(255, 170, 0, 0.24);
    background: rgba(255, 170, 0, 0.06);
    color: #ffaa00;
}

.wallet-signal-action-state.error {
    border-color: rgba(255, 59, 92, 0.24);
    background: rgba(255, 59, 92, 0.065);
    color: #ff6b8a;
}

.wallet-signal-disclaimer {
    margin-top: 4px;
}

.wallet-trade-passport {
    margin-top: 7px;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.18);
}

.wallet-trade-passport summary {
    color: var(--primary-neon, #00d4ff);
    font-size: 9px;
    font-weight: 800;
    cursor: pointer;
    text-transform: uppercase;
}

.wallet-trade-passport div {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 6px;
    margin-top: 5px;
    align-items: start;
}

.wallet-audit-row {
    display: grid;
    grid-template-columns: 64px 44px minmax(0, 1fr);
    gap: 6px;
    margin-top: 5px;
    align-items: start;
}

.wallet-trade-passport span,
.wallet-audit-row span {
    color: var(--text-dim);
    font-size: 8px;
    text-transform: uppercase;
}

.wallet-trade-passport strong,
.wallet-audit-row strong,
.wallet-audit-row em {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 8px;
    line-height: 1.3;
    font-style: normal;
    overflow-wrap: anywhere;
}

.wallet-audit-feed {
    margin-top: 8px;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.2);
}

.wallet-audit-feed p {
    margin: 0;
    color: var(--text-dim);
    font-size: 9px;
    line-height: 1.35;
}

.options-confidence-strip {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 4px 8px;
    margin-top: 7px;
    padding: 6px;
    border: 1px solid rgba(0, 230, 138, 0.18);
    border-radius: 5px;
    background: rgba(0, 230, 138, 0.045);
}

.options-confidence-strip span,
.options-confidence-strip em,
.options-ta-playbook span {
    color: var(--text-dim);
    font-size: 8px;
    font-style: normal;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.options-confidence-strip strong {
    color: #00e68a;
    font-size: 12px;
    line-height: 1.2;
}

.options-confidence-strip em {
    grid-column: 1 / -1;
    text-transform: none;
}

.options-ta-playbook {
    display: grid;
    gap: 5px;
    margin-top: 7px;
}

.options-ta-playbook div {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 6px;
    padding: 5px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 5px;
    background: rgba(0, 0, 0, 0.18);
}

.options-ta-playbook strong {
    min-width: 0;
    color: var(--text-secondary);
    font-size: 8px;
    font-weight: 600;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.right-panel-execution-cockpit {
    display: grid;
    gap: 8px;
    margin-top: 8px;
}

.right-panel-passport-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 6px;
}

.right-panel-passport-head div,
.right-panel-passport-proof {
    display: grid;
    gap: 2px;
    padding: 8px;
    border: 1px solid rgba(0, 229, 255, 0.18);
    border-radius: 6px;
    background: rgba(0, 18, 24, 0.52);
}

.right-panel-passport-head span,
.right-panel-passport-proof span {
    color: var(--text-dim);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.right-panel-passport-head strong,
.right-panel-passport-proof strong {
    min-width: 0;
    color: var(--text-primary);
    font-size: 11px;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.right-panel-execution-cockpit.stage-live_submit .right-panel-passport-head div,
.right-panel-execution-cockpit.stage-live_preview .right-panel-passport-head div {
    border-color: rgba(0, 230, 138, 0.34);
}

.right-panel-execution-cockpit.stage-paper .right-panel-passport-head div {
    border-color: rgba(255, 184, 77, 0.34);
}

.right-panel-exec-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
}

.right-panel-exec-grid div,
.right-panel-deep-memo div {
    display: grid;
    gap: 2px;
    padding: 7px;
    border: 1px solid rgba(0, 229, 255, 0.14);
    border-radius: 6px;
    background: rgba(0, 12, 18, 0.34);
}

.right-panel-exec-grid span,
.right-panel-deep-memo span {
    color: var(--text-dim);
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.right-panel-exec-grid strong,
.right-panel-deep-memo strong {
    min-width: 0;
    color: var(--text-primary);
    font-size: 10px;
    font-weight: 700;
    line-height: 1.35;
    overflow-wrap: anywhere;
}

.right-panel-evidence-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.right-panel-evidence-strip span {
    max-width: 100%;
    padding: 3px 6px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.right-panel-evidence-strip span.ok {
    border-color: rgba(0, 230, 138, 0.28);
    color: #9ff7c7;
}

.right-panel-evidence-strip span.blocked {
    border-color: rgba(255, 184, 77, 0.28);
    color: #ffd08a;
}

.beta-preflight-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 8px 0;
}

.beta-preflight-pill {
    padding: 3px 7px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 999px;
    color: var(--text-secondary);
    font-size: 9px;
    font-weight: 800;
    line-height: 1.25;
    text-transform: uppercase;
}

.beta-preflight-pill.ready {
    border-color: rgba(0, 230, 138, 0.3);
    color: #9ff7c7;
}

.beta-preflight-pill.blocked {
    border-color: rgba(255, 184, 77, 0.3);
    color: #ffd08a;
}

.beta-proof-ledger-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    margin: 8px 0 10px;
}

.beta-proof-ledger-card {
    min-width: 0;
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.025);
}

.beta-proof-ledger-card.allowed {
    border-color: rgba(0, 230, 138, 0.24);
}

.beta-proof-ledger-card.blocked {
    border-color: rgba(255, 184, 77, 0.24);
}

.beta-proof-ledger-card strong,
.beta-proof-ledger-card span,
.beta-proof-ledger-card em,
.beta-proof-ledger-card small {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.beta-proof-ledger-card strong {
    color: var(--text-secondary);
    font-size: 9px;
    letter-spacing: 0;
    text-transform: uppercase;
}

.beta-proof-ledger-card span {
    margin-top: 4px;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 800;
}

.beta-proof-ledger-card em,
.beta-proof-ledger-card small {
    margin-top: 3px;
    color: var(--text-dim);
    font-size: 9px;
    font-style: normal;
    line-height: 1.25;
}

@media (max-width: 860px) {
    .beta-proof-ledger-grid {
        grid-template-columns: 1fr;
    }
}

.right-panel-deep-memo {
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 7px;
    background: rgba(255, 255, 255, 0.025);
}

.right-panel-deep-memo summary {
    cursor: pointer;
    color: var(--primary-neon);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    margin-bottom: 7px;
}

.wallet-live-preview-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(0, 0, 0, 0.62);
}

.wallet-live-preview-modal.open {
    display: flex;
}

.wallet-live-preview-card {
    width: min(560px, 96vw);
    max-height: min(720px, 88vh);
    overflow: auto;
    padding: 14px;
    border: 1px solid rgba(0, 212, 255, 0.22);
    border-radius: 8px;
    background: rgba(5, 12, 20, 0.98);
    box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.wallet-live-preview-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
}

.wallet-live-preview-head span,
.wallet-live-preview-confirm label,
.wallet-live-preview-section span {
    display: block;
    color: var(--text-dim);
    font-size: 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.wallet-live-preview-head strong {
    color: var(--text-primary);
    font-size: 16px;
}

.wallet-live-preview-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
}

.wallet-live-preview-grid div,
.wallet-live-preview-section,
.wallet-live-preview-warning,
.wallet-live-preview-required {
    padding: 8px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.035);
}

.wallet-live-preview-grid strong {
    display: block;
    margin-top: 3px;
    color: var(--text-primary);
    font-size: 11px;
}

.wallet-live-preview-section,
.wallet-live-preview-warning,
.wallet-live-preview-required,
.wallet-live-preview-confirm {
    margin-top: 8px;
}

.wallet-live-preview-section p,
.wallet-live-preview-warning,
.wallet-live-preview-required {
    color: var(--text-secondary);
    font-size: 10px;
    line-height: 1.4;
}

.wallet-live-preview-warning {
    border-color: rgba(255, 170, 0, 0.22);
    color: #ffaa00;
}

.wallet-live-preview-required strong {
    color: #00e68a;
}

.wallet-live-preview-confirm {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px;
    align-items: end;
}

.wallet-live-preview-confirm label {
    grid-column: 1 / -1;
}

/* ── Live Trades List ──────────────────────────────────────────────── */
.live-trade-row {
    display: grid;
    grid-template-columns: 1fr auto auto auto;
    gap: 6px;
    align-items: center;
    padding: 5px 8px;
    border-radius: 5px;
    font-size: 10px;
    font-family: 'JetBrains Mono', monospace;
    transition: background 0.15s ease;
}

.live-trade-row:hover {
    background: rgba(255, 255, 255, 0.03);
}

.live-trade-row .trade-pair {
    font-weight: 600;
    color: var(--text-primary);
}

.live-trade-row .side-chip {
    padding: 1px 5px;
    border-radius: 3px;
    font-size: 8px;
    font-weight: 700;
    letter-spacing: 0.05em;
}

.live-trade-row .side-chip.buy {
    color: var(--live-accent);
    background: rgba(0, 230, 138, 0.12);
}

.live-trade-row .side-chip.sell {
    color: var(--error-neon, #ff3b5c);
    background: rgba(255, 59, 92, 0.12);
}

.live-trade-row .trade-pnl {
    font-weight: 600;
}

.live-trade-row .trade-pnl.positive { color: var(--live-accent); }
.live-trade-row .trade-pnl.negative { color: var(--error-neon, #ff3b5c); }

/* ── Connect Wallet Hero (Empty State) ─────────────────────────────── */
.connect-wallet-hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 32px 20px;
    text-align: center;
    border-radius: 10px;
    background: linear-gradient(160deg, rgba(0, 230, 138, 0.04) 0%, rgba(0, 212, 255, 0.03) 50%, rgba(168, 85, 247, 0.03) 100%);
    border: 1px dashed rgba(0, 230, 138, 0.15);
    margin: 8px 0;
}

.connect-wallet-hero .hero-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, rgba(0, 230, 138, 0.15), rgba(0, 212, 255, 0.1));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--live-accent);
}

.connect-wallet-hero .hero-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.connect-wallet-hero .hero-desc {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.4;
    max-width: 240px;
}

.connect-wallet-hero .hero-btn {
    padding: 8px 24px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--live-accent), var(--primary-neon, #00d4ff));
    color: #000;
    font-size: 12px;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
}

.connect-wallet-hero .hero-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 16px var(--live-glow);
}

/* ── Portfolio Dashboard Hero Strip ────────────────────────────────── */
.portfolio-hero-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 10px;
    padding: 14px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(0, 230, 138, 0.06) 0%, rgba(0, 212, 255, 0.03) 100%);
    border: 1px solid var(--live-border-tint);
    margin-bottom: 14px;
}

.portfolio-hero-strip .hero-metric {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.portfolio-hero-strip .hero-metric-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 500;
}

.portfolio-hero-strip .hero-metric-value {
    font-size: 16px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.portfolio-hero-strip .hero-metric-value.small {
    font-size: 13px;
}

/* ── Donut Chart Container ─────────────────────────────────────────── */
.composition-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 14px;
}

.donut-container {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px;
    min-height: 140px;
}

.composition-table {
    font-size: 10px;
    width: 100%;
    border-collapse: collapse;
}

.composition-table th {
    text-align: left;
    font-size: 9px;
    color: var(--text-dim);
    padding: 4px 6px;
    border-bottom: 1px solid var(--border-color, rgba(255,255,255,0.08));
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.composition-table td {
    padding: 4px 6px;
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

.composition-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ── KPI Grid ──────────────────────────────────────────────────────── */
.kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 8px;
    margin-bottom: 14px;
}

.kpi-card {
    display: flex;
    flex-direction: column;
    gap: 3px;
    padding: 10px;
    border-radius: 8px;
    background: var(--bg-card, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.kpi-card .kpi-label {
    font-size: 9px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kpi-card .kpi-value {
    font-size: 14px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--text-primary);
}

.kpi-card .kpi-value.positive { color: var(--live-accent); }
.kpi-card .kpi-value.negative { color: var(--error-neon, #ff3b5c); }
.kpi-card .kpi-value.warning { color: var(--paper-accent); }

.kpi-card .kpi-sub {
    font-size: 8px;
    color: var(--text-dim);
    font-style: italic;
}

/* ── Risk Meter Bar ────────────────────────────────────────────────── */
.risk-meter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 8px 10px;
    border-radius: 6px;
    background: var(--bg-card, rgba(255,255,255,0.03));
    border: 1px solid var(--border-color, rgba(255,255,255,0.06));
}

.risk-meter .meter-label {
    display: flex;
    justify-content: space-between;
    font-size: 9px;
    color: var(--text-muted);
}

.risk-meter .meter-bar {
    height: 5px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.06);
    overflow: hidden;
}

.risk-meter .meter-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease, background 0.3s ease;
}

.risk-meter .meter-fill.low { background: var(--live-accent); }
.risk-meter .meter-fill.medium { background: var(--paper-accent); }
.risk-meter .meter-fill.high { background: var(--error-neon, #ff3b5c); }

/* ── Paper Config Tab ──────────────────────────────────────────────── */
.paper-config-section {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 12px;
}

.paper-config-row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.paper-config-row .config-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-primary);
}

.paper-config-row .config-desc {
    font-size: 9px;
    color: var(--text-dim);
    line-height: 1.35;
}

.paper-config-row input[type="range"] {
    width: 100%;
    accent-color: var(--paper-accent);
}

.paper-config-row .config-value {
    font-size: 12px;
    font-weight: 700;
    font-family: 'JetBrains Mono', monospace;
    color: var(--paper-accent);
}

/* ── Autopilot Wallet Confirmation ─────────────────────────────────── */
.autopilot-wallet-info {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 6px;
    background: rgba(168, 85, 247, 0.06);
    border: 1px solid rgba(168, 85, 247, 0.15);
    font-size: 10px;
    color: var(--text-muted);
    margin-top: 6px;
}

.autopilot-wallet-info .ticker-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--live-accent);
    animation: ctx-chip-pulse 1.5s ease-in-out infinite;
}

.autopilot-wallet-info.inactive .ticker-dot {
    background: var(--text-dim);
    animation: none;
}

/* ── Arena Paper Banner ────────────────────────────────────────────── */
.arena-paper-banner {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 8px;
    background: var(--paper-bg-tint);
    border: 1px solid var(--paper-border-tint);
    font-size: 11px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.arena-paper-banner .banner-icon {
    color: var(--paper-accent);
    flex-shrink: 0;
}

/* ── Responsive Tweaks ─────────────────────────────────────────────── */
@media (max-width: 768px) {
    .portfolio-hero-strip {
        grid-template-columns: repeat(2, 1fr);
    }
    .composition-section {
        grid-template-columns: 1fr;
    }
    .kpi-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
