.electricity-title { display:flex; align-items:center; gap:8px; }
.electricity-title > .material-symbols-rounded { color:#d9026f; font-size:26px; }
.electricity-sections { display:flex; flex-wrap:wrap; gap:4px; border-bottom:1px solid #eee8e2; padding-bottom:12px; margin-bottom:20px; }
.electricity-sections button { border:0; border-radius:6px; padding:8px 11px; background:transparent; color:#73685f; font:inherit; font-size:12px; cursor:pointer; }
.electricity-sections button[aria-pressed=true] { background:#fff0f6; color:#c00262; font-weight:600; }
.electricity-panel [hidden] { display:none !important; }
.electricity-panel [data-smart-plugs] { min-width:0; }
.smart-heading { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; margin-bottom:12px; }
.smart-heading h3, [data-smart-plugs] h3 { font-size:15px; margin:0; font-weight:600; }
[data-smart-plugs] button { font:inherit; font-size:12px; color:#69513c; border:1px solid #e6ddd4; border-radius:6px; background:#fff; padding:8px 12px; cursor:pointer; min-height:36px; }
[data-smart-plugs] button:disabled { opacity:.55; cursor:wait; }
[data-smart-plugs] .smart-primary { background:var(--accent-gradient,linear-gradient(135deg,#ff3d1f,#d9026f)); color:white; border:0; }
[data-smart-plugs] button:focus-visible,.electricity-sections button:focus-visible { outline:2px solid #d9026f; outline-offset:3px; }
.smart-help { margin:8px 0 14px; font-size:11px; line-height:1.65; color:#827770; }
.smart-message:not(:empty) { padding:10px 12px; background:#fff0f6; color:#9d376b; font-size:12px; border-radius:6px; margin-bottom:14px; overflow-wrap:anywhere; }
.smart-message.is-error { background:#fff2eb; color:#9c3729; }
.smart-plug { border:1px solid #f0e7e5; border-radius:8px; margin:14px 0; overflow:hidden; }
.smart-plug-header { display:flex; align-items:center; gap:10px; padding:15px; flex-wrap:wrap; }
.smart-plug-icon { display:grid; place-items:center; background:#fff0f6; border-radius:6px; width:35px; height:35px; color:#d9026f; }
.smart-plug-title { flex:1; min-width:130px; overflow-wrap:anywhere; }
.smart-plug-title strong { display:block; font-size:14px; }
.smart-plug-title small { color:#827770; font-size:11px; }
.smart-status { font-size:11px; color:#827770; }
.smart-status.is-online { color:#31614e; }
.smart-values { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:10px; padding:0 15px 15px; }
.smart-values span { display:block; color:#827770; font-size:10px; }
.smart-values strong { display:block; margin-top:4px; font-size:18px; font-weight:600; color:#392331; font-variant-numeric:tabular-nums; }
.smart-plan { display:flex; justify-content:space-between; align-items:center; gap:10px; flex-wrap:wrap; background:linear-gradient(115deg,#fff2eb,#fff0f8); padding:12px 15px; border-top:1px solid #f8d6e4; }
.smart-plan strong { font-size:12px; color:#b9055c; }
.smart-plan p { margin:3px 0 0; font-size:11px; color:#926170; }
.smart-actions { display:flex; flex-wrap:wrap; gap:8px; }
.smart-plug-foot { padding:10px 15px; }
.smart-plug-foot p { margin:4px 0; }
.smart-plug-foot details { font-size:11px; color:#827770; margin-top:8px; }
.smart-plug-foot li { padding:5px 0; }
.smart-editor { margin:15px 0; padding:15px; border:1px solid #e6ddd4; border-radius:8px; background:#fbf8f7; }
.smart-fields { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; margin:14px 0; }
[data-smart-plugs] label { display:grid; gap:6px; font-size:12px; color:#5d5046; }
[data-smart-plugs] input,[data-smart-plugs] select { width:100%; min-width:0; padding:9px; font:inherit; font-size:12px; border:1px solid #e6ddd4; border-radius:6px; background:#fff; color:#534a42; }
.smart-usage-table { width:100%; border-collapse:collapse; font-size:11px; table-layout:fixed; }
.smart-usage-table th,.smart-usage-table td { padding:8px 4px; text-align:right; border-bottom:1px solid #eee8e2; overflow-wrap:anywhere; }
.smart-usage-table th:first-child,.smart-usage-table td:first-child { text-align:left; }
.smart-usage-card { margin:16px 0; }
.smart-usage-card h4 { font-size:13px; margin:0 0 10px; }
.smart-usage-card .smart-values { padding:0 0 12px; }
@media(max-width:480px){ .electricity-sections{gap:1px} .electricity-sections button{padding:8px;font-size:11px} .smart-fields{grid-template-columns:1fr} [data-smart-plugs] input,[data-smart-plugs] select{font-size:16px} .smart-values strong{font-size:16px} [data-smart-plugs] button{min-height:44px} }

.smart-plug-header { flex-wrap:nowrap; align-items:flex-start; }
.smart-plug-title { min-width:0; gap:0; }
.smart-card-controls { flex-wrap:nowrap; margin-left:auto; flex-shrink:0; align-items:center; }
[data-smart-plugs] .smart-toggle { display:flex; align-items:center; gap:5px; font-weight:600; }
[data-smart-plugs] .smart-toggle.is-on { background:var(--accent-gradient); border-color:transparent; color:#fff; }
[data-smart-plugs] .smart-toggle.is-off { background:#eee8e2; border-color:#dfd5cb; color:#69513c; }
[data-smart-plugs] .smart-settings-icon { display:grid; place-items:center; padding:6px; width:36px; }
.smart-card-controls .material-symbols-rounded { font-size:20px; }
@media(max-width:380px){ .smart-plug-header{gap:7px;padding:12px}  }

.smart-plug-icon { position:relative; flex-shrink:0; }
.smart-online-dot { position:absolute; top:-3px; right:-3px; width:10px; height:10px; border:2px solid white; border-radius:50%; background:#aaa29c; }
.smart-online-dot.is-online { background:#3aa76d; }
[data-smart-plugs] .smart-card-controls button { display:grid; place-items:center; width:36px; padding:6px; }
[data-smart-plugs] .smart-automation.is-running { background:var(--accent-gradient); color:#fff; border-color:transparent; }
.smart-device-summary { flex-wrap:nowrap; justify-content:flex-start; gap:16px; }
.smart-power-inline { flex-shrink:0; display:flex; flex-direction:column; gap:0; }
.smart-power-inline > span { font-size:10px; color:#827770; }
.smart-power-inline > strong { font-size:18px; color:#392331; white-space:nowrap; font-variant-numeric:tabular-nums; }
.smart-schedule-inline { min-width:0; border-left:1px solid #f3d5df; padding-left:16px; overflow-wrap:anywhere; }
.smart-activity { margin-top:18px; font-size:11px; color:#827770; }
.smart-activity li { padding:5px 0; }
@media(max-width:380px){ .smart-card-controls{gap:4px} }

.smart-plug [data-smart-editor] .smart-editor { margin:0; border:0; border-top:1px solid #f0dce5; border-radius:0; }
[data-smart-plugs] .smart-all-day { display:flex; align-items:center; gap:8px; grid-column:1 / -1; }
[data-smart-plugs] .smart-all-day input { width:17px; height:17px; margin:0; accent-color:#d9026f; }
[data-smart-plugs] .smart-refresh { display:grid; place-items:center; padding:6px; width:40px; }
.smart-refresh.is-refreshing .material-symbols-rounded { animation:smart-refresh-spin 1s linear infinite; }
@keyframes smart-refresh-spin { to { transform:rotate(360deg); } }
@media(prefers-reduced-motion:reduce){ .smart-refresh.is-refreshing .material-symbols-rounded{animation:none} }

.smart-plug-identity { display:flex; align-items:center; gap:14px; flex:1; min-width:0; }
.smart-plug-identity .smart-power-inline { text-align:right; }
@media(max-width:480px){
    .smart-plug-header { display:grid; grid-template-columns:35px minmax(0,1fr) auto; align-items:center; gap:8px 10px; padding:12px; }
    .smart-plug-identity { display:contents; }
    .smart-plug-identity > .smart-plug-title { grid-column:2; grid-row:1 / span 2; align-self:center; }
    .smart-plug-identity > .smart-power-inline { grid-column:3; grid-row:2; justify-self:end; }
    .smart-plug-header > .smart-plug-icon { grid-column:1; grid-row:1 / span 2; align-self:center; }
    .smart-plug-header > .smart-card-controls { grid-column:3; grid-row:1; justify-self:end; gap:4px; margin:0; }
    .smart-plug-title > strong { line-height:1.25; }
    .smart-plan { padding:12px; }
    .smart-plan > div { min-width:0; max-width:100%; overflow-wrap:anywhere; }
}

.smart-plug-title { display:flex; flex-direction:column; justify-content:center; gap:0; }
.smart-plug-title > strong, .smart-plug-title > small,
.smart-power-inline > span, .smart-power-inline > strong { display:block; margin:0; padding:0; line-height:1.15; }

.smart-plug-title > small, .smart-power-inline > span { margin-top:3px; }

.smart-sharing { margin:18px 0; padding:16px; border:1px solid #f0dce5; border-radius:8px; background:#fff8fb; }
.smart-share-person, .smart-share-form { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-top:12px; }
.smart-share-person > span { font-size:13px; overflow-wrap:anywhere; min-width:0; }
.smart-share-form { align-items:end; flex-wrap:wrap; }
.smart-share-form > label { flex:1; min-width:140px; }

.smart-editor-tabs { display:flex; gap:6px; border-bottom:1px solid #eadfe4; padding-bottom:10px; margin-bottom:12px; }
[data-smart-plugs] .smart-editor-tabs button[aria-pressed=true] { background:var(--accent-gradient); color:white; border-color:transparent; }

.smart-timer-settings { border-top:1px solid #e8dbe1; margin-top:16px; padding-top:16px; }
.smart-timer-settings h4 { margin:0 0 12px; font-size:13px; }

.smart-usage-card { margin:12px 0; border:1px solid #eee0e6; border-radius:10px; overflow:hidden; background:#fff; }
.smart-usage-header { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:16px 16px 12px; }
.smart-usage-header > div { min-width:0; }
.smart-usage-header h4 { margin:0; font-size:14px; overflow-wrap:anywhere; }
.smart-usage-room { display:block; margin-top:3px; font-size:11px; color:#827770; }
.smart-usage-badge { flex-shrink:0; border-radius:20px; padding:4px 8px; background:#fff2e8; color:#926047; font-size:10px; }
.smart-usage-totals { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:12px; padding:0 16px 14px; }
.smart-usage-totals > div { min-width:0; padding:12px; border-radius:8px; background:#fcf5f8; }
.smart-usage-totals > div > span { display:block; font-size:11px; color:#827770; }
.smart-usage-totals strong { display:block; margin-top:5px; font-size:21px; line-height:1.3; color:#392331; font-variant-numeric:tabular-nums; overflow-wrap:anywhere; }
.smart-usage-totals small { font-size:12px; font-weight:400; white-space:nowrap; }
.smart-usage-meta { display:flex; flex-wrap:wrap; justify-content:space-between; gap:5px 12px; padding:0 16px 14px; font-size:10px; color:#827770; }
.smart-usage-note { margin:0 16px 14px; font-size:11px; line-height:1.5; color:#926047; }
.smart-usage-days { border-top:1px solid #f0e6eb; padding:0 16px; }
.smart-usage-days summary { padding:12px 0; cursor:pointer; font-size:12px; color:#69513c; }
.smart-usage-days summary span { float:right; color:#827770; font-size:11px; }
.smart-usage-days .smart-usage-table { margin-bottom:12px; }
.smart-usage-empty { padding:12px 16px; margin:0; border-top:1px solid #f0e6eb; font-size:11px; color:#827770; }
@media(max-width:380px){ .smart-usage-totals{gap:8px} .smart-usage-totals > div{padding:10px} .smart-usage-totals strong{font-size:18px} }

.smart-plug-icon svg, .smart-icon-choice svg { width:24px; height:24px; fill:none; stroke:currentColor; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.smart-icon-picker { grid-column:1 / -1; margin:0; padding:0; border:0; min-width:0; }
.smart-icon-picker legend { margin-bottom:10px; font-size:12px; color:#5d5046; }
.smart-icon-picker > div { display:grid; grid-template-columns:repeat(auto-fit,minmax(85px,1fr)); gap:8px; }
[data-smart-plugs] .smart-icon-choice { position:relative; display:block; cursor:pointer; }
[data-smart-plugs] .smart-icon-choice input { position:absolute; width:1px; height:1px; opacity:0; padding:0; }
.smart-icon-choice > span { display:flex; flex-direction:column; align-items:center; justify-content:center; gap:7px; min-height:78px; padding:8px 4px; border:1px solid #e6ddd4; border-radius:8px; color:#827770; background:#fff; }
.smart-icon-choice small { font-size:10px; line-height:1.25; text-align:center; }
.smart-icon-choice input:checked + span { border-color:#d9026f; color:#c00262; background:#fff0f6; }
.smart-icon-choice input:focus-visible + span { outline:2px solid #d9026f; outline-offset:2px; }

.smart-countdown-controls { display:flex; flex-wrap:wrap; gap:10px; align-items:end; }
.smart-countdown-controls > label { flex:1; min-width:120px; }
