/* PRUX / ICE TERMINAL — original identity, self-hosted and reduced-motion aware. */
:root {
  --bg: #060b12;
  --side: #080f18;
  --panel: #0d1722;
  --panel2: #12202c;
  --line: #203441;
  --text: #e7f3fa;
  --muted: #a4b8c6;
  --dim: #829bab;
  --mint: #79e8f2;
  --violet: #a2baff;
  --red: #ff9fab;
  --amber: #efc68e;
}
body { background: var(--bg); isolation: isolate; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -3;
  pointer-events: none;
  background: radial-gradient(ellipse at 95% 0%, #0f405c3b, transparent 54%),
              radial-gradient(ellipse at 12% 80%, #0b434326, transparent 45%), #060b12;
}
#ambient-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: -1;
  pointer-events: none;
  contain: strict;
}
.ambient-grid {
  position: fixed;
  inset: 0;
  z-index: -2;
  pointer-events: none;
  background-image: linear-gradient(#6ad6f007 1px, transparent 1px),
                    linear-gradient(90deg, #6ad6f007 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(110deg, transparent 10%, #000 100%);
}
.dashboard-page .shell { grid-template-columns: 260px minmax(0, 1fr); }
.sidebar {
  background: linear-gradient(175deg, #0b141ff5, #070e17f7);
  border-right: 1px solid #213745;
  box-shadow: 12px 0 60px #00000020;
  padding: 24px 16px 18px;
}
.brand { margin: 0 2px 32px; gap: 6px; letter-spacing: .16em; }
.brand-logo { width: 80px; height: 80px; object-fit: contain; flex-shrink: 0; }
.brand-wordmark { font-size: 1.4rem; font-weight: 550; color: #f0faff; }
.brand-sub { display: block; margin-top: 5px; font: 400 .65rem/1.8 var(--mono, Consolas, monospace); letter-spacing: .14em; color: #82a5b8; }
.workspace-label { font-size: .65rem; letter-spacing: .17em; color: #829bab; margin-bottom: 15px; }
nav { gap: 6px; }
.nav-item { min-height: 48px; padding: 12px 11px; border-radius: 5px; color: #a4b8c6; gap: 10px; font-size: .84rem; }
.nav-item:hover { background: #152737; color: #e9f7ff; border-color: #294552; }
.nav-item.active { background: linear-gradient(90deg, #173542, #112330); color: #c8faff; border-color: #376475; }
.nav-item.active::before { left: -17px; height: 24px; background: #79e8f2; box-shadow: 0 0 14px #70e9ff66; }
.nav-icon { color: #75c7d8; }
.nav-count { border: 1px solid #355666; background: #17343f; color: #aaf6fc; border-radius: 4px; font-family: var(--mono); }
.mode-card { border-bottom-color: #233742; color: #b9ceda; }
.mode-icon { color: #8eb9dc; }
.topbar { background: #08111afa; border-color: #233744; height: 76px; }
.breadcrumb { color: #81a3b7; letter-spacing: .025em; gap: 13px; min-width: 0; }
.breadcrumb strong { color: #cadde9; }
.top-meta { gap: 16px; }
.live-badge { border-radius: 4px; background: #162232; color: #b7c7ed; border-color: #3c5369; }
.live-badge.online { color: #abf2f7; background: #16313a; border-color: #396875; box-shadow: none; }
.live-badge.offline { color: #f4d2a4; background: #2c2520; border-color: #655137; }
main { max-width: 1740px; }
.page-heading { align-items: center; padding-bottom: 24px; border-bottom: 1px solid #203643; position: relative; }
.page-heading::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 64px; background: #83e9f3; box-shadow: 0 0 10px #70e9ff55; }
.eyebrow { font: 500 .67rem/1.5 var(--mono); color: #86b0c4; letter-spacing: .18em; }
h1 { font-size: clamp(1.7rem, 2.5vw, 2.55rem); font-weight: 450; letter-spacing: -.04em; margin: 13px 0 10px; color: #edf8ff; }
h2 { color: #d7e8f2; font-weight: 500; }
.page-heading p { font-size: .875rem; color: #a1b7c6; }
.scope-pill { border-radius: 4px; border-color: #375563; color: #b3cfdf; background: #0e202cb3; font: 400 .75rem/1.5 var(--mono); }
.metrics-grid { gap: 14px; }
.metric {
  background: linear-gradient(135deg, #122332fc, #0c1620fc);
  border: 1px solid #29404f;
  border-radius: 7px;
  min-height: 157px;
  box-shadow: inset 0 1px 0 #98d6ed08, 0 8px 24px #00000015;
}
.metric::before { content: ""; position: absolute; top: 10px; right: 10px; width: 6px; height: 6px; border-top: 1px solid #4b7185; border-right: 1px solid #4b7185; }
.metric.accent { background: linear-gradient(135deg, #16313ffc, #10212dfc); border-color: #497281; }
.metric.accent::after { left: 20px; width: 42px; background: #98f4fa; box-shadow: 0 0 12px #75e8ff60; }
.metric-label { color: #bed0db; font-size: .8rem; }
.metric strong { font: 400 clamp(1.8rem, 2.7vw, 2.45rem)/1.15 var(--mono); letter-spacing: -.045em; margin: 18px 0 12px; color: #e8f7ff; }
.metric.accent strong { color: #9ff5fb; }
.metric-caption { color: #8ba4b5; }
.route-shortcut { background: #10202fcc; color: #b8ccf3; border-color: #334d63; border-radius: 5px; }
.empty-state { background: radial-gradient(ellipse at 50% 0%, #1b4a602a, transparent 72%), #0c1620fc; border-color: #284351; border-radius: 8px; padding: 42px 24px; }
.empty-mark { border: 1px solid #406075; color: #8adbea; background: #163040; border-radius: 6px; box-shadow: none; }
.empty-state h3 { color: #d2e4ef; margin-top: 17px; }
.table-shell, .panel { background: #0c1622fc; border-color: #29414f; border-radius: 7px; }
.panel { box-shadow: inset 0 1px 0 #9adbf506; }
th, .price-pool-table th { color: #a5becf; background: #132330; border-bottom-color: #2e4756; }
td { border-color: #21323f; color: #c7dbe6; }
tbody tr:hover { background: #162b3a; }
.price-pool-table small { color: #a4b8c6; }
.coin-label { color: #c5ebf7; border-color: #406273; background: #152a3a; border-radius: 5px; }
.positive { color: #90f0e9; }
.negative { color: #ff9fab; }
.status-tag { border-radius: 4px; background: #14222f; color: #b1c7d4; border-color: #2d4453; }
.status-tag.good { color: #a5f4ec; background: #12312e; border-color: #3a625b; }
.status-tag.warn { color: #f4d2a4; background: #30271d; border-color: #635038; }
.search-criteria { color: #afc5d3; background: #122233fc; border-color: #365166; border-radius: 6px; }
.notice { background: #292319ed; border-color: #705934; color: #f0d1a2; border-radius: 5px; }
.comparison-diagnostics > summary { color: #b0cbdc; }
.route-filter input, .route-filter select { color: #e1f1f9; background: #0d1b28; border: 1px solid #405c6b; border-radius: 4px; }
.route-filter input:focus-visible, .route-filter select:focus-visible { outline: 2px solid #79e8f2; outline-offset: 3px; }
.dex-card { background: linear-gradient(130deg, #132635fc, #0b1520fc); border-color: #385969; border-radius: 8px; }
.dex-card.candidate { border-color: #548b94; }
.dex-card-heading { border-color: #304857; }
.route-step { background: #0b1824; border-color: #385363; border-radius: 5px; }
.step-platform { color: #c4e8f7; }
.step-number { color: #aadff1; border-color: #447083; border-radius: 3px; }
.wallet-step { border-color: #3c625f; background: #10221f; }
.wallet-step .step-platform { color: #b1e9e0; }
.opportunity-card { background: linear-gradient(105deg, #143337, #142232); border-color: #447a7d; border-radius: 7px; }
.venue-pair { border-color: #3a5464; color: #bad0de; }
.venue-pair.fresh { border-color: #416e73; color: #ace9ed; }
.solana-candidate { background: #10202d; border-color: #344e60; border-radius: 6px; }
.provider-diagnostics, .polygon-timing { border-color: #304c60; }
.event-row { border-color: #243b4b; }
.event-source { color: #b2d4e9; }
.research-note { color: #92b6d9; }
.research-note p, .panel-footnote { color: #91aabb; }
footer { background: #08121afa; border-color: #253d4b; color: #8ba6b8; }
.login-page { background: transparent; padding: 76px 24px 38px; }
.login-page main { position: relative; width: min(100%, 440px); padding: 30px 34px 32px; border: 1px solid #416070; border-top-color: #7fd6e4; border-radius: 10px; background: linear-gradient(145deg, #132735fc, #09131ffc); box-shadow: 0 28px 100px #00000070, 0 0 80px #5cbde008; }
.login-page main::before { content: ""; position: absolute; top: -1px; left: 34px; width: 54px; height: 1px; background: #aff9ff; box-shadow: 0 0 15px #7ee6ff77; }
.login-page .brand { margin: 0; gap: 14px; }
.login-page .brand-logo { width: 92px; height: 92px; }
.login-page .brand-wordmark { font-size: 1.6rem; letter-spacing: .16em; }
.login-page .brand-sub { font-size: .65rem; color: #8db0c4; }
.login-page h1 { font-size: 1.85rem; font-weight: 450; margin: 26px 0 8px; }
.login-page p { color: #a3bdcf; font-size: .9rem; }
.login-page label { color: #c2d8e7; font-size: .875rem; }
.login-page input { padding: 14px; border-color: #3e586b; border-radius: 5px; background: #0a1723; color: #edfaff; }
.login-page form button { background: linear-gradient(110deg, #a0edf4, #71cced); border: 1px solid #baefff; color: #092436; border-radius: 5px; padding: 14px; box-shadow: 0 4px 22px #60c4df16; }
.login-page form button:hover:not(:disabled) { background: #bcf5ff; }
.login-page #error { color: #ffb3b9; }
.login-page small { color: #9eb7c8; font-size: .78rem; }
@media (max-width: 1200px) {
  .dashboard-page .shell { grid-template-columns: 236px minmax(0, 1fr); }
  .sidebar { padding-inline: 12px; }
  .brand-logo { width: 70px; height: 70px; }
  .brand-wordmark { font-size: 1.25rem; }
  .brand-sub { font-size: .58rem; }
  .nav-item { gap: 8px; font-size: .8rem; padding-inline: 8px; }
  .top-meta { gap: 8px; }
  .top-meta > #clock { display: none; }
  .scope-pill { white-space: normal; max-width: 230px; }
}
@media (max-width: 900px) {
  .dashboard-page .shell { grid-template-columns: minmax(0, 1fr); }
  .sidebar { padding: 10px 20px 15px; flex-direction: column; align-items: stretch; gap: 8px; border-bottom-color: #2a4859; }
  .brand { margin: 0; align-self: flex-start; }
  .brand-logo { width: 60px; height: 60px; }
  .brand-wordmark { font-size: 1.15rem; }
  .brand-sub { display: block; font-size: .58rem; }
  nav { display: flex; width: 100%; margin: 0; gap: 6px; flex-wrap: wrap; }
  .nav-item { width: auto; flex: 1 0 auto; justify-content: center; min-height: 42px; font-size: .8rem; padding: 8px 10px; }
  .nav-count { margin-left: 2px; }
  .topbar { min-height: 62px; height: auto; padding-block: 12px; flex-wrap: wrap; }
  .top-meta { gap: 10px; }
  .page-heading { gap: 16px; padding-bottom: 22px; }
  .metric { min-height: 150px; }
}
@media (max-width: 580px) {
  .sidebar { padding-inline: 16px; }
  .topbar { gap: 12px; }
  .breadcrumb { width: 100%; font-size: .8rem; }
  .top-meta { width: 100%; justify-content: flex-end; }
  .top-meta .live-badge { font-size: .7rem; }
  .nav-item { flex-basis: calc(50% - 6px); font-size: .78rem; min-width: 0; }
  .nav-item:last-child { flex-basis: 100%; }
  .page-heading { align-items: flex-start; }
  .page-heading p { font-size: .83rem; }
  .metric-label { font-size: .75rem; }
  .metric strong { font-size: 1.8rem; }
  .empty-state { padding: 28px 18px; }
  .scope-pill { max-width: 100%; }
  .login-page main { padding: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* Quiet updates: keep ambient canvas motion behind nearly opaque surfaces. */
body.dashboard-page :is(tbody tr, td, .metric, .panel, .dex-card,
  .opportunity-card, .route-step, .solana-candidate, .display-quote,
  .quote-value, .quote-trend, .quiet-duration) {
  animation: none;
  transition: none;
}
body.dashboard-page .display-quote { color: #c2d3df; }
body.dashboard-page .quote-stale .quote-value { color: #a4b8c6; }
body.dashboard-page .positive,
body.dashboard-page .quote-trend.positive { color: #9bc8c5; }
body.dashboard-page .negative,
body.dashboard-page .quote-trend.negative { color: #d5a6af; }
body.dashboard-page .metric strong { color: #c2d3df; }
body.dashboard-page .metric.accent strong,
body.dashboard-page .opportunity-values strong { color: #a7ced2; }
body.dashboard-page .quote-trend { text-shadow: none; }
body.dashboard-page .route-step:not(:last-child)::after {
  color: #a4b8c6;
  text-shadow: none;
}
body.dashboard-page .identity-name { color: #d2e2ec; }
body.dashboard-page .identity-meta, body.dashboard-page .identity-unknown { color: #a4b8c6; }
.identity-unknown .identity-icon { background: #1a2b38; color: #a4b8c6; }
.network-badge { color: #b4c8d5; background: #132330; }
body.dashboard-page .quiet-duration { color: #a4b8c6; text-shadow: none; }


/* Logo finish: cold medallion paint belongs to the frame, never the brand art. */
.identity-emblem, .network-emblem {
  border: 1px solid rgba(158, 213, 232, .28);
  background: linear-gradient(135deg, rgba(191, 232, 246, .15),
    rgba(53, 88, 108, .04) 43%, rgba(4, 11, 18, .42)), #0c1721;
  box-shadow: inset 0 1px 0 rgba(226, 248, 255, .09),
    inset 0 -1px 0 rgba(0, 0, 0, .4), 0 2px 6px rgba(0, 0, 0, .23),
    0 0 8px rgba(93, 203, 232, .09);
}
.identity-emblem::after, .network-emblem::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  border-radius: inherit;
  pointer-events: none;
  box-shadow: inset 1px 1px 0 rgba(209, 243, 255, .11),
    inset -1px -1px 0 rgba(0, 0, 0, .28);
  animation: none;
  transition: none;
  transform: none;
}
.network-emblem {
  box-shadow: inset 0 1px 0 rgba(226, 248, 255, .08),
    0 0 4px rgba(93, 203, 232, .08);
}
.identity:is(:hover, :focus-within) > .identity-emblem,
.network-badge:is(:hover, :focus-within) > .network-emblem {
  border-color: rgba(178, 229, 244, .47);
  box-shadow: inset 0 1px 0 rgba(226, 248, 255, .12),
    0 2px 6px rgba(0, 0, 0, .23), 0 0 9px rgba(93, 203, 232, .13);
}
/* Neutral fallbacks remain visibly distinct from supplied official marks. */
.identity-unknown > .identity-emblem,
.identity-emblem:has(> span.identity-icon),
.network-emblem:has(> span.network-icon) {
  border-style: dashed;
  border-color: rgba(164, 184, 198, .36);
  background: linear-gradient(135deg, rgba(164, 184, 198, .09),
    rgba(6, 14, 22, .2)), #111e29;
  box-shadow: inset 0 1px 0 rgba(209, 226, 238, .06);
}
.identity-emblem > span.identity-icon,
.network-emblem > span.network-icon { color: #a4b8c6; background: transparent; }

/* Dark original ink needs a cool light medallion, not a recolored trademark. */
.identity-emblem.identity-emblem-ink {
  background: linear-gradient(135deg, #c9e8ef, #8eb8c6);
  border-color: #b3d9e4;
}
