:root{color-scheme:light;--bg: #eef2f7;--surface: rgba(255, 255, 255, .86);--text: #121826;--muted: #627083;--line: rgba(113, 128, 150, .22);--brand: #1f8a5b;--brand-strong: #156546;--blue: #315fce;--amber: #bd6b18;--shadow: 0 20px 48px rgba(15, 23, 42, .11);--small-shadow: 0 10px 24px rgba(15, 23, 42, .08);font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0;min-height:100vh;color:var(--text);background:radial-gradient(circle at 20% 0%,rgba(31,138,91,.18),transparent 32rem),radial-gradient(circle at 100% 10%,rgba(49,95,206,.16),transparent 34rem),linear-gradient(140deg,#f8fafc,#eef2f7 52%,#f6f7fb)}button,input,select{font:inherit}button{cursor:pointer}.app-shell{display:grid;grid-template-columns:292px minmax(0,1fr);min-height:100vh}.sidebar{position:sticky;top:0;height:100vh;padding:24px;display:flex;flex-direction:column;gap:26px;color:#f8fafc;background:linear-gradient(180deg,#111827f5,#102530f5),#111827;border-right:1px solid rgba(255,255,255,.08)}.brand{display:flex;align-items:center;gap:12px;padding:8px}.brand-mark{display:grid;place-items:center;width:46px;height:46px;border-radius:8px;background:linear-gradient(145deg,#35c989,#2f6fed);box-shadow:0 16px 30px #2f6fed3d;font-weight:900}.brand strong,.brand span{display:block}.brand strong{letter-spacing:.01em}.brand span{margin-top:2px;color:#aeb8c7;font-size:13px}.nav-list,.provider-list{display:grid;gap:8px}.nav-item,.provider-pill{width:100%;border:1px solid transparent;border-radius:8px;padding:12px 14px;background:transparent;color:#cbd5e1;text-align:left;transition:transform .16s ease,background .16s ease,border-color .16s ease,color .16s ease}.nav-item:hover,.provider-pill:hover{transform:translateY(-1px);border-color:#ffffff1f;background:#ffffff0f;color:#fff}.nav-item.is-active,.provider-pill.is-active{background:#ffffff1f;border-color:#ffffff24;color:#fff;box-shadow:inset 3px 0 #35c989}.provider-pill{display:flex;justify-content:space-between;align-items:center}.provider-pill span{display:inline-flex;align-items:center;gap:9px}.provider-pill strong{display:grid;place-items:center;min-width:26px;height:24px;border-radius:999px;background:#ffffff1a;font-size:12px}.provider-dot{width:9px;height:9px;border-radius:999px;background:#94a3b8}.provider-dot.ezviz{background:#35c989}.provider-dot.tuya{background:#2f6fed}.provider-dot.ewelink{background:#d88a2d}.provider-logo{display:inline-flex;align-items:center;gap:8px;min-height:30px}.provider-mark{display:grid;place-items:center;width:34px;height:34px;border-radius:8px;color:#fff;font-size:12px;font-weight:900;letter-spacing:0}.provider-word{color:var(--text);font-weight:900}.provider-logo.ezviz .provider-mark{background:linear-gradient(145deg,#35c989,#15845b)}.provider-logo.tuya .provider-mark{background:linear-gradient(145deg,#2f6fed,#13a7c4)}.provider-logo.ewelink .provider-mark{background:linear-gradient(145deg,#f0a343,#d2691e)}.section-title{margin-bottom:10px;color:#98a2b3;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.workspace{min-width:0;padding:30px}.topbar,.toolbar,.panel-head,.device-card-head,.scene-card-head,.dialog-head,.scene-row,.device-row,.account-card{display:flex;align-items:center;justify-content:space-between;gap:16px}.topbar{margin-bottom:18px;padding:20px;border:1px solid rgba(255,255,255,.68);border-radius:8px;background:#ffffff9e;box-shadow:var(--small-shadow);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.eyebrow{margin:0 0 4px;color:var(--brand-strong);font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.08em}h1,h2,h3,p{margin:0}h1{font-size:clamp(30px,4vw,46px);line-height:1.02}h2{font-size:18px}h3{font-size:17px}.topbar-actions,.toolbar-actions,.row-actions,.dialog-actions{display:flex;align-items:center;gap:10px}.primary-button,.secondary-button,.ghost-button,.icon-button,.toggle,.segmented button{border:1px solid var(--line);border-radius:8px;min-height:42px;padding:0 15px;background:#fff;color:var(--text);font-weight:800;transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease,background .15s ease}.primary-button:hover,.secondary-button:hover,.ghost-button:hover,.icon-button:hover,.toggle:hover,.segmented button:hover{transform:translateY(-1px);box-shadow:var(--small-shadow)}.primary-button{border-color:transparent;background:linear-gradient(135deg,#1f8a5b,#2f6fed);color:#fff;box-shadow:0 16px 30px #1f8a5b38}.secondary-button{border-color:#315fce38;background:#eef4ff;color:#214ea3}.ghost-button{background:#ffffff94}.icon-button{display:grid;place-items:center;width:42px;padding:0}.status-banner{position:relative;min-height:52px;margin-bottom:18px;padding:14px 16px 14px 48px;border:1px solid rgba(31,138,91,.24);border-radius:8px;background:linear-gradient(135deg,#eefaf4f0,#eef4fff0);color:#155d42;font-weight:800;box-shadow:var(--small-shadow)}.status-banner:before{content:"";position:absolute;left:18px;top:18px;width:14px;height:14px;border-radius:999px;background:#35c989;box-shadow:0 0 0 6px #35c98926}.view{display:none}.view.is-visible{display:block}.metric-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:16px}.metric,.panel,.device-card,.scene-card,.account-card,.scene-editor{border:1px solid rgba(255,255,255,.72);border-radius:8px;background:var(--surface);box-shadow:var(--shadow);-webkit-backdrop-filter:blur(18px);backdrop-filter:blur(18px)}.metric{position:relative;overflow:hidden;padding:18px}.metric:after{content:"";position:absolute;right:14px;top:14px;width:38px;height:6px;border-radius:999px;background:linear-gradient(90deg,#35c989,#2f6fed);opacity:.72}.metric span{display:block;color:var(--muted);font-size:13px;font-weight:800}.metric strong{display:block;margin-top:10px;font-size:34px;line-height:1}.panel-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(320px,.8fr);gap:16px}.panel{padding:18px}.device-list,.scene-list,.channel-list,.account-list,.scene-grid{display:grid;gap:10px;margin-top:14px}.device-row,.scene-row{position:relative;padding:13px;border:1px solid var(--line);border-radius:8px;background:#ffffffb8}.device-row:before,.device-card:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;border-radius:8px 0 0 8px;background:var(--brand)}.device-row.motor:before,.device-card.motor:before{background:var(--blue)}.device-row.plug:before,.device-card.plug:before{background:var(--amber)}.device-title,.scene-title{display:flex;align-items:center;gap:12px;min-width:0}.device-glyph,.scene-glyph{display:grid;place-items:center;flex:0 0 auto;width:42px;height:42px;border-radius:8px;background:#e9f8ef;color:var(--brand-strong);font-weight:900}.device-card.motor .device-glyph,.device-row.motor .device-glyph{background:#eef4ff;color:#214ea3}.device-card.plug .device-glyph,.device-row.plug .device-glyph{background:#fff5e8;color:#965612}.scene-glyph{width:36px;height:36px;background:#f0f5ff;color:var(--blue)}.device-row span,.scene-row span,.device-card p,.account-card p,.channel-row span{color:var(--muted);font-size:13px}.state-chip,.provider-tag{display:inline-flex;align-items:center;min-height:26px;border-radius:999px;padding:0 10px;font-size:12px;font-weight:900}.state-chip.online{background:#e6f8ef;color:#17633f}.state-chip.offline{background:#eef1f5;color:#667085}.provider-tag{margin-bottom:8px;background:#edf2f7;color:#344054}.toggle{min-width:76px;background:#f3f6fb}.toggle.is-on{border-color:transparent;background:linear-gradient(135deg,#1f8a5b,#28a66b);color:#fff}.segmented{display:inline-grid;grid-template-columns:repeat(3,minmax(64px,1fr));border:1px solid var(--line);border-radius:8px;overflow:hidden;background:#fff}.segmented button{border:0;border-radius:0;min-width:66px;background:transparent}.segmented button.is-active{background:#eef4ff;color:#214ea3}.segmented button+button{border-left:1px solid var(--line)}.toolbar{margin-bottom:16px;padding:15px;border:1px solid rgba(255,255,255,.72);border-radius:8px;background:#ffffffa8;box-shadow:var(--small-shadow)}.toolbar input,select,input{min-height:42px;border:1px solid var(--line);border-radius:8px;padding:0 12px;background:#ffffffe6;color:var(--text);outline:none}.toolbar input:focus,select:focus,input:focus{border-color:#315fce8a;box-shadow:0 0 0 4px #315fce1a}.toolbar input{width:min(380px,48vw)}.device-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}.device-card,.scene-card,.account-card{position:relative;overflow:hidden;padding:16px;transition:transform .16s ease,box-shadow .16s ease}.device-card{padding-left:18px}.device-card:hover,.scene-card:hover,.account-card:hover{transform:translateY(-2px);box-shadow:0 24px 56px #0f172a24}.device-meta{display:flex;flex-wrap:wrap;gap:8px;margin:14px 0}.device-meta span{border:1px solid var(--line);border-radius:999px;padding:6px 10px;background:#fff9;color:var(--muted);font-size:12px;font-weight:800}.channel-row{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:13px 0;border-top:1px solid var(--line)}.scene-card ul{margin:14px 0 0;padding-left:18px;color:var(--muted)}.scene-card li+li{margin-top:8px}.scene-editor{margin-bottom:16px;padding:16px}.scene-form{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;align-items:end}label{display:grid;gap:6px;color:#344054;font-size:13px;font-weight:900}.dialog{width:min(560px,calc(100vw - 28px));border:0;border-radius:8px;padding:0;box-shadow:0 28px 74px #0f172a47}.dialog::backdrop{background:#11182785;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}.dialog form{display:grid;gap:14px;padding:18px;background:#fff}.instructions{border:1px solid rgba(49,95,206,.2);border-radius:8px;padding:12px;background:#eef4ff;color:#214ea3;font-size:13px;line-height:1.45}.empty-state{padding:28px;border:1px dashed var(--line);border-radius:8px;color:var(--muted);text-align:center;background:#ffffff80}@media(max-width:980px){.app-shell{grid-template-columns:1fr}.sidebar{position:sticky;top:0;z-index:5;height:auto;padding:14px;gap:14px}.nav-list,.provider-list{display:flex;overflow-x:auto}.nav-item,.provider-pill{white-space:nowrap;width:auto}.provider-strip{min-width:0}.workspace{padding:16px}.metric-grid,.panel-grid,.device-grid,.scene-form{grid-template-columns:1fr}.topbar,.toolbar,.device-card-head,.account-card,.toolbar-actions{align-items:stretch;flex-direction:column}.toolbar input{width:100%}.device-row,.scene-row,.channel-row{align-items:stretch;flex-direction:column}.row-actions{justify-content:space-between}}
