/* desktop-source: styles/styles-foundation-shell.css */
:root {
  --bg-main: #07111f;
  --bg-sidebar: #091827;
  --bg-surface: #0d1b2d;
  --bg-surface-2: #11243a;
  --bg-surface-3: #183149;
  --border-soft: rgba(115, 151, 191, 0.22);
  --border-strong: rgba(138, 181, 226, 0.38);
  --text-primary: #edf6ff;
  --text-secondary: #b8cce4;
  --text-muted: #8198b4;
  --accent: #43d9ff;
  --success: #62f6a3;
  --warning: #facc15;
  --danger: #f87171;
  --purple: #c45cff;
  --window-border: #24445f;
  --window-border-inner: rgba(67, 217, 255, 0.26);
  --sidebar-width: 300px;
  --catalog-width: 610px;
  --splitter-width: 8px;
  --analysis-table-scale: 1;
  --analysis-table-width: auto;
  --analysis-table-height: auto;
  --budget-plan-scale: 1;
  --budget-plan-width: auto;
  --budget-plan-height: auto;
  --auto-trade-scale: 1;
  --auto-trade-stage-width: 100%;
  --auto-trade-stage-height: 100%;
}

* { box-sizing: border-box; }

* {
  scrollbar-width: thin;
  scrollbar-color: rgba(92, 128, 165, 0.82) rgba(7, 17, 31, 0.22);
}

::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

::-webkit-scrollbar-track {
  background: rgba(7, 17, 31, 0.24);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb {
  min-height: 44px;
  background:
    linear-gradient(180deg, rgba(86, 127, 170, 0.95), rgba(42, 73, 108, 0.95));
  border: 2px solid rgba(7, 17, 31, 0.40);
  border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
  background:
    linear-gradient(180deg, rgba(104, 154, 205, 0.98), rgba(54, 92, 132, 0.98));
}

::-webkit-scrollbar-corner {
  background: rgba(7, 17, 31, 0.24);
}

html {
  width: 100%;
  height: 100%;
  background: #07111f;
  overflow: hidden;
}

body {
  width: 100%;
  height: 100%;
  padding: 2px;
  margin: 0;
  background: #020711;
  color: var(--text-primary);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow: hidden;
}

body[data-resize-edge="left"],
body[data-resize-edge="right"] { cursor: ew-resize; }

body[data-resize-edge="top"],
body[data-resize-edge="bottom"] { cursor: ns-resize; }

body[data-resize-edge="topLeft"],
body[data-resize-edge="bottomRight"] { cursor: nwse-resize; }

body[data-resize-edge="topRight"],
body[data-resize-edge="bottomLeft"] { cursor: nesw-resize; }

button, input, select { font: inherit; }

button, select, input {
  border: 1px solid var(--border-soft);
  background: var(--bg-surface-2);
  background-image: none;
  color: var(--text-primary);
  border-radius: 8px;
  outline: none;
  box-shadow: none;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

button {
  min-height: 36px;
  padding: 0 12px;
  cursor: pointer;
}

button:hover, select:hover, input:focus {
  border-color: var(--border-strong);
  background: var(--bg-surface-3);
}

button.primary, button.nav.active {
  color: var(--accent);
  border-color: rgba(34, 211, 238, 0.35);
  background: rgba(34, 211, 238, 0.12);
  box-shadow: 0 0 0 1px rgba(34, 211, 238, 0.05);
}

button.danger { color: var(--danger); }

.logo {
  display: grid;
  place-items: center;
  color: #03111b;
  background: transparent;
  font-weight: 900;
}

.tiny {
  margin: 8px 0 14px;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.45;
}

.startup-screen {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  background:
    repeating-linear-gradient(135deg, rgba(76, 96, 118, 0.28) 0px, rgba(76, 96, 118, 0.28) 1px, transparent 1px, transparent 36px),
    linear-gradient(35deg, rgb(18, 26, 38) 0%, rgb(27, 36, 50) 100%);
  color: #f8fbff;
}

.startup-screen.hidden {
  display: none;
}

.startup-panel {
  width: min(520px, calc(100vw - 48px));
  display: grid;
  justify-items: center;
  gap: 12px;
  text-align: center;
}

.startup-panel h1 {
  margin: 0;
  font-size: 32px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: 0;
}

.startup-panel p {
  min-height: 20px;
  margin: 0;
  color: #d8e6f7;
  font-size: 15px;
}

.startup-panel strong {
  color: #f8fbff;
  font-size: 13px;
}

.startup-progress {
  width: 100%;
  height: 10px;
  overflow: hidden;
  border: 1px solid rgba(226, 232, 240, 0.85);
  background: rgba(238, 242, 247, 0.92);
  border-radius: 0;
}

.startup-progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: #00c853;
  transition: width 220ms ease;
}

.startup-enter {
  min-width: 168px;
  height: 42px;
  margin-top: 8px;
  color: #f8fbff;
  border-color: rgba(67, 217, 255, 0.78);
  background: rgba(34, 211, 238, 0.16);
  font-size: 16px;
  font-weight: 900;
}

.startup-enter:hover {
  color: #ffffff;
  border-color: rgba(98, 246, 163, 0.86);
  background: rgba(34, 197, 94, 0.22);
}

.startup-enter.hidden,
.app-shell.app-shell-hidden {
  display: none;
}

.app-shell {
  width: calc(100vw - 4px);
  max-width: none;
  height: calc(100vh - 4px);
  display: flex;
  flex-direction: column;
  background: var(--bg-main);
  border: 2px solid var(--window-border);
  box-shadow:
    inset 0 0 0 1px var(--window-border-inner),
    0 0 0 1px rgba(0, 0, 0, 0.72);
}

.topbar {
  width: 100%;
  height: 58px;
  display: grid;
  grid-template-columns: minmax(400px, 1fr) minmax(360px, auto) auto;
  align-items: center;
  gap: 12px;
  padding: 0 8px 0 18px;
  background: var(--bg-sidebar);
  border-bottom: 1px solid var(--border-soft);
  user-select: none;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 12px;
  min-width: 0;
}

.top-status {
  display: grid;
  grid-template-columns: minmax(220px, 340px);
  justify-self: center;
  gap: 8px;
  min-width: 240px;
  padding: 7px 10px;
  color: #d8f7ff;
  font-size: 14px;
  font-weight: 800;
  background: rgba(34, 211, 238, 0.08);
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.top-status span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.top-progress {
  height: 8px;
  background: rgba(37, 41, 45, 0.72);
  border: 1px solid rgba(34, 211, 238, 0.12);
}

.analysis-status {
  width: 100%;
  min-width: 0;
  grid-template-columns: minmax(0, 1fr);
  justify-self: stretch;
  margin: -4px 0 12px;
}

.sponsor-btn {
  min-height: 32px;
  padding: 0 13px;
  color: #f5edff;
  background: rgba(168, 85, 247, 0.16);
  border-color: rgba(168, 85, 247, 0.5);
  font-weight: 900;
  white-space: nowrap;
  box-shadow: 0 0 12px rgba(168, 85, 247, 0.10);
}

.sponsor-btn:hover {
  color: #fff;
  background: rgba(168, 85, 247, 0.24);
  border-color: rgba(196, 181, 253, 0.88);
}

.refresh-btn {
  min-height: 32px;
  padding: 0 13px;
  color: #d7f9ff;
  background: rgba(14, 165, 233, 0.12);
  border-color: rgba(56, 189, 248, 0.42);
  font-weight: 900;
  white-space: nowrap;
}

.refresh-btn:hover {
  color: #ffffff;
  background: rgba(14, 165, 233, 0.20);
  border-color: rgba(125, 211, 252, 0.82);
}

.sponsor-panel {
  display: flex;
  flex-direction: column;
  gap: 7px;
  align-items: center;
  margin-top: 8px;
  margin-bottom: 8px;
  padding: 9px 10px;
}

.sponsor-panel .panel-title {
  width: 100%;
  justify-content: center;
  text-align: center;
}

.sponsor-panel .panel-title h3 {
  width: 100%;
  margin-bottom: 0;
  text-align: center;
}

.sponsor-qr-link {
  display: block;
  width: min(150px, 100%);
  margin-inline: auto;
  padding: 6px;
  background: #fff;
  border: 1px solid rgba(196, 181, 253, 0.7);
  border-radius: 8px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.22);
}

.sponsor-qr {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  object-fit: contain;
  image-rendering: crisp-edges;
}

.sponsor-note {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

.sponsor-actions {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.sponsor-link-btn {
  min-height: 28px;
  display: grid;
  place-items: center;
  color: #f5edff;
  background: rgba(168, 85, 247, 0.14);
  border: 1px solid rgba(168, 85, 247, 0.38);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 900;
  text-decoration: none;
}

.sponsor-link-btn:hover {
  color: #fff;
  border-color: rgba(196, 181, 253, 0.88);
  background: rgba(168, 85, 247, 0.24);
}

.sponsor-link-btn:focus-visible {
  outline: 2px solid rgba(196, 181, 253, 0.58);
  outline-offset: 2px;
}

.sponsor-link-btn.bilibili {
  color: #d8f7ff;
  background: rgba(34, 211, 238, 0.10);
  border-color: rgba(34, 211, 238, 0.34);
}

.sponsor-link-btn.bilibili:hover {
  color: #fff;
  border-color: rgba(103, 232, 249, 0.88);
  background: rgba(34, 211, 238, 0.20);
}

.sponsor-link-btn.bilibili:focus-visible {
  outline-color: rgba(103, 232, 249, 0.62);
}

.brand {
  display: flex;
  align-items: center;
  justify-self: start;
  gap: 10px;
  min-width: 0;
}

.brand strong {
  white-space: nowrap;
  font-weight: 800;
}

.top-contact {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding-left: 4px;
  font-size: 13px;
  font-weight: 950;
  white-space: nowrap;
}

.top-contact span {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  max-width: 260px;
  padding: 0 13px;
  overflow: hidden;
  text-overflow: ellipsis;
  color: #f4feff;
  background:
    linear-gradient(#0a2032, #0a2032) padding-box,
    linear-gradient(110deg, #22d3ee, #4ade80, #a855f7, #22d3ee) border-box;
  border: 1px solid transparent;
  border-radius: 999px;
  box-shadow:
    0 0 10px rgba(34, 211, 238, 0.42),
    0 0 18px rgba(168, 85, 247, 0.18),
    inset 0 0 12px rgba(34, 211, 238, 0.10);
  text-shadow: 0 0 8px rgba(255, 255, 255, 0.30);
}

.top-contact span:first-child {
  color: #fff7d8;
  background:
    linear-gradient(#1f1a0d, #1f1a0d) padding-box,
    linear-gradient(110deg, #facc15, #fb7185, #22d3ee, #facc15) border-box;
  box-shadow:
    0 0 10px rgba(250, 204, 21, 0.48),
    0 0 20px rgba(251, 113, 133, 0.18),
    inset 0 0 12px rgba(250, 204, 21, 0.10);
}

.logo {
  width: 30px;
  height: 30px;
  overflow: hidden;
  border-radius: 7px;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.22);
}

.logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pro {
  color: #fbbf24;
  background: rgba(251, 191, 36, 0.10);
  border: 1px solid rgba(251, 191, 36, 0.25);
  padding: 2px 7px;
  border-radius: 4px;
  font-size: 12px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 14px rgba(74, 222, 128, 0.42);
}

#statusText {
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 620px;
  font-size: 13px;
}

.brand .dot,
#statusText {
  display: none;
}

.searchbar {
  width: min(380px, 30vw);
  height: 34px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 9px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 7px;
}

.searchbar input {
  width: 100%;
  height: 28px;
  border: 0;
  background: transparent;
}

.search-icon { color: var(--text-muted); }

.window-controls {
  height: 100%;
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 4px;
  padding-left: 2px;
}

.window-control {
  width: 38px;
  min-height: 32px;
  padding: 0;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  border-radius: 6px;
  font-size: 17px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
}

.window-control:hover {
  color: var(--text-primary);
  background: rgba(148, 163, 184, 0.12);
  border-color: var(--border-soft);
}

.window-control.close:hover {
  color: #fff;
  background: rgba(248, 113, 113, 0.88);
  border-color: rgba(248, 113, 113, 0.88);
}

.layout {
  width: 100%;
  min-height: 0;
  flex: 1;
  display: grid;
  grid-template-columns: var(--sidebar-width) var(--splitter-width) minmax(0, 1fr);
}

.sidebar, .analysis, .catalog, .view-stack, .app-view {
  min-height: 0;
}

.sidebar, .left-splitter, .analysis, .right-splitter {
  border-right: 1px solid var(--border-soft);
}

.sidebar {
  background: var(--bg-sidebar);
  padding: 12px 14px;
  overflow: auto;
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-weight: 500;
}

.splitter {
  position: relative;
  z-index: 3;
  cursor: col-resize;
  background: #07111f;
  touch-action: none;
}

.splitter::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 3px;
  width: 2px;
  background: rgba(148, 163, 184, 0.20);
  border-radius: 999px;
}

.splitter:hover::after,
.layout.resizing .splitter::after {
  background: var(--accent);
}

body.resizing-columns {
  user-select: none;
}

.layout.resizing,
.layout.resizing .splitter {
  cursor: col-resize;
}

.layout.resizing .table-card,
.layout.resizing .card-scroll {
  pointer-events: none;
}

.resize-guide {
  position: fixed;
  z-index: 9999;
  top: 0;
  left: -999px;
  width: 2px;
  height: 0;
  pointer-events: none;
  opacity: 0;
  background: var(--accent);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.55);
}

.resize-guide.active {
  opacity: 1;
}

.view-stack {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

.app-view {
  display: none;
  height: 100%;
  min-width: 0;
  min-height: 0;
}

.app-view.active {
  display: block;
}

.workbench-grid {
  width: 100%;
  height: 100%;
  min-width: 0;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) var(--splitter-width) minmax(280px, min(34%, var(--catalog-width)));
}

.page-shell {
  height: 100%;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 18px;
  background: var(--bg-main);
}


/* desktop-source: styles/styles-sidebar-panels.css */
.nav-section { margin-bottom: 10px; }

.nav-section p {
  margin: 0 0 5px;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.2;
}

.nav {
  width: 100%;
  min-height: 28px;
  margin: 0 0 5px;
  padding: 0 10px;
  text-align: left;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  background: rgba(148, 163, 184, 0.035);
  color: #b8c7d9;
  font-size: 13px;
  font-weight: 500;
  line-height: 1;
}

.nav:hover {
  color: var(--text-primary);
  border-color: rgba(148, 163, 184, 0.28);
  background: rgba(148, 163, 184, 0.075);
}

button.nav.active {
  color: #d8ecff;
  border-color: rgba(96, 165, 250, 0.42);
  background: rgba(96, 165, 250, 0.12);
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.10);
  font-weight: 600;
}

.nav-section + .nav-section .nav {
  color: #a9c8e9;
  border-color: rgba(96, 165, 250, 0.20);
  background: rgba(96, 165, 250, 0.04);
  font-weight: 500;
}

.nav-section + .nav-section .nav:hover {
  color: #dcecff;
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(96, 165, 250, 0.085);
}

.disclaimer-panel {
  margin: 8px 0 9px;
  padding: 9px 10px;
  color: #d7e7ff;
  background:
    linear-gradient(180deg, rgba(251, 191, 36, 0.08), rgba(34, 211, 238, 0.045)),
    rgba(148, 163, 184, 0.035);
  border: 1px solid rgba(251, 191, 36, 0.22);
  border-radius: 8px;
}

.disclaimer-panel strong {
  display: block;
  margin-bottom: 4px;
  color: #facc15;
  font-size: 12px;
  font-weight: 900;
}

.disclaimer-panel p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.45;
}

button.sidebar-primary-query {
  min-height: 32px;
  margin: 2px 0 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(34, 211, 238, 0.36);
  border-radius: 6px;
  color: var(--accent);
  background: rgba(34, 211, 238, 0.10);
  font-size: 13px;
  font-weight: 700;
  text-align: center;
  box-shadow: 0 0 12px rgba(34, 211, 238, 0.08);
}

button.sidebar-primary-query:hover {
  color: #eaffff;
  border-color: rgba(34, 211, 238, 0.58);
  background: rgba(34, 211, 238, 0.16);
}

button.sidebar-primary-query:active {
  transform: none;
}

.panel {
  margin-top: 9px;
  padding: 11px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.panel.pulse {
  animation: panel-pulse 900ms ease;
}

@keyframes panel-pulse {
  0% { box-shadow: 0 0 0 0 rgba(139, 94, 52, 0.00); }
  35% { box-shadow: 0 0 0 3px rgba(139, 94, 52, 0.22); }
  100% { box-shadow: 0 0 0 0 rgba(139, 94, 52, 0.00); }
}

.panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.panel-actions {
  display: flex;
  gap: 6px;
  align-items: center;
}

.panel h3, .admin-block h4 {
  margin: 0 0 7px;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-block {
  padding-top: 12px;
  margin-top: 12px;
  border-top: 1px solid rgba(148, 163, 184, 0.12);
}

.panel p {
  margin: 10px 0 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.5;
}

.field-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}

.field-row label {
  color: var(--text-secondary);
  font-size: 13px;
}

.auto-range-list {
  display: grid;
  gap: 7px;
  margin: 8px 0 10px;
}

.sidebar-auto-range {
  margin-top: 8px;
  padding: 9px;
  background:
    linear-gradient(180deg, rgba(48, 53, 58, 0.96), rgba(42, 46, 51, 0.98)),
    var(--bg-surface);
  border-color: rgba(145, 172, 202, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.035),
    0 14px 34px rgba(0, 0, 0, 0.16);
}

.sidebar-auto-range .panel-title {
  margin-bottom: 6px;
}

.sidebar-auto-range .panel-title h3 {
  margin-bottom: 0;
  font-size: 13px;
  font-weight: 700;
}

.sidebar-auto-range .panel-title .tiny {
  margin: 0;
  padding: 2px 7px;
  color: #b9d7ff;
  background: rgba(96, 165, 250, 0.10);
  border: 1px solid rgba(96, 165, 250, 0.18);
  border-radius: 999px;
  font-size: 11px;
  line-height: 1.35;
}

.sidebar-auto-range .auto-range-list {
  gap: 5px;
  margin: 6px 0 7px;
}

.sidebar-auto-range .range-row {
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 6px;
  min-height: 0;
  padding: 6px 7px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(34, 211, 238, 0.055), transparent 55%),
    rgba(48, 53, 58, 0.68);
  border-color: rgba(142, 169, 199, 0.24);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.025);
}

.sidebar-auto-range .range-count-wrap {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(76px, 1fr) 58px;
  gap: 6px;
}

.sidebar-auto-range .range-row .range-count {
  width: 100%;
  min-height: 26px;
  font-weight: 600;
  background: rgba(37, 41, 45, 0.72);
  border-color: rgba(122, 151, 184, 0.20);
  border-radius: 7px;
  color: #eaf4ff;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.20);
}

.sidebar-auto-range .range-all {
  justify-content: center;
  min-height: 26px;
  padding: 0 6px;
  background: rgba(37, 41, 45, 0.54);
  border: 1px solid rgba(122, 151, 184, 0.18);
  border-radius: 7px;
}

.sidebar-auto-range .range-actions {
  margin-bottom: 5px;
}

.sidebar-auto-range .sidebar-primary-query {
  margin: 0;
  min-height: 30px;
  font-size: 12px;
}

.range-row {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 6px 8px;
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 7px;
}

.range-row input[type="checkbox"] {
  appearance: none;
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  min-width: 16px;
  min-height: 16px;
  max-width: 16px;
  max-height: 16px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(148, 163, 184, 0.38);
  border-radius: 4px;
  background: rgba(48, 53, 58, 0.78);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.22);
  cursor: pointer;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 11px 11px;
}

.sidebar-auto-range > .auto-range-list > .range-row > .range-check {
  width: 18px;
  height: 18px;
  min-width: 18px;
  min-height: 18px;
  max-width: 18px;
  max-height: 18px;
  border-radius: 5px;
}

.range-row input[type="checkbox"]:checked {
  border-color: rgba(34, 211, 238, 0.86);
  background-color: #20bdd5;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.2 4.8 8.7 9.8 3.4' fill='none' stroke='%2305202a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #34d7ec, #17a9c2);
}

.range-row input[type="checkbox"]:checked::after {
  content: none;
}

.range-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 600;
}

.range-count-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
}

.range-row .range-count {
  width: 58px;
  min-height: 26px;
  margin: 0;
  padding: 0 6px;
  text-align: center;
  appearance: textfield;
  -moz-appearance: textfield;
}

.range-row .range-count::-webkit-outer-spin-button,
.range-row .range-count::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.range-all {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.range-all input {
  width: 13px;
  height: 13px;
  min-width: 13px;
  min-height: 13px;
  max-width: 13px;
  max-height: 13px;
  margin: 0;
  flex: 0 0 13px;
  border-radius: 3px;
  background-size: 9px 9px;
}

.range-actions {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  margin-bottom: 8px;
}

.range-actions button {
  min-height: 31px;
  padding: 0 8px;
  color: #d9e9fb;
  background: rgba(48, 53, 58, 0.58);
  border-color: rgba(122, 151, 184, 0.24);
  border-radius: 7px;
  font-size: 13px;
  font-weight: 600;
}

.range-actions button:hover {
  color: #f4fbff;
  background: rgba(34, 211, 238, 0.09);
  border-color: rgba(34, 211, 238, 0.30);
}

button.wide {
  width: 100%;
}

.panel input, .panel select {
  width: 100%;
  min-height: 36px;
  padding: 0 10px;
  margin-bottom: 8px;
}

.payment-link {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  margin: 8px 0;
  text-decoration: none;
}

.payment-link.disabled {
  pointer-events: none;
  opacity: 0.55;
}

.progress {
  height: 10px;
  overflow: hidden;
  background: var(--bg-surface-3);
  border-radius: 999px;
}

.progress span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--accent);
  transition: width 180ms ease;
}

.icon-btn, .mini {
  min-height: 28px;
  width: 32px;
  padding: 0;
}

.list {
  display: grid;
  gap: 7px;
  margin-bottom: 10px;
}

.admin-row {
  display: grid;
  grid-template-columns: 1fr 32px 32px;
  gap: 6px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  background: rgba(148, 163, 184, 0.07);
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 7px;
}

.admin-row strong, .admin-row span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-row strong { font-size: 13px; }
.admin-row span { color: var(--text-muted); font-size: 12px; margin-top: 3px; }
.mini.ok { color: var(--success); }
.empty-line { color: var(--text-muted); font-size: 13px; }

.cache-list {
  display: grid;
  gap: 0;
  max-height: 320px;
  overflow: auto;
  border: 1px solid rgba(148, 163, 184, 0.10);
  border-radius: 7px;
}

.cache-row {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) minmax(180px, 1fr) 110px 58px 160px 82px 58px;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 8px;
  background: rgba(148, 163, 184, 0.07);
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  font-size: 12px;
}

.cache-row:last-child { border-bottom: 0; }

.cache-row-head {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--bg-surface-2);
  color: var(--text-secondary);
  font-weight: 700;
}

.cache-row strong,
.cache-row span {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.cache-row strong { font-size: 13px; }
.cache-row span { color: var(--text-muted); }


/* desktop-source: styles/styles-analysis-table.css */
.analysis, .catalog {
  min-width: 0;
  padding: 18px;
  background: var(--bg-main);
  display: flex;
  flex-direction: column;
}

.catalog {
  border-right: 0;
  background: var(--bg-sidebar);
}

.catalog-page .page-shell {
  background: var(--bg-main);
}

.full-catalog-scroll {
  flex: 1;
}

.full-catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(190px, 1fr));
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  min-width: 0;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.section-head > div {
  min-width: 0;
}

.section-head h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.15;
}

.section-head p {
  margin: 6px 0 0;
  color: var(--text-muted);
  font-size: 13px;
}

.analysis-tools {
  flex: 1 1 520px;
  min-width: 280px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.analysis-tools button,
.analysis-tools select {
  min-width: 0;
  min-height: 32px;
}

.analysis-tools select {
  flex: 0 1 156px;
}

#tableFilter {
  flex-basis: 108px;
}

.analysis-tools select.rrs-locked option[value="rrs"] {
  color: var(--text-muted);
  background: var(--bg-surface);
}

.analysis-tools span {
  color: var(--text-muted);
  font-size: 12px;
}

.table-card {
  min-height: 0;
  flex: 1;
  overflow: auto;
  container-type: inline-size;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  font-synthesis: none;
}

.analysis-table-card {
  overflow-x: auto;
  overflow-y: auto;
  overscroll-behavior-inline: contain;
}

.analysis-table-stage {
  width: 100%;
  min-width: 480px;
  transform-origin: 0 0;
}

table {
  width: 100%;
  min-width: 100%;
  border-collapse: collapse;
}

th, td {
  height: 64px;
  padding: 0 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.10);
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 14px;
  line-height: 1.3;
}

th {
  position: sticky;
  top: 0;
  z-index: 10;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  font-size: 13px;
  font-weight: 800;
}

th.sortable {
  cursor: pointer;
  user-select: none;
}

th.sortable::after {
  content: "↕";
  display: inline-block;
  margin-left: 6px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1;
}

th.sortable.sorted {
  color: var(--accent);
}

th.sortable.sorted::after {
  color: var(--accent);
  content: "↓";
}

th.sortable.sorted[data-sort-dir="asc"]::after {
  content: "↑";
}

#analysisTable {
  table-layout: fixed;
  min-width: 480px;
}

#analysisTable th,
#analysisTable td {
  padding-inline: 8px;
}

#analysisTable th:nth-child(1),
#analysisTable td:nth-child(1) { width: 42px; }

#analysisTable th:nth-child(2),
#analysisTable td:nth-child(2) { width: 22%; }

#analysisTable th:nth-child(3),
#analysisTable td:nth-child(3) { width: 64px; }

#analysisTable th:nth-child(4),
#analysisTable td:nth-child(4) { width: 8%; }

#analysisTable th:nth-child(5),
#analysisTable td:nth-child(5) { width: 11%; }

#analysisTable th:nth-child(6),
#analysisTable td:nth-child(6) { width: 9%; }

#analysisTable th:nth-child(7),
#analysisTable td:nth-child(7) { width: 8%; }

#analysisTable th:nth-child(8),
#analysisTable td:nth-child(8),
#analysisTable th:nth-child(9),
#analysisTable td:nth-child(9),
#analysisTable th:nth-child(10),
#analysisTable td:nth-child(10) { width: 9%; }

#analysisTable th:nth-child(11),
#analysisTable td:nth-child(11) { width: 5%; }

#analysisTable td.analysis-cell-pred-low {
  position: relative;
  z-index: 1;
  overflow: visible;
  text-overflow: clip;
}

#analysisTable .analysis-cell-pred-low .low-inline-pill {
  max-width: none;
  background:
    linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(14, 116, 144, 0.08)),
    var(--bg-surface);
  box-shadow: 0 0 0 1px rgba(56, 189, 248, 0.05);
}

@container (max-width: 1100px) {
  #analysisTable th:nth-child(10),
  #analysisTable td:nth-child(10),
  #analysisTable th:nth-child(11),
  #analysisTable td:nth-child(11) {
    display: none;
  }

  #analysisTable th:nth-child(2),
  #analysisTable td:nth-child(2) { width: 30%; }
}

@container (max-width: 900px) {
  #analysisTable th:nth-child(9),
  #analysisTable td:nth-child(9) {
    display: none;
  }

  #analysisTable th:nth-child(2),
  #analysisTable td:nth-child(2) { width: 34%; }
}

@container (max-width: 760px) {
  #analysisTable th:nth-child(2),
  #analysisTable td:nth-child(2) { width: 36%; }

  #analysisTable th,
  #analysisTable td {
    padding-inline: 6px;
    font-size: 13px;
  }
}

@container (max-width: 680px) {
  #analysisTable th:nth-child(8),
  #analysisTable td:nth-child(8) {
    display: none;
  }

  #analysisTable th:nth-child(2),
  #analysisTable td:nth-child(2) { width: 40%; }
}

@container (max-width: 620px) {
  #analysisTable th:nth-child(6),
  #analysisTable td:nth-child(6) {
    display: none;
  }

  #analysisTable th:nth-child(1),
  #analysisTable td:nth-child(1) { width: 34px; }

  #analysisTable th:nth-child(2),
  #analysisTable td:nth-child(2) { width: 38%; }

  #analysisTable th:nth-child(3),
  #analysisTable td:nth-child(3) { width: 54px; }

  #analysisTable th:nth-child(4),
  #analysisTable td:nth-child(4) { width: 12%; }

  #analysisTable th:nth-child(5),
  #analysisTable td:nth-child(5) { width: 22%; }

  #analysisTable th:nth-child(7),
  #analysisTable td:nth-child(7) { width: 14%; }
}

@container (max-width: 520px) {
  #analysisTable th:nth-child(1),
  #analysisTable td:nth-child(1),
  #analysisTable th:nth-child(3),
  #analysisTable td:nth-child(3) {
    display: none;
  }

  #analysisTable th:nth-child(2),
  #analysisTable td:nth-child(2) { width: 42%; }

  #analysisTable th:nth-child(4),
  #analysisTable td:nth-child(4) { width: 18%; }

  #analysisTable th:nth-child(5),
  #analysisTable td:nth-child(5) { width: 24%; }

  #analysisTable th:nth-child(7),
  #analysisTable td:nth-child(7) { width: 16%; }
}

body.analysis-table-scaled #analysisTable {
  width: 100%;
  min-width: 100%;
}

body.analysis-table-scaled .analysis-table-stage {
  width: var(--analysis-table-width);
  min-width: var(--analysis-table-width);
  height: var(--analysis-table-height);
  transform: scale(var(--analysis-table-scale));
}

body.analysis-table-scaled .analysis-table-card {
  overflow-x: hidden;
}

body.analysis-table-scaled #analysisTable th,
body.analysis-table-scaled #analysisTable td {
  padding-inline: 8px;
  font-size: 14px;
}

body.analysis-table-scaled #analysisTable th {
  font-size: 13px;
}

body.analysis-table-scaled #analysisTable th:nth-child(1),
body.analysis-table-scaled #analysisTable td:nth-child(1) { width: 42px; }

body.analysis-table-scaled #analysisTable th:nth-child(2),
body.analysis-table-scaled #analysisTable td:nth-child(2) { width: 22%; }

body.analysis-table-scaled #analysisTable th:nth-child(3),
body.analysis-table-scaled #analysisTable td:nth-child(3) { width: 64px; }

body.analysis-table-scaled #analysisTable th:nth-child(4),
body.analysis-table-scaled #analysisTable td:nth-child(4) { width: 8%; }

body.analysis-table-scaled #analysisTable th:nth-child(5),
body.analysis-table-scaled #analysisTable td:nth-child(5) { width: 11%; }

body.analysis-table-scaled #analysisTable th:nth-child(6),
body.analysis-table-scaled #analysisTable td:nth-child(6) { width: 9%; }

body.analysis-table-scaled #analysisTable th:nth-child(7),
body.analysis-table-scaled #analysisTable td:nth-child(7) { width: 8%; }

body.analysis-table-scaled #analysisTable th:nth-child(8),
body.analysis-table-scaled #analysisTable td:nth-child(8),
body.analysis-table-scaled #analysisTable th:nth-child(9),
body.analysis-table-scaled #analysisTable td:nth-child(9),
body.analysis-table-scaled #analysisTable th:nth-child(10),
body.analysis-table-scaled #analysisTable td:nth-child(10) { width: 9%; }

body.analysis-table-scaled #analysisTable th:nth-child(11),
body.analysis-table-scaled #analysisTable td:nth-child(11) { width: 5%; }

body.analysis-table-scaled .analysis-product {
  gap: 10px;
}

body.analysis-table-scaled .analysis-product span {
  font-size: 15px;
}

body.analysis-table-scaled .analysis-thumb {
  width: 58px;
  height: 44px;
  flex-basis: 58px;
  display: grid;
}

body.analysis-table-scaled .rating-badge {
  min-width: 38px;
  padding-inline: 9px;
}

tbody tr:hover { background: rgba(34, 211, 238, 0.06); }
tbody tr.analysis-row-clickable { cursor: pointer; }
tbody tr.analysis-row-selected {
  background: rgba(34, 211, 238, 0.14);
  outline: 1px solid rgba(34, 211, 238, 0.38);
  outline-offset: -1px;
}
tbody tr.analysis-row-selected:hover {
  background: rgba(34, 211, 238, 0.18);
}
.analysis-product {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.analysis-product span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-primary);
  font-family: "Microsoft YaHei", "Microsoft YaHei UI", "PingFang SC", "Noto Sans SC", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.35;
  -webkit-font-smoothing: antialiased;
  font-synthesis: none;
}

.analysis-product .analysis-name {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.permanent-supply-badge,
.battle-pass-vehicle-badge {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  border: 1px solid rgba(45, 212, 191, 0.42);
  color: #99f6e4;
  background: rgba(13, 148, 136, 0.18);
  font-size: 11px;
  font-weight: 850;
  line-height: 1;
}

.battle-pass-vehicle-badge {
  border-color: rgba(96, 165, 250, 0.46);
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.20);
}

.analysis-thumb {
  position: relative;
  isolation: isolate;
  width: 58px;
  height: 44px;
  flex: 0 0 58px;
  display: grid;
  place-items: center;
  overflow: hidden;
  color: var(--text-muted);
  background: var(--bg-surface-2);
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 7px;
}

@container (max-width: 900px) {
  .analysis-product {
    gap: 8px;
  }

  .analysis-product span {
    font-size: 14px;
  }

  .analysis-thumb {
    width: 50px;
    height: 40px;
    flex-basis: 50px;
  }
}

@container (max-width: 620px) {
  .analysis-thumb {
    display: none;
  }

  .rating-badge {
    min-width: 34px;
    padding-inline: 7px;
  }
}

.analysis-thumb::before,
.detail-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
  z-index: 0;
}

.analysis-thumb.quality-bg-ultraRare {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(168, 85, 247, 0.22), transparent 58%),
    linear-gradient(180deg, rgba(45, 31, 64, 0.95), rgba(15, 14, 30, 0.98)),
    #0f0e1e;
  border-color: rgba(168, 85, 247, 0.34);
}

.analysis-thumb.quality-bg-rare {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(34, 211, 238, 0.20), transparent 58%),
    linear-gradient(180deg, rgba(16, 47, 62, 0.94), rgba(7, 22, 32, 0.98)),
    #071620;
  border-color: rgba(34, 211, 238, 0.32);
}

.analysis-thumb.quality-bg-uncommon {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(74, 222, 128, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(18, 46, 37, 0.94), rgba(7, 23, 22, 0.98)),
    #071716;
  border-color: rgba(74, 222, 128, 0.30);
}

.analysis-thumb.quality-bg-common {
  background:
    linear-gradient(180deg, rgba(56, 62, 68, 0.92), rgba(42, 46, 51, 0.98)),
    var(--bg-surface);
  border-color: rgba(166, 184, 206, 0.24);
}

.analysis-thumb-img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: inherit;
  object-fit: contain;
}

.analysis-thumb > span,
.detail-thumb > span {
  position: relative;
  z-index: 1;
}

.rating-badge {
  display: inline-grid;
  place-items: center;
  min-width: 38px;
  height: 25px;
  padding: 0 9px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 900;
  letter-spacing: 0;
  line-height: 1;
  text-shadow: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: var(--bg-surface-2);
  box-shadow: none;
}

.rating-SSS {
  color: #ffffff;
  background: linear-gradient(135deg, #9b5cff 0%, #f24dde 100%);
  border-color: rgba(255, 120, 238, 0.45);
  box-shadow:
    0 0 13px rgba(236, 72, 255, 0.62),
    0 0 2px rgba(255, 255, 255, 0.35);
}

.rating-SS {
  color: #ffffff;
  background: linear-gradient(135deg, #9d6bff 0%, #4d74ff 100%);
  border-color: rgba(144, 128, 255, 0.45);
  box-shadow:
    0 0 12px rgba(119, 102, 255, 0.58),
    0 0 2px rgba(255, 255, 255, 0.30);
}

.rating-S {
  color: #ffffff;
  background: linear-gradient(135deg, #38e8ff 0%, #4d74ff 100%);
  border-color: rgba(80, 190, 255, 0.42);
  box-shadow:
    0 0 11px rgba(56, 232, 255, 0.42),
    0 0 2px rgba(255, 255, 255, 0.24);
}

.rating-A, .rating-B {
  color: #bce985;
  background: rgba(163, 230, 53, 0.14);
  border-color: rgba(163, 230, 53, 0.26);
}

.rating-C {
  color: #f4d98b;
  background: rgba(250, 204, 21, 0.13);
  border-color: rgba(250, 204, 21, 0.24);
}

.rating-D {
  color: #ffb4b4;
  background: rgba(248, 113, 113, 0.13);
  border-color: rgba(248, 113, 113, 0.24);
}

.profit,
.num-positive { color: var(--success); }
.num-negative { color: var(--danger); }
.num-neutral { color: var(--text-secondary); }
.risk-high { color: var(--danger); }
.risk-mid { color: var(--warning); }
.risk-low { color: #a3e635; }
.empty { color: var(--text-muted); text-align: center; height: 180px; }

.adjusted-price {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  white-space: nowrap;
}

.adjusted-price-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 18px;
  height: 18px;
  padding: 0 4px;
  border: 1px solid rgba(34, 211, 238, 0.42);
  border-radius: 5px;
  color: #67e8f9;
  background: rgba(34, 211, 238, 0.12);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

/* desktop-source: styles/styles-detail-modal.css */
.modal.hidden {
  display: none;
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.48);
}

.detail-dialog {
  position: relative;
  z-index: 1;
  width: min(1120px, calc(100vw - 28px));
  height: min(820px, calc(100vh - 28px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid #35404e;
  border-radius: 2px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.42);
}

.sponsor-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 30px));
  max-height: calc(100vh - 30px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--bg-surface);
  border: 1px solid #35404e;
  border-radius: 6px;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.45);
}

.sponsor-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg-surface-2);
  border-bottom: 1px solid #35404e;
}

.sponsor-head h2 {
  margin: 0;
  font-size: 20px;
}

.sponsor-head p {
  margin: 5px 0 0;
  color: #9fb4d2;
  font-size: 12px;
}

.sponsor-image {
  display: block;
  width: 100%;
  max-height: calc(100vh - 130px);
  object-fit: contain;
  background: #8f65de;
}

.detail-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 14px;
  padding: 18px 20px;
  background: var(--bg-surface-2);
  border: 1px solid #3c4655;
}

.detail-title-block {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 12px;
}

.detail-title-block h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
}

.detail-title-block p {
  margin: 8px 0 0;
  color: #9fb4d2;
  font-size: 12px;
}

.detail-thumb {
  position: relative;
  isolation: isolate;
  width: 72px;
  height: 56px;
  flex: 0 0 72px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #2f3c4c;
  border-radius: 2px;
  background: var(--bg-surface-2);
}

.detail-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  background: inherit;
  object-fit: contain;
}

.detail-thumb.quality-bg-ultraRare {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(168, 85, 247, 0.28), transparent 58%),
    linear-gradient(180deg, rgba(49, 27, 70, 0.96), rgba(19, 13, 33, 0.98));
  border-color: rgba(168, 85, 247, 0.42);
}

.detail-thumb.quality-bg-rare {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(34, 211, 238, 0.23), transparent 58%),
    linear-gradient(180deg, rgba(13, 56, 72, 0.96), rgba(7, 23, 34, 0.98));
  border-color: rgba(34, 211, 238, 0.38);
}

.detail-thumb.quality-bg-uncommon {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(74, 222, 128, 0.20), transparent 58%),
    linear-gradient(180deg, rgba(19, 57, 42, 0.96), rgba(8, 25, 22, 0.98));
  border-color: rgba(74, 222, 128, 0.36);
}

.detail-tabs {
  display: flex;
  align-items: flex-end;
  gap: 0;
  padding: 0 14px;
}

.detail-tab {
  min-height: 34px;
  width: auto;
  padding: 0 16px;
  color: #d9e8ff;
  background: var(--bg-surface);
  border: 1px solid #5b6472;
  border-bottom-color: #bfc7d4;
  border-radius: 0;
  font-size: 14px;
}

.detail-tab + .detail-tab {
  margin-left: -1px;
}

.detail-tab.active {
  color: #ffffff;
  background: var(--bg-surface-2);
  border-color: #d6dbe4;
  border-bottom-color: var(--bg-surface-2);
}

.detail-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.detail-metric {
  min-height: 66px;
  padding: 12px 14px;
  background: var(--bg-surface);
  border: 1px solid #303947;
  border-radius: 0;
}

.detail-metric span {
  display: block;
  color: #98acd0;
  font-size: 12px;
  margin-bottom: 8px;
}

.detail-metric strong {
  color: inherit;
  font-size: 16px;
}

.detail-loading {
  min-height: 180px;
  display: flex;
  align-items: center;
  gap: 16px;
}

.detail-loading h3 {
  margin-top: 0;
}

.detail-loading p {
  margin-bottom: 0;
  color: var(--text-secondary);
}

.detail-loading-spinner {
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 3px solid rgba(148, 163, 184, 0.22);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: detail-spin 820ms linear infinite;
}

@keyframes detail-spin {
  to { transform: rotate(360deg); }
}

.detail-metric.metric-good strong,
.detail-metric.num-positive strong {
  color: #4ade80;
}

.detail-metric.metric-bad strong,
.detail-metric.num-negative strong {
  color: #fb7185;
}

.detail-metric.metric-warn strong {
  color: #facc15;
}

.detail-metric.metric-key strong,
.detail-metric.metric-rating strong {
  color: #7dd3fc;
}

.detail-report-group {
  margin: 0 0 12px;
  padding: 0 0 12px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.16);
}

.detail-report-group:last-child {
  margin-bottom: 0;
  padding-bottom: 0;
  border-bottom: 0;
}

.detail-report-group h4 {
  margin: 0 0 8px;
  color: #b9d2f4;
  font-size: 13px;
  font-weight: 850;
  line-height: 1.2;
}

.detail-report-subgroup {
  margin-top: 10px;
}

.detail-report-subgroup:first-of-type {
  margin-top: 0;
}

.detail-report-subgroup h5 {
  margin: 0 0 7px;
  color: #88a6c8;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.rrs-symbol-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.rrs-fact-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin: 0;
}

.mvs-symbol-strip {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}

.mvs-fact-strip {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tip-card {
  position: relative;
  cursor: help;
}

.tip-card:hover {
  z-index: 45;
}

.tip-card::before,
.tip-card::after {
  position: absolute;
  left: 10px;
  z-index: 40;
  opacity: 0;
  pointer-events: none;
  transition: opacity 120ms ease, transform 120ms ease;
}

.tip-card::before {
  content: "";
  top: calc(100% + 2px);
  width: 10px;
  height: 10px;
  background: #07111c;
  border-left: 1px solid rgba(125, 211, 252, 0.36);
  border-top: 1px solid rgba(125, 211, 252, 0.36);
  transform: translateY(-3px) rotate(45deg);
}

.tip-card::after {
  content: attr(data-tip);
  top: calc(100% + 8px);
  min-width: 170px;
  max-width: 320px;
  padding: 8px 10px;
  color: #eaf6ff;
  background: #07111c;
  border: 1px solid rgba(125, 211, 252, 0.36);
  border-radius: 6px;
  box-shadow: 0 16px 34px rgba(0, 0, 0, 0.38), 0 0 16px rgba(56, 189, 248, 0.10);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.45;
  white-space: pre-line;
  transform: translateY(-3px);
}

.tip-card:hover::before,
.tip-card:hover::after {
  opacity: 1;
  transform: translateY(0);
}

.tip-card:hover::before {
  transform: translateY(0) rotate(45deg);
}

.rrs-symbol-card {
  min-width: 0;
  min-height: 54px;
  display: grid;
  grid-template-columns: minmax(38px, auto) minmax(0, 1fr);
  align-items: center;
  gap: 8px;
  padding: 9px 10px;
  background: rgba(9, 15, 22, 0.76);
  border: 1px solid #303947;
  border-radius: 6px;
}

.rrs-symbol-card span {
  width: auto;
  min-width: 38px;
  max-width: 52px;
  height: 34px;
  display: grid;
  place-items: center;
  padding: 0 5px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.05;
  letter-spacing: 0;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

.rrs-symbol-card strong {
  min-width: 0;
  overflow: hidden;
  color: #f8fbff;
  font-size: 16px;
  font-weight: 900;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rrs-symbol-anchor {
  border-color: rgba(148, 163, 184, 0.42);
}

.rrs-symbol-anchor span {
  background: linear-gradient(135deg, #64748b, #94a3b8);
}

.rrs-symbol-low {
  border-color: rgba(56, 189, 248, 0.45);
}

.rrs-symbol-low span {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.30);
}

.rrs-symbol-low strong {
  color: #7dd3fc;
}

.rrs-symbol-high {
  border-color: rgba(74, 222, 128, 0.45);
}

.rrs-symbol-high span {
  background: linear-gradient(135deg, #4ade80, #22c55e);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.30);
}

.rrs-symbol-high strong,
.rrs-symbol-profit strong {
  color: #86efac;
}

.rrs-symbol-sell {
  border-color: rgba(250, 204, 21, 0.42);
}

.rrs-symbol-sell span {
  background: linear-gradient(135deg, #facc15, #f97316);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.28);
}

.rrs-symbol-sell strong {
  color: #fde68a;
}

.rrs-symbol-profit {
  border-color: rgba(74, 222, 128, 0.45);
}

.rrs-symbol-profit span {
  background: linear-gradient(135deg, #22c55e, #14b8a6);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.28);
}

.rrs-symbol-loss {
  border-color: rgba(251, 113, 133, 0.45);
}

.rrs-symbol-loss span {
  background: linear-gradient(135deg, #fb7185, #ef4444);
  box-shadow: 0 0 16px rgba(251, 113, 133, 0.28);
}

.rrs-symbol-loss strong {
  color: #fda4af;
}

.low-scenario-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 12px;
}

.low-scenario-card {
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 10px 12px;
  background: rgba(9, 15, 22, 0.78);
  border: 1px solid #303947;
  border-radius: 6px;
}

.low-scenario-symbol {
  width: 42px;
  height: 32px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  border-radius: 6px;
  color: #ffffff;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.low-scenario-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.low-scenario-main strong {
  overflow: hidden;
  color: #f8fbff;
  font-size: 17px;
  line-height: 1.05;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.low-scenario-main em {
  color: #9fb0c7;
  font-size: 12px;
  font-style: normal;
  font-weight: 800;
}

.low-scenario-less {
  border-color: rgba(250, 204, 21, 0.42);
  box-shadow: inset 0 0 0 1px rgba(250, 204, 21, 0.08);
}

.low-scenario-less .low-scenario-symbol {
  background: linear-gradient(135deg, #facc15, #f97316);
  box-shadow: 0 0 16px rgba(250, 204, 21, 0.35);
}

.low-scenario-less .low-scenario-main strong {
  color: #fde68a;
}

.low-scenario-same {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.1);
}

.low-scenario-same .low-scenario-symbol {
  background: linear-gradient(135deg, #38bdf8, #6366f1);
  box-shadow: 0 0 16px rgba(56, 189, 248, 0.32);
}

.low-scenario-same .low-scenario-main strong {
  color: #7dd3fc;
}

.low-scenario-more {
  border-color: rgba(74, 222, 128, 0.45);
  box-shadow: inset 0 0 0 1px rgba(74, 222, 128, 0.1);
}

.low-scenario-more .low-scenario-symbol {
  background: linear-gradient(135deg, #4ade80, #14b8a6);
  box-shadow: 0 0 16px rgba(74, 222, 128, 0.32);
}

.low-scenario-more .low-scenario-main strong {
  color: #86efac;
}

.low-scenario-surge {
  border-color: rgba(248, 113, 113, 0.48);
  box-shadow: inset 0 0 0 1px rgba(248, 113, 113, 0.12);
}

.low-scenario-surge .low-scenario-symbol {
  background: linear-gradient(135deg, #fb7185, #ef4444);
  box-shadow: 0 0 16px rgba(248, 113, 113, 0.34);
}

.low-scenario-surge .low-scenario-main strong {
  color: #fca5a5;
}

.low-inline-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  width: max-content;
  min-width: max-content;
  padding: 3px 7px;
  color: #7dd3fc;
  background: rgba(56, 189, 248, 0.11);
  border: 1px solid rgba(56, 189, 248, 0.35);
  border-radius: 999px;
  font-weight: 850;
  line-height: 1.1;
  white-space: nowrap;
  overflow: visible;
  text-overflow: clip;
}

.low-inline-pill .low-inline-label {
  flex: 0 0 auto;
  color: #ffffff;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
}

.low-inline-pill .low-inline-value {
  flex: 0 0 auto;
  color: #7dd3fc;
  font: inherit;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.01em;
  line-height: 1;
  white-space: nowrap;
}

.low-inline-muted {
  color: #b6c7d8;
  background: rgba(100, 116, 139, 0.12);
  border-color: rgba(148, 163, 184, 0.34);
}

/* desktop-source: styles/styles-detail-report.css */
.detail-body {
  min-height: 0;
  flex: 1;
  margin: 0 14px 14px;
  padding: 0 0 14px;
  overflow: auto;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.detail-lead {
  display: none;
}

.detail-lead.hidden {
  display: none;
}

.detail-section {
  margin-top: 10px;
  padding: 16px 18px;
  background: linear-gradient(180deg, rgba(34, 40, 49, 0.98), rgba(27, 33, 42, 0.98));
  border: 1px solid #343f4d;
  border-radius: 4px;
}

.detail-section h3 {
  margin: 0 0 14px;
  font-size: 17px;
  color: #f6fbff;
}

.detail-section p {
  margin: 0;
  color: #e4efff;
  line-height: 1.72;
  white-space: pre-wrap;
}

.detail-section p + p {
  margin-top: 10px;
}

.detail-section-conclusion {
  padding-top: 16px;
  padding-bottom: 16px;
  border-color: rgba(250, 204, 21, 0.26);
  background:
    linear-gradient(90deg, rgba(250, 204, 21, 0.06), transparent 42%),
    linear-gradient(180deg, rgba(48, 53, 58, 0.98), rgba(42, 46, 51, 0.98));
}

.detail-section-chart {
  padding: 14px 16px 16px;
}

.official-chart-summary {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin: -2px 0 10px;
}

.official-chart-wrap {
  position: relative;
}

.official-chart-summary span {
  display: inline-flex;
  align-items: center;
  min-width: 0;
  max-width: 100%;
  min-height: 24px;
  padding: 0 9px;
  color: #bfd5f2;
  background: rgba(48, 53, 58, 0.64);
  border: 1px solid rgba(148, 163, 184, 0.20);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-align: left;
  white-space: normal;
  overflow-wrap: anywhere;
}

.official-chart-summary [data-return-event-chip] {
  flex: 1 1 320px;
  justify-content: flex-start;
  padding-top: 4px;
  padding-bottom: 4px;
}

.official-chart {
  display: block;
  width: 100%;
  height: 316px;
  overflow: visible;
}

.official-chart .chart-bg {
  fill: #081522;
  stroke: #1d3955;
  stroke-width: 1;
}

.official-chart .chart-grid line {
  stroke: rgba(148, 163, 184, 0.16);
  stroke-width: 1;
}

.official-chart .chart-grid text,
.official-chart .chart-xlabels text {
  fill: #8fa7c8;
  font-size: 12px;
  font-weight: 700;
}

.official-chart .chart-grid text {
  text-anchor: end;
}

.official-chart .chart-volume rect {
  fill: rgba(74, 222, 128, 0.32);
}

.official-chart .chart-volume-axis {
  stroke: rgba(148, 163, 184, 0.24);
  stroke-width: 1;
}

.official-chart .chart-price-line {
  fill: none;
  stroke: #ef5f6f;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.detail-short-chart {
  height: 230px;
}

.detail-short-chart .chart-price-line {
  stroke: #38bdf8;
}

.detail-short-chart .chart-volume rect {
  fill: rgba(45, 212, 191, 0.34);
}

.short-term-chart-wrap .chart-bg {
  stroke: rgba(56, 189, 248, 0.32);
}

.official-chart-summary .short-chart-note {
  color: #dbeafe;
  background: rgba(37, 99, 235, 0.28);
  border-color: rgba(96, 165, 250, 0.46);
}

.official-chart .chart-last-point {
  fill: #ffd166;
  stroke: #07111f;
  stroke-width: 2;
}

.official-chart .chart-focus.hidden,
.official-chart-tooltip.hidden {
  display: none;
}

.official-chart .chart-cross-x,
.official-chart .chart-cross-y {
  stroke: rgba(191, 213, 242, 0.42);
  stroke-width: 1;
  stroke-dasharray: 4 5;
  pointer-events: none;
}

.official-chart .chart-focus-point {
  fill: #ffd166;
  stroke: #07111f;
  stroke-width: 2;
  pointer-events: none;
}

.official-chart .chart-hit-point {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
  pointer-events: all;
}

.official-chart .chart-hit-point.active {
  fill: rgba(255, 209, 102, 0.18);
  stroke: rgba(255, 209, 102, 0.70);
  stroke-width: 1;
}

.official-chart-tooltip {
  position: absolute;
  z-index: 4;
  width: 168px;
  padding: 9px 10px;
  color: #e8f3ff;
  background: rgba(37, 41, 45, 0.94);
  border: 1px solid rgba(148, 163, 184, 0.32);
  border-radius: 7px;
  box-shadow: 0 14px 38px rgba(0, 0, 0, 0.34);
  pointer-events: none;
}

.official-chart-tooltip strong,
.official-chart-tooltip span {
  display: block;
}

.official-chart-tooltip strong {
  margin-bottom: 6px;
  color: #ffffff;
  font-size: 13px;
}

.official-chart-tooltip span {
  color: #b9cbe4;
  font-size: 12px;
  line-height: 1.55;
}

.official-chart-tooltip b {
  color: #ffd166;
}

.official-chart-empty {
  padding: 20px;
  color: var(--text-secondary);
  background: rgba(48, 53, 58, 0.48);
  border: 1px dashed rgba(148, 163, 184, 0.28);
  border-radius: 6px;
  font-size: 14px;
  font-weight: 650;
}

.detail-verdict strong {
  display: block;
  margin-bottom: 10px;
  color: var(--warning);
  font-size: 26px;
  line-height: 1;
}

.detail-verdict-good strong { color: #facc15; }
.detail-verdict-watch strong { color: #facc15; }
.detail-verdict-bad strong { color: var(--danger); }

.detail-copy {
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0;
}

.detail-report {
  line-height: 1.82;
}

.detail-basis {
  color: #cbd5e1;
  font-size: 13px;
}

.hot-good {
  color: #4ade80;
  font-weight: 800;
}

.hot-bad {
  color: #fb7185;
  font-weight: 800;
}

.hot-warn {
  color: #facc15;
  font-weight: 800;
}

.hot-info {
  color: #7dd3fc;
  font-weight: 800;
}

.hot-number {
  color: #f8d36c;
  font-weight: 850;
}

.detail-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.detail-tags span {
  padding: 4px 8px;
  color: #b9d2f4;
  background: var(--bg-surface);
  border: 1px solid #303947;
}

.permanent-supply-note,
.battle-pass-vehicle-note,
.skin-short-only-note {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid rgba(45, 212, 191, 0.34);
  background: rgba(13, 148, 136, 0.12);
  color: #c6fffa;
  font-size: 13px;
  line-height: 1.45;
}

.permanent-supply-note strong,
.battle-pass-vehicle-note strong,
.skin-short-only-note strong {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 6px;
  color: #99f6e4;
  background: rgba(13, 148, 136, 0.25);
  font-size: 12px;
  line-height: 1;
}

.permanent-supply-note span,
.battle-pass-vehicle-note span,
.skin-short-only-note span {
  min-width: 0;
}

.battle-pass-vehicle-note {
  border-color: rgba(96, 165, 250, 0.36);
  background: rgba(37, 99, 235, 0.13);
  color: #dbeafe;
}

.battle-pass-vehicle-note strong {
  color: #bfdbfe;
  background: rgba(37, 99, 235, 0.28);
}

.skin-short-only-note {
  border-color: rgba(56, 189, 248, 0.38);
  background: rgba(14, 116, 144, 0.14);
  color: #dff7ff;
}

.skin-short-only-note strong {
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.32);
}

.detail-raw {
  margin: 0;
  color: #cbd5e1;
  white-space: pre-wrap;
  word-break: break-word;
  font: 12px/1.55 Consolas, "Cascadia Mono", monospace;
}

.detail-error {
  color: var(--danger) !important;
}

@media (max-width: 760px) {
  .detail-dialog {
    width: calc(100vw - 16px);
    height: calc(100vh - 16px);
  }

  .detail-head {
    margin: 8px;
    padding: 12px;
  }

  .detail-title-block h2 {
    font-size: 18px;
  }

  .detail-body {
    margin: 0 8px 8px;
  }

  .detail-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rrs-symbol-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .rrs-fact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .mvs-symbol-strip,
  .mvs-fact-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .low-scenario-strip {
    grid-template-columns: 1fr;
  }
}

/* desktop-source: styles/styles-filter-controls.css */
.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(112px, 1fr));
  gap: 8px;
  margin-bottom: 8px;
}

.full-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.full-filters select {
  width: 180px;
  max-width: 220px;
  flex: 0 0 180px;
}

.filters select, #tableFilter {
  height: 38px;
  padding: 0 10px;
}

.budget-filter {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  min-height: 38px;
  padding: 0 10px;
  color: var(--text-secondary);
  background: var(--bg-surface-2);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.budget-filter:hover,
.budget-filter:focus-within {
  border-color: var(--border-strong);
  background: var(--bg-surface-3);
}

.budget-filter span {
  flex: 0 0 auto;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
}

.analysis-tools .budget-filter span {
  color: inherit;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.budget-filter input[data-budget-input] {
  flex: 0 0 88px;
  width: 88px;
  min-width: 88px;
  height: 26px;
  min-height: 26px;
  margin: 0;
  padding: 0 8px;
  color: var(--text-primary);
  background: var(--bg-surface);
  border-color: var(--border-soft);
  font-size: 12px;
  font-weight: 800;
  text-align: right;
}

.budget-plan-filter,
.budget-plan-control {
  border-color: rgba(74, 166, 214, 0.34);
  background: rgba(13, 27, 45, 0.84);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 0 0 1px rgba(12, 44, 68, 0.20);
}

.budget-plan-filter:focus-within,
.budget-plan-control:focus-within {
  border-color: rgba(67, 217, 255, 0.72);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.14), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.budget-plan-filter input[type="number"],
.budget-plan-control input[type="number"] {
  appearance: textfield;
  -moz-appearance: textfield;
  color: #effbff;
  background: rgba(7, 20, 34, 0.72);
  border: 1px solid rgba(74, 166, 214, 0.36);
  border-radius: 7px;
  font-variant-numeric: tabular-nums;
}

.budget-plan-filter input[type="number"]::-webkit-outer-spin-button,
.budget-plan-filter input[type="number"]::-webkit-inner-spin-button,
.budget-plan-control input[type="number"]::-webkit-outer-spin-button,
.budget-plan-control input[type="number"]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.filters .budget-filter {
  width: 100%;
}

.analysis-tools .budget-filter {
  flex: 0 1 240px;
  min-height: 32px;
}

.sidebar-budget-filter {
  width: 100%;
  min-height: 32px;
  margin: 2px 0 8px;
}

.sidebar-budget-filter input[data-budget-input] {
  flex: 1 1 auto;
  width: 0;
  min-width: 82px;
}

.hud-native-select {
  position: absolute !important;
  width: 1px !important;
  min-width: 1px !important;
  height: 1px !important;
  min-height: 1px !important;
  padding: 0 !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.hud-select {
  position: relative;
  min-width: 0;
  z-index: 1;
}

.filters .hud-select {
  width: 100%;
}

.full-filters .hud-select {
  flex: 0 0 180px;
  width: 180px;
  max-width: 220px;
}

.hud-select.open {
  z-index: 80;
}

.hud-select-button {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  height: 38px;
  min-width: 0;
  padding: 0 10px 0 12px;
  color: #effbff;
  background:
    linear-gradient(180deg, rgba(18, 43, 70, 0.92), rgba(8, 23, 39, 0.94));
  border: 1px solid rgba(74, 166, 214, 0.38);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 0 0 1px rgba(12, 44, 68, 0.24);
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-align: left;
}

.hud-select-button:hover,
.hud-select.open .hud-select-button {
  border-color: rgba(67, 217, 255, 0.72);
  background:
    linear-gradient(180deg, rgba(20, 52, 86, 0.96), rgba(9, 29, 49, 0.98));
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.12), inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

.hud-select-current {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.hud-select-arrow {
  flex: 0 0 auto;
  color: #69e6ff;
  font-size: 15px;
  line-height: 1;
}

.hud-select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  display: none;
  width: max(100%, min(var(--hud-select-menu-width, 230px), calc(100vw - 24px)));
  max-width: calc(100vw - 24px);
  padding: 8px;
  color: #e8faff;
  background:
    linear-gradient(180deg, rgba(10, 27, 45, 0.98), rgba(6, 18, 31, 0.98));
  border: 1px solid rgba(67, 217, 255, 0.34);
  border-radius: 8px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.42), 0 0 26px rgba(23, 170, 218, 0.16);
}

.hud-select.align-right .hud-select-menu {
  right: 0;
  left: auto;
}

.hud-select.open .hud-select-menu {
  display: block;
}

.hud-select-menu-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 7px;
  padding: 0 2px;
}

.hud-select-title {
  color: #7feeff;
  font-size: 12px;
  font-weight: 900;
}

.hud-select-count {
  color: rgba(184, 221, 242, 0.72);
  font-size: 11px;
  font-weight: 800;
}

.hud-select-search {
  width: 100%;
  height: 32px;
  margin-bottom: 7px;
  padding: 0 9px;
  color: #f2fbff;
  background: rgba(5, 17, 30, 0.86);
  border: 1px solid rgba(74, 166, 214, 0.34);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}

.hud-select-search:focus {
  border-color: rgba(67, 217, 255, 0.78);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.12);
  outline: none;
}

.hud-select-list {
  display: grid;
  grid-template-columns: repeat(var(--hud-select-columns, 1), minmax(104px, 1fr));
  gap: 4px;
  max-height: none;
  overflow: visible;
  padding-right: 2px;
}

.hud-select-option {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 30px;
  padding: 0 9px;
  color: rgba(232, 250, 255, 0.88);
  background: rgba(18, 41, 66, 0.48);
  border: 1px solid rgba(74, 166, 214, 0.16);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 850;
  text-align: left;
}

.hud-select-option:hover {
  color: #ffffff;
  background: rgba(24, 78, 111, 0.74);
  border-color: rgba(67, 217, 255, 0.48);
}

.hud-select-option.active {
  color: #06131f;
  background: linear-gradient(180deg, rgba(80, 230, 255, 0.95), rgba(32, 174, 232, 0.92));
  border-color: rgba(154, 244, 255, 0.92);
}

.hud-select-empty {
  display: grid;
  place-items: center;
  min-height: 48px;
  color: rgba(184, 221, 242, 0.72);
  border: 1px dashed rgba(74, 166, 214, 0.24);
  border-radius: 7px;
  font-size: 12px;
  font-weight: 800;
}


/* desktop-source: styles/styles-catalog-cards.css */
.actions {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}

.actions button,
.filters select {
  min-width: 0;
}

.catalog-page-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.catalog-page-actions button {
  min-width: 112px;
}

.catalog-page-actions select {
  width: 160px;
  height: 36px;
}

#selectedCount {
  color: var(--text-secondary);
  font-size: 13px;
  white-space: nowrap;
}

.card-scroll {
  min-height: 0;
  flex: 1;
  overflow: auto;
  overflow-anchor: none;
  overscroll-behavior: contain;
  border: 1px solid var(--border-soft);
  background: var(--bg-surface);
  padding: 8px;
  border-radius: 8px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
}

.catalog-empty {
  grid-column: 1 / -1;
  display: grid;
  place-items: center;
  min-height: 180px;
  padding: 18px;
  border: 1px dashed var(--border-soft);
  border-radius: 8px;
  background: var(--bg-surface);
}

.product-card {
  position: relative;
  height: 170px;
  overflow: hidden;
  contain: layout paint style;
  content-visibility: auto;
  contain-intrinsic-size: 180px 170px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
}

.product-card.common {
  background:
    linear-gradient(180deg, rgba(56, 62, 68, 0.94), rgba(42, 46, 51, 0.98)),
    var(--bg-surface);
  border-color: rgba(166, 184, 206, 0.26);
}

.product-card.uncommon {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(93, 255, 154, 0.16), transparent 58%),
    linear-gradient(180deg, rgba(22, 68, 52, 0.94), rgba(12, 36, 32, 0.98)),
    #0e2a25;
  border-color: rgba(93, 255, 154, 0.30);
}

.product-card.rare {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(56, 232, 255, 0.17), transparent 58%),
    linear-gradient(180deg, rgba(20, 66, 86, 0.94), rgba(12, 38, 54, 0.98)),
    #0e2b3d;
  border-color: rgba(56, 232, 255, 0.32);
}

.product-card.ultraRare {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(190, 122, 255, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(62, 41, 85, 0.95), rgba(26, 22, 45, 0.98)),
    #1a172d;
  border-color: rgba(190, 122, 255, 0.34);
}

.product-card:hover { border-color: rgba(34, 211, 238, 0.65); }

.product-card.selected {
  border-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--accent);
}

.thumb {
  height: 72px;
  display: grid;
  place-items: center;
  margin-bottom: 7px;
}

.thumb img {
  max-width: 100%;
  max-height: 66px;
  object-fit: contain;
}

.star {
  position: absolute;
  right: 8px;
  top: 12px;
  width: 30px;
  min-height: 28px;
  padding: 0;
  color: #bfdbfe;
  font-size: 18px;
  line-height: 1;
}

.inventory-add {
  position: absolute;
  left: 8px;
  top: 12px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 6px;
  color: #d8f7ff;
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.34);
  font-size: 11px;
  font-weight: 850;
}

.inventory-add.active {
  color: #071620;
  background: var(--accent);
  border-color: var(--accent);
}

.meta, .bottom {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.1;
}

.rarity.ultraRare { color: var(--purple); }
.rarity.rare { color: var(--accent); }
.rarity.uncommon { color: var(--success); }
.rarity.common { color: var(--text-secondary); }

.title {
  margin-top: 5px;
  height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #f8fbff;
  font-family: "Microsoft YaHei", sans-serif;
  font-size: 13px;
  font-weight: 800;
}

.catalog-chart {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 39px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.14);
  border-radius: 6px;
  background: rgba(37, 41, 45, 0.32);
}

.catalog-chart svg {
  display: block;
  width: 100%;
  height: 100%;
}

.catalog-chart-volume rect {
  fill: rgba(74, 222, 128, 0.20);
}

.catalog-chart-line {
  fill: none;
  stroke: #ef5f6f;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.catalog-chart-last {
  fill: #ffd166;
  stroke: #07111f;
  stroke-width: 1;
}

.catalog-chart-empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #8fa7c8;
  border-style: dashed;
  font-size: 11px;
  font-weight: 800;
}

.product-card .catalog-chart {
  display: none;
}

.bottom {
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 9px;
  align-items: flex-end;
}

.cat { color: var(--accent); }

.return-label {
  display: block;
  margin-top: 3px;
  color: var(--warning);
}

.bp-label {
  display: block;
  margin-top: 2px;
  color: #7dd3fc;
  font-size: 10px;
  line-height: 1.2;
}

.price { text-align: right; }
.sell { color: var(--success); font-size: 13px; font-weight: 900; }
.buy { color: #d2e7ff; margin-top: 2px; font-size: 11px; }

.cache-grid {
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
}

.cache-card {
  height: 208px;
  cursor: default;
}

.cache-card .thumb {
  height: 72px;
  margin-bottom: 6px;
}

.cache-card .thumb img {
  max-height: 68px;
}

.cache-thumb span {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #071620;
  background: var(--accent);
  border-radius: 6px;
  font-weight: 900;
}

.cache-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  max-width: 116px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  padding: 3px 7px;
  color: #d8f7ff;
  background: rgba(34, 211, 238, 0.12);
  border: 1px solid rgba(34, 211, 238, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.cache-market {
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text-muted);
  font-size: 11px;
}

.cache-delete {
  position: absolute;
  left: 8px;
  bottom: 10px;
  z-index: 2;
}

.cache-empty {
  grid-column: 1 / -1;
  padding: 18px;
}

.catalog-pagination {
  display: grid;
  grid-template-columns: 34px minmax(150px, auto) 34px;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 42px;
  padding: 6px 0 0;
}

.catalog-page-button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 0;
  color: var(--text);
  font-size: 24px;
  line-height: 1;
}

.catalog-page-button:disabled {
  cursor: default;
  opacity: 0.38;
}

.catalog-page-text {
  min-width: 150px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

/* desktop-source: styles/styles-budget-page-base.css */
.budget-page .page-shell {
  background: var(--bg-main);
}

.budget-page-head {
  gap: 14px;
}

.budget-plan-tools {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.budget-plan-filter {
  flex: 0 1 230px;
  min-height: 34px;
}

.budget-plan-control {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 10px;
  color: #cfeaff;
  background: rgba(13, 27, 45, 0.84);
  border: 1px solid rgba(74, 166, 214, 0.34);
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.budget-plan-control input {
  width: 62px;
  height: 26px;
  min-height: 26px;
  padding: 0 7px;
  text-align: right;
  font-size: 12px;
  font-weight: 850;
}

.budget-category-panel {
  margin: 8px 0 12px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(96, 165, 250, 0.04)),
    rgba(7, 18, 31, 0.74);
  border: 1px solid rgba(74, 166, 214, 0.28);
  border-radius: 8px;
}


/* desktop-source: styles/styles-membership-page.css */
.membership-page {
  overflow-x: hidden;
  overflow-y: auto;
  background: var(--bg-main);
}

.membership-shell {
  width: min(920px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.membership-heading,
.membership-card-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.membership-heading {
  margin-bottom: 18px;
}

.membership-kicker {
  color: #67e8f9;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 1.5px;
}

.membership-heading h1,
.membership-card-title h2 {
  margin: 4px 0 6px;
  color: #f2f5ff;
}

.membership-heading p,
.membership-card-title p,
.membership-hint {
  margin: 0;
  color: var(--text-muted);
}

.membership-badge {
  flex: 0 0 auto;
  padding: 7px 12px;
  border: 1px solid rgba(34, 211, 238, .35);
  border-radius: 999px;
  color: #8eeaff;
  background: rgba(8, 145, 178, .12);
  font-size: 12px;
  font-weight: 900;
}

.membership-card {
  padding: 22px;
  border: 1px solid rgba(129, 140, 248, .32);
  border-radius: 14px;
  background:
    radial-gradient(circle at 92% 0%, rgba(99, 102, 241, .16), transparent 38%),
    linear-gradient(145deg, rgba(30, 41, 69, .94), rgba(8, 21, 38, .96));
  box-shadow: 0 18px 45px rgba(0, 0, 0, .24);
}

.membership-badge[data-active="true"] {
  color: #c9ffe0;
  border-color: rgba(74, 222, 128, .42);
  background: rgba(34, 197, 94, .12);
}

.membership-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}

.membership-facts > div {
  min-width: 0;
  padding: 13px 14px;
  border: 1px solid rgba(129, 140, 248, .2);
  border-radius: 9px;
  background: rgba(4, 15, 29, .62);
}

.membership-facts span,
.membership-facts strong {
  display: block;
}

.membership-facts span {
  margin-bottom: 6px;
  color: #8299ae;
  font-size: 11px;
}

.membership-facts strong {
  overflow: hidden;
  color: #eef2ff;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.membership-code-field {
  display: grid;
  gap: 8px;
}

.membership-code-field > span {
  color: #dbeafe;
  font-size: 12px;
  font-weight: 900;
}

.membership-code-field input {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(96, 165, 250, .54);
  border-radius: 9px;
  color: #eef2ff;
  background: rgba(20, 39, 61, .92);
  font-family: Consolas, monospace;
  font-size: 14px;
  font-weight: 800;
  letter-spacing: .4px;
  text-transform: uppercase;
  outline: none;
}

.membership-code-field input:focus {
  border-color: #38bdf8;
  box-shadow: 0 0 0 3px rgba(56, 189, 248, .14);
}

.membership-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.membership-actions button {
  min-width: 126px;
}

.membership-hint {
  margin-top: 14px;
  font-size: 12px;
}

@media (max-width: 760px) {
  .membership-shell { padding: 16px; }
  .membership-heading { align-items: center; }
  .membership-facts { grid-template-columns: 1fr; }
  .membership-actions button { flex: 1 1 150px; }
}

/* desktop-source: styles/styles-settings-page.css */
.settings-page .page-shell {
  gap: 14px;
  height: auto;
  min-height: 100%;
  overflow: visible;
  background: var(--bg-main);
}

.settings-page {
  overflow-x: hidden;
  overflow-y: auto;
}

.settings-token-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 7px !important;
  min-height: 30px;
  padding: 6px 12px;
  color: #dff7ff !important;
  font-size: 12px !important;
  font-weight: 900;
  line-height: 1.35 !important;
  border: 1px solid rgba(67, 217, 255, 0.34);
  border-radius: 999px;
  background:
    linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(37, 99, 235, 0.10)),
    rgba(8, 20, 36, 0.72);
  box-shadow:
    0 0 0 1px rgba(67, 217, 255, 0.06),
    0 10px 22px rgba(0, 0, 0, 0.18);
}

.settings-token-status::before {
  content: "";
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #67e8f9;
  box-shadow: 0 0 10px rgba(103, 232, 249, 0.78);
}

.settings-token-status.trade-missing {
  color: #ffd6d6 !important;
  border-color: rgba(248, 113, 113, 0.46);
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.18), rgba(251, 146, 60, 0.08)),
    rgba(24, 10, 14, 0.72);
}

.settings-token-status.trade-missing::before {
  background: #fb7185;
  box-shadow: 0 0 12px rgba(251, 113, 133, 0.86);
}

.settings-token-status.trade-ready {
  color: #d7ffe7 !important;
  border-color: rgba(34, 197, 94, 0.46);
  background:
    linear-gradient(135deg, rgba(34, 197, 94, 0.18), rgba(14, 165, 233, 0.08)),
    rgba(8, 24, 18, 0.72);
}

.settings-token-status.trade-ready::before {
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.82);
}

.settings-grid {
  display: grid;
  grid-template-columns: minmax(360px, 1.2fr) minmax(280px, 0.8fr);
  gap: 14px;
  align-items: start;
}

.settings-card {
  padding: 16px;
  background:
    linear-gradient(135deg, rgba(96, 165, 250, 0.08), rgba(34, 211, 238, 0.035)),
    var(--bg-surface);
  border: 1px solid rgba(125, 184, 235, 0.24);
  border-radius: 8px;
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.settings-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.settings-card h2 {
  margin: 0 0 6px;
  color: var(--text-primary);
  font-size: 18px;
  line-height: 1.2;
}

.settings-card p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13px;
  line-height: 1.55;
}

.settings-badge {
  flex: 0 0 auto;
  min-width: 54px;
  padding: 5px 10px;
  color: #bfdbfe;
  text-align: center;
  font-size: 12px;
  font-weight: 800;
  background: rgba(96, 165, 250, 0.12);
  border: 1px solid rgba(96, 165, 250, 0.30);
  border-radius: 999px;
}

.settings-badge.manual {
  color: #b9f5ff;
  background: rgba(34, 211, 238, 0.12);
  border-color: rgba(34, 211, 238, 0.36);
}

.settings-badge.warning {
  color: #ffd2d2;
  background: rgba(190, 62, 72, 0.14);
  border-color: rgba(248, 113, 113, 0.38);
}

.settings-field {
  display: grid;
  gap: 8px;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 800;
}

.settings-token-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.settings-token-box {
  min-width: 0;
}

.settings-field textarea,
.settings-field input {
  width: 100%;
  padding: 12px;
  color: var(--text-primary);
  background: rgba(13, 27, 45, 0.72);
  border: 1px solid rgba(125, 184, 235, 0.28);
  border-radius: 8px;
  outline: none;
  line-height: 1.45;
}

.settings-field textarea {
  min-height: 150px;
  resize: vertical;
}

.settings-field input {
  min-height: 44px;
}

.settings-field textarea:focus,
.settings-field input:focus {
  border-color: rgba(96, 165, 250, 0.52);
  box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.12);
}

.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}

.settings-hint {
  margin-top: 12px !important;
  color: var(--text-muted) !important;
}

.settings-token-guide {
  margin-top: 16px;
  border: 1px solid rgba(67, 217, 255, 0.42);
  border-radius: 12px;
  background:
    radial-gradient(circle at 12% 0%, rgba(67, 217, 255, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.18), rgba(14, 165, 233, 0.07)),
    rgba(8, 20, 36, 0.78);
  box-shadow:
    0 14px 36px rgba(0, 0, 0, 0.24),
    inset 0 1px 0 rgba(191, 219, 254, 0.10);
  overflow: hidden;
}

.settings-token-guide-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  border-bottom: 1px solid rgba(67, 217, 255, 0.18);
}

.settings-token-guide-kicker {
  margin: 0 0 4px !important;
  color: #67e8f9 !important;
  font-size: 11px;
  font-weight: 950;
  letter-spacing: 0;
}

.settings-token-guide-head h3 {
  margin: 0;
  color: #f0fbff;
  font-size: 18px;
  font-weight: 950;
}

.settings-token-guide-head span {
  display: block;
  margin-top: 5px;
  color: #a9bfd7;
  font-size: 12px;
}

.settings-token-guide-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.settings-token-guide-actions button {
  min-height: 34px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 900;
}

.settings-token-guide-body {
  padding: 14px 16px 16px;
  color: var(--text-secondary);
  font-size: 12px;
  line-height: 1.7;
}

.settings-token-guide-body ol {
  display: grid;
  gap: 6px;
  margin: 0;
  padding-left: 20px;
}

.settings-token-command {
  margin-top: 12px;
  border: 1px solid rgba(125, 184, 235, 0.20);
  border-radius: 10px;
  background: rgba(4, 12, 24, 0.62);
  overflow: hidden;
}

.settings-token-command-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(125, 184, 235, 0.14);
}

.settings-token-command-head strong {
  color: #dff7ff;
  font-size: 12px;
  font-weight: 950;
}

.settings-token-command-head span {
  color: #8ea7c1;
  font-size: 11px;
  text-align: right;
}

.settings-token-command pre {
  margin: 0;
  padding: 10px 12px;
  overflow: visible;
  color: #c7f6ff;
  background: transparent;
  font-family: Consolas, "SFMono-Regular", "Courier New", monospace;
  font-size: 10.5px;
  line-height: 1.45;
  white-space: pre-wrap;
  word-break: break-word;
  overflow-wrap: anywhere;
  tab-size: 2;
}

.settings-token-guide-note {
  margin: 10px 0 0 !important;
  color: #9fb5cc !important;
}

.update-card {
  border-color: rgba(34, 211, 238, 0.30);
  background:
    radial-gradient(circle at 18% 0%, rgba(34, 211, 238, 0.13), transparent 34%),
    linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(196, 92, 255, 0.045)),
    var(--bg-surface);
}

.settings-badge.github {
  color: #dff7ff;
  border-color: rgba(34, 211, 238, 0.46);
  background: rgba(8, 36, 57, 0.78);
}

.settings-update-source input {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: var(--text-primary);
  background: rgba(13, 27, 45, 0.76);
  border: 1px solid rgba(125, 184, 235, 0.28);
  border-radius: 8px;
}

.settings-update-source,
#saveUpdateSourceBtn {
  display: none !important;
}

.settings-update-version {
  margin-top: 12px;
}

.settings-update-version select {
  width: 100%;
  min-height: 42px;
  padding: 0 12px;
  color: #dff7ff;
  background: rgba(13, 27, 45, 0.82);
  border: 1px solid rgba(34, 211, 238, 0.28);
  border-radius: 8px;
  font-size: 13px;
  font-weight: 850;
  outline: none;
}

.settings-update-version select:focus {
  border-color: rgba(34, 211, 238, 0.58);
  box-shadow: 0 0 0 2px rgba(34, 211, 238, 0.10);
}

.settings-update-version select:disabled {
  cursor: not-allowed;
  opacity: 0.58;
}

.settings-update-notes {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 211, 238, 0.20);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.50);
}

.settings-update-notes[hidden] {
  display: none !important;
}

.settings-update-notes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
}

.settings-update-notes-head span {
  color: #8ea7c1;
  font-size: 11px;
  font-weight: 900;
}

.settings-update-notes-head strong {
  color: #8beeff;
  font-size: 12px;
  font-weight: 950;
}

.settings-update-notes pre {
  max-height: 160px;
  margin: 0;
  overflow: auto;
  color: #c9ddf1;
  font-family: inherit;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}

.settings-update-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.settings-update-facts > div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid rgba(125, 184, 235, 0.18);
  border-radius: 8px;
  background: rgba(5, 14, 28, 0.46);
}

.settings-update-facts span {
  display: block;
  margin-bottom: 5px;
  color: #8ea7c1;
  font-size: 11px;
  font-weight: 850;
}

.settings-update-facts strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: #dff7ff;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 950;
}

.settings-update-asset {
  grid-column: span 1;
}

.settings-update-status {
  margin-top: 12px;
  min-height: 40px;
  padding: 10px 12px;
  color: #b8cce4;
  font-size: 12px;
  font-weight: 850;
  line-height: 1.5;
  border: 1px solid rgba(125, 184, 235, 0.18);
  border-radius: 8px;
  background: rgba(4, 12, 24, 0.56);
}

.settings-update-status[data-mode="busy"] {
  color: #bfdbfe;
  border-color: rgba(96, 165, 250, 0.34);
}

.settings-update-status[data-mode="ready"],
.settings-update-status[data-mode="ok"] {
  color: #d7ffe7;
  border-color: rgba(34, 197, 94, 0.34);
}

.settings-update-status[data-mode="error"] {
  color: #ffd6d6;
  border-color: rgba(248, 113, 113, 0.42);
}

.settings-update-progress {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid rgba(34, 211, 238, 0.24);
  border-radius: 8px;
  background: rgba(3, 10, 22, 0.62);
  box-shadow: inset 0 0 18px rgba(34, 211, 238, 0.055);
}

.settings-update-progress[hidden] {
  display: none !important;
}

.settings-update-progress-head,
.settings-update-progress-bytes {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: #a8bfd8;
  font-size: 12px;
  font-weight: 850;
}

.settings-update-progress-head strong {
  color: #dff7ff;
  font-size: 13px;
  font-weight: 950;
}

.settings-update-progress-track {
  position: relative;
  overflow: hidden;
  height: 9px;
  margin: 9px 0 7px;
  border-radius: 999px;
  background: rgba(20, 38, 62, 0.82);
}

.settings-update-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #22d3ee, #60a5fa, #a78bfa);
  box-shadow: 0 0 14px rgba(34, 211, 238, 0.45);
  transition: width 180ms ease;
}

.settings-update-progress[data-phase="error"] {
  border-color: rgba(248, 113, 113, 0.42);
}

.settings-update-progress[data-phase="error"] .settings-update-progress-bar {
  background: linear-gradient(90deg, #fb7185, #f97316);
  box-shadow: 0 0 14px rgba(248, 113, 113, 0.30);
}

.settings-update-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.46;
}

.settings-update-actions button.warning {
  color: #ffe4d6;
  border-color: rgba(251, 146, 60, 0.46);
  background: linear-gradient(135deg, rgba(251, 146, 60, 0.18), rgba(127, 29, 29, 0.16));
  box-shadow: 0 0 16px rgba(251, 146, 60, 0.12);
}

.settings-update-delete {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid rgba(248, 113, 113, 0.22);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(248, 113, 113, 0.08), rgba(34, 211, 238, 0.035));
}

.settings-update-delete strong,
.settings-update-delete span {
  display: block;
}

.settings-diagnostics {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid rgba(96, 165, 250, 0.24);
  border-color: rgba(96, 165, 250, 0.26);
  background:
    linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(34, 211, 238, 0.025)),
    var(--bg-surface);
}

.settings-diagnostics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin: 12px 0;
}

.settings-diagnostics-grid > span {
  min-height: 42px;
  padding: 9px 11px;
  border-radius: 5px;
  background: rgba(8, 27, 45, 0.76);
  color: #b6cadb;
  font-size: 12px;
  line-height: 1.45;
}

.settings-diagnostics-grid > span[data-tone="warning"] {
  color: #ffd4d4;
  background: rgba(91, 27, 38, 0.42);
  box-shadow: inset 2px 0 0 rgba(248, 113, 113, 0.55);
}

.settings-diagnostics-cleanup {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: 0 0 12px;
  padding: 11px 12px;
  border: 1px solid rgba(248, 113, 113, 0.28);
  border-radius: 7px;
  background: rgba(91, 27, 38, 0.2);
  color: #c9d7e5;
  font-size: 12px;
}

.settings-diagnostics-cleanup[hidden] { display: none; }
.settings-diagnostics-cleanup strong { color: #ffd9dc; }
.settings-diagnostics-cleanup label { display: inline-flex; align-items: center; gap: 6px; }
.settings-diagnostics-cleanup button { margin-left: auto; }

.settings-update-delete strong {
  color: #ffe4e6;
  font-size: 13px;
  font-weight: 950;
}

.settings-update-delete span {
  margin-top: 4px;
  color: #aab8ca;
  font-size: 12px;
  line-height: 1.45;
}

.danger-zone {
  border-color: rgba(248, 113, 113, 0.28);
  background:
    linear-gradient(135deg, rgba(248, 113, 113, 0.10), rgba(96, 165, 250, 0.035)),
    var(--bg-surface);
}

@media (max-width: 980px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }

  .settings-token-grid {
    grid-template-columns: 1fr;
  }

  .settings-update-facts {
    grid-template-columns: 1fr;
  }

  .settings-token-guide-head,
  .settings-token-command-head {
    align-items: stretch;
    flex-direction: column;
  }

  .settings-token-guide-actions {
    justify-content: stretch;
  }

  .settings-token-guide-actions button {
    flex: 1 1 140px;
  }

  .settings-token-command-head span {
    text-align: left;
  }

  .settings-update-delete {
    grid-template-columns: 1fr;
  }
}

/* desktop-source: styles/styles-budget-planner.css */
.budget-category-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.budget-category-title span {
  color: #dff7ff;
  font-size: 12px;
  font-weight: 950;
}

.budget-category-title div {
  display: flex;
  gap: 6px;
}

.budget-category-title button {
  min-height: 28px;
  padding: 0 10px;
  border-radius: 6px;
  color: #dff7ff;
  border-color: rgba(67, 217, 255, 0.30);
  background: rgba(18, 42, 63, 0.86);
  font-size: 11px;
  font-weight: 900;
}

.budget-category-title button:hover {
  border-color: rgba(67, 217, 255, 0.56);
  background: rgba(24, 62, 88, 0.92);
}

.budget-category-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.budget-category-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 0 12px 0 10px;
  color: #d9efff;
  background: rgba(14, 35, 55, 0.88);
  border: 1px solid rgba(74, 166, 214, 0.32);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
  cursor: pointer;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035);
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.budget-category-chip:hover {
  color: #ffffff;
  border-color: rgba(67, 217, 255, 0.58);
  background: rgba(20, 53, 79, 0.94);
}

.budget-category-chip:has(input:checked) {
  color: #f4fdff;
  background: rgba(22, 118, 142, 0.74);
  border-color: rgba(86, 232, 255, 0.86);
  box-shadow: 0 0 0 1px rgba(67, 217, 255, 0.18), 0 0 14px rgba(34, 211, 238, 0.12);
}

.budget-category-chip input {
  appearance: none;
  -webkit-appearance: none;
  width: 17px;
  height: 17px;
  min-width: 17px;
  margin: 0;
  display: grid;
  place-items: center;
  border: 1px solid rgba(150, 204, 235, 0.58);
  border-radius: 5px;
  background: rgba(4, 15, 25, 0.72);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
}

.budget-category-chip input:checked {
  border-color: rgba(159, 250, 255, 0.96);
  background-color: #55e7fb;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.1 6.2 4.8 8.7 9.8 3.3' fill='none' stroke='%23041620' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #6cf5ff, #22c7dd);
}

.budget-category-chip span {
  color: inherit;
}

.budget-category-empty {
  color: var(--text-muted);
  font-size: 12px;
}

.budget-plan-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin: 10px 0 12px;
}

.budget-plan-kpis section {
  min-width: 0;
  padding: 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.budget-plan-kpis .budget-kpi-main {
  grid-column: span 2;
  min-height: 86px;
}

.budget-plan-kpis .budget-kpi-sub {
  grid-column: span 2;
  min-height: 58px;
  padding: 9px 10px;
  background: rgba(13, 27, 45, 0.54);
}

.budget-plan-kpis span,
.budget-cell span {
  display: block;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.15;
}

.budget-plan-kpis strong {
  display: block;
  margin-top: 5px;
  color: var(--success);
  font-size: 22px;
  line-height: 1.1;
}

.budget-plan-kpis .budget-kpi-cost strong {
  color: #ff9f9f;
}

.budget-plan-kpis strong.num-positive {
  color: #62f6a3;
}

.budget-plan-kpis strong.num-negative {
  color: #ff7f86;
}

.budget-plan-kpis strong.num-neutral {
  color: var(--text-secondary);
}

.budget-plan-kpis .budget-kpi-sub strong {
  margin-top: 3px;
  font-size: 17px;
}

.budget-plan-kpis small,
.budget-cell small {
  display: block;
  margin-top: 4px;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.25;
}

.budget-category-standards {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin: -4px 0 10px;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.25;
}

.budget-category-standards > span:not(.budget-standard-card) {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 26px;
  padding: 0 8px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 999px;
  font-weight: 850;
}

.budget-category-standards small {
  color: var(--text-muted);
  font-size: 10px;
}

.budget-standard-label b {
  color: var(--text-primary);
  font-size: 11px;
}

.budget-standard-label small {
  font-weight: 800;
}

.budget-standard-card {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 28px;
  padding: 4px 6px;
  background: rgba(13, 27, 45, 0.58);
  border: 1px solid rgba(125, 184, 235, 0.28);
  border-radius: 8px;
}

.budget-standard-card.warn {
  border-color: rgba(250, 204, 21, 0.42);
}

.budget-standard-name {
  color: var(--text-primary);
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
}

.budget-standard-chip {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  white-space: nowrap;
}

.budget-standard-chip.low {
  color: #ffd6d6;
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.34);
}

.budget-standard-chip.ok {
  color: #dff7ff;
  background: rgba(67, 217, 255, 0.14);
  border-color: rgba(67, 217, 255, 0.34);
}

.budget-standard-chip.hot {
  color: #bfffd8;
  background: rgba(98, 246, 163, 0.14);
  border-color: rgba(98, 246, 163, 0.38);
}

.budget-standard-chip.warn {
  color: #fff4c2;
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.36);
}

.budget-plan-controlbar {
  display: grid;
  grid-template-columns: minmax(260px, 0.82fr) minmax(360px, 1.18fr);
  gap: 10px;
  align-items: stretch;
  margin: 0 0 12px;
  padding: 10px;
  background:
    linear-gradient(135deg, rgba(67, 217, 255, 0.12), transparent 34%),
    rgba(7, 18, 31, 0.58);
  border: 1px solid rgba(125, 184, 235, 0.20);
  border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 12px 26px rgba(0, 0, 0, 0.18);
}

.budget-plan-control-group {
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  padding: 8px;
  background: rgba(10, 24, 40, 0.70);
  border: 1px solid rgba(125, 184, 235, 0.14);
  border-radius: 7px;
}

.budget-plan-control-title {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 66px;
  min-height: 32px;
  padding: 0 10px;
  color: #9fbde0;
  background: rgba(5, 14, 24, 0.62);
  border: 1px solid rgba(125, 184, 235, 0.13);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

.budget-plan-tabs,
.budget-plan-strategies {
  min-width: 0;
  display: grid;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.budget-plan-tabs {
  grid-template-columns: repeat(3, minmax(76px, 1fr));
}

.budget-plan-strategies {
  grid-template-columns: repeat(4, minmax(62px, 1fr));
}

.budget-plan-tabs button,
.budget-plan-strategies button {
  position: relative;
  min-width: 0;
  min-height: 34px;
  padding: 0 10px;
  overflow: hidden;
  color: #c9dcf4;
  background: rgba(12, 29, 48, 0.90);
  border: 1px solid rgba(125, 184, 235, 0.22);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 950;
  text-align: center;
  white-space: nowrap;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.budget-plan-tabs button::after,
.budget-plan-strategies button::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  background: transparent;
  border-radius: 999px;
}

.budget-plan-tabs button:hover,
.budget-plan-strategies button:hover {
  color: #f4fbff;
  border-color: rgba(67, 217, 255, 0.42);
  background: rgba(15, 38, 62, 0.96);
}

.budget-plan-tabs button.active {
  color: #04141f;
  background: linear-gradient(180deg, #58e7ff, #23bde8);
  border-color: rgba(104, 232, 255, 0.88);
  box-shadow: 0 0 18px rgba(67, 217, 255, 0.24);
}

.budget-plan-tabs button.active::after {
  background: rgba(4, 20, 31, 0.38);
}

.budget-plan-strategies button.active {
  color: #041b14;
  background: linear-gradient(180deg, #7dffb9, #38df8a);
  border-color: rgba(98, 246, 163, 0.88);
  box-shadow: 0 0 18px rgba(98, 246, 163, 0.22);
}

.budget-plan-strategies button.active::after {
  background: rgba(4, 27, 20, 0.38);
}

.budget-plan-strategies button:disabled {
  opacity: 0.42;
  cursor: not-allowed;
  filter: grayscale(0.2);
}

.budget-plan-list {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-surface);
}

.budget-plan-stage {
  flex: 1;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  transform-origin: 0 0;
}

.budget-plan-list-head,
.budget-rec-row {
  display: grid;
  grid-template-columns: 36px minmax(150px, 1.08fr) minmax(68px, 0.36fr) minmax(72px, 0.38fr) minmax(56px, 0.3fr) minmax(86px, 0.42fr) minmax(112px, 0.52fr) minmax(92px, 0.42fr) minmax(108px, 0.5fr) minmax(190px, 0.95fr) minmax(72px, 0.32fr);
  gap: 8px;
  align-items: center;
}

.budget-plan-list-head {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 10px;
  color: var(--text-muted);
  background: var(--bg-surface-2);
  border-bottom: 1px solid var(--border-soft);
  font-size: 11px;
  font-weight: 900;
}

.budget-plan-rows {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 8px;
}

.budget-rec-row {
  min-height: 86px;
  margin-bottom: 8px;
  padding: 9px;
  border: 1px solid rgba(115, 151, 191, 0.18);
  border-radius: 8px;
  background: rgba(13, 27, 45, 0.72);
}

.budget-rec-row:hover {
  border-color: rgba(67, 217, 255, 0.44);
  background: rgba(17, 36, 58, 0.86);
}

.budget-rank {
  color: var(--accent);
  font-size: 15px;
  font-weight: 950;
  text-align: center;
}

.budget-product {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 8px;
}

.budget-product strong {
  display: block;
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-product small {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.budget-cell {
  min-width: 0;
}

.budget-rec-row .budget-cell > span {
  display: none;
}

.budget-cell strong {
  display: block;
  margin-top: 0;
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-size: 13px;
  font-weight: 950;
  line-height: 1.16;
}

.budget-entry strong,
.budget-spend strong {
  color: #ff9f9f;
}

.budget-entry small,
.budget-spend small {
  color: #ffb4b4;
}

.budget-exit strong,
.budget-exit small.budget-tax,
.budget-cell strong.num-positive,
.budget-cell small.num-positive {
  color: #62f6a3;
}

.budget-cell strong.num-negative,
.budget-cell small.num-negative {
  color: #ff7f86;
}

.budget-cell strong.num-neutral,
.budget-cell small.num-neutral {
  color: var(--text-secondary);
}

.budget-liquidity {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.budget-liquidity small {
  flex: 0 0 100%;
}

.budget-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 0 6px;
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
}

.budget-badge.good {
  color: #071620;
  background: var(--success);
  border-color: var(--success);
}

.budget-badge.ok {
  color: #dff7ff;
  background: rgba(67, 217, 255, 0.15);
  border-color: rgba(67, 217, 255, 0.34);
}

.budget-badge.warn {
  color: #fff4c2;
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.34);
}

.budget-badge.danger {
  color: #ffd6d6;
  background: rgba(248, 113, 113, 0.13);
  border-color: rgba(248, 113, 113, 0.36);
}

.budget-flow-tags,
.budget-evidence-tags {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.budget-mini-tag {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 7px;
  border: 1px solid rgba(148, 163, 184, 0.24);
  border-radius: 6px;
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
}

.budget-mini-tag.good {
  color: #071620;
  background: #62f6a3;
  border-color: #62f6a3;
}

.budget-mini-tag.ok {
  color: #dff7ff;
  background: rgba(67, 217, 255, 0.14);
  border-color: rgba(67, 217, 255, 0.38);
}

.budget-mini-tag.warn {
  color: #fff4c2;
  background: rgba(250, 204, 21, 0.14);
  border-color: rgba(250, 204, 21, 0.38);
}

.budget-mini-tag.danger {
  color: #ffd6d6;
  background: rgba(248, 113, 113, 0.14);
  border-color: rgba(248, 113, 113, 0.40);
}

.budget-evidence {
  min-width: 0;
  display: grid;
  grid-template-columns: 132px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
}

.budget-evidence-tags {
  align-content: center;
}

.budget-sparkline {
  width: 132px;
  height: 42px;
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 6px;
  background: rgba(7, 17, 31, 0.32);
}

.budget-sparkline svg {
  display: block;
  width: 100%;
  height: 100%;
}

.budget-sparkline rect {
  fill: rgba(98, 246, 163, 0.20);
}

.budget-sparkline path {
  fill: none;
  stroke: #ef5f6f;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.budget-sparkline.empty {
  display: grid;
  place-items: center;
  color: var(--text-muted);
  border-style: dashed;
  font-size: 11px;
  font-weight: 850;
}

.budget-row-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 6px;
}

.budget-row-actions button {
  min-width: 0;
  min-height: 30px;
  border-radius: 6px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 850;
}

.budget-plan-empty {
  min-height: 180px;
  display: grid;
  place-items: center;
  color: var(--text-secondary);
}


/* desktop-source: styles/styles-inventory-page.css */
.inventory-page .page-shell {
  background: var(--bg-main);
  padding: 10px;
  gap: 0;
  overflow: auto;
}

.inventory-page .section-head {
  gap: 10px;
  margin-bottom: 8px;
}

.inventory-page .section-head h1 {
  font-size: 22px;
}

.inventory-page .section-head p {
  margin-top: 3px;
  font-size: 12px;
  line-height: 1.25;
}

.inventory-page .analysis-tools button {
  min-height: 30px;
}

.inventory-token-sync-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 6px;
  margin-bottom: 6px;
  padding: 8px 12px;
  background: linear-gradient(135deg, rgba(10, 32, 55, 0.92), rgba(7, 18, 34, 0.88));
  border: 1px solid rgba(67, 173, 219, 0.28);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(2, 10, 22, 0.18);
}

.inventory-token-sync-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.inventory-token-sync-kicker {
  display: block;
  color: rgba(158, 205, 235, 0.78);
  font-size: 11px;
  font-weight: 800;
}

.inventory-token-sync-head strong {
  display: block;
  margin-top: 2px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
}

.inventory-token-sync-badge {
  flex: 0 0 auto;
  min-width: 72px;
  padding: 4px 9px;
  border: 1px solid rgba(76, 190, 235, 0.35);
  border-radius: 999px;
  color: #bcefff;
  background: rgba(16, 72, 104, 0.45);
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.inventory-token-sync-progress {
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(5, 15, 28, 0.9);
  border: 1px solid rgba(101, 184, 230, 0.18);
}

.inventory-token-sync-progress span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #23d7ff, #8c7dff);
  transition: width 180ms ease;
}

.inventory-token-sync-message {
  color: rgba(199, 224, 241, 0.78);
  font-size: 12px;
  line-height: 1.25;
}

.inventory-token-sync-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.inventory-token-sync-metrics span {
  min-width: 0;
  padding: 5px 8px;
  color: rgba(210, 232, 245, 0.82);
  background: rgba(4, 17, 31, 0.55);
  border: 1px solid rgba(89, 178, 225, 0.14);
  border-radius: 6px;
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-token-sync-panel.running {
  border-color: rgba(35, 215, 255, 0.48);
}

.inventory-token-sync-panel.waiting {
  border-color: rgba(179, 142, 255, 0.42);
}

.inventory-token-sync-panel.done {
  border-color: rgba(87, 217, 151, 0.42);
}

.inventory-token-sync-panel.done .inventory-token-sync-progress span {
  background: linear-gradient(90deg, #35d88f, #23d7ff);
}

.inventory-token-sync-panel.warning {
  border-color: rgba(231, 181, 83, 0.48);
}

.inventory-token-sync-panel.warning .inventory-token-sync-progress span {
  background: linear-gradient(90deg, #e7b553, #23d7ff);
}

.inventory-token-sync-panel.error {
  border-color: rgba(230, 91, 101, 0.55);
}

.inventory-token-sync-panel.error .inventory-token-sync-badge {
  color: #ffd6d9;
  border-color: rgba(230, 91, 101, 0.45);
  background: rgba(97, 23, 35, 0.58);
}

.inventory-token-sync-panel.error .inventory-token-sync-progress span {
  background: linear-gradient(90deg, #e65b65, #b84964);
}

.inventory-profile-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
  padding: 7px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.inventory-profile-card span {
  display: block;
  color: var(--text-muted);
  font-size: 12px;
  font-weight: 800;
}

.inventory-profile-card strong {
  display: block;
  margin-top: 2px;
  color: var(--text-primary);
  font-size: 15px;
  font-weight: 900;
}

.inventory-profile-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
}

.inventory-profile-tools select {
  min-width: 150px;
  height: 30px;
}

.inventory-total-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 6px;
}

.inventory-total-card {
  min-width: 0;
  padding: 8px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.inventory-total-card span {
  display: block;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 800;
}

.inventory-total-card strong {
  display: block;
  margin-top: 4px;
  color: var(--success);
  font-size: 20px;
  line-height: 1.15;
}

.inventory-total-card small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-history-card {
  position: relative;
  container-type: inline-size;
  min-height: 174px;
  margin-bottom: 6px;
  padding: 9px 12px;
  background: var(--bg-surface);
  border: 1px solid var(--border-soft);
  border-radius: 8px;
}

.inventory-history-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 6px;
}

.inventory-history-head h2 {
  margin: 0 0 3px;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.25;
}

.inventory-history-head span,
.inventory-history-legend span {
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 750;
}

.inventory-history-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.inventory-history-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 0 8px;
  background: rgba(125, 184, 235, 0.08);
  border: 1px solid rgba(125, 184, 235, 0.18);
  border-radius: 999px;
}

.inventory-history-legend i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
}

.inventory-history-legend i.value,
.inventory-history-legend i.sell {
  background: #35d399;
  box-shadow: 0 0 12px rgba(53, 211, 153, 0.45);
}

.inventory-history-legend i.count,
.inventory-history-legend i.buy {
  background: #60a5fa;
  box-shadow: 0 0 12px rgba(96, 165, 250, 0.40);
}

.inventory-history-chart {
  position: relative;
  width: 100%;
  height: 118px;
  height: clamp(112px, 9cqw, 150px);
  overflow: hidden;
  background: rgba(7, 18, 31, 0.32);
  border: 1px solid rgba(125, 184, 235, 0.14);
  border-radius: 8px;
}

.inventory-history-chart .empty {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 13px;
}

.inventory-history-svg {
  display: block;
  width: 100%;
  height: 100%;
}

.inventory-history-bg {
  fill: transparent;
}

.inventory-history-grid line {
  stroke: rgba(125, 184, 235, 0.14);
  stroke-width: 1;
}

.inventory-history-grid text,
.inventory-history-xlabels text {
  fill: var(--text-muted);
  font-size: 10px;
  opacity: 0.78;
  pointer-events: none;
}

.inventory-history-value-line,
.inventory-history-count-line,
.inventory-history-buy-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.inventory-history-value-line {
  stroke: #35d399;
  stroke-width: 3.2;
  filter: drop-shadow(0 0 6px rgba(53, 211, 153, 0.20));
}

.inventory-history-count-line {
  stroke: rgba(96, 165, 250, 0.58);
  stroke-width: 2;
  stroke-dasharray: 5 7;
}

.inventory-history-buy-line {
  stroke: rgba(96, 165, 250, 0.82);
  stroke-width: 2.5;
  stroke-dasharray: 6 7;
}

.inventory-history-dots circle,
.inventory-history-buy-dots circle {
  fill: #35d399;
  stroke: var(--bg-surface);
  stroke-width: 2;
}

.inventory-history-buy-dots circle {
  fill: #60a5fa;
}

.inventory-history-hit {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
}

.inventory-history-hit.active {
  fill: rgba(53, 211, 153, 0.20);
  stroke: rgba(53, 211, 153, 0.95);
  stroke-width: 2;
}

.inventory-history-tooltip {
  position: absolute;
  z-index: 30;
  width: min(700px, calc(100vw - 24px));
  overflow: visible;
  padding: 0;
  color: var(--text-primary);
  pointer-events: none;
  will-change: left, top;
}

.inventory-history-tooltip.hidden {
  display: none;
}

.inventory-history-snapshot {
  overflow: hidden;
  background: rgba(9, 20, 34, 0.98);
  border: 1px solid rgba(125, 184, 235, 0.30);
  border-radius: 8px;
  box-shadow: 0 18px 34px rgba(0, 0, 0, 0.30);
}

.inventory-history-tip-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 7px 9px;
  background: rgba(15, 37, 58, 0.78);
  border-bottom: 1px solid rgba(125, 184, 235, 0.20);
}

.inventory-history-tooltip strong {
  color: #ffffff;
  font-size: 13.5px;
  line-height: 1.2;
}

.inventory-history-tip-head span {
  color: var(--text-secondary);
  font-size: 11.5px;
  line-height: 1.3;
}

.inventory-history-tip-head > div:first-child {
  display: grid;
  gap: 2px;
}

.inventory-history-tip-metrics {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 5px;
}

.inventory-history-tip-metrics span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 23px;
  padding: 0 7px;
  background: rgba(7, 18, 31, 0.54);
  border: 1px solid rgba(125, 184, 235, 0.14);
  border-radius: 999px;
  white-space: nowrap;
}

.inventory-history-tooltip b {
  color: var(--success);
}

.inventory-history-tooltip b.buy {
  color: #7db8eb;
}

.inventory-history-tooltip b.sell {
  color: #35d399;
}

.inventory-history-mini-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
}

.inventory-history-mini-table .history-col-product {
  width: 30%;
}

.inventory-history-mini-table .history-col-qty {
  width: 9%;
}

.inventory-history-mini-table .history-col-price {
  width: 30.5%;
}

.inventory-history-mini-table th,
.inventory-history-mini-table td {
  height: 38px;
  padding: 4px 7px;
  border-bottom: 1px solid rgba(125, 184, 235, 0.14);
  vertical-align: middle;
  font-size: 12px;
  line-height: 1.2;
}

.inventory-history-mini-table th {
  height: 28px;
  color: var(--text-muted);
  background: rgba(23, 45, 69, 0.66);
  text-align: right;
  font-weight: 900;
}

.inventory-history-mini-table th:first-child,
.inventory-history-mini-table td:first-child {
  text-align: left;
}

.inventory-history-product {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 7px;
  min-width: 0;
}

.inventory-history-thumb {
  position: relative;
  width: 32px;
  height: 28px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 6px;
}

.inventory-history-thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: inherit;
  border-radius: inherit;
  z-index: 0;
}

.inventory-history-thumb.quality-bg-ultraRare {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(168, 85, 247, 0.22), transparent 58%),
    linear-gradient(180deg, rgba(45, 31, 64, 0.95), rgba(15, 14, 30, 0.98)),
    #0f0e1e;
  border-color: rgba(168, 85, 247, 0.34);
}

.inventory-history-thumb.quality-bg-rare {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(34, 211, 238, 0.20), transparent 58%),
    linear-gradient(180deg, rgba(16, 47, 62, 0.94), rgba(7, 22, 32, 0.98)),
    #071620;
  border-color: rgba(34, 211, 238, 0.32);
}

.inventory-history-thumb.quality-bg-uncommon {
  background:
    radial-gradient(ellipse at 50% 18%, rgba(74, 222, 128, 0.18), transparent 58%),
    linear-gradient(180deg, rgba(18, 46, 37, 0.94), rgba(7, 23, 22, 0.98)),
    #071716;
  border-color: rgba(74, 222, 128, 0.30);
}

.inventory-history-thumb.quality-bg-common {
  background:
    linear-gradient(180deg, rgba(56, 62, 68, 0.92), rgba(42, 46, 51, 0.98)),
    var(--bg-surface);
  border-color: rgba(166, 184, 206, 0.24);
}

.inventory-history-thumb img {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.inventory-history-thumb span {
  position: relative;
  z-index: 1;
  color: #dcecff;
  font-size: 11px;
  font-weight: 900;
}

.inventory-history-product > span {
  min-width: 0;
  overflow: hidden;
  color: var(--text-primary);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 12.5px;
  font-weight: 850;
}

.inventory-history-mini-table .qty,
.inventory-history-mini-table .price {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
  font-weight: 900;
}

.inventory-history-mini-table .qty {
  display: table-cell;
  padding-inline: 6px;
  color: var(--text-secondary);
}

.inventory-history-mini-table .qty span {
  display: inline-grid;
  place-items: center;
  min-width: 40px;
  height: 24px;
  padding: 0 8px;
  color: #f8fbff;
  background: rgba(31, 58, 84, 0.66);
  border: 1px solid rgba(125, 184, 235, 0.18);
  border-radius: 6px;
  font-size: 12.5px;
  font-weight: 950;
}

.inventory-history-mini-table .price {
  overflow: hidden;
  text-overflow: ellipsis;
}

.inventory-history-mini-table .price strong,
.inventory-history-mini-table .price span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inventory-history-mini-table .price strong {
  color: currentColor;
  font-size: 12.5px;
  line-height: 1.15;
}

.inventory-history-mini-table .price span {
  margin-top: 1px;
  color: #94add0;
  font-size: 9.5px;
}

.inventory-history-more-row td {
  height: 24px;
  color: var(--text-muted);
  text-align: center !important;
  font-size: 11.5px;
  font-weight: 750;
}

.inventory-history-empty {
  color: var(--text-muted);
  text-align: center !important;
}

.inventory-history-tooltip .buy {
  color: #7db8eb;
}

.inventory-history-tooltip .sell {
  color: #35d399;
}

.inventory-table-card {
  flex: 0 0 auto;
  overflow-x: auto;
  overflow-y: visible;
}

.inventory-table {
  min-width: 900px;
}

.inventory-table th,
.inventory-table td {
  height: 44px;
  padding-block: 2px;
}

.inventory-table th {
  height: 38px;
}

.inventory-table .analysis-product {
  gap: 8px;
}

.inventory-table .analysis-product span {
  font-size: 14px;
  font-weight: 650;
}

.inventory-table .analysis-thumb {
  width: 42px;
  height: 32px;
  flex-basis: 42px;
  border-radius: 6px;
}

.inventory-qty {
  width: 64px;
  height: 28px;
  text-align: center;
  font-weight: 850;
}

.inventory-value strong {
  display: block;
  color: var(--success);
  font-size: 12px;
}

.inventory-value small {
  display: block;
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 9px;
  white-space: nowrap;
}

.inventory-value.muted {
  color: var(--text-muted);
}

.inventory-remove {
  min-width: 70px;
}

.quick-catalog .card-scroll {
  padding: 6px;
}

.quick-catalog .catalog-grid {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
  gap: 6px;
}

.quick-catalog .product-card {
  height: 142px;
  padding: 6px;
  border-radius: 6px;
}

.quick-catalog .thumb {
  height: 50px;
  margin-bottom: 4px;
}

.quick-catalog .thumb img {
  max-height: 48px;
}

.quick-catalog .star {
  top: 6px;
  right: 6px;
  width: 24px;
  min-height: 23px;
  border-radius: 5px;
  font-size: 14px;
}

.quick-catalog .inventory-add {
  left: 6px;
  top: 6px;
  min-height: 22px;
  padding: 0 6px;
  font-size: 9px;
}

.quick-catalog .meta {
  display: none;
}

.quick-catalog .title {
  height: 30px;
  margin-top: 5px;
  white-space: normal;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  font-size: 11px;
  font-weight: 700;
  line-height: 1.22;
}

.quick-catalog .catalog-chart {
  left: 6px;
  right: 6px;
  bottom: 38px;
  height: 34px;
}

.quick-catalog .catalog-chart-empty {
  font-size: 10px;
}

.quick-catalog .bottom {
  left: 6px;
  right: 6px;
  bottom: 6px;
  justify-content: flex-end;
  gap: 4px;
  font-size: 9px;
  line-height: 1.05;
}

.quick-catalog .bottom > div:first-child {
  display: none;
}

.quick-catalog .sell {
  font-size: 11px;
  font-weight: 800;
}

.quick-catalog .buy {
  margin-top: 1px;
  font-size: 9px;
}

.quick-catalog .cat,
.quick-catalog .return-label,
.quick-catalog .price {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quick-catalog .price {
  width: 100%;
}


/* desktop-source: styles/styles-dark-core.css */
/* Startup-style lined dark theme pass. */
body[data-theme="dark"] {
  --bg-main: #121a26;
  --bg-sidebar: rgba(16, 25, 38, 0.88);
  --bg-surface: rgba(17, 27, 41, 0.78);
  --bg-surface-2: rgba(21, 34, 51, 0.82);
  --bg-surface-3: rgba(29, 45, 65, 0.86);
  --border-soft: rgba(82, 112, 142, 0.28);
  --border-strong: rgba(124, 160, 195, 0.46);
  --window-border: #29445d;
  --window-border-inner: rgba(124, 160, 195, 0.20);
  --line-bg:
    repeating-linear-gradient(135deg, rgba(76, 96, 118, 0.28) 0px, rgba(76, 96, 118, 0.28) 1px, transparent 1px, transparent 36px),
    linear-gradient(35deg, rgb(18, 26, 38) 0%, rgb(27, 36, 50) 100%);
  --line-bg-soft:
    repeating-linear-gradient(135deg, rgba(76, 96, 118, 0.28) 0px, rgba(76, 96, 118, 0.28) 1px, transparent 1px, transparent 36px),
    linear-gradient(35deg, rgb(18, 26, 38) 0%, rgb(27, 36, 50) 100%);
  --line-bg-panel:
    repeating-linear-gradient(135deg, rgba(76, 96, 118, 0.24) 0px, rgba(76, 96, 118, 0.24) 1px, transparent 1px, transparent 36px),
    linear-gradient(35deg, rgba(17, 27, 41, 0.86), rgba(24, 35, 50, 0.86));
}

html[data-theme="dark"] {
  background: rgb(18, 26, 38);
}

body[data-theme="dark"],
body[data-theme="dark"] .app-shell,
body[data-theme="dark"] .page-shell,
body[data-theme="dark"] .analysis,
body[data-theme="dark"] .catalog-page .page-shell {
  background: var(--line-bg);
  background-size: auto, auto;
}

body[data-theme="dark"] .sidebar,
body[data-theme="dark"] .catalog {
  background: var(--line-bg-soft);
  background-size: auto, auto;
}

body[data-theme="dark"] .topbar {
  background: linear-gradient(180deg, #0c1623 0%, #07101b 100%);
  background-size: auto;
}

.splitter,
.top-progress {
  background: #07111f;
}

.table-card,
.panel,
.admin-block,
.searchbar,
.catalog-tree-box,
.detail-dialog,
.detail-section,
.detail-metric,
.detail-raw,
.cache-row-head {
  background: var(--line-bg-panel);
  background-size: auto, auto;
}

button,
select,
input,
.nav,
.detail-tab,
.catalog-card,
.inventory-item {
  background-color: var(--bg-surface-2);
  background-image: linear-gradient(135deg, rgba(76, 96, 118, 0.10) 0 1px, transparent 1px 36px);
  background-size: 36px 36px;
}

button:hover,
select:hover,
input:focus,
.nav:hover,
.detail-tab.active,
tbody tr:hover {
  background-color: var(--bg-surface-3);
}

body[data-theme="dark"] .sidebar-auto-range {
  color: #edf6ff;
  background: var(--line-bg-panel);
  background-size: auto, auto;
  border-color: rgba(125, 184, 235, 0.30);
  box-shadow:
    inset 0 1px 0 rgba(179, 218, 255, 0.035),
    0 14px 34px rgba(0, 0, 0, 0.18);
}

body[data-theme="dark"] .sidebar-auto-range .panel-title h3,
body[data-theme="dark"] .sidebar-auto-range .range-name,
body[data-theme="dark"] .sidebar-auto-range .range-count,
body[data-theme="dark"] .sidebar-auto-range .range-all,
body[data-theme="dark"] .range-actions button {
  color: #edf6ff;
}

body[data-theme="dark"] .sidebar-auto-range .panel-title .tiny {
  color: #cde6ff;
  background: rgba(67, 217, 255, 0.10);
  border-color: rgba(67, 217, 255, 0.22);
}

body[data-theme="dark"] .sidebar-auto-range .range-row {
  background: var(--line-bg-panel);
  background-size: auto, auto;
  border-color: rgba(125, 184, 235, 0.28);
}

body[data-theme="dark"] .sidebar-auto-range .range-count,
body[data-theme="dark"] .sidebar-auto-range .range-all,
body[data-theme="dark"] .range-actions button {
  background: rgba(13, 27, 45, 0.84);
  border-color: rgba(125, 184, 235, 0.26);
}

body[data-theme="dark"] .range-row input[type="checkbox"] {
  border-color: rgba(125, 184, 235, 0.42);
  background-color: rgba(13, 27, 45, 0.88);
}

body[data-theme="dark"] .range-row input[type="checkbox"]:checked {
  border-color: rgba(67, 217, 255, 0.86);
  background-color: #20bdd5;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.2 6.2 4.8 8.7 9.8 3.4' fill='none' stroke='%2305202a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"),
    linear-gradient(180deg, #34d7ec, #17a9c2);
}

body[data-theme="dark"] th {
  background:
    repeating-linear-gradient(135deg, rgba(76, 96, 118, 0.24) 0px, rgba(76, 96, 118, 0.24) 1px, transparent 1px, transparent 36px),
    linear-gradient(35deg, rgba(22, 36, 54, 0.94), rgba(27, 43, 61, 0.94));
  background-size: auto, auto;
}

body[data-theme="dark"] tbody tr,
body[data-theme="dark"] .inventory-table tr {
  background: rgba(15, 25, 39, 0.36);
}

body[data-theme="dark"] tbody tr:nth-child(even) {
  background: rgba(20, 31, 47, 0.40);
}

body[data-theme="dark"] .catalog-card,
body[data-theme="dark"] .cache-row,
body[data-theme="dark"] .inventory-item,
body[data-theme="dark"] .detail-dialog {
  background: var(--line-bg-panel);
  background-size: auto, auto;
}

body[data-theme="dark"] .top-status,
body[data-theme="dark"] .searchbar,
body[data-theme="dark"] .filters select,
body[data-theme="dark"] .budget-filter,
body[data-theme="dark"] .budget-filter input[data-budget-input],
body[data-theme="dark"] .budget-plan-control,
body[data-theme="dark"] .budget-plan-control input,
body[data-theme="dark"] .budget-category-chip,
body[data-theme="dark"] .budget-category-title button,
body[data-theme="dark"] .budget-category-standards > span:not(.budget-standard-card),
body[data-theme="dark"] .budget-standard-card,
body[data-theme="dark"] #tableFilter,
body[data-theme="dark"] .catalog-page-actions select,
body[data-theme="dark"] .catalog-page-actions button,
body[data-theme="dark"] .analysis-tools select,
body[data-theme="dark"] .analysis-tools button {
  background:
    linear-gradient(135deg, rgba(76, 96, 118, 0.12) 0 1px, transparent 1px 36px),
    rgba(21, 34, 51, 0.84);
  background-size: 36px 36px, auto;
}

body[data-theme="dark"] .budget-plan-filter,
body[data-theme="dark"] .budget-plan-control {
  background: rgba(13, 27, 45, 0.84);
  border-color: rgba(74, 166, 214, 0.34);
}

body[data-theme="dark"] .budget-plan-filter input[type="number"],
body[data-theme="dark"] .budget-plan-control input[type="number"] {
  background: rgba(7, 20, 34, 0.72);
  border-color: rgba(74, 166, 214, 0.36);
}

body[data-theme="dark"] .budget-category-panel {
  background:
    linear-gradient(135deg, rgba(34, 211, 238, 0.08), rgba(96, 165, 250, 0.04)),
    rgba(7, 18, 31, 0.74);
  border-color: rgba(74, 166, 214, 0.28);
}

body[data-theme="dark"] .budget-category-title button,
body[data-theme="dark"] .budget-category-chip {
  background: rgba(14, 35, 55, 0.88);
  border-color: rgba(74, 166, 214, 0.32);
}

body[data-theme="dark"] .budget-category-chip:has(input:checked) {
  background: rgba(22, 118, 142, 0.74);
  border-color: rgba(86, 232, 255, 0.86);
}

@media (max-width: 1480px) {
  :root {
    --sidebar-width: 280px;
    --catalog-width: 540px;
  }

  .inventory-total-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .budget-plan-list-head,
  .budget-rec-row {
    grid-template-columns: 32px minmax(112px, 1fr) minmax(56px, 0.34fr) minmax(58px, 0.36fr) minmax(50px, 0.3fr) minmax(66px, 0.36fr) minmax(92px, 0.42fr) minmax(72px, 0.34fr) minmax(80px, 0.38fr) minmax(126px, 0.62fr) minmax(58px, 0.3fr);
    gap: 6px;
  }

  .budget-evidence {
    grid-template-columns: 96px minmax(0, 1fr);
  }

  .budget-sparkline {
    width: 96px;
  }
}

@media (max-width: 720px) {
  .inventory-history-card {
    padding: 9px 10px;
  }

  .inventory-history-head {
    flex-direction: column;
    align-items: stretch;
  }

  .inventory-history-legend {
    justify-content: flex-start;
  }

  .inventory-history-chart {
    height: clamp(108px, 24cqw, 132px);
  }
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 220px;
    --catalog-width: 420px;
  }

  .topbar {
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  }

  .top-contact,
  #statusText {
    display: none;
  }

  .top-status {
    min-width: 0;
    grid-template-columns: minmax(120px, 1fr);
  }

  .workbench-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto minmax(320px, 38vh);
    gap: 0;
    overflow: auto;
  }

  .right-splitter {
    display: none;
  }

  .quick-catalog {
    min-height: 320px;
    border-top: 1px solid var(--border-soft);
    border-right: 0;
  }

  .analysis {
    min-height: max(520px, calc(100vh - 118px));
  }

  .analysis-tools {
    justify-content: flex-start;
  }
}

@media (max-width: 980px) {
  :root {
    --sidebar-width: 200px;
  }

  .analysis,
  .catalog,
  .page-shell {
    padding: 14px;
  }

  .section-head {
    gap: 10px;
  }

  .section-head h1 {
    font-size: 22px;
  }

  .analysis-tools {
    flex-basis: 100%;
    width: 100%;
  }

  .analysis-tools select {
    flex: 1 1 132px;
  }

  .analysis-tools .budget-filter {
    flex: 1 1 198px;
  }

  .analysis-tools button {
    flex: 1 1 auto;
    padding-inline: 9px;
  }

  .brand strong {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  .topbar .top-status,
  .sponsor-btn {
    display: none;
  }

  .topbar {
    grid-template-columns: minmax(220px, auto) minmax(0, 1fr) auto;
  }

  .searchbar {
    width: 100%;
  }

  .budget-plan-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .budget-plan-kpis .budget-kpi-main,
  .budget-plan-kpis .budget-kpi-sub {
    grid-column: span 1;
  }

  .budget-plan-list-head {
    display: none;
  }

  .budget-rec-row {
    grid-template-columns: 34px minmax(0, 1fr) minmax(118px, 0.45fr);
    align-items: start;
  }

  .budget-rec-row .budget-cell > span {
    display: block;
  }

  .budget-cell strong {
    margin-top: 3px;
  }

  .budget-product {
    grid-column: 2 / -1;
  }

  .budget-evidence {
    grid-column: 2 / -1;
    grid-template-columns: 120px minmax(0, 1fr);
  }

  .budget-sparkline {
    width: 120px;
  }

  .budget-row-actions {
    grid-column: 2 / -1;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  body { overflow: auto; }
  .app-shell { min-height: 100vh; height: auto; }
  .topbar { display: flex; align-items: stretch; height: auto; padding: 12px; flex-direction: column; }
  .top-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .top-status { grid-template-columns: 1fr; }
  .searchbar { width: 100%; }
  .layout { display: block; }
  .workbench-grid { display: block; height: auto; }
  .splitter { display: none; }
  .sidebar, .analysis, .catalog { border-right: 0; min-height: 520px; }
  .app-view { height: auto; }
  .catalog-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
  .budget-plan-kpis { grid-template-columns: 1fr; }
  .budget-plan-kpis .budget-kpi-main,
  .budget-plan-kpis .budget-kpi-sub { grid-column: 1; }
  .budget-plan-controlbar {
    grid-template-columns: 1fr;
  }

  .budget-plan-control-group {
    grid-template-columns: 1fr;
  }

  .budget-plan-tabs,
  .budget-plan-strategies {
    grid-template-columns: repeat(auto-fit, minmax(86px, 1fr));
  }
  .budget-rec-row { grid-template-columns: 28px minmax(0, 1fr); }
  .budget-product,
  .budget-evidence,
  .budget-row-actions { grid-column: 2 / -1; }
  .budget-evidence { grid-template-columns: 1fr; }
  .budget-sparkline { width: 100%; }
}

.budget-plan-list.budget-plan-scaled {
  overflow-x: hidden;
  overflow-y: auto;
}

.budget-plan-list.budget-plan-scaled .budget-plan-stage {
  flex: 0 0 auto;
  width: var(--budget-plan-width);
  min-width: var(--budget-plan-width);
  height: var(--budget-plan-height);
  overflow: visible;
  transform: scale(var(--budget-plan-scale));
}

.budget-plan-list.budget-plan-scaled .budget-plan-list-head,
.budget-plan-list.budget-plan-scaled .budget-rec-row {
  display: grid;
  grid-template-columns: 36px minmax(150px, 1.08fr) minmax(68px, 0.36fr) minmax(72px, 0.38fr) minmax(56px, 0.3fr) minmax(86px, 0.42fr) minmax(112px, 0.52fr) minmax(92px, 0.42fr) minmax(108px, 0.5fr) minmax(190px, 0.95fr) minmax(72px, 0.32fr);
  gap: 8px;
  align-items: center;
}

.budget-plan-list.budget-plan-scaled .budget-plan-rows {
  flex: 0 0 auto;
  overflow: visible;
}

.budget-plan-list.budget-plan-scaled .budget-rec-row .budget-cell > span {
  display: none;
}

.budget-plan-list.budget-plan-scaled .budget-product,
.budget-plan-list.budget-plan-scaled .budget-evidence,
.budget-plan-list.budget-plan-scaled .budget-row-actions {
  grid-column: auto;
}

.budget-plan-list.budget-plan-scaled .budget-evidence {
  grid-template-columns: 132px minmax(0, 1fr);
}

.budget-plan-list.budget-plan-scaled .budget-sparkline {
  width: 132px;
}


/* desktop-source: styles/styles-workbench-tools.css */
.nav-count {
  display: inline-grid;
  min-width: 20px;
  height: 20px;
  margin-left: auto;
  padding: 0 5px;
  place-items: center;
  color: #07111f;
  background: var(--warning);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 900;
}

.nav-count[hidden] { display: none; }

.workbench-tools-page {
  min-width: 0;
  min-height: 0;
  overflow: auto;
}

.workbench-tools-page .page-shell {
  min-height: 100%;
  padding-bottom: 26px;
}

.workbench-tools-head {
  align-items: flex-start;
}

.workbench-tools-head p {
  max-width: 920px;
}

.workbench-tools-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  align-content: start;
}

.workbench-tool-panel {
  min-width: 0;
  padding: 16px;
  border: 1px solid var(--border-soft);
  border-radius: 8px;
  background: var(--bg-surface);
}

.workbench-tool-panel-wide {
  grid-column: 1 / -1;
}

.workbench-tool-title {
  display: flex;
  min-width: 0;
  min-height: 46px;
  margin-bottom: 12px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.workbench-tool-title h2 {
  margin: 0;
  color: var(--text-primary);
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: 0;
}

.workbench-tool-title p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 12px;
  line-height: 1.4;
}

.workbench-tool-title-actions > div:last-child {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.workbench-tool-form,
.workbench-alert-form {
  display: grid;
  grid-template-columns: minmax(150px, 1fr) auto;
  gap: 8px;
}

.workbench-tool-form + .workbench-tool-form {
  margin-top: 8px;
}

.workbench-tool-form-wide {
  grid-template-columns: minmax(150px, 1fr) repeat(3, auto);
}

.workbench-tool-form input,
.workbench-tool-form select,
.workbench-alert-form input,
.workbench-alert-form select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 10px;
}

.workbench-tool-form button,
.workbench-alert-form button,
.workbench-tool-title-actions button {
  min-width: 76px;
  white-space: nowrap;
}

.workbench-compare-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.workbench-compare-item {
  position: relative;
  min-width: 0;
  min-height: 148px;
  padding: 14px;
  border: 1px solid rgba(115, 151, 191, 0.28);
  border-radius: 6px;
  background: var(--bg-surface-2);
}

.workbench-compare-item > strong {
  display: block;
  max-width: calc(100% - 28px);
  overflow: hidden;
  color: var(--text-primary);
  font-size: 14px;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-compare-item > span {
  display: block;
  min-height: 18px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-compare-item dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  margin: 15px 0 0;
}

.workbench-compare-item dl div {
  min-width: 0;
  padding: 7px 5px;
  border-top: 1px solid var(--border-soft);
  text-align: center;
}

.workbench-compare-item dt {
  color: var(--text-muted);
  font-size: 10px;
}

.workbench-compare-item dd {
  margin: 4px 0 0;
  overflow: hidden;
  color: var(--text-primary);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-icon-button {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 26px;
  min-width: 26px;
  min-height: 26px;
  height: 26px;
  padding: 0;
  color: var(--text-muted);
  font-size: 18px;
  line-height: 1;
}

.workbench-alert-form {
  grid-template-columns: minmax(180px, 0.8fr) minmax(160px, 1fr) auto;
  max-width: 760px;
  margin-bottom: 12px;
}

.workbench-alert-list,
.workbench-task-list {
  display: grid;
  max-height: 300px;
  overflow: auto;
  border-top: 1px solid var(--border-soft);
}

.workbench-alert-row,
.workbench-task-row {
  display: grid;
  min-width: 0;
  min-height: 54px;
  padding: 9px 4px;
  align-items: center;
  gap: 9px;
  border-bottom: 1px solid var(--border-soft);
}

.workbench-alert-row {
  grid-template-columns: minmax(0, 1fr) auto auto auto;
}

.workbench-alert-row.is-triggered {
  background: rgba(250, 204, 21, 0.06);
}

.workbench-alert-row > div,
.workbench-task-row > div {
  min-width: 0;
}

.workbench-alert-row strong,
.workbench-alert-row span,
.workbench-task-row strong,
.workbench-task-row span {
  display: block;
}

.workbench-alert-row > div strong,
.workbench-task-row > div strong {
  overflow: hidden;
  color: var(--text-primary);
  font-size: 12px;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.workbench-alert-row > div span,
.workbench-task-row > div span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 11px;
}

.workbench-task-row {
  grid-template-columns: 10px minmax(0, 1fr) auto auto;
}

.workbench-task-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--text-muted);
}

.workbench-task-dot.running { background: var(--accent); }
.workbench-task-dot.done { background: var(--success); }
.workbench-task-dot.error { background: var(--danger); }

.workbench-status-pill {
  min-width: 52px;
  padding: 3px 7px;
  color: var(--text-secondary);
  border: 1px solid var(--border-soft);
  border-radius: 10px;
  background: var(--bg-surface-2);
  font-size: 10px;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.workbench-status-pill.running {
  color: var(--accent);
  border-color: rgba(67, 217, 255, 0.34);
}

.workbench-status-pill.done {
  color: var(--success);
  border-color: rgba(98, 246, 163, 0.34);
}

.workbench-status-pill.error {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.34);
}

.workbench-tools-empty {
  grid-column: 1 / -1;
  min-height: 64px;
  display: grid;
  place-items: center;
  padding: 12px;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
}

@media (max-width: 1180px) {
  .workbench-tools-grid { grid-template-columns: 1fr; }
  .workbench-tool-panel-wide { grid-column: auto; }
  .workbench-compare-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .workbench-tool-title-actions { display: block; }
  .workbench-tool-title-actions > div:last-child { margin-top: 10px; }
  .workbench-tool-form,
  .workbench-tool-form-wide,
  .workbench-alert-form { grid-template-columns: 1fr; }
  .workbench-tool-form button,
  .workbench-alert-form button { width: 100%; }
  .workbench-compare-grid { grid-template-columns: 1fr; }
  .workbench-alert-row { grid-template-columns: minmax(0, 1fr) auto; }
  .workbench-alert-row button { width: 100%; }
  .workbench-task-row { grid-template-columns: 10px minmax(0, 1fr) auto; }
  .workbench-task-row > span:last-child { display: none; }
}

/* desktop-source: styles/styles-tutorial-center.css */
.tutorial-page {
  min-width: 0;
  overflow: auto;
}

.tutorial-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.tutorial-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(115, 151, 171, .22);
}

.tutorial-head h1 {
  margin: 0 0 7px;
  font-size: 24px;
  letter-spacing: 0;
}

.tutorial-head p {
  margin: 0;
  color: #91a4af;
  font-size: 13px;
}

.tutorial-head-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.tutorial-head-actions input {
  width: 240px;
}

.tutorial-overall {
  display: grid;
  grid-template-columns: auto minmax(180px, 1fr);
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: #b8c8d1;
  font-size: 12px;
}

.tutorial-overall-track,
.tutorial-course-progress {
  height: 5px;
  overflow: hidden;
  background: #16252d;
  border: 1px solid rgba(101, 151, 176, .2);
  border-radius: 3px;
}

.tutorial-overall-track i,
.tutorial-course-progress i {
  display: block;
  height: 100%;
  background: #18b9d5;
  transition: width .24s ease;
}

.tutorial-course-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.tutorial-course {
  min-width: 0;
  padding: 18px;
  border: 1px solid rgba(102, 145, 166, .22);
  border-radius: 6px;
  background: #101b21;
  box-shadow: inset 0 1px rgba(255,255,255,.02);
}

.tutorial-course-head,
.tutorial-course-meta,
.tutorial-course-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.tutorial-course-head span {
  color: #29c4df;
  font-size: 11px;
}

.tutorial-course-head strong {
  color: #a6bbc5;
  font-size: 12px;
}

.tutorial-course h2 {
  margin: 10px 0 7px;
  font-size: 17px;
  letter-spacing: 0;
}

.tutorial-course > p {
  min-height: 38px;
  margin: 0 0 12px;
  color: #91a5af;
  font-size: 12px;
  line-height: 1.6;
}

.tutorial-course-meta {
  justify-content: flex-start;
  flex-wrap: wrap;
  margin-bottom: 12px;
  color: #718b98;
  font-size: 11px;
}

.tutorial-course-meta span + span::before {
  content: "·";
  margin-right: 10px;
}

.tutorial-course-actions {
  margin-top: 13px;
}

.tutorial-course-actions span {
  color: #7f96a2;
  font-size: 11px;
}

.tutorial-course-actions button,
.tutorial-head-actions button {
  min-height: 32px;
}

.tutorial-empty {
  grid-column: 1 / -1;
  padding: 56px 20px;
  color: #7f96a2;
  text-align: center;
  border-top: 1px solid rgba(100, 140, 160, .18);
}

.tutorial-help-btn {
  width: 34px;
  min-width: 34px;
  height: 32px;
  padding: 0;
  font-size: 16px;
  font-weight: 800;
  border-color: rgba(47, 190, 216, .35);
  color: #4fd6ed;
}

.tutorial-guide {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9500;
  width: 0;
  height: 0;
  overflow: visible;
  pointer-events: none;
}

.tutorial-highlight {
  position: fixed;
  border: 2px solid #34d0e8;
  border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(2, 7, 10, .72), 0 0 24px rgba(46, 210, 236, .48);
  transition: left .18s ease, top .18s ease, width .18s ease, height .18s ease;
  pointer-events: none;
}

.tutorial-coach {
  position: fixed;
  max-height: calc(100vh - 32px);
  overflow: auto;
  padding: 17px;
  border: 1px solid rgba(58, 211, 235, .52);
  border-radius: 6px;
  background: #0c171d;
  color: #e7f1f5;
  box-shadow: 0 18px 60px rgba(0,0,0,.52), inset 0 1px rgba(255,255,255,.04);
  pointer-events: auto;
}

.tutorial-coach-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: #46d3e9;
  font-size: 11px;
}

.tutorial-coach h2 {
  margin: 10px 0 7px;
  font-size: 18px;
  letter-spacing: 0;
}

.tutorial-coach-body {
  margin: 0;
  color: #a8bac3;
  font-size: 13px;
  line-height: 1.65;
}

.tutorial-step-state {
  margin: 13px 0;
  padding: 9px 10px;
  color: #8fa4af;
  font-size: 12px;
  border-left: 2px solid #587381;
  background: #111f26;
}

.tutorial-step-state[data-state="complete"] {
  color: #80dfb6;
  border-left-color: #30c98c;
}

.tutorial-step-state[data-state="warning"] {
  color: #e6bd76;
  border-left-color: #d49a38;
}

.tutorial-coach-actions {
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 8px;
  align-items: center;
}

.tutorial-welcome {
  position: fixed;
  inset: 0;
  z-index: 9600;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(2, 7, 10, .78);
}

.tutorial-welcome > section {
  width: min(560px, 100%);
  padding: 25px;
  border: 1px solid rgba(57, 204, 229, .45);
  border-radius: 6px;
  background: #0d181e;
  box-shadow: 0 24px 80px rgba(0,0,0,.6);
}

.tutorial-welcome-kicker {
  color: #39cce5;
  font-size: 11px;
  text-transform: uppercase;
}

.tutorial-welcome h2 {
  margin: 10px 0 8px;
  font-size: 22px;
  letter-spacing: 0;
}

.tutorial-welcome p {
  margin: 0;
  color: #9cb0ba;
  font-size: 13px;
  line-height: 1.65;
}

.tutorial-welcome-features {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 22px;
}

.tutorial-welcome-features span {
  padding: 6px 9px;
  color: #b8cbd3;
  font-size: 11px;
  border: 1px solid rgba(99, 143, 165, .24);
  border-radius: 4px;
  background: #122129;
}

.tutorial-welcome-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.tutorial-help-toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9400;
  display: flex;
  align-items: center;
  gap: 14px;
  width: min(480px, calc(100vw - 36px));
  padding: 13px;
  border: 1px solid rgba(55, 203, 228, .42);
  border-radius: 6px;
  background: #0d1a20;
  box-shadow: 0 16px 50px rgba(0,0,0,.48);
}

.tutorial-help-toast div {
  display: grid;
  min-width: 0;
  gap: 3px;
}

.tutorial-help-toast strong {
  color: #dce9ee;
  font-size: 12px;
}

.tutorial-help-toast span {
  overflow: hidden;
  color: #8fa5af;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tutorial-help-toast button {
  flex: 0 0 auto;
}

@media (max-width: 980px) {
  .tutorial-head,
  .tutorial-course-grid {
    grid-template-columns: 1fr;
  }

  .tutorial-head {
    align-items: stretch;
  }

  .tutorial-head-actions input {
    width: min(280px, 100%);
  }
}

@media (max-width: 640px) {
  .tutorial-shell {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .tutorial-head-actions,
  .tutorial-welcome-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .tutorial-head-actions input,
  .tutorial-head-actions button,
  .tutorial-welcome-actions button {
    width: 100%;
  }

  .tutorial-coach-actions {
    grid-template-columns: 1fr 1fr;
  }

  .tutorial-coach-actions span {
    display: none;
  }
}

/* desktop-source: styles/styles-market-training.css */
.market-training-page {
  min-width: 0;
  overflow: auto;
}

.market-training-shell {
  width: min(1240px, calc(100% - 40px));
  margin: 0 auto;
  padding: 26px 0 48px;
}

.market-training-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding-bottom: 20px;
  border-bottom: 1px solid rgba(111, 151, 171, .24);
}

.market-training-kicker {
  color: #40cee6;
  font-size: 11px;
}

.market-training-head h1 {
  margin: 6px 0;
  font-size: 24px;
  letter-spacing: 0;
}

.market-training-head p,
.market-training-setup p,
.market-training-how p,
.market-training-answer p,
.market-training-message,
.market-training-summary > p {
  margin: 0;
  color: #8fa5b0;
  font-size: 12px;
  line-height: 1.65;
}

.market-training-root {
  min-width: 0;
  padding-top: 18px;
}

.market-training-loading,
.market-training-progress {
  padding: 72px 20px;
  color: #91a6b0;
  text-align: center;
}

.market-training-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
  border: 1px solid rgba(102, 145, 166, .22);
  background: #101b21;
}

.market-training-stats span {
  padding: 13px 16px;
  color: #8299a5;
  font-size: 11px;
  border-right: 1px solid rgba(102, 145, 166, .18);
}

.market-training-stats span:last-child {
  border-right: 0;
}

.market-training-stats b {
  display: block;
  margin-bottom: 3px;
  color: #d9e9ee;
  font-size: 18px;
}

.market-training-setup {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 28px;
  padding: 24px;
  border-top: 1px solid rgba(57, 203, 229, .42);
  border-bottom: 1px solid rgba(102, 145, 166, .22);
  background: #0d181e;
}

.market-training-setup h2,
.market-training-how h2,
.market-training-answer h2,
.market-training-progress h2,
.market-training-summary h2 {
  margin: 0 0 7px;
  font-size: 18px;
  letter-spacing: 0;
}

.market-training-controls {
  display: flex;
  align-items: end;
  gap: 10px;
}

.market-training-controls label {
  display: grid;
  gap: 5px;
  color: #839aa5;
  font-size: 11px;
}

.market-training-controls select {
  min-width: 138px;
}

.market-training-message {
  grid-column: 1 / -1;
  padding: 9px 11px;
  color: #e3bd78;
  border-left: 2px solid #d59b3d;
  background: #172027;
}

.market-training-how {
  display: grid;
  grid-template-columns: 150px repeat(3, minmax(0, 1fr));
  gap: 14px;
  align-items: center;
  margin-top: 18px;
  padding: 22px 0;
}

.market-training-how > div {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 9px;
}

.market-training-how > div > span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #39cde5;
  font-weight: 800;
  border: 1px solid rgba(57, 205, 229, .4);
  border-radius: 50%;
}

.market-training-how b {
  display: block;
  color: #d5e4e9;
}

.market-training-progress {
  max-width: 720px;
  margin: 40px auto;
}

.market-training-progress > div,
.market-training-round-track {
  height: 6px;
  overflow: hidden;
  margin: 18px 0 7px;
  border: 1px solid rgba(68, 185, 208, .3);
  border-radius: 3px;
  background: #14242c;
}

.market-training-progress i,
.market-training-round-track i {
  display: block;
  height: 100%;
  background: #23c3df;
  transition: width .2s ease;
}

.market-training-round-head {
  display: grid;
  grid-template-columns: auto minmax(160px, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
}

.market-training-round-head > div:first-child {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.market-training-round-head strong {
  color: #dce9ee;
  font-size: 13px;
}

.market-training-round-head span {
  color: #41cbe3;
  font-size: 11px;
}

.market-training-round-track {
  margin: 0;
}

.market-training-case {
  border: 1px solid rgba(102, 145, 166, .24);
  background: #0d171d;
}

.market-training-case-head {
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 82px;
  padding: 13px 17px;
  border-bottom: 1px solid rgba(102, 145, 166, .2);
}

.market-training-case-head img {
  width: 70px;
  height: 52px;
  object-fit: contain;
  background: #142129;
}

.market-training-case-head > div:nth-child(2),
.market-training-case-head > div:first-child {
  min-width: 0;
}

.market-training-case-head span,
.market-training-source span {
  color: #39cbe3;
  font-size: 10px;
}

.market-training-case-head h2 {
  overflow: hidden;
  margin: 3px 0;
  font-size: 16px;
  letter-spacing: 0;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.market-training-case-head p,
.market-training-source small {
  margin: 0;
  color: #8299a5;
  font-size: 11px;
}

.market-training-source {
  display: grid;
  gap: 4px;
  margin-left: auto;
  text-align: right;
}

.market-training-chart-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 1000 / 370;
  min-height: 280px;
  max-height: 470px;
  padding: 8px 12px 2px;
}

.market-training-timeline-notice {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 14px;
  padding: 9px 16px;
  border-bottom: 1px solid rgba(102, 145, 166, .2);
  background: rgba(9, 20, 26, .72);
}

.market-training-timeline-notice > strong {
  color: #dce9ed;
  font-size: 11px;
}

.market-training-timeline-notice > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.market-training-timeline-notice > div > span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 24px;
  padding: 0 8px;
  color: #9eb2bb;
  font-size: 9px;
  border: 1px solid rgba(111, 151, 170, .24);
  border-radius: 999px;
  background: rgba(18, 35, 43, .72);
}

.market-training-timeline-notice i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

.market-training-timeline-notice b {
  font-size: 10px;
}

.market-training-timeline-notice .return.detected i {
  background: #e8ac58;
  box-shadow: 0 0 9px rgba(232, 172, 88, .55);
}

.market-training-timeline-notice .return.detected b {
  color: #e8b568;
}

.market-training-timeline-notice .return.confirmed i {
  background: #5edfac;
  box-shadow: 0 0 9px rgba(94, 223, 172, .5);
}

.market-training-timeline-notice .return.confirmed b {
  color: #67dfaf;
}

.market-training-timeline-notice .discount i {
  background: #bd9bf2;
  box-shadow: 0 0 9px rgba(189, 155, 242, .5);
}

.market-training-timeline-notice .discount b {
  color: #c5a7f1;
}

.market-training-timeline-notice > small {
  grid-column: 2;
  color: #708994;
  font-size: 9px;
}

.market-training-timeline-notice.empty {
  grid-template-columns: 1fr auto;
  color: #7f96a1;
  font-size: 10px;
}

.market-training-timeline-notice.empty > small {
  grid-column: auto;
}

.market-training-chart {
  display: block;
  width: 100%;
  height: 100%;
}

.market-training-grid {
  stroke: rgba(118, 151, 167, .24);
  stroke-width: 1;
}

.market-training-axis,
.market-training-event-text {
  fill: #738b97;
  font-size: 10px;
}

.market-training-event-text {
  fill: #e8ac58;
}

.market-training-volume rect {
  fill: rgba(64, 184, 210, .34);
}

.market-training-price-line {
  fill: none;
  stroke: #4fd1e7;
  stroke-linejoin: round;
  stroke-width: 2.4;
}

.market-training-point-dot {
  fill: #55d8ec;
  stroke: #0d171d;
  stroke-width: 2;
  pointer-events: none;
  transition: r .12s ease, fill .12s ease;
}

.market-training-point-dot.active {
  r: 5.5;
  fill: #ffffff;
  stroke: #34cce5;
  stroke-width: 2.5;
}

.market-training-point-hit {
  fill: transparent;
  stroke: transparent;
  cursor: crosshair;
}

.market-training-point-hit.active,
.market-training-point-hit:focus-visible {
  fill: rgba(52, 204, 229, .18);
  stroke: rgba(76, 220, 241, .9);
  stroke-width: 2;
  outline: none;
}

.market-training-chart-tooltip {
  position: absolute;
  z-index: 8;
  display: grid;
  min-width: 176px;
  gap: 4px;
  padding: 9px 11px;
  color: #dcebf0;
  pointer-events: none;
  border: 1px solid rgba(78, 208, 231, .42);
  border-radius: 5px;
  background: rgba(8, 19, 25, .97);
  box-shadow: 0 12px 28px rgba(0, 0, 0, .44);
}

.market-training-chart-tooltip.hidden {
  display: none;
}

.market-training-chart-tooltip > strong {
  color: #ffffff;
  font-size: 12px;
}

.market-training-chart-tooltip > span {
  color: #e2b25d;
  font-size: 10px;
}

.market-training-chart-tooltip > em {
  color: #9fb3bc;
  font-size: 9px;
  font-style: normal;
  line-height: 1.35;
}

.market-training-chart-tooltip > div {
  display: flex;
  gap: 12px;
  color: #8fa7b2;
  font-size: 10px;
}

.market-training-chart-tooltip b {
  color: #58d8ed;
  font-size: 12px;
}

.market-training-event-line {
  stroke: #e8ac58;
  stroke-dasharray: 5 4;
  stroke-width: 1.5;
}

.market-training-event-line.event-discount {
  stroke: #bd9bf2;
}

.market-training-event-text.event-discount {
  fill: #c5a7f1;
}

.market-training-event-line.event-return.confirmed {
  stroke: #5edfac;
}

.market-training-event-text.event-return.confirmed {
  fill: #67dfaf;
}

.market-training-event-band rect {
  pointer-events: none;
}

.market-training-event-band.return-band.detected rect {
  fill: rgba(239, 172, 71, .10);
}

.market-training-event-band.return-band.confirmed rect {
  fill: rgba(67, 211, 154, .11);
}

.market-training-event-band.return-band.predicted rect {
  fill: rgba(96, 165, 250, .12);
}

.market-training-event-band.discount-band rect {
  fill: rgba(153, 111, 235, .09);
}

.market-training-hidden-zone {
  fill: #101b21;
  fill-opacity: .96;
  stroke: rgba(136, 164, 177, .18);
}

.market-training-hidden-text {
  fill: #748b96;
  font-size: 13px;
  text-anchor: middle;
}

.market-training-answer,
.market-training-result {
  margin-top: 12px;
  padding: 18px;
  border-top: 1px solid rgba(102, 145, 166, .24);
  background: #101b21;
}

.market-training-outcomes {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 16px 0 18px;
}

.market-training-outcomes button {
  --outcome-color: #5bb8ff;
  --outcome-rgb: 91, 184, 255;
  position: relative;
  display: flex;
  min-height: 112px;
  padding: 14px 15px 13px;
  overflow: hidden;
  flex-direction: column;
  gap: 10px;
  text-align: left;
  border: 1px solid rgba(104, 147, 167, .34);
  border-top: 3px solid var(--outcome-color);
  border-radius: 6px;
  background: #0e191f;
  transition: border-color .16s ease, background-color .16s ease, box-shadow .16s ease;
}

.market-training-outcomes button.outcome-down {
  --outcome-color: #ff6878;
  --outcome-rgb: 255, 104, 120;
}

.market-training-outcomes button.outcome-flat {
  --outcome-color: #f1ba59;
  --outcome-rgb: 241, 186, 89;
}

.market-training-outcomes button.outcome-rebound {
  --outcome-color: #4fd39a;
  --outcome-rgb: 79, 211, 154;
}

.market-training-outcomes button.outcome-recover {
  --outcome-color: #5bb8ff;
  --outcome-rgb: 91, 184, 255;
}

.market-training-outcomes button:hover {
  border-color: rgba(var(--outcome-rgb), .72);
  background: rgba(var(--outcome-rgb), .07);
}

.market-training-outcomes button.selected {
  border-color: var(--outcome-color);
  background: linear-gradient(135deg, rgba(var(--outcome-rgb), .24), rgba(var(--outcome-rgb), .08) 66%, #0e191f);
  box-shadow: inset 0 0 0 2px rgba(var(--outcome-rgb), .34), 0 0 20px rgba(var(--outcome-rgb), .16);
}

.market-training-outcomes button.selected::after {
  content: "✓ 已选择";
  position: absolute;
  top: 9px;
  right: 9px;
  padding: 3px 7px;
  color: #071116;
  font-size: 11px;
  font-weight: 900;
  border-radius: 4px;
  background: var(--outcome-color);
}

.market-training-outcome-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
}

.market-training-outcome-head > i {
  display: grid;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  place-items: center;
  color: var(--outcome-color);
  font-size: 22px;
  font-style: normal;
  font-weight: 900;
  line-height: 1;
  border: 1px solid rgba(var(--outcome-rgb), .5);
  border-radius: 5px;
  background: rgba(var(--outcome-rgb), .11);
}

.market-training-outcome-head > span {
  display: grid;
  gap: 2px;
  margin: 0;
}

.market-training-outcome-head small {
  color: var(--outcome-color);
  font-size: 11px;
  font-weight: 800;
}

.market-training-outcome-head b {
  color: #f1f7f9;
  font-size: 15px;
  line-height: 1.25;
}

.market-training-outcomes .market-training-outcome-detail {
  margin: 0;
  color: #a6bac3;
  font-size: 12px;
  line-height: 1.55;
}

.market-training-low-question {
  display: grid;
  grid-template-columns: minmax(220px, .8fr) minmax(420px, 1.5fr) auto;
  align-items: center;
  gap: 14px;
  padding-top: 13px;
  border-top: 1px solid rgba(103, 143, 163, .18);
}

.market-training-low-question h2 {
  margin: 0 0 5px;
  color: #edf6f9;
  font-size: 16px;
}

.market-training-low-question p {
  margin: 0;
  color: #8fa6b0;
  font-size: 11px;
}

.market-training-low-choices {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.market-training-low-choices button {
  --level-color: #4fd39a;
  --level-rgb: 79, 211, 154;
  position: relative;
  display: grid;
  min-height: 48px;
  padding: 7px 12px 7px 14px;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: #c9d9df;
  text-align: left;
  border: 1px solid rgba(104, 147, 167, .32);
  border-left: 4px solid var(--level-color);
  border-radius: 5px;
  background: #0e191f;
}

.market-training-low-choices button.low-level-1 {
  --level-color: #54cfe0;
  --level-rgb: 84, 207, 224;
}

.market-training-low-choices button.low-level-2 {
  --level-color: #f1ba59;
  --level-rgb: 241, 186, 89;
}

.market-training-low-choices button.low-level-3 {
  --level-color: #ff7c7c;
  --level-rgb: 255, 124, 124;
}

.market-training-low-choices button > span {
  color: var(--level-color);
  font-size: 11px;
  font-weight: 900;
}

.market-training-low-choices button > b {
  color: #dce9ed;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
}

.market-training-low-choices button:hover {
  border-color: rgba(var(--level-rgb), .68);
  border-left-color: var(--level-color);
  background: rgba(var(--level-rgb), .07);
}

.market-training-low-choices button.selected {
  border-color: var(--level-color);
  border-left-color: var(--level-color);
  background: linear-gradient(135deg, rgba(var(--level-rgb), .25), rgba(var(--level-rgb), .08));
  box-shadow: inset 0 0 0 2px rgba(var(--level-rgb), .34), 0 0 18px rgba(var(--level-rgb), .14);
}

.market-training-low-choices button.selected::after {
  content: "✓";
  position: absolute;
  top: 4px;
  right: 6px;
  color: var(--level-color);
  font-size: 13px;
  font-weight: 900;
}

.market-training-score {
  margin-left: auto;
  color: #47d5a0;
  font-size: 20px;
}

.market-training-result.correct {
  border-top-color: rgba(55, 207, 151, .55);
}

.market-training-result.incorrect {
  border-top-color: rgba(225, 166, 78, .6);
}

.market-training-result-state {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 10px;
  color: #45d49f;
  font-size: 10px;
  font-weight: 900;
  border: 1px solid rgba(69, 212, 159, .48);
  border-radius: 999px;
  background: rgba(47, 173, 126, .12);
}

.market-training-result.incorrect .market-training-result-state {
  color: #e2ad5c;
  border-color: rgba(226, 173, 92, .52);
  background: rgba(190, 127, 35, .13);
}

.market-training-answer-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.market-training-answer-compare > div {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  min-height: 54px;
  padding: 10px 13px;
  border: 1px solid rgba(104, 147, 167, .25);
  background: #0d181e;
}

.market-training-answer-compare small {
  color: #7f97a2;
  font-size: 10px;
}

.market-training-answer-compare strong {
  color: #f1f7f9;
  font-size: 16px;
}

.market-training-answer-compare b {
  justify-self: end;
  color: #a9bbc3;
  font-size: 12px;
}

.market-training-your-answer {
  border-left: 3px solid #45bfe2 !important;
  box-shadow: inset 14px 0 24px -22px rgba(69, 191, 226, .9);
}

.market-training-your-answer strong,
.market-training-your-answer b {
  color: #67dff4;
}

.market-training-actual-answer {
  border-left: 3px solid #45d49f !important;
  box-shadow: inset 14px 0 24px -22px rgba(69, 212, 159, .9);
}

.market-training-actual-answer strong,
.market-training-actual-answer b {
  color: #65dfad;
}

.market-training-result.incorrect .market-training-your-answer {
  border-left-color: #e2ad5c !important;
}

.market-training-result.incorrect .market-training-your-answer strong,
.market-training-result.incorrect .market-training-your-answer b {
  color: #e7b866;
}

.market-training-review p {
  margin: 0;
  color: #8ba1ac;
  font-size: 11px;
  line-height: 1.6;
}

.market-training-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 16px 0;
  border-top: 1px solid rgba(100, 143, 163, .2);
  border-bottom: 1px solid rgba(100, 143, 163, .2);
}

.market-training-metrics > div {
  display: grid;
  align-content: start;
  min-width: 0;
  padding: 13px;
  border-right: 1px solid rgba(100, 143, 163, .17);
}

.market-training-metrics > div:last-child {
  border-right: 0;
}

.market-training-metrics span,
.market-training-metrics small {
  color: #78909c;
  font-size: 10px;
}

.market-training-metrics b {
  overflow-wrap: anywhere;
  margin: 4px 0 2px;
  font-size: 17px;
}

.market-training-metrics .metric-baseline b {
  color: #65c8f2;
}

.market-training-metrics .metric-low b {
  color: #5ee0ae;
}

.market-training-metrics .metric-drop b {
  color: #f0b45f;
}

.market-training-metrics .metric-recovery b {
  color: #c69cff;
}

.market-training-metrics .metric-good {
  color: #55dca8;
  font-weight: 800;
}

.market-training-metrics .metric-warning {
  color: #e7aa58;
  font-weight: 800;
}

.market-training-review {
  margin-bottom: 14px;
  padding: 11px 12px;
  border-left: 2px solid #39c7df;
  background: #0d181e;
}

.market-training-review b {
  display: block;
  margin-bottom: 3px;
  color: #b8ccd4;
  font-size: 11px;
}

.market-training-result > button {
  display: block;
  margin-left: auto;
}

.market-training-summary {
  max-width: 760px;
  margin: 34px auto;
  padding: 28px;
  text-align: center;
  border-top: 1px solid rgba(62, 204, 228, .5);
  border-bottom: 1px solid rgba(100, 143, 163, .22);
  background: #0e191f;
}

.market-training-summary > span {
  color: #42cce4;
  font-size: 11px;
}

.market-training-summary > strong {
  display: block;
  margin: 10px 0 20px;
  color: #48d6a1;
  font-size: 42px;
}

.market-training-summary > div:not(.market-training-summary-actions) {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 18px;
  border-top: 1px solid rgba(100, 143, 163, .2);
  border-bottom: 1px solid rgba(100, 143, 163, .2);
}

.market-training-summary > div p {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 13px;
  color: #8097a2;
  font-size: 11px;
}

.market-training-summary > div p + p {
  border-left: 1px solid rgba(100, 143, 163, .18);
}

.market-training-summary > div b {
  color: #dbe8ed;
  font-size: 16px;
}

.market-training-summary-actions {
  display: flex;
  justify-content: center;
  gap: 9px;
  margin-top: 18px;
}

@media (max-width: 980px) {
  .market-training-setup,
  .market-training-how {
    grid-template-columns: 1fr;
  }

  .market-training-outcomes,
  .market-training-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-training-metrics > div:nth-child(2) {
    border-right: 0;
  }

  .market-training-controls {
    align-items: stretch;
  }

  .market-training-low-question {
    grid-template-columns: 1fr;
    align-items: stretch;
  }

  .market-training-answer-compare {
    grid-template-columns: 1fr;
  }

  .market-training-timeline-notice {
    grid-template-columns: 1fr;
  }

  .market-training-timeline-notice > small {
    grid-column: 1;
  }
}

@media (max-width: 680px) {
  .market-training-shell {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .market-training-head,
  .market-training-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .market-training-stats,
  .market-training-outcomes,
  .market-training-metrics,
  .market-training-summary > div:not(.market-training-summary-actions) {
    grid-template-columns: 1fr;
  }

  .market-training-stats span,
  .market-training-metrics > div,
  .market-training-summary > div p {
    border-right: 0;
    border-bottom: 1px solid rgba(100, 143, 163, .17);
  }

  .market-training-round-head {
    grid-template-columns: 1fr auto;
  }

  .market-training-round-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .market-training-chart-wrap {
    min-height: 220px;
  }

  .market-training-low-choices {
    grid-template-columns: 1fr;
  }

  .market-training-low-question > button {
    width: 100%;
  }
}

/* desktop-source: styles/styles-final-overrides.css */
/* Desktop stable-release rules used by Web query pages. Keep layout identical to desktop. */
.sidebar-catalog-refresh-time {
  display: block;
  margin: 2px 8px 0 34px;
  overflow: hidden;
  color: rgba(142, 190, 218, 0.78);
  font-size: 10.5px;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#refreshCatalogBtn:disabled {
  cursor: wait;
  opacity: 0.78;
}

#refreshCatalogBtn:disabled .nav-icon {
  animation: catalog-refresh-spin 1.1s linear infinite;
}

@keyframes catalog-refresh-spin {
  to { transform: rotate(360deg); }
}

.nav {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  align-items: center;
  column-gap: 9px;
}

.nav-icon {
  width: 16px;
  height: 16px;
  display: block;
  overflow: visible;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
  shape-rendering: geometricPrecision;
  vector-effect: non-scaling-stroke;
  opacity: 0.88;
}

.nav-label {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav:hover .nav-icon,
button.nav.active .nav-icon {
  opacity: 1;
}

.top-contact {
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-weight: 700;
  font-synthesis: none;
}

.quick-catalog {
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-weight: 450;
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.quick-catalog .section-head h1 {
  font-family: "Segoe UI Variable Display", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  font-size: 23px;
  font-weight: 650;
  line-height: 1.18;
}

.quick-catalog .section-head p { font-weight: 450; }

.quick-catalog .hud-select-button {
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.2;
}

.quick-catalog .actions {
  grid-template-columns: minmax(112px, 1.7fr) minmax(78px, 1fr) minmax(78px, 1fr) auto;
}

.quick-catalog .actions button {
  min-height: 38px;
  padding: 0 9px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.15;
  white-space: nowrap;
}

.quick-catalog #selectedCount {
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
}

.app-confirm-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transition: opacity 140ms ease;
}

.app-confirm-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

.app-confirm-dialog {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  width: min(520px, 100%);
  min-height: 0;
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow: hidden;
  border-radius: 12px;
  transform: translateY(8px) scale(0.98);
  transition: transform 140ms ease;
}

.app-confirm-overlay.active .app-confirm-dialog { transform: translateY(0) scale(1); }

.app-confirm-glow {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.app-confirm-head,
.app-confirm-body,
.app-confirm-actions {
  position: relative;
  z-index: 1;
}

.app-confirm-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 20px 12px;
}

.app-confirm-title {
  font-size: 17px;
  font-weight: 900;
  letter-spacing: 0;
}

.app-confirm-subtitle {
  margin-top: 4px;
  font-size: 12px;
  font-weight: 800;
}

.app-confirm-close {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}

.app-confirm-body {
  min-height: 0;
  padding: 16px 20px 18px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  font-size: 14px;
  line-height: 1.7;
  white-space: pre-line;
}

.app-prompt-message { margin-bottom: 10px; }

.app-prompt-input {
  width: 100%;
  height: 40px;
  padding: 0 12px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 800;
  outline: none;
}

.inventory-name-dialog { width: min(420px, calc(100vw - 48px)); }
.inventory-import-dialog { width: min(680px, calc(100vw - 48px)); }
.inventory-import-body { display: grid; gap: 12px; }

.inventory-import-warning {
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  line-height: 1.55;
}

.inventory-import-target {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  border-radius: 8px;
  padding: 10px 12px;
}

.inventory-import-target span { font-size: 12px; }
.inventory-import-target strong {
  min-width: 0;
  overflow: hidden;
  font-size: 15px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.inventory-import-target small { font-size: 11px; }

.inventory-import-file {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
}

.inventory-import-file-input { max-width: 300px; }

.inventory-import-drop {
  border-radius: 8px;
  padding: 14px 12px;
  text-align: center;
  font-size: 13px;
}

.inventory-import-textarea {
  min-height: 150px;
  resize: vertical;
  border-radius: 8px;
  padding: 10px 12px;
  outline: none;
  font: 12px/1.55 Consolas, "SFMono-Regular", monospace;
}

.inventory-import-status { font-size: 12px; }

.app-confirm-actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  gap: 10px;
  padding: 14px 20px 18px;
}

.app-confirm-btn {
  min-width: 86px;
  height: 36px;
  padding: 0 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}

@media (max-height: 560px), (max-width: 560px) {
  .app-confirm-overlay { padding: 12px; }
  .app-confirm-dialog {
    max-height: calc(100vh - 24px);
    max-height: calc(100dvh - 24px);
  }
  .app-confirm-head { padding: 14px 16px 10px; }
  .app-confirm-body { padding: 12px 16px 14px; }
  .app-confirm-actions { padding: 10px 16px 14px; }
}

:root {
  --bg-main: #f5f5f5;
  --bg-sidebar: #fafafa;
  --bg-surface: #ffffff;
  --bg-surface-2: #f7f7f7;
  --bg-surface-3: #eeeeee;
  --border-soft: #dedede;
  --border-strong: #b9cfe0;
  --text-primary: #1f1f1f;
  --text-secondary: #555555;
  --text-muted: #737373;
  --accent: #0067c0;
  --success: #107c10;
  --warning: #9a6700;
  --danger: #c42b1c;
  --purple: #744da9;
  --window-border: #d0d0d0;
  --window-border-inner: rgba(0, 103, 192, .12);
}

html,
body,
.app-shell,
.layout,
.view-stack,
.app-view,
.analysis,
.catalog,
.page-shell,
.budget-page,
.workbench-tools-page,
.settings-page,
.membership-page,
.tutorial-page,
.market-training-page {
  background: #f5f5f5 !important;
  color: #1f1f1f !important;
}

* {
  scrollbar-color: #a8a8a8 #eeeeee;
}

::-webkit-scrollbar-track,
::-webkit-scrollbar-corner { background: #eeeeee; }
::-webkit-scrollbar-thumb { background: #b5b5b5; border-color: #eeeeee; }
::-webkit-scrollbar-thumb:hover { background: #8f8f8f; }

.app-shell {
  border-color: #d0d0d0 !important;
  box-shadow: none !important;
}

.topbar {
  background: rgba(255, 255, 255, .98) !important;
  border-bottom-color: #dedede !important;
  box-shadow: 0 1px 8px rgba(0, 0, 0, .04) !important;
}

.brand strong,
.section-head h1,
.tutorial-head h1,
.membership-heading h1,
.market-training-head h1 { color: #1f1f1f !important; }

.brand .pro {
  color: #805a00 !important;
  background: #fff4ce !important;
  border-color: #f1d58a !important;
}

.brand .dot {
  background: #107c10 !important;
  box-shadow: 0 0 0 4px rgba(16, 124, 16, .12) !important;
}

.brand #statusText,
.section-head p,
.tiny,
.tutorial-head p,
.membership-heading p,
.market-training-head p { color: #666 !important; }

.top-contact { color: #555 !important; }
.top-contact a,
.top-contact span {
  color: #444 !important;
  background: #f2f2f2 !important;
  border-color: #dddddd !important;
  box-shadow: none !important;
  text-decoration: none !important;
}
.top-contact a:hover { color: #004f91 !important; background: #e7f1fb !important; border-color: #8ab9df !important; }

.searchbar {
  background: #fff !important;
  border-color: #c9c9c9 !important;
  border-bottom-color: #0067c0 !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .04) !important;
}
.searchbar input { color: #1f1f1f !important; background: transparent !important; }
.search-icon { color: #0067c0 !important; }
.sponsor-btn,
.refresh-btn,
.tutorial-help-btn,
.web-mobile-menu { color: #004f91 !important; background: #f3f8fc !important; border-color: #b9d6ec !important; box-shadow: none !important; }

.sidebar {
  background: #fafafa !important;
  border-right-color: #dedede !important;
  box-shadow: none !important;
}
.splitter { background: #e5e5e5 !important; }
.splitter::after { background: #b9b9b9 !important; }
.nav-section p { color: #737373 !important; }
.nav { color: #333 !important; background: transparent !important; border-color: transparent !important; }
.nav:hover { color: #1f1f1f !important; background: #eeeeee !important; border-color: #e4e4e4 !important; }
.nav.active,
button.nav.active { color: #004f91 !important; background: #e7f1fb !important; border-color: #c7dff2 !important; box-shadow: inset 3px 0 #0067c0 !important; }
.nav-icon {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  max-width: 16px !important;
  min-height: 16px !important;
  max-height: 16px !important;
  color: currentColor !important;
  fill: none !important;
  stroke: currentColor !important;
  filter: none !important;
}
.sidebar-catalog-refresh-time { color: #737373 !important; }

button,
select,
input,
textarea {
  color: #1f1f1f !important;
  background: #fff !important;
  border-color: #cfcfcf !important;
  box-shadow: none !important;
}
button:hover,
select:hover,
input:focus,
textarea:focus { color: #1f1f1f !important; background: #f3f3f3 !important; border-color: #8ab9df !important; box-shadow: 0 0 0 2px rgba(0, 103, 192, .1) !important; }
button.primary { color: #fff !important; background: #0067c0 !important; border-color: #005a9e !important; }
button.primary:hover { color: #fff !important; background: #005a9e !important; }
button.danger { color: #b42318 !important; background: #fff5f4 !important; border-color: #e8b3ae !important; }

.panel,
.sidebar-auto-range,
.table-card,
.analysis-table-card,
.analysis-table-stage,
.card-scroll,
.full-catalog-scroll,
.settings-card,
.membership-card,
.tutorial-shell,
.market-training-shell,
.budget-category-panel,
.budget-plan-controlbar,
.budget-plan-list,
.budget-category-standards,
.market-training-stats,
.market-training-setup,
.market-training-how,
.market-training-case,
.market-training-answer,
.market-training-result,
.market-training-summary,
.market-training-chart-shell,
.market-training-panel,
.inventory-profile-card,
.inventory-total-card,
.inventory-history-card,
.inventory-table-card,
.workbench-tool-panel {
  background: #fff !important;
  color: #1f1f1f !important;
  border-color: #dedede !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .035) !important;
}

.disclaimer-panel { color: #5c4b00 !important; background: #fff8df !important; border-color: #ead58b !important; }
.disclaimer-panel strong { color: #805a00 !important; }
.disclaimer-panel p { color: #665b2f !important; }
.analysis-status,
.top-status { color: #444 !important; background: #f4f9fd !important; border-color: #c8dfef !important; box-shadow: none !important; }
.top-progress,
.progress { background: #e2e2e2 !important; border-color: #d6d6d6 !important; }
.progress span,
#progressBar { background: #0067c0 !important; }

.range-row,
.sidebar-auto-range .range-row { background: #f8f8f8 !important; border-color: #e1e1e1 !important; box-shadow: none !important; }
.range-name { color: #333 !important; }
.range-row input[type="checkbox"],
.sidebar-auto-range .range-row input[type="checkbox"] { background: #fff !important; border-color: #9d9d9d !important; box-shadow: none !important; }
.range-row input[type="checkbox"]:checked { background-color: #0067c0 !important; border-color: #0067c0 !important; }
.range-row .range-count,
.sidebar-auto-range .range-row .range-count,
.range-all { background: #fff !important; color: #333 !important; border-color: #d0d0d0 !important; box-shadow: none !important; }

table,
#analysisTable { background: #fff !important; color: #1f1f1f !important; }
th { color: #4b4b4b !important; background: #f6f6f6 !important; border-bottom-color: #d8d8d8 !important; }
td { color: #252525 !important; background: #fff !important; border-bottom-color: #ededed !important; }
tbody tr:hover td { background: #f3f8fc !important; }
tbody tr.selected td,
tbody tr.analysis-row-selected td { background: #e7f1fb !important; }
.empty { color: #737373 !important; background: #fff !important; }

.hud-select-button { color: #1f1f1f !important; background: #fff !important; border-color: #cfcfcf !important; box-shadow: none !important; }
.hud-select-button:hover,
.hud-select.open .hud-select-button { background: #f3f3f3 !important; border-color: #8ab9df !important; box-shadow: 0 0 0 2px rgba(0, 103, 192, .1) !important; }
.hud-select-arrow,
.hud-select-title { color: #0067c0 !important; }
.hud-select-count { color: #737373 !important; }
.hud-select-menu { color: #1f1f1f !important; background: #fff !important; border-color: #cfcfcf !important; box-shadow: 0 16px 40px rgba(0, 0, 0, .16) !important; }
.hud-select-search { color: #1f1f1f !important; background: #f8f8f8 !important; border-color: #cfcfcf !important; }
.hud-select-option { color: #333 !important; background: #fff !important; border-color: transparent !important; }
.hud-select-option:hover { color: #1f1f1f !important; background: #eee !important; }
.hud-select-option.active { color: #fff !important; background: #0067c0 !important; border-color: #005a9e !important; }

.product-card { background: #fff !important; border-color: #dedede !important; box-shadow: 0 2px 8px rgba(0, 0, 0, .045) !important; }
.product-card.common { background: #fff !important; border-top-color: #9aa0a6 !important; }
.product-card.uncommon { background: #f4fbf6 !important; border-top-color: #3a9b5f !important; }
.product-card.rare { background: #f1f8fd !important; border-top-color: #1677b8 !important; }
.product-card.ultraRare { background: #faf5ff !important; border-top-color: #8b5fbf !important; }
.product-card:hover { border-color: #7ab4df !important; box-shadow: 0 5px 16px rgba(0, 80, 140, .12) !important; }
.product-card.selected { background: #eaf4ff !important; }
.product-card .title { color: #1f1f1f !important; }
.product-card .meta,
.product-card .bottom { color: #666 !important; }
.rarity.common { color: #555 !important; }
.rarity.uncommon { color: #107c10 !important; }
.rarity.rare { color: #0067c0 !important; }
.rarity.ultraRare { color: #744da9 !important; }
.sell { color: #107c10 !important; }
.buy { color: #555 !important; }
.return-label { color: #805a00 !important; }
.star { color: #805a00 !important; background: #fff !important; border-color: #d7d7d7 !important; }

.analysis-product strong,
.budget-product strong,
.budget-cell strong,
.market-training-case-head h2,
.market-training-answer h2,
.market-training-result h2,
.market-training-low-question h2,
.market-training-outcome-head b { color: #1f1f1f !important; }
.analysis-product small,
.budget-product small,
.budget-cell span,
.budget-cell small,
.market-training-case-head p,
.market-training-source small,
.market-training-answer p,
.market-training-low-question p,
.market-training-outcomes .market-training-outcome-detail { color: #666 !important; }

.market-training-timeline-notice { background: #f7f7f7 !important; border-color: #dedede !important; }
.market-training-timeline-notice > strong { color: #333 !important; }
.market-training-timeline-notice > div > span { color: #555 !important; background: #fff !important; border-color: #d5d5d5 !important; }
.market-training-timeline-notice > small { color: #737373 !important; }
.market-training-grid { stroke: #dedede !important; }
.market-training-axis { fill: #666 !important; }
.market-training-hidden-zone { fill: #f5f5f5 !important; stroke: #d8d8d8 !important; }
.market-training-hidden-text { fill: #666 !important; }
.market-training-outcomes button,
.market-training-low-choices button { color: #333 !important; background: #fff !important; border-color: #d0d0d0 !important; }
.market-training-outcomes button:hover,
.market-training-outcomes button.selected,
.market-training-low-choices button:hover,
.market-training-low-choices button.selected { background: rgba(var(--outcome-rgb, 0, 103, 192), .10) !important; }
.market-training-outcomes button.selected::after { color: #fff !important; }

.app-confirm-overlay { background: rgba(32, 32, 32, .35) !important; }
.app-confirm-dialog { background: #fff !important; color: #1f1f1f !important; border-color: #d0d0d0 !important; box-shadow: 0 24px 80px rgba(0, 0, 0, .2) !important; }
.app-confirm-glow { background: none !important; }
.app-confirm-head,
.app-confirm-actions { border-color: #dedede !important; background: #fafafa !important; }
.app-confirm-title { color: #1f1f1f !important; }
.app-confirm-subtitle,
.app-confirm-body,
.app-prompt-message,
.inventory-import-status { color: #666 !important; }
.app-confirm-close,
.app-confirm-btn { background: #f5f5f5 !important; color: #333 !important; border-color: #d0d0d0 !important; }
.app-confirm-ok { background: #0067c0 !important; color: #fff !important; border-color: #005a9e !important; }
.app-confirm-ok[data-tone="warning"] { background: #9a6700 !important; color: #fff !important; }
.app-confirm-ok[data-tone="danger"] { background: #c42b1c !important; color: #fff !important; }
.inventory-import-warning,
.inventory-import-target,
.inventory-import-file,
.inventory-import-drop { background: #f7f7f7 !important; color: #444 !important; border-color: #d0d0d0 !important; box-shadow: none !important; }
.inventory-import-target span,
.inventory-import-target small { color: #666 !important; }
.inventory-import-target strong { color: #1f1f1f !important; }
.inventory-import-textarea { background: #fff !important; color: #1f1f1f !important; border-color: #cfcfcf !important; }
.inventory-import-status.error { color: #c42b1c !important; }

.startup-screen { background: #f5f5f5 !important; color: #1f1f1f !important; }
.startup-panel p,
.startup-panel strong { color: #555 !important; }
.startup-progress { background: #e2e2e2 !important; border-color: #d0d0d0 !important; }
.startup-enter { background: #0067c0 !important; color: #fff !important; border-color: #005a9e !important; }
.desktop-shell-actions { display: none !important; }

/* Keep desktop structure while fully translating dark component surfaces to Web light theme. */
body,
button,
input,
select,
textarea {
  font-family: "Segoe UI Variable Text", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif !important;
  font-synthesis: none;
  letter-spacing: 0 !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

/* Tutorial center */
.tutorial-head { border-bottom-color: #d9d9d9 !important; }
.tutorial-overall {
  color: #555 !important;
  font-size: 13px !important;
  font-weight: 600;
}
.tutorial-overall-track,
.tutorial-course-progress {
  background: #e7eaed !important;
  border-color: #d2d7dc !important;
  box-shadow: none !important;
}
.tutorial-overall-track i,
.tutorial-course-progress i { background: #0067c0 !important; }
.tutorial-course {
  color: #1f1f1f !important;
  background: #fff !important;
  border-color: #d8dde2 !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .045) !important;
}
.tutorial-course:hover {
  border-color: #8ab9df !important;
  box-shadow: 0 5px 16px rgba(0, 80, 140, .09) !important;
}
.tutorial-course-head span { color: #0067c0 !important; font-weight: 800; }
.tutorial-course-head strong { color: #52606d !important; }
.tutorial-course h2 { color: #1f1f1f !important; font-weight: 700; }
.tutorial-course > p { color: #4f5963 !important; font-size: 13px !important; }
.tutorial-course-meta,
.tutorial-course-actions > span { color: #66717c !important; font-size: 12px !important; }
.tutorial-course-actions button {
  color: #fff !important;
  background: #0067c0 !important;
  border-color: #005a9e !important;
  font-weight: 700;
}
.tutorial-course-actions button:hover { color: #fff !important; background: #005a9e !important; }
.tutorial-empty { color: #626b73 !important; border-color: #dedede !important; }

/* Membership */
.membership-kicker {
  color: #0067c0 !important;
  letter-spacing: 0 !important;
}
.membership-card-title h2 { color: #1f1f1f !important; }
.membership-card-title p,
.membership-hint { color: #58636d !important; }
.membership-badge {
  color: #005a9e !important;
  background: #e7f1fb !important;
  border-color: #b7d7ef !important;
  box-shadow: none !important;
}
.membership-badge[data-active="true"] {
  color: #0b6a2b !important;
  background: #e8f6ed !important;
  border-color: #a9d8b8 !important;
}
.membership-facts > div {
  background: #f4f7fa !important;
  border-color: #d8e0e7 !important;
  box-shadow: none !important;
}
.membership-facts span { color: #5f6d79 !important; font-size: 12px !important; }
.membership-facts strong { color: #1f1f1f !important; font-size: 15px !important; }
.membership-code-field > span { color: #374151 !important; }
.membership-code-field input {
  color: #1f1f1f !important;
  background: #fff !important;
  border-color: #b8c6d1 !important;
}
.membership-code-field input:focus {
  border-color: #0067c0 !important;
  box-shadow: 0 0 0 3px rgba(0, 103, 192, .12) !important;
}

/* Settings */
.settings-token-status {
  color: #174a6e !important;
  background: #eaf4fb !important;
  border-color: #b8d8ed !important;
  box-shadow: none !important;
}
.settings-token-status::before {
  background: #0078d4 !important;
  box-shadow: none !important;
}
.settings-token-status.trade-ready {
  color: #145c2e !important;
  background: #eaf6ee !important;
  border-color: #b5d9c0 !important;
}
.settings-token-status.trade-ready::before { background: #107c10 !important; box-shadow: none !important; }
.settings-token-status.trade-missing {
  color: #8f1d16 !important;
  background: #fff1f0 !important;
  border-color: #efbbb6 !important;
}
.settings-token-status.trade-missing::before { background: #c42b1c !important; box-shadow: none !important; }
.settings-card-head h2 { color: #1f1f1f !important; }
.settings-card-head p,
.settings-hint { color: #58636d !important; }
.settings-badge,
.settings-badge.github {
  color: #005a9e !important;
  background: #e7f1fb !important;
  border-color: #b7d7ef !important;
}
.settings-badge.warning {
  color: #8f1d16 !important;
  background: #fff1f0 !important;
  border-color: #efbbb6 !important;
}
.settings-update-facts > div {
  color: #1f1f1f !important;
  background: #f4f7fa !important;
  border: 1px solid #d8e0e7 !important;
  box-shadow: none !important;
}
.settings-update-facts span { color: #5f6d79 !important; font-size: 12px !important; }
.settings-update-facts strong { color: #1f1f1f !important; font-size: 14px !important; }
.settings-update-notes,
.settings-update-status {
  color: #374151 !important;
  background: #f4f7fa !important;
  border-color: #d8e0e7 !important;
  box-shadow: none !important;
}
.settings-update-notes-head span { color: #52606d !important; }
.settings-update-notes-head strong { color: #0067c0 !important; }
.settings-update-notes pre { color: #4b5563 !important; }
.settings-update-status[data-mode="ready"],
.settings-update-status[data-mode="ok"] {
  color: #145c2e !important;
  background: #eaf6ee !important;
  border-color: #b5d9c0 !important;
}
.settings-update-status[data-mode="error"] {
  color: #8f1d16 !important;
  background: #fff1f0 !important;
  border-color: #efbbb6 !important;
}

/* Budget recommendation */
.budget-plan-filter,
.budget-plan-control {
  color: #374151 !important;
  background: #fff !important;
  border-color: #c9d1d8 !important;
  box-shadow: none !important;
}
.budget-category-title span { color: #1f1f1f !important; font-size: 13px !important; }
.budget-category-chip {
  color: #374151 !important;
  background: #fff !important;
  border-color: #cfd6dc !important;
  box-shadow: none !important;
}
.budget-category-chip:hover {
  color: #004f91 !important;
  background: #f3f8fc !important;
  border-color: #8ab9df !important;
}
.budget-category-chip:has(input:checked) {
  color: #fff !important;
  background: #0067c0 !important;
  border-color: #005a9e !important;
  box-shadow: 0 0 0 2px rgba(0, 103, 192, .13) !important;
}
.budget-category-chip input {
  background: #fff !important;
  border-color: #8b98a5 !important;
  box-shadow: none !important;
}
.budget-category-chip input:checked {
  background-color: #fff !important;
  border-color: #fff !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.1 6.2 4.8 8.7 9.8 3.3' fill='none' stroke='%230067c0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
}
.budget-plan-kpis section,
.budget-plan-kpis .budget-kpi-main,
.budget-plan-kpis .budget-kpi-sub {
  color: #1f1f1f !important;
  background: #fff !important;
  border-color: #d6dde3 !important;
  box-shadow: none !important;
}
.budget-plan-kpis .budget-kpi-sub { background: #f7f9fb !important; }
.budget-plan-kpis span { color: #56616c !important; font-size: 12px !important; }
.budget-plan-kpis strong { color: #1f1f1f !important; }
.budget-plan-kpis .budget-kpi-cost strong { color: #b42318 !important; }
.budget-plan-kpis .budget-kpi-sell strong { color: #0067c0 !important; }
.budget-plan-kpis .budget-kpi-profit strong,
.budget-plan-kpis strong.num-positive { color: #087f5b !important; }
.budget-plan-kpis strong.num-negative { color: #c42b1c !important; }
.budget-plan-kpis strong.num-neutral { color: #3f4851 !important; }
.budget-plan-kpis small { color: #68737d !important; font-size: 11px !important; }
.budget-category-standards,
.budget-category-standards small { color: #5d6872 !important; }
.budget-category-standards > span:not(.budget-standard-card),
.budget-standard-card {
  color: #374151 !important;
  background: #f7f9fb !important;
  border-color: #d6dde3 !important;
}
.budget-plan-controlbar,
.budget-plan-control-group,
.budget-plan-tabs,
.budget-plan-strategies {
  color: #374151 !important;
  background: #f3f5f7 !important;
  border-color: #d6dde3 !important;
  box-shadow: none !important;
}
.budget-plan-control-title {
  color: #4f5b66 !important;
  background: #e7edf3 !important;
  border-color: #cbd5de !important;
}
.budget-plan-tabs button,
.budget-plan-strategies button {
  color: #374151 !important;
  background: #fff !important;
  border-color: #cfd6dc !important;
}
.budget-plan-tabs button:hover,
.budget-plan-strategies button:hover { color: #004f91 !important; background: #eef6fc !important; }
.budget-plan-tabs button.active,
.budget-plan-strategies button.active {
  color: #fff !important;
  background: #0067c0 !important;
  border-color: #005a9e !important;
}
.budget-plan-tabs button.active::after,
.budget-plan-strategies button.active::after { background: transparent !important; }
.budget-plan-tabs button:disabled,
.budget-plan-strategies button:disabled {
  color: #7a858f !important;
  background: #edf0f2 !important;
  border-color: #d5dbe0 !important;
  opacity: 1 !important;
  filter: none !important;
}
.budget-plan-stage,
.budget-plan-rows,
.budget-rec-row {
  color: #252525 !important;
  background: #fff !important;
  border-color: #e0e4e8 !important;
}
.budget-plan-list-head {
  color: #3f4851 !important;
  background: #eef1f4 !important;
  border-color: #d6dde3 !important;
  font-size: 12px !important;
  font-weight: 700 !important;
}
.budget-plan-empty { color: #66717c !important; background: #fff !important; }

/* Historical market training */
.market-training-head { border-bottom-color: #d8dde2 !important; }
.market-training-kicker { color: #0067c0 !important; font-weight: 700; }
.market-training-head h1,
.market-training-setup h2,
.market-training-how h2,
.market-training-answer h2,
.market-training-progress h2,
.market-training-summary h2 { color: #1f1f1f !important; }
.market-training-head p,
.market-training-setup p,
.market-training-how p,
.market-training-answer p,
.market-training-summary > p {
  color: #52606d !important;
  font-size: 13px !important;
}
.market-training-stats {
  background: #fff !important;
  border-color: #d8dde2 !important;
  box-shadow: none !important;
}
.market-training-stats span {
  color: #52606d !important;
  border-right-color: #d8dde2 !important;
  font-size: 12px !important;
}
.market-training-stats b { color: #1f1f1f !important; }
.market-training-setup {
  background: #fff !important;
  border-top-color: #8ab9df !important;
  border-bottom-color: #d8dde2 !important;
  box-shadow: none !important;
}
.market-training-controls label { color: #52606d !important; font-size: 12px !important; }
.market-training-how > div > span {
  color: #0067c0 !important;
  background: #eef6fc !important;
  border-color: #8ab9df !important;
}
.market-training-how b { color: #1f1f1f !important; }
.market-training-message {
  color: #6f5200 !important;
  background: #fff8df !important;
  border-left-color: #c59b24 !important;
}
.market-training-loading,
.market-training-progress { color: #52606d !important; }
.market-training-progress > div,
.market-training-round-track {
  background: #e7eaed !important;
  border-color: #cbd5de !important;
}

.web-login-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(243, 243, 243, .96);
  backdrop-filter: blur(18px);
}

.web-login-overlay[hidden] { display: none; }

.web-login-card {
  width: min(520px, 100%);
  display: grid;
  gap: 20px;
  padding: 36px;
  border: 1px solid rgba(0, 0, 0, .09);
  border-radius: 22px;
  background: #fff;
  box-shadow: 0 24px 80px rgba(0, 0, 0, .12);
}

.web-login-card h1 { margin: 7px 0 8px; font-size: 28px; }
.web-login-card p { margin: 0; color: #626262; }
.web-login-card label { display: grid; gap: 8px; }
.web-login-card input { height: 46px; padding: 0 14px; border-radius: 9px; }
.web-login-card button { height: 44px; }
.web-login-card #webLoginMessage { min-height: 20px; color: #b42318; }
.web-mobile-menu { display: none; }
.app-shell.web-ready { opacity: 1; }
.product-card { cursor: pointer; }

.product-card.selected {
  outline: 3px solid #0067c0 !important;
  outline-offset: -3px;
  box-shadow: 0 0 0 4px rgba(0, 103, 192, .14) !important;
}

.product-card .star { color: #9a6700 !important; }
.num-positive, .positive { color: #087f5b !important; }
.num-negative, .negative { color: #c42b1c !important; }
.num-neutral { color: #666 !important; }
.web-analysis-empty { padding: 30px; text-align: center; color: #777; }
.web-service-ok { color: #087f5b !important; }
.web-service-error { color: #c42b1c !important; }

.web-training-error {
  display: grid;
  justify-items: center;
  gap: 10px;
  min-height: 280px;
  padding: 64px 24px;
  text-align: center;
  background: #fff;
  border: 1px solid #dedede;
  border-radius: 14px;
}

.web-training-error strong { font-size: 20px; }
.web-training-error p { margin: 0; color: #666; }
.web-training-error button { margin-top: 8px; }

.web-tutorial-highlight {
  position: fixed;
  z-index: 9998;
  border: 3px solid #0067c0;
  border-radius: 10px;
  pointer-events: none;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .28), 0 0 0 6px rgba(0, 103, 192, .18);
}

.web-tutorial-card {
  position: fixed;
  z-index: 9999;
  width: min(360px, calc(100vw - 24px));
  padding: 18px;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 60px rgba(0, 0, 0, .22);
}

.web-tutorial-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 14px;
}

.modal:not(.hidden) { display: flex !important; }
.detail-dialog { max-height: min(900px, 92vh); overflow: auto; }
.detail-web-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.detail-web-metrics > div { padding: 13px; border-radius: 10px; background: #f4f4f4; }
.detail-web-metrics span { display: block; color: #666; font-size: 12px; }
.detail-web-metrics strong { display: block; margin-top: 5px; font-size: 18px; }
.detail-web-chart { width: 100%; min-height: 320px; }
.detail-web-events { display: grid; gap: 8px; }
.detail-web-event { padding: 10px; border-left: 4px solid #16a085; background: #effaf6; }

.web-toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 10001;
  padding: 12px 16px;
  border-radius: 10px;
  background: #202020;
  color: #fff;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .2);
}

@media (max-width: 900px) {
  .topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
    height: auto !important;
    min-height: 58px !important;
  }

  .layout { display: block !important; }
  .sidebar {
    position: fixed !important;
    inset: 58px auto 0 0 !important;
    z-index: 90 !important;
    width: min(290px, 84vw) !important;
    transform: translateX(-105%);
    transition: transform .2s ease;
    overflow: auto !important;
  }
  .sidebar.web-open { transform: none; }
  .web-mobile-menu { display: inline-grid; place-items: center; }
  .left-splitter, .right-splitter { display: none !important; }
  .top-contact { display: none !important; }
  .detail-web-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 600px) {
  .topbar { flex-wrap: wrap; padding: 8px !important; }
  .top-actions { width: 100%; order: 3; }
  .searchbar { flex: 1; }
}

.rating-badge.rating-SSS { color: #6b2300 !important; background: #ffe3b0 !important; border-color: #d67500 !important; }
.rating-badge.rating-SS { color: #5b1675 !important; background: #f3dcff !important; border-color: #a64ac9 !important; }
.rating-badge.rating-S { color: #004f91 !important; background: #dceeff !important; border-color: #3282bd !important; }
.rating-badge.rating-A { color: #106b3b !important; background: #daf3e5 !important; border-color: #3a9b68 !important; }
.rating-badge.rating-B { color: #735400 !important; background: #fff1bf !important; border-color: #c59b24 !important; }
.rating-badge.rating-C,
.rating-badge.rating-D { color: #555 !important; background: #eee !important; border-color: #aaa !important; }

.inventory-add {
  color: #004f91 !important;
  background: #eaf4ff !important;
  border-color: #8ab9df !important;
}

.inventory-add.active {
  color: #fff !important;
  background: #0067c0 !important;
  border-color: #005a9e !important;
}

.inventory-page .page-shell,
.workbench-tools-page .page-shell { background: #f5f5f5 !important; color: #1f1f1f !important; }

.inventory-profile-card,
.inventory-total-card,
.inventory-history-card,
.inventory-table-card,
.workbench-tool-panel,
.workbench-compare-item,
.workbench-alert-row,
.workbench-task-row {
  color: #252525 !important;
  background: #fff !important;
  border-color: #dedede !important;
  box-shadow: 0 2px 10px rgba(0, 0, 0, .035) !important;
}

.inventory-profile-card span,
.inventory-total-card span,
.inventory-total-card small,
.inventory-history-head span,
.workbench-tool-title p,
.workbench-compare-item > span,
.workbench-task-row div > span { color: #666 !important; }

.inventory-profile-card strong,
.inventory-history-head h2,
.workbench-tool-title h2,
.workbench-compare-item > strong { color: #1f1f1f !important; }

.inventory-total-card strong { color: #087f5b !important; }
.inventory-history-chart { background: #fff !important; border-color: #e2e2e2 !important; }
.inventory-history-chart .inventory-grid-line { stroke: #dedede !important; }
.inventory-history-chart text { fill: #666 !important; }
.inventory-value strong { color: #1f1f1f !important; }
.inventory-value small { color: #666 !important; }
.workbench-tools-empty { color: #737373 !important; background: #fafafa !important; border-color: #dedede !important; }
