:root{color-scheme:light;--bg:#07152f;--surface:#ffffff;--surface-soft:#eef4ff;--border:#b7c7e6;--text:#102445;--muted:#45608b;--primary:#19a56f;--primary-dark:#128558;--primary-contrast:#ffffff;--danger:#c83b3b;--shell:#0c2347;--shell-2:#0f2a56;--shell-border:#244a86;--shadow:0 16px 40px rgb(3 12 26/35%)}*{box-sizing:border-box}body,html{margin:0;padding:0;background:radial-gradient(1200px 600px at -20% -20%,#173a74 0,rgb(23 58 116/0) 60%),radial-gradient(1000px 500px at 120% -10%,#134e67 0,rgb(19 78 103/0) 55%),var(--bg);color:var(--text);font-family:Segoe UI,Trebuchet MS,sans-serif}a{color:inherit;text-decoration:none}.app-shell{min-height:100dvh;display:grid;grid-template-columns:260px 1fr}.shell-sidebar{border-right:1px solid var(--shell-border);background:linear-gradient(180deg,var(--shell) 0,var(--shell-2) 100%);padding:20px 16px}.shell-main{min-width:0;display:flex;flex-direction:column}.shell-topbar{height:64px;border-bottom:1px solid var(--shell-border);background:linear-gradient(90deg,var(--shell) 0,var(--shell-2) 100%);display:flex;align-items:center;justify-content:space-between;padding:0 16px;position:-webkit-sticky;position:sticky;top:0;z-index:20}.shell-content{padding:20px;display:grid;grid-gap:16px;gap:16px}.card{background:var(--surface);border:1px solid var(--border);border-radius:16px;padding:16px;box-shadow:var(--shadow)}.device-hero-grid{display:grid;grid-template-columns:1.4fr 1fr;grid-gap:16px;gap:16px}.device-hero-card{background:linear-gradient(130deg,#0b2d62,#0f3f7d 46%,#0f5d5e);border-color:#2d66a8;color:#ffffff}.device-hero-label{margin:0;font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:#8ac7ff}.device-hero-value{margin:8px 0 0;font-size:clamp(22px,2.4vw,34px);line-height:1.15}.device-small-value{margin:8px 0 0;font-size:15px;font-weight:600;color:var(--text)}.device-stat-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:14px 10px;gap:14px 10px}.state-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 10px;font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;border:1px solid transparent}.state-pill-online{color:#0f7a4f;background:#d6f7e8;border-color:#72d9af}.state-pill-warm{color:#0f5f67;background:#d8f0f7;border-color:#8ec7d8}.state-pill-error{color:#8a1a1a;background:#ffe1e1;border-color:#f5a4a4}.relay-add-grid{display:grid;grid-template-columns:1.6fr 1fr auto;grid-gap:12px;gap:12px}.relay-dashboard-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:16px;gap:16px}.dashboard-canvas{position:relative;width:100%;min-height:220px;border:1px solid #1d3f76;border-radius:16px;background:linear-gradient(90deg,rgb(15 42 86/32%) 1px,transparent 0),linear-gradient(180deg,rgb(15 42 86/32%) 1px,transparent 0),radial-gradient(1200px 400px at 0 0,rgb(16 57 94/35%) 0,rgb(16 57 94/0) 70%),#071a39;background-size:96px 44px,96px 44px,auto,auto;overflow:hidden}.dashboard-canvas-edit{border-color:#3e73ba}.smartess-dashboard-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(360px,1fr));grid-gap:16px;gap:16px}.smartess-card{display:grid;grid-gap:12px;gap:12px;background:radial-gradient(650px 280px at -10% -30%,rgb(57 112 205/35%) 0,rgb(57 112 205/0) 65%),linear-gradient(180deg,#0d2044,#071a39);border-color:#365f99;color:#f0f6ff}.smartess-card-offline{border-color:#d33f3f;box-shadow:0 0 0 1px rgb(211 63 63/45%),0 18px 42px rgb(120 16 16/28%)}.smartess-card-head{display:flex;align-items:center;justify-content:space-between;gap:12px}.smartess-board{position:relative;min-height:292px;border:1px solid rgb(173 209 255/24%);border-radius:16px;background:linear-gradient(90deg,rgb(72 122 183/15%) 1px,transparent 0),linear-gradient(180deg,rgb(72 122 183/15%) 1px,transparent 0),rgb(8 25 52/72%);background-size:26px 26px,26px 26px,auto;overflow:hidden}.smartess-node{position:absolute;z-index:2;width:142px;min-height:96px;display:grid;grid-gap:6px;gap:6px;padding:10px 12px;border-radius:14px;border:1px solid rgb(173 209 255/28%);background:linear-gradient(180deg,rgb(16 40 82/90%),rgb(9 23 48/90%))}.smartess-node-pv{top:16px;left:16px}.smartess-node-grid{top:16px;right:16px}.smartess-node-battery{bottom:16px;left:16px}.smartess-node-load{bottom:16px;right:16px}.smartess-node-title{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#add1ff}.smartess-node strong{font-size:22px;line-height:1;color:#ffffff}.smartess-node small{font-size:12px;color:#dae8ff}.smartess-center{position:absolute;left:50%;top:50%;width:168px;min-height:152px;transform:translate(-50%,-50%);border-radius:22px;border:1px solid rgb(173 209 255/34%);background:radial-gradient(circle at 50% 10%,rgb(255 255 255/16%) 0,rgb(255 255 255/0) 42%),linear-gradient(180deg,#2d68bf,#112c5e 78%);display:grid;align-content:center;justify-items:center;grid-gap:8px;gap:8px;text-align:center;padding:12px 10px}.smartess-center-title{font-size:15px;font-weight:800}.smartess-status{display:inline-flex;align-items:center;border-radius:999px;border:1px solid transparent;padding:4px 10px;font-size:11px;font-weight:700;max-width:146px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.smartess-status-online{color:#046c45;background:#d5f7e7;border-color:#88d7b5}.smartess-status-offline{color:#8f1e1e;background:#ffdada;border-color:#f4a2a2}.smartess-center-meta{font-size:12px;color:#e8f2ff;white-space:nowrap;max-width:142px;overflow:hidden;text-overflow:ellipsis}.smartess-foot{display:flex;align-items:center;justify-content:space-between;gap:12px;font-size:12px;color:#c7dcff}.relay-widget-card{position:relative;overflow:hidden}.dashboard-widget{position:absolute;margin:0;display:flex;flex-direction:column;justify-content:space-between;gap:12px}.dashboard-widget-edit{-webkit-user-select:none;-moz-user-select:none;user-select:none}.dashboard-widget-header{display:flex;align-items:center;justify-content:center;gap:10px;text-align:center}.dashboard-widget-header-edit{cursor:-webkit-grab;cursor:grab}.dashboard-widget-header-edit:active{cursor:-webkit-grabbing;cursor:grabbing}.dashboard-widget-body{display:flex;align-items:center;justify-content:center;flex:1 1 auto;min-height:0}.dashboard-widget-smartess{background:radial-gradient(420px 220px at -20% -40%,rgb(106 157 224/28%) 0,rgb(106 157 224/0) 66%),linear-gradient(180deg,#0d2248,#081a39);border-color:#4b73ad;color:#f0f6ff;box-shadow:0 18px 38px rgb(4 12 31/34%),inset 0 1px 0 rgb(193 220 255/14%)}.dashboard-widget-smartess .dashboard-widget-title{color:#f0f6ff}.dashboard-widget-smartess .dashboard-widget-body{align-items:stretch;justify-content:stretch}.dashboard-widget-smartess-glass{background:radial-gradient(380px 200px at -15% -32%,rgb(143 189 255/24%) 0,rgb(143 189 255/0) 68%),linear-gradient(180deg,rgb(11 28 58/94%),rgb(7 19 41/92%));border-color:rgb(140 188 255/36%);box-shadow:0 18px 36px rgb(5 14 35/36%),inset 0 1px 0 rgb(227 241 255/18%)}.dashboard-widget-smartess-glass .smartess-widget-content{border-color:rgb(168 210 255/26%);background:radial-gradient(360px 190px at 50% 42%,rgb(76 146 255/16%) 0,rgb(76 146 255/0) 72%),radial-gradient(180px 96px at 78% 8%,rgb(197 229 255/12%) 0,rgb(197 229 255/0) 74%),linear-gradient(180deg,rgb(11 26 55/86%),rgb(7 17 37/90%));-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.dashboard-widget-smartess-glass .smartess-flow-node{border-color:rgb(183 220 255/24%);background:radial-gradient(100px 70px at 84% 14%,rgb(236 246 255/14%) 0,rgb(236 246 255/0) 72%),linear-gradient(180deg,rgb(21 44 88/74%),rgb(10 23 49/78%));box-shadow:inset 0 1px 0 rgb(225 241 255/18%),0 14px 24px rgb(4 12 28/22%)}.dashboard-widget-smartess-glass .smartess-flow-core{border-color:rgb(180 217 255/34%);background:radial-gradient(150px 80px at 50% 8%,rgb(255 255 255/24%) 0,rgb(255 255 255/0) 74%),linear-gradient(180deg,rgb(81 142 230/94%),rgb(43 91 173/88%) 52%,rgb(17 35 74/92%));box-shadow:0 20px 36px rgb(5 14 33/32%),inset 0 0 22px rgb(199 228 255/14%)}.dashboard-widget-miner{background:radial-gradient(360px 180px at 8% -18%,rgb(21 82 152/36%) 0,rgb(21 82 152/0) 68%),linear-gradient(180deg,#0c2a58,#071e43);border-color:#3565a8;color:#eef6ff}.dashboard-widget-miner .dashboard-widget-title{color:#eef6ff}.dashboard-widget-miner .dashboard-widget-type-icon{color:#6fd0ff}.dashboard-widget-miner .dashboard-widget-body{align-items:stretch;justify-content:stretch}.miner-widget-content{width:100%;height:100%;min-height:160px;border-radius:14px;border:1px solid rgb(173 209 255/30%);background:radial-gradient(280px 150px at 50% 0,rgb(84 150 241/24%) 0,rgb(84 150 241/0) 72%),linear-gradient(180deg,rgb(10 31 68/95%),rgb(6 21 47/95%));display:grid;grid-gap:10px;gap:10px;padding:12px}.miner-widget-main{display:grid;grid-gap:4px;gap:4px}.miner-widget-hashrate{font-size:clamp(22px,2.1vw,30px);font-weight:800;line-height:1.08;color:#ffffff}.miner-widget-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:8px;gap:8px}.miner-widget-grid>div{border:1px solid rgb(173 209 255/30%);border-radius:10px;background:rgb(7 28 58/75%);padding:8px 10px;display:grid;grid-gap:3px;gap:3px}.miner-widget-grid>div strong{font-size:clamp(14px,1.3vw,18px);line-height:1.1;color:#ffffff}.miner-widget-footer{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;font-size:12px}.dashboard-widget-miner.relay-widget-offline{border:2px solid #dc2626;background:radial-gradient(360px 180px at 8% -18%,rgb(220 38 38/26%) 0,rgb(220 38 38/0) 68%),linear-gradient(180deg,#321625,#230f19)}.dashboard-widget-miner.relay-widget-offline .dashboard-widget-title,.dashboard-widget-miner.relay-widget-offline .miner-widget-grid>div strong,.dashboard-widget-miner.relay-widget-offline .miner-widget-hashrate{color:#ffe3e3}.camera-widget-content{width:100%;height:100%;min-height:220px;border-radius:14px;border:1px solid rgb(173 209 255/24%);background:linear-gradient(180deg,rgb(10 22 42/94%),rgb(6 14 30/96%));display:flex;align-items:stretch;justify-content:stretch;padding:12px;overflow:hidden}.camera-widget-title{font-size:16px;font-weight:700;color:#f8fbff}.camera-widget-url{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-size:12px;color:#c8d8ef;word-break:break-all;opacity:.95}.camera-widget-live{width:100%;min-height:180px;height:100%;display:grid;align-items:stretch}.camera-widget-live-img{max-height:100%;object-fit:cover;background:rgb(0 0 0/35%)}.camera-widget-live-img,.camera-widget-live-placeholder{width:100%;height:100%;min-height:180px;border-radius:10px;border:1px solid rgb(173 209 255/22%)}.camera-widget-live-placeholder{background:radial-gradient(120px 90px at 50% 40%,rgb(119 166 224/18%) 0,rgb(119 166 224/0) 70%),linear-gradient(180deg,rgb(7 19 38/95%),rgb(4 11 24/95%))}.camera-widget-live-status{font-size:13px;line-height:1.45}.smartess-widget-content{width:100%;height:100%;min-height:220px;border-radius:22px;border:1px solid rgb(173 209 255/22%);background:radial-gradient(340px 220px at 50% 50%,rgb(52 110 205/18%) 0,rgb(52 110 205/0) 68%),radial-gradient(200px 110px at 50% 94%,rgb(57 145 255/18%) 0,rgb(57 145 255/0) 72%),linear-gradient(90deg,rgb(45 94 155/12%) 1px,transparent 0),linear-gradient(180deg,rgb(45 94 155/12%) 1px,transparent 0),linear-gradient(180deg,rgb(9 20 42/97%),rgb(5 12 30/96%));background-size:auto,auto,22px 22px,22px 22px,auto;position:relative;overflow:hidden;box-shadow:inset 0 0 0 1px rgb(125 172 255/10%),inset 0 24px 64px rgb(83 135 226/7%)}.smartess-widget-content:after,.smartess-widget-content:before{content:"";position:absolute;pointer-events:none}.smartess-widget-content:before{inset:12px;border-radius:28px;border:1px solid rgb(173 209 255/10%)}.smartess-widget-content:after{right:-40px;bottom:-36px;width:180px;height:180px;border-radius:999px;background:radial-gradient(circle,rgb(66 119 195/18%) 0,rgb(66 119 195/0) 74%)}.smartess-flow-svg{position:absolute;inset:0;width:100%;height:100%;pointer-events:none;z-index:1}.smartess-flow-line-base{fill:none;stroke:rgb(170 198 238/22%);stroke-width:.86;stroke-linecap:round}.smartess-flow-line{fill:none;stroke-width:1.15;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:2.2 6.2;animation-duration:1.55s;animation-iteration-count:infinite;animation-timing-function:linear}.smartess-flow-line.smartess-flow-line-cable{stroke-width:1.02;stroke-dasharray:3 3;animation-duration:1.4s;animation-timing-function:linear;animation-iteration-count:infinite;will-change:stroke-dashoffset}.smartess-flow-line-glow{fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round;opacity:.14;animation:smartessFlowGlow 2.2s ease-in-out infinite}.smartess-flow-line-forward{animation-name:smartessFlowForward}.smartess-flow-line-reverse{animation-name:smartessFlowReverse}@keyframes smartessFlowForward{0%{stroke-dashoffset:0}to{stroke-dashoffset:-6}}@keyframes smartessFlowReverse{0%{stroke-dashoffset:0}to{stroke-dashoffset:6}}@keyframes smartessFlowGlow{0%,to{opacity:.1}50%{opacity:.24}}.smartess-flow-line-pv{stroke:#ffd867}.smartess-flow-line-grid{stroke:#7fd0ff}.smartess-flow-line-battery{stroke:#7bf3d7}.smartess-flow-line-load{stroke:#98f77b}.smartess-flow-node{position:absolute;z-index:2;width:29%;min-height:24%;border:1px solid rgb(173 209 255/18%);border-radius:20px;padding:11px 13px;background:radial-gradient(100px 70px at 86% 16%,rgb(255 255 255/7%) 0,rgb(255 255 255/0) 72%),linear-gradient(180deg,rgb(18 36 77/95%),rgb(7 18 43/96%));display:grid;align-content:start;grid-gap:4px;gap:4px;box-shadow:inset 0 0 0 1px rgb(131 169 241/10%),0 16px 30px rgb(4 10 24/18%)}.smartess-flow-node-pv{left:4.5%;top:7%}.smartess-flow-node-grid{right:4.5%;top:7%}.smartess-flow-node-battery{left:4.5%;bottom:7%}.smartess-flow-node-load{right:4.5%;bottom:7%}.smartess-flow-node-icon{font-size:clamp(20px,1.8vw,28px);line-height:1}.smartess-flow-node-label{font-size:clamp(14px,1.05vw,17px);font-weight:800;line-height:1.05;color:#f4f8ff}.smartess-flow-node strong{font-size:clamp(16px,1.25vw,21px);font-weight:800;line-height:1.12;color:#ffffff}.smartess-flow-node small{font-size:clamp(10px,.78vw,11px);line-height:1.32;color:#d9e9ff;white-space:normal;overflow-wrap:anywhere}.smartess-flow-core{position:absolute;z-index:3;left:50%;top:50%;transform:translate(-50%,-50%);width:35%;min-height:0;max-height:-moz-fit-content;max-height:fit-content;border-radius:22px;border:1px solid rgb(151 198 255/32%);box-shadow:0 0 0 1px rgb(121 174 255/26%),0 20px 36px rgb(5 15 35/28%),inset 0 0 24px rgb(179 218 255/10%);background:radial-gradient(160px 90px at 50% 7%,rgb(255 255 255/18%) 0,rgb(255 255 255/0) 72%),linear-gradient(180deg,#467fd7,#2858a9 50%,#11244f);display:grid;align-content:center;justify-items:center;grid-gap:4px;gap:4px;padding:8px 10px;text-align:center}.smartess-flow-core-icon{font-size:clamp(22px,1.85vw,30px);line-height:1;filter:drop-shadow(0 0 12px rgb(255 204 69/45%))}.smartess-flow-core-title{font-size:clamp(17px,1.28vw,22px);font-weight:800;line-height:1.08;color:#ffffff}.smartess-flow-core-status{max-width:95%;display:inline-flex;align-items:center;justify-content:center;gap:6px;border-radius:999px;border:1px solid transparent;padding:4px 10px;font-size:clamp(10px,.78vw,11px);font-weight:700;line-height:1.2}.smartess-flow-core-status-dot{width:10px;height:10px;flex:0 0 auto;border-radius:50%;background:currentColor;box-shadow:0 0 12px currentColor}.smartess-flow-core-status-offline{color:#ff8f8f;background:rgb(86 20 32/72%);border-color:rgb(255 118 118/26%)}.smartess-flow-core-status-online{color:#8ef0b5;background:rgb(17 78 58/68%);border-color:rgb(110 231 183/24%)}.smartess-flow-core-status-solar{color:#ffd35a;background:rgb(98 71 9/70%);border-color:rgb(255 211 90/24%)}.smartess-flow-core-status-grid{color:#7fd0ff;background:rgb(16 64 95/68%);border-color:rgb(127 208 255/24%)}.smartess-flow-core-status-battery{color:#ffb32d;background:rgb(84 50 9/72%);border-color:rgb(255 179 45/26%)}.smartess-flow-core-meta{font-size:clamp(10px,.72vw,11px);line-height:1.24;color:#d8e8ff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:96%}.dashboard-widget-title{gap:8px;font-size:clamp(18px,1.8vw,24px);line-height:1.15}.dashboard-widget-title,.dashboard-widget-type-icon{display:inline-flex;align-items:center;justify-content:center}.dashboard-widget-type-icon{font-size:20px}.dashboard-widget-action-btn{padding:12px 18px;font-size:16px;font-weight:700}.dashboard-widget-resize{position:absolute;right:8px;bottom:8px;width:18px;height:18px;border-right:3px solid #2f5c99;border-bottom:3px solid #2f5c99;border-radius:0 0 6px 0;cursor:nwse-resize}.relay-widget-offline{border:2px solid #dc2626;box-shadow:0 0 0 1px rgb(220 38 38/35%),0 16px 40px rgb(120 16 16/30%);background:linear-gradient(165deg,#fff5f5,#ffe3e3)}.relay-widget-offline .dashboard-widget-title{color:#7f1d1d}.relay-widget-offline:after{background:radial-gradient(circle,rgb(220 38 38/28%) 0,rgb(220 38 38/0) 72%)}.dashboard-widget-smartess.relay-widget-offline{border:2px solid #dc2626;background:radial-gradient(420px 220px at -20% -40%,rgb(220 38 38/25%) 0,rgb(220 38 38/0) 65%),linear-gradient(180deg,#30121a,#220d14)}.dashboard-widget-smartess.relay-widget-offline .dashboard-widget-title,.dashboard-widget-smartess.relay-widget-offline .smartess-flow-node strong{color:#ffe3e3}.relay-widget-card:after{content:"";position:absolute;right:-40px;top:-40px;width:120px;height:120px;border-radius:50%;background:radial-gradient(circle,rgb(25 165 111/18%) 0,rgb(25 165 111/0) 72%);pointer-events:none}.relay-device-link{color:inherit;text-decoration:none}.relay-device-link:hover{text-decoration:underline}.relay-switch{position:relative;display:inline-flex;width:52px;height:30px}.relay-switch input{opacity:0;width:0;height:0;position:absolute}.relay-switch-slider{position:absolute;inset:0;border-radius:999px;border:1px solid #8ca3cc;background:#dde6f7;transition:background-color .2s ease,border-color .2s ease;cursor:pointer}.relay-switch-slider:before{content:"";position:absolute;width:22px;height:22px;left:3px;top:3px;border-radius:50%;background:#ffffff;box-shadow:0 4px 10px rgb(16 36 69/25%);transition:transform .2s ease}.relay-switch input:checked+.relay-switch-slider{background:#1aa76f;border-color:#1aa76f}.relay-switch input:checked+.relay-switch-slider:before{transform:translateX(22px)}.relay-switch input:disabled+.relay-switch-slider{opacity:.65;cursor:not-allowed}.relay-channel-list{display:grid;grid-gap:10px;gap:10px}.relay-channel-row{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--border);border-radius:10px;background:var(--surface-soft)}.relay-config-row{align-items:center}.relay-config-fields{display:grid;grid-gap:8px;gap:8px;min-width:300px;flex:1 1 360px}.relay-config-main{display:grid;grid-template-columns:auto 1fr;grid-gap:14px;gap:14px;align-items:center}.relay-config-field-grid{display:grid;grid-template-columns:minmax(200px,1fr) minmax(170px,220px);grid-gap:8px;gap:8px;align-items:end}.relay-config-field{display:grid;grid-gap:5px;gap:5px}.relay-config-label{margin:0;font-size:11px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:700}.relay-config-title{display:flex;align-items:center}.relay-channel-badge{display:inline-flex;align-items:center;min-height:28px;padding:3px 10px;border-radius:999px;border:1px solid #8ec7d8;background:#d8f0f7;color:#0f5f67;font-size:14px;font-weight:700}.relay-config-actions{display:flex;gap:10px;flex-wrap:wrap;align-items:center;justify-content:flex-end}.devices-toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px}.devices-toolbar-right{display:flex;gap:8px}.devices-search{flex:1 1 560px}.devices-search input{width:100%;border:1px solid var(--border);border-radius:12px;padding:10px 12px;background:var(--surface);color:var(--text)}.devices-create-form{margin-top:12px;display:grid;grid-template-columns:minmax(220px,1fr) minmax(280px,1.6fr) auto;grid-gap:12px;gap:12px;align-items:end}.devices-table-wrap{overflow:visible;position:relative}.devices-table{width:100%;min-width:700px;border-collapse:collapse}.devices-table td,.devices-table th{padding:12px 10px;border-bottom:1px solid var(--border);text-align:left;vertical-align:middle}.devices-table th{font-size:12px;letter-spacing:.08em;text-transform:uppercase;color:var(--muted);font-weight:700}.devices-table-row{cursor:pointer}.devices-table-row:hover{background:#edf3ff}.devices-name-cell{display:grid;grid-gap:4px;gap:4px}.devices-actions-cell{width:1%;white-space:nowrap}.devices-actions-menu{position:relative;display:inline-block;z-index:30}.devices-actions-menu[open]{z-index:60}.devices-actions-menu summary{list-style:none}.devices-actions-menu summary::-webkit-details-marker{display:none}.devices-burger-btn{width:44px;min-width:44px;height:40px;padding:0;display:inline-flex;align-items:center;justify-content:center}.devices-burger-icon{display:grid;grid-gap:4px;gap:4px}.devices-burger-icon>span{display:block;width:16px;height:2px;border-radius:10px;background:#355789}.devices-actions-popover{position:absolute;right:0;top:calc(100% + 6px);z-index:2000;min-width:150px;display:grid;grid-gap:8px;gap:8px;padding:8px;border:1px solid var(--border);border-radius:10px;background:var(--surface);box-shadow:0 10px 26px rgb(7 21 47/22%)}.devices-table-row:nth-last-child(-n+2) .devices-actions-menu .devices-actions-popover{top:auto;bottom:calc(100% + 6px)}.automations-table-row{cursor:default}.automations-table-wrap{overflow:visible}.automations-actions-menu .devices-actions-popover{top:calc(100% + 6px);bottom:auto}.automations-table-row:nth-last-child(-n+2) .automations-actions-menu .devices-actions-popover{top:auto;bottom:calc(100% + 6px)}.devices-empty-cell{text-align:center;color:var(--muted);padding:20px 10px}.users-search-form{display:grid;grid-template-columns:minmax(280px,1fr) auto;grid-gap:12px;gap:12px;align-items:end}.users-search-actions{display:flex;gap:8px;align-items:center}.users-invite-grid{display:grid;grid-template-columns:minmax(260px,420px) minmax(320px,1fr);grid-gap:16px;gap:16px}.invite-code-list{display:grid;grid-gap:10px;gap:10px;max-height:420px;overflow:auto;padding-right:4px}.users-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:14px;gap:14px}.users-table-row-selected{background:#e4efff}.users-inline-card-cell{background:#f4f8ff;padding:0;border-bottom:1px solid var(--border)}.users-inline-card{padding:14px;border-top:1px solid #b8caea}.user-detail-grid{display:grid;grid-template-columns:minmax(280px,420px) minmax(420px,1fr);grid-gap:16px;gap:16px}.users-detail-actions{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.users-entities-scroll{max-height:calc(7 * 62px);overflow:auto;padding-right:4px}.user-card{border:1px solid var(--border);border-radius:14px;background:var(--surface-soft);padding:12px;display:grid;grid-gap:10px;gap:10px}.user-card-selected{border-color:#4d7fc2;box-shadow:0 10px 28px rgb(24 57 108/20%)}.user-card-header{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}.user-card-meta{display:grid;grid-gap:4px;gap:4px}.user-card-actions{display:flex;gap:8px;flex-wrap:wrap}.user-card-password{margin-top:2px}.user-card-permissions{border-top:1px solid var(--border);padding-top:10px;display:grid;grid-gap:8px;gap:8px}.automation-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}.automation-card-controls{display:flex;align-items:center;gap:8px}.automation-enabled-toggle{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:14px}.automation-workflow-layout{display:grid;grid-template-columns:minmax(230px,270px) 1fr;grid-gap:14px;gap:14px}.automation-palette{border:1px solid var(--border);border-radius:12px;background:#f2f7ff;padding:12px}.automation-palette h3{margin:0 0 8px}.automation-palette-item{display:grid;grid-template-columns:1fr auto;grid-gap:8px;gap:8px;margin-bottom:8px}.automation-link-toolbar{display:grid;grid-gap:6px;gap:6px;margin-bottom:8px}.automation-link-toolbar label{color:var(--muted);font-size:13px}.automation-link-kind-select{border:1px solid var(--border);border-radius:10px;padding:8px 10px;background:var(--surface);color:var(--text)}.automation-palette-drag-btn{display:inline-flex;align-items:center;justify-content:flex-start;gap:8px}.automation-canvas{position:relative;min-height:560px;border:1px dashed #5c86c2;border-radius:14px;background:linear-gradient(90deg,rgb(64 113 175/16%) 1px,transparent 0),linear-gradient(180deg,rgb(64 113 175/16%) 1px,transparent 0),#f8fbff;background-size:36px 36px;overflow:hidden}.automation-canvas-empty{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;padding:20px;color:#5679a9;text-align:center;z-index:1}.automation-links{position:absolute;inset:0;pointer-events:none;z-index:2}.automation-link-label{fill:#1b355f;font-size:11px;font-weight:700;letter-spacing:.03em}.automation-node{position:absolute;z-index:3;border:1px solid var(--border);border-radius:12px;padding:10px;background:#ffffff;box-shadow:0 8px 20px rgb(16 36 69/18%);display:grid;grid-gap:8px;gap:8px;cursor:move}.automation-node-head{display:flex;align-items:center;justify-content:space-between;gap:8px;cursor:-webkit-grab;cursor:grab}.automation-node-head .btn{min-width:32px;width:32px;padding:5px 0}.automation-node-head-dragging{cursor:-webkit-grabbing;cursor:grabbing}.automation-node-head-main{display:inline-flex;align-items:center;gap:8px;min-width:0}.automation-node-head-actions{display:inline-flex;align-items:center;gap:6px}.automation-link-port{border:1px solid #7fa2d4;background:#eef5ff;color:#244b85;border-radius:999px;padding:2px 8px;font-size:11px;font-weight:700;cursor:pointer;white-space:nowrap}.automation-link-port:hover{background:#e0edff}.automation-link-port-out.active{border-color:#1aa76f;background:#d6f7e8;color:#106645}.automation-node-device{background:#f2f8ff}.automation-node-metric{background:#f3fbf7}.automation-node-condition{background:#fff9ef}.automation-node-value{background:#f8f3ff}.automation-node-time{background:#f0fbff}.automation-node-action{background:#f3fff4}.automation-result-row{display:flex;align-items:center;justify-content:space-between;gap:10px}.automation-result-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.grid{display:grid;grid-gap:16px;gap:16px}.grid-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-3{grid-template-columns:repeat(3,minmax(0,1fr))}.btn{border:1px solid var(--border);background:var(--surface-soft);color:var(--text);border-radius:10px;padding:9px 12px;cursor:pointer;transition:background-color .15s ease,border-color .15s ease,transform .15s ease}.btn:disabled{opacity:.7;cursor:not-allowed}.btn-primary{background:var(--primary);border-color:var(--primary);color:var(--primary-contrast)}.btn:hover{background:#dfe9fb;border-color:#91a8cf}.btn-primary:hover{background:var(--primary-dark);border-color:var(--primary-dark)}.form{display:grid;grid-gap:12px;gap:12px}.field{display:grid;grid-gap:6px;gap:6px}.field label{color:var(--muted);font-size:14px}.field input,.field select,.field textarea{border:1px solid var(--border);border-radius:10px;padding:10px 12px;background:var(--surface);color:var(--text);width:100%}.auth-wrapper{min-height:100dvh;display:grid;place-items:center;padding:20px}.auth-card{width:min(460px,100%)}.landing-page{min-height:100dvh;padding:32px 24px 40px;display:grid;grid-gap:24px;gap:24px}.landing-hero{display:grid;grid-template-columns:minmax(0,1.05fr) minmax(320px,.95fr);grid-gap:24px;gap:24px;align-items:stretch}.landing-hero-copy,.landing-info-card,.landing-panel-card{border:1px solid rgb(170 198 236/28%);border-radius:28px;box-shadow:0 22px 54px rgb(3 12 26/28%)}.landing-hero-copy{position:relative;overflow:hidden;padding:32px;background:radial-gradient(680px 340px at -8% -12%,rgb(68 123 214/34%) 0,rgb(68 123 214/0) 62%),radial-gradient(460px 220px at 100% 0,rgb(26 165 111/20%) 0,rgb(26 165 111/0) 70%),linear-gradient(180deg,rgb(255 255 255/98%),rgb(237 245 255/96%))}.landing-panel{min-width:0}.landing-panel-card{height:100%;padding:24px;background:radial-gradient(540px 260px at 110% -10%,rgb(61 131 224/24%) 0,rgb(61 131 224/0) 64%),linear-gradient(180deg,rgb(9 30 64/96%),rgb(6 22 48/96%));color:#edf5ff}.landing-badge{display:inline-flex;align-items:center;border-radius:999px;padding:7px 12px;background:rgb(12 35 71/10%);border:1px solid rgb(36 74 134/20%);color:#1d4278;font-size:12px;font-weight:800;letter-spacing:.1em;text-transform:uppercase}.landing-logo{display:block;width:min(100%,360px);height:auto;margin-top:18px}.landing-title{margin:24px 0 12px;max-width:14ch;font-size:clamp(34px,5vw,64px);line-height:.98;letter-spacing:-.04em;color:#081b3a}.landing-subtitle{margin:0;max-width:680px;font-size:clamp(16px,1.55vw,19px);line-height:1.7;color:#35547f}.landing-actions{display:flex;gap:12px;flex-wrap:wrap;margin-top:28px}.landing-cta{min-height:48px;min-width:190px;display:inline-flex;align-items:center;justify-content:center;font-weight:800}.landing-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));grid-gap:12px;gap:12px;margin-top:28px}.landing-stat{display:grid;grid-gap:6px;gap:6px;padding:14px;border-radius:18px;background:rgb(255 255 255/66%);border:1px solid rgb(183 199 230/74%)}.landing-stat strong{font-size:15px;color:#0d2f60}.landing-stat span{font-size:13px;line-height:1.5;color:#4d678f}.landing-panel-top{display:flex;gap:10px;flex-wrap:wrap;margin-bottom:18px}.landing-pill{display:inline-flex;align-items:center;border-radius:999px;padding:7px 12px;border:1px solid rgb(173 209 255/20%);background:rgb(255 255 255/8%);color:#d8e8ff;font-size:12px;font-weight:700;letter-spacing:.08em;text-transform:uppercase}.landing-pill-live{border-color:rgb(66 219 151/34%);background:rgb(25 165 111/14%);color:#8dffd2}.landing-panel-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:12px;gap:12px}.landing-feature-card{min-width:0;padding:18px;border-radius:20px;border:1px solid rgb(173 209 255/14%);background:linear-gradient(180deg,rgb(255 255 255/9%),rgb(255 255 255/4%));-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px)}.landing-feature-card h2{margin:0 0 10px;font-size:20px;line-height:1.1;color:#f7fbff}.landing-feature-card p{margin:0;color:#bfd6fb;line-height:1.65}.landing-sections{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));grid-gap:18px;gap:18px}.landing-info-card{padding:24px;background:rgb(255 255 255/94%)}.landing-info-card h2{margin:0 0 14px;font-size:24px;color:#0f2c58}.landing-list{margin:0;padding-left:18px;display:grid;grid-gap:10px;gap:10px;color:#3c587f;line-height:1.65}.muted{color:var(--muted)}.form-message{margin:0;font-size:14px}.form-message-error{color:var(--danger)}.form-message-success{color:var(--primary)}.nav-list{display:grid;grid-gap:6px;gap:6px;margin-top:10px}.nav-item{border-radius:10px;padding:8px 10px;color:#d6e4ff}.nav-item-active{background:rgb(25 165 111/16%);color:#7dffca;font-weight:600}.shell-sidebar .muted,.shell-sidebar h2,.shell-topbar .muted,.shell-topbar strong{color:#ecf3ff}.mobile-menu-btn{display:none}@media (max-width:1024px){.grid-3{grid-template-columns:repeat(2,minmax(0,1fr))}.landing-hero{grid-template-columns:1fr}.landing-title{max-width:none}}@media (max-width:860px){.app-shell{grid-template-columns:1fr}.shell-sidebar{position:fixed;inset:64px auto 0 0;width:280px;transform:translateX(-100%);transition:transform .2s ease;z-index:30}.shell-sidebar.open{transform:translateX(0)}.mobile-menu-btn{display:inline-flex}.grid-2,.grid-3,.relay-add-grid,.relay-dashboard-grid{grid-template-columns:1fr}.relay-channel-row{flex-direction:column;align-items:stretch}.relay-config-actions{justify-content:flex-start}.relay-config-field-grid,.relay-config-main{grid-template-columns:1fr}.relay-config-main{align-items:stretch}.devices-create-form,.users-search-form{grid-template-columns:1fr}.users-search-actions{justify-content:flex-end}.automation-workflow-layout,.user-detail-grid,.users-card-grid,.users-invite-grid{grid-template-columns:1fr}.automation-result-row{flex-direction:column;align-items:flex-start}.devices-toolbar{flex-direction:column;align-items:stretch}.devices-toolbar-right{justify-content:flex-end}.devices-table{min-width:560px}.devices-table-wrap{overflow-x:auto;overflow-y:visible}.device-hero-grid,.device-stat-grid{grid-template-columns:1fr}.landing-page{padding:18px 14px 28px}.landing-hero-copy,.landing-info-card,.landing-panel-card{border-radius:22px}.landing-hero-copy,.landing-panel-card{padding:20px}.landing-actions,.landing-panel-grid,.landing-sections,.landing-stats{grid-template-columns:1fr}.landing-actions{flex-direction:column}.landing-cta{width:100%;min-width:0}}html{-webkit-text-size-adjust:100%}body,html{min-width:320px}body{overflow-x:hidden}canvas,img,svg{max-width:100%}button,input,select,textarea{font:inherit}.automation-node,.card,.dashboard-canvas,.dashboard-widget,.devices-name-cell,.field,.form,.grid,.page-header,.page-header-actions,.page-header-copy,.page-header-main,.relay-channel-row,.shell-content,.shell-main,.shell-sidebar,.shell-topbar,.user-card{min-width:0;max-width:100%}.card>:first-child{margin-top:0}.card>:last-child{margin-bottom:0}.shell-backdrop{position:fixed;inset:0;border:0;padding:0;background:rgb(3 12 26/56%);opacity:0;pointer-events:none;transition:opacity .2s ease;z-index:24}.shell-topbar-group{display:flex;align-items:center;gap:10px;min-width:0}.shell-topbar-group-left{flex:1 1 auto}.shell-topbar-group-right{flex:0 1 auto;justify-content:flex-end}.shell-tenant-label,.shell-user-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.shell-tenant-select{max-width:260px;min-width:0}.page-header{overflow:hidden}.page-header-main{display:flex;justify-content:space-between;align-items:flex-start;gap:16px}.page-header-copy{display:grid;grid-gap:8px;gap:8px}.dashboard-widget-title,.device-hero-value,.device-small-value,.muted,.page-header-actions,.page-header-copy h1,.page-header-copy p,.smartess-flow-core-meta,.smartess-flow-node small{overflow-wrap:anywhere}.page-header-actions{display:flex;align-items:center;justify-content:flex-end;gap:8px;flex-wrap:wrap}.dashboard-widget-title{min-width:0;white-space:normal;text-wrap:balance}.devices-actions-popover .btn,.devices-toolbar-right .btn,.page-header-actions .btn{white-space:nowrap}.automation-card-controls,.automation-card-head,.automation-result-actions,.devices-toolbar,.devices-toolbar-right,.miner-widget-footer,.smartess-foot,.users-detail-actions,.users-search-actions{min-width:0;max-width:100%}.devices-table{table-layout:fixed}.devices-table td,.devices-table th{overflow-wrap:anywhere}.devices-table td[data-label]:before{content:none}.automation-node,.smartess-center,.smartess-flow-core,.smartess-flow-node,.smartess-node{min-width:0}@media (max-width:1100px){.smartess-dashboard-grid,.user-detail-grid{grid-template-columns:1fr}}@media (max-width:860px){.shell-topbar{height:auto;min-height:64px;flex-wrap:wrap;gap:10px;padding:12px 14px}.shell-topbar-group{width:100%;flex-wrap:wrap}.shell-topbar-group-right{justify-content:space-between}.shell-tenant-select{width:100%;max-width:none}.shell-tenant-label,.shell-user-name{max-width:100%;white-space:normal}.shell-content{padding:14px;gap:14px}.shell-sidebar{inset:0 auto 0 0;padding-top:84px;max-width:min(88vw,320px);box-shadow:24px 0 60px rgb(3 12 26/36%);z-index:30}.shell-backdrop.open{opacity:1;pointer-events:auto}.page-header-main{flex-direction:column;align-items:stretch}.page-header-actions{justify-content:stretch}.automation-card-controls,.automation-card-head,.automation-result-actions,.devices-actions-popover,.devices-toolbar-right,.miner-widget-footer,.page-header-actions>*,.relay-config-actions,.smartess-foot,.users-detail-actions,.users-search-actions{width:100%}.devices-toolbar-right .btn,.page-header-actions .btn,.users-search-actions .btn{width:100%;justify-content:center}.automation-card-controls,.automation-card-head,.automation-result-actions,.miner-widget-footer,.smartess-foot,.users-detail-actions{flex-direction:column;align-items:stretch}.dashboard-canvas{min-height:auto;height:auto!important;display:grid;grid-gap:14px;gap:14px;padding:2px;background:radial-gradient(1000px 320px at 50% -10%,rgb(16 57 94/24%) 0,rgb(16 57 94/0) 72%),#071a39}.dashboard-canvas-mobile{grid-template-columns:1fr}.dashboard-widget{position:relative;left:auto!important;top:auto!important;width:auto!important;height:auto!important;min-height:164px}.dashboard-widget-mobile{margin:0}.dashboard-widget-body,.dashboard-widget-header{min-width:0}.dashboard-widget-body{justify-content:stretch}.dashboard-widget-smartess.dashboard-widget-mobile{min-height:clamp(640px,168vw,820px)}.dashboard-widget-smartess.dashboard-widget-mobile .dashboard-widget-body{align-items:stretch;justify-content:stretch}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-widget-content{min-height:clamp(560px,138vw,720px);aspect-ratio:.92;border-radius:24px}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-widget-content:before{inset:10px;border-radius:24px}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-node{width:40%;min-height:21%;padding:14px 14px 12px;border-radius:22px}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-node-grid,.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-node-pv{top:4.5%}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-node-battery,.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-node-load{bottom:4.5%}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-core{top:50.5%;width:45%;min-height:0;max-height:-moz-fit-content;max-height:fit-content;padding:9px 11px;gap:3px;border-radius:20px}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-core-title{font-size:clamp(17px,4.6vw,21px)}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-core-status{max-width:100%;padding:5px 11px;font-size:clamp(10px,2.4vw,12px)}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-core-meta{font-size:clamp(10px,2.2vw,11px)}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-node-icon{font-size:clamp(21px,5.5vw,28px)}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-node-label{font-size:clamp(14px,3.9vw,17px)}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-node strong{font-size:clamp(17px,5vw,22px)}.dashboard-widget-smartess.dashboard-widget-mobile .smartess-flow-node small{font-size:clamp(10px,2.3vw,11px)}.miner-widget-content{min-height:0}.miner-widget-grid{grid-template-columns:1fr 1fr}.dashboard-widget-resize{display:none}}@media (max-width:760px){.card{border-radius:14px;padding:14px}.devices-table,.devices-table tbody,.devices-table td,.devices-table th,.devices-table thead,.devices-table tr{display:block;width:100%}.devices-table{min-width:0;border-collapse:separate}.automations-table-wrap,.devices-table-wrap{overflow:visible}.devices-table thead{display:none}.devices-table tbody{display:grid;grid-gap:12px;gap:12px}.devices-table tr{border:1px solid var(--border);border-radius:14px;box-shadow:0 10px 24px rgb(8 23 52/12%);overflow:hidden;margin:0}.devices-table tr,.devices-table-row:hover{background:rgb(255 255 255/96%)}.devices-table td{border-bottom:1px solid #e6eefc;padding:10px 12px}.devices-table td:last-child{border-bottom:0}.devices-table td[data-label]{display:grid;grid-gap:6px;gap:6px}.devices-table td[data-label]:before{content:attr(data-label);display:block;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}.devices-actions-cell{width:100%;white-space:normal}.devices-actions-menu,.devices-actions-menu[open]{display:block;width:100%}.devices-actions-menu summary,.devices-burger-btn{width:100%}.devices-actions-popover{position:static;min-width:0;margin-top:8px;box-shadow:none;background:#f5f8ff}.users-inline-card-cell{padding:0!important}.users-inline-card-cell:before{display:none!important}.users-inline-card{padding:14px}.automation-workflow-layout,.devices-create-form,.user-detail-grid,.users-invite-grid,.users-search-form{grid-template-columns:1fr}.relay-config-fields{min-width:0;flex-basis:auto}}@media (max-width:560px){.card,.shell-content{padding:12px}.card{border-radius:12px}.shell-topbar{padding:10px 12px}.miner-widget-grid,.smartess-widget-content{grid-template-columns:1fr}.smartess-flow-core{order:0}.device-hero-value{font-size:24px}.dashboard-widget-action-btn{width:100%}.landing-title{font-size:clamp(28px,10vw,42px)}.landing-subtitle{font-size:15px}}