This commit is contained in:
Dobromir Popov
2025-08-04 20:28:48 +03:00
parent fd6ec4eb40
commit 42cf02cf3a
6 changed files with 1226 additions and 0 deletions

View File

@ -0,0 +1,596 @@
/* COBY Dashboard Styles */
:root {
--primary-color: #2563eb;
--secondary-color: #1e40af;
--success-color: #10b981;
--warning-color: #f59e0b;
--error-color: #ef4444;
--background-color: #0f172a;
--surface-color: #1e293b;
--surface-light: #334155;
--text-primary: #f8fafc;
--text-secondary: #cbd5e1;
--text-muted: #64748b;
--border-color: #475569;
--shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
background-color: var(--background-color);
color: var(--text-primary);
line-height: 1.6;
overflow-x: hidden;
}
/* Layout */
#app {
min-height: 100vh;
display: flex;
flex-direction: column;
}
/* Header */
.dashboard-header {
background: var(--surface-color);
border-bottom: 1px solid var(--border-color);
padding: 1rem 2rem;
box-shadow: var(--shadow);
}
.header-content {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1400px;
margin: 0 auto;
}
.logo {
font-size: 1.5rem;
font-weight: 700;
color: var(--primary-color);
letter-spacing: -0.025em;
}
.header-info {
display: flex;
gap: 2rem;
align-items: center;
}
.connection-status {
display: flex;
align-items: center;
gap: 0.5rem;
font-size: 0.875rem;
font-weight: 500;
}
.connection-status::before {
content: '';
width: 8px;
height: 8px;
border-radius: 50%;
background: var(--error-color);
animation: pulse 2s infinite;
}
.connection-status.connected::before {
background: var(--success-color);
}
.last-update {
font-size: 0.875rem;
color: var(--text-secondary);
}
/* Main Content */
.dashboard-main {
flex: 1;
padding: 2rem;
max-width: 1400px;
margin: 0 auto;
width: 100%;
display: grid;
grid-template-columns: 1fr 300px;
grid-template-rows: auto auto 1fr;
gap: 2rem;
grid-template-areas:
"selector selector"
"overview overview"
"heatmap sidebar";
}
/* Symbol Selector */
.symbol-selector {
grid-area: selector;
display: flex;
gap: 2rem;
align-items: center;
background: var(--surface-color);
padding: 1rem 1.5rem;
border-radius: 0.5rem;
border: 1px solid var(--border-color);
}
.symbol-dropdown {
background: var(--surface-light);
border: 1px solid var(--border-color);
border-radius: 0.375rem;
padding: 0.5rem 1rem;
color: var(--text-primary);
font-size: 1rem;
min-width: 150px;
}
.exchange-toggles {
display: flex;
gap: 1rem;
flex-wrap: wrap;
}
.exchange-toggle {
display: flex;
align-items: center;
gap: 0.5rem;
padding: 0.5rem 1rem;
background: var(--surface-light);
border: 1px solid var(--border-color);
border-radius: 0.375rem;
cursor: pointer;
transition: all 0.2s;
}
.exchange-toggle:hover {
background: var(--primary-color);
}
.exchange-toggle.active {
background: var(--primary-color);
border-color: var(--primary-color);
}
/* Market Overview */
.market-overview {
grid-area: overview;
display: grid;
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
gap: 1rem;
}
.metric-card {
background: var(--surface-color);
border: 1px solid var(--border-color);
border-radius: 0.5rem;
padding: 1.5rem;
text-align: center;
transition: transform 0.2s;
}
.metric-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-lg);
}
.metric-card h3 {
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary);
margin-bottom: 0.5rem;
text-transform: uppercase;
letter-spacing: 0.05em;
}
.metric-value {
font-size: 1.5rem;
font-weight: 700;
color: var(--text-primary);
margin-bottom: 0.25rem;
}
.metric-change {
font-size: 0.875rem;
font-weight: 500;
}
.metric-change.positive {
color: var(--success-color);
}
.metric-change.negative {
color: var(--error-color);
}
/* Imbalance Bar */
.imbalance-bar {
height: 4px;
background: var(--surface-light);
border-radius: 2px;
margin-top: 0.5rem;
position: relative;
overflow: hidden;
}
.imbalance-bar::after {
content: '';
position: absolute;
top: 0;
left: 50%;
width: 0%;
height: 100%;
background: var(--primary-color);
transition: all 0.3s ease;
transform: translateX(-50%);
}
/* Liquidity Indicator */
.liquidity-indicator {
height: 4px;
background: var(--surface-light);
border-radius: 2px;
margin-top: 0.5rem;
position: relative;
overflow: hidden;
}
.liquidity-indicator::after {
content: '';
position: absolute;
top: 0;
left: 0;
width: 0%;
height: 100%;
background: linear-gradient(90deg, var(--error-color), var(--warning-color), var(--success-color));
transition: width 0.3s ease;
}
/* Side Panels */
.side-panels {
grid-area: sidebar;
display: flex;
flex-direction: column;
gap: 1rem;
}
.panel {
background: var(--surface-color);
border: 1px solid var(--border-color);
border-radius: 0.5rem;
padding: 1rem;
}
.panel h3 {
font-size: 1rem;
font-weight: 600;
margin-bottom: 1rem;
color: var(--text-primary);
border-bottom: 1px solid var(--border-color);
padding-bottom: 0.5rem;
}
/* Order Book Panel */
.order-book-container {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.section-header {
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.05em;
margin-bottom: 0.5rem;
}
.order-levels {
display: flex;
flex-direction: column;
gap: 2px;
max-height: 150px;
overflow-y: auto;
}
.order-level {
display: flex;
justify-content: space-between;
padding: 0.25rem 0.5rem;
background: var(--surface-light);
border-radius: 0.25rem;
font-size: 0.75rem;
position: relative;
overflow: hidden;
}
.order-level::before {
content: '';
position: absolute;
top: 0;
left: 0;
height: 100%;
background: rgba(59, 130, 246, 0.1);
transition: width 0.3s ease;
}
.order-level.bid::before {
background: rgba(34, 197, 94, 0.1);
}
.order-level.ask::before {
background: rgba(239, 68, 68, 0.1);
}
.spread-indicator {
text-align: center;
padding: 0.5rem;
background: var(--surface-light);
border-radius: 0.25rem;
margin: 0.5rem 0;
}
.spread-value {
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary);
}
/* Exchange Status Panel */
.exchange-list {
display: flex;
flex-direction: column;
gap: 0.5rem;
}
.exchange-item {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0.5rem;
background: var(--surface-light);
border-radius: 0.25rem;
}
.exchange-name {
font-weight: 500;
text-transform: capitalize;
}
.exchange-status {
font-size: 0.75rem;
padding: 0.25rem 0.5rem;
border-radius: 0.25rem;
font-weight: 500;
}
.exchange-status.connected {
background: rgba(34, 197, 94, 0.2);
color: var(--success-color);
}
.exchange-status.disconnected {
background: rgba(239, 68, 68, 0.2);
color: var(--error-color);
}
/* Statistics Panel */
.stats-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 0.5rem;
}
.stat-item {
display: flex;
flex-direction: column;
padding: 0.5rem;
background: var(--surface-light);
border-radius: 0.25rem;
text-align: center;
}
.stat-label {
font-size: 0.75rem;
color: var(--text-secondary);
margin-bottom: 0.25rem;
}
.stat-value {
font-size: 1rem;
font-weight: 600;
color: var(--text-primary);
}
/* Footer */
.dashboard-footer {
background: var(--surface-color);
border-top: 1px solid var(--border-color);
padding: 1rem 2rem;
margin-top: auto;
}
.footer-content {
display: flex;
justify-content: space-between;
align-items: center;
max-width: 1400px;
margin: 0 auto;
font-size: 0.875rem;
color: var(--text-secondary);
}
/* Loading Overlay */
.loading-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(15, 23, 42, 0.9);
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
z-index: 1000;
backdrop-filter: blur(4px);
}
.loading-spinner {
width: 40px;
height: 40px;
border: 4px solid var(--surface-light);
border-top: 4px solid var(--primary-color);
border-radius: 50%;
animation: spin 1s linear infinite;
margin-bottom: 1rem;
}
.loading-text {
font-size: 1rem;
color: var(--text-secondary);
}
/* Modal */
.modal {
display: none;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background: rgba(0, 0, 0, 0.5);
z-index: 1001;
backdrop-filter: blur(4px);
}
.modal.show {
display: flex;
justify-content: center;
align-items: center;
}
.modal-content {
background: var(--surface-color);
border: 1px solid var(--border-color);
border-radius: 0.5rem;
max-width: 400px;
width: 90%;
max-height: 80vh;
overflow-y: auto;
}
.modal-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 1rem 1.5rem;
border-bottom: 1px solid var(--border-color);
}
.modal-header h3 {
margin: 0;
font-size: 1.125rem;
font-weight: 600;
}
.modal-close {
background: none;
border: none;
font-size: 1.5rem;
color: var(--text-secondary);
cursor: pointer;
padding: 0;
width: 24px;
height: 24px;
display: flex;
align-items: center;
justify-content: center;
}
.modal-close:hover {
color: var(--text-primary);
}
.modal-body {
padding: 1.5rem;
}
/* Animations */
@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
@keyframes pulse {
0%, 100% { opacity: 1; }
50% { opacity: 0.5; }
}
/* Responsive Design */
@media (max-width: 1024px) {
.dashboard-main {
grid-template-columns: 1fr;
grid-template-areas:
"selector"
"overview"
"heatmap"
"sidebar";
}
.side-panels {
flex-direction: row;
overflow-x: auto;
}
.panel {
min-width: 250px;
}
}
@media (max-width: 768px) {
.dashboard-main {
padding: 1rem;
gap: 1rem;
}
.header-content {
padding: 0 1rem;
}
.market-overview {
grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.symbol-selector {
flex-direction: column;
align-items: stretch;
gap: 1rem;
}
.exchange-toggles {
justify-content: center;
}
}
/* Utility Classes */
.hidden {
display: none !important;
}
.fade-in {
animation: fadeIn 0.3s ease-in;
}
@keyframes fadeIn {
from { opacity: 0; }
to { opacity: 1; }
}