:root {
  --bg: #e7f0f8;
  --text: #0d1728;
  --muted: #657285;
  --line: rgba(82, 101, 122, 0.18);
  --line-strong: rgba(82, 101, 122, 0.28);
  --panel: rgba(255, 255, 255, 0.64);
  --panel-strong: rgba(255, 255, 255, 0.86);
  --green: #079455;
  --red: #d92d20;
  --blue: #1f87c9;
  --cyan: #62c5ec;
  --magenta: #c51f63;
  --amber: #a15c07;
  --ink: #0b1430;
  --navy: #071a44;
  --shadow: 0 22px 58px rgba(20, 42, 73, 0.1);
  --soft-shadow: 0 14px 36px rgba(20, 42, 73, 0.08);
  --topbar-height: 92px;
  --sidebar-width: 202px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.96) 0%, rgba(238, 245, 247, 0.94) 48%, rgba(247, 248, 242, 0.92) 100%),
    #eef3f6;
  color: var(--text);
  font-family: "Microsoft YaHei", "Segoe UI", Arial, sans-serif;
  letter-spacing: 0;
}

.login-body {
  min-height: 100vh;
  display: grid;
  place-items: center;
  background:
    linear-gradient(140deg, rgba(255, 255, 255, 0.96), rgba(232, 243, 246, 0.92) 54%, rgba(248, 248, 242, 0.9)),
    #eef3f6;
}

.login-shell {
  width: min(460px, calc(100vw - 28px));
  padding: 0;
}

.login-panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.58);
  border-radius: 8px;
  padding: 28px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px) saturate(150%);
}

.login-brand {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.login-logo {
  width: 150px;
  height: 150px;
  object-fit: contain;
  margin: -28px 0 -18px -22px;
}

.login-panel p {
  margin-top: 4px;
  color: var(--muted);
  font-size: 14px;
}

.login-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.login-form label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  color: #344054;
}

.login-form input {
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 11px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--text);
  font-size: 15px;
  outline: none;
}

.login-form input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(23, 107, 135, 0.14);
}

.login-submit {
  width: 100%;
  height: 42px;
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
  font-size: 15px;
}

.login-submit:hover {
  background: var(--blue);
  color: #fff;
}

.login-message {
  margin-top: 16px;
  border: 1px solid rgba(23, 107, 135, 0.22);
  background: rgba(240, 249, 255, 0.78);
  color: var(--blue);
  border-radius: 6px;
  padding: 10px;
  font-size: 13px;
}

.login-message.error {
  border-color: rgba(217, 45, 32, 0.22);
  background: rgba(255, 244, 242, 0.78);
  color: var(--red);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  height: var(--topbar-height);
  padding: 10px 28px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.72);
  box-shadow: 0 8px 28px rgba(31, 41, 55, 0.08);
  backdrop-filter: blur(18px) saturate(160%);
}

.brand {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 14px;
}

.brand-logo {
  flex: 0 0 auto;
  width: 142px;
  height: 104px;
  object-fit: contain;
  margin-left: -12px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 24px;
  font-weight: 700;
  color: var(--ink);
}

h2 {
  font-size: 19px;
  color: var(--ink);
}

h3 {
  font-size: 15px;
  margin-bottom: 12px;
  color: var(--ink);
}

#statusText,
.section-head span {
  color: var(--muted);
  font-size: 13px;
  margin-top: 4px;
}

.actions {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

button {
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.74);
  color: var(--ink);
  font-size: 18px;
  cursor: pointer;
  box-shadow: 0 5px 16px rgba(31, 41, 55, 0.06);
}

button:hover {
  border-color: rgba(23, 107, 135, 0.48);
  color: var(--blue);
  background: rgba(255, 255, 255, 0.9);
}

.hidden,
[hidden] {
  display: none !important;
}

.dog-loader {
  position: sticky;
  top: var(--topbar-height);
  z-index: 4;
  padding: 10px 28px 0 222px;
  pointer-events: none;
}

.dog-loader-panel {
  max-width: 980px;
  border: 1px solid rgba(23, 107, 135, 0.14);
  border-radius: 8px;
  padding: 10px 14px 12px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.08);
  backdrop-filter: blur(14px) saturate(150%);
}

.dog-loader-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  font-size: 13px;
  color: var(--ink);
}

.dog-loader-title span {
  color: var(--blue);
  font-weight: 700;
}

.dog-loader-track {
  position: relative;
  height: 12px;
  margin-top: 12px;
  border-radius: 999px;
  background: rgba(23, 107, 135, 0.12);
  overflow: visible;
}

.dog-loader-fill {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #176b87, #079455);
  transition: width 220ms ease;
}

.dog-loader-runner {
  position: absolute;
  left: 0%;
  bottom: -2px;
  width: 58px;
  height: 58px;
  transform: translateX(-22px);
  border-radius: 999px;
  background-image: url("/static/assets/dog-loader-heads.png");
  background-repeat: no-repeat;
  background-size: 200% 100%;
  background-position: 0 0;
  filter: drop-shadow(0 8px 14px rgba(30, 70, 112, 0.2));
  transition: left 220ms ease;
  animation: dogLoaderPose 1.2s steps(1, end) infinite;
}

.dog-loader-step {
  margin-top: 7px;
  color: var(--muted);
  font-size: 12px;
}

@keyframes dogLoaderPose {
  0%,
  49% {
    background-position: 0 0;
  }
  50%,
  100% {
    background-position: 100% 0;
  }
}

.privacy-toggle {
  position: relative;
}

.privacy-toggle.active {
  border-color: rgba(23, 107, 135, 0.52);
  color: var(--blue);
}

.privacy-eye-icon {
  width: 18px;
  height: 11px;
  border: 2px solid currentColor;
  border-radius: 999px / 720px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.privacy-eye-icon::after {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: currentColor;
}

.privacy-toggle:not(.active) .privacy-eye-icon::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transform: rotate(-35deg);
}

.masked-money {
  letter-spacing: 1px;
  color: var(--muted);
}

.privacy-empty {
  height: 260px;
  display: grid;
  place-items: center;
  color: var(--muted);
  font-size: 13px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.42);
}

.secondary-button {
  width: auto;
  min-width: 82px;
  height: 32px;
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.ghost-button {
  color: var(--muted);
}

.app-shell {
  display: grid;
  grid-template-columns: 192px minmax(0, 1fr);
  min-height: calc(100vh - var(--topbar-height));
}

.sidebar {
  position: sticky;
  top: var(--topbar-height);
  align-self: start;
  height: calc(100vh - var(--topbar-height));
  padding: 16px 12px;
  border-right: 1px solid rgba(255, 255, 255, 0.56);
  background: rgba(255, 255, 255, 0.54);
  box-shadow: 12px 0 34px rgba(31, 41, 55, 0.05);
  backdrop-filter: blur(18px) saturate(150%);
}

.nav-item {
  width: 100%;
  height: 40px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 12px;
  font-size: 14px;
  text-align: left;
  box-shadow: none;
}

.nav-item.active {
  border-color: rgba(217, 45, 32, 0.34);
  background: rgba(255, 255, 255, 0.86);
  color: var(--red);
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(217, 45, 32, 0.08);
}

.module-main {
  padding: 20px 28px 42px;
  min-width: 0;
}

.module-view {
  display: none;
}

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

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(168px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi-card,
.panel {
  background: var(--panel);
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  box-shadow: var(--soft-shadow);
  backdrop-filter: blur(16px) saturate(145%);
}

.kpi-card {
  padding: 14px;
  min-height: 96px;
}

.kpi-label {
  color: var(--muted);
  font-size: 13px;
}

.kpi-value {
  margin-top: 8px;
  font-size: 26px;
  font-weight: 700;
  color: var(--ink);
  overflow-wrap: anywhere;
}

.kpi-detail {
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  overflow-wrap: anywhere;
}

.band {
  margin-top: 18px;
  border-top: 1px solid var(--line);
  padding-top: 18px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: end;
  margin-bottom: 12px;
}

.overview-account-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 14px;
  margin: -2px 0 14px;
  padding: 10px 12px;
  border: 1px solid rgba(255, 255, 255, 0.62);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.52);
  box-shadow: 0 8px 24px rgba(31, 41, 55, 0.05);
  backdrop-filter: blur(14px) saturate(145%);
}

.overview-account-bar > span {
  flex: 0 0 auto;
  color: var(--ink);
  font-size: 13px;
  font-weight: 700;
}

.overview-account-bar .chart-filters {
  margin: 0;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr);
  gap: 12px;
  margin-bottom: 12px;
}

.split.single-panel {
  grid-template-columns: minmax(0, 1fr);
}

.overview-split {
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
}

.signals-top,
.signals-lower {
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.38fr);
}

.panel {
  padding: 14px;
  min-width: 0;
}

.panel-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.panel-title-row h3 {
  margin-bottom: 0;
}

.segmented-control {
  display: inline-flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.54);
}

.segmented-control button {
  width: auto;
  height: 28px;
  min-width: 58px;
  padding: 0 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.segmented-control button.active {
  background: rgba(217, 45, 32, 0.1);
  color: var(--red);
}

.wide {
  margin-bottom: 12px;
}

.chart {
  min-height: 292px;
}

.bar-chart {
  display: grid;
  gap: 9px;
  padding: 8px 4px 4px;
}

.bar-chart.dense {
  gap: 7px;
}

.bar-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 44px;
  align-items: center;
  gap: 10px;
}

.bar-rank {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(95, 111, 130, 0.14);
}

.bar-main {
  min-width: 0;
}

.bar-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 4px;
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
}

.bar-label span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-label small {
  color: var(--muted);
  flex: 0 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.bar-track {
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(95, 111, 130, 0.12);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
}

.bar-fill {
  height: 100%;
  border-radius: inherit;
  background: var(--bar-color);
  background: linear-gradient(90deg, color-mix(in srgb, var(--bar-color) 76%, #fff), var(--bar-color));
  box-shadow: 0 5px 14px color-mix(in srgb, var(--bar-color) 28%, transparent);
}

.pie-chart {
  min-height: 292px;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  padding: 8px 4px 4px;
}

.pie-svg {
  width: 240px;
  max-width: 100%;
  overflow: visible;
  filter: drop-shadow(0 12px 22px rgba(31, 74, 120, 0.12));
}

.pie-svg path,
.pie-svg circle {
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 1.15;
}

.pie-depth {
  opacity: 0.36;
  stroke: rgba(12, 30, 68, 0.1) !important;
  stroke-width: 0.6 !important;
}

.pie-base-shadow {
  fill: rgba(24, 54, 96, 0.1);
  filter: blur(7px);
  pointer-events: none;
}

.pie-slice-top {
  stroke: rgba(255, 255, 255, 0.58) !important;
  stroke-width: 1.15 !important;
  filter: drop-shadow(0 4px 7px rgba(24, 54, 96, 0.09));
}

.pie-inner-rim {
  fill: rgba(255, 255, 255, 0.1);
  stroke: rgba(76, 151, 201, 0.34) !important;
  stroke-width: 1.6 !important;
  pointer-events: none;
}

.pie-center-core {
  fill: rgba(248, 253, 255, 0.76);
  stroke: rgba(255, 255, 255, 0.82) !important;
  stroke-width: 1.4 !important;
  filter: drop-shadow(0 5px 14px rgba(24, 54, 96, 0.08));
  pointer-events: none;
}

.pie-center-shine,
.pie-top-shine {
  fill: rgba(255, 255, 255, 0.3);
  pointer-events: none;
}

.pie-drill {
  cursor: pointer;
}

.pie-svg .pie-drill:hover {
  filter: brightness(1.08) drop-shadow(0 5px 9px rgba(24, 54, 96, 0.14));
}

.pie-legend {
  display: grid;
  gap: 7px;
  max-height: 284px;
  overflow: auto;
  padding-right: 4px;
}

.pie-legend-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  color: var(--ink);
  font-size: 12px;
}

.pie-legend-item i {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  display: inline-block;
}

.pie-legend-item span {
  min-width: 0;
  overflow: hidden;
  line-height: 1.25;
  text-overflow: clip;
  white-space: normal;
}

.pie-legend-item small {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
  text-overflow: clip;
  white-space: normal;
}

.pie-legend-item strong {
  font-size: 12px;
  color: var(--ink);
  white-space: nowrap;
}

.sector-drilldown {
  min-height: 292px;
}

.drilldown-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 2px 0 10px;
}

.drilldown-head strong {
  display: block;
  color: var(--ink);
  font-size: 14px;
}

.drilldown-head span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  margin-top: 2px;
}

.drilldown-return-line {
  display: flex !important;
  flex-wrap: wrap;
  gap: 5px;
  align-items: center;
}

.sector-detail-table {
  max-height: 250px;
}

.bar-value {
  min-width: 38px;
  justify-self: end;
  border-radius: 999px;
  padding: 4px 7px;
  color: var(--ink);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(95, 111, 130, 0.14);
}

.chart-note {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.chart-frame {
  min-height: 292px;
}

.chart-line,
.chart-line-glow {
  stroke-linecap: round;
  stroke-linejoin: round;
}

.chart-line {
  filter: drop-shadow(0 2px 6px rgba(28, 63, 102, 0.08));
}

.chart-line-glow {
  opacity: 0.08;
  stroke-width: 7;
}

.chart-area {
  pointer-events: none;
}

.chart-hit-area {
  cursor: crosshair;
}

.chart-readout {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
  min-height: 28px;
  margin: 6px 0 0 52px;
  color: var(--muted);
  font-size: 12px;
}

.chart-readout strong {
  color: var(--ink);
  font-size: 12px;
}

.chart-readout span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.chart-readout i {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  display: inline-block;
}

svg {
  width: 100%;
  height: 260px;
  display: block;
}

.chart-legend,
.chart-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 12px;
  align-items: center;
}

.chart-legend {
  padding: 4px 4px 0 52px;
}

.chart-legend-item,
.filter-chip span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
}

.chart-legend-item i,
.filter-chip i {
  width: 18px;
  height: 3px;
  border-radius: 999px;
  display: inline-block;
}

.chart-filters {
  margin: 2px 0 10px;
}

.signal-filters {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin: -2px 0 12px;
}

.select-filter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.repeat-sort-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.select-filter select {
  min-width: 118px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(31, 42, 55, 0.06);
}

.select-filter input {
  min-width: 132px;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(31, 42, 55, 0.06);
}

.dividend-form,
.user-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.dividend-form label,
.user-form label,
.form-block {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
}

.dividend-form input,
.dividend-form select,
.user-form input,
.user-form select {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 10px;
  background: rgba(255, 255, 255, 0.68);
  color: var(--ink);
  box-shadow: 0 6px 20px rgba(31, 42, 55, 0.06);
}

.form-block {
  grid-column: 1 / -1;
}

.account-choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
}

.form-actions small {
  color: var(--muted);
  font-size: 12px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 5px 8px;
  background: rgba(255, 255, 255, 0.56);
  cursor: pointer;
}

.filter-chip input {
  width: 14px;
  height: 14px;
  margin: 0;
}

.filter-chip em {
  font-style: normal;
  color: var(--amber);
  margin-left: 2px;
}

.table-wrap {
  overflow: auto;
  max-height: 360px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.44);
}

.signal-latest-panel {
  margin-bottom: 12px;
}

.latest-signal-filters {
  justify-content: flex-start;
  margin: -2px 0 12px;
}

#latestSignals {
  max-height: 430px;
}

.ops-sentinel-metrics {
  min-height: 360px;
}

.ops-split {
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.95fr) minmax(0, 0.85fr);
}

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

.market-repeat-card {
  min-width: 0;
  border: 1px solid rgba(95, 111, 130, 0.14);
  border-radius: 8px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.38);
}

.market-repeat-card h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink);
}

.compact-chart {
  min-height: 244px;
}

.market-repeat-card .compact-chart {
  max-height: 318px;
  overflow: auto;
  padding-right: 4px;
}

.market-repeat-card .bar-row {
  grid-template-columns: 22px minmax(0, 1fr) 28px;
  gap: 6px;
}

.market-repeat-card .bar-rank {
  width: 20px;
  height: 20px;
  font-size: 10px;
}

.market-repeat-card .bar-value {
  font-size: 11px;
}

.market-repeat-card .bar-label small {
  display: flex;
  flex: 1 1 auto;
  flex-wrap: wrap;
  gap: 4px;
  overflow: visible;
  white-space: normal;
}

.market-repeat-card .bar-label {
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  gap: 5px;
}

.market-repeat-card .bar-label > span:first-child {
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
}

.repeat-meta {
  color: var(--muted);
}

.return-badge-line {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  flex-wrap: nowrap;
  gap: 4px;
  white-space: nowrap;
}

.return-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  width: fit-content;
  white-space: nowrap;
  border: 1px solid rgba(95, 111, 130, 0.16);
  border-radius: 999px;
  padding: 2px 6px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.2;
}

.return-badge.positive {
  border-color: rgba(217, 45, 32, 0.24);
  background: rgba(255, 245, 244, 0.86);
  color: var(--red);
}

.return-badge.negative {
  border-color: rgba(7, 148, 85, 0.24);
  background: rgba(237, 252, 242, 0.86);
  color: var(--green);
}

.tall-table {
  max-height: 512px;
}

.signal-latest-groups {
  display: grid;
  gap: 12px;
}

.signal-subsection h4 {
  margin: 0 0 8px;
  font-size: 13px;
  color: var(--ink);
}

.chain-empty {
  border: 1px solid rgba(95, 111, 130, 0.14);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.4);
}

.signal-timeline {
  min-width: 860px;
  padding: 8px 4px 12px;
}

.timeline-grid {
  display: grid;
  gap: 0;
  min-width: max-content;
}

.timeline-header {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(12px);
}

.timeline-axis-label,
.timeline-date,
.timeline-sector,
.timeline-cell {
  border-bottom: 1px solid rgba(95, 111, 130, 0.12);
  border-right: 1px solid rgba(95, 111, 130, 0.08);
  min-height: 46px;
  padding: 8px;
}

.timeline-axis-label,
.timeline-date {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.timeline-date {
  appearance: none;
  border-top: 0;
  border-left: 0;
  width: 100%;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.36);
  cursor: pointer;
  font-family: inherit;
  line-height: 1;
  text-align: left;
  white-space: nowrap;
}

.timeline-date:hover,
.timeline-date.active {
  background: rgba(23, 107, 135, 0.1);
  color: var(--blue);
}

.timeline-sector {
  position: sticky;
  left: 0;
  z-index: 1;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(12px);
}

.timeline-sector strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.timeline-sector span {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 3px;
  color: var(--muted);
  font-size: 11px;
}

.timeline-cell {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 5px;
  background: rgba(255, 255, 255, 0.34);
}

.timeline-sector.fresh-sector,
.timeline-sector.fresh-stock {
  border-left: 4px solid var(--amber);
  background: rgba(255, 247, 232, 0.92);
}

.timeline-sector.ai-fresh {
  border-left-color: var(--red);
  background: rgba(255, 244, 242, 0.96);
  box-shadow: inset 0 0 0 1px rgba(217, 45, 32, 0.18);
}

.timeline-cell-fresh {
  background: rgba(255, 247, 232, 0.5);
}

.timeline-cell-active-date {
  background: rgba(23, 107, 135, 0.08);
  box-shadow: inset 0 0 0 1px rgba(23, 107, 135, 0.12);
}

.timeline-sector.focus-date {
  background: rgba(236, 248, 250, 0.94);
  box-shadow: inset 4px 0 0 var(--blue);
}

.signal-chip {
  display: inline-flex;
  max-width: 260px;
  align-items: center;
  flex: 0 0 auto;
  gap: 4px;
  border-radius: 999px;
  padding: 4px 7px;
  overflow: visible;
  color: var(--ink);
  font-size: 11px;
  line-height: 1.1;
  white-space: nowrap;
  background: rgba(255, 255, 255, 0.74);
  border: 1px solid rgba(95, 111, 130, 0.14);
}

.signal-chip-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.signal-chip.long {
  border-color: rgba(217, 45, 32, 0.22);
  background: rgba(255, 245, 244, 0.84);
}

.signal-chip.short {
  border-color: rgba(7, 148, 85, 0.22);
  background: rgba(237, 252, 242, 0.84);
}

.signal-chip small {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 10px;
}

.signal-chip.more {
  color: var(--muted);
}

.signal-chip.fresh-sector,
.signal-chip.fresh-stock {
  border-color: rgba(161, 92, 7, 0.42);
  background: rgba(255, 247, 232, 0.96);
  color: #7a3f00;
  font-weight: 800;
}

.signal-chip.ai-fresh {
  border-color: rgba(217, 45, 32, 0.56);
  background: rgba(255, 244, 242, 0.98);
  box-shadow: 0 0 0 2px rgba(217, 45, 32, 0.12);
  color: var(--red);
}

.fresh-badge {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 2px 5px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
}

.fresh-badge.sector {
  background: var(--ink);
  color: #fff;
}

.fresh-badge.stock {
  background: var(--amber);
  color: #fff;
}

.fresh-badge.ai {
  background: var(--red);
  color: #fff;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
  min-width: 520px;
}

th,
td {
  padding: 8px 9px;
  border-bottom: 1px solid rgba(95, 111, 130, 0.14);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  background: rgba(255, 255, 255, 0.92);
  color: #253341;
  font-weight: 700;
  backdrop-filter: blur(10px);
}

.sort-button {
  width: auto;
  height: auto;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  color: inherit;
  font: inherit;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.sort-button:hover {
  background: transparent;
  color: var(--red);
}

.inline-button,
.inline-danger-button {
  width: auto;
  height: 26px;
  min-width: 48px;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: none;
}

.inline-button {
  border-color: rgba(23, 107, 135, 0.24);
  color: var(--blue);
}

.inline-button:hover {
  background: rgba(23, 107, 135, 0.08);
  border-color: rgba(23, 107, 135, 0.42);
}

.inline-danger-button {
  border-color: rgba(217, 45, 32, 0.28);
  color: var(--red);
}

.inline-danger-button:hover {
  background: rgba(217, 45, 32, 0.08);
  border-color: rgba(217, 45, 32, 0.48);
}

.sort-button span {
  min-width: 10px;
  color: var(--red);
}

.metric-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.metric {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  min-height: 70px;
  background: rgba(255, 255, 255, 0.5);
}

.metric span {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.metric strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  overflow-wrap: anywhere;
  color: var(--ink);
}

.metric small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.strategy-metric {
  min-height: 104px;
}

.overview-metrics .metric {
  min-height: 86px;
}

.alert-list {
  display: grid;
  gap: 8px;
}

.alert-item {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: rgba(255, 255, 255, 0.5);
}

.alert-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-weight: 700;
}

.alert-detail {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.alert-conditions,
.risk-condition-list {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.alert-condition,
.risk-condition {
  border: 1px solid rgba(95, 111, 130, 0.14);
  border-radius: 6px;
  padding: 8px;
  background: rgba(255, 255, 255, 0.58);
}

.alert-condition {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
}

.alert-condition span,
.risk-condition span {
  color: var(--muted);
  font-size: 12px;
}

.alert-condition.active,
.risk-condition.active {
  border-color: rgba(217, 45, 32, 0.36);
  background: rgba(255, 244, 242, 0.82);
}

.alert-condition.active span,
.risk-condition.active span,
.alert-condition.active strong,
.risk-condition.active strong {
  color: var(--red);
}

.risk-condition.active p {
  color: #b42318;
}

.risk-condition.active {
  border-color: rgba(199, 79, 138, 0.24);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.7), rgba(251, 237, 246, 0.48));
}

.risk-condition.active span,
.risk-condition.active strong,
.risk-condition.active p {
  color: #9f3e76;
}

.risk-score-card {
  border: 1px solid rgba(255, 255, 255, 0.64);
  border-radius: 8px;
  padding: 13px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.56), rgba(236, 247, 255, 0.34));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72), 0 16px 32px rgba(31, 74, 120, 0.08);
}

.risk-score-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.risk-score-card span {
  color: var(--muted);
  font-size: 12px;
}

.risk-score-card strong {
  display: block;
  margin-top: 4px;
  font-size: 22px;
}

.risk-score-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
}

.risk-score-meter {
  position: relative;
  height: 16px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(213, 226, 237, 0.54);
  box-shadow: inset 0 1px 3px rgba(31, 74, 120, 0.12), inset 0 0 0 1px rgba(255, 255, 255, 0.62);
}

.risk-score-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #76d2da 0%, #82c8f2 44%, #c74f8a 100%);
  box-shadow: 0 6px 14px rgba(79, 169, 221, 0.12);
  transition: width 180ms ease;
}

.risk-score-card-level-1 .risk-score-fill {
  background: linear-gradient(90deg, #76d2da 0%, #82c8f2 100%);
  box-shadow: 0 6px 14px rgba(118, 210, 218, 0.12);
}

.risk-score-card-level-2 .risk-score-fill {
  background: linear-gradient(90deg, #76d2da 0%, #4fa9dd 100%);
  box-shadow: 0 6px 14px rgba(79, 169, 221, 0.12);
}

.risk-score-card-level-3 .risk-score-fill {
  background: linear-gradient(90deg, #82c8f2 0%, #c74f8a 100%);
  box-shadow: 0 6px 14px rgba(199, 79, 138, 0.12);
}

.risk-score-card-level-4 .risk-score-fill {
  background: linear-gradient(90deg, #4fa9dd 0%, #c74f8a 100%);
}

.risk-score-card-level-5 .risk-score-fill {
  background: linear-gradient(90deg, #4fa9dd 0%, #c74f8a 62%, #9f3e76 100%);
}

.risk-score-axis {
  display: flex;
  justify-content: space-between;
  margin-top: 5px;
}

.risk-score-axis span {
  color: var(--muted);
  font-size: 11px;
}

.risk-score-trend {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(129, 173, 207, 0.18);
}

.risk-score-trend-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.risk-score-trend-head strong {
  display: inline;
  margin: 0;
  font-size: 13px;
}

.risk-score-trend-head small {
  margin-left: 6px;
  color: #7f99bd;
  font-size: 11px;
  font-weight: 700;
}

.risk-score-trend svg {
  display: block;
  width: 100%;
  height: 118px;
  margin-top: 6px;
  overflow: visible;
  outline: none;
}

.risk-score-trend-grid {
  stroke: rgba(122, 157, 190, 0.16);
  stroke-width: 1;
}

.risk-score-trend-label {
  fill: var(--muted);
  font-size: 10px;
}

.risk-score-trend-area {
  fill: rgba(130, 200, 242, 0.06);
  pointer-events: none;
}

.risk-score-trend-line {
  fill: none;
  stroke: #c74f8a;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: drop-shadow(0 3px 8px rgba(199, 79, 138, 0.1));
}

.risk-score-trend-point {
  fill: #ffffff;
  stroke: #c74f8a;
  stroke-width: 1.8;
  pointer-events: none;
}

.risk-score-trend-hit {
  fill: transparent;
  stroke: transparent;
  cursor: pointer;
}

.risk-score-trend-hit-area {
  cursor: crosshair;
}

.risk-score-trend-hit:focus-visible {
  outline: none;
  stroke: rgba(79, 169, 221, 0.36);
  stroke-width: 2;
}

.risk-score-trend-node.active .risk-score-trend-point {
  fill: #c74f8a;
  stroke: #ffffff;
  stroke-width: 2;
}

.risk-score-trend-cursor {
  stroke: rgba(111, 134, 173, 0.34);
  stroke-width: 1;
  stroke-dasharray: 4 5;
  pointer-events: none;
}

.risk-score-trend-active-point {
  fill: #c74f8a;
  stroke: rgba(255, 255, 255, 0.9);
  stroke-width: 2;
  filter: drop-shadow(0 4px 10px rgba(199, 79, 138, 0.18));
  pointer-events: none;
}

.risk-score-trend-axis {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.risk-score-trend-axis span {
  color: var(--muted);
  font-size: 11px;
}

.risk-score-trend-empty {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(95, 111, 130, 0.12);
  color: var(--muted);
  font-size: 12px;
}

.risk-advice {
  margin-top: 10px;
  color: var(--text);
  font-size: 13px;
  line-height: 1.5;
}

.risk-condition div {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.risk-condition strong {
  flex: 1;
  min-width: 0;
}

.risk-condition div > span {
  flex: 0 0 auto;
}

.risk-condition p {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.risk-condition-note {
  display: block;
  margin-top: 6px;
  color: #5b7895;
  font-size: 11px;
  line-height: 1.45;
}

.risk-watchlist,
.risk-stagnation-list {
  margin-top: 12px;
  border-top: 1px solid rgba(95, 111, 130, 0.14);
  padding-top: 10px;
}

.risk-watchlist h4,
.risk-stagnation-list h4 {
  margin: 0 0 8px;
  font-size: 13px;
}

.risk-watchlist-group,
.risk-stagnation-day {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  margin-top: 8px;
}

.risk-stagnation-day.confluence {
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
}

.risk-stagnation-day.strong-branch {
  grid-template-columns: minmax(150px, 0.42fr) minmax(0, 1fr);
}

.risk-stagnation-day.stagnation-examples {
  grid-template-columns: minmax(96px, 0.16fr) minmax(0, 1fr);
  column-gap: 22px;
}

.risk-watchlist-group > span,
.risk-stagnation-day > span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  padding-top: 3px;
}

.risk-watchlist-group > div,
.risk-stagnation-day > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.risk-stagnation-day.stagnation-examples > div {
  flex-direction: column;
  align-items: flex-start;
}

.risk-watchlist-group strong,
.risk-stagnation-day strong {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 24px;
  padding: 3px 7px;
  border: 1px solid rgba(95, 111, 130, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.3;
}

.risk-watchlist-group strong.active {
  border-color: rgba(217, 45, 32, 0.34);
  background: rgba(255, 244, 242, 0.82);
  color: var(--red);
}

.risk-stagnation-day strong {
  border-color: rgba(217, 45, 32, 0.2);
  background: rgba(255, 244, 242, 0.72);
  color: #b42318;
}

.risk-stagnation-day.confluence strong.broad-exposure {
  border-color: rgba(95, 111, 130, 0.16);
  background: rgba(255, 255, 255, 0.68);
  color: var(--text);
}

.risk-stagnation-day.confluence strong.direct-hit {
  border-color: rgba(217, 45, 32, 0.28);
  background: rgba(255, 244, 242, 0.78);
  color: #b42318;
}

.risk-stagnation-day.strong-branch strong {
  border-color: rgba(10, 132, 89, 0.2);
  background: rgba(236, 253, 245, 0.78);
  color: #067647;
}

.risk-watchlist-group small,
.risk-watchlist-group em,
.risk-stagnation-day small,
.risk-stagnation-day em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
}

.badge {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.72);
  color: #344054;
  font-size: 12px;
}

.badge.高 {
  background: rgba(255, 244, 242, 0.78);
  color: var(--red);
}

.badge.中 {
  background: rgba(255, 247, 232, 0.78);
  color: var(--amber);
}

.badge.低 {
  background: rgba(240, 249, 255, 0.78);
  color: var(--blue);
}

.badge.risk-level-5,
.badge.risk-level-4 {
  background: rgba(255, 244, 242, 0.78);
  color: var(--red);
}

.badge.risk-level-3 {
  background: rgba(255, 247, 232, 0.78);
  color: var(--amber);
}

.badge.risk-level-2 {
  background: rgba(240, 249, 255, 0.78);
  color: var(--blue);
}

.badge.risk-level-1 {
  background: rgba(240, 253, 244, 0.88);
  color: #067647;
}

.positive {
  color: var(--red);
}

.negative {
  color: var(--green);
}

.empty {
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 1180px) {
  .kpi-grid {
    grid-template-columns: repeat(3, minmax(150px, 1fr));
  }

  .split {
    grid-template-columns: 1fr;
  }

  .market-repeat-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .pie-chart {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .pie-svg {
    width: 220px;
  }
}

@media (max-width: 720px) {
  :root {
    --topbar-height: auto;
  }

  .topbar,
  .module-main {
    padding-left: 14px;
    padding-right: 14px;
  }

  .topbar {
    position: static;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
  }

  .brand-logo {
    width: 92px;
    height: 72px;
    margin-left: -10px;
  }

  .dog-loader {
    position: static;
    padding: 10px 14px 0;
  }

  .dog-loader-runner {
    width: 48px;
    height: 48px;
    transform: translateX(-18px);
  }

  .app-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.56);
  }

  .nav-item {
    margin-bottom: 0;
    justify-content: center;
    padding: 0 8px;
  }

  .kpi-grid,
  .metric-list {
    grid-template-columns: 1fr;
  }

  .signal-filters {
    justify-content: flex-start;
  }

  .market-repeat-grid {
    grid-template-columns: 1fr;
  }

  .pie-chart {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 20px;
  }
}

/* 参考图风格刷新：桌面端采用左侧固定栏和主区命令栏。 */
body:not(.login-body) {
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
  grid-template-rows: var(--topbar-height) minmax(0, 1fr);
  overflow-x: hidden;
  background:
    linear-gradient(135deg, rgba(244, 249, 253, 0.98) 0%, rgba(221, 235, 247, 0.94) 52%, rgba(236, 243, 249, 0.98) 100%),
    var(--bg);
}

body:not(.login-body)::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(195, 220, 239, 0.38) 0, rgba(255, 255, 255, 0) 38%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.54), rgba(255, 255, 255, 0));
}

.topbar {
  grid-column: 2;
  grid-row: 1;
  height: var(--topbar-height);
  padding: 18px 36px 12px 42px;
  border-bottom: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.brand {
  gap: 0;
}

.brand-logo {
  position: fixed;
  left: calc(var(--sidebar-width) / 2);
  top: 12px;
  z-index: 7;
  width: 160px;
  height: 70px;
  margin: 0;
  object-fit: contain;
  object-position: center;
  transform: translateX(-50%);
  mix-blend-mode: multiply;
}

h1 {
  font-size: 24px;
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: 0;
}

#statusText {
  width: fit-content;
  max-width: min(520px, 48vw);
  min-height: 30px;
  display: inline-flex;
  align-items: center;
  margin-top: 10px;
  padding: 0 14px;
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.48);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74), 0 10px 26px rgba(29, 64, 103, 0.06);
  color: #58697d;
  font-size: 12px;
  white-space: nowrap;
}

.actions {
  gap: 10px;
}

button {
  border-color: rgba(255, 255, 255, 0.78);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.58);
  color: var(--navy);
  box-shadow: 0 12px 28px rgba(30, 58, 96, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.82);
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

button:hover {
  border-color: rgba(31, 135, 201, 0.42);
  background: rgba(255, 255, 255, 0.78);
  color: var(--blue);
  transform: translateY(-1px);
}

.actions button {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  font-size: 17px;
}

.privacy-toggle.active {
  border-color: rgba(197, 31, 99, 0.28);
  color: var(--magenta);
  background: rgba(255, 255, 255, 0.78);
}

.app-shell {
  display: contents;
}

.sidebar {
  grid-column: 1;
  grid-row: 1 / 3;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 104px 16px 22px;
  border-right: 1px solid rgba(142, 161, 183, 0.34);
  background: linear-gradient(180deg, rgba(238, 245, 251, 0.88), rgba(219, 234, 247, 0.72));
  box-shadow: 16px 0 42px rgba(27, 58, 95, 0.06);
  backdrop-filter: blur(20px) saturate(145%);
}

.sidebar::after {
  display: none;
}

.sidebar-account {
  margin-top: auto;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.46);
  box-shadow: 0 14px 32px rgba(28, 63, 102, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.sidebar-account span,
.sidebar-account small {
  display: block;
  color: #667589;
  font-size: 12px;
  line-height: 1.35;
}

.sidebar-account strong {
  display: block;
  margin: 6px 0 5px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.nav-item {
  position: relative;
  height: 42px;
  gap: 10px;
  margin-bottom: 8px;
  padding: 0 12px 0 14px;
  border-color: transparent;
  border-radius: 8px;
  background: transparent;
  color: #637184;
  font-size: 13px;
  font-weight: 650;
}

.nav-item::before {
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  border-radius: 6px;
  color: currentColor;
  font-size: 12px;
  line-height: 1;
  background: rgba(255, 255, 255, 0.32);
}

.nav-item:nth-child(1)::before {
  content: "⌂";
}

.nav-item:nth-child(2)::before {
  content: "▥";
}

.nav-item:nth-child(3)::before {
  content: "＋";
}

.nav-item:nth-child(4)::before {
  content: "↗";
}

.nav-item:nth-child(5)::before {
  content: "◌";
}

.nav-item:nth-child(6)::before {
  content: "!";
}

.nav-item:nth-child(7)::before {
  content: "◎";
}

.nav-item.active {
  border-color: rgba(255, 255, 255, 0.82);
  background: rgba(255, 255, 255, 0.7);
  color: var(--navy);
  box-shadow: 0 12px 28px rgba(28, 63, 102, 0.08), inset 3px 0 0 var(--magenta);
}

.nav-item.active::before {
  color: #ffffff;
  background: linear-gradient(135deg, var(--magenta), #3aa6dc);
  box-shadow: 0 8px 18px rgba(197, 31, 99, 0.18);
}

.module-main {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  min-height: calc(100vh - var(--topbar-height));
  padding: 6px 36px 42px 42px;
}

.dog-loader {
  position: fixed;
  top: calc(var(--topbar-height) - 4px);
  left: var(--sidebar-width);
  right: 0;
  padding: 0 36px 0 42px;
}

.dog-loader-panel {
  max-width: none;
  border-color: rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.78);
  box-shadow: 0 18px 38px rgba(28, 63, 102, 0.1);
}

.dog-loader-fill {
  background: linear-gradient(90deg, var(--cyan), var(--magenta));
}

.section-head {
  margin: 0 0 14px;
  align-items: flex-end;
}

h2 {
  font-size: 20px;
  font-weight: 800;
}

h3 {
  font-size: 15px;
  font-weight: 800;
}

.section-head span {
  max-width: 56ch;
  color: #6a7789;
  font-size: 12px;
}

.overview-account-bar,
.kpi-card,
.panel,
.login-panel {
  border-color: rgba(255, 255, 255, 0.78);
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.48));
  box-shadow: 0 18px 46px rgba(34, 69, 110, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(22px) saturate(150%);
}

.overview-account-bar {
  margin: 0 0 14px;
  padding: 11px 13px;
}

.kpi-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.kpi-card {
  min-height: 104px;
  padding: 16px 16px 15px;
}

.kpi-card::before {
  content: "";
  display: block;
  width: 22px;
  height: 3px;
  margin-bottom: 13px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--magenta), var(--cyan));
}

.kpi-label,
.metric span {
  color: #657285;
  font-size: 12px;
  font-weight: 650;
}

.kpi-value {
  margin-top: 6px;
  color: var(--navy);
  font-size: 27px;
  font-weight: 800;
  line-height: 1.05;
}

.kpi-detail {
  margin-top: 8px;
  color: #6d7b8d;
}

.split,
.overview-split,
.signals-top,
.signals-lower,
.ops-split {
  gap: 14px;
  margin-bottom: 14px;
}

.overview-split {
  grid-template-columns: minmax(0, 1.38fr) minmax(320px, 0.92fr);
}

.panel {
  padding: 16px;
}

.panel-title-row {
  align-items: center;
}

.segmented-control {
  gap: 3px;
  border-color: rgba(255, 255, 255, 0.76);
  border-radius: 8px;
  background: rgba(228, 239, 248, 0.62);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.segmented-control button {
  min-width: 64px;
  border-radius: 6px;
  color: #647389;
}

.segmented-control button.active {
  background: rgba(255, 255, 255, 0.88);
  color: var(--magenta);
  box-shadow: 0 8px 18px rgba(34, 69, 110, 0.08);
}

.chart {
  min-height: 300px;
}

.chart-frame,
.privacy-empty {
  border-radius: 8px;
}

.pie-svg {
  overflow: visible;
  filter: drop-shadow(0 12px 22px rgba(31, 74, 120, 0.12));
}

.pie-svg path,
.pie-svg circle {
  stroke: rgba(255, 255, 255, 0.62);
  stroke-width: 1.15;
}

svg {
  height: 264px;
}

.chart-readout {
  margin-left: 48px;
  color: #667589;
}

.chart-readout strong {
  min-width: 84px;
  color: var(--navy);
}

.chart-readout span {
  min-height: 22px;
  padding: 2px 8px;
  border: 1px solid rgba(255, 255, 255, 0.66);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.42);
}

.chart-legend {
  padding-left: 48px;
}

.bar-rank,
.bar-value,
.metric,
.alert-item,
.alert-condition,
.risk-condition,
.risk-score-card,
.market-repeat-card,
.filter-chip,
.select-filter select,
.select-filter input,
.dividend-form input,
.dividend-form select,
.user-form input,
.user-form select {
  border-color: rgba(255, 255, 255, 0.74);
  background: rgba(255, 255, 255, 0.52);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.68);
}

.metric {
  min-height: 78px;
  padding: 11px 12px;
}

.metric strong {
  color: var(--navy);
  font-size: 20px;
  font-weight: 800;
}

.filter-chip {
  border-radius: 999px;
  padding: 6px 10px;
}

.filter-chip:has(input:checked) {
  border-color: rgba(197, 31, 99, 0.26);
  background: rgba(255, 255, 255, 0.78);
  color: var(--magenta);
}

.table-wrap {
  border-color: rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.38);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.62);
}

table {
  font-size: 12px;
}

th,
td {
  padding: 9px 10px;
  border-bottom-color: rgba(92, 111, 132, 0.14);
}

th {
  background: rgba(247, 251, 255, 0.92);
  color: #526173;
  font-size: 11px;
  letter-spacing: 0;
}

td {
  color: #16243a;
}

tbody tr:hover {
  background: rgba(255, 255, 255, 0.42);
}

.secondary-button,
.inline-button,
.inline-danger-button,
.login-submit {
  border-radius: 999px;
}

.login-body {
  background:
    linear-gradient(135deg, rgba(244, 249, 253, 0.98), rgba(222, 236, 248, 0.94) 58%, rgba(238, 244, 249, 0.98)),
    var(--bg);
}

.login-panel {
  padding: 30px;
}

.login-logo {
  width: 168px;
  height: 96px;
  margin: -20px 0 -8px -10px;
  object-fit: contain;
  object-position: left center;
  mix-blend-mode: multiply;
}

.login-form input {
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.64);
}

.login-submit {
  background: var(--navy);
  border-color: var(--navy);
}

.login-submit:hover {
  background: #0d2b68;
}

@media (max-width: 1180px) {
  :root {
    --sidebar-width: 188px;
  }

  .topbar {
    padding-right: 24px;
    padding-left: 28px;
  }

  .module-main {
    padding-right: 24px;
    padding-left: 28px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, minmax(150px, 1fr));
  }

  .overview-split,
  .ops-split {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  :root {
    --topbar-height: auto;
    --sidebar-width: 0px;
  }

  body:not(.login-body) {
    display: block;
    min-height: 100vh;
  }

  .topbar {
    position: static;
    height: auto;
    padding: 14px;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand {
    width: 100%;
  }

  .brand-logo {
    position: static;
    width: 132px;
    height: 70px;
    margin: -14px auto -12px;
    transform: none;
  }

  #statusText {
    max-width: calc(100vw - 28px);
    white-space: normal;
  }

  .dog-loader {
    position: static;
    padding: 0 14px 10px;
  }

  .app-shell {
    display: grid;
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 12px 14px;
    border-right: 0;
    border-bottom: 1px solid rgba(142, 161, 183, 0.28);
  }

  .sidebar::after {
    display: none;
  }

  .sidebar-account {
    grid-column: 1 / -1;
    margin-top: 4px;
  }

  .nav-item {
    margin: 0;
    justify-content: flex-start;
  }

  .module-main {
    padding: 16px 14px 30px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .kpi-grid,
  .metric-list,
  .dividend-form,
  .user-form,
  .market-repeat-grid {
    grid-template-columns: 1fr;
  }

  .split,
  .overview-split,
  .signals-top,
  .signals-lower,
  .ops-split,
  .pie-chart {
    grid-template-columns: 1fr;
  }

  .chart-legend,
  .chart-readout {
    margin-left: 0;
    padding-left: 0;
  }
}
