:root{--bg:#f4f7fb;--panel:#fff;--text:#172033;--muted:#718096;--line:#e5eaf1;--blue:#1677ff;--green:#16a36a;--red:#e14b55;--orange:#e99525;--nav:#0f1728}*{box-sizing:border-box}body{margin:0;font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--text)}button,input,select{font:inherit}.app{display:flex;min-height:100vh}.sidebar{width:255px;background:var(--nav);color:#fff;padding:24px 16px;position:fixed;inset:0 auto 0 0;height:100vh;display:flex;flex-direction:column;overflow:hidden}.brand{display:flex;align-items:center;gap:12px;padding:8px 10px 28px;flex:0 0 auto}.brandIcon{width:40px;height:40px;border-radius:12px;background:#1c8cff;display:grid;place-items:center;font-size:22px}.brand b,.brand span{display:block}.brand b{letter-spacing:1px}.brand span{font-size:10px;color:#91a0b7;letter-spacing:2px;margin-top:3px}nav{display:grid;gap:5px;flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding-right:4px;scrollbar-width:thin}.nav{border:0;background:transparent;color:#9aa8bd;text-align:left;padding:12px 14px;border-radius:10px;cursor:pointer;display:flex;gap:12px;align-items:center}.nav:hover,.nav.active{background:#1a2942;color:#fff}.connection{position:static;margin-top:12px;flex:0 0 auto;padding:12px;background:#121f34;border-radius:12px;display:flex;gap:10px;align-items:center}.connection b{font-size:11px}.connection small{display:block;color:#788aa5;margin-top:3px}.dot{width:9px;height:9px;border-radius:50%;background:var(--red);box-shadow:0 0 0 4px #432332}.dot.online{background:#22c981;box-shadow:0 0 0 4px #183d35}main{margin-left:255px;padding:26px 32px;width:calc(100% - 255px)}header{display:flex;justify-content:space-between;align-items:end;margin-bottom:24px}.eyebrow{font-size:11px;letter-spacing:2px;color:var(--blue);font-weight:700}h1{font-size:30px;margin:4px 0}.clock{font-weight:700;color:var(--muted)}.page{display:none}.page.active{display:block}.hero{background:linear-gradient(135deg,#13213b,#1c4d85);color:#fff;border-radius:20px;padding:28px;display:flex;justify-content:space-between;align-items:center;overflow:hidden}.hero h2{font-size:28px;margin:14px 0 8px}.hero p{max-width:650px;color:#c8d6e8}.pill{background:#1fbc82;padding:7px 11px;border-radius:999px;font-size:11px;font-weight:800}.heroArt{font-size:100px;opacity:.2}.heroArt span{font-size:28px}.stats{display:grid;grid-template-columns:repeat(4,1fr);gap:15px;margin:20px 0}.stat,.card,.settingsCard,.infoCard,.alert,.tableWrap{background:var(--panel);border:1px solid var(--line);border-radius:16px}.stat{padding:20px}.stat span{color:var(--muted);font-size:12px}.stat b{display:block;font-size:28px;margin-top:8px}.sectionHead{display:flex;justify-content:space-between;align-items:center;margin:22px 0 12px}.sectionHead h3{margin:0;font-size:19px}.sectionHead p{margin:4px 0;color:var(--muted);font-size:13px}.grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(245px,1fr));gap:14px}.card{padding:18px;cursor:pointer;transition:.15s}.card:hover{transform:translateY(-2px);box-shadow:0 8px 24px #17203312}.cardTop{display:flex;justify-content:space-between;align-items:start}.id{font-size:11px;color:var(--blue);font-weight:800}.name{font-weight:800;margin:7px 0 2px}.meta{color:var(--muted);font-size:12px}.temp{font-size:34px;font-weight:800;margin:20px 0 10px}.temp small{font-size:14px;color:var(--muted)}.badge{font-size:10px;font-weight:800;padding:6px 8px;border-radius:8px;background:#edf1f5;color:#596579}.normal{background:#e8f8f1;color:#0b8a59}.hot,.cold{background:#ffe9eb;color:#c93643}.warning{background:#fff3df;color:#b66c09}.offline{background:#edf0f4;color:#687386}.toolbar{display:flex;gap:12px;justify-content:space-between;margin-bottom:16px}.toolbar input{flex:1;padding:12px 14px;border:1px solid var(--line);border-radius:10px;background:#fff;outline:none}.filters{display:flex;gap:6px}.filter,.secondary,.danger,.primary{border:0;border-radius:10px;padding:10px 13px;cursor:pointer}.filter{background:#e9eef5;color:#5f6c7e}.filter.active,.primary{background:var(--blue);color:#fff}.secondary{background:#eef4ff;color:var(--blue)}.danger{background:#fff0f1;color:var(--red)}.alert{padding:17px;margin-bottom:10px;display:flex;justify-content:space-between;align-items:center}.tableWrap{overflow:auto}.tableWrap table{width:100%;border-collapse:collapse}.tableWrap th,.tableWrap td{padding:13px;border-bottom:1px solid var(--line);text-align:left;font-size:12px}.settingsCard,.infoCard{padding:24px;max-width:850px}.settingsCard label{display:block;font-size:12px;font-weight:700;color:#4c596d;margin-bottom:14px}.settingsCard input,.settingsCard select{display:block;width:100%;margin-top:7px;padding:11px;border:1px solid var(--line);border-radius:9px;background:#fff}.formgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px 14px}.check{display:flex!important;gap:8px;align-items:center}.check input{width:auto!important;margin:0!important}.message{margin-top:12px;color:var(--green)}.architecture{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:24px 0}.architecture div{background:#f2f6fb;padding:13px;border-radius:10px}.architecture span{display:block;color:var(--muted);font-size:11px;margin-top:4px}.toast{position:fixed;right:25px;bottom:25px;background:#172033;color:#fff;padding:14px 18px;border-radius:10px;box-shadow:0 8px 30px #0002}.hidden{display:none}.headerRight{display:flex;align-items:center;gap:12px}.userBadge{display:flex;flex-direction:column;align-items:flex-end;font-size:12px}.userBadge span{font-size:10px;opacity:.7}.logoutBtn{border:1px solid #d5dbe3;background:#fff;border-radius:9px;padding:8px 12px;cursor:pointer}.hiddenPage{display:none!important}

/* LOGIN V28 — single HTML login surface; no duplicated controls from the artwork. */
.exactLoginScreen{position:fixed;inset:0;z-index:9999;overflow:auto;display:flex;align-items:center;justify-content:center;padding:20px;background:#061522 url('/login-background-v37-no-chicken-under-card.jpg') center center / cover no-repeat}
/* V34: the HTML card is the only visible login surface. The old card embedded in the artwork is fully covered by the compact card. */
.exactLoginScreen .loginPanel{width:min(92vw,460px);height:auto;min-height:0;max-height:calc(100vh - 40px);overflow-x:hidden;overflow-y:auto;display:flex;flex-direction:column;align-items:stretch;justify-content:flex-start;margin:0;padding:18px 24px 14px;background:rgba(247,251,255,.99);border:1px solid rgba(203,216,231,.9);border-radius:22px;box-shadow:none!important;filter:none!important;outline:none!important;color:#17365d}
.loginHeader{text-align:center;flex:0 0 auto}.loginBrandRow{display:flex;align-items:center;justify-content:center;gap:10px}.loginLogoMark{width:40px;height:40px;display:grid;place-items:center;border-radius:12px;background:#1677ff;color:#fff;font-size:24px;line-height:1}.loginTitleWrap{text-align:left}.loginTitle{font-size:20px;line-height:1.02;font-weight:900;letter-spacing:.35px;color:#17365d}.loginSubtitle{font-size:11px;line-height:1.1;font-weight:800;color:#8a9bb0;margin-top:3px}.loginIntro{margin:12px 0 12px;font-size:12px;line-height:1.42;font-weight:600;color:#17365d}.authView{width:100%}.hidden{display:none!important}
.realLoginForm{width:100%;margin:0;padding:0;display:flex;flex-direction:column;gap:9px;text-align:left;background:transparent}.realLoginField{display:flex;align-items:center;width:100%;height:48px;min-height:48px;margin:0;padding:0;border:1px solid #cbd8e7;border-radius:12px;background:#fff;box-shadow:none;overflow:hidden}.realLoginField .fieldIcon{flex:0 0 48px;width:48px;height:100%;display:grid;place-items:center;border-right:1px solid #d5e0ec;background:#fff;color:#173f70;line-height:1}.realLoginField .fieldIcon svg{display:block;width:20px;height:20px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}.realLoginField input{min-width:0;flex:1;width:auto;height:100%;margin:0;padding:0 14px;border:0;outline:0;background:#fff;color:#17365d;-webkit-text-fill-color:#17365d;caret-color:#17365d;font-family:inherit;font-size:15px;font-weight:500}.realLoginField input::placeholder{color:#92a2b5;-webkit-text-fill-color:#92a2b5;opacity:1}.realLoginField:focus-within{border-color:#b7cbe2;box-shadow:none}
.realLoginButton{width:100%;height:50px;min-height:50px;margin:0;padding:0;border:0;border-radius:11px;background:#1677ff;color:#fff;font-size:20px;font-weight:900;cursor:pointer;box-shadow:none;font-family:inherit}.realLoginButton:hover{filter:brightness(1.03)}.realLoginButton:active{transform:none}.realLoginButton:focus,.realLoginButton:focus-visible{outline:none;box-shadow:none}.realLoginMessage{min-height:16px;margin:0;text-align:center;color:#cf3745;font-size:11px;line-height:16px;font-weight:800;white-space:normal}.realLoginMessage:empty{visibility:hidden}.realLoginMessage.checking{color:#2f6ea5}.realLoginMessage.error{color:#cf3745}.registerLink{display:block;width:max-content;margin:10px auto 0;padding:0;border:0;background:transparent;color:#1267d8;font-size:12px;font-weight:800;cursor:pointer}.registerLink:hover{text-decoration:underline}.loginRoles{display:grid;grid-template-columns:repeat(4,1fr);gap:7px;margin-top:12px;padding-top:10px;border-top:1px solid #e0e8f1}.role{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:3px;text-align:center;font-size:9px;font-weight:900;white-space:nowrap}.role b{font-size:18px;line-height:1}.owner{color:#e7a400}.engineering{color:#1667d8}.hrd{color:#159b72}.manager{color:#7b26d9}.loginFooter{text-align:center;margin-top:8px;font-size:9px;line-height:1.3;color:#718096}.registerHeading{text-align:center;font-size:18px;font-weight:900;letter-spacing:.6px;color:#17365d;margin:0 0 12px}.registerForm{display:flex;flex-direction:column;gap:8px}.registerField{font-size:10px;font-weight:800;color:#506078}.registerField input,.registerField select{display:block;width:100%;height:40px;margin-top:5px;padding:0 11px;border:1px solid #cbd8e7;border-radius:10px;background:#fff;color:#17365d;outline:none}.registerField input:focus,.registerField select:focus{border-color:#8fb5e5;box-shadow:none}.registerButton{height:44px;min-height:44px;margin-top:3px;font-size:17px}.backLogin{margin-top:8px}
@media(max-width:760px){.exactLoginScreen{padding:14px;background-position:center center}.exactLoginScreen .loginPanel{width:min(94vw,440px);height:auto;min-height:0;max-height:calc(100vh - 28px);padding:20px 22px 15px;border-radius:22px}.loginLogoMark{width:44px;height:44px;font-size:26px}.loginTitle{font-size:19px}.loginSubtitle{font-size:13px}.loginIntro{font-size:12px;margin:11px 0 12px}.realLoginField{height:46px;min-height:46px}.realLoginField .fieldIcon{flex-basis:46px;width:46px}.realLoginButton{height:48px;min-height:48px}.loginRoles{margin-top:11px;padding-top:10px}.role{font-size:8px}.role b{font-size:16px}.loginFooter{font-size:8px}.registerField input,.registerField select{height:38px}}
@media(max-width:420px){.exactLoginScreen{padding:10px}.exactLoginScreen .loginPanel{width:96vw;height:auto;min-height:0;max-height:calc(100vh - 20px);padding:17px 16px 12px;border-radius:20px}.loginBrandRow{gap:10px}.loginLogoMark{width:44px;height:44px;font-size:26px}.loginTitle{font-size:17px}.loginSubtitle{font-size:12px;margin-top:4px}.loginIntro{font-size:11px;margin:9px 0 10px}.realLoginForm{gap:7px}.realLoginField{height:44px;min-height:44px}.realLoginField .fieldIcon{flex-basis:42px;width:42px}.realLoginField input{font-size:14px}.realLoginButton{height:45px;min-height:45px;font-size:18px}.registerLink{margin-top:7px;font-size:11px}.loginRoles{gap:4px;margin-top:9px;padding-top:8px}.role{font-size:7px}.role b{font-size:14px}.loginFooter{font-size:7px;margin-top:7px}}
/* LOGIN FINAL: background intentionally neutral while the login UI is being finalized. */
.exactLoginScreen{background:#eef3f8!important;background-image:none!important}
.exactLoginScreen .loginPanel{box-shadow:none!important;filter:none!important;outline:none!important}
.userAction{border:0;border-radius:8px;padding:7px 10px;font-size:11px;font-weight:800;cursor:pointer}
.ownerOnlyNav.hidden{display:none!important}
/* SECURITY MENUS + six-role login row */
.loginRoles{grid-template-columns:repeat(6,minmax(0,1fr));gap:4px}
.role{min-width:0}
.role b{font-size:17px}
.technician{color:#e87516}.spv{color:#1877c9}
.securityCard{max-width:900px}
@media(max-width:760px){.loginRoles{grid-template-columns:repeat(6,minmax(0,1fr));gap:2px}.role{font-size:7px}.role b{font-size:14px}.securityCard{padding:18px}.tableWrap th,.tableWrap td{white-space:nowrap}}
@media(max-width:430px){.loginRoles{gap:1px}.role{font-size:6px}.role b{font-size:13px}.loginFooter{font-size:7px}}

.statusDetail{margin-top:18px;padding-top:12px;border-top:1px solid var(--line);display:grid;gap:5px}.statusCard{cursor:default}.statusCard:hover{transform:none;box-shadow:none}

.backupActions{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:18px 0}.fileButton{display:inline-flex;align-items:center;justify-content:center;position:relative;overflow:hidden}.fileButton input{position:absolute!important;inset:0;opacity:0!important;cursor:pointer!important;margin:0!important;padding:0!important}.backupActions .secondary{display:inline-flex;align-items:center;min-height:40px}@media(max-width:520px){.backupActions{flex-direction:column;align-items:stretch}.backupActions button,.backupActions .fileButton{width:100%}}


/* RESPONSIVE DASHBOARD V9 — desktop unchanged; tablet/mobile use a collapsible navigation. */
.mobileMenuButton,.sidebarOverlay{display:none}
@media(max-width: 900px){
  html,body{max-width:100%;overflow-x:hidden}
  .app{display:block;min-width:0;width:100%}
  .sidebar{width:255px;max-width:86vw;transform:translateX(-105%);transition:transform .2s ease;z-index:1000;box-shadow:0 12px 35px rgba(0,0,0,.22)}
  .sidebar.mobile-open{transform:translateX(0)}
  .sidebarOverlay{display:block;position:fixed;inset:0;background:rgba(15,23,40,.42);z-index:999;opacity:0;pointer-events:none;transition:opacity .2s ease}
  .sidebarOverlay.active{opacity:1;pointer-events:auto}
  .mobileMenuButton{display:grid;place-items:center;position:fixed;top:14px;left:14px;width:42px;height:42px;border:1px solid var(--line);border-radius:10px;background:#fff;color:var(--nav);font-size:22px;line-height:1;cursor:pointer;z-index:1100;box-shadow:0 3px 12px rgba(23,32,51,.12)}
  main{margin-left:0;width:100%;min-width:0;padding:20px 22px 30px}
  header{padding-left:56px;align-items:flex-start;gap:14px;flex-wrap:wrap}
  header>div:first-child{min-width:0}
  .headerRight{margin-left:auto;min-width:0;flex-wrap:wrap;justify-content:flex-end}
  .hero{padding:22px;gap:16px}
  .hero h2{font-size:24px}
  .heroArt{font-size:76px}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
  .grid{grid-template-columns:repeat(2,minmax(0,1fr));min-width:0}
  .toolbar{flex-wrap:wrap}
  .toolbar input{min-width:180px}
  .filters{flex-wrap:wrap}
  .tableWrap{max-width:100%;overflow-x:auto}
  .settingsCard,.infoCard{max-width:100%}
}
@media(max-width: 560px){
  main{padding:68px 12px 24px}
  header{padding-left:0;align-items:flex-start;margin-bottom:18px}
  h1{font-size:24px}
  .eyebrow{font-size:9px;letter-spacing:1.4px}
  .headerRight{width:100%;margin-left:0;justify-content:space-between;gap:8px}
  .userBadge{align-items:flex-start;order:1}
  .clock{font-size:12px;order:2}
  .logoutBtn{padding:7px 10px;order:3}
  .hero{padding:18px;border-radius:16px}
  .hero h2{font-size:20px;margin:10px 0 6px}
  .hero p{font-size:12px;margin:0;line-height:1.45}
  .heroArt{display:none}
  .stats{grid-template-columns:repeat(2,minmax(0,1fr));gap:9px;margin:14px 0}
  .stat{padding:14px}
  .stat b{font-size:24px}
  .sectionHead{gap:10px;align-items:flex-start}
  .sectionHead h3{font-size:17px}
  .grid{grid-template-columns:minmax(0,1fr);gap:10px}
  .card{padding:15px}
  .temp{font-size:30px;margin:14px 0 8px}
  .toolbar{display:block}
  .toolbar input{width:100%;margin-bottom:8px}
  .filters{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:6px}
  .filter{padding:9px 6px;font-size:11px}
  .formgrid{grid-template-columns:minmax(0,1fr)}
  .settingsCard,.infoCard{padding:17px}
  .architecture{align-items:stretch}
  .architecture div{width:100%}
  .backupActions{flex-direction:column;align-items:stretch}
  .backupActions button,.backupActions .fileButton{width:100%}
}
@media(min-width: 561px) and (max-width: 900px){
  .stats{grid-template-columns:repeat(2,minmax(0,1fr))}
}

/* LOGIN V39 — restrained semi-technology skin. Structure, centering and form dimensions remain unchanged. */
.exactLoginScreen{
  background:
    radial-gradient(circle at 50% 10%, rgba(47,126,214,.16), transparent 32%),
    radial-gradient(circle at 12% 82%, rgba(27,150,116,.10), transparent 28%),
    linear-gradient(135deg,#edf4fa 0%,#f8fbfd 48%,#e8f1f7 100%) !important;
  background-image:
    linear-gradient(rgba(31,103,158,.045) 1px,transparent 1px),
    linear-gradient(90deg,rgba(31,103,158,.045) 1px,transparent 1px),
    radial-gradient(circle at 50% 10%, rgba(47,126,214,.16), transparent 32%),
    radial-gradient(circle at 12% 82%, rgba(27,150,116,.10), transparent 28%),
    linear-gradient(135deg,#edf4fa 0%,#f8fbfd 48%,#e8f1f7 100%) !important;
  background-size:32px 32px,32px 32px,auto,auto,auto !important;
}
.exactLoginScreen::before,.exactLoginScreen::after{
  content:"";position:fixed;pointer-events:none;z-index:0;
}
.exactLoginScreen::before{
  width:260px;height:260px;left:-120px;top:18%;
  border:1px solid rgba(22,119,255,.13);border-radius:50%;
  box-shadow:0 0 0 22px rgba(22,119,255,.025),0 0 0 44px rgba(22,119,255,.018);
}
.exactLoginScreen::after{
  width:330px;height:1px;right:-70px;bottom:19%;
  background:linear-gradient(90deg,transparent,rgba(22,119,255,.22),transparent);
  transform:rotate(-24deg);
}
.exactLoginScreen .loginPanel{
  position:relative;z-index:2;
  background:rgba(247,251,255,.985);
  border:1px solid rgba(177,201,222,.92);
  box-shadow:0 18px 45px rgba(24,61,91,.10),0 2px 0 rgba(255,255,255,.95) inset !important;
}
.exactLoginScreen .loginPanel::before{
  content:"";position:absolute;left:18px;right:18px;top:0;height:3px;
  border-radius:0 0 8px 8px;
  background:linear-gradient(90deg,transparent,#2b83df 22%,#31b58b 50%,#2b83df 78%,transparent);
  opacity:.72;
}
.login-tech-grid{
  position:absolute;inset:0;pointer-events:none;opacity:.32;
  background:linear-gradient(90deg,transparent 0 42%,rgba(22,119,255,.12) 42% 42.2%,transparent 42.2% 58%,rgba(22,119,255,.10) 58% 58.2%,transparent 58.2%);
}
.restaurantLogoMark{
  width:76px;height:52px;border-radius:12px;background:#fff;
  border:1px solid #d8e4ee;overflow:hidden;padding:3px;
  box-shadow:0 5px 14px rgba(26,69,104,.08);
}
.restaurantLogoMark img{width:100%;height:100%;display:block;object-fit:contain}
.loginTechBadge{
  display:flex;align-items:center;justify-content:center;gap:6px;
  width:max-content;max-width:100%;margin:0 auto 4px;
  padding:5px 9px;border:1px solid #d7e4ef;border-radius:999px;
  background:linear-gradient(180deg,#fff,#f1f6fa);
  color:#52708b;font-size:8px;font-weight:900;letter-spacing:1px;
}
.loginTechBadge span{font-size:7px;color:#22a879}.loginTechBadge i{font-style:normal;color:#1677ff}
@media(max-width:430px){
  .restaurantLogoMark{width:68px;height:48px}
  .loginTechBadge{font-size:7px;padding:4px 7px;letter-spacing:.7px}
}
