:root {
  color-scheme: light;
  --bg: #f6f7f2;
  --panel: #ffffff;
  --panel-soft: #f0f2eb;
  --ink: #1f2522;
  --muted: #69736c;
  --line: #dfe4db;
  --brand: #16765f;
  --brand-strong: #0d5f4b;
  --gold: #b7892a;
  --red: #b93838;
  --green: #157348;
  --teal: #2a8d9a;
  --violet: #7257a5;
  --shadow: 0 18px 45px rgba(31, 37, 34, 0.09);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family:
    Inter,
    "Segoe UI",
    "Microsoft YaHei",
    Arial,
    sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 560px) minmax(320px, 1fr);
  align-items: stretch;
}

.login-panel {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 30px;
  padding: clamp(24px, 6vw, 72px);
  background: #fbfcf8;
}

.brand-lockup,
.side-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-lockup img,
.side-brand img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
  object-fit: contain;
  background: #fff;
  border: 1px solid var(--line);
}

.brand-lockup span,
.side-brand span,
.eyebrow,
.side-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

h1 {
  max-width: 460px;
  margin-top: 5px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.04;
}

.login-form {
  max-width: 470px;
}

.login-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.login-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 104px;
  gap: 10px;
}

.login-row.single {
  grid-template-columns: 1fr;
  margin-bottom: 16px;
}

.login-row input,
.search-input,
.sort-select,
.client-select {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  outline: none;
}

.login-row input,
.search-input {
  min-width: 0;
  padding: 0 14px;
}

.sort-select,
.client-select {
  padding: 0 12px;
}

.login-row input:focus,
.search-input:focus,
.sort-select:focus,
.client-select:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(22, 118, 95, 0.14);
}

.login-row button,
.utility-button,
.ghost-button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  background: var(--brand);
  color: #fff;
  font-weight: 800;
}

.login-row button:hover,
.utility-button:hover {
  background: var(--brand-strong);
}

.login-error {
  min-height: 22px;
  margin-top: 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

.login-hint {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.id-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 520px;
}

.id-chip,
.filter-button {
  min-height: 34px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  padding: 0 12px;
  font-size: 13px;
  font-weight: 700;
}

.id-chip:hover,
.filter-button:hover,
.filter-button.active {
  border-color: var(--brand);
  background: #e7f2ee;
  color: var(--brand-strong);
}

.id-chip.vip {
  border-color: rgba(183, 137, 42, 0.55);
  background: #fff8e7;
  color: #8b6416;
}

.login-market {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 22px;
  min-height: 100vh;
  padding: clamp(24px, 5vw, 64px);
  background: #f3f6fb;
  color: var(--ink);
}

.snapshot-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 3px solid #d6e4f3;
}

.snapshot-top span {
  display: block;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.snapshot-top strong {
  display: block;
  margin-top: 5px;
  font-size: clamp(28px, 4vw, 46px);
}

.snapshot-top small {
  color: #0a5aa3;
  font-size: 13px;
  font-weight: 900;
}

.login-performer-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 14px;
}

.performer-card {
  min-height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border-radius: 0;
  background: #f8faff;
  padding: 22px 20px;
  box-shadow: inset 0 3px 0 #f6bd16;
  transition:
    transform 170ms ease,
    background 170ms ease,
    box-shadow 170ms ease;
}

.performer-card:hover {
  transform: translateY(-4px);
  background: #fff;
  box-shadow:
    inset 0 3px 0 #f6bd16,
    0 18px 35px rgba(0, 48, 95, 0.12);
}

.performer-card strong,
.performer-card span,
.performer-card small {
  display: block;
}

.performer-card strong {
  color: #213a59;
  font-size: 20px;
  line-height: 1.2;
}

.performer-card span,
.performer-card small {
  margin-top: 8px;
  color: #6b7280;
  font-weight: 700;
}

.performer-card b {
  display: block;
  margin-top: 42px;
  font-size: clamp(34px, 4vw, 54px);
  line-height: 0.95;
  font-weight: 500;
}

.hot-positive {
  color: #ec1740;
}

.hot-negative {
  color: #00a06a;
}

.performer-card a {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0b5aa2;
  color: #0b5aa2;
  text-decoration: none;
  font-weight: 900;
}

.market-bars {
  display: grid;
  gap: 14px;
}

.market-bar-row {
  display: grid;
  grid-template-columns: 64px minmax(120px, 1fr) 88px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  font-weight: 800;
}

.market-bar-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce6f1;
}

.market-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.app-view {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.side-nav {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 22px;
  background: #222a26;
  color: #fff;
}

.side-brand {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.14);
}

.side-brand img {
  border-color: rgba(255, 255, 255, 0.24);
}

.side-brand span {
  color: rgba(255, 255, 255, 0.6);
}

.side-brand strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
}

.side-label {
  margin-top: 4px;
  color: rgba(255, 255, 255, 0.68);
}

.client-select {
  width: 100%;
  background: rgba(255, 255, 255, 0.95);
}

.section-nav {
  display: grid;
  gap: 6px;
  margin-top: 8px;
}

.section-nav a {
  min-height: 38px;
  display: flex;
  align-items: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.78);
  padding: 0 12px;
  text-decoration: none;
  font-weight: 800;
}

.section-nav a:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.ghost-button {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: transparent;
}

.ghost-button:hover {
  background: rgba(255, 255, 255, 0.1);
}

.vip-card {
  border: 1px solid rgba(246, 207, 119, 0.45);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(246, 207, 119, 0.16), rgba(255, 255, 255, 0.08));
  padding: 14px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.05);
}

.vip-card span {
  color: #f8db8b;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.vip-card strong {
  display: block;
  margin-top: 4px;
  color: #fff;
  font-size: 18px;
}

body.vip-mode .side-nav {
  background: #272318;
}

.workspace {
  min-width: 0;
  padding: 28px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
}

.topbar h2 {
  margin-top: 5px;
  font-size: clamp(24px, 3vw, 36px);
}

.tier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  margin-top: 9px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 0 10px;
  font-size: 12px;
  font-weight: 900;
}

.tier-badge.vip {
  background: #fff2c4;
  color: #8b6416;
  box-shadow: 0 0 0 1px rgba(183, 137, 42, 0.24);
}

.top-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.toggle {
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 0 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.toggle input {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
}

.utility-button {
  min-height: 38px;
  padding: 0 16px;
}

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

.wealth-hero {
  min-height: 170px;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 20px;
  padding: clamp(24px, 4vw, 44px);
  background:
    linear-gradient(120deg, rgba(0, 86, 158, 0.98), rgba(20, 96, 151, 0.72)),
    #005b9f;
  color: #fff;
}

.wealth-hero h2 {
  font-size: clamp(32px, 4.2vw, 46px);
  line-height: 1.1;
}

.wealth-hero p {
  margin-top: 18px;
  font-size: 18px;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.86);
}

.hero-actions,
.report-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.hero-button,
.report-actions a {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0b5aa2;
  background: #0b5aa2;
  color: #fff;
  padding: 0 18px;
  text-decoration: none;
  font-weight: 900;
}

.hero-button.secondary {
  background: #22b8d9;
  border-color: #22b8d9;
}

.asset-console {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(330px, 0.36fr);
  gap: 0;
  margin-bottom: 20px;
}

.asset-table-card,
.tenk-card {
  border: 1px solid #c9dcf3;
  background: #fff;
}

.asset-head,
.asset-row {
  display: grid;
  grid-template-columns: 42px minmax(210px, 1fr) minmax(120px, 0.35fr) minmax(120px, 0.35fr) minmax(120px, 0.35fr);
  align-items: center;
  gap: 14px;
}

.asset-head {
  padding: 18px 24px;
  border-bottom: 1px solid #c9dcf3;
}

.asset-head h3 {
  grid-column: 1 / 3;
  font-size: 22px;
}

.asset-head span {
  color: #111827;
  font-weight: 900;
  text-align: right;
}

.asset-row {
  min-height: 60px;
  padding: 0 24px;
  border-bottom: 1px solid #edf2f7;
  font-size: 16px;
}

.asset-row.total {
  min-height: 78px;
  font-size: 18px;
}

.asset-row strong {
  color: #111827;
}

.asset-row b {
  text-align: right;
  font-size: 21px;
}

.asset-marker {
  color: #005b9f;
  font-weight: 900;
  text-align: center;
}

.tenk-card {
  padding: 22px;
  border-left: 0;
}

.tenk-select {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid #0b5aa2;
  color: #0b5aa2;
  padding: 0 14px;
  font-weight: 900;
}

.tenk-select::after {
  content: "⌄";
  font-size: 24px;
  line-height: 1;
}

.tenk-card h3 {
  margin-top: 26px;
  color: #111827;
  font-size: 17px;
}

.tenk-card strong {
  display: block;
  margin-top: 8px;
  font-size: 22px;
}

.mini-chart {
  margin-top: 14px;
}

.mini-chart svg,
.asset-income-chart svg {
  width: 100%;
  display: block;
}

.asset-income-panel {
  margin-bottom: 16px;
}

.asset-income-heading {
  align-items: center;
  border-bottom: 1px solid #c9dcf3;
  padding-bottom: 14px;
}

.asset-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

.asset-tabs button {
  min-height: 34px;
  border: 0;
  border-bottom: 3px solid transparent;
  background: transparent;
  color: var(--muted);
  padding: 0 6px;
  font-weight: 900;
}

.asset-tabs button.active {
  border-color: #0b5aa2;
  color: #0b5aa2;
}

.asset-income-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: 28px;
  align-items: center;
}

.income-line {
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.primary-line {
  stroke: #005b9f;
  color: #005b9f;
}

.secondary-line {
  stroke: #23b6d7;
  color: #23b6d7;
}

.chart-dot {
  fill: #fff;
  stroke: #005b9f;
  stroke-width: 2;
}

.pie-disc {
  width: min(320px, 80vw);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
}

.pie-legend {
  display: grid;
  gap: 10px;
  margin-top: 18px;
  color: #374151;
  font-weight: 800;
}

.pie-legend span {
  display: flex;
  align-items: center;
  gap: 8px;
}

.pie-legend i {
  width: 12px;
  height: 12px;
  display: inline-block;
}

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

.kpi-card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
  transition:
    transform 180ms ease,
    box-shadow 180ms ease,
    border-color 180ms ease;
}

.kpi-card {
  min-height: 124px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 16px;
}

.kpi-card:hover,
.panel:hover {
  transform: translateY(-2px);
  border-color: rgba(22, 118, 95, 0.28);
  box-shadow: 0 22px 52px rgba(31, 37, 34, 0.13);
}

.dividend-card {
  background: linear-gradient(180deg, #ffffff, #fff9ea);
}

body.vip-mode .dividend-card,
body.vip-mode .kpi-card:hover {
  border-color: rgba(183, 137, 42, 0.42);
}

.kpi-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.kpi-card strong {
  display: block;
  margin-top: 8px;
  font-size: clamp(20px, 2.3vw, 30px);
  line-height: 1.05;
  overflow-wrap: anywhere;
}

.kpi-card small {
  color: var(--muted);
  font-weight: 700;
}

.positive {
  color: var(--green) !important;
}

.negative {
  color: var(--red) !important;
}

.neutral {
  color: var(--muted) !important;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.75fr);
  gap: 16px;
  margin-bottom: 16px;
}

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

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

.panel-wide {
  grid-row: span 2;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.panel-heading h3 {
  margin-top: 4px;
  font-size: 20px;
}

.pill {
  border-radius: 999px;
  background: var(--panel-soft);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
}

.market-summary {
  display: grid;
  gap: 12px;
}

.market-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) 116px;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background 170ms ease;
}

.market-card:hover {
  transform: translateX(3px);
  border-color: rgba(22, 118, 95, 0.32);
  background: #fbfcf8;
}

.market-card strong {
  display: block;
  font-size: 16px;
}

.market-card small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.allocation-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-soft);
}

.allocation-fill {
  height: 100%;
  border-radius: 999px;
}

.market-values {
  text-align: right;
}

.market-values b {
  display: block;
  font-size: 15px;
}

.nav-chart svg {
  width: 100%;
  height: 210px;
  display: block;
}

.nav-chart {
  position: relative;
}

.benchmark-line {
  fill: none;
  stroke-width: 3.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.benchmark-fund {
  stroke: #2563eb;
}

.benchmark-index {
  stroke: #1f2522;
}

.benchmark-price {
  stroke: #94a3b8;
}

.nav-point {
  fill: #fff;
  stroke: #2563eb;
  stroke-width: 3;
  cursor: crosshair;
  transition:
    r 160ms ease,
    fill 160ms ease,
    stroke-width 160ms ease;
}

.nav-point:hover {
  r: 7;
  fill: var(--brand);
  stroke-width: 2;
}

.nav-tooltip {
  position: absolute;
  z-index: 4;
  width: max-content;
  max-width: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  padding: 10px 12px;
  pointer-events: none;
}

.nav-tooltip strong,
.nav-tooltip span,
.nav-tooltip small {
  display: block;
}

.nav-tooltip span {
  margin-top: 3px;
  color: var(--brand-strong);
  font-weight: 900;
}

.nav-tooltip small {
  margin-top: 2px;
  color: var(--muted);
  font-weight: 700;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  align-items: center;
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.chart-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-legend-item::before {
  content: "";
  width: 20px;
  height: 3px;
  border-radius: 999px;
  background: currentColor;
}

.chart-legend-item.benchmark-fund {
  color: #2563eb;
}

.chart-legend-item.benchmark-index {
  color: #1f2522;
}

.chart-legend-item.benchmark-price {
  color: #64748b;
}

.fresh-tag {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  border-radius: 999px;
  background: #fee2e2;
  color: #991b1b;
  padding: 0 7px;
  font-size: 11px;
  font-weight: 900;
}

.axis-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.client-list {
  display: grid;
  gap: 10px;
}

.client-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 11px 12px;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background 170ms ease;
}

.client-row:hover {
  transform: translateX(3px);
  border-color: rgba(22, 118, 95, 0.32);
}

.vip-client-row {
  background: #fffaf0;
  border-color: rgba(183, 137, 42, 0.32);
}

.mini-vip,
.current-chip {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  border-radius: 999px;
  padding: 0 8px;
  font-size: 11px;
  font-weight: 900;
}

.mini-vip {
  background: #fff2c4;
  color: #8b6416;
}

.current-chip {
  background: var(--panel-soft);
  color: var(--muted);
}

.client-row button {
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  padding: 0 10px;
  font-weight: 900;
}

.client-row strong,
.client-row small {
  display: block;
}

.client-row small {
  margin-top: 3px;
  color: var(--muted);
  font-weight: 700;
}

.table-panel {
  margin-bottom: 16px;
}

.table-heading {
  align-items: center;
}

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

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

.search-input {
  width: 190px;
}

.sort-select {
  width: 136px;
}

.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.table-wrap.compact {
  max-height: 390px;
}

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

th,
td {
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  font-size: 13px;
  white-space: nowrap;
}

th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f4f6f0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

th:first-child,
td:first-child {
  text-align: left;
}

td.name-cell {
  min-width: 170px;
  white-space: normal;
}

tbody tr {
  transition:
    background 150ms ease,
    transform 150ms ease;
}

tbody tr:hover {
  background: #fbfcf8;
}

.stock-link {
  color: var(--brand-strong);
  font-weight: 900;
  text-decoration: none;
}

.stock-link:hover {
  color: #0a4d3c;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.code-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  background: var(--panel-soft);
  color: var(--muted);
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.market-tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  border-radius: 999px;
  color: #fff;
  padding: 0 8px;
  font-size: 12px;
  font-weight: 900;
}

.notes-band {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.notes-band strong {
  color: var(--ink);
}

.dividend-summary {
  display: grid;
  gap: 10px;
}

.dividend-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  padding: 12px 13px;
  font-size: 14px;
  font-weight: 800;
}

.dividend-row.total {
  background: #fff8e7;
  border-color: rgba(183, 137, 42, 0.32);
}

.holding-detail-panel,
.reports-panel {
  margin-bottom: 16px;
}

.report-actions a {
  background: #fff;
  color: #0b5aa2;
}

.holding-detail-list {
  display: grid;
  gap: 0;
}

.holding-detail-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.95fr);
  gap: 18px 28px;
  padding: 22px 0;
  border-top: 1px solid #edf2f7;
}

.holding-detail-card:first-child {
  border-top: 0;
  padding-top: 0;
}

.holding-title-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
  align-items: center;
}

.holding-title-row .stock-link {
  color: #0b5aa2;
  font-size: 22px;
}

.detail-button {
  min-width: 92px;
  min-height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #0b5aa2;
  color: #0b5aa2;
  text-decoration: none;
  font-weight: 900;
}

.holding-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(150px, 1fr));
  gap: 14px 36px;
}

.holding-detail-grid span {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
}

.holding-detail-grid b {
  color: var(--ink);
  font-size: 18px;
  font-weight: 500;
  text-align: right;
}

.holding-spark {
  min-height: 108px;
  border-left: 1px dashed #d7e3ef;
  padding-left: 28px;
}

.holding-spark svg {
  width: 100%;
  height: 108px;
  display: block;
  border: 1px solid #e5edf5;
  background: #fff;
}

.spark-path {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.spark-up {
  stroke: #ec1740;
}

.spark-down {
  stroke: #00a06a;
}

.reports-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(180px, 1fr));
  gap: 12px;
}

.report-card {
  min-height: 130px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid #c9dcf3;
  background: #f8fbff;
  padding: 16px;
  color: var(--ink);
  text-decoration: none;
  transition:
    transform 170ms ease,
    border-color 170ms ease,
    background 170ms ease;
}

.report-card:hover {
  transform: translateY(-3px);
  border-color: #0b5aa2;
  background: #fff;
}

.report-card span,
.report-card small {
  color: #0b5aa2;
  font-weight: 900;
}

.report-card strong {
  display: block;
  margin: 10px 0;
  font-size: 18px;
  line-height: 1.35;
}

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

  .dashboard-grid,
  .lower-grid,
  .asset-console,
  .asset-income-grid {
    grid-template-columns: 1fr;
  }

  .panel-wide {
    grid-row: auto;
  }

  .tenk-card {
    border-left: 1px solid #c9dcf3;
    border-top: 0;
  }

  .holding-detail-card {
    grid-template-columns: 1fr;
  }

  .holding-spark {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 860px) {
  .login-view,
  .app-view {
    display: block;
  }

  .login-market {
    min-height: 380px;
  }

  .side-nav {
    position: static;
    height: auto;
  }

  .section-nav {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .section-nav a {
    justify-content: center;
  }

  .workspace {
    padding: 18px;
  }

  .topbar,
  .panel-heading,
  .table-heading {
    display: grid;
  }

  .wealth-hero,
  .asset-head,
  .asset-row,
  .holding-title-row {
    display: grid;
  }

  .asset-head,
  .asset-row {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .asset-head span,
  .asset-row b {
    text-align: left;
  }

  .asset-head span {
    display: none;
  }

  .top-actions,
  .table-tools {
    justify-content: flex-start;
  }

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

  .login-performer-grid,
  .reports-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .market-card {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .market-values {
    grid-column: 1 / -1;
    text-align: left;
  }
}

@media (max-width: 560px) {
  .login-panel,
  .login-market {
    padding: 22px;
  }

  .login-row {
    grid-template-columns: 1fr;
  }

  .kpi-grid,
  .section-nav,
  .login-performer-grid,
  .reports-grid,
  .holding-detail-grid {
    grid-template-columns: 1fr;
  }

  .kpi-card {
    min-height: 112px;
  }

  .search-input,
  .sort-select {
    width: 100%;
  }

  .table-tools,
  .segmented {
    width: 100%;
  }

  .filter-button {
    flex: 1 1 auto;
  }
}
