:root{color:#d8dee9;background-color:#0b1120;font-family:Inter,Segoe UI,Roboto,Arial,sans-serif}*{box-sizing:border-box}body{color:#d8dee9;background:radial-gradient(circle at top,#162447 0%,#0b1120 40%,#090d19 100%);min-height:100vh;margin:0}#root{min-height:100vh}.app-shell{max-width:1200px;margin:0 auto;padding:1.25rem}.topbar{flex-wrap:wrap;justify-content:space-between;align-items:end;gap:1rem;display:flex}h1{margin:0;font-size:1.8rem}h2{margin:0;font-size:1rem}p{color:#9fb0c8;margin:.35rem 0 0}.toolbar{background:#101a2e;border:1px solid #243350;border-radius:.6rem;flex-wrap:wrap;align-items:center;gap:.5rem;padding:.55rem;display:flex}.reader-control-bar{border-left:1px solid #2f456c;flex-wrap:wrap;align-items:center;gap:.35rem;margin-left:.25rem;padding-left:.55rem;display:flex}.reader-control-bar-label{color:#9fb0c8;min-width:5.5rem;font-size:.78rem}select,input,button{color:#eef2ff;background:#111a2d;border:1px solid #2f456c;border-radius:.45rem;padding:.45rem .6rem}button{cursor:pointer}.banner{border-radius:.6rem;margin-top:.8rem;padding:.7rem .8rem;font-size:.95rem}.banner.demo{background:#1f2937;border:1px solid #374151}.banner.error{background:#991b1b40;border:1px solid #ef4444}.banner.success{background:#16653440;border:1px solid #22c55e}.tabs{gap:.6rem;margin-top:1rem;display:flex}.tabs a{color:#b8c3d9;background:#11192b;border:1px solid #2b3f61;border-radius:.5rem;padding:.5rem .75rem;text-decoration:none}.tabs a.active{color:#fff;background:#1f3d74;border-color:#4f79be}main{margin-top:1rem}.kpi-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.8rem;display:grid}.kpi-card{background:#10182a;border:1px solid #263755;border-radius:.7rem;padding:.9rem}.kpi-title{margin:0;font-size:.9rem}.kpi-value{color:#f8fbff;margin:.4rem 0 0;font-size:1.35rem}.kpi-muted{margin:.2rem 0 0;font-size:.8rem}.status-row{flex-wrap:wrap;gap:.7rem;margin-top:.9rem;display:flex}.status-badge{border:1px solid;border-radius:999px;align-items:center;gap:.5rem;padding:.4rem .75rem;display:inline-flex}.status-badge .dot{border-radius:999px;width:.55rem;height:.55rem}.status-badge.ok{background:#16653440;border-color:#22c55e}.status-badge.ok .dot{background:#22c55e}.status-badge.ko{background:#7f1d1d40;border-color:#ef4444}.status-badge.ko .dot{background:#ef4444}.status-badge.warn{background:#92400e40;border-color:#f59e0b}.status-badge.warn .dot{background:#f59e0b}.reader-control-status{flex-wrap:wrap;gap:.7rem;margin-bottom:.9rem;display:flex}.reader-control-actions{flex-wrap:wrap;gap:.5rem;display:flex}button.danger{background:#7f1d1d59;border-color:#b91c1c}button:disabled{opacity:.45;cursor:not-allowed}.reader-control-msg{margin:.7rem 0 0;font-size:.9rem}.reader-control-msg.success{color:#86efac}.reader-control-msg.error{color:#fca5a5}.reader-control-hint{color:#8fa3bf;margin:.65rem 0 0;font-size:.82rem}.health-page-stack{gap:1rem;display:grid}.stack{gap:.8rem;margin-top:.9rem;display:grid}.panel{background:#10182a;border:1px solid #253654;border-radius:.7rem;padding:.75rem}.panel-header{justify-content:space-between;align-items:center;margin-bottom:.55rem;display:flex}.table-wrap{width:100%;overflow-x:auto}table{border-collapse:collapse;width:100%;font-size:.9rem}th,td{text-align:left;border-bottom:1px solid #253654;padding:.55rem}th{color:#b8c3d9;font-weight:600}.empty-row{text-align:center;color:#91a0bb}.filters{grid-template-columns:2fr 1fr 1fr auto;gap:.5rem;margin-bottom:.55rem;display:grid}.event-pill{border-radius:999px;padding:.2rem .55rem;font-size:.75rem;font-weight:600;display:inline-block}.event-pill.in{color:#86efac;background:#22c55e40}.event-pill.out{color:#fecaca;background:#f8717140}.loading{text-align:center;padding:1.2rem}.alerts-list{margin:.75rem 0 0;padding-left:1.1rem}.alert-item{color:#fecaca}.ok-item{color:#86efac}.settings-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.75rem;margin-top:1rem;display:grid}.field{flex-direction:column;gap:.35rem;display:flex}.field span{color:#b8c3d9;font-size:.9rem}.actions-row{justify-content:flex-end;margin-top:1rem;display:flex}.entry-actions{margin-top:.8rem}.box-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem;margin-top:1rem;display:grid}.box-card{background:#111a2d;border:1px solid #2f456c;border-radius:.7rem;padding:.8rem}.box-title{color:#f8fbff;margin:0;font-size:1rem;font-weight:700}.box-meta{margin:.25rem 0}@media (width<=960px){.kpi-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.settings-grid,.box-grid{grid-template-columns:1fr}}@media (width<=680px){.kpi-grid,.filters{grid-template-columns:1fr}}.live-indicator{color:#86efac;white-space:nowrap;align-items:center;gap:.45rem;font-size:.9rem;font-weight:700;display:inline-flex}.live-indicator:before{content:"";background:#22c55e;border-radius:999px;width:.55rem;height:.55rem;box-shadow:0 0 0 .25rem #22c55e29}.live-indicator.polling,.live-indicator.connecting{color:#fcd34d}.live-indicator.polling:before,.live-indicator.connecting:before{background:#f59e0b;box-shadow:0 0 0 .25rem #f59e0b29}.live-indicator.offline{color:#fca5a5}.live-indicator.offline:before{background:#ef4444;box-shadow:0 0 0 .25rem #ef44442e}.live-badges{flex-wrap:wrap;gap:.4rem;display:inline-flex}.live-badge{color:#fff;white-space:nowrap;background:#6b7280;border-radius:999px;align-items:center;padding:.45rem .8rem;font-size:.86rem;font-weight:800;transition:background .2s;display:inline-flex}.live-badge.door.closed{background:#16a34a}.live-badge.door.open{background:#ea580c}.live-badge.ir.idle{background:#166534}.live-badge.ir.hit{background:#dc2626}.live-badge.ir.blocked{background:#b45309}.health-page-stack{flex-direction:column;gap:1rem;display:flex}.health-hero{background:linear-gradient(135deg,#10182af5,#15263ff5);border:1px solid #263755;border-radius:.75rem;justify-content:space-between;align-items:center;gap:1rem;padding:1rem;display:flex}.health-hero.ok{border-color:#22c55e66}.health-hero.warn{border-color:#f59e0b8c}.health-eyebrow{color:#8fb3ff;text-transform:uppercase;letter-spacing:0;font-size:.78rem;font-weight:700}.health-hero h2{margin-top:.25rem;font-size:1.35rem}.health-hero-status{color:#eef2ff;background:#0f1a2d;border:1px solid #2f456c;border-radius:999px;flex:none;padding:.55rem .8rem;font-weight:700}.health-metrics-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.8rem;display:grid}.health-metric{background:#10182a;border:1px solid #263755;border-radius:.7rem;min-height:9.2rem;padding:.9rem}.health-metric.ok{border-color:#22c55e5c}.health-metric.warn{border-color:#f59e0b94}.health-metric.danger{border-color:#ef4444ad}.health-metric.unknown{border-color:#334155}.health-metric-topline{color:#b8c3d9;justify-content:space-between;gap:.75rem;font-size:.82rem;display:flex}.health-metric-topline strong{color:#eef2ff}.health-metric-value{color:#f8fbff;margin-top:.75rem;font-size:1.65rem;font-weight:800}.health-metric-detail{margin-top:.55rem;font-size:.88rem;line-height:1.4}.health-alert-panel{background:#10182a;border:1px solid #263755;border-radius:.7rem;padding:.9rem}.health-empty{color:#86efac;margin-top:.75rem}@media (width<=960px){.health-metrics-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=680px){.health-hero{flex-direction:column;align-items:flex-start}.health-metrics-grid{grid-template-columns:1fr}}.global-health-badge{white-space:nowrap;border:1px solid;border-radius:999px;align-items:center;gap:.45rem;padding:.45rem .65rem;font-size:.86rem;font-weight:800;display:inline-flex}.global-health-badge:before{content:"";border-radius:999px;width:.55rem;height:.55rem}.global-health-badge.ok{color:#bbf7d0;background:#16653438;border-color:#22c55e8c}.global-health-badge.ok:before{background:#22c55e}.global-health-badge.warning{color:#fde68a;background:#92400e3d;border-color:#f59e0ba6}.global-health-badge.warning:before{background:#f59e0b}.global-health-badge.critical{color:#fecaca;background:#7f1d1d4d;border-color:#ef4444b8}.global-health-badge.critical:before{background:#ef4444}.live-events-panel,.diagnostic-hero,.maintenance-hero{background:#10182a;border:1px solid #263755;border-radius:.75rem;margin-top:1rem;padding:.9rem}.live-events-grid{grid-template-columns:repeat(4,minmax(0,1fr));gap:.7rem;display:grid}.live-event{background:#0f1728;border:1px solid #273957;border-radius:.6rem;align-items:center;gap:.65rem;min-height:4.2rem;padding:.65rem;display:flex}.live-event strong{color:#f8fbff}.live-event p{font-size:.78rem}.live-event.in{border-color:#22c55e59}.live-event.out{border-color:#f8717159}.diagnostic-layout,.maintenance-layout{gap:1rem;display:grid}.diagnostic-hero,.maintenance-hero{justify-content:space-between;align-items:center;gap:1rem;margin-top:0;display:flex}.diagnostic-hero.ok{border-color:#22c55e73}.diagnostic-hero.warning{border-color:#f59e0ba6}.diagnostic-hero.critical{border-color:#ef4444c7}.diagnostic-hero h2,.maintenance-hero h2{margin-top:.25rem;font-size:1.45rem}.score-ring{background:#0d1628;border:1px solid #38527a;border-radius:999px;place-items:center;width:6.2rem;height:6.2rem;display:grid}.score-ring strong{color:#f8fbff;font-size:1.65rem;line-height:1;display:block}.score-ring span{color:#9fb0c8;font-size:.78rem}.diagnostic-grid{grid-template-columns:minmax(0,1.4fr) minmax(280px,.8fr);gap:1rem;display:grid}.diagnostic-card{min-height:17rem}.temp-chart{background:linear-gradient(#0f17288c,#0b1120f2);border:1px solid #243350;border-radius:.55rem;align-items:end;gap:.18rem;height:12rem;padding:.65rem;display:flex;overflow:hidden}.temp-bar-pair{flex:1;align-items:end;gap:.08rem;min-width:.35rem;height:100%;display:flex}.temp-bar{border-radius:999px 999px 0 0;flex:1;min-height:.25rem}.temp-bar.pi{background:#60a5fa}.temp-bar.reader{background:#34d399}.chart-legend{color:#b8c3d9;gap:1rem;margin-top:.65rem;font-size:.85rem;display:flex}.chart-legend span:before{content:"";border-radius:999px;width:.65rem;height:.65rem;margin-right:.35rem;display:inline-block}.legend-pi:before{background:#60a5fa}.legend-reader:before{background:#34d399}.health-mini-grid,.meta-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:.65rem;display:grid}.health-mini-grid div,.meta-grid div{background:#0f1728;border:1px solid #263755;border-radius:.55rem;min-width:0;padding:.7rem}.health-mini-grid span,.meta-grid span{color:#9fb0c8;margin-bottom:.3rem;font-size:.78rem;display:block}.health-mini-grid strong,.meta-grid strong{color:#f8fbff;overflow-wrap:anywhere}.recommendation-list{color:#dbeafe;margin:.6rem 0 0;padding-left:1.1rem}.recommendation-list li+li{margin-top:.45rem}.event-feed{gap:.45rem;display:grid}.system-event{background:#0f1728;border:1px solid #263755;border-radius:.55rem;justify-content:space-between;gap:.75rem;padding:.65rem;display:flex}.system-event.warning{border-color:#f59e0b73}.system-event.critical{border-color:#ef44448c}.system-event.info{border-color:#60a5fa73}.system-event span{color:#9fb0c8;white-space:nowrap;font-size:.82rem}.logs-box{white-space:pre-wrap;color:#cbd5e1;background:#070c16;border:1px solid #243350;border-radius:.55rem;max-height:26rem;padding:.75rem;font-size:.78rem;line-height:1.45;overflow:auto}@media (width<=960px){.tabs{padding-bottom:.2rem;overflow-x:auto}.tabs a{white-space:nowrap}.live-events-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.diagnostic-grid{grid-template-columns:1fr}}@media (width<=680px){.app-shell{padding:.8rem}.topbar,.toolbar,.reader-control-bar,.diagnostic-hero,.maintenance-hero{flex-direction:column;align-items:stretch}.toolbar,.reader-control-bar{width:100%}.reader-control-bar{border-top:1px solid #2f456c;border-left:0;margin-left:0;padding-top:.55rem;padding-left:0}.global-health-badge,.live-indicator,.reader-control-bar button,.toolbar button{justify-content:center;width:100%}.live-events-grid,.health-mini-grid,.meta-grid{grid-template-columns:1fr}.score-ring{border-radius:.65rem;width:100%;height:4.4rem}.system-event{flex-direction:column}.system-event span{white-space:normal}}.settings-section{border-top:1px solid #263755;margin-top:1.5rem;padding-top:1.2rem}.settings-section:first-of-type{border-top:none;margin-top:.5rem;padding-top:0}.settings-section h3{color:#eef2ff;margin:0 0 .4rem;font-size:1.05rem}.settings-section p.hint{color:#9fb0c8;margin:0 0 .85rem;font-size:.85rem;line-height:1.4}.settings-filepath{color:#9fb0c8;overflow-wrap:anywhere;margin:.4rem 0 .8rem;font-size:.8rem}.rules-list{flex-direction:column;gap:.7rem;margin-top:.6rem;display:flex}.rule-card{background:#0f1728;border:1px solid #263755;border-radius:.65rem;padding:.9rem;transition:opacity .12s}.rule-card.rule-card-off{opacity:.55}.rule-card-header{flex-wrap:wrap;justify-content:space-between;align-items:center;gap:.55rem;margin-bottom:.65rem;display:flex}.rule-card-title{color:#f8fbff;background:0 0;border:1px solid #0000;border-radius:.4rem;flex:1;min-width:10rem;padding:.35rem .5rem;font-size:1rem;font-weight:700}.rule-card-title:hover:not(:disabled),.rule-card-title:focus:not(:disabled){background:#0a1120;border-color:#38507a;outline:none}.rule-card-actions{flex-wrap:wrap;align-items:center;gap:.55rem;display:flex}.rule-toggle{color:#b8c3d9;cursor:pointer;align-items:center;gap:.35rem;font-size:.85rem;display:inline-flex}.rule-card-grid{grid-template-columns:repeat(3,minmax(0,1fr));gap:.55rem;margin-bottom:.55rem;display:grid}.days-row{flex-wrap:wrap;gap:.4rem;margin-top:.2rem;display:flex}.day-chip{color:#b8c3d9;cursor:pointer;-webkit-user-select:none;user-select:none;background:#0a1120;border:1px solid #263755;border-radius:999px;justify-content:center;align-items:center;min-width:2.6rem;padding:.3rem .65rem;font-size:.82rem;font-weight:600;transition:background .1s,border-color .1s,color .1s;display:inline-flex}.day-chip:hover:not(:disabled){color:#eef2ff;border-color:#38507a}.day-chip.active{color:#fff;background:#1f6feb;border-color:#1f6feb}.day-chip:disabled{cursor:not-allowed;opacity:.6}.rule-hint{color:#6b7d99;margin:.55rem 0 0;font-size:.78rem;font-style:italic}.empty-rules{text-align:center;color:#9fb0c8;background:#0f172880;border:1px dashed #324461;border-radius:.6rem;margin-top:.7rem;padding:1rem;font-size:.9rem}.btn-primary,.btn-secondary,.btn-danger{cursor:pointer;border-radius:.45rem;padding:.45rem .85rem;font-size:.88rem;font-weight:600;transition:background .12s,border-color .12s}.btn-primary{color:#fff;background:#1f6feb;border:1px solid #1f6feb}.btn-primary:hover:not(:disabled){background:#2a7fff;border-color:#2a7fff}.btn-secondary{color:#e5edff;background:#1a2543;border:1px solid #2f456c}.btn-secondary:hover:not(:disabled){background:#233156;border-color:#3d5784}.btn-danger{color:#fca5a5;background:#ef44441f;border:1px solid #ef44448c}.btn-danger:hover:not(:disabled){background:#ef444438;border-color:#ef4444}.btn-primary:disabled,.btn-secondary:disabled,.btn-danger:disabled{opacity:.55;cursor:not-allowed}.rules-actions{justify-content:flex-start}@media (width<=960px){.rule-card-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}@media (width<=680px){.rule-card-grid{grid-template-columns:1fr}.rule-card-header{flex-direction:column;align-items:stretch}.rule-card-actions{justify-content:space-between}}
