/* Scoped styles for new SmartPower features; original dashboard CSS untouched. */
.spm-auth,.spm-report,#spm-users-dialog{color:#e5eef9;background:#091522;font:14px/1.55 Inter,Segoe UI,Arial,sans-serif;color-scheme:dark}
.spm-auth,.spm-report{margin:0;min-height:100vh}.spm-auth{display:grid;place-items:center;padding:24px;box-sizing:border-box;background:radial-gradient(ellipse at 15% 0,#123951,#091522 55%)}
.spm-auth-card{width:min(100%,430px);box-sizing:border-box;background:#102131;border:1px solid #244156;padding:32px;border-radius:22px;box-shadow:0 20px 70px #0005}.spm-wide{width:min(100%,620px)}
.spm-brand{font-size:25px;font-weight:900;letter-spacing:2px;color:#e5eef9;text-decoration:none}.spm-brand span,.spm-kicker{color:#34d1e0}.spm-muted{color:#9fb4c8;font-size:13px}.spm-auth h1,.spm-report h1{font-size:27px;line-height:1.2;margin:24px 0 10px}.spm-report h2,#spm-users-dialog h2{font-size:18px;margin:0}.spm-auth a,.spm-report a,#spm-users-dialog a{color:#50d9ec}.spm-auth-footer{border-top:1px solid #284051;padding-top:14px;margin-top:18px}
.spm-form{display:grid;gap:14px;margin:20px 0}.spm-form label,.spm-filters label,#spm-users-dialog label{display:grid;gap:5px;color:#b8c9da;font-size:12px;font-weight:600}.spm-form input,.spm-form select,.spm-filters input,.spm-filters select,#spm-users-dialog input:not([type=checkbox]),#spm-users-dialog select{width:100%;min-width:0;box-sizing:border-box;background:#0a1826;color:#e8f3ff;border:1px solid #304d64;border-radius:8px;padding:10px;font:inherit}.spm-form .spm-inline{display:flex;align-items:center}.spm-form input[type=checkbox]{width:auto}.spm-grid2{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.spm-auth button,.spm-report button,#spm-users-dialog button,.spm-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;cursor:pointer;font:inherit;font-weight:700;border:1px solid #33556a;border-radius:9px;background:#132a3d;color:#e4f3ff;padding:9px 15px;text-decoration:none}.spm-auth .spm-primary,.spm-report .spm-primary,#spm-users-dialog .spm-primary{background:#38cadc;color:#071824;border-color:#38cadc}.spm-auth button:disabled,.spm-report button:disabled,#spm-users-dialog button:disabled{opacity:.45;cursor:not-allowed}.spm-error,.spm-success{border-left:3px solid #f87183;background:#3b2332;padding:10px;color:#ffd8df;border-radius:6px}.spm-success{border-color:#4cd28a;background:#123c33;color:#b3f7d1}
.spm-report-header{padding:20px clamp(18px,3vw,44px);border-bottom:1px solid #233e53;display:flex;justify-content:space-between;align-items:center;gap:16px;background:#0d1d2c;flex-wrap:wrap}.spm-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.spm-actions form{margin:0}.spm-report-main{max-width:1800px;margin:auto;padding:24px clamp(16px,3vw,44px) 48px}.spm-heading{display:flex;align-items:center;justify-content:space-between;gap:14px;flex-wrap:wrap}.spm-heading h1{margin:7px 0}.spm-kicker{font-size:11px;font-weight:800;letter-spacing:1.7px}.spm-filters{display:flex;align-items:end;gap:12px;flex-wrap:wrap;padding:16px;border:1px solid #284255;background:#102131;border-radius:13px;margin:18px 0}.spm-search{flex:1;min-width:190px}.spm-metrics{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:12px;margin:15px 0}.spm-metric,.spm-panel{background:#102131;border:1px solid #284255;border-radius:13px;padding:16px;min-width:0}.spm-metric strong{display:block;font-size:25px;color:#eaf4ff;overflow-wrap:anywhere}.spm-metric span{font-size:12px;color:#a4bacd}.spm-panel{margin:16px 0}.spm-section-head{display:flex;justify-content:space-between;gap:12px;align-items:start;flex-wrap:wrap}.spm-table-wrap{overflow:auto;max-height:65vh;border:1px solid #274052;border-radius:9px}.spm-table{border-collapse:separate;border-spacing:0;width:100%;font-size:12px;color:#d9e7f4}.spm-table th,.spm-table td{padding:10px 12px;border-bottom:1px solid #22384b;text-align:left;white-space:nowrap}.spm-table th{position:sticky;top:0;background:#193346;color:#bcdbec;z-index:1;font-size:11px;text-transform:uppercase;letter-spacing:.3px}.spm-table td.spm-wrap{white-space:normal;min-width:180px;max-width:280px}.spm-table tr:hover td{background:#152b3e}.spm-table td.spm-number{text-align:right;font-variant-numeric:tabular-nums}.spm-status{display:inline-block;padding:3px 8px;border-radius:6px;background:#314154;color:#d9e7f4;font-size:11px;font-weight:800}.spm-status.online,.spm-status.Y{background:#163e32;color:#7af0a5}.spm-status.warning{background:#4b3a16;color:#ffd36a}.spm-status.offline,.spm-status.N{background:#462535;color:#ff94a4}.spm-pager{justify-content:flex-end;margin-top:12px}
#spm-users-dialog{box-sizing:border-box;max-width:min(95vw,1200px);width:1100px;max-height:90vh;overflow:auto;border:1px solid #2c566e;border-radius:18px;padding:22px;box-shadow:0 30px 90px #0008}#spm-users-dialog::backdrop{background:#020811bb;backdrop-filter:blur(4px)}#spm-users-dialog:not([open]){display:none!important}#spm-users-dialog .spm-user-search{width:min(380px,100%)}#spm-users-dialog .spm-toggle{position:relative;display:inline-flex;align-items:center;gap:8px;cursor:pointer}#spm-users-dialog .spm-toggle input{appearance:none;width:40px;height:22px;border-radius:20px;background:#465569;position:relative;cursor:pointer;margin:0}#spm-users-dialog .spm-toggle input:checked{background:#35bd78}#spm-users-dialog .spm-toggle input:before{content:'';position:absolute;left:3px;top:3px;width:16px;height:16px;border-radius:50%;background:white;transition:transform .15s}#spm-users-dialog .spm-toggle input:checked:before{transform:translateX(18px)}#spm-users-dialog .spm-toggle input:disabled{opacity:.4;cursor:not-allowed}#spm-users-dialog .spm-editor{border:1px solid #2b4c60;border-radius:10px;padding:16px;margin-top:16px}#spm-users-dialog [hidden]{display:none!important}.spm-profile-action{display:block;width:100%;text-align:left;cursor:pointer;color:inherit;background:transparent;border:0;padding:10px 14px;font:inherit}
@media(max-width:650px){.spm-grid2{grid-template-columns:1fr}.spm-auth-card{padding:22px}.spm-filters label{flex:1 1 42%}.spm-report-main{padding:16px}.spm-table th,.spm-table td{padding:8px}#spm-users-dialog{padding:13px}}
