:root {color-scheme: light; --ink:#142638; --muted:#718092; --primary:#facc15; --light:#f4f7f9; --line:#e0e7ea; --shadow:0 9px 25px rgba(18,48,63,.06)}
* {box-sizing:border-box}
body {margin:0;color:var(--ink);background:#f6f8fa;font:15px/1.55 system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif}
.wrap {max-width:1120px;margin:0 auto;padding:0 22px}
a {color:#097b70;text-decoration:none} a:hover{text-decoration:underline}
.topbar {background:#fff;border-bottom:1px solid var(--line)}
.topcontent {display:flex;align-items:center;justify-content:space-between;min-height:78px;gap:24px;flex-wrap:wrap}
.brand {display:flex;align-items:center;gap:11px}.brandicon {display:grid;place-items:center;font-size:23px;font-weight:800;color:white;width:43px;height:43px;background:#0f9d83;border-radius:14px}.brand strong {display:block;font-size:19px;line-height:1}.brand small{color:var(--muted);letter-spacing:.2em;font-size:10px;text-transform:uppercase}
nav {display:flex;gap:22px;align-items:center;flex-wrap:wrap;font-size:13px;font-weight:600} nav form {margin:0}
main.wrap {padding-top:37px;padding-bottom:38px;min-height:62vh}
.footer {font-size:12px;color:#8390a0;text-align:center;padding:12px 22px 38px}
.eyebrow {font-size:11px;color:#168d7c;font-weight:800;letter-spacing:.12em}
h1 {font-size:clamp(24px,3.5vw,36px);line-height:1.17;letter-spacing:-.04em;margin:10px 0 12px}
h2 {font-size:19px;letter-spacing:-.02em;margin:0 0 12px}
p {margin:8px 0 16px}.muted {color:var(--muted)}.small {font-size:12px}.note {font-size:12px;color:var(--muted);margin-bottom:0}
.auth-card {width:100%;max-width:460px;margin:30px auto;background:white;padding:32px 34px;border-radius:17px;border:1px solid var(--line);box-shadow:var(--shadow)}
.stack {display:grid;gap:16px;margin-top:24px} label {font-size:13px;font-weight:650;display:grid;gap:6px}input,select {width:100%;padding:12px 13px;background:white;border:1px solid #cad5dd;border-radius:9px;color:var(--ink);font:inherit}input:focus,select:focus {border-color:var(--primary);outline:3px solid #0b8e791e}
button {font:inherit;cursor:pointer;border-radius:9px;padding:11px 15px;border:1px solid transparent;font-weight:650}
button.primary {background:var(--primary);color:#fff}button.primary:hover {background:#07715f}
button.secondary {background:#eff7f5;color:#087a67;border:1px solid #ccebe4}button.secondary:hover {background:#dff3ed}
button.plain {background:transparent;color:#3b5466;padding:6px 2px}button.plain:hover {color:#0b8e79}
button.danger-button {background:#fff1f1;color:#b43e42;border:1px solid #fad1d3;padding:7px 9px;font-size:12px}
.alert {border-radius:10px;padding:12px 14px;background:#fff5f2;border:1px solid #f5d4c8;color:#9c4a37}.alert.ok {background:#eaf9f4;border-color:#b3ead8;color:#147459}
.headline {display:flex;align-items:flex-end;justify-content:space-between;gap:24px;margin-bottom:24px;flex-wrap:wrap}.headline p {margin-bottom:0}.subtle {color:var(--muted);font-size:12px}
.panel {background:white;border:1px solid var(--line);border-radius:16px;padding:24px;box-shadow:var(--shadow)}
.devices {display:grid;gap:18px}.device-head {display:flex;justify-content:space-between;align-items:flex-start;gap:15px}.device-head h2 {margin-bottom:3px}.device-head p {margin:0 0 5px}
.status {font-size:12px;font-weight:750;padding:5px 10px;border-radius:30px;white-space:nowrap}.status.online {background:#e3f8ef;color:#087650}.status.offline {background:#eef1f4;color:#687786}
.metric-grid {display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:13px;margin:18px 0}
.metric {background:#f5f8fa;border-radius:12px;padding:16px;display:grid;gap:5px;min-width:0}.metric-icon{color:#158d7d;font-size:20px}.metric small{font-size:12px;color:#7d8b9b}.metric strong {font-size:clamp(17px,2.7vw,24px);letter-spacing:-.04em}
.device-bottom {display:flex;flex-wrap:wrap;gap:8px 25px;color:#526b7c;font-size:13px;margin:15px 0 20px}.relays{display:flex;flex-wrap:wrap;gap:8px;margin:0 0 15px}.relay{font-size:12px;background:#eef2f6;border-radius:50px;padding:5px 10px}.relay-on{background:#dcf7ed;color:#087d57}
.panel-heading{display:flex;justify-content:space-between;align-items:center;gap:20px}.panel-heading h2{margin:5px 0}
#history-section{margin-top:20px}.chart svg {display:block;width:100%;height:auto}.chart{overflow:hidden;min-height:50px}.legend{display:flex;gap:18px;justify-content:center;font-weight:700;font-size:12px;margin-top:10px}.legend .pv {color:#e59b23}.legend .gridpower {color:#4c7ad2}.legend .battery{color:#159b82}
.columns{display:grid;grid-template-columns:1fr 1fr;gap:18px;margin-bottom:18px}
.table-wrap{overflow:auto}table{border-collapse:collapse;width:100%;text-align:left}th,td{padding:12px;border-bottom:1px solid var(--line);font-size:13px}th{color:var(--muted);font-size:12px;font-weight:700}tr:last-child td{border:0}
.inline{display:inline}.token{margin-bottom:18px;border-color:#8ad3c2;background:#f4fbf7}.token code{display:block;overflow:auto;word-break:break-word;background:white;border:1px solid #c8dfd5;padding:13px;border-radius:9px;margin:14px 0}
[hidden]{display:none!important}
@media(max-width:750px){.metric-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.columns{grid-template-columns:1fr}.topcontent{padding-top:13px;padding-bottom:13px}nav{gap:12px}.auth-card{padding:24px 19px}.device-head{flex-wrap:wrap}}

/* SunSuite Solar Yellow — identite visuelle officielle */
:root { --primary:#facc15; --primary-dark:#eab308; --primary-text:#18181b; --solar-soft:#fef9c3; }
.brandicon {background:#facc15;color:#18181b}
.eyebrow, .metric-icon {color:#a16207}
a {color:#806000} a:hover,button.plain:hover {color:#a16207}
input:focus,select:focus {border-color:#eab308;outline:3px solid #facc1540}
button.primary,.button-link {background:#facc15;color:#18181b}
button.primary:hover,.button-link:hover {background:#eab308;color:#18181b;text-decoration:none}
button.secondary {background:#fef9c3;color:#713f12;border-color:#fde68a}
button.secondary:hover {background:#fef08a}
.token {background:#fffdf0;border-color:#fde047}
.token code {border-color:#fde68a}
.button-link {display:inline-block;padding:10px 16px;border-radius:10px;font-weight:700}
.pair-code {font-size:22px;font-weight:800;letter-spacing:.18em;text-transform:uppercase;text-align:center;font-variant-numeric:tabular-nums}

/* Affectation client par installation */
.assign-form{display:flex;gap:7px;align-items:center;flex-wrap:wrap;margin:0}
.assign-form select{min-width:160px;max-width:250px;padding:8px;font-size:12px}
.assign-form button{padding:8px 10px;font-size:12px}
.visually-hidden{position:absolute!important;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
