/* LoftControl 1.0.0 — visual design based on approved dashboard mockup.
   All sensor values originate from authenticated PigeonGrid responses. */
:root{--lc-bg:#03191e;--lc-panel:#083037;--lc-panel2:#0a3940;--lc-line:#176066;--lc-mint:#42d6a0;--lc-muted:#a5c4c8;--lc-text:#f2fbfc;--lc-glow:#0e7168;--lc-deep:#041e25}
html,body{background:#031b20!important;color:var(--lc-text)!important}
body{background:radial-gradient(ellipse at 50% -3%,#10504d 0,#05262c 31%,#041b20 62%,#03191e 100%) fixed!important;min-width:320px}
a{color:#8ceccb}
button,select,input{font-family:inherit}
[hidden]{display:none!important}
.site-header{position:relative;z-index:2;padding:8px max(24px,calc((100vw - 1430px)/2));min-height:63px!important;background:linear-gradient(90deg,#062c30 0%,#063a3a 60%,#061e24 100%)!important;border-bottom:1px solid #195d5c;box-shadow:0 5px 22px #0005!important;gap:15px}
.site-header:before{content:"";position:absolute;right:15%;top:0;width:300px;height:100%;background:linear-gradient(90deg,#062f32 2%,#062c2c70 24%,#062628ad 80%,#051f23 100%),url(../img/loft-hero.jpg) center/cover no-repeat;opacity:.58;pointer-events:none;z-index:-1}
.brand{gap:13px;min-width:0}.lc-bird{font-size:32px;line-height:1;color:#74ead0;filter:grayscale(1) brightness(0) saturate(1) invert(90%) sepia(29%) saturate(877%) hue-rotate(95deg)}.brand h1{font-size:30px!important;font-weight:850!important;letter-spacing:-.055em!important;margin:0!important;line-height:1}.brand h1 span{font-size:1em!important;color:#45dcaf!important;font-weight:850!important;letter-spacing:inherit!important}.brand-subtitle{font-size:13px;color:#bfdbd9;padding-left:22px;border-left:1px solid #2e8982;margin-left:7px;white-space:nowrap}
.topbar-right{gap:15px;position:relative}.top-online{background:#07392f;border:1px solid #16654f;border-radius:18px;padding:6px 14px;color:#b7f9d3;font-size:12px;font-weight:750;white-space:nowrap}.top-online .status-dot.is-online{background:#38ef85;box-shadow:0 0 0 4px #32df6b26}.top-online .status-dot.is-error{background:#e6a150}.lc-account{font-size:13px;font-weight:750;color:#eaf7f8;white-space:nowrap}.lc-account span{vertical-align:middle}.site-header .refresh-btn{color:#e6fff7;background:linear-gradient(120deg,#0b6448,#0b8064)!important;border:1px solid #26b786!important;padding:9px 15px;border-radius:10px;font-weight:800;font-size:12px;min-height:38px}.site-header .hok-logout{color:#a9d7d2!important;border-color:#3b7370!important;padding:7px!important}
.main-wrap{max-width:1460px!important;padding:13px 23px 10px!important}
.hok-tabs{display:flex!important;width:100%!important;gap:3px!important;max-width:100%;border:0!important;box-shadow:none!important;background:transparent!important;border-radius:0!important;margin:0 0 13px!important;padding:0!important;scrollbar-width:thin}
.hok-tabs button,.hok-tabs .devices-nav{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:1px solid #22545a!important;border-radius:9px!important;color:#eaf7f8!important;background:linear-gradient(#0d363d,#092931)!important;min-height:43px;padding:10px 12px!important;font-size:12px!important;font-weight:800!important;white-space:nowrap;flex:1 0 auto;box-shadow:0 3px 12px #0011165e}
.hok-tabs button span{font-size:19px;font-weight:400;color:#d8fbf7}.hok-tabs button.active{background:linear-gradient(135deg,#39d19b,#0c9a70)!important;border-color:#39e9ac!important;color:white!important;box-shadow:0 0 22px #19ac8152}.hok-tabs button:hover,.hok-tabs .devices-nav:hover{border-color:#2bc8ae!important;background:#12525a!important}
.welcome-row{position:relative;min-height:74px;display:flex;align-items:flex-start!important;justify-content:space-between;gap:12px;margin-bottom:14px!important;padding:6px 15px 0 23px;border-left:4px solid #39dbac}
.welcome-row h2{font-size:31px!important;color:#edfbfc!important;letter-spacing:-.035em!important;margin:0 0 8px!important;line-height:1.05!important;font-weight:800}.welcome-row p{font-size:13px!important;color:#cce5e5!important;line-height:1.5!important}.welcome-actions{margin-top:7px}.source-badge{background:#0e4345!important;color:#87eacf!important;border:1px solid #247e73!important;font-size:11px!important;padding:7px 10px!important}
.metrics{display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;gap:13px!important;margin-bottom:13px!important}.metric-card{min-width:0;display:flex;align-items:center;gap:16px;min-height:84px!important;padding:12px 17px!important;border:1px solid #3a566e!important;background:linear-gradient(150deg,#1b3044,#16283a)!important;border-radius:10px!important;box-shadow:0 3px 12px #001b20a8!important;color:var(--lc-text)!important}.metric-card.first{background:linear-gradient(135deg,#21445f,#182f47)!important;border-color:#399bd2!important}.metric-card:before{display:none}.metric-graphic{font-size:38px;line-height:1;color:#72ddfb;min-width:52px;text-align:center;font-weight:400}.metric-body{min-width:0}.metric-top{font-size:12px!important;color:#f2f9f9!important;font-weight:850;letter-spacing:.025em!important;margin-bottom:3px!important}.metric-value{font-size:29px!important;color:#f8ffff!important;font-weight:850!important;line-height:1.1}.metric-card.first .metric-value{color:#44ef91!important}.metric-value.compact{font-size:25px!important}.metric-bottom{font-size:10px!important;color:#c2e0df!important;margin-top:5px!important;min-height:12px!important}.micro-dot{width:7px;height:7px!important}
.dashboard-primary{display:grid!important;grid-template-columns:minmax(0,1.65fr) minmax(350px,.95fr)!important;gap:13px!important;margin-bottom:12px!important;align-items:stretch}.map-card,.scanner-highlight,.sensor-overview,.table-card,.activity-card{background:linear-gradient(160deg,#1c2e42,#162638)!important;border:1px solid #3b596f!important;box-shadow:0 4px 16px #00121688!important;border-radius:11px!important;color:#eaf9fa!important}
.map-card{padding:11px!important;overflow:hidden}.panel-head{display:flex;align-items:center;justify-content:space-between;gap:6px;margin:0 0 10px!important;min-height:24px}.panel-head h3,.side-card-head h3{font-size:18px!important;font-weight:800!important;margin:0!important;color:#f1fafa!important;line-height:1.1}.panel-icon{font-size:22px;color:#72ddfb;font-weight:400;vertical-align:middle;margin-right:8px}.map-open-btn{font-size:11px;border:1px solid #327b75;background:#20394d;color:#b5f1dc;border-radius:7px;padding:5px 9px;cursor:pointer}.map-open-btn:hover{background:#247aa8}
.map-frame{height:242px!important;background:#184e46!important;border:1px solid #184c4c!important;border-radius:7px!important;overflow:hidden}.map-card .map-frame .real-map{background:#224e3e!important}.map-overlay{background:#072d33ed!important;color:#e1f3ed!important;border:1px solid #2f796f!important;border-radius:9px!important;padding:8px 9px!important;bottom:10px!important;left:10px!important;max-width:235px!important;right:auto!important}.map-overlay strong{color:#ecfffc!important;font-size:11px!important}.map-overlay span{color:#b8d9d1!important;font-size:10px!important}.map-footer{padding:7px 1px 0;gap:10px!important;font-size:10px;color:#b8d4d3!important}.map-footer>span{color:#b8d4d3!important}.map-footer .map-locate-btn,.map-footer .map-auto-btn{background:#1d3c55;color:#d4fff3;border:1px solid #27776a;border-radius:7px;font-size:10px;padding:5px 7px}
.scanner-highlight{position:relative;min-height:0!important;padding:11px!important;flex:1;overflow:hidden}.scanner-highlight:after{display:none!important}.side-card-head{display:flex;align-items:center;justify-content:space-between;gap:9px;margin:0 0 10px!important}.pill-state{font-size:9px!important;background:#153c3e!important;color:#bfdbd8!important;border:1px solid #3e627a!important;padding:6px 9px!important;border-radius:15px!important}.pill-state.on{background:#114c3a!important;color:#7dfaa6!important;border-color:#17814a!important}.lc-scanner-body{display:grid;grid-template-columns:42% minmax(0,1fr);gap:9px;min-height:255px}.lc-scanner-picture{border-radius:8px;background:#194d4d url(../img/loft-scanner.jpg) center center/cover no-repeat;min-height:250px}.lc-scanner-info{min-width:0;border:1px solid #345169;border-radius:10px;padding:6px 12px;background:linear-gradient(135deg,#20354a,#17283b)}.scanner-lines{margin:0!important}.scanner-lines div{padding:13px 0!important;border-color:#225960!important;display:flex!important;flex-wrap:nowrap;gap:6px;align-items:center;justify-content:space-between}.scanner-lines span{font-size:11px!important;color:#d3e6e5!important}.scanner-lines strong{color:#f9ffff!important;text-align:right!important;font-size:11px!important;max-width:60%;overflow-wrap:anywhere}.side-card-link{font-size:11px!important;padding:10px 0!important;background:transparent!important;border:0!important;color:#77dfff!important;cursor:pointer}.side-card-link:hover{text-decoration:underline}
.sensor-overview{padding:13px!important;margin:0 0 12px!important}.sensor-section-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.sensor-section-head>div:first-child{display:flex;align-items:center;gap:20px;flex-wrap:wrap}.sensor-section-head h3{font-size:19px;font-weight:800;margin:0;color:#f2ffff}.sensor-section-head h3>span{font-size:22px;color:#77e2ff}.sensor-subtitle,.sensor-section-status{font-size:11px;color:#c4dede}.sensor-section-status{display:flex;align-items:center;justify-content:flex-end;gap:9px}.sensor-dot{width:8px;height:8px;border-radius:50%;background:#6b8783;display:inline-block;flex:none}.sensor-dot.on{background:#47ee88;box-shadow:0 0 7px #40eb8770}.sensor-dot.warn{background:#f4ad55}.sensor-updated{border-left:1px solid #357672;margin-left:7px;padding-left:13px;color:#a9d4cc}.sensor-grid{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:11px}.sensor-tile{position:relative;display:flex;flex-direction:column;justify-content:space-between;min-height:103px;padding:12px 12px 10px;border-radius:10px;background:linear-gradient(160deg,#1c3045,#142538);border:1px solid #3d5b73;min-width:0;box-shadow:inset 0 1px 2px #43878414}.sensor-tile:hover{border-color:#369e89}.sensor-tile-head{display:flex;align-items:center;gap:8px;font-size:11px;color:#ecfaf9;font-weight:700;white-space:nowrap}.sensor-icon{display:inline-flex;align-items:center;justify-content:center;font-size:21px;color:#b2f0ff;width:26px;height:26px}.sensor-tile .sensor-dot{margin-left:auto;width:7px;height:7px}.sensor-reading{font-size:23px;font-weight:850;letter-spacing:-.04em;color:#fff;line-height:1.18;white-space:nowrap}.sensor-unit{font-size:13px;font-weight:650;margin-left:3px;color:#d8f6f4;letter-spacing:normal}.sensor-meta{font-size:10px;color:#96c6bf;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.sensors-footnote{color:#74a5a7;font-size:10px;margin:9px 2px 0!important}.sensor-tile.no-reading .sensor-reading{color:#8eb2b3}.sensor-tile.no-reading .sensor-meta{color:#9ab6b8}.sensor-detail-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.dashboard-secondary{grid-template-columns:minmax(0,1.1fr) minmax(320px,.95fr)!important;gap:13px!important;align-items:stretch!important}.table-card,.activity-card{min-height:226px!important;padding:13px 16px!important}.table-card .panel-head,.activity-card .panel-head{margin:0 0 7px!important}.outline-link{color:#78dbff!important;background:transparent!important;border:0!important;font-size:11px!important;padding:6px!important;white-space:nowrap}.hok-table{color:#e9fafa!important}.hok-table th{font-size:10px!important;color:#a0bdbd!important;border-color:#3e586f!important;background:#273e54!important;letter-spacing:.065em}.hok-table td{border-color:#1e5558!important;color:#e8fafa!important;font-size:12px!important;padding:9px!important}.hok-table tr:nth-child(even) td{background:#14474a7d}.hok-table td .ring-chip{color:#f7fff9!important;background:#174f4e!important;border-color:#215959!important}.hok-table td .rssi-mark{color:#66e9a6!important}.empty-row{color:#a9c8c8!important;background:transparent!important}.activity-item{border-color:#31495d!important;padding:8px 0!important}.activity-copy strong{color:#f6ffff!important;font-size:12px!important}.activity-copy span,.activity-when{color:#bfd6d7!important;font-size:11px!important}.timeline-spot{background:#174c68!important;color:#7cf0c1!important;border-color:#287967!important}.activity-footer{color:#9ac6c4!important;border-color:#375269!important;font-size:10px!important}
.site-footer{max-width:1460px!important;display:flex;align-items:center;justify-content:space-between;gap:20px;background:transparent!important;color:#d9eceb!important;border-top:1px solid #21615f!important;margin:2px auto 0!important;padding:15px 23px 21px!important}.lc-footer-brand{display:flex;align-items:center;gap:19px;flex-wrap:wrap}.lc-footer-brand strong{font-size:19px!important;font-weight:850}.lc-footer-brand strong span{color:#65d9fc!important;font-weight:850!important}.lc-footer-brand small{font-size:11px!important;color:#a5c7c6!important;margin:0!important;padding-left:18px;border-left:1px solid #37716d}.lc-footer-partners{display:flex;align-items:center;gap:13px;font-size:12px;flex-wrap:wrap;justify-content:flex-end;color:#e5f3f3}.lc-footer-partners .lc-partner{display:inline-flex;align-items:center;gap:5px}.lc-footer-partners strong{color:#fff!important;font-size:12px!important}.lc-footer-partners a{text-decoration:none;color:#c1e3df}.lc-footer-partners a:hover{text-decoration:underline}.lc-pg-icon{color:#67d6ff;font-size:22px;padding-right:4px}.lc-divider{border-left:1px solid #49667d;height:18px}
/* Secondary screens are retained but rendered in a coherent dark theme. */
.section-heading h2,.section-heading p,.section-heading .eyebrow{color:#ecf8f7!important}.section-heading p{color:#bed4d4!important}.hok-tab>.card:not(.sensor-overview),.ring-panel,.full-map-card,.detail-card,.detail-note,.empty-feature{background:#1b2d41!important;border:1px solid #375269!important;color:#ecf9f9!important;box-shadow:none!important}.ring-panel p,.detail-note p,.empty-feature p,.section-heading p,.ring-data-note{color:#b7d3d3!important}.ring-panel h3,.detail-card h3,.detail-note h3,.empty-feature h3,.detail-rows strong{color:#f4ffff!important}.detail-rows div{color:#afcacc!important;border-color:#426278!important}.ring-card{background:#243b51!important;color:#eaf8f8!important;border-color:#496c84!important}.ring-card strong,.ring-card .mini-cap{color:#e4fff8!important}.ring-disclaimer,.gps-routes-info,.ring-check-form,.route-chooser,.full-map-explain{background:#1d3248!important;border-color:#405e75!important;color:#b9d7d7!important}.ring-check-form label,.route-chooser label,.route-chooser span,.full-map-explain strong,.full-map-explain p{color:#d9eeee!important}.full-map-toolbar,.full-map-toolbar span{color:#c7dedc!important}.map-locate-btn,.map-auto-btn{background:#1e3f58!important;color:#dffff4!important;border-color:#39728f!important}.lc-devices-button{padding:11px 15px;border-radius:8px;border:1px solid #5ad1f7;background:#186b90;color:white;text-decoration:none;font-size:12px;font-weight:750}
/* Login remains the same secure pairing-code flow with the new branding. */
.login-stage{margin:22px 0!important;background:linear-gradient(145deg,#101827,#17263a 68%,#1e344e)!important;border:1px solid #3b718b!important;box-shadow:0 20px 40px #00191bbd!important}.login-card{background:#1e3248!important;border:1px solid #416b81!important;color:#f1f9f9!important}.login-card h2,.login-card h2 span{color:#f3fff9!important}.login-card h2 span,.login-card .eyebrow{color:#6de2ff!important}.login-card p,.login-help,.login-foot,.login-form label{color:#cee1e1!important}.login-form input{background:#07272c!important;color:#edfff8!important;border-color:#3a7b72!important}.login-form input::placeholder{color:#88a9a7}.login-decor .decor-center{color:#e3fff3}.login-foot{border-color:#276764!important}
@media(max-width:1190px){.brand-subtitle{display:none}.dashboard-primary{grid-template-columns:minmax(0,1.35fr) minmax(320px,1fr)!important}.sensor-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.sensor-detail-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important}}
@media(max-width:840px){.dashboard-primary,.dashboard-secondary{grid-template-columns:1fr!important}.site-header{padding:10px 15px!important}.main-wrap{padding:12px 13px!important}.site-footer{padding:16px 13px!important}.map-frame{height:320px!important}.lc-scanner-body{grid-template-columns:minmax(140px,1fr) 1.3fr}.lc-scanner-picture{min-height:210px}.sensor-grid{grid-template-columns:repeat(3,minmax(0,1fr))}.site-header:before{opacity:.25}}
@media(max-width:570px){.brand h1{font-size:24px!important}.lc-bird{font-size:24px}.topbar-right{width:100%;justify-content:space-between;gap:7px;flex-wrap:wrap}.lc-account{display:none}.site-header{flex-wrap:wrap}.site-header .refresh-btn{font-size:11px;padding:6px 9px}.welcome-row h2{font-size:24px!important}.welcome-row{padding:3px 10px 0 13px;min-height:auto;flex-direction:column;gap:9px}.welcome-actions{margin:0}.metrics{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:8px!important}.metric-card{gap:8px;min-height:90px!important;padding:9px!important}.metric-graphic{font-size:25px;min-width:29px}.metric-value{font-size:23px!important}.metric-value.compact{font-size:19px!important}.metric-top{font-size:10px!important}.metric-bottom{font-size:9px!important}.sensor-grid,.sensor-detail-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.sensor-section-head{flex-direction:column;align-items:flex-start}.sensor-section-status{justify-content:flex-start;flex-wrap:wrap}.sensor-tile{padding:10px}.sensor-reading{font-size:21px}.lc-scanner-body{grid-template-columns:1fr 1fr}.lc-scanner-picture{min-height:195px}.scanner-lines div{flex-direction:column;align-items:flex-start;padding:7px 0!important}.scanner-lines strong{max-width:100%;text-align:left!important}.site-footer{flex-direction:column;align-items:flex-start}.lc-footer-brand{gap:8px}.lc-footer-brand small{padding-left:9px}.lc-footer-partners{justify-content:flex-start}.panel-head h3{font-size:17px!important}.map-frame{height:255px!important}}
.full-map-frame{height:530px!important}
.lc-footer-partners{flex-shrink:0}.lc-footer-partners a{white-space:nowrap}
@media(max-width:600px){.full-map-frame{height:440px!important}.lc-footer-partners{flex-shrink:1;flex-wrap:wrap}}
