* { box-sizing: border-box; } :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: #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; } }