:root{color-scheme:light;--bg: #ffffff;--surface: #ffffff;--surface-muted: #f4f4f6;--border: #dddddf;--text: #333842;--text-muted: #7a7f8d;--accent: #7d55c7;--accent-soft: #ece7fa;--success: #19a55a;--warning: #c47a00;--danger: #e33535;--teal: #10a98e;--radius: 4px;font-family:Inter,system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,sans-serif}*{box-sizing:border-box}body{margin:0;background:var(--bg);color:var(--text)}button,input,summary{font:inherit}button{border:1px solid var(--border);background:var(--surface);color:var(--text);border-radius:4px;padding:.45rem .7rem;cursor:pointer}button:hover{border-color:var(--accent)}.app-shell{min-height:100vh;display:grid;grid-template-columns:205px minmax(0,1fr);align-items:start}.sidebar{border-right:1px solid var(--border);background:#f7f7f8;padding:.75rem;position:sticky;top:0;max-height:100vh;overflow:auto}.content{padding:0 1rem 2rem;min-width:0}.panel{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:.75rem;box-shadow:none}.stack{display:grid;gap:.75rem}.header{display:flex;justify-content:space-between;gap:1rem;align-items:flex-start;margin:0 -1rem .75rem;padding:.6rem 1rem;border-bottom:1px solid var(--border);box-shadow:0 1px 5px #00000018}.title{margin:0 0 .2rem;color:var(--accent);font-size:1.08rem;font-weight:600}.muted{color:var(--text-muted)}.meta-row{display:flex;flex-wrap:wrap;gap:.5rem}.badge{display:inline-flex;align-items:center;gap:.35rem;padding:.15rem .42rem;border-radius:999px;font-size:.72rem;border:1px solid var(--border);background:var(--surface-muted)}.badge.fixture{background:var(--accent-soft);color:var(--accent)}.badge.success{color:var(--success)}.badge.warning{color:var(--warning)}.badge.danger{color:var(--danger)}.customer-list{display:grid;gap:.45rem}.customer-item{width:100%;text-align:left;border-radius:4px;padding:.55rem;display:grid;gap:.25rem;min-width:0}.customer-item.selected{border-color:var(--accent);background:var(--accent-soft)}.customer-name{font-weight:600}.access-scope{display:grid;gap:.5rem;min-width:0}.section-title{margin:0 0 .75rem;font-size:.9rem}.area{border-top:1px solid var(--border);padding-top:1rem;margin-top:1rem}.area:first-child{border-top:0;padding-top:0;margin-top:0}.gateway-grid,.device-grid{display:grid;gap:.7rem}.gateway-grid{grid-template-columns:repeat(auto-fill,minmax(220px,280px));align-items:start}.gateway-card,.device-card{border:1px solid var(--border);border-radius:4px;background:#fff;padding:0;box-shadow:0 2px 8px #00000024}.accordion{border:0;border-radius:0;background:var(--surface);overflow:visible}.accordion summary{display:flex;justify-content:space-between;align-items:center;gap:1rem;padding:.42rem .55rem;cursor:pointer;min-width:0;border-bottom:1px solid #ececef;color:#4a4f5c;font-size:.78rem}.accordion summary>span:first-child{display:grid;gap:.15rem;min-width:0}.accordion-title{position:relative;padding-left:1rem}.accordion-title:before{content:"";position:absolute;left:0;top:.25rem;width:8px;height:8px;border-radius:2px;background:var(--teal)}.hotel-accordion>summary .accordion-title:before{background:#f5a623}.accordion summary strong,.customer-name,.device-title{overflow-wrap:anywhere}.hotel-accordion>summary{background:#fff}.space-accordion{background:#fff}.space-accordion>summary{background:#fafafa;border-top:1px solid #eeeeef}.accordion-body{border-top:0;padding:.65rem .65rem 1rem}.hotel-accordion>.accordion-body{border-left:3px solid var(--teal);margin-left:.2rem}.device-card{display:grid;gap:0;overflow:hidden}.device-card-header{display:flex;gap:.55rem;align-items:center;min-height:54px;padding:.45rem .55rem;background:#dfe8ff;border-bottom:1px solid #cfd8f1}.device-thumb{width:30px;height:38px;border:1px solid #222;border-radius:3px;background:linear-gradient(90deg,#222 0 8px,transparent 8px),linear-gradient(#f6f6f6,#d7d7d7);flex:0 0 auto}.device-heading{min-width:0;flex:1}.device-title{margin:0;color:#27344f;font-size:.78rem;font-weight:600}.device-subtitle{color:#45506a;font-size:.68rem;overflow-wrap:anywhere}.status-dot{width:10px;height:10px;border-radius:999px;border:1px solid #ffffff;box-shadow:0 0 0 1px #00000020;flex:0 0 auto}.status-dot.success{background:var(--success)}.status-dot.warning{background:var(--warning)}.status-dot.danger{background:var(--danger)}.device-action{padding:.32rem .5rem;border-bottom:1px solid #eeeeef;color:var(--accent);font-size:.68rem;text-align:center}.metric-section,.metric-group{border-bottom:1px solid #eeeeef}.metric-group:last-child{border-bottom:0}.metric-group h5{margin:0;padding:.26rem .5rem;background:#f4f4f6;color:#8a8f9b;font-size:.62rem;font-weight:600}.metric-grid{display:grid;grid-template-columns:1fr 1fr}.metric-tile{min-height:66px;padding:.45rem .5rem;border-right:1px solid #eeeeef;border-bottom:1px solid #eeeeef;display:grid;grid-template-columns:auto minmax(0,1fr);column-gap:.35rem;align-content:start}.metric-grid .metric-tile:nth-child(2n){border-right:0}.metric-icon{grid-row:span 3;width:18px;height:18px;border-radius:999px;display:inline-grid;place-items:center;color:currentColor;border:1px solid currentColor;font-size:.62rem;font-weight:700}.metric-tile strong{color:currentColor;font-size:.95rem;line-height:1}.metric-tile span{font-size:.66rem;overflow-wrap:anywhere}.metric-tile small{color:#9aa0aa;font-size:.62rem}.metric-tile.success{color:var(--success)}.metric-tile.warning{color:var(--warning)}.metric-tile.danger{color:var(--danger)}.device-footer{display:flex;justify-content:space-between;align-items:center;gap:.4rem;padding:.4rem .5rem;background:#f7f7f8;color:var(--text-muted);font-size:.65rem}.payload-toggle{padding:0;border:0;background:transparent;color:var(--accent);font-size:.65rem}.empty-state{border:1px dashed var(--border);background:var(--surface);border-radius:var(--radius);padding:1rem;color:var(--text-muted)}.toolbar{display:flex;justify-content:space-between;gap:1rem;align-items:center;flex-wrap:wrap;margin-bottom:1rem}.search{width:100%;border-radius:10px;border:1px solid var(--border);padding:.7rem .8rem}.payload{white-space:pre-wrap;word-break:break-word;border-radius:0;padding:.55rem;background:#f8fafc;border:1px solid var(--border);font-size:.72rem}@media(max-width:900px){.app-shell{grid-template-columns:1fr}.sidebar{border-right:0;border-bottom:1px solid var(--border);position:static;max-height:none}.header{flex-direction:column}.accordion summary{align-items:flex-start;flex-direction:column}}
