556 lines
8.5 KiB
CSS
556 lines
8.5 KiB
CSS
.trade-list {
|
|
background: white;
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.trade-list {
|
|
padding: 2rem;
|
|
}
|
|
}
|
|
|
|
.trade-list h2 {
|
|
font-size: 1.5rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.trade-list h2 {
|
|
font-size: 2rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
}
|
|
|
|
.filter-panel {
|
|
background: #f8f9fa;
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
margin-bottom: 1rem;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.filter-panel {
|
|
padding: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
gap: 1.5rem;
|
|
align-items: flex-end;
|
|
}
|
|
}
|
|
|
|
.filter-section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.filter-section label {
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
color: #555;
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.period-buttons {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.period-buttons {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
}
|
|
|
|
.period-buttons button {
|
|
padding: 0.75rem 1rem;
|
|
border: 1px solid #ddd;
|
|
background: white;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
transition: all 0.3s;
|
|
touch-action: manipulation;
|
|
min-height: 44px;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.period-buttons button {
|
|
padding: 0.5rem 1rem;
|
|
min-height: auto;
|
|
}
|
|
}
|
|
|
|
.period-buttons button:hover {
|
|
background: #e9ecef;
|
|
border-color: #2196F3;
|
|
}
|
|
|
|
.period-buttons button.active {
|
|
background: #2196F3;
|
|
color: white;
|
|
border-color: #2196F3;
|
|
}
|
|
|
|
.date-inputs {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.date-inputs {
|
|
flex-direction: row;
|
|
align-items: center;
|
|
}
|
|
}
|
|
|
|
.date-inputs input[type="date"] {
|
|
padding: 0.75rem;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 0.9rem;
|
|
width: 100%;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.date-inputs input[type="date"] {
|
|
padding: 0.5rem;
|
|
width: auto;
|
|
}
|
|
}
|
|
|
|
.date-inputs span {
|
|
color: #666;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.filter-section input[type="text"],
|
|
.filter-section select {
|
|
padding: 0.75rem;
|
|
border: 1px solid #ddd;
|
|
border-radius: 6px;
|
|
font-size: 0.9rem;
|
|
width: 100%;
|
|
-webkit-appearance: none;
|
|
appearance: none;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.filter-section input[type="text"],
|
|
.filter-section select {
|
|
padding: 0.5rem;
|
|
width: auto;
|
|
}
|
|
}
|
|
|
|
.filter-actions {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 0.5rem;
|
|
width: 100%;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.filter-actions {
|
|
display: flex;
|
|
margin-left: auto;
|
|
width: auto;
|
|
}
|
|
}
|
|
|
|
.btn-primary,
|
|
.btn-secondary {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
transition: all 0.3s;
|
|
touch-action: manipulation;
|
|
min-height: 44px;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.btn-primary,
|
|
.btn-secondary {
|
|
padding: 0.5rem 1.5rem;
|
|
min-height: auto;
|
|
}
|
|
}
|
|
|
|
.btn-primary {
|
|
background: #2196F3;
|
|
color: white;
|
|
}
|
|
|
|
.btn-primary:hover {
|
|
background: #1976D2;
|
|
}
|
|
|
|
.btn-secondary {
|
|
background: #6c757d;
|
|
color: white;
|
|
}
|
|
|
|
.btn-secondary:hover {
|
|
background: #5a6268;
|
|
}
|
|
|
|
.btn-export {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 6px;
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
transition: all 0.3s;
|
|
touch-action: manipulation;
|
|
min-height: 44px;
|
|
background: #28a745;
|
|
color: white;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.btn-export {
|
|
padding: 0.5rem 1.5rem;
|
|
min-height: auto;
|
|
}
|
|
}
|
|
|
|
.btn-export:hover {
|
|
background: #218838;
|
|
}
|
|
|
|
.no-data {
|
|
text-align: center;
|
|
padding: 3rem;
|
|
color: #999;
|
|
font-size: 1.1rem;
|
|
}
|
|
|
|
.stats-summary {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 0.75rem;
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.stats-summary {
|
|
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
|
gap: 1rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
}
|
|
|
|
.stat-card {
|
|
background: #f8f9fa;
|
|
padding: 1.5rem;
|
|
border-radius: 8px;
|
|
text-align: center;
|
|
}
|
|
|
|
.stat-label {
|
|
font-size: 0.9rem;
|
|
color: #666;
|
|
margin-bottom: 0.5rem;
|
|
}
|
|
|
|
.stat-value {
|
|
font-size: 1.5rem;
|
|
font-weight: bold;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.stat-value.positive {
|
|
color: #27ae60;
|
|
}
|
|
|
|
.stat-value.negative {
|
|
color: #e74c3c;
|
|
}
|
|
|
|
.table-wrapper {
|
|
width: 100%;
|
|
overflow-x: auto;
|
|
margin-top: 1rem;
|
|
-webkit-overflow-scrolling: touch;
|
|
}
|
|
|
|
.table-wrapper::-webkit-scrollbar {
|
|
height: 8px;
|
|
}
|
|
|
|
.table-wrapper::-webkit-scrollbar-track {
|
|
background: #f1f1f1;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.table-wrapper::-webkit-scrollbar-thumb {
|
|
background: #888;
|
|
border-radius: 4px;
|
|
}
|
|
|
|
.table-wrapper::-webkit-scrollbar-thumb:hover {
|
|
background: #555;
|
|
}
|
|
|
|
.trades-table {
|
|
width: 100%;
|
|
border-collapse: collapse;
|
|
display: none;
|
|
min-width: 1200px; /* 确保表格有最小宽度,避免列被压缩 */
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.trades-table {
|
|
display: table;
|
|
}
|
|
}
|
|
|
|
.trades-table th {
|
|
background-color: #34495e;
|
|
color: white;
|
|
padding: 0.75rem 0.5rem;
|
|
text-align: left;
|
|
font-weight: 500;
|
|
font-size: 0.85rem;
|
|
white-space: nowrap;
|
|
position: sticky;
|
|
top: 0;
|
|
z-index: 10;
|
|
}
|
|
|
|
.trades-table td {
|
|
padding: 0.6rem 0.5rem;
|
|
border-bottom: 1px solid #eee;
|
|
font-size: 0.85rem;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
/* 优化特定列的宽度 */
|
|
.trades-table th:nth-child(1),
|
|
.trades-table td:nth-child(1) {
|
|
min-width: 60px;
|
|
max-width: 80px;
|
|
}
|
|
|
|
.trades-table th:nth-child(2),
|
|
.trades-table td:nth-child(2) {
|
|
min-width: 90px;
|
|
}
|
|
|
|
.trades-table th:nth-child(3),
|
|
.trades-table td:nth-child(3) {
|
|
min-width: 60px;
|
|
}
|
|
|
|
.trades-table th:nth-child(4),
|
|
.trades-table td:nth-child(4) {
|
|
min-width: 90px;
|
|
}
|
|
|
|
.trades-table th:nth-child(5),
|
|
.trades-table td:nth-child(5) {
|
|
min-width: 90px;
|
|
}
|
|
|
|
.trades-table th:nth-child(6),
|
|
.trades-table td:nth-child(6) {
|
|
min-width: 90px;
|
|
}
|
|
|
|
.trades-table th:nth-child(7),
|
|
.trades-table td:nth-child(7) {
|
|
min-width: 90px;
|
|
}
|
|
|
|
.trades-table th:nth-child(8),
|
|
.trades-table td:nth-child(8) {
|
|
min-width: 90px;
|
|
}
|
|
|
|
.trades-table th:nth-child(9),
|
|
.trades-table td:nth-child(9) {
|
|
min-width: 100px;
|
|
}
|
|
|
|
.trades-table th:nth-child(10),
|
|
.trades-table td:nth-child(10) {
|
|
min-width: 100px;
|
|
}
|
|
|
|
.trades-table th:nth-child(11),
|
|
.trades-table td:nth-child(11) {
|
|
min-width: 80px;
|
|
}
|
|
|
|
.trades-table th:nth-child(12),
|
|
.trades-table td:nth-child(12) {
|
|
min-width: 100px;
|
|
}
|
|
|
|
.trades-table th:nth-child(13),
|
|
.trades-table td:nth-child(13) {
|
|
min-width: 200px;
|
|
white-space: normal;
|
|
word-break: break-all;
|
|
}
|
|
|
|
.trades-table th:nth-child(14),
|
|
.trades-table td:nth-child(14) {
|
|
min-width: 140px;
|
|
}
|
|
|
|
.trades-table th:nth-child(15),
|
|
.trades-table td:nth-child(15) {
|
|
min-width: 140px;
|
|
}
|
|
|
|
.trades-table tr:hover {
|
|
background-color: #f8f9fa;
|
|
}
|
|
|
|
/* 移动端卡片式布局 */
|
|
.trades-cards {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 1rem;
|
|
margin-top: 1rem;
|
|
}
|
|
|
|
@media (min-width: 768px) {
|
|
.trades-cards {
|
|
display: none;
|
|
}
|
|
}
|
|
|
|
.trade-card {
|
|
background: #f8f9fa;
|
|
padding: 1rem;
|
|
border-radius: 8px;
|
|
border: 1px solid #e9ecef;
|
|
}
|
|
|
|
.trade-card-header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
margin-bottom: 0.75rem;
|
|
padding-bottom: 0.75rem;
|
|
border-bottom: 1px solid #dee2e6;
|
|
}
|
|
|
|
.trade-card-symbol {
|
|
font-weight: bold;
|
|
font-size: 1.1rem;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.trade-card-side {
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 12px;
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.trade-card-side.buy {
|
|
background-color: #d4edda;
|
|
color: #155724;
|
|
}
|
|
|
|
.trade-card-side.sell {
|
|
background-color: #f8d7da;
|
|
color: #721c24;
|
|
}
|
|
|
|
.trade-card-body {
|
|
display: grid;
|
|
grid-template-columns: repeat(2, 1fr);
|
|
gap: 0.75rem;
|
|
margin-bottom: 0.75rem;
|
|
}
|
|
|
|
.trade-card-field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 0.25rem;
|
|
}
|
|
|
|
.trade-card-label {
|
|
font-size: 0.85rem;
|
|
color: #666;
|
|
}
|
|
|
|
.trade-card-value {
|
|
font-weight: 500;
|
|
color: #2c3e50;
|
|
}
|
|
|
|
.order-id {
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 0.9em;
|
|
color: #666;
|
|
}
|
|
|
|
.trade-card-footer {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
padding-top: 0.75rem;
|
|
border-top: 1px solid #dee2e6;
|
|
font-size: 0.9rem;
|
|
}
|
|
|
|
.buy {
|
|
color: #27ae60;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.sell {
|
|
color: #e74c3c;
|
|
font-weight: bold;
|
|
}
|
|
|
|
.positive {
|
|
color: #27ae60;
|
|
}
|
|
|
|
.negative {
|
|
color: #e74c3c;
|
|
}
|
|
|
|
.status {
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 12px;
|
|
font-size: 0.85rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.status.open {
|
|
background-color: #3498db;
|
|
color: white;
|
|
}
|
|
|
|
.status.closed {
|
|
background-color: #95a5a6;
|
|
color: white;
|
|
}
|
|
|
|
.status.cancelled {
|
|
background-color: #e74c3c;
|
|
color: white;
|
|
}
|