481086eddc
Co-authored-by: Cursor <cursoragent@cursor.com>
677 lines
13 KiB
CSS
677 lines
13 KiB
CSS
/* Copyright (c) 2025-2026 马建军. All rights reserved. 详见 LICENSE.zh-CN.txt */
|
|
|
|
.dashboard-page {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.dashboard-top {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
flex-wrap: wrap;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.dashboard-top-left {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 0.45rem;
|
|
}
|
|
|
|
.dash-updated {
|
|
font-size: 0.78rem;
|
|
}
|
|
|
|
.dash-server-compact {
|
|
display: inline-flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 0.35rem 0.45rem;
|
|
max-width: 100%;
|
|
padding: 0.28rem 0.55rem;
|
|
border: 1px solid rgba(255, 255, 255, 0.08);
|
|
border-radius: 999px;
|
|
background: rgba(0, 0, 0, 0.22);
|
|
color: var(--text-title);
|
|
font-size: 0.76rem;
|
|
line-height: 1.35;
|
|
cursor: pointer;
|
|
text-align: left;
|
|
}
|
|
|
|
.dash-server-compact:hover {
|
|
border-color: rgba(76, 217, 127, 0.35);
|
|
}
|
|
|
|
.dash-server-compact[aria-expanded="true"] .dash-toggle-icon {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
.dash-server-compact-label {
|
|
font-weight: 600;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.dash-server-summary {
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
font-size: 0.72rem;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.dash-server-compact .dash-toggle-icon {
|
|
font-size: 0.62rem;
|
|
opacity: 0.75;
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.dashboard-account-card {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.dashboard-account-grid {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.dashboard-account-grid .stat-item {
|
|
min-width: 6.5rem;
|
|
}
|
|
|
|
.dashboard-account-grid .stat-item .value {
|
|
font-size: 1rem;
|
|
font-weight: 700;
|
|
}
|
|
|
|
.dashboard-server-card {
|
|
margin-bottom: 0;
|
|
}
|
|
|
|
.dashboard-server-card[hidden] {
|
|
display: none !important;
|
|
}
|
|
|
|
.dash-server-head {
|
|
display: flex;
|
|
align-items: flex-start;
|
|
justify-content: space-between;
|
|
gap: 0.75rem;
|
|
flex-wrap: wrap;
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.dash-server-title {
|
|
display: flex;
|
|
align-items: center;
|
|
flex-wrap: wrap;
|
|
gap: 0.45rem;
|
|
font-size: 0.95rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.dash-server-dot {
|
|
width: 0.55rem;
|
|
height: 0.55rem;
|
|
border-radius: 50%;
|
|
background: var(--profit);
|
|
box-shadow: 0 0 8px rgba(76, 217, 127, 0.55);
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.dash-server-host {
|
|
font-size: 0.78rem;
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
}
|
|
|
|
.dash-server-head-meta {
|
|
display: flex;
|
|
flex-direction: column;
|
|
align-items: flex-end;
|
|
gap: 0.15rem;
|
|
font-size: 0.74rem;
|
|
}
|
|
|
|
.dash-server-ip-row {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
gap: 0.65rem;
|
|
margin-bottom: 0.85rem;
|
|
}
|
|
|
|
.dash-server-ip-item {
|
|
padding: 0.55rem 0.7rem;
|
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
border-radius: 0.55rem;
|
|
background: rgba(0, 0, 0, 0.18);
|
|
}
|
|
|
|
.dash-server-ip-item .label {
|
|
display: block;
|
|
font-size: 0.72rem;
|
|
color: var(--text-muted);
|
|
margin-bottom: 0.2rem;
|
|
}
|
|
|
|
.dash-server-ip-item .value {
|
|
font-size: 0.92rem;
|
|
font-weight: 600;
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.dash-server-metrics {
|
|
display: grid;
|
|
grid-template-columns: repeat(4, minmax(0, 1fr));
|
|
gap: 0.65rem;
|
|
}
|
|
|
|
.dash-server-metric {
|
|
padding: 0.6rem 0.7rem;
|
|
border: 1px solid rgba(255, 255, 255, 0.06);
|
|
border-radius: 0.55rem;
|
|
background: rgba(0, 0, 0, 0.14);
|
|
min-width: 0;
|
|
}
|
|
|
|
.dash-server-metric-top {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 0.35rem;
|
|
margin-bottom: 0.45rem;
|
|
}
|
|
|
|
.dash-server-metric-top .label {
|
|
font-size: 0.74rem;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.dash-server-metric-top .value {
|
|
font-size: 0.95rem;
|
|
font-weight: 700;
|
|
color: var(--profit);
|
|
}
|
|
|
|
.dash-server-bar {
|
|
height: 0.35rem;
|
|
border-radius: 999px;
|
|
background: rgba(255, 255, 255, 0.08);
|
|
overflow: hidden;
|
|
margin-bottom: 0.35rem;
|
|
}
|
|
|
|
.dash-server-bar > span {
|
|
display: block;
|
|
height: 100%;
|
|
width: 0;
|
|
border-radius: inherit;
|
|
background: linear-gradient(90deg, #3ecf7d, #67e8a5);
|
|
transition: width 0.35s ease;
|
|
}
|
|
|
|
.dash-server-metric-sub {
|
|
font-size: 0.7rem;
|
|
line-height: 1.35;
|
|
}
|
|
|
|
.dash-server-net {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
font-size: 0.78rem;
|
|
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.dash-server-net-live {
|
|
font-size: 0.72rem;
|
|
color: var(--text-muted);
|
|
font-weight: 500;
|
|
}
|
|
|
|
@media (max-width: 900px) {
|
|
.dash-server-metrics {
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
}
|
|
}
|
|
|
|
@media (max-width: 520px) {
|
|
.dash-server-ip-row,
|
|
.dash-server-metrics {
|
|
grid-template-columns: 1fr;
|
|
}
|
|
|
|
.dash-server-head-meta {
|
|
align-items: flex-start;
|
|
}
|
|
}
|
|
|
|
.dashboard-section h2 {
|
|
margin-bottom: 0.65rem;
|
|
}
|
|
|
|
.dashboard-risk-card h2 {
|
|
margin-bottom: 0.45rem;
|
|
}
|
|
|
|
.dashboard-risk-reason {
|
|
margin: 0 0 0.65rem;
|
|
font-size: 0.82rem;
|
|
line-height: 1.5;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.dashboard-risk-reason.is-blocked {
|
|
color: var(--loss);
|
|
}
|
|
|
|
.dashboard-risk-reason.is-ok {
|
|
color: var(--profit);
|
|
}
|
|
|
|
.dashboard-risk-grid {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: stretch;
|
|
gap: 0;
|
|
margin-bottom: 0;
|
|
overflow-x: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.dashboard-risk-heading {
|
|
display: flex;
|
|
align-items: baseline;
|
|
flex-wrap: wrap;
|
|
gap: 0.35rem;
|
|
width: 100%;
|
|
}
|
|
|
|
.dash-risk-doc-ref {
|
|
font-size: 0.72rem;
|
|
font-weight: 400;
|
|
}
|
|
|
|
.dash-risk-doc-link {
|
|
font-size: 0.74rem;
|
|
font-weight: 500;
|
|
color: var(--accent);
|
|
text-decoration: none;
|
|
margin-left: 0.15rem;
|
|
}
|
|
|
|
.dash-risk-doc-link:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
.dash-risk-doc-ref code {
|
|
font-size: 0.68rem;
|
|
}
|
|
|
|
.dashboard-risk-item {
|
|
flex: 1 1 0;
|
|
min-width: 6.4rem;
|
|
padding: 0.5rem 0.6rem;
|
|
text-align: center;
|
|
border-right: 1px solid var(--table-border);
|
|
}
|
|
|
|
.dashboard-risk-item:last-child {
|
|
border-right: none;
|
|
}
|
|
|
|
.dashboard-risk-label {
|
|
font-size: 0.74rem;
|
|
line-height: 1.35;
|
|
color: var(--text-muted);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.dashboard-risk-value {
|
|
font-size: 0.92rem;
|
|
font-weight: 600;
|
|
color: var(--text-title);
|
|
margin-top: 0.22rem;
|
|
font-variant-numeric: tabular-nums;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.dashboard-risk-value.risk-switch-on {
|
|
color: var(--profit);
|
|
}
|
|
|
|
.dashboard-risk-value.risk-switch-off {
|
|
color: var(--loss);
|
|
}
|
|
|
|
.dashboard-risk-value.risk-cap-single {
|
|
color: #5eb8ff;
|
|
}
|
|
|
|
[data-theme="light"] .dashboard-risk-value.risk-cap-single {
|
|
color: #1d4ed8;
|
|
}
|
|
|
|
.dashboard-risk-value.risk-cap-roll {
|
|
color: #c4a035;
|
|
}
|
|
|
|
[data-theme="light"] .dashboard-risk-value.risk-cap-roll {
|
|
color: #b45309;
|
|
}
|
|
|
|
.dashboard-risk-value .risk-margin-safe {
|
|
color: var(--profit);
|
|
}
|
|
|
|
.dashboard-risk-value .risk-margin-warn {
|
|
color: var(--planned-text);
|
|
}
|
|
|
|
.dashboard-risk-value .risk-margin-over {
|
|
color: var(--loss);
|
|
}
|
|
|
|
.dashboard-risk-value .risk-margin-sep {
|
|
color: var(--text-muted);
|
|
font-weight: 400;
|
|
}
|
|
|
|
.dashboard-risk-value .risk-margin-cap-inline {
|
|
color: #c4a035;
|
|
font-weight: 600;
|
|
}
|
|
|
|
[data-theme="light"] .dashboard-risk-value .risk-margin-cap-inline {
|
|
color: #b45309;
|
|
}
|
|
|
|
.dashboard-risk-grid .stat-item {
|
|
min-width: 5.5rem;
|
|
}
|
|
|
|
.dashboard-risk-grid .stat-item .value {
|
|
font-size: 0.82rem;
|
|
}
|
|
|
|
.dash-symbol-cell {
|
|
min-width: 7.5rem;
|
|
white-space: normal;
|
|
}
|
|
|
|
.dash-symbol-title {
|
|
font-weight: 600;
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.dash-symbol-ex {
|
|
font-weight: 400;
|
|
font-size: 0.78rem;
|
|
}
|
|
|
|
.dash-main-badge {
|
|
font-size: 0.68rem;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.dashboard-table .badge.dir-long,
|
|
.dashboard-table .badge.dir-short {
|
|
font-size: 0.72rem;
|
|
}
|
|
|
|
.dashboard-table .badge.dir-long {
|
|
background: var(--profit-bg);
|
|
color: var(--profit);
|
|
}
|
|
|
|
.dashboard-table .badge.dir-short {
|
|
background: var(--loss-bg);
|
|
color: var(--loss);
|
|
}
|
|
|
|
.dashboard-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
font-size: 0.82rem;
|
|
}
|
|
|
|
.dashboard-table th,
|
|
.dashboard-table td {
|
|
padding: 0.45rem 0.55rem;
|
|
border-bottom: 1px solid var(--table-border);
|
|
text-align: left;
|
|
white-space: nowrap;
|
|
font-variant-numeric: tabular-nums;
|
|
}
|
|
|
|
.dashboard-table tbody tr:last-child td {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.dashboard-table .pnl-pos {
|
|
color: var(--profit);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.dashboard-table .pnl-neg {
|
|
color: var(--loss);
|
|
font-weight: 600;
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
.dashboard-table {
|
|
font-size: 0.75rem;
|
|
}
|
|
.dashboard-table th,
|
|
.dashboard-table td {
|
|
padding: 0.35rem 0.4rem;
|
|
}
|
|
}
|
|
|
|
/* ---- 风控折叠 / 平板两行 ---- */
|
|
.dash-section-toggle {
|
|
cursor: pointer;
|
|
user-select: none;
|
|
}
|
|
|
|
.dash-section-toggle-label {
|
|
margin-right: 0.15rem;
|
|
}
|
|
|
|
.dash-toggle-icon {
|
|
margin-left: auto;
|
|
font-size: 0.68rem;
|
|
color: var(--text-muted);
|
|
transition: transform 0.2s ease;
|
|
}
|
|
|
|
.dashboard-risk-card.is-expanded .dash-toggle-icon {
|
|
transform: rotate(180deg);
|
|
}
|
|
|
|
html:is([data-layout="phone"], [data-layout="tablet"], .layout-phone, .layout-tablet)
|
|
.dashboard-risk-card:not(.is-expanded) .dash-risk-body {
|
|
display: none;
|
|
}
|
|
|
|
html[data-layout="tablet"] .dashboard-risk-grid,
|
|
html.layout-tablet .dashboard-risk-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(7, minmax(0, 1fr));
|
|
overflow-x: visible;
|
|
}
|
|
|
|
html[data-layout="tablet"] .dashboard-risk-item,
|
|
html.layout-tablet .dashboard-risk-item {
|
|
flex: none;
|
|
min-width: 0;
|
|
border-right: 1px solid var(--table-border);
|
|
border-bottom: 1px solid var(--table-border);
|
|
}
|
|
|
|
html[data-layout="tablet"] .dashboard-risk-item:nth-child(7n),
|
|
html.layout-tablet .dashboard-risk-item:nth-child(7n) {
|
|
border-right: none;
|
|
}
|
|
|
|
html[data-layout="tablet"] .dashboard-risk-item:nth-last-child(-n+6),
|
|
html.layout-tablet .dashboard-risk-item:nth-last-child(-n+6) {
|
|
border-bottom: none;
|
|
}
|
|
|
|
html:is([data-layout="phone"], .layout-phone) .dashboard-risk-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, minmax(0, 1fr));
|
|
overflow-x: visible;
|
|
}
|
|
|
|
html:is([data-layout="phone"], .layout-phone) .dashboard-risk-item {
|
|
flex: none;
|
|
min-width: 0;
|
|
border-right: 1px solid var(--table-border);
|
|
border-bottom: 1px solid var(--table-border);
|
|
}
|
|
|
|
html:is([data-layout="phone"], .layout-phone) .dashboard-risk-item:nth-child(2n) {
|
|
border-right: none;
|
|
}
|
|
|
|
html:is([data-layout="phone"], .layout-phone) .dashboard-risk-item:nth-last-child(-n+1) {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* ---- 持仓 / 关键位:桌面平板最多 3 行后滚动 ---- */
|
|
html:not([data-layout="phone"]):not(.layout-phone) .dash-pos-table-wrap,
|
|
html:not([data-layout="phone"]):not(.layout-phone) .dash-keys-table-wrap {
|
|
max-height: 12rem;
|
|
overflow-y: auto;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
html:not([data-layout="phone"]):not(.layout-phone) .dash-pos-table-wrap thead th,
|
|
html:not([data-layout="phone"]):not(.layout-phone) .dash-keys-table-wrap thead th {
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 1;
|
|
background: var(--card-inner);
|
|
}
|
|
|
|
/* ---- 手机简要列表 ---- */
|
|
.dash-mobile-list {
|
|
display: none;
|
|
}
|
|
|
|
html:is([data-layout="phone"], .layout-phone) .dash-mobile-list {
|
|
display: block;
|
|
}
|
|
|
|
html:is([data-layout="phone"], .layout-phone) .dash-pos-table-wrap,
|
|
html:is([data-layout="phone"], .layout-phone) .dash-keys-table-wrap,
|
|
html:is([data-layout="phone"], .layout-phone) .dash-closes-table-wrap {
|
|
display: none;
|
|
}
|
|
|
|
.dash-mobile-item {
|
|
display: block;
|
|
width: 100%;
|
|
text-align: left;
|
|
border: 1px solid var(--table-border);
|
|
border-radius: 10px;
|
|
background: var(--card-inner);
|
|
padding: 0.65rem 0.75rem;
|
|
margin-bottom: 0.5rem;
|
|
cursor: pointer;
|
|
color: inherit;
|
|
font: inherit;
|
|
transition: border-color 0.2s, box-shadow 0.2s;
|
|
}
|
|
|
|
.dash-mobile-item:hover,
|
|
.dash-mobile-item:focus-visible {
|
|
border-color: var(--accent);
|
|
outline: none;
|
|
box-shadow: 0 0 0 1px rgba(76, 194, 255, 0.15);
|
|
}
|
|
|
|
.dash-mobile-item-head {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 0.45rem;
|
|
margin-bottom: 0.3rem;
|
|
}
|
|
|
|
.dash-mobile-item-title {
|
|
min-width: 0;
|
|
flex: 1;
|
|
}
|
|
|
|
.dash-mobile-item-meta {
|
|
font-size: 0.74rem;
|
|
color: var(--text-muted);
|
|
line-height: 1.45;
|
|
}
|
|
|
|
.dash-mobile-item-foot {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
gap: 0.5rem;
|
|
margin-top: 0.35rem;
|
|
font-size: 0.78rem;
|
|
}
|
|
|
|
.dash-mobile-item-summary {
|
|
flex: 1;
|
|
min-width: 0;
|
|
line-height: 1.45;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.dash-mobile-item-summary .pnl-pos {
|
|
color: var(--profit);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.dash-mobile-item-summary .pnl-neg {
|
|
color: var(--loss);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.dash-mobile-item-title .badge {
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.dash-mobile-chevron {
|
|
font-size: 0.72rem;
|
|
color: var(--accent);
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.dash-mobile-empty {
|
|
padding: 0.85rem 0.35rem;
|
|
text-align: center;
|
|
color: var(--text-muted);
|
|
font-size: 0.82rem;
|
|
}
|
|
|
|
.dash-be-badge {
|
|
font-size: 0.66rem;
|
|
vertical-align: middle;
|
|
}
|
|
|
|
.dash-detail-modal {
|
|
max-width: 520px;
|
|
width: 100%;
|
|
}
|
|
|
|
.dash-detail-modal .modal-grid .item.wide {
|
|
grid-column: 1 / -1;
|
|
}
|
|
|
|
.dash-detail-modal .modal-actions {
|
|
margin-top: 1rem;
|
|
text-align: right;
|
|
}
|