*{box-sizing:border-box}body{margin:0;font:15px/1.45 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;background:#f4f5f7;color:#1d2330}
header{display:flex;gap:20px;align-items:center;background:#1d2330;color:#fff;padding:10px 20px}header a{color:#fff;text-decoration:none}
.brand{font-weight:700}nav{display:flex;gap:14px;flex:1}nav a{opacity:.85}nav a:hover{opacity:1}
main{max-width:1100px;margin:20px auto;padding:0 16px;width:100%;box-sizing:border-box;flex:1 0 auto}.card{background:#fff;border-radius:10px;padding:16px 20px;margin-bottom:16px;box-shadow:0 1px 2px rgba(0,0,0,.06)}
.narrow{max-width:420px;margin:60px auto}h1{font-size:22px;margin:0 0 12px}h2{font-size:17px;margin:0 0 10px}h3{font-size:15px}
table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:6px 8px;border-bottom:1px solid #eceef2;vertical-align:top}
label{display:block;margin:6px 0}input,select,textarea{display:block;width:100%;max-width:420px;padding:7px 9px;border:1px solid #c9ced8;border-radius:6px;font:inherit}
input[type=checkbox]{display:inline;width:auto}button,.button{display:inline-block;padding:7px 14px;border:0;border-radius:6px;background:#2f6fde;color:#fff;font:inherit;cursor:pointer;text-decoration:none;margin-top:6px}
button.small{padding:3px 9px;font-size:13px;margin:0}button.ok{background:#1f9d55}button.danger{background:#c53030}button.link{background:none;color:#fff;padding:0;margin:0}
.row{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end}.row input,.row select{width:auto}.inline{display:inline}form.inline{margin:0}
.flash{background:#e6f0ff;border-left:4px solid #2f6fde;padding:8px 12px;border-radius:6px}.flash.err{background:#fdecec;border-color:#c53030}
.st{font-size:12px;padding:2px 8px;border-radius:10px;background:#e2e8f0}.st.approved,.st.Acknowledged{background:#d7f5e3}.st.pending,.st.queued,.st.NotNow{background:#fff3cd}
.st.removed,.st.Error,.st.failed,.st.CommandFormatError{background:#fde2e2}.good{color:#1f9d55;font-weight:600}.bad{color:#c53030;font-weight:600}
.note{color:#5b6475;font-size:13px}dl.grid{display:grid;grid-template-columns:140px 1fr 140px 1fr;gap:4px 12px}dt{color:#5b6475}dd{margin:0}
fieldset{border:1px solid #e2e5eb;border-radius:8px;margin:8px 0}.danger-zone{border:1px solid #f3c4c4}details{margin:8px 0}summary{cursor:pointer;font-weight:600}
code{background:#f0f2f5;padding:1px 5px;border-radius:4px;font-size:13px}.sel{user-select:all}
.inline-label{display:flex;gap:6px;align-items:center}.inline-label input{width:auto}fieldset.bulk{margin-top:14px}
button.warn{background:#d97706}a.button.grey{background:#6b7280}
.modal{display:none;position:fixed;inset:0;background:rgba(15,20,30,.5);align-items:center;justify-content:center;z-index:20}
.modal:target{display:flex}.modal .box{background:#fff;border-radius:12px;padding:18px 22px;max-width:460px;width:92%;box-shadow:0 10px 40px rgba(0,0,0,.25)}
button.wide{width:100%;padding:10px}.center{text-align:center}[hidden]{display:none!important}
/* device header (Miradore-style) */
.devtop{display:flex;gap:24px;align-items:stretch;flex-wrap:wrap}.devinfo{flex:1 1 420px}.devmap{flex:0 1 380px}
.facts{display:grid;grid-template-columns:1fr 1fr;gap:14px 28px;margin:10px 0 6px}.facts div{display:flex;flex-direction:column}
.facts .lbl{color:#5b6475;font-size:13px}.facts b{font-size:17px;display:flex;align-items:center;gap:7px}.small{font-size:13px}
.dot{display:inline-block;width:12px;height:12px;border-radius:50%;background:#b8bec9;margin-right:6px;vertical-align:-1px}.dot.on{background:#1f9d55}
svg.map{width:100%;height:auto;border-radius:10px;background:#e8eef5;display:block}.maplbl{font-size:12px;color:#5b6475;margin:6px 0 0}
.nomap{height:180px;border-radius:10px;background:#eef1f5;color:#5b6475;display:flex;align-items:center;justify-content:center;text-align:center;padding:20px;font-size:14px}
.cols2{display:grid;grid-template-columns:minmax(260px,1fr) 2fr;gap:28px}.storagebox{display:flex;gap:18px;align-items:center}
svg.donut{width:120px;height:120px;flex:none}dl.kv{display:grid;grid-template-columns:auto 1fr;gap:4px 12px;margin:0}dl.kv dt{color:#5b6475}dl.kv dd{margin:0;font-weight:600}
table.kvtable td:first-child{color:#5b6475;width:45%}header .navright{margin-left:auto;opacity:.85}header .navright:hover{opacity:1}
@media (max-width:800px){.cols2,.facts{grid-template-columns:1fr}}
/* dashboard widgets */
.widgets{display:grid;grid-template-columns:repeat(auto-fill,minmax(250px,1fr));gap:16px;margin-bottom:16px}
.widget{background:#fff;border-radius:10px;padding:14px 16px;box-shadow:0 1px 2px rgba(0,0,0,.06)}.widget h3{margin:0 0 10px;font-size:15px}
.wbody{display:flex;align-items:center;justify-content:space-between;gap:10px}ul.legend{list-style:none;margin:0;padding:0;font-size:12.5px;color:#374151}
ul.legend li{display:flex;align-items:center;gap:6px;margin:3px 0}svg.ring{width:110px;height:110px;flex:none}svg.bars{width:100%;height:auto}
.toolbar{margin-bottom:10px}button.grey{background:#6b7280}table.list th{background:#f3f4f6;font-size:13px}table.list td{font-size:14px}
ul.menu{list-style:none;padding:0;margin:0 0 12px}ul.menu li a{display:block;padding:9px 12px;border-radius:6px;text-decoration:none;color:#1d2330}ul.menu li a:hover{background:#eef2ff}
.filters{gap:16px;align-items:center;margin:8px 0}.filters input[type=search]{max-width:320px}.rtable td .note{font-size:12px;margin:2px 0 0;max-width:640px}.rlabel{font-weight:500;cursor:pointer;display:inline}
.rtable tr[hidden]{display:none}
.rtable tr.changed td{background:#fff7e0}
.dot.sleep{background:#f59e0b}
.dot.bad{background:#dc2626}.pill{display:inline-block;padding:1px 8px;border-radius:10px;background:#eef0f4;font-size:12px;margin:1px 0}.pill.good{background:#dcfce7;color:#166534}.pill.bad{background:#fee2e2;color:#991b1b}
footer.credit{text-align:right;padding:4px 16px 14px;font-size:12px;color:#6b7280}footer.credit .heart{color:#e11d48;text-decoration:none}footer.credit a{color:#6b7280}
.sub{font-size:13px;color:#6b7280;font-weight:400}
.row.spread{justify-content:space-between;align-items:center}details.labeledit{margin:4px 0 8px}details.labeledit input{max-width:260px}

body{min-height:100vh;display:flex;flex-direction:column}
.tabs{display:flex;gap:4px;margin-bottom:12px;border-bottom:1px solid #e2e5ea}.tabs a{padding:8px 14px;text-decoration:none;color:#4b5563;border-bottom:2px solid transparent;margin-bottom:-1px}.tabs a.on{color:#1d4ed8;border-bottom-color:#2f6fde;font-weight:600}
textarea[name=wgconf]{font-family:ui-monospace,Menlo,monospace;font-size:13px;max-width:640px}
fieldset[hidden]{display:none}

tr.win td{background:#eaf6fd}.pill.win{background:#d4edfb;color:#075985}section.wincard{border-left:4px solid #7cc4f0}code.big{font-size:20px;letter-spacing:1px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:16px}.grid2>.card{margin:0 0 16px}@media(max-width:900px){.grid2{grid-template-columns:1fr}}details.card{padding:12px 20px}
.wpresults{max-height:560px;overflow:auto;margin:8px 0 14px}.wpitem{border:1px solid #e2e5ea;border-radius:8px;padding:10px 12px;margin:0 0 8px}.wpitem .wphead{display:flex;gap:6px;align-items:center;flex-wrap:wrap}.wpitem .note{margin:4px 0}.wpitem select,.wpitem input{max-width:520px}.wpselected{list-style:none;padding:0;margin:0}.wpselected li{padding:6px 0;border-bottom:1px solid #eef0f4}
.demobar{margin:0;padding:7px 16px;background:#fff7d6;border-bottom:1px solid #f0d77a;font-size:13px;text-align:center}.demobar a{font-weight:600}
