:root{color:#1f2933;font-synthesis:none;text-rendering:optimizelegibility;-webkit-font-smoothing:antialiased;background-color:#eef2f6;font-family:Segoe UI,Hiragino Sans,Yu Gothic UI,Meiryo,sans-serif;line-height:1.5}*{box-sizing:border-box}body{background:linear-gradient(#eef2f6 0%,#e4eaf1 100%);min-width:320px;min-height:100vh;margin:0}h1,h2,p{margin:0}button,input{font:inherit}.app{max-width:1180px;margin:0 auto;padding:32px 20px 48px}.app-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:16px;margin-bottom:24px;display:flex}.app-header h1{letter-spacing:.02em;font-size:1.7rem}.subtitle{color:#52606d;margin-top:4px;font-size:.95rem}.gateway-status{background:#fff;border:1px solid #d9e2ec;border-radius:999px;align-items:center;gap:10px;padding:10px 16px;font-size:.9rem;display:flex;box-shadow:0 2px 8px #0f172a0f}.gateway-status:before{content:"";background:#adb5bd;border-radius:50%;width:10px;height:10px}.gateway-status.online:before{background:#2f9e44;box-shadow:0 0 0 4px #2f9e4426}.gateway-status.offline:before{background:#e03131;box-shadow:0 0 0 4px #e0313126}.gateway-label{color:#52606d}.gateway-last-seen{color:#7b8794;font-size:.82rem}.error-banner{color:#b42318;background:#fff1f0;border:1px solid #ffa8a8;border-radius:10px;margin-bottom:20px;padding:12px 16px}.loading,.empty{text-align:center;color:#7b8794;padding:32px 0}.door-grid{grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:18px;display:grid}.door-card{background:#fff;border:1px solid #d9e2ec;border-top:4px solid #adb5bd;border-radius:14px;flex-direction:column;gap:14px;padding:18px;transition:border-color .2s,background-color .2s,transform .2s;display:flex;box-shadow:0 6px 18px #0f172a0f}.door-card:hover{transform:translateY(-2px)}.door-card.state-open{border-top-color:#e8590c}.door-card.state-closed{border-top-color:#2f9e44}.door-card.state-offline{background:#f8f9fa;border-top-color:#868e96}.door-card.level-warning{background:#fff9e6;border-color:#f59f00}.door-card.level-danger{background:#fff1f0;border-color:#e03131}.door-card-header{justify-content:space-between;align-items:flex-start;gap:12px;display:flex}.door-card-header h2{font-size:1.05rem;line-height:1.35}.state-badge{color:#fff;background:#868e96;border-radius:999px;flex-shrink:0;padding:4px 12px;font-size:.8rem;font-weight:700}.state-badge.state-open{background:#e8590c}.state-badge.state-closed{background:#2f9e44}.state-badge.state-offline{background:#868e96}.door-body{min-height:86px}.elapsed-label{color:#52606d;font-size:.85rem}.elapsed-value{font-variant-numeric:tabular-nums;letter-spacing:.02em;font-size:2rem;font-weight:700;line-height:1.2}.elapsed-value.muted{color:#52606d;font-size:1.25rem;font-weight:600}.level-warning .elapsed-value{color:#b35c00}.level-danger .elapsed-value{color:#c92a2a}.opened-at{color:#7b8794;margin-top:4px;font-size:.78rem}.door-card-footer{color:#7b8794;border-top:1px solid #e4eaf1;flex-wrap:wrap;align-items:center;gap:6px 14px;padding-top:12px;font-size:.78rem;display:flex}.door-actions{gap:6px;margin-left:auto;display:flex}.panel-toggle{color:#334e68;cursor:pointer;background:#f8fafc;border:1px solid #cbd5e1;border-radius:999px;padding:3px 12px;font-size:.78rem}.panel-toggle:hover{background:#e8eef5}.panel-toggle:focus-visible{outline-offset:2px;outline:2px solid #4c6ef5}.door-history{border-top:1px solid #e4eaf1;padding-top:12px}.door-history h3{color:#52606d;margin-bottom:8px;font-size:.82rem;font-weight:700}.history-status{color:#7b8794;font-size:.8rem}.history-error{color:#b42318}.history-list{flex-direction:column;gap:6px;list-style:none;display:flex}.history-item{color:#52606d;align-items:center;gap:8px;font-size:.8rem;display:flex}.history-badge{color:#fff;border-radius:50%;flex-shrink:0;justify-content:center;align-items:center;width:20px;height:20px;font-size:.68rem;font-weight:700;display:inline-flex}.history-badge.state-open{background:#e8590c}.history-badge.state-closed{background:#2f9e44}.history-time{font-variant-numeric:tabular-nums}.history-duration{color:#7b8794;margin-left:auto}.door-battery{border-top:1px solid #e4eaf1;padding-top:12px}.battery-header{justify-content:space-between;align-items:center;gap:8px;margin-bottom:8px;display:flex}.battery-header h3{color:#52606d;font-size:.82rem;font-weight:700}.battery-ranges{gap:4px;display:flex}.battery-range{color:#52606d;cursor:pointer;background:#f8fafc;border:1px solid #cbd5e1;border-radius:999px;padding:2px 8px;font-size:.72rem}.battery-range.selected{color:#2b8a3e;background:#ebfbee;border-color:#2f9e44}.battery-range:focus-visible{outline-offset:2px;outline:2px solid #4c6ef5}.battery-summary{flex-wrap:wrap;gap:6px 16px;margin-bottom:6px;display:flex}.battery-summary div{align-items:baseline;gap:4px;display:flex}.battery-summary dt{color:#7b8794;font-size:.72rem}.battery-summary dd{color:#334e68;font-variant-numeric:tabular-nums;font-size:.85rem;font-weight:700}.battery-chart{width:100%;height:auto;display:block}.chart-line{fill:none;stroke:#2f9e44;stroke-width:2px;stroke-linecap:round;stroke-linejoin:round}.chart-point{fill:#2f9e44}.chart-grid{stroke:#e4eaf1;stroke-width:1px;stroke-dasharray:3 3}.chart-axis{fill:#7b8794;font-variant-numeric:tabular-nums;font-size:9px}.battery-axis-range{color:#7b8794;justify-content:space-between;margin-top:2px;font-size:.68rem;display:flex}.battery-trend{color:#52606d;margin-top:6px;font-size:.75rem}.battery-trend.muted{color:#7b8794}.battery-low{color:#c92a2a;font-weight:700}.door-usage{border-top:1px solid #e4eaf1;padding-top:12px}.usage-hours{align-items:flex-end;gap:2px;height:40px;margin-top:6px;display:flex}.usage-hour{background:#f1f5f9;border-radius:2px;flex:1;align-items:flex-end;height:100%;display:flex}.usage-hour>span{background:#4c6ef5;border-radius:2px;width:100%;display:block}.usage-hours-axis{color:#7b8794;justify-content:space-between;margin:2px 0 10px;font-size:.65rem;display:flex}.usage-days{flex-direction:column;gap:4px;max-height:220px;list-style:none;display:flex;overflow-y:auto}.usage-days li{color:#52606d;align-items:center;gap:8px;font-size:.75rem;display:flex}.usage-date{font-variant-numeric:tabular-nums;flex-shrink:0;width:3.2rem}.usage-bar{background:#eef2f6;border-radius:999px;flex:1;height:8px;overflow:hidden}.usage-bar>span{background:#2f9e44;border-radius:999px;height:100%;display:block}.usage-count{text-align:right;font-variant-numeric:tabular-nums;width:2.2rem}.usage-time{text-align:right;color:#7b8794;font-variant-numeric:tabular-nums;width:4.2rem}.app-footer{color:#7b8794;flex-wrap:wrap;justify-content:space-between;gap:8px;margin-top:28px;font-size:.8rem;display:flex}@media (width<=640px){.app{padding:20px 14px 36px}.app-header h1{font-size:1.35rem}.gateway-status{justify-content:space-between;width:100%}}
