rifacimento grafic

This commit is contained in:
alberto committed 2026-04-11 20:00:45 +02:00
1 parent 48a6aee18f
commit b52e14b965
3 files changed
+777 -217

No files matched your search

+449 -51
View File
@@ -1,54 +1,452 @@
* {
box-sizing: border-box;
}
*{box-sizing:border-box}
:root{ /* light */
--bg:#f5f7fb;
--panel:#ffffff;
--card:#ffffff;
--muted:#475569;
--text:#0f172a;
--accent:#ca8a04;
--border:#e5e7eb;
--btn:#0f172a;
--btn-hover:#1f2937;
--axis:#94a3b8;
--split:#e5e7eb;
:root {
--bg: #f3f5f7;
--surface: #ffffff;
--surface-2: #f8fafb;
--text: #131619;
--muted: #5d6773;
--border: #d9dee5;
--primary: #176b5c;
--primary-strong: #0f5147;
--voltage: #2f7dd1;
--power: #168a60;
--energy: #b7790f;
--danger: #b42318;
--danger-bg: #fff1f0;
--btn-text: #ffffff;
--shadow: 0 16px 40px rgba(19, 22, 25, 0.08);
--axis: #7b8794;
--split: #e4e8ed;
}
:root[data-theme="dark"]{
--bg:#0b1220;
--panel:#0f172a;
--card:#111827;
--muted:#94a3b8;
--text:#e5e7eb;
--accent:#facc15;
--border:#1f2937;
--btn:#1f2937;
--btn-hover:#374151;
--axis:#334155;
--split:#1f2937;
:root[data-theme="dark"] {
--bg: #101114;
--surface: #181a1f;
--surface-2: #202329;
--text: #f2f4f7;
--muted: #a9b1bc;
--border: #333842;
--primary: #26b895;
--primary-strong: #46d0ac;
--voltage: #62a7e8;
--power: #39c98e;
--energy: #d89a28;
--danger: #ff7166;
--danger-bg: #321f21;
--btn-text: #07110e;
--shadow: 0 16px 40px rgba(0, 0, 0, 0.22);
--axis: #687380;
--split: #2b3038;
}
html,
body {
min-height: 100%;
}
body {
margin: 0;
background: var(--bg);
color: var(--text);
font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
letter-spacing: 0;
}
button,
input,
select {
font: inherit;
}
.page-shell {
width: min(100%, 1320px);
margin: 0 auto;
padding: 22px;
}
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
gap: 16px;
padding: 18px 0 20px;
}
.brand,
.topbar-meta,
.control-actions,
.chart-header,
.statusbar {
display: flex;
align-items: center;
}
.brand {
gap: 12px;
min-width: 0;
}
.logo {
width: 44px;
height: 44px;
border: 1px solid var(--border);
border-radius: 8px;
background: #101114;
flex: 0 0 auto;
}
h1,
h2,
p {
margin: 0;
}
h1 {
font-size: 30px;
line-height: 1.05;
font-weight: 760;
}
h2 {
font-size: 18px;
line-height: 1.25;
font-weight: 720;
}
.eyebrow {
color: var(--primary-strong);
font-size: 12px;
font-weight: 760;
line-height: 1.4;
text-transform: uppercase;
}
.topbar-meta {
gap: 10px;
flex-wrap: wrap;
justify-content: flex-end;
}
.state-pill {
min-width: 92px;
padding: 7px 10px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
color: var(--muted);
font-size: 13px;
font-weight: 700;
text-align: center;
}
.state-pill.is-ok {
border-color: var(--primary);
color: var(--primary-strong);
}
.state-pill.is-loading {
border-color: var(--energy);
color: var(--energy);
}
.state-pill.is-error {
border-color: var(--danger);
color: var(--danger);
}
.summary-grid {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 14px;
}
.metric-card,
.control-panel,
.chart-panel {
border: 1px solid var(--border);
border-radius: 8px;
background: var(--surface);
box-shadow: var(--shadow);
}
.metric-card {
min-height: 158px;
padding: 18px;
position: relative;
overflow: hidden;
}
.metric-card::before {
content: "";
position: absolute;
inset: 0 auto 0 0;
width: 5px;
background: var(--primary);
}
.metric-voltage::before {
background: var(--voltage);
}
.metric-power::before {
background: var(--power);
}
.metric-energy::before {
background: var(--energy);
}
.metric-label {
color: var(--muted);
font-size: 13px;
font-weight: 700;
}
.metric-value {
margin-top: 12px;
color: var(--text);
font-size: 44px;
font-weight: 780;
line-height: 1;
}
.metric-value small {
color: var(--muted);
font-size: 18px;
font-weight: 650;
}
.metric-meta {
margin-top: 14px;
min-height: 32px;
color: var(--muted);
font-size: 12px;
line-height: 1.35;
overflow-wrap: anywhere;
}
.control-panel {
margin-top: 14px;
padding: 16px;
}
.control-heading {
display: flex;
justify-content: space-between;
gap: 14px;
margin-bottom: 14px;
}
.control-actions {
gap: 8px;
flex-wrap: wrap;
justify-content: flex-end;
}
.controls {
display: grid;
grid-template-columns: minmax(220px, 1.6fr) minmax(170px, 1.1fr) repeat(5, minmax(112px, 0.8fr)) minmax(126px, 0.7fr);
gap: 10px;
align-items: end;
}
label {
min-width: 0;
color: var(--muted);
font-size: 12px;
font-weight: 700;
}
label span {
display: block;
margin-bottom: 6px;
overflow-wrap: anywhere;
}
input,
select {
width: 100%;
min-height: 40px;
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface-2);
color: var(--text);
outline: none;
}
input:focus,
select:focus {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(38, 184, 149, 0.22);
}
button {
min-height: 40px;
padding: 8px 14px;
border: 1px solid var(--primary);
border-radius: 6px;
background: var(--primary);
color: var(--btn-text);
cursor: pointer;
font-weight: 760;
}
button:hover {
background: var(--primary-strong);
border-color: var(--primary-strong);
}
.secondary-button,
.ghost-button {
background: transparent;
color: var(--text);
border-color: var(--border);
}
.secondary-button:hover,
.ghost-button:hover {
background: var(--surface-2);
border-color: var(--primary);
}
.switch {
display: flex;
align-items: center;
gap: 10px;
min-height: 40px;
padding: 8px 10px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface-2);
}
.switch span {
margin: 0;
}
.switch input {
width: 18px;
min-height: 18px;
accent-color: var(--primary);
}
.banner {
margin-top: 12px;
padding: 10px 12px;
border: 1px solid var(--danger);
border-radius: 6px;
background: var(--danger-bg);
color: var(--danger);
font-size: 13px;
font-weight: 650;
overflow-wrap: anywhere;
}
.chart-grid {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 14px;
margin-top: 14px;
}
.chart-panel {
min-width: 0;
padding: 16px;
}
.chart-wide {
grid-column: 1 / -1;
}
.chart-header {
justify-content: space-between;
gap: 12px;
margin-bottom: 8px;
}
.tz-note {
max-width: 230px;
color: var(--muted);
font-size: 12px;
line-height: 1.35;
text-align: right;
}
.chart-fixed {
width: 100%;
height: 320px;
}
.chart-large {
height: 340px;
}
.statusbar {
gap: 14px;
flex-wrap: wrap;
margin-top: 14px;
padding-bottom: 4px;
color: var(--muted);
font-size: 12px;
line-height: 1.4;
}
.statusbar span {
overflow-wrap: anywhere;
}
@media (max-width: 1180px) {
.controls {
grid-template-columns: repeat(4, minmax(0, 1fr));
}
}
@media (max-width: 820px) {
.page-shell {
padding: 16px;
}
.topbar,
.control-heading,
.chart-header {
align-items: flex-start;
flex-direction: column;
}
.topbar-meta,
.control-actions {
justify-content: flex-start;
}
.summary-grid,
.chart-grid,
.controls {
grid-template-columns: 1fr;
}
h1 {
font-size: 28px;
}
.metric-card {
min-height: 140px;
}
.metric-value {
font-size: 38px;
}
.tz-note {
max-width: none;
text-align: left;
}
.chart-fixed,
.chart-large {
height: 280px;
}
}
html,body{height:100%}
body{margin:0;font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Helvetica,Arial,sans-serif;background:var(--bg);color:var(--text)}
.container{max-width:1150px;margin:0 auto;padding:18px}
header{display:flex;flex-direction:column;gap:12px;margin-bottom:14px}
.brand{display:flex;align-items:center;gap:10px}
h1{margin:0;font-size:24px;letter-spacing:.3px}
.logo{width:28px;height:28px;border-radius:6px}
.controls{display:flex;flex-wrap:wrap;gap:10px;background:var(--panel);padding:10px;border-radius:12px;border:1px solid var(--border)}
label{font-size:12px;color:var(--muted);display:flex;align-items:center;gap:8px}
input,select,button{padding:8px 10px;border:1px solid var(--border);border-radius:10px;font-size:14px;background:var(--card);color:var(--text)}
button{background:var(--btn);cursor:pointer;color:#fff}
button:hover{background:var(--btn-hover)}
.banner{background:#3f1d1d;color:#fecaca;border:1px solid #7f1d1d;padding:10px 12px;border-radius:10px}
.cards{display:grid;grid-template-columns:repeat(3,1fr);gap:12px;margin:12px 0}
.card{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:14px;box-shadow:0 1px 2px rgba(0,0,0,.1)}
.card-title{font-size:12px;color:var(--muted)}
.card-value{font-size:30px;font-weight:700;margin-top:6px;color:var(--text)}
.card-value small{font-weight:400;color:var(--muted)}
.card-ts{font-size:11px;color:var(--muted);margin-top:6px}
.chart-block{background:var(--panel);border:1px solid var(--border);border-radius:14px;padding:14px;margin-top:12px}
.chart-header{display:flex;justify-content:space-between;align-items:center;gap:8px;margin-bottom:6px}
.tz-note{font-size:12px;color:var(--muted)}
.chart-fixed{height:280px;width:100%}
footer{margin-top:12px;font-size:12px;color:var(--muted);display:flex;gap:16px;align-items:center;flex-wrap:wrap}
.switch{display:flex;align-items:center;gap:6px}
.theme button{border-color:var(--accent)}