spaxel/dashboard/css/simulator.css
jedarden 55675943ce refactor(dashboard): complete home page restructure with tokenized live view
Home page (index.html) is now a clean status+cards layout (109 lines):
- Row 1: status headline with ok/warn/alert states
- Row 2: three cards linking to /live#zones, /fleet, /live#timeline
- Row 3: optional briefing, anomaly, security toggle
- Mobile bottom nav for Home/Live/Fleet/Setup

3D viewer lives at /live (live.html), fleet at /fleet, setup at /setup.
All routes served by Go chi router. home-cards.js connects to /ws/dashboard
for snapshot+incremental updates.

Remaining CSS tokenization: live.html buttons and layout.css status bar
now use design tokens instead of hardcoded colors. Added --orange token
for GDOP fair quality. timeline.js gains replay state fields.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-24 15:14:40 -04:00

576 lines
12 KiB
CSS

/**
* Spaxel Dashboard - Pre-Deployment Simulator Styles
*
* Styling for the pre-deployment simulator interface.
*/
/* ============================================
Simulator Panel
============================================ */
.simulator-panel {
position: fixed;
top: 44px; /* Below mode toggle bar */
right: 0;
width: 380px;
max-height: calc(100vh - 44px);
background: var(--bg-page);
border-left: 1px solid var(--slate-5);
overflow-y: auto;
overflow-x: hidden;
z-index: 100;
box-shadow: -2px 0 10px var(--shadow);
}
.simulator-panel::-webkit-scrollbar {
width: 8px;
}
.simulator-panel::-webkit-scrollbar-track {
background: var(--bg-page);
}
.simulator-panel::-webkit-scrollbar-thumb {
background: var(--slate-6);
border-radius: var(--radius-control);
}
.simulator-panel::-webkit-scrollbar-thumb:hover {
background: var(--slate-7);
}
/* ============================================
Simulator Header
============================================ */
.simulator-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: 16px;
border-bottom: 1px solid var(--slate-5);
background: var(--bg-page);
position: sticky;
top: 0;
z-index: 10;
}
.simulator-header h2 {
margin: 0;
font-size: 18px;
font-weight: 600;
color: var(--text-on-accent);
}
.sim-close-btn {
background: none;
border: none;
color: var(--text-muted);
cursor: pointer;
padding: 4px;
border-radius: var(--radius-control);
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s, color 0.2s;
}
.sim-close-btn:hover {
background: var(--slate-5);
color: var(--text-on-accent);
}
/* ============================================
Simulator Sections
============================================ */
.sim-section {
padding: 16px;
border-bottom: 1px solid var(--bg-hover);
}
.sim-section:last-child {
border-bottom: none;
}
.sim-section h3 {
margin: 0 0 12px 0;
font-size: var(--text-sm);
font-weight: 600;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.5px;
}
/* ============================================
Space Controls
============================================ */
.sim-space-controls {
display: flex;
flex-wrap: wrap;
gap: 8px;
margin-bottom: 12px;
}
.sim-space-controls label {
display: flex;
align-items: center;
gap: 4px;
font-size: 13px;
color: var(--slate-11);
}
.sim-space-controls input[type="number"] {
width: 60px;
padding: 4px 8px;
background: var(--bg-hover);
border: 1px solid var(--slate-6);
border-radius: var(--radius-control);
color: var(--text-on-accent);
font-size: 13px;
}
.sim-space-controls input[type="number"]:focus {
outline: none;
border-color: var(--blue-9);
}
/* ============================================
Tool Buttons
============================================ */
.sim-tools {
display: flex;
gap: 4px;
margin-bottom: 12px;
}
.sim-tool-btn {
background: var(--bg-hover);
border: 1px solid var(--slate-6);
border-radius: var(--radius-control);
padding: 8px;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s, border-color 0.2s;
}
.sim-tool-btn:hover {
background: var(--slate-5);
border-color: var(--slate-7);
}
.sim-tool-btn.active {
background: var(--blue-9);
border-color: var(--blue-9);
}
.sim-tool-btn.active svg {
stroke: var(--text-on-accent);
}
.sim-tool-btn svg {
width: 16px;
height: 16px;
stroke: var(--text-muted);
}
/* ============================================
Buttons
============================================ */
.sim-btn {
padding: 8px 12px;
background: var(--bg-hover);
border: 1px solid var(--slate-6);
border-radius: var(--radius-control);
color: var(--slate-11);
font-size: 13px;
cursor: pointer;
transition: background 0.2s, border-color 0.2s, color 0.2s;
}
.sim-btn:hover {
background: var(--slate-5);
border-color: var(--slate-7);
color: var(--text-on-accent);
}
.sim-btn-primary {
background: var(--blue-9);
border-color: var(--blue-9);
color: var(--text-on-accent);
}
.sim-btn-primary:hover {
background: var(--blue-8);
border-color: var(--blue-8);
}
.sim-btn-danger {
background: var(--alert);
border-color: var(--alert);
color: var(--text-on-accent);
}
.sim-btn-danger:hover {
background: var(--alert);
border-color: var(--alert);
}
.sim-btn:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.sim-btn:disabled:hover {
background: var(--bg-hover);
border-color: var(--slate-6);
}
/* ============================================
Item Lists (Nodes/Walkers)
============================================ */
.sim-items-list {
max-height: 200px;
overflow-y: auto;
margin-top: 12px;
}
.sim-item {
display: flex;
align-items: center;
justify-content: space-between;
padding: 8px;
background: var(--bg-hover);
border-radius: var(--radius-control);
margin-bottom: 4px;
}
.sim-item-name {
font-size: 13px;
color: var(--text-on-accent);
}
.sim-item-position {
font-size: 11px;
color: var(--text-muted);
margin-left: 8px;
}
.sim-item-delete {
background: none;
border: none;
color: var(--alert);
font-size: 11px;
cursor: pointer;
padding: 4px 8px;
border-radius: var(--radius-control);
transition: background 0.2s;
}
.sim-item-delete:hover {
background: var(--alert-bg);
}
/* ============================================
Walker Controls
============================================ */
.sim-walker-controls {
display: flex;
gap: 8px;
align-items: center;
margin-bottom: 12px;
}
.sim-walker-controls select {
flex: 1;
padding: 6px 8px;
background: var(--bg-hover);
border: 1px solid var(--slate-6);
border-radius: var(--radius-control);
color: var(--text-on-accent);
font-size: 13px;
}
/* ============================================
GDOP Legend
============================================ */
.sim-gdop-legend {
margin-top: 12px;
padding: 12px;
background: var(--bg-hover);
border-radius: var(--radius-control);
}
.gdop-legend-item {
display: flex;
align-items: center;
margin-bottom: 6px;
}
.gdop-legend-item:last-child {
margin-bottom: 0;
}
.gdop-legend-color {
width: 24px;
height: 12px;
border-radius: var(--radius-control);
margin-right: 8px;
}
.gdop-legend-item[data-quality="excellent"] .gdop-legend-color { background: var(--ok); }
.gdop-legend-item[data-quality="good"] .gdop-legend-color { background: var(--warn); }
.gdop-legend-item[data-quality="fair"] .gdop-legend-color { background: var(--orange); }
.gdop-legend-item[data-quality="poor"] .gdop-legend-color { background: var(--alert); }
.gdop-legend-item[data-quality="none"] .gdop-legend-color { background: var(--slate-7); }
.gdop-legend-label {
font-size: var(--text-xs);
color: var(--slate-11);
}
.gdop-stats {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 12px;
padding-top: 12px;
border-top: 1px solid var(--slate-6);
}
.gdop-stat-item {
font-size: var(--text-xs);
color: var(--text-muted);
}
.gdop-stat-item strong {
color: var(--text-on-accent);
margin-left: 4px;
}
/* ============================================
Simulation Controls
============================================ */
.sim-controls {
display: flex;
gap: 8px;
margin-bottom: 12px;
}
.sim-controls button {
flex: 1;
}
/* ============================================
Progress Bar
============================================ */
.sim-progress {
margin-top: 12px;
}
.sim-progress #sim-time {
font-size: var(--text-xs);
color: var(--text-muted);
margin-bottom: 4px;
display: block;
}
.sim-progress-bar {
width: 100%;
height: 6px;
background: var(--bg-hover);
border-radius: var(--radius-control);
overflow: hidden;
}
.sim-progress-fill {
height: 100%;
background: linear-gradient(90deg, var(--blue-9), var(--blue-9));
transition: width 0.1s linear;
}
/* ============================================
Results Section
============================================ */
.sim-results {
display: flex;
flex-direction: column;
gap: 8px;
}
.sim-result-item {
display: flex;
justify-content: space-between;
padding: 8px;
background: var(--bg-hover);
border-radius: var(--radius-control);
}
.sim-result-label {
font-size: 13px;
color: var(--slate-11);
}
.sim-result-value {
font-size: 13px;
color: var(--text-on-accent);
font-weight: 600;
}
/* ============================================
Recommendations
============================================ */
.sim-recommendations {
display: flex;
flex-direction: column;
gap: 8px;
}
.sim-recommendation {
display: flex;
align-items: flex-start;
gap: 8px;
padding: 10px;
background: var(--bg-hover);
border-radius: var(--radius-control);
border-left: 3px solid var(--slate-7);
}
.sim-rec-priority.high {
border-left-color: var(--alert);
}
.sim-rec-priority.medium {
border-left-color: var(--warn);
}
.sim-rec-priority.low {
border-left-color: var(--ok);
}
.sim-rec-text {
font-size: 13px;
color: var(--slate-11);
flex: 1;
}
/* ============================================
Shopping List
============================================ */
.sim-shopping-list {
display: flex;
flex-direction: column;
gap: 6px;
}
.sim-shopping-item {
display: flex;
justify-content: space-between;
padding: 8px;
background: var(--bg-hover);
border-radius: var(--radius-control);
}
.sim-shopping-item span {
font-size: 13px;
color: var(--slate-11);
}
.sim-shopping-item strong {
color: var(--blue-9);
}
/* ============================================
Empty State
============================================ */
.sim-empty-state {
text-align: center;
padding: 32px 16px;
color: var(--text-muted);
}
.sim-empty-state svg {
width: 48px;
height: 48px;
margin-bottom: 12px;
opacity: 0.5;
}
.sim-empty-state p {
font-size: var(--text-sm);
margin: 0;
}
/* ============================================
Responsive Design
============================================ */
@media (max-width: 768px) {
.simulator-panel {
width: 100%;
max-height: 50vh;
}
.sim-space-controls {
flex-direction: column;
}
.sim-space-controls label {
width: 100%;
justify-content: space-between;
}
.sim-space-controls input[type="number"] {
width: 70px;
}
.sim-controls {
flex-wrap: wrap;
}
.sim-controls button {
min-width: calc(50% - 4px);
}
}
/* ============================================
Animations
============================================ */
@keyframes pulse {
0%, 100% {
opacity: 1;
}
50% {
opacity: 0.5;
}
}
.sim-progress-fill.running {
animation: pulse 1s ease-in-out infinite;
}
/* ============================================
Loading State
============================================ */
.sim-loading {
display: flex;
align-items: center;
justify-content: center;
padding: 32px;
color: var(--text-muted);
}
.sim-loading::after {
content: "";
width: 16px;
height: 16px;
margin-left: 8px;
border: 2px solid var(--blue-9);
border-top-color: transparent;
border-radius: 50%;
animation: spin 0.8s linear infinite;
}
@keyframes spin {
to {
transform: rotate(360deg);
}
}