﻿:root {
  --bg: #eef2f6;
  --surface: #ffffff;
  --surface-soft: #f7f9fc;
  --sidebar: #17212f;
  --sidebar-2: #1f2d3d;
  --text: #182232;
  --muted: #6c7788;
  --line: #d9e0ea;
  --primary: #2674e8;
  --primary-2: #1557b7;
  --green: #18a56f;
  --amber: #cc7a10;
  --red: #d94444;
  --cyan: #0f8b9c;
  --shadow: 0 18px 50px rgba(23, 33, 47, 0.12);
  font-family: Inter, "Segoe UI", "Microsoft YaHei", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-height: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  letter-spacing: 0;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 430px) minmax(360px, 1fr);
  align-items: stretch;
  background:
    linear-gradient(120deg, rgba(23, 33, 47, 0.92), rgba(30, 57, 88, 0.82)),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' viewBox='0 0 1200 800'%3E%3Crect width='1200' height='800' fill='%23273544'/%3E%3Cpath d='M0 590c120-42 240-68 360-38s210 82 350 46 236-132 490-88v290H0z' fill='%2332485c'/%3E%3Cpath d='M80 380h180v16H80zm0 42h310v16H80zm0 42h250v16H80zM680 180h360v18H680zm0 45h270v18H680zm0 45h420v18H680z' fill='%234c6479' opacity='.7'/%3E%3C/svg%3E");
  background-size: cover;
}

.login-panel {
  background: #f9fbfe;
  padding: 54px 48px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  box-shadow: var(--shadow);
}

.brand-lockup,
.sidebar-head {
  display: flex;
  gap: 12px;
  align-items: center;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2674e8, #19a97b);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex: 0 0 auto;
}

.brand-lockup strong,
.sidebar-head strong {
  display: block;
  font-size: 18px;
}

.brand-lockup small,
.sidebar-head small {
  color: var(--muted);
}

.login-panel h1 {
  margin: 44px 0 10px;
  font-size: 30px;
  line-height: 1.2;
}

.login-panel p {
  margin: 0 0 28px;
  color: var(--muted);
  line-height: 1.7;
}

.login-form {
  display: grid;
  gap: 18px;
}

label {
  display: grid;
  gap: 8px;
}

label span {
  color: #445163;
  font-weight: 600;
}

input,
select {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px;
  background: #fff;
  color: var(--text);
  outline: none;
}

input:focus,
select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(38, 116, 232, 0.13);
}

.form-row,
.between {
  display: flex;
  align-items: center;
  gap: 12px;
}

.between {
  justify-content: space-between;
}

.checkline,
.switchline {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
}

.checkline input,
.switchline input {
  width: 16px;
  height: 16px;
  min-height: 16px;
}

.link-button {
  border: 0;
  background: transparent;
  color: var(--primary);
  padding: 0;
}

.primary,
.ghost,
.danger,
.warning,
.danger-light,
.icon-button {
  border: 0;
  border-radius: 6px;
  min-height: 40px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-weight: 700;
  white-space: nowrap;
}

.primary {
  color: #fff;
  background: var(--primary);
}

.primary:hover {
  background: var(--primary-2);
}

.ghost {
  color: #2d4057;
  background: #edf2f8;
  border: 1px solid #d4deeb;
}

.danger {
  color: #fff;
  background: var(--red);
}

.warning {
  color: #fff;
  background: var(--amber);
}

.danger-light {
  color: var(--red);
  background: #fff0f0;
  border: 1px solid #ffd0d0;
}

.icon-button {
  width: 40px;
  padding: 0;
  background: #edf2f8;
  color: #223047;
}

.small {
  min-height: 34px;
  padding: 0 12px;
  font-size: 13px;
}

.full {
  width: 100%;
}

.login-summary {
  color: #fff;
  padding: 64px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 28px;
}

.summary-topline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 560px;
  color: #b9d6f2;
}

.summary-topline strong {
  font-size: 42px;
  color: #fff;
}

.login-summary h2 {
  max-width: 560px;
  margin: 0;
  font-size: 44px;
  line-height: 1.2;
}

.mini-grid {
  max-width: 640px;
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 14px;
}

.mini-grid div,
.health-card {
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  padding: 18px;
  backdrop-filter: blur(8px);
}

.mini-grid span,
.health-card span {
  display: block;
  color: #c6d7e7;
  margin-bottom: 8px;
}

.mini-grid strong {
  font-size: 28px;
}

.health-card {
  max-width: 640px;
}

.health-card b {
  display: block;
  font-size: 26px;
  margin-bottom: 14px;
}

.health-bar {
  height: 10px;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 999px;
  overflow: hidden;
}

.health-bar i {
  height: 100%;
  display: block;
  background: linear-gradient(90deg, #19a97b, #54d6b4);
}

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

.sidebar {
  background: var(--sidebar);
  color: #dce7f4;
  padding: 22px 16px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-head {
  padding: 6px 8px 22px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-head small {
  color: #96a9bd;
}

.nav-list {
  display: grid;
  gap: 6px;
  margin-top: 20px;
}

.nav-item {
  min-height: 44px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #b9c7d8;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  text-align: left;
}

.nav-item:hover,
.nav-item.active {
  color: #fff;
  background: var(--sidebar-2);
}

.nav-icon {
  width: 22px;
  color: #6fc2ff;
  text-align: center;
  font-weight: 800;
}

.sidebar-foot {
  margin-top: auto;
  padding: 16px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.sidebar-foot span,
.sidebar-foot strong {
  display: block;
}

.sidebar-foot span {
  color: #9caec0;
  margin-bottom: 5px;
}

.main {
  min-width: 0;
  padding: 22px 26px 34px;
}

.topbar {
  min-height: 70px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 18px;
  box-shadow: 0 8px 24px rgba(23, 33, 47, 0.05);
  margin-bottom: 20px;
}

#menuToggle {
  display: none;
}

.topbar h2,
.topbar p,
.panel h3,
.panel p {
  margin: 0;
}

.topbar h2 {
  font-size: 22px;
}

.topbar p,
.panel p {
  color: var(--muted);
  margin-top: 4px;
}

.topbar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
}

.toast {
  position: fixed;
  top: 22px;
  right: 26px;
  z-index: 50;
  min-width: 220px;
  max-width: min(420px, calc(100vw - 48px));
  background: #17212f;
  color: #fff;
  border-radius: 8px;
  padding: 13px 16px;
  box-shadow: var(--shadow);
}

.page {
  display: none;
}

.page.active {
  display: block;
}

.app-shell.dashboard-shell {
  display: block;
  min-height: 100vh;
  background: #eef0f5;
}

.dashboard-shell .sidebar,
.dashboard-shell .topbar {
  display: none;
}

.dashboard-shell .main {
  min-height: 100vh;
  padding: 8px 8px 0 50px;
  background: #eef0f5;
}

.fund-dashboard {
  min-height: calc(100vh - 8px);
  color: #1f2b3d;
}

.fund-header {
  height: 78px;
  border-radius: 9px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 26px;
  box-shadow: 0 12px 32px rgba(31, 43, 61, 0.08);
}

.fund-header h3 {
  margin: 0 0 5px;
  font-size: 19px;
  font-weight: 800;
  color: #111827;
}

.fund-header p {
  margin: 0;
  color: #2e4360;
  font-size: 14px;
}

.fund-user {
  display: grid;
  grid-template-columns: auto 40px;
  grid-template-rows: auto auto;
  gap: 1px 10px;
  align-items: center;
  text-align: right;
}

.fund-user strong {
  color: #0f2c5c;
  font-size: 14px;
  font-weight: 800;
}

.fund-user span {
  color: #7b8494;
  font-size: 12px;
}

.fund-user b {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #5674df;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
}

.fund-card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.fund-card {
  min-height: 109px;
  border-radius: 9px;
  background: #fff;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 24px 24px 22px 28px;
  box-shadow: 0 12px 32px rgba(31, 43, 61, 0.08);
  border-left: 4px solid #4f78ff;
  transform: translateZ(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  will-change: transform;
}

.fund-card:hover {
  transform: translateY(-4px) scale(1.025);
  box-shadow: 0 20px 46px rgba(31, 43, 61, 0.16);
  z-index: 2;
}

.fund-card span {
  display: block;
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 12px;
}

.fund-card strong {
  display: block;
  color: #555d6b;
  font-size: 24px;
  line-height: 1;
  font-weight: 800;
}

.fund-card i {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-style: normal;
  font-size: 22px;
  font-weight: 800;
  transition: transform 0.18s ease;
}

.fund-card:hover i {
  transform: scale(1.08);
}

.fund-card.blue {
  border-left-color: #4d78ff;
}

.fund-card.blue span {
  color: #2f62ff;
}

.fund-card.blue i {
  color: #4d72dc;
  background: #edf2ff;
}

.fund-card.red {
  border-left-color: #ef4444;
}

.fund-card.red span,
.fund-card.red strong {
  color: #ef3d4d;
}

.fund-card.red i {
  color: #ef4444;
  background: #fff0f2;
}

.fund-card.green {
  border-left-color: #16c995;
}

.fund-card.green span,
.fund-card.green strong {
  color: #009a60;
}

.fund-card.green i {
  color: #12b987;
  background: #e8fbf3;
}

.fund-layout {
  display: grid;
  grid-template-columns: minmax(520px, 2fr) minmax(360px, 0.95fr);
  gap: 24px;
  margin-top: 24px;
}

.fund-panel {
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 12px 32px rgba(31, 43, 61, 0.08);
}

.trend-panel {
  min-height: 430px;
  padding: 22px 20px 20px;
}

.fund-panel-head {
  height: 52px;
  border-bottom: 1px solid #dce1e9;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.trend-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.trend-title h3 {
  margin: 6px 0 0;
  color: #2468ff;
  font-size: 17px;
  font-weight: 800;
}

.trend-title span {
  margin-top: 4px;
  border: 1px solid #d4dae5;
  border-radius: 4px;
  color: #506077;
  font-size: 12px;
  padding: 4px 8px;
}

.trend-tabs {
  min-height: 36px;
  display: flex;
  align-items: center;
  gap: 5px;
  background: #f7f8fb;
  border-radius: 6px;
  padding: 4px 8px;
}

.trend-tabs button {
  border: 0;
  background: transparent;
  min-height: 28px;
  border-radius: 4px;
  padding: 0 12px;
  color: #2f3948;
  font-weight: 500;
}

.trend-tabs button.active {
  background: #fff;
  color: #0066ff;
  font-weight: 800;
}

.trend-tabs b {
  width: 1px;
  height: 20px;
  background: #c9ced8;
  margin: 0 4px;
}

.fund-chart {
  height: 330px;
  padding-top: 24px;
}

.fund-chart svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.chart-grid line {
  stroke: #e1e7f0;
  stroke-width: 1;
  stroke-dasharray: 4 5;
}

.chart-grid text,
.chart-x {
  fill: #64748b;
  font-size: 11px;
}

.chart-area {
  fill: rgba(76, 116, 255, 0.1);
}

.chart-line {
  fill: none;
  stroke: #4b73ff;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.warning-panel {
  min-height: 430px;
  padding: 22px 20px;
}

.warning-head {
  height: 42px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid #dce1e9;
}

.warning-head h3 {
  margin: 2px 0 0;
  color: #f23d4c;
  font-size: 16px;
  font-weight: 800;
}

.warning-table {
  padding: 22px 10px 0;
}

.warning-row {
  min-height: 45px;
  display: grid;
  grid-template-columns: minmax(120px, 1fr) minmax(90px, 0.8fr) 70px;
  align-items: center;
  border-bottom: 1px solid #e8edf4;
  color: #334155;
  font-size: 13px;
}

.warning-row-head {
  min-height: 36px;
  color: #7f8999;
  font-weight: 800;
  border-bottom: 0;
}

.warning-account {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: Consolas, "SFMono-Regular", monospace;
  font-weight: 800;
}

.warning-account i {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #25bd84;
  display: inline-block;
}

.warning-row strong {
  color: #ff2038;
  font-weight: 800;
}

.warning-row em {
  justify-self: start;
  color: #1a1a1a;
  background: #ffc400;
  border-radius: 6px;
  font-style: normal;
  font-size: 12px;
  line-height: 1;
  padding: 3px 6px;
  font-weight: 800;
}

.warning-empty {
  padding: 28px 0;
  color: var(--muted);
}

/* 融通元量化 replica shell */
.login-shell {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f2f5;
  padding: 24px;
}

.login-panel {
  width: 400px;
  min-height: 445px;
  padding: 0;
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 18px 45px rgba(31, 43, 61, 0.1);
  overflow: hidden;
  display: block;
}

.login-brand {
  height: 113px;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 8px;
  border-bottom: 1px solid #d9dee7;
}

.login-brand div {
  display: flex;
  align-items: center;
  gap: 9px;
}

.brand-icon {
  position: relative;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  display: inline-block;
  color: #4f74e8;
}

.brand-icon::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 4px;
  width: 20px;
  height: 18px;
  border-left: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
}

.brand-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 13px;
  width: 16px;
  height: 9px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: skewY(-23deg);
  transform-origin: left center;
}

.brand-icon i {
  position: absolute;
  left: 18px;
  top: 6px;
  width: 6px;
  height: 6px;
  border-top: 2px solid currentColor;
  border-right: 2px solid currentColor;
  transform: rotate(45deg);
}

.sidebar-logo {
  width: 24px;
  height: 24px;
  flex-basis: 24px;
}

.sidebar-logo::before {
  left: 2px;
  top: 4px;
  width: 18px;
  height: 15px;
}

.sidebar-logo::after {
  left: 6px;
  top: 12px;
  width: 14px;
  height: 7px;
}

.sidebar-logo i {
  left: 16px;
  top: 5px;
}

.login-logo,
.quant-logo {
  color: #4f74e8;
  font-weight: 900;
}

.login-brand strong {
  color: #4f74e8;
  font-size: 28px;
  line-height: 1;
  font-weight: 900;
}

.login-brand small {
  color: #3f4652;
  font-size: 14px;
}

.login-form {
  padding: 28px 24px 24px;
  display: grid;
  gap: 20px;
}

.login-form label {
  gap: 9px;
}

.login-form label > span {
  color: #3b4657;
  font-size: 14px;
  font-weight: 700;
}

.login-input {
  height: 38px;
  display: grid;
  grid-template-columns: 40px 1fr;
  align-items: center;
  border: 1px solid #d7dfec;
  border-radius: 5px;
  overflow: hidden;
  background: #eaf1ff;
}

.login-input i {
  height: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #111827;
  background: #fff;
  border-right: 1px solid #d7dfec;
  font-style: normal;
}

.login-input input {
  height: 100%;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: #eaf1ff;
  box-shadow: none;
  color: #0f172a;
  font-size: 16px;
}

.login-submit {
  height: 46px;
  border: 0;
  border-radius: 5px;
  background: #5575df;
  color: #fff;
  font-size: 16px;
  font-weight: 800;
}

.login-panel footer {
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid #d9dee7;
  color: #394355;
  font-size: 14px;
}

.app-shell,
.app-shell.dashboard-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 249px minmax(0, 1fr);
  background: #edf2f7;
}

.dashboard-shell .sidebar {
  display: flex;
}

.dashboard-shell .main {
  min-height: 100vh;
  padding: 23px 29px 40px;
  background:
    linear-gradient(180deg, #eef4f8 0%, #f7f9fc 42%, #edf2f7 100%);
}

.topbar,
.dashboard-shell .topbar {
  display: none;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  background:
    linear-gradient(180deg, #fbfdff 0%, #f3f7fb 48%, #edf3f8 100%);
  color: #748094;
  border-right: 1px solid #d7e0eb;
  padding: 0 20px;
  box-shadow: 10px 0 32px rgba(30, 46, 70, 0.08);
}

.sidebar-head {
  height: 70px;
  padding: 0 4px;
  border-bottom: 1px solid rgba(116, 128, 148, 0.12);
  display: flex;
  align-items: center;
  gap: 9px;
}

.sidebar-head strong {
  color: #4f74e8;
  font-size: 22px;
  font-weight: 900;
}

.nav-list {
  margin-top: 8px;
  gap: 9px;
}

.nav-item {
  width: 100%;
  min-height: 48px;
  border-radius: 7px;
  color: #6f7b8e;
  background: rgba(255, 255, 255, 0.46);
  padding: 0 14px;
  gap: 13px;
  font-size: 16px;
  font-weight: 800;
  border: 1px solid transparent;
}

.nav-item:hover,
.nav-item.active {
  color: #315fda;
  background: #eef5ff;
  border-color: #dce8ff;
  box-shadow: 0 8px 18px rgba(49, 95, 218, 0.08);
}

.nav-icon {
  width: 16px;
  color: currentColor;
  font-size: 17px;
}

.nav-count {
  margin-left: auto;
  min-width: 36px;
  height: 22px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #1f6cff;
  color: #fff;
  font-size: 12px;
}

.logout-nav {
  color: #ff4a58;
  margin-top: 8px;
}

.logout-nav:hover {
  color: #ff4a58;
  background: #fff2f4;
  border-color: #ffd6dc;
}

.main {
  min-width: 0;
  padding: 23px 29px 40px;
  background:
    linear-gradient(180deg, #eef4f8 0%, #f7f9fc 42%, #edf2f7 100%);
}

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

.account-detail-shell .sidebar {
  display: none;
}

.account-detail-shell .main {
  padding: 23px 42px 48px;
}

.account-detail-page {
  min-height: calc(100vh - 46px);
  color: #071827;
}

.account-detail-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 32px;
}

.back-list-button {
  height: 31px;
  border: 0;
  border-radius: 4px;
  background: #66707c;
  color: #fff;
  padding: 0 12px;
  font-size: 14px;
  font-weight: 800;
}

.ea-online-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 28px;
  min-width: 86px;
  border-radius: 6px;
  background: #148a58;
  color: #fff;
  box-shadow: 0 4px 10px rgba(20, 138, 88, 0.18);
  font-size: 13px;
  font-weight: 900;
}

.ea-online-badge.offline {
  background: #8b95a1;
}

.account-detail-title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 8px 0 23px;
}

.account-detail-title h1 {
  margin: 0;
  color: #071827;
  font-size: 26px;
  line-height: 1.25;
  font-weight: 900;
}

.account-detail-title span {
  color: #526173;
  font-size: 16px;
}

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

.detail-metric {
  position: relative;
  min-height: 110px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31, 43, 61, 0.08);
  padding: 27px 28px;
  overflow: hidden;
  border-left: 4px solid #5575df;
}

.detail-metric span {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 900;
}

.detail-metric strong {
  color: #566070;
  font-size: 25px;
  font-weight: 900;
}

.detail-metric i {
  position: absolute;
  right: 26px;
  top: 40px;
  color: #d7dbe7;
  font-style: normal;
}

.detail-metric.blue span { color: #1766ff; }
.detail-metric.green { border-left-color: #19c28d; }
.detail-metric.green span { color: #00865b; }
.detail-metric.red { border-left-color: #f0473f; }
.detail-metric.red span,
.detail-metric.red strong.negative,
#detailProfit.negative { color: #ff3045; }
.detail-metric.red strong.positive,
#detailProfit.positive { color: #00865b; }
.detail-metric.amber { border-left-color: #f5b51b; }
.detail-metric.amber span { color: #e69a00; }

.detail-wallet {
  width: 31px;
  height: 24px;
  border: 3px solid currentColor;
  border-radius: 3px;
}

.detail-wallet::before {
  content: "";
  position: absolute;
  right: 2px;
  top: -7px;
  width: 22px;
  height: 10px;
  border: 3px solid currentColor;
  border-bottom: 0;
  border-radius: 3px 3px 0 0;
}

.detail-chart {
  width: 31px;
  height: 31px;
  border-left: 3px solid currentColor;
  border-bottom: 3px solid currentColor;
}

.detail-chart::before {
  content: "";
  position: absolute;
  left: 6px;
  top: 12px;
  width: 21px;
  height: 13px;
  border-top: 3px solid currentColor;
  border-right: 3px solid currentColor;
  transform: skewY(-31deg);
}

.detail-dollar {
  font-size: 34px;
  font-weight: 900;
}

.detail-layers {
  width: 34px;
  height: 28px;
}

.detail-layers::before,
.detail-layers::after {
  content: "";
  position: absolute;
  left: 2px;
  width: 28px;
  height: 14px;
  background: currentColor;
  clip-path: polygon(50% 0, 100% 35%, 50% 70%, 0 35%);
}

.detail-layers::before { top: 0; opacity: 0.75; }
.detail-layers::after { top: 12px; opacity: 0.45; }

.detail-panel-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(420px, 1fr);
  gap: 24px;
  margin-top: 48px;
}

.detail-panel {
  min-height: 315px;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 14px 36px rgba(31, 43, 61, 0.08);
  padding: 27px 26px;
}

.detail-panel h3 {
  margin: 0 0 24px;
  padding-bottom: 12px;
  border-bottom: 1px solid #e2e7ee;
  color: #4f74e8;
  font-size: 16px;
  font-weight: 900;
}

.detail-info-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 30px 42px;
}

.detail-info-grid div {
  display: grid;
  gap: 7px;
}

.detail-info-grid span,
.device-block strong,
.danger-zone strong {
  color: #3c4655;
  font-size: 14px;
  font-weight: 900;
}

.detail-info-grid strong {
  color: #001328;
  font-size: 16px;
}

#detailLicenseKey {
  color: #006aff;
}

.detail-info-grid .detail-api-key {
  grid-column: 1 / -1;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 7px 10px;
}

.detail-api-key span {
  grid-column: 1 / -1;
}

#detailApiKey {
  overflow-wrap: anywhere;
  color: #1f355a;
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  line-height: 1.4;
}

#copyApiKeyButton {
  border: 1px solid #cfd9e8;
  border-radius: 4px;
  background: #fff;
  color: #1766ff;
  padding: 6px 12px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

#copyApiKeyButton:hover {
  border-color: #1766ff;
  background: #f4f8ff;
}

.status-pill {
  width: fit-content;
  border: 1px solid #9bd6bb;
  border-radius: 5px;
  background: #d8f1e5;
  color: #00865b;
  padding: 4px 10px;
  font-style: normal;
  font-size: 13px;
  font-weight: 900;
}

.status-pill.offline {
  border-color: #ffd0d6;
  background: #fff0f2;
  color: #ff3045;
}

.device-block {
  display: grid;
  gap: 12px;
}

.device-block div {
  min-height: 38px;
  border: 1px solid #d8dee8;
  border-radius: 5px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #4b5563;
  font-size: 14px;
}

.danger-zone {
  margin-top: 27px;
}

.danger-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 10px;
}

.danger-actions button {
  height: 39px;
  border-radius: 6px;
  background: #fff;
  font-size: 16px;
  font-weight: 900;
}

.danger-actions button:first-child {
  border: 1px solid #ff3045;
  color: #ff3045;
}

.danger-actions button:last-child {
  border: 1px solid #111827;
  color: #111827;
}

.danger-zone p {
  margin: 11px 0 0;
  color: #64748b;
  font-size: 14px;
  font-style: italic;
}

.crm-page {
  min-height: calc(100vh - 46px);
  color: #0f1d2f;
}

.crm-header {
  min-height: 77px;
  background: #fff;
  border-radius: 9px;
  box-shadow: 0 14px 36px rgba(31, 43, 61, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.crm-header h2 {
  margin: 0 0 5px;
  font-size: 22px;
  font-weight: 900;
  color: #0e1c2f;
}

.crm-header p {
  margin: 0;
  color: #31435c;
  font-size: 14px;
}

.crm-user {
  display: flex;
  align-items: center;
  gap: 13px;
}

.crm-user strong {
  color: #0d2a55;
  font-size: 15px;
  font-weight: 900;
}

.crm-user b {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: #5575df;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.license-toolbar {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 25px;
}

.license-toolbar .ghost-filter {
  display: none;
}

.license-search {
  width: 300px;
  height: 38px;
  display: grid;
  grid-template-columns: 38px 1fr;
  align-items: center;
  background: #fff;
  border: 1px solid #d5dce8;
  border-radius: 5px;
  box-shadow: 0 7px 15px rgba(31, 43, 61, 0.07);
}

.license-search span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #334155;
  font-size: 20px;
}

.license-search input {
  border: 0;
  min-height: 36px;
  padding: 0 10px 0 0;
  box-shadow: none;
}

.ghost-filter {
  min-height: 34px;
  border: 1px solid #d6deeb;
  border-radius: 6px;
  background: #fff;
  color: #647084;
  padding: 0 12px;
}

.license-panel {
  background: #fff;
  border-radius: 0;
  box-shadow: none;
  overflow: auto;
}

.license-table {
  min-width: 1250px;
}

.license-table th,
.license-table td {
  border-bottom: 1px solid #e7ecf3;
}

.license-table th {
  height: 54px;
  background: #f7f8fb;
  color: #7d879b;
  font-size: 12px;
  font-weight: 900;
  text-transform: none;
}

.license-table td {
  height: 94px;
  padding: 16px 12px;
}

.license-row.is-selected td {
  background: #f6f9ff;
}

.license-table th:first-child,
.license-table td:first-child {
  width: 58px;
  text-align: center;
}

.license-client {
  display: grid;
  gap: 8px;
}

.license-client strong {
  color: #001328;
  font-size: 15px;
  font-weight: 900;
}

.license-client span {
  width: fit-content;
  border: 1px solid #d5dff8;
  border-radius: 5px;
  background: #edf3ff;
  color: #2563ff;
  padding: 6px 10px;
  font-family: Consolas, monospace;
  font-weight: 800;
}

.license-client small {
  color: #64748b;
  font-size: 12px;
  font-weight: 700;
}

.license-status {
  display: grid;
  gap: 4px;
}

.license-status strong {
  font-size: 14px;
  font-weight: 900;
}

.license-status.locked strong {
  color: #ff3045;
}

.license-status.ok strong {
  color: #059669;
}

.license-status span,
.money-cell span,
.profit-cell span {
  color: #44546b;
  font-size: 13px;
}

.money-cell,
.profit-cell {
  display: grid;
  gap: 4px;
}

.money-cell strong {
  color: #111827;
  font-size: 16px;
  font-weight: 900;
}

.profit-cell strong {
  font-size: 15px;
  font-weight: 900;
}

.profit-cell strong.gain {
  color: #008d59;
}

.profit-cell strong.loss,
.loss-text {
  color: #ff3045;
}

.gain-text {
  color: #00935f;
  font-weight: 900;
}

.blue-text {
  color: #1766ff;
}

.license-actions {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
}

.license-actions button {
  width: 33px;
  height: 31px;
  border: 1px solid #d7dfea;
  border-radius: 4px;
  background: #fff;
  color: #0d6bff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.license-actions button:hover {
  background: #edf3ff;
  border-color: #b9c9ef;
}

.license-actions button svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.license-actions button[data-action="edit"] {
  color: #64748b;
}

.license-actions button[data-action="edit"]:hover {
  color: #475569;
}

.table-pagination {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px 20px 20px;
  background: #fff;
}

.table-pagination button {
  height: 33px;
  min-width: 34px;
  margin-left: -1px;
  border: 1px solid #d8dee8;
  background: #fff;
  color: #1766ff;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
}

.table-pagination button:first-child {
  min-width: 62px;
  margin-left: 0;
  border-radius: 4px 0 0 4px;
  color: #334155;
}

.table-pagination button:last-child {
  min-width: 62px;
  border-radius: 0 4px 4px 0;
}

.table-pagination button.active {
  position: relative;
  z-index: 1;
  background: #1f7aff;
  border-color: #1f7aff;
  color: #fff;
}

.table-pagination button:disabled {
  cursor: default;
  background: #eef1f5;
  color: #64748b;
}

.modal-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.view-card {
  max-width: 760px;
}

.view-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  padding: 4px 0 8px;
}

.view-item {
  min-height: 72px;
  border: 1px solid #e0e7f3;
  border-radius: 8px;
  background: #f8fbff;
  padding: 14px 16px;
  display: grid;
  align-content: center;
  gap: 7px;
}

.view-item span {
  color: #7c8799;
  font-size: 12px;
  font-weight: 800;
}

.view-item strong {
  min-width: 0;
  color: #111827;
  font-size: 15px;
  font-weight: 900;
  overflow-wrap: anywhere;
}

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

.period-tabs {
  display: flex;
  gap: 8px;
}

.period-tabs button {
  min-width: 59px;
  height: 33px;
  border: 1px solid #d4dbea;
  border-radius: 999px;
  background: #fff;
  color: #667287;
  font-weight: 800;
}

.period-tabs button.active {
  background: #5575df;
  color: #fff;
  border-color: #5575df;
}

.crm-metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 24px;
  margin-top: 30px;
}

.crm-metric {
  min-height: 110px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(31, 43, 61, 0.08);
  padding: 27px 28px;
  border-left: 4px solid #5575df;
  transform: translateZ(0);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  will-change: transform;
}

.crm-metric:hover {
  transform: translateY(-4px) scale(1.025);
  box-shadow: 0 22px 48px rgba(31, 43, 61, 0.16);
  z-index: 2;
}

.crm-metric span {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  font-weight: 900;
}

.crm-metric strong {
  font-size: 25px;
  font-weight: 900;
}

.crm-metric.blue span { color: #5575df; }
.crm-metric.green { border-left-color: #17c48d; }
.crm-metric.green span,
.crm-metric.green strong { color: #00865b; }
.crm-metric.red { border-left-color: #f05243; }
.crm-metric.red span { color: #ff302f; }
.crm-metric.red strong { color: #1766ff; }
.crm-metric.cyan { border-left-color: #20bfd7; }
.crm-metric.cyan span,
.crm-metric.cyan strong { color: #10bce0; }

.crm-chart-grid {
  display: grid;
  grid-template-columns: minmax(600px, 2fr) minmax(360px, 0.98fr);
  gap: 24px;
  margin-top: 24px;
}

.crm-chart-card,
.crm-table-panel,
.system-log-panel {
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 14px 36px rgba(31, 43, 61, 0.08);
  overflow: hidden;
}

.crm-chart-card {
  min-height: 430px;
  padding: 20px 20px 14px;
}

.crm-chart-card h3 {
  height: 34px;
  margin: 0 0 10px;
  border-bottom: 1px solid #dce2ec;
  color: #4f74e8;
  font-size: 16px;
  font-weight: 900;
}

.crm-chart {
  height: 342px;
}

.crm-chart svg {
  width: 100%;
  height: 100%;
}

.crm-grid line {
  stroke: #e2e8f2;
  stroke-dasharray: 4 5;
}

.crm-grid text,
.crm-x text,
.crm-legend text {
  fill: #64748b;
  font-size: 11px;
}

.crm-aum-area-line {
  fill: none;
  stroke: #e8eefb;
  stroke-width: 3;
}

.crm-profit-line {
  fill: none;
  stroke: #18c48c;
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.crm-legend circle {
  fill: #edf2ff;
}

.crm-legend .green-dot {
  fill: #18c48c;
}

.crm-table-panel {
  margin-top: 30px;
}

.crm-table-head {
  height: 75px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
}

.crm-table-head h3 {
  margin: 0;
  color: #4f74e8;
  font-size: 16px;
  font-weight: 900;
}

.crm-table-head h3 span {
  background: #677386;
  color: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
}

.excel-button {
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #13925f;
  color: #fff;
  padding: 0 16px;
  font-weight: 800;
}

.crm-audit-table {
  min-width: 1000px;
}

.crm-audit-table th {
  height: 50px;
  background: #f7f8fb;
  color: #7d879b;
  text-transform: none;
}

.crm-audit-table td {
  height: 52px;
}

.crm-audit-table td:first-child strong {
  color: #001328;
}

.crm-audit-table td:first-child span {
  color: #1766ff;
  margin-left: 8px;
  font-size: 12px;
}

.roi-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 45px;
  min-height: 22px;
  border-radius: 999px;
  background: #d6f1e5;
  color: #00865b;
  font-style: normal;
  font-weight: 900;
  font-size: 12px;
}

.logs-page {
  position: relative;
}

.logs-page h1 {
  margin: 10px 0 24px;
  font-size: 26px;
  color: #0e1c2f;
}

.log-filter {
  display: none;
}

.system-log-panel {
  border-radius: 8px;
}

.system-log-table {
  min-width: 950px;
}

.system-log-table th {
  height: 43px;
  background: #f7f8fb;
  color: #7d879b;
  text-transform: none;
}

.system-log-table td {
  height: 68px;
  text-align: center;
}

.empty-cell {
  height: 68px;
  text-align: center !important;
  color: #334155;
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 16px;
  margin-bottom: 18px;
}

.metric-card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(23, 33, 47, 0.05);
}

.metric-card {
  padding: 18px;
}

.metric-card span,
.metric-card small {
  display: block;
  color: var(--muted);
}

.metric-card strong {
  display: block;
  font-size: 32px;
  margin: 10px 0 4px;
}

.metric-card.alert strong {
  color: var(--red);
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(320px, 0.9fr);
  gap: 18px;
}

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

.panel.wide {
  min-width: 0;
}

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

.panel h3 {
  font-size: 18px;
}

.health-list {
  display: grid;
  gap: 12px;
}

.health-row {
  display: grid;
  grid-template-columns: 120px minmax(120px, 1fr) 84px 80px;
  gap: 14px;
  align-items: center;
  padding: 12px;
  background: var(--surface-soft);
  border-radius: 8px;
}

.health-row strong,
.health-row span,
.health-row small {
  min-width: 0;
}

.health-row small {
  color: var(--muted);
}

.bar {
  height: 8px;
  background: #dfe6ef;
  border-radius: 999px;
  overflow: hidden;
}

.bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.bar.ok i {
  background: var(--green);
}

.bar.warn i {
  background: var(--amber);
}

.bar.bad i {
  background: var(--red);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  border-radius: 999px;
  padding: 0 9px;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.badge.online,
.badge.success,
.badge.master {
  color: #08724b;
  background: #e7f8f1;
}

.badge.offline,
.badge.error {
  color: #a52e2e;
  background: #fff0f0;
}

.badge.paused,
.badge.warning {
  color: #8a5200;
  background: #fff5df;
}

.badge.slave {
  color: #1557b7;
  background: #eaf2ff;
}

.timeline {
  display: grid;
  gap: 14px;
}

.timeline div {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  grid-template-areas:
    "dot title"
    "dot meta";
  gap: 2px 10px;
}

.timeline b {
  grid-area: title;
}

.timeline small {
  grid-area: meta;
  color: var(--muted);
}

.dot {
  grid-area: dot;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  margin-top: 5px;
}

.dot.ok {
  background: var(--green);
}

.dot.warn {
  background: var(--amber);
}

.dot.bad {
  background: var(--red);
}

.toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.search-box {
  min-width: min(360px, 100%);
  flex: 1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 42px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0 12px;
}

.search-box span {
  color: var(--muted);
  font-size: 18px;
}

.search-box input {
  border: 0;
  box-shadow: none;
  padding: 0;
  flex: 1;
  min-height: 38px;
}

.table-panel {
  padding-bottom: 8px;
}

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

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  background: #fff;
}

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

th {
  background: #f1f5fa;
  color: #526173;
  font-size: 12px;
  text-transform: uppercase;
}

td {
  color: #26364a;
}

tbody tr:hover {
  background: #f8fbff;
}

.cell-main {
  display: grid;
  gap: 3px;
}

.cell-main strong {
  font-size: 14px;
}

.cell-main small {
  color: var(--muted);
}

.row-actions {
  display: flex;
  gap: 6px;
}

.row-actions button {
  min-height: 30px;
  padding: 0 9px;
  border-radius: 5px;
  border: 1px solid #d4deeb;
  background: #f5f8fc;
  color: #2d4057;
}

.copy-matrix {
  display: grid;
  gap: 14px;
}

.copy-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--surface-soft);
}

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

.copy-card-head strong {
  display: block;
  margin-bottom: 3px;
}

.copy-card-head small {
  color: var(--muted);
}

.copy-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.copy-grid label,
.risk-grid label,
.settings-grid label,
.mapping-list label {
  min-width: 0;
}

.mapping-list,
.permission-list,
.password-box {
  display: grid;
  gap: 13px;
}

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

.mapping-list label {
  grid-template-columns: 80px minmax(0, 1fr);
  align-items: center;
}

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

.switch-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(140px, 1fr));
  gap: 12px;
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.emergency {
  display: grid;
  align-content: start;
  gap: 12px;
}

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

.log-row {
  display: grid;
  grid-template-columns: 92px 70px minmax(0, 1fr) 160px;
  gap: 12px;
  align-items: center;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.log-row small {
  color: var(--muted);
}

.modal {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(16, 24, 35, 0.54);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.modal-card {
  width: min(760px, 100%);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 20px;
}

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

.modal-head h3,
.modal-head p {
  margin: 0;
}

.modal-head p {
  color: var(--muted);
  margin-top: 4px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 18px;
}

@media (max-width: 1120px) {
  .dashboard-shell .main {
    padding: 12px;
  }

  .fund-card-grid {
    grid-template-columns: repeat(2, minmax(180px, 1fr));
  }

  .fund-layout {
    grid-template-columns: 1fr;
  }

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

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

  .copy-grid,
  .switch-grid {
    grid-template-columns: repeat(2, minmax(160px, 1fr));
  }
}

@media (max-width: 860px) {
  .login-shell {
    grid-template-columns: 1fr;
  }

  .login-summary {
    display: none;
  }

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

  .sidebar {
    position: fixed;
    z-index: 40;
    width: 260px;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
  }

  .app-shell.sidebar-open .sidebar {
    transform: translateX(0);
  }

  #menuToggle {
    display: inline-flex;
  }

  .main {
    padding: 14px;
  }

  .topbar {
    align-items: flex-start;
  }

  .topbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
  }

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

  .risk-grid,
  .settings-grid,
  .form-grid,
  .copy-grid,
  .switch-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 620px) {
  .fund-header {
    height: auto;
    padding: 18px;
    align-items: flex-start;
    gap: 16px;
  }

  .fund-card-grid {
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 16px;
  }

  .fund-layout {
    gap: 14px;
    margin-top: 14px;
  }

  .fund-panel-head,
  .warning-head {
    height: auto;
    align-items: stretch;
    flex-direction: column;
    padding-bottom: 12px;
  }

  .trend-tabs {
    overflow-x: auto;
  }

  .warning-row {
    grid-template-columns: minmax(90px, 1fr) 88px 56px;
  }

  .login-panel {
    padding: 34px 22px;
  }

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

  .topbar {
    display: grid;
    grid-template-columns: auto 1fr;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    margin-left: 0;
    width: 100%;
  }

  .topbar-actions button {
    flex: 1;
  }

  .toolbar > * {
    width: 100%;
  }

  .modal {
    align-items: flex-start;
    padding: 10px;
    overflow-y: auto;
  }
}

