433 lines
13 KiB
CSS
433 lines
13 KiB
CSS
/* Reset and Base Styles */
|
|
* {
|
|
margin: 0;
|
|
padding: 0;
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
:root {
|
|
--primary-color: #2563eb;
|
|
--primary-hover: #1d4ed8;
|
|
--secondary-color: #64748b;
|
|
--success-color: #10b981;
|
|
--danger-color: #ef4444;
|
|
--warning-color: #f59e0b;
|
|
--bg-color: #f8fafc;
|
|
--surface-color: #ffffff;
|
|
--text-primary: #0f172a;
|
|
--text-secondary: #64748b;
|
|
--border-color: #e2e8f0;
|
|
--shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
|
|
--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
|
|
}
|
|
|
|
body {
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
background-color: var(--bg-color);
|
|
color: var(--text-primary);
|
|
line-height: 1.6;
|
|
}
|
|
|
|
.screen { min-height: 100vh; }
|
|
.hidden { display: none !important; }
|
|
|
|
/* Login Screen */
|
|
.login-container {
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
min-height: 100vh;
|
|
background: linear-gradient(135deg, #1e3a5f 0%, #2563eb 100%);
|
|
}
|
|
|
|
.login-box {
|
|
background: var(--surface-color);
|
|
padding: 3rem;
|
|
border-radius: 1rem;
|
|
box-shadow: var(--shadow-lg);
|
|
width: 100%;
|
|
max-width: 400px;
|
|
}
|
|
|
|
.login-box h1 { font-size: 2rem; margin-bottom: 0.5rem; text-align: center; }
|
|
.subtitle { text-align: center; color: var(--text-secondary); margin-bottom: 2rem; }
|
|
|
|
/* Header */
|
|
.header {
|
|
background: var(--surface-color);
|
|
padding: 1rem 2rem;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border-bottom: 1px solid var(--border-color);
|
|
box-shadow: var(--shadow);
|
|
}
|
|
|
|
.header-left { display: flex; align-items: center; gap: 1rem; }
|
|
.header h1 { font-size: 1.5rem; color: var(--text-primary); }
|
|
|
|
.device-badge {
|
|
background: #eff6ff;
|
|
color: #1d4ed8;
|
|
padding: 0.25rem 0.75rem;
|
|
border-radius: 1rem;
|
|
font-size: 0.8rem;
|
|
font-weight: 600;
|
|
font-family: monospace;
|
|
border: 1px solid #bfdbfe;
|
|
}
|
|
|
|
.header-right {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1.5rem;
|
|
}
|
|
|
|
.serial-status {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.5rem;
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.status-dot {
|
|
width: 0.5rem;
|
|
height: 0.5rem;
|
|
border-radius: 50%;
|
|
background-color: var(--secondary-color);
|
|
}
|
|
|
|
.status-dot.connected { background-color: var(--success-color); }
|
|
|
|
.user-info { color: var(--text-secondary); font-size: 0.875rem; }
|
|
|
|
.data-last-received {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 0.25rem;
|
|
font-size: 0.875rem;
|
|
color: var(--text-secondary);
|
|
}
|
|
|
|
.data-label { opacity: 0.7; }
|
|
|
|
/* Navigation */
|
|
.nav-tabs {
|
|
background: var(--surface-color);
|
|
border-bottom: 1px solid var(--border-color);
|
|
display: flex;
|
|
padding: 0 2rem;
|
|
gap: 0.5rem;
|
|
}
|
|
|
|
.nav-tab {
|
|
padding: 1rem 1.5rem;
|
|
border: none;
|
|
background: transparent;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
border-bottom: 2px solid transparent;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.nav-tab:hover { color: var(--primary-color); }
|
|
.nav-tab.active { color: var(--primary-color); border-bottom-color: var(--primary-color); }
|
|
|
|
/* Content */
|
|
.content { padding: 2rem; max-width: 1400px; margin: 0 auto; }
|
|
.tab-content { display: none; }
|
|
.tab-content.active { display: block; }
|
|
|
|
/* Stats Grid */
|
|
.stats-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
|
gap: 1.5rem;
|
|
margin-bottom: 2rem;
|
|
}
|
|
|
|
.stat-card {
|
|
background: var(--surface-color);
|
|
padding: 1.5rem;
|
|
border-radius: 0.5rem;
|
|
box-shadow: var(--shadow);
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 1rem;
|
|
}
|
|
|
|
.stat-icon { font-size: 2.5rem; }
|
|
.stat-value { font-size: 2rem; font-weight: 700; color: var(--text-primary); }
|
|
.stat-label { font-size: 0.875rem; color: var(--text-secondary); }
|
|
|
|
/* Panel */
|
|
.panel {
|
|
background: var(--surface-color);
|
|
padding: 1.5rem;
|
|
border-radius: 0.5rem;
|
|
box-shadow: var(--shadow);
|
|
margin-bottom: 1.5rem;
|
|
}
|
|
|
|
.panel h2 { font-size: 1.25rem; margin-bottom: 1rem; color: var(--text-primary); }
|
|
.panel-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
|
|
.panel-header h2 { margin: 0; }
|
|
|
|
/* Device Info */
|
|
.device-info-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
.device-info-item {
|
|
background: var(--bg-color);
|
|
padding: 0.75rem 1rem;
|
|
border-radius: 0.375rem;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.device-info-label { font-size: 0.75rem; color: var(--text-secondary); margin-bottom: 0.25rem; }
|
|
.device-info-value { font-size: 0.95rem; font-family: monospace; color: var(--text-primary); font-weight: 600; }
|
|
|
|
/* Forms */
|
|
.form-group { margin-bottom: 1.5rem; }
|
|
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--text-primary); font-weight: 500; }
|
|
|
|
.form-group input,
|
|
.form-group select {
|
|
width: 100%;
|
|
padding: 0.75rem;
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 0.375rem;
|
|
font-size: 1rem;
|
|
transition: border-color 0.2s;
|
|
}
|
|
|
|
.form-group input:focus,
|
|
.form-group select:focus {
|
|
outline: none;
|
|
border-color: var(--primary-color);
|
|
}
|
|
|
|
.form-row { display: flex; gap: 0.5rem; align-items: center; }
|
|
.form-row input { flex: 1; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 0.375rem; font-size: 1rem; }
|
|
.form-row input:focus { outline: none; border-color: var(--primary-color); }
|
|
.form-row select { min-width: 140px; padding: 0.75rem; border: 1px solid var(--border-color); border-radius: 0.375rem; font-size: 0.9rem; }
|
|
|
|
.radio-group { display: flex; gap: 1.5rem; }
|
|
.radio-label { display: flex; align-items: center; gap: 0.5rem; cursor: pointer; font-weight: 500; color: var(--text-primary); }
|
|
.radio-label input[type="radio"] { width: auto; }
|
|
|
|
/* Buttons */
|
|
.btn {
|
|
padding: 0.75rem 1.5rem;
|
|
border: none;
|
|
border-radius: 0.375rem;
|
|
font-size: 0.9rem;
|
|
font-weight: 500;
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.btn-primary { background-color: var(--primary-color); color: white; }
|
|
.btn-primary:hover { background-color: var(--primary-hover); }
|
|
.btn-secondary { background-color: var(--secondary-color); color: white; }
|
|
.btn-secondary:hover { background-color: #475569; }
|
|
.btn-danger { background-color: var(--danger-color); color: white; }
|
|
.btn-danger:hover { background-color: #dc2626; }
|
|
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
|
|
|
|
/* Messages */
|
|
.message-list { max-height: 600px; overflow-y: auto; }
|
|
|
|
.message-item { padding: 1rem; border-bottom: 1px solid var(--border-color); }
|
|
.message-item:last-child { border-bottom: none; }
|
|
.message-item.outbound { background: #f0f9ff; }
|
|
|
|
.message-header { display: flex; justify-content: space-between; margin-bottom: 0.5rem; align-items: center; }
|
|
.message-from { font-weight: 600; color: var(--text-primary); }
|
|
.message-time { font-size: 0.875rem; color: var(--text-secondary); }
|
|
.message-text { color: var(--text-primary); }
|
|
|
|
.message-meta { margin-top: 0.5rem; font-size: 0.75rem; color: var(--text-secondary); display: flex; gap: 0.75rem; flex-wrap: wrap; }
|
|
|
|
.message-channel {
|
|
display: inline-block;
|
|
padding: 0.125rem 0.5rem;
|
|
color: white;
|
|
border-radius: 0.25rem;
|
|
font-weight: 500;
|
|
font-size: 0.7rem;
|
|
text-transform: uppercase;
|
|
}
|
|
|
|
.message-badge {
|
|
display: inline-block;
|
|
padding: 0.125rem 0.5rem;
|
|
border-radius: 0.25rem;
|
|
font-size: 0.7rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.badge-direct { background: #eff6ff; color: #1d4ed8; }
|
|
.badge-channel { background: #f0fdf4; color: #166534; }
|
|
.badge-delivered { background: #d1fae5; color: #065f46; }
|
|
|
|
/* Contacts Grid */
|
|
.nodes-grid {
|
|
display: grid;
|
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
|
gap: 1rem;
|
|
}
|
|
|
|
.node-card {
|
|
background: var(--bg-color);
|
|
padding: 1rem;
|
|
border-radius: 0.5rem;
|
|
border: 1px solid var(--border-color);
|
|
cursor: pointer;
|
|
transition: all 0.2s;
|
|
}
|
|
|
|
.node-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
|
|
.node-card.favourite { border-color: #fbbf24; background: #fffbeb; }
|
|
|
|
.node-card-header { display: flex; justify-content: space-between; align-items: start; margin-bottom: 0.75rem; }
|
|
.node-name { font-weight: 600; color: var(--text-primary); }
|
|
.node-id { font-size: 0.75rem; color: var(--text-secondary); font-family: monospace; }
|
|
|
|
.node-badge {
|
|
padding: 0.25rem 0.5rem;
|
|
border-radius: 0.25rem;
|
|
font-size: 0.75rem;
|
|
font-weight: 500;
|
|
}
|
|
|
|
.node-badge.online { background-color: #d1fae5; color: #065f46; }
|
|
.node-badge.offline { background-color: #fee2e2; color: #991b1b; }
|
|
.node-badge.type-chat { background: #eff6ff; color: #1d4ed8; }
|
|
.node-badge.type-repeater { background: #f0fdf4; color: #166534; }
|
|
.node-badge.type-room { background: #fdf4ff; color: #7e22ce; }
|
|
.node-badge.type-sensor { background: #fff7ed; color: #9a3412; }
|
|
|
|
.node-info { font-size: 0.875rem; color: var(--text-secondary); }
|
|
.node-info-row { display: flex; justify-content: space-between; margin-bottom: 0.25rem; }
|
|
|
|
/* Ports List */
|
|
.ports-list { margin-top: 1rem; }
|
|
.port-item { display: flex; align-items: center; gap: 1rem; padding: 0.5rem 0; border-bottom: 1px solid var(--border-color); font-family: monospace; font-size: 0.9rem; }
|
|
|
|
/* Map */
|
|
.map-container { height: 600px; border-radius: 0.5rem; overflow: hidden; margin-bottom: 1rem; }
|
|
.map-controls { display: flex; gap: 0.5rem; }
|
|
|
|
/* Modal */
|
|
.modal {
|
|
position: fixed; top: 0; left: 0; width: 100%; height: 100%;
|
|
background: rgba(0,0,0,0.5); display: flex; justify-content: center; align-items: center; z-index: 1000;
|
|
}
|
|
|
|
.modal-content {
|
|
background: var(--surface-color); padding: 2rem; border-radius: 0.5rem;
|
|
max-width: 600px; width: 90%; max-height: 80vh; overflow-y: auto; position: relative;
|
|
}
|
|
|
|
.modal-close { position: absolute; top: 1rem; right: 1rem; font-size: 1.5rem; cursor: pointer; color: var(--text-secondary); }
|
|
.modal-close:hover { color: var(--text-primary); }
|
|
.node-detail { margin-top: 1rem; }
|
|
|
|
.detail-row { display: flex; justify-content: space-between; padding: 0.75rem 0; border-bottom: 1px solid var(--border-color); }
|
|
.detail-label { font-weight: 500; color: var(--text-secondary); }
|
|
.detail-value { color: var(--text-primary); font-family: monospace; word-break: break-all; max-width: 60%; text-align: right; }
|
|
|
|
/* Error / Success */
|
|
.error-message { color: var(--danger-color); font-size: 0.875rem; margin-top: 0.5rem; margin-bottom: 1rem; }
|
|
.success-message { color: var(--success-color); font-size: 0.875rem; margin-top: 0.5rem; }
|
|
|
|
/* Empty State */
|
|
.empty-state { text-align: center; padding: 3rem; color: var(--text-secondary); }
|
|
.empty-state-icon { font-size: 3rem; margin-bottom: 1rem; }
|
|
|
|
/* Notification */
|
|
.notification {
|
|
position: fixed; top: 1rem; right: 1rem; padding: 1rem 1.5rem;
|
|
border-radius: 0.5rem; box-shadow: var(--shadow-lg); z-index: 2000;
|
|
max-width: 350px; animation: slideIn 0.3s ease;
|
|
}
|
|
|
|
.notification.success { background: #d1fae5; color: #065f46; border-left: 4px solid var(--success-color); }
|
|
.notification.warning { background: #fef3c7; color: #92400e; border-left: 4px solid var(--warning-color); }
|
|
.notification.error { background: #fee2e2; color: #991b1b; border-left: 4px solid var(--danger-color); }
|
|
.notification.info { background: #eff6ff; color: #1e40af; border-left: 4px solid var(--primary-color); }
|
|
|
|
@keyframes slideIn {
|
|
from { transform: translateX(100%); opacity: 0; }
|
|
to { transform: translateX(0); opacity: 1; }
|
|
}
|
|
|
|
/* Responsive */
|
|
@media (max-width: 768px) {
|
|
.header { flex-direction: column; gap: 1rem; align-items: flex-start; }
|
|
.header-right { width: 100%; justify-content: space-between; }
|
|
.nav-tabs { overflow-x: auto; padding: 0 1rem; }
|
|
.content { padding: 1rem; }
|
|
.stats-grid { grid-template-columns: 1fr; }
|
|
.form-row { flex-direction: column; }
|
|
.form-row select { width: 100%; }
|
|
.nodes-grid { grid-template-columns: 1fr; }
|
|
}
|
|
|
|
/* Scrollbar */
|
|
::-webkit-scrollbar { width: 8px; height: 8px; }
|
|
::-webkit-scrollbar-track { background: var(--bg-color); }
|
|
::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 4px; }
|
|
::-webkit-scrollbar-thumb:hover { background: var(--secondary-color); }
|
|
|
|
/* Loading */
|
|
.loading {
|
|
display: inline-block; width: 1rem; height: 1rem;
|
|
border: 2px solid var(--border-color); border-top-color: var(--primary-color);
|
|
border-radius: 50%; animation: spin 0.8s linear infinite;
|
|
}
|
|
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
|
|
@keyframes markerPulse {
|
|
0% { transform: scale(1); box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 0 0 0 rgba(255,255,255,0.7); }
|
|
50% { transform: scale(1.6); box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 0 0 10px rgba(255,255,255,0); }
|
|
100% { transform: scale(1); box-shadow: 0 2px 4px rgba(0,0,0,0.3), 0 0 0 0 rgba(255,255,255,0); }
|
|
}
|
|
|
|
.settings-form { max-width: 400px; }
|
|
|
|
/* Message filter tabs */
|
|
.msg-filter-tabs {
|
|
display: flex;
|
|
gap: 0.25rem;
|
|
background: var(--bg-color);
|
|
padding: 0.25rem;
|
|
border-radius: 0.375rem;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.msg-filter-btn {
|
|
padding: 0.375rem 0.75rem;
|
|
border: none;
|
|
background: transparent;
|
|
border-radius: 0.25rem;
|
|
font-size: 0.8rem;
|
|
font-weight: 500;
|
|
color: var(--text-secondary);
|
|
cursor: pointer;
|
|
transition: all 0.15s;
|
|
white-space: nowrap;
|
|
}
|
|
|
|
.msg-filter-btn:hover { color: var(--primary-color); }
|
|
.msg-filter-btn.active { background: var(--surface-color); color: var(--primary-color); box-shadow: var(--shadow); }
|