529 lines
9.3 KiB
CSS
529 lines
9.3 KiB
CSS
:root {
|
|
--bg-dark: #12161f;
|
|
--bg-panel: #1a202c;
|
|
--bg-card: #222b3c;
|
|
--bg-card-hover: #2b364c;
|
|
--border-color: #2e3a50;
|
|
--text-main: #e2e8f0;
|
|
--text-muted: #94a3b8;
|
|
--accent: #3b82f6;
|
|
--accent-hover: #2563eb;
|
|
--unmapped-pulse: #f59f00;
|
|
}
|
|
|
|
* {
|
|
box-sizing: border-box;
|
|
}
|
|
|
|
body {
|
|
margin: 0;
|
|
padding: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
|
|
background-color: var(--bg-dark);
|
|
color: var(--text-main);
|
|
height: 100vh;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
/* Header */
|
|
.app-header {
|
|
height: 56px;
|
|
background-color: var(--bg-panel);
|
|
border-bottom: 1px solid var(--border-color);
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
padding: 0 16px;
|
|
z-index: 100;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.brand {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 10px;
|
|
font-weight: 700;
|
|
font-size: 1.1rem;
|
|
letter-spacing: -0.5px;
|
|
}
|
|
|
|
.brand-icon {
|
|
color: #fab005;
|
|
font-size: 1.3rem;
|
|
}
|
|
|
|
.progress-container {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 12px;
|
|
background: var(--bg-card);
|
|
padding: 4px 12px;
|
|
border-radius: 20px;
|
|
border: 1px solid var(--border-color);
|
|
}
|
|
|
|
.progress-bar-wrap {
|
|
width: 140px;
|
|
height: 8px;
|
|
background: #334155;
|
|
border-radius: 4px;
|
|
overflow: hidden;
|
|
}
|
|
|
|
.progress-fill {
|
|
height: 100%;
|
|
background: linear-gradient(90deg, #10b981, #3b82f6);
|
|
width: 0%;
|
|
transition: width 0.3s ease;
|
|
}
|
|
|
|
.progress-text {
|
|
font-size: 0.8rem;
|
|
color: var(--text-muted);
|
|
font-weight: 600;
|
|
}
|
|
|
|
.header-actions {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 8px;
|
|
}
|
|
|
|
/* App Main Body */
|
|
.app-body {
|
|
flex: 1;
|
|
display: flex;
|
|
overflow: hidden;
|
|
position: relative;
|
|
}
|
|
|
|
/* Left Canvas Area */
|
|
.canvas-panel {
|
|
flex: 1;
|
|
position: relative;
|
|
background: #0f131a;
|
|
overflow: hidden;
|
|
display: flex;
|
|
flex-direction: column;
|
|
}
|
|
|
|
.canvas-toolbar {
|
|
position: absolute;
|
|
top: 14px;
|
|
left: 14px;
|
|
z-index: 20;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: 8px;
|
|
background: rgba(26, 32, 44, 0.92);
|
|
backdrop-filter: blur(8px);
|
|
padding: 6px 10px;
|
|
border-radius: 8px;
|
|
border: 1px solid var(--border-color);
|
|
box-shadow: 0 4px 16px rgba(0,0,0,0.3);
|
|
}
|
|
|
|
.active-painter-badge {
|
|
display: none;
|
|
align-items: center;
|
|
gap: 8px;
|
|
padding: 4px 10px;
|
|
border-radius: 6px;
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
color: #fff;
|
|
background: #1c7ed6;
|
|
border: 1px solid rgba(255,255,255,0.2);
|
|
box-shadow: 0 0 12px rgba(28, 126, 214, 0.5);
|
|
animation: pulse-border 2s infinite;
|
|
}
|
|
|
|
@keyframes pulse-border {
|
|
0% { box-shadow: 0 0 0 0 rgba(28, 126, 214, 0.6); }
|
|
70% { box-shadow: 0 0 0 8px rgba(28, 126, 214, 0); }
|
|
100% { box-shadow: 0 0 0 0 rgba(28, 126, 214, 0); }
|
|
}
|
|
|
|
.active-painter-badge.active {
|
|
display: flex;
|
|
}
|
|
|
|
.svg-viewport {
|
|
width: 100%;
|
|
height: 100%;
|
|
cursor: grab;
|
|
}
|
|
|
|
.svg-viewport:active {
|
|
cursor: grabbing;
|
|
}
|
|
|
|
.svg-viewport.painter-cursor {
|
|
cursor: crosshair;
|
|
}
|
|
|
|
/* Right Sidebar */
|
|
.sidebar {
|
|
width: 440px;
|
|
background-color: var(--bg-panel);
|
|
border-left: 1px solid var(--border-color);
|
|
display: flex;
|
|
flex-direction: column;
|
|
overflow: hidden;
|
|
flex-shrink: 0;
|
|
z-index: 30;
|
|
}
|
|
|
|
.sidebar-tabs {
|
|
display: flex;
|
|
background: var(--bg-dark);
|
|
border-bottom: 1px solid var(--border-color);
|
|
}
|
|
|
|
.sidebar-tab {
|
|
flex: 1;
|
|
padding: 10px 14px;
|
|
background: none;
|
|
border: none;
|
|
color: var(--text-muted);
|
|
font-weight: 600;
|
|
font-size: 0.88rem;
|
|
cursor: pointer;
|
|
border-bottom: 2px solid transparent;
|
|
transition: all 0.2s;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: center;
|
|
gap: 6px;
|
|
}
|
|
|
|
.sidebar-tab.active {
|
|
color: #fff;
|
|
border-bottom-color: var(--accent);
|
|
background: var(--bg-panel);
|
|
}
|
|
|
|
.sidebar-content {
|
|
flex: 1;
|
|
overflow-y: auto;
|
|
padding: 14px;
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: 12px;
|
|
}
|
|
|
|
/* Panel Header Card */
|
|
.panel-info-card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 8px;
|
|
padding: 12px 14px;
|
|
}
|
|
|
|
.panel-title {
|
|
font-weight: 700;
|
|
font-size: 0.95rem;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
}
|
|
|
|
.panel-subtitle {
|
|
font-size: 0.78rem;
|
|
color: var(--text-muted);
|
|
margin-top: 2px;
|
|
}
|
|
|
|
/* Breakers Grid */
|
|
.breakers-grid {
|
|
display: grid;
|
|
grid-template-columns: 1fr 1fr;
|
|
gap: 8px;
|
|
}
|
|
|
|
.breaker-card {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-color);
|
|
border-radius: 6px;
|
|
padding: 8px 10px;
|
|
cursor: pointer;
|
|
transition: all 0.15s ease;
|
|
position: relative;
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: space-between;
|
|
min-height: 74px;
|
|
user-select: none;
|
|
}
|
|
|
|
.breaker-card:hover {
|
|
background: var(--bg-card-hover);
|
|
border-color: #475569;
|
|
transform: translateY(-1px);
|
|
}
|
|
|
|
.breaker-card.selected-painter {
|
|
border-color: #fff;
|
|
box-shadow: 0 0 12px rgba(255, 255, 255, 0.4);
|
|
}
|
|
|
|
.breaker-card.highlighted-filter {
|
|
outline: 2px solid #38bdf8;
|
|
}
|
|
|
|
.breaker-header {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 4px;
|
|
}
|
|
|
|
.breaker-tag {
|
|
font-weight: 800;
|
|
font-size: 0.95rem;
|
|
padding: 1px 6px;
|
|
border-radius: 4px;
|
|
color: #fff;
|
|
letter-spacing: -0.3px;
|
|
}
|
|
|
|
.breaker-meta {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: 4px;
|
|
font-size: 0.72rem;
|
|
font-weight: 600;
|
|
color: var(--text-muted);
|
|
}
|
|
|
|
.breaker-desc {
|
|
font-size: 0.8rem;
|
|
font-weight: 500;
|
|
color: var(--text-main);
|
|
line-height: 1.25;
|
|
white-space: nowrap;
|
|
overflow: hidden;
|
|
text-overflow: ellipsis;
|
|
}
|
|
|
|
.breaker-footer {
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-top: 6px;
|
|
font-size: 0.72rem;
|
|
}
|
|
|
|
.device-badge {
|
|
background: rgba(255, 255, 255, 0.1);
|
|
padding: 2px 6px;
|
|
border-radius: 10px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Device Inspector Footer Card */
|
|
.device-inspector-panel {
|
|
background: var(--bg-card);
|
|
border-top: 1px solid var(--border-color);
|
|
padding: 14px;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.inspector-title {
|
|
font-size: 0.88rem;
|
|
font-weight: 700;
|
|
display: flex;
|
|
align-items: center;
|
|
justify-content: space-between;
|
|
margin-bottom: 10px;
|
|
}
|
|
|
|
.inspector-field {
|
|
margin-bottom: 8px;
|
|
}
|
|
|
|
.inspector-field label {
|
|
font-size: 0.75rem;
|
|
color: var(--text-muted);
|
|
display: block;
|
|
margin-bottom: 3px;
|
|
font-weight: 600;
|
|
}
|
|
|
|
/* Buttons and Controls */
|
|
.btn-tool {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border-color);
|
|
color: var(--text-main);
|
|
padding: 5px 10px;
|
|
border-radius: 6px;
|
|
font-size: 0.82rem;
|
|
font-weight: 600;
|
|
cursor: pointer;
|
|
display: inline-flex;
|
|
align-items: center;
|
|
gap: 6px;
|
|
transition: all 0.15s;
|
|
}
|
|
|
|
.btn-tool:hover {
|
|
background: var(--bg-card-hover);
|
|
color: #fff;
|
|
border-color: #475569;
|
|
}
|
|
|
|
.btn-tool.active {
|
|
background: var(--accent);
|
|
color: #fff;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
.btn-tool.btn-primary {
|
|
background: var(--accent);
|
|
border-color: var(--accent);
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-tool.btn-primary:hover {
|
|
background: var(--accent-hover);
|
|
}
|
|
|
|
.btn-tool.btn-danger {
|
|
background: #e03131;
|
|
border-color: #e03131;
|
|
color: #fff;
|
|
}
|
|
|
|
.btn-tool.btn-danger:hover {
|
|
background: #c92a2a;
|
|
}
|
|
|
|
.form-select, .form-input {
|
|
background: #0f131a;
|
|
border: 1px solid var(--border-color);
|
|
color: #fff;
|
|
padding: 6px 10px;
|
|
border-radius: 6px;
|
|
font-size: 0.82rem;
|
|
width: 100%;
|
|
}
|
|
|
|
.form-select:focus, .form-input:focus {
|
|
outline: none;
|
|
border-color: var(--accent);
|
|
}
|
|
|
|
/* SVG Stylings */
|
|
.svg-room {
|
|
fill: #141a24;
|
|
stroke: #334155;
|
|
stroke-width: 2px;
|
|
transition: fill 0.2s, stroke 0.2s;
|
|
}
|
|
|
|
.svg-room:hover {
|
|
fill: #1a2332;
|
|
stroke: #475569;
|
|
}
|
|
|
|
.svg-room-label {
|
|
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
|
|
font-size: 32px;
|
|
font-weight: 700;
|
|
fill: #64748b;
|
|
text-anchor: middle;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.svg-subpanel-boundary {
|
|
fill: rgba(59, 130, 246, 0.05);
|
|
stroke: #3b82f6;
|
|
stroke-width: 3px;
|
|
stroke-dasharray: 8 6;
|
|
pointer-events: none;
|
|
}
|
|
|
|
.svg-subpanel-tag {
|
|
font-size: 44px;
|
|
font-weight: 800;
|
|
fill: #60a5fa;
|
|
pointer-events: none;
|
|
text-anchor: middle;
|
|
}
|
|
|
|
/* Device node hover & selection */
|
|
.svg-device {
|
|
cursor: pointer;
|
|
transition: transform 0.15s ease, filter 0.15s ease;
|
|
}
|
|
|
|
.svg-device:hover {
|
|
filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
|
|
}
|
|
|
|
.svg-device.selected {
|
|
filter: drop-shadow(0 0 14px #38bdf8);
|
|
}
|
|
|
|
.svg-device.dimmed {
|
|
opacity: 0.15;
|
|
}
|
|
|
|
.svg-unmapped-halo {
|
|
animation: pulse-ring 2s infinite;
|
|
pointer-events: none;
|
|
}
|
|
|
|
@keyframes pulse-ring {
|
|
0% { opacity: 0.8; transform: scale(1); }
|
|
50% { opacity: 0.3; transform: scale(1.3); }
|
|
100% { opacity: 0.8; transform: scale(1); }
|
|
}
|
|
|
|
.svg-breaker-badge {
|
|
font-size: 20px;
|
|
font-weight: 800;
|
|
font-family: sans-serif;
|
|
fill: #ffffff;
|
|
text-anchor: middle;
|
|
dominant-baseline: central;
|
|
pointer-events: none;
|
|
user-select: none;
|
|
}
|
|
|
|
.svg-circuit-line {
|
|
fill: none;
|
|
stroke-width: 4px;
|
|
stroke-linecap: round;
|
|
stroke-linejoin: round;
|
|
stroke-dasharray: 8 6;
|
|
pointer-events: none;
|
|
}
|
|
|
|
/* Selection Box */
|
|
.selection-box {
|
|
position: absolute;
|
|
border: 1px dashed #38bdf8;
|
|
background-color: rgba(56, 189, 248, 0.15);
|
|
pointer-events: none;
|
|
z-index: 1000;
|
|
}
|
|
|
|
/* Tooltip */
|
|
.device-tooltip {
|
|
position: absolute;
|
|
background: rgba(15, 23, 42, 0.95);
|
|
border: 1px solid #334155;
|
|
border-radius: 6px;
|
|
padding: 8px 12px;
|
|
font-size: 0.8rem;
|
|
color: #fff;
|
|
pointer-events: none;
|
|
z-index: 2000;
|
|
display: none;
|
|
box-shadow: 0 8px 24px rgba(0,0,0,0.5);
|
|
}
|