:root{
  --copper:#C0561E;
  --charcoal:#1E1E22;
  --dark-slate:#2B2D31;
  --soft-white:#F5F5F5;
  --warm-gold:#D89B5B;
  --bg:#121316;
  --panel:#1E1E22;
  --panel2:#25262B;
  --panel3:#2B2D31;
  --line:rgba(245,245,245,.10);
  --line-gold:rgba(216,155,91,.24);
  --muted:rgba(245,245,245,.58);
  --muted2:rgba(245,245,245,.35);
  --green:#72D979;
  --red:#F06B68;
  --blue:#76B9FF;
  --shadow:0 22px 80px rgba(0,0,0,.38);
}
*{box-sizing:border-box} html,body,#app{height:100%}
body{margin:0;background:radial-gradient(circle at 12% 8%,rgba(192,86,30,.20),transparent 30%),radial-gradient(circle at 88% 5%,rgba(216,155,91,.13),transparent 28%),linear-gradient(135deg,#111215,#18191d 70%,#111215);color:var(--soft-white);font-family:Inter,Segoe UI,Arial,sans-serif;font-size:13px;overflow:hidden}button,input,select{font:inherit}button{cursor:pointer}button:disabled{opacity:.45;cursor:not-allowed}.hidden{display:none!important}.muted{color:var(--muted)}select{color-scheme:dark;background-color:#2B2D31;color:var(--soft-white)}select option{background:#2B2D31!important;color:#F5F5F5!important}select option:checked,select option:hover{background:#C0561E!important;color:#fff!important}
.shell{height:100%;display:grid;grid-template-rows:108px 70px 1fr;padding:14px;gap:12px}.commandbar{background:rgba(30,30,34,.82);border:1px solid var(--line);border-radius:30px;box-shadow:var(--shadow);backdrop-filter:blur(14px);display:grid;grid-template-columns:260px minmax(520px,1fr) 470px;align-items:center;padding:0 22px;gap:20px}.brand-block{display:flex;align-items:center;gap:12px;min-width:0;cursor:pointer}.brand-orb,.empty-orb{width:56px;height:56px;border-radius:20px;background:linear-gradient(135deg,var(--copper),var(--warm-gold));display:grid;place-items:center;color:#171717;font-weight:950;box-shadow:0 12px 32px rgba(192,86,30,.34)}.brand-title{font-weight:950;font-size:21px;letter-spacing:.02em}.brand-caption{color:var(--warm-gold);font-size:11px;text-transform:uppercase;letter-spacing:.22em;font-weight:850}.top-nav{display:flex;gap:10px;overflow:auto;padding:6px}.top-nav::-webkit-scrollbar{height:0}.nav-pill{height:58px;background:rgba(245,245,245,.025);color:rgba(245,245,245,.72);border:1px solid rgba(245,245,245,.05);border-radius:999px;padding:0 22px;font-weight:950;white-space:nowrap;font-size:16px;letter-spacing:.01em;box-shadow:inset 0 1px 0 rgba(255,255,255,.035)}.nav-pill:hover{background:rgba(245,245,245,.08);border-color:rgba(216,155,91,.18);color:#fff;transform:translateY(-1px)}.nav-pill.active{background:linear-gradient(135deg,rgba(192,86,30,.32),rgba(216,155,91,.14));border-color:rgba(216,155,91,.38);color:#fff;box-shadow:0 12px 30px rgba(192,86,30,.16), inset 0 1px 0 rgba(255,255,255,.06)}.top-tools{display:flex;gap:10px;justify-content:flex-end;align-items:center;min-width:0}.global-search,.selector-card select,.form-card input,.form-card select,.scan-add input,.scan-add select{background:rgba(245,245,245,.07);border:1px solid var(--line);color:#fff;border-radius:14px;outline:none}.global-search{height:44px;width:112px;padding:0 13px}.global-search:focus,input:focus,select:focus{border-color:var(--warm-gold);box-shadow:0 0 0 3px rgba(216,155,91,.12)}
.active-site-top{min-width:0;flex:1;display:grid;grid-template-columns:1fr 46px;align-items:center;gap:9px;border:1px solid rgba(216,155,91,.24);background:linear-gradient(135deg,rgba(192,86,30,.18),rgba(43,45,49,.62));border-radius:19px;padding:8px 8px 8px 14px;box-shadow:0 10px 30px rgba(0,0,0,.18)}.active-site-top.empty{border-color:var(--line);background:rgba(245,245,245,.055)}.active-site-copy{min-width:0}.active-site-copy span{display:block;color:var(--warm-gold);font-size:9px;text-transform:uppercase;letter-spacing:.18em;font-weight:950;margin-bottom:3px}.active-site-copy strong{display:block;color:#fff;font-size:18px;letter-spacing:.06em;line-height:1.05;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.site-gear-btn{width:42px;height:42px;border:1px solid rgba(216,155,91,.22);border-radius:15px;background:rgba(245,245,245,.075);color:var(--warm-gold);font-size:18px;display:grid;place-items:center}.site-gear-btn:hover{background:rgba(216,155,91,.16);transform:translateY(-1px)}
.site-switcher{display:grid;grid-template-columns:minmax(340px,1fr) 120px 120px 230px auto;gap:12px}.selector-card,.quick-card,.quick-actions{background:rgba(30,30,34,.68);border:1px solid var(--line);border-radius:20px;padding:10px 14px;display:flex;align-items:center;gap:12px;box-shadow:0 10px 38px rgba(0,0,0,.20)}.selector-card span,.quick-card span{color:var(--muted2);text-transform:uppercase;font-size:10px;font-weight:900;letter-spacing:.12em}.selector-card select{height:38px;flex:1;padding:0 10px}.quick-card{flex-direction:column;align-items:flex-start;justify-content:center;gap:2px}.quick-card b{font-size:18px;white-space:nowrap}.quick-actions{justify-content:flex-end}.workspace{height:calc(100vh - 216px);overflow:auto;padding-right:2px}.workspace::-webkit-scrollbar,.modal-card::-webkit-scrollbar{width:10px}.workspace::-webkit-scrollbar-thumb,.modal-card::-webkit-scrollbar-thumb{background:rgba(216,155,91,.35);border-radius:999px}.workspace::-webkit-scrollbar-track,.modal-card::-webkit-scrollbar-track{background:rgba(255,255,255,.03)}
.primary-btn,.gold-btn,.soft-btn,.ghost-btn,.danger-btn{border:0;border-radius:14px;font-weight:900;transition:.16s}.primary-btn,.gold-btn{background:linear-gradient(135deg,var(--copper),var(--warm-gold));color:#171717;padding:10px 14px;box-shadow:0 16px 36px rgba(192,86,30,.22)}.primary-btn.big{padding:14px 20px;font-size:15px}.soft-btn,.ghost-btn{background:rgba(245,245,245,.07);border:1px solid var(--line);color:rgba(245,245,245,.82);padding:10px 13px}.danger-btn{background:rgba(240,107,104,.12);border:1px solid rgba(240,107,104,.25);color:#ffc4c4;padding:10px 13px}.compact{padding:7px 9px!important;font-size:12px}.primary-btn:hover,.gold-btn:hover,.soft-btn:hover,.ghost-btn:hover,.danger-btn:hover{transform:translateY(-1px);filter:brightness(1.05)}.full{width:100%}
.hero-grid{display:grid;grid-template-columns:1.25fr .75fr;gap:14px;margin-bottom:14px}.hero-panel,.signal-panel,.page-card,.inspector-card,.device-workbench,.map-info,.abstract-map,.settings-card,.support-card{background:linear-gradient(135deg,rgba(43,45,49,.78),rgba(30,30,34,.62));border:1px solid var(--line);border-radius:26px;box-shadow:var(--shadow);backdrop-filter:blur(12px)}.hero-panel{padding:24px;position:relative;overflow:hidden}.hero-panel:after{content:"";position:absolute;right:-70px;top:-70px;width:240px;height:240px;border-radius:50%;background:radial-gradient(circle,rgba(216,155,91,.18),transparent 70%)}.eyebrow{color:var(--warm-gold);font-size:10px;text-transform:uppercase;letter-spacing:.18em;font-weight:950}.hero-panel h1,.page-card h1{font-size:34px;margin:8px 0 6px;letter-spacing:-.04em}.hero-panel p{color:var(--muted);margin:0 0 18px}.hero-actions{display:flex;gap:9px}.signal-panel{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;padding:14px}.signal-tile{background:rgba(20,20,23,.48);border:1px solid var(--line);border-radius:20px;padding:14px;display:grid;gap:4px}.signal-tile b{font-size:18px}.signal-tile small{color:var(--muted)}.pulse{display:inline-block;width:10px;height:10px;border-radius:50%;box-shadow:0 0 16px currentColor;background:#999}.pulse.green{background:var(--green);color:var(--green)}.pulse.gold{background:var(--warm-gold);color:var(--warm-gold)}.pulse.blue{background:var(--blue);color:var(--blue)}.pulse.gray{background:#b9b9b9;color:#b9b9b9}.pulse.red{background:var(--red);color:var(--red)}
.dashboard-split{display:grid;grid-template-columns:1fr 330px;gap:14px;align-items:start}.device-workbench{padding:16px;min-width:0}.section-title{display:flex;align-items:flex-start;justify-content:space-between;gap:15px;margin-bottom:14px}.section-title h1,.section-title h2{margin:4px 0 0}.small-muted{color:var(--muted);font-size:12px}.category-lane{border:1px solid var(--line);border-radius:22px;overflow:hidden;margin-bottom:12px;background:rgba(20,20,23,.32)}.category-lane summary{list-style:none;padding:13px 14px;display:flex;align-items:center;gap:12px;cursor:pointer;background:rgba(255,255,255,.025)}.category-lane summary::-webkit-details-marker{display:none}.cat-mark,.dev-icon,.scan-icon{width:34px;height:34px;border-radius:13px;background:rgba(216,155,91,.12);border:1px solid rgba(216,155,91,.20);display:grid;place-items:center;color:var(--warm-gold);font-weight:950}.category-lane small{display:block;color:var(--muted);margin-top:2px}.device-list{display:grid;gap:8px;padding:10px}.device-row{display:grid;grid-template-columns:minmax(230px,1fr) 170px 130px auto;gap:12px;align-items:center;background:rgba(245,245,245,.045);border:1px solid var(--line);border-radius:18px;padding:10px}.device-id{display:flex;align-items:center;gap:10px;min-width:0}.device-id strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.device-id small{display:block;color:var(--muted)}.live-dot{width:9px;height:9px;border-radius:50%;background:var(--green);box-shadow:0 0 12px var(--green);flex:0 0 auto}.device-meta span{display:block;color:var(--muted2);font-size:10px;text-transform:uppercase;font-weight:900}.device-meta b{font-size:12px}.device-actions{display:flex;gap:6px;justify-content:flex-end;flex-wrap:wrap}.inspector{display:grid;gap:12px;position:sticky;top:0}.inspector-card{padding:16px}.copper-line{border-color:var(--line-gold)}.inspector-card h3{margin:4px 0 10px}.kv{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:9px 0}.kv span{color:var(--muted)}.kv b{text-align:right}.mini-log{display:grid;grid-template-columns:42px 70px 1fr;gap:8px;align-items:center;border-top:1px solid var(--line);padding:8px 0;color:var(--muted)}.mini-log b{color:#fff}.mini-log em{font-style:normal}.flow-line{display:flex;gap:7px;flex-wrap:wrap}.flow-line span{background:rgba(255,255,255,.055);border:1px solid var(--line);border-radius:999px;padding:8px 10px}.flow-line i{width:14px;height:1px;background:var(--warm-gold);align-self:center}.no-devices,.empty-state,.loading-box,.error-box{border:1px dashed var(--line-gold);border-radius:22px;padding:24px;text-align:center;background:rgba(216,155,91,.045)}.empty-state{max-width:720px;margin:10vh auto}.empty-state h1{font-size:34px;margin-bottom:5px}.empty-state p{color:var(--muted);line-height:1.55}.empty-orb{margin:0 auto 18px;width:64px;height:64px;border-radius:22px}.fatal{padding:40px}.error-box{border-color:rgba(240,107,104,.35);background:rgba(240,107,104,.08);color:#ffd0d0}
.site-card-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(310px,1fr));gap:12px}.site-card{display:grid;grid-template-columns:52px 1fr auto;align-items:center;gap:12px;text-align:left;background:rgba(245,245,245,.045);border:1px solid var(--line);border-radius:22px;padding:14px;color:#fff}.site-card.selected{border-color:var(--line-gold);background:rgba(192,86,30,.12)}.site-avatar{width:52px;height:52px;border-radius:18px;background:linear-gradient(135deg,var(--copper),var(--warm-gold));color:#171717;font-weight:950;display:grid;place-items:center}.site-avatar.small{width:36px;height:36px;border-radius:13px}.site-info b,.site-info span,.site-info small{display:block}.site-info span,.site-info small{color:var(--muted);margin-top:2px}.page-card{padding:20px}.slim-page{max-width:1050px;margin:0 auto}.map-shell{display:grid;grid-template-columns:330px 1fr;gap:14px;min-height:620px}.map-info{padding:20px}.map-info h1{font-size:32px}.map-info p{color:var(--muted);line-height:1.55}.map-list-item{display:grid;grid-template-columns:18px 1fr auto;gap:8px;align-items:center;border-top:1px solid var(--line);padding:10px 0}.map-list-item small{color:var(--muted)}.abstract-map{position:relative;overflow:hidden;min-height:620px;background:radial-gradient(circle at 50% 50%,rgba(54,93,83,.7),rgba(34,59,66,.62) 42%,rgba(20,20,23,.85) 70%),linear-gradient(135deg,rgba(216,155,91,.12),transparent)}.scan-ring{position:absolute;border:1px solid rgba(216,155,91,.18);border-radius:50%;inset:12%}.scan-ring.r2{inset:24%;border-color:rgba(245,245,245,.10)}.scan-ring.r3{inset:36%;border-color:rgba(192,86,30,.22)}.map-node{position:absolute;transform:translate(-50%,-50%);width:32px;height:32px;border-radius:50%;border:2px solid rgba(255,255,255,.65);color:#111;font-weight:950}.map-node.green{background:var(--green)}.map-node.gold{background:var(--warm-gold)}.map-empty{position:absolute;inset:0;display:grid;place-items:center;color:var(--muted)}.file-drop{height:170px;border:1px dashed var(--line-gold);border-radius:24px;display:grid;place-items:center;text-align:center;background:rgba(216,155,91,.04);margin-bottom:14px}.file-drop div{font-size:36px}.file-drop b,.file-drop span{display:block}.file-drop span{color:var(--muted)}.file-list{display:grid;gap:10px}.file-row{display:grid;grid-template-columns:45px 1fr 1fr auto;gap:12px;align-items:center;padding:12px;border:1px solid var(--line);border-radius:18px;background:rgba(255,255,255,.045)}.file-icon{width:38px;height:38px;border-radius:14px;display:grid;place-items:center;background:rgba(216,155,91,.12);color:var(--warm-gold);font-weight:900}.file-row em{font-style:normal;color:var(--muted)}.settings-layout{display:grid;grid-template-columns:1fr 1fr;gap:14px;max-width:1180px;margin:0 auto}.settings-column{display:grid;gap:14px}.settings-card{padding:18px}.settings-card h3{margin:0 0 12px}.pill-row{display:flex;justify-content:space-between;align-items:center;border-top:1px solid var(--line);padding:9px 0}.stat-bars{display:grid;gap:10px}.bar-row{display:grid;grid-template-columns:170px 1fr 40px;gap:12px;align-items:center}.bar-row label{color:#fff}.bar-track{height:20px;background:rgba(255,255,255,.055);border:1px solid var(--line);border-radius:999px;overflow:hidden}.bar-track span{display:block;height:100%;background:linear-gradient(90deg,var(--copper),var(--warm-gold));border-radius:999px}.support-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:14px}.support-card{padding:22px}.support-card h2{margin:7px 0}.support-card p{color:var(--muted);line-height:1.55}
.modal{position:fixed;inset:0;z-index:40}.modal-backdrop{position:absolute;inset:0;background:rgba(0,0,0,.62);display:grid;place-items:center;padding:22px}.modal-card{width:min(1120px,96vw);max-height:90vh;overflow:auto;background:linear-gradient(135deg,var(--panel),#17181b);border:1px solid var(--line-gold);border-radius:28px;box-shadow:0 30px 100px rgba(0,0,0,.65);padding:20px}.modal-head{display:flex;justify-content:space-between;gap:20px;margin-bottom:16px}.modal-head h2{margin:4px 0}.modal-head p{margin:0;color:var(--muted)}.icon-btn{width:42px;height:42px;border-radius:16px;background:rgba(255,255,255,.07);border:1px solid var(--line);color:#fff;font-size:25px}.modal-grid{display:grid;grid-template-columns:350px 1fr;gap:14px}.form-card,.site-admin-list{background:rgba(20,20,23,.42);border:1px solid var(--line);border-radius:22px;padding:16px;display:grid;gap:10px}.form-card label{display:grid;gap:6px;color:rgba(245,245,245,.75);font-size:12px;font-weight:850}.form-card input,.form-card select{height:38px;padding:0 11px}.advanced-box{border:1px solid rgba(216,155,91,.18);border-radius:18px;padding:12px;background:rgba(216,155,91,.04)}.advanced-box summary{color:var(--warm-gold);font-weight:950}.advanced-box p{color:var(--muted)}.admin-site-row{display:grid;grid-template-columns:36px 1fr auto auto;gap:10px;align-items:center;border-top:1px solid var(--line);padding:10px 0}.admin-site-row span{display:block;color:var(--muted);font-size:12px}.discovery-toolbar{display:flex;justify-content:space-between;align-items:center;border:1px solid var(--line);border-radius:20px;padding:13px;background:rgba(20,20,23,.42);margin-bottom:12px}.loading-box{display:grid;place-items:center;gap:8px}.spinner{width:34px;height:34px;border-radius:50%;border:3px solid rgba(255,255,255,.12);border-top-color:var(--warm-gold);animation:spin 1s linear infinite}@keyframes spin{to{transform:rotate(360deg)}}.scan-results{display:grid;gap:10px}.scan-item{background:rgba(245,245,245,.045);border:1px solid var(--line);border-radius:20px;padding:12px;display:grid;grid-template-columns:1fr auto;gap:12px;align-items:center}.scan-item.already{opacity:.65}.scan-main{display:flex;gap:12px;align-items:center}.scan-main b,.scan-main span,.scan-main small{display:block}.scan-main span{color:var(--muted)}.scan-main small{color:var(--muted2)}.scan-add{display:grid;grid-template-columns:190px 120px 80px 60px auto;gap:6px;align-items:center}.scan-add input,.scan-add select{height:34px;padding:0 8px}.already-badge{color:var(--green);font-weight:900}.toast{position:fixed;right:18px;bottom:18px;max-width:520px;padding:14px 16px;border-radius:18px;background:#121315;border:1px solid var(--line-gold);color:#fff;box-shadow:0 20px 70px rgba(0,0,0,.55);z-index:60}.toast-error{border-color:rgba(240,107,104,.45);background:#221517}
@media(max-width:1250px){.commandbar{grid-template-columns:250px 1fr}.top-tools{grid-column:1/-1;justify-content:flex-start}.shell{grid-template-rows:auto 70px 1fr}.dashboard-split,.hero-grid,.map-shell,.settings-layout{grid-template-columns:1fr}.inspector{position:static}.site-switcher{grid-template-columns:1fr 110px 110px}.quick-card:nth-of-type(4),.quick-actions{grid-column:1/-1}.device-row{grid-template-columns:1fr}.device-actions{justify-content:flex-start}.modal-grid{grid-template-columns:1fr}.scan-item{grid-template-columns:1fr}.scan-add{grid-template-columns:1fr 1fr 80px 70px auto}}


/* v14 cleanup: status is integrated in Site Control Center, and side inspector is removed */
.hero-panel-wide{margin-bottom:14px;padding:24px 26px;}
.hero-main-row{display:grid;grid-template-columns:minmax(340px,1fr) minmax(420px,0.8fr);gap:22px;align-items:stretch;}
.hero-status-row{display:grid;grid-template-columns:repeat(2,minmax(160px,1fr));gap:12px;align-content:stretch;}
.hero-status-row .signal-tile{min-height:86px;}
.full-width-workbench{width:100%;}
.scan-add{grid-template-columns:minmax(220px,1fr) 150px 95px 74px auto;}
.scan-add input[name="name"]{font-weight:800;}
.form-card input[autocomplete="one-time-code"]{background:#2a2a2f;color:#f5f5f5;}
@media(max-width:1100px){.hero-main-row{grid-template-columns:1fr}.hero-status-row{grid-template-columns:repeat(2,1fr)}}
@media(max-width:700px){.hero-status-row{grid-template-columns:1fr}.scan-add{grid-template-columns:1fr 1fr}.scan-add button{grid-column:1/-1}}


/* v15 settings + dropdown cleanup */
.settings-layout-wide{max-width:1320px;margin:0 auto;align-items:start}.editable-settings-card{gap:14px}.setting-card-head h3{margin-bottom:4px}.setting-card-head small{color:var(--muted);line-height:1.45}.setting-add-form{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center}.setting-add-form input{height:38px;padding:0 11px;background:rgba(245,245,245,.07);border:1px solid var(--line);color:#fff;border-radius:14px;outline:none}.setting-add-form input:focus{border-color:var(--warm-gold);box-shadow:0 0 0 3px rgba(216,155,91,.12)}.setting-pills{display:grid;gap:8px}.setting-pill{display:grid;grid-template-columns:1fr auto;gap:10px;align-items:center;border:1px solid var(--line);background:rgba(245,245,245,.045);border-radius:15px;padding:8px 9px}.setting-pill span{font-weight:800;color:#fff}.scan-add select,.form-card select,.selector-card select{background:#2B2D31!important;color:#F5F5F5!important}.scan-add select option,.form-card select option,.selector-card select option{background:#2B2D31!important;color:#F5F5F5!important}.scan-add select option:checked,.form-card select option:checked,.selector-card select option:checked{background:#C0561E!important;color:#fff!important}

/* v17: clean multi-site map with MLST pins */
.map-command-layout{display:grid;grid-template-rows:auto 1fr;gap:14px;height:100%;min-height:650px}.map-command-header{display:flex;justify-content:space-between;gap:18px;align-items:flex-end;background:linear-gradient(135deg,rgba(30,30,34,.92),rgba(43,45,49,.72));border:1px solid var(--line);border-radius:26px;padding:20px 22px;box-shadow:var(--shadow)}.map-command-header h1{margin:4px 0 5px;font-size:30px}.map-command-header p{margin:0;color:var(--muted)}.map-header-actions{display:flex;gap:9px;align-items:center}.map-command-grid{display:grid;grid-template-columns:minmax(520px,1fr) 340px;gap:14px;min-height:0}.map-canvas-panel,.map-site-panel{background:rgba(30,30,34,.78);border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);overflow:hidden}.map-canvas-panel{display:grid;grid-template-rows:1fr auto}.mlst-map-canvas{min-height:560px;height:100%;background:radial-gradient(circle at 50% 50%,rgba(54,93,83,.45),rgba(20,20,23,.95));position:relative}.map-loading,.map-placeholder{position:absolute;inset:0;display:grid;place-items:center;text-align:center;padding:30px;color:var(--muted)}.map-placeholder{position:relative;min-height:420px}.map-placeholder h2{color:#fff;margin:0 0 8px}.map-legend{display:flex;gap:18px;flex-wrap:wrap;align-items:center;padding:12px 16px;border-top:1px solid var(--line);background:rgba(20,20,23,.72);color:var(--muted);font-size:12px}.pin-dot{width:10px;height:10px;border-radius:50%;display:inline-block;margin-right:6px;box-shadow:0 0 0 3px rgba(255,255,255,.08)}.pin-dot.green{background:var(--green)}.pin-dot.gold{background:var(--warm-gold)}.map-site-panel{padding:16px;overflow:auto}.map-panel-section{display:grid;gap:10px;margin-bottom:18px}.map-panel-section .eyebrow{margin-bottom:4px}.map-site-stack,.map-missing-list{display:grid;gap:8px}.map-site-card,.map-missing-list button{width:100%;text-align:left;display:grid;grid-template-columns:14px 1fr;gap:11px;align-items:center;background:rgba(245,245,245,.045);border:1px solid var(--line);border-radius:18px;padding:12px;color:#fff}.map-site-card:hover,.map-missing-list button:hover{border-color:var(--line-gold);background:rgba(216,155,91,.06)}.map-site-card.selected{border-color:rgba(216,155,91,.55);background:linear-gradient(135deg,rgba(192,86,30,.22),rgba(216,155,91,.08))}.map-site-status{width:10px;height:10px;border-radius:50%;background:var(--green);box-shadow:0 0 0 4px rgba(114,217,121,.10)}.map-site-status.selected{background:var(--warm-gold);box-shadow:0 0 0 4px rgba(216,155,91,.15)}.map-site-card b,.map-missing-list b{display:block}.map-site-card small,.map-missing-list span{display:block;color:var(--muted);margin-top:3px;font-size:12px}.map-note{border:1px dashed var(--line-gold);border-radius:18px;padding:14px;color:var(--muted);background:rgba(216,155,91,.04)}.map-note b,.map-note span{display:block}.muted-section{opacity:.88}.leaflet-container{background:#1E1E22;color:#111}.leaflet-control-attribution{font-size:10px}.mlst-leaflet-pin{background:transparent;border:0}.mlst-leaflet-pin span{width:34px;height:34px;border-radius:50% 50% 50% 8px;transform:rotate(-45deg);display:grid;place-items:center;background:linear-gradient(135deg,var(--copper),var(--warm-gold));border:2px solid rgba(245,245,245,.86);box-shadow:0 12px 25px rgba(0,0,0,.45);color:#171717;font-weight:950;font-size:11px}.mlst-leaflet-pin span::before{content:""}.mlst-leaflet-pin span{line-height:1}.mlst-leaflet-pin span>*{transform:rotate(45deg)}.mlst-leaflet-pin span{font-family:Inter,Segoe UI,Arial,sans-serif}.mlst-leaflet-pin.selected span{background:linear-gradient(135deg,#72D979,var(--warm-gold));box-shadow:0 0 0 5px rgba(216,155,91,.20),0 12px 25px rgba(0,0,0,.45)}.mlst-map-popup{display:grid;gap:4px;min-width:160px;color:#1a1a1a}.mlst-map-popup b{font-size:14px}.mlst-map-popup span,.mlst-map-popup small{color:#555}.mlst-map-popup button{margin-top:6px;border:0;border-radius:9px;background:#C0561E;color:white;font-weight:800;padding:7px 9px;cursor:pointer}@media(max-width:1100px){.map-command-grid{grid-template-columns:1fr}.map-site-panel{max-height:none}.map-command-header{align-items:flex-start;flex-direction:column}.mlst-map-canvas{min-height:480px}}
.mlst-leaflet-pin span em{transform:rotate(45deg);font-style:normal;display:block}.mlst-leaflet-pin span{transform:rotate(-45deg)}


/* v18: Local Leaflet layout fallback.
   Some Windows/browser setups fail to apply the CDN Leaflet stylesheet, which makes map tiles appear as loose squares.
   These core rules keep tiles, panes and controls positioned correctly even if CDN CSS is blocked. */
.mlst-map-canvas.leaflet-container,
.mlst-map-canvas .leaflet-container,
.leaflet-container {
  overflow: hidden !important;
  position: relative !important;
  outline-style: none !important;
  font-family: Inter, Segoe UI, Arial, sans-serif;
}
.leaflet-pane,
.leaflet-tile,
.leaflet-marker-icon,
.leaflet-marker-shadow,
.leaflet-tile-container,
.leaflet-pane > svg,
.leaflet-pane > canvas,
.leaflet-zoom-box,
.leaflet-image-layer,
.leaflet-layer {
  position: absolute !important;
  left: 0;
  top: 0;
}
.leaflet-container img.leaflet-tile {
  max-width: none !important;
  max-height: none !important;
  width: 256px !important;
  height: 256px !important;
  border: 0 !important;
}
.leaflet-tile {
  filter: saturate(.92) contrast(.95) brightness(.92);
  visibility: inherit !important;
}
.leaflet-marker-icon,
.leaflet-marker-shadow { display: block !important; }
.leaflet-map-pane { z-index: 400; position:absolute !important; left:0; top:0; }
.leaflet-tile-pane { z-index: 200; }
.leaflet-overlay-pane { z-index: 400; }
.leaflet-shadow-pane { z-index: 500; }
.leaflet-marker-pane { z-index: 600; }
.leaflet-tooltip-pane { z-index: 650; }
.leaflet-popup-pane { z-index: 700; }
.leaflet-control { position: relative; z-index: 800; pointer-events: visiblePainted; pointer-events: auto; }
.leaflet-top,
.leaflet-bottom { position: absolute; z-index: 1000; pointer-events: none; }
.leaflet-top { top: 0; }
.leaflet-right { right: 0; }
.leaflet-bottom { bottom: 0; }
.leaflet-left { left: 0; }
.leaflet-control { float: left; clear: both; }
.leaflet-right .leaflet-control { float: right; }
.leaflet-top .leaflet-control { margin-top: 10px; }
.leaflet-bottom .leaflet-control { margin-bottom: 10px; }
.leaflet-left .leaflet-control { margin-left: 10px; }
.leaflet-right .leaflet-control { margin-right: 10px; }
.leaflet-control-zoom a {
  background: rgba(30,30,34,.94) !important;
  color: #F5F5F5 !important;
  border-bottom: 1px solid rgba(245,245,245,.14) !important;
  width: 30px; height: 30px; line-height: 30px; display:block; text-align:center; text-decoration:none;
}
.leaflet-control-zoom a:hover { background: rgba(192,86,30,.86) !important; }
.leaflet-control-attribution {
  background: rgba(30,30,34,.72) !important;
  color: rgba(245,245,245,.72) !important;
  padding: 3px 7px !important;
}
.leaflet-control-attribution a { color: #D89B5B !important; }
.leaflet-popup-content-wrapper,
.leaflet-popup-tip {
  background: #F5F5F5 !important;
  color: #1E1E22 !important;
}
.leaflet-popup-content { margin: 12px 14px !important; }
.leaflet-fade-anim .leaflet-popup { transition: opacity .2s linear; }
.leaflet-zoom-animated { transform-origin: 0 0; }
.leaflet-interactive { cursor: pointer; }
.map-canvas-panel { min-width: 0; }
.mlst-map-canvas { width: 100%; min-width: 0; }

/* v19: cleaned settings page */
.settings-page-clean{max-width:1260px;margin:0 auto;display:grid;gap:16px;padding:2px 0 28px}
.settings-hero-clean{background:linear-gradient(135deg,rgba(43,45,49,.78),rgba(30,30,34,.62));border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);padding:22px 24px;display:grid;grid-template-columns:1fr auto;gap:22px;align-items:center;overflow:hidden;position:relative}
.settings-hero-clean:after{content:"";position:absolute;right:-90px;top:-90px;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,rgba(216,155,91,.16),transparent 68%);pointer-events:none}
.settings-hero-clean h1{font-size:34px;letter-spacing:-.04em;margin:7px 0 6px}.settings-hero-clean p{margin:0;color:var(--muted);line-height:1.55}.settings-summary-strip{display:grid;grid-template-columns:repeat(3,130px);gap:10px;position:relative;z-index:1}.settings-summary-strip div{border:1px solid var(--line);background:rgba(20,20,23,.42);border-radius:20px;padding:13px 14px}.settings-summary-strip b{font-size:22px;display:block}.settings-summary-strip span{display:block;margin-top:3px;color:var(--muted2);font-size:10px;text-transform:uppercase;letter-spacing:.12em;font-weight:950}
.settings-clean-grid{display:grid;grid-template-columns:1fr 1fr 1fr;gap:16px;align-items:start}.settings-clean-card{background:linear-gradient(135deg,rgba(43,45,49,.82),rgba(30,30,34,.66));border:1px solid var(--line);border-radius:28px;box-shadow:var(--shadow);padding:18px;display:grid;gap:15px;min-height:360px}.settings-clean-head{display:grid;grid-template-columns:52px 1fr;gap:14px;align-items:start}.settings-badge{width:52px;height:52px;border-radius:18px;background:linear-gradient(135deg,rgba(192,86,30,.96),rgba(216,155,91,.86));color:#171717;display:grid;place-items:center;font-weight:950;letter-spacing:.04em;box-shadow:0 16px 34px rgba(192,86,30,.22)}.settings-clean-head h3{font-size:21px;margin:2px 0 4px}.settings-clean-head p{margin:0;color:var(--muted);line-height:1.45;font-size:12px}.settings-inline-add{display:grid;grid-template-columns:1fr auto;gap:9px;background:rgba(20,20,23,.28);border:1px solid var(--line);border-radius:18px;padding:8px}.settings-inline-add input{height:40px;background:rgba(245,245,245,.065);border:1px solid var(--line);color:#fff;border-radius:13px;padding:0 12px;outline:none;min-width:0}.settings-inline-add input:focus{border-color:var(--warm-gold);box-shadow:0 0 0 3px rgba(216,155,91,.12)}.settings-chip-list{display:flex;flex-direction:column;gap:8px;max-height:420px;overflow:auto;padding-right:3px}.settings-chip-list.category-chips{display:grid;grid-template-columns:1fr 1fr}.settings-chip{display:grid;grid-template-columns:1fr 28px;gap:8px;align-items:center;border:1px solid var(--line);background:linear-gradient(135deg,rgba(245,245,245,.06),rgba(245,245,245,.035));border-radius:16px;padding:9px 9px 9px 12px;min-width:0}.settings-chip span{font-weight:850;color:#fff;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.settings-chip button{width:28px;height:28px;border:0;border-radius:10px;background:rgba(240,107,104,.14);border:1px solid rgba(240,107,104,.24);color:#ffc4c4;font-size:18px;line-height:1;font-weight:900}.settings-chip button:hover{background:rgba(240,107,104,.25)}.settings-note-card{display:grid;grid-template-columns:42px 1fr;gap:13px;align-items:center;border:1px solid var(--line-gold);background:rgba(216,155,91,.055);border-radius:22px;padding:14px 16px}.note-dot{width:42px;height:42px;border-radius:16px;background:rgba(216,155,91,.16);border:1px solid var(--line-gold);display:grid;place-items:center;color:var(--warm-gold);font-weight:950}.settings-note-card b,.settings-note-card span{display:block}.settings-note-card span{margin-top:2px;color:var(--muted);line-height:1.45}.settings-note-card code{color:var(--warm-gold);background:rgba(0,0,0,.22);border:1px solid var(--line);border-radius:8px;padding:2px 6px}
@media(max-width:1250px){.settings-clean-grid{grid-template-columns:1fr}.settings-clean-card{min-height:auto}.settings-hero-clean{grid-template-columns:1fr}.settings-summary-strip{grid-template-columns:repeat(3,1fr)}}
@media(max-width:720px){.settings-summary-strip{grid-template-columns:1fr}.settings-chip-list.category-chips{grid-template-columns:1fr}.settings-clean-head{grid-template-columns:1fr}.settings-badge{width:48px;height:48px}.settings-inline-add{grid-template-columns:1fr}.settings-inline-add button{width:100%}}


/* v20: Edit device modal */
.device-edit-form{max-width:860px;margin-top:14px;background:rgba(20,20,23,.30)}
.edit-form-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:12px;align-items:end}
.edit-form-grid label{display:grid;gap:7px;color:rgba(245,245,245,.76);font-weight:850}
.edit-preview-box{margin-top:14px;border:1px solid var(--line-gold);background:rgba(216,155,91,.055);border-radius:18px;padding:13px 15px;display:grid;gap:4px}
.edit-preview-box span{color:var(--muted);line-height:1.45}.modal-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:15px}
@media(max-width:900px){.edit-form-grid{grid-template-columns:1fr}.modal-actions{flex-direction:column}.modal-actions button{width:100%}}
.info-strip{margin:12px 0;padding:12px 14px;border-radius:16px;border:1px solid rgba(216,155,91,.28);background:rgba(216,155,91,.08);color:#d7d0ca;font-weight:700;font-size:13px}.info-strip.good{border-color:rgba(82,211,126,.25);background:rgba(82,211,126,.08)}.info-strip.warn{border-color:rgba(216,155,91,.35);background:rgba(192,86,30,.10)}.scan-help-line{color:#d89b5b!important;font-size:11px!important;margin-top:2px!important;display:block!important}

/* v23 site edit helpers */
.wide-form{max-width:880px;margin:0 auto}.form-grid-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.form-grid-two .span-two{grid-column:1/-1}.button-row{display:flex;gap:10px;align-items:center}.button-row.end{justify-content:flex-end;margin-top:12px}@media(max-width:800px){.form-grid-two{grid-template-columns:1fr}}

.table-wrap {
  overflow: auto;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 18px;
  background: rgba(30,30,34,0.62);
  max-height: 62vh;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 760px;
}
.data-table th,
.data-table td {
  padding: 12px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.08);
  color: rgba(245,245,245,0.86);
  font-size: 13px;
  text-align: left;
}
.data-table th {
  color: #D89B5B;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  background: rgba(192,86,30,0.10);
  position: sticky;
  top: 0;
}
.data-table tr:hover td { background: rgba(255,255,255,0.035); }

/* v28/v27 additions: service mode, notes, favorites, ignored discoveries and richer status */
.site-service-grid {
  display: grid;
  grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.4fr);
  gap: 18px;
  margin: 18px 0;
}
.service-card,
.notes-card {
  border: 1px solid rgba(216,155,91,.20);
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(43,45,49,.92), rgba(30,30,34,.96));
  box-shadow: 0 18px 45px rgba(0,0,0,.20);
  padding: 18px;
}
.service-card.active {
  border-color: rgba(192,86,30,.62);
  background: linear-gradient(145deg, rgba(192,86,30,.18), rgba(43,45,49,.96));
}
.card-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}
.card-title-row h3 { margin: 2px 0 0; color: var(--soft-white, #F5F5F5); }
.service-card p { color: rgba(245,245,245,.66); margin: 8px 0 16px; line-height: 1.5; }
.service-dot {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  background: rgba(245,245,245,.22);
  box-shadow: 0 0 0 6px rgba(245,245,245,.04);
  flex: 0 0 auto;
}
.service-dot.on {
  background: #D89B5B;
  box-shadow: 0 0 0 6px rgba(216,155,91,.16), 0 0 20px rgba(216,155,91,.55);
}
.notes-card textarea {
  width: 100%;
  min-height: 108px;
  resize: vertical;
  border-radius: 18px;
  border: 1px solid rgba(245,245,245,.11);
  background: rgba(16,17,20,.62);
  color: #F5F5F5;
  padding: 14px;
  line-height: 1.45;
  outline: none;
}
.notes-card textarea:focus { border-color: rgba(216,155,91,.55); box-shadow: 0 0 0 3px rgba(216,155,91,.10); }
.favorite-device { border-color: rgba(216,155,91,.42) !important; background: linear-gradient(90deg, rgba(216,155,91,.08), rgba(255,255,255,.035)) !important; }
.star-btn {
  border: 0;
  background: rgba(245,245,245,.08);
  color: rgba(245,245,245,.45);
  border-radius: 12px;
  width: 32px;
  height: 32px;
  font-size: 16px;
  cursor: pointer;
}
.star-btn:hover,
.star-btn.active { color: #D89B5B; background: rgba(216,155,91,.16); }
.live-dot.ok { background: #40d98d; box-shadow: 0 0 0 5px rgba(64,217,141,.12); }
.live-dot.bad { background: #ff6b6b; box-shadow: 0 0 0 5px rgba(255,107,107,.12); }
.device-status-stack {
  min-width: 190px;
  display: flex;
  flex-direction: column;
  gap: 5px;
  color: rgba(245,245,245,.50);
  font-size: 12px;
}
.status-chip {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  border-radius: 999px;
  border: 1px solid rgba(245,245,245,.10);
  background: rgba(245,245,245,.06);
  color: rgba(245,245,245,.70);
  padding: 4px 8px;
  font-size: 11px;
  font-weight: 700;
}
.status-chip.ok { color: #9df0bf; background: rgba(64,217,141,.11); border-color: rgba(64,217,141,.25); }
.status-chip.bad { color: #ffb0b0; background: rgba(255,107,107,.10); border-color: rgba(255,107,107,.25); }
.status-chip.unknown { color: rgba(245,245,245,.55); }
.ignored-list { display: grid; gap: 10px; margin-top: 16px; }
.ignored-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid rgba(245,245,245,.10);
  background: rgba(245,245,245,.045);
  border-radius: 18px;
  padding: 12px 14px;
}
.ignored-row div { display: flex; flex-direction: column; gap: 3px; }
.ignored-row span { color: rgba(245,245,245,.48); font-size: 12px; }
.scan-add { grid-template-columns: minmax(180px,1fr) minmax(140px,.7fr) 90px 70px auto auto; }
@media (max-width: 980px) {
  .site-service-grid { grid-template-columns: 1fr; }
  .device-status-stack { min-width: 100%; }
  .scan-add { grid-template-columns: 1fr; }
}

.top-service-grid{margin-top:0;}

/* v29: tydeligere toppmeny */
@media(max-width:1320px){.commandbar{grid-template-columns:240px minmax(420px,1fr) 420px}.nav-pill{height:54px;padding:0 18px;font-size:15px}.active-site-copy strong{font-size:16px}.global-search{width:90px}}
@media(max-width:1080px){.commandbar{grid-template-columns:1fr;grid-template-rows:auto auto auto;height:auto;padding:14px}.shell{grid-template-rows:auto 70px 1fr}.top-nav{justify-content:flex-start}.top-tools{justify-content:stretch}.active-site-top{min-width:0}.workspace{height:calc(100vh - 300px)}}

/* v30 UX cleanup */
.v30-shell{grid-template-rows:116px 92px 1fr;gap:14px}.v30-commandbar{grid-template-columns:260px minmax(520px,1fr) 140px}.v30-workspace{height:calc(100vh - 250px)}.site-dock{display:grid;grid-template-columns:minmax(300px,1fr) 310px 58px auto auto;gap:12px;align-items:stretch}.site-dock-main,.site-select-large,.site-dock-gear{background:rgba(30,30,34,.75);border:1px solid var(--line);border-radius:24px;box-shadow:0 12px 38px rgba(0,0,0,.20);backdrop-filter:blur(12px)}.site-dock-main{padding:15px 18px;min-width:0;border-color:rgba(216,155,91,.22);background:linear-gradient(135deg,rgba(192,86,30,.16),rgba(43,45,49,.72))}.site-dock-main.empty{border-color:var(--line);background:rgba(30,30,34,.75)}.site-mini-label{color:var(--warm-gold);font-size:10px;text-transform:uppercase;letter-spacing:.22em;font-weight:950}.site-dock-title{margin-top:3px;font-size:28px;line-height:1.05;font-weight:950;letter-spacing:.05em;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.site-dock-meta{margin-top:4px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.site-select-large{display:grid;gap:5px;padding:12px 14px}.site-select-large span{color:var(--muted2);font-size:10px;text-transform:uppercase;font-weight:950;letter-spacing:.16em}.site-select-large select{height:42px;background:rgba(245,245,245,.07);border:1px solid var(--line);border-radius:14px;color:#fff;padding:0 12px}.site-dock-gear{width:58px;color:var(--warm-gold);font-size:22px;border-color:rgba(216,155,91,.22)}.site-dock>button{align-self:stretch;min-width:92px}.service-dashboard{display:grid;gap:14px}.site-hero-v30{display:grid;grid-template-columns:1fr auto;gap:18px;align-items:center;padding:22px 24px;border:1px solid var(--line);border-radius:28px;background:linear-gradient(135deg,rgba(43,45,49,.82),rgba(30,30,34,.64));box-shadow:var(--shadow);position:relative;overflow:hidden}.site-hero-v30:after{content:"";position:absolute;right:-90px;top:-90px;width:260px;height:260px;border-radius:50%;background:radial-gradient(circle,rgba(216,155,91,.17),transparent 70%)}.site-hero-copy,.site-hero-actions{position:relative;z-index:1}.site-hero-copy h1{font-size:38px;line-height:1;letter-spacing:-.04em;margin:6px 0}.site-hero-copy p{margin:0;color:var(--muted)}.site-hero-actions{display:flex;gap:9px;flex-wrap:wrap;justify-content:flex-end}.health-strip{display:grid;grid-template-columns:repeat(6,1fr);gap:10px}.health-card{display:grid;grid-template-columns:auto 1fr;grid-template-rows:auto auto;align-items:center;column-gap:9px;background:rgba(30,30,34,.62);border:1px solid var(--line);border-radius:20px;padding:13px 14px;box-shadow:0 12px 34px rgba(0,0,0,.15)}.health-card span{grid-row:1/3;width:10px;height:10px;border-radius:50%;background:#999;box-shadow:0 0 18px currentColor}.health-card.ok span{background:var(--green);color:var(--green)}.health-card.warn span{background:var(--warm-gold);color:var(--warm-gold)}.health-card.bad span{background:var(--red);color:var(--red)}.health-card b{font-size:18px}.health-card small{color:var(--muted);font-size:11px;text-transform:uppercase;font-weight:850;letter-spacing:.08em}.favorite-rail{display:grid;grid-template-columns:150px 1fr;gap:12px;align-items:center;background:rgba(30,30,34,.62);border:1px solid var(--line);border-radius:24px;padding:12px;box-shadow:0 12px 34px rgba(0,0,0,.14)}.favorite-rail.empty{display:block;color:var(--muted)}.favorite-rail.empty b,.favorite-rail.empty span{display:block}.favorite-title b,.favorite-title span{display:block}.favorite-title span{color:var(--muted);font-size:12px}.favorite-buttons{display:flex;gap:8px;overflow:auto}.favorite-chip{min-width:185px;display:grid;grid-template-columns:32px 1fr;grid-template-rows:auto auto;text-align:left;gap:0 8px;background:rgba(216,155,91,.08);border:1px solid rgba(216,155,91,.18);border-radius:18px;color:#fff;padding:9px 11px}.favorite-chip span{grid-row:1/3;width:32px;height:32px;border-radius:12px;background:rgba(216,155,91,.14);display:grid;place-items:center;color:var(--warm-gold)}.favorite-chip small{color:var(--muted)}.overview-grid-v30{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:14px;align-items:start}.v30-workbench-card{padding:18px}.v30-section-title{margin-bottom:12px}.workbench-actions{display:flex;gap:8px;flex-wrap:wrap}.site-side-panel{display:grid;gap:12px;position:sticky;top:0}.side-card{background:linear-gradient(135deg,rgba(43,45,49,.78),rgba(30,30,34,.62));border:1px solid var(--line);border-radius:24px;box-shadow:0 16px 50px rgba(0,0,0,.22);padding:16px}.side-card h3{margin:4px 0 10px}.service-note-card textarea,.site-tab-panel textarea{width:100%;min-height:140px;background:rgba(245,245,245,.07);border:1px solid var(--line);color:#fff;border-radius:16px;padding:12px;resize:vertical;outline:none}.side-kv{display:flex;justify-content:space-between;gap:12px;border-top:1px solid var(--line);padding:10px 0}.side-kv span{color:var(--muted)}.side-kv b{text-align:right}.v30-category{border-radius:20px}.device-table-wrap{overflow:auto}.device-table-v30{width:100%;border-collapse:separate;border-spacing:0 8px;min-width:900px}.device-table-v30 th{text-align:left;color:var(--muted2);font-size:10px;text-transform:uppercase;letter-spacing:.12em;font-weight:950;padding:0 10px}.device-table-v30 td{background:rgba(245,245,245,.045);border-top:1px solid var(--line);border-bottom:1px solid var(--line);padding:10px;vertical-align:middle}.device-table-v30 tr td:first-child{border-left:1px solid var(--line);border-radius:16px 0 0 16px}.device-table-v30 tr td:last-child{border-right:1px solid var(--line);border-radius:0 16px 16px 0}.device-name-cell{display:flex;align-items:center;gap:9px;min-width:270px}.device-name-cell strong{display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:250px}.device-name-cell small{display:block;color:var(--muted);max-width:260px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dev-icon.small{width:30px;height:30px;border-radius:12px;flex:0 0 auto}.status-pill{display:inline-flex;align-items:center;border-radius:999px;border:1px solid var(--line);background:rgba(245,245,245,.055);padding:5px 8px;font-size:12px;font-weight:850}.status-pill.ok{color:#b9ffc0;border-color:rgba(114,217,121,.25);background:rgba(114,217,121,.10)}.status-pill.bad{color:#ffc4c4;border-color:rgba(240,107,104,.25);background:rgba(240,107,104,.10)}.status-pill.unknown{color:var(--muted)}.row-actions{display:flex;gap:6px;align-items:center;justify-content:flex-end;white-space:nowrap}.ghost-menu-btn{width:34px;height:34px;border-radius:12px;border:1px solid var(--line);background:rgba(245,245,245,.06);color:#fff;font-weight:950}.hidden-direct{display:none}.device-more-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:10px}.onboarding-steps{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin:22px 0}.onboarding-steps div{background:rgba(245,245,245,.055);border:1px solid var(--line);border-radius:18px;padding:12px}.onboarding-steps b{display:grid;place-items:center;width:30px;height:30px;border-radius:11px;background:rgba(216,155,91,.14);color:var(--warm-gold);margin:0 auto 7px}.onboarding-steps span{display:block;color:var(--muted);font-weight:850}.discovery-command-panel{display:flex;justify-content:space-between;gap:14px;align-items:center;background:rgba(20,20,23,.42);border:1px solid var(--line);border-radius:22px;padding:14px;margin-bottom:12px}.discovery-command-panel b,.discovery-command-panel span{display:block}.discovery-command-panel span{color:var(--muted);font-size:12px}.discovery-summary{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:10px}.discovery-summary div{background:rgba(245,245,245,.055);border:1px solid var(--line);border-radius:16px;padding:10px}.discovery-summary b{font-size:20px}.discovery-summary span{display:block;color:var(--muted);font-size:11px;text-transform:uppercase;font-weight:850}.inbox-item{grid-template-columns:1fr;align-items:stretch}.v30-scan-add{display:grid;grid-template-columns:minmax(240px,1fr) 170px 110px 90px auto;gap:8px;align-items:end;margin-top:12px;border-top:1px solid var(--line);padding-top:12px}.v30-scan-add label{display:grid;gap:5px;color:var(--muted);font-size:11px;text-transform:uppercase;letter-spacing:.08em;font-weight:850}.v30-scan-add input,.v30-scan-add select{width:100%;height:38px}.scan-item-actions{display:flex;gap:6px}.tabbed-site-form{gap:0}.site-tabs{display:flex;gap:8px;margin-bottom:16px;flex-wrap:wrap}.site-tabs button{border:1px solid var(--line);background:rgba(245,245,245,.055);color:rgba(245,245,245,.72);border-radius:999px;padding:10px 14px;font-weight:950}.site-tabs button.active{background:linear-gradient(135deg,rgba(192,86,30,.30),rgba(216,155,91,.12));border-color:rgba(216,155,91,.35);color:#fff}.site-tab-panel{display:none;min-height:260px}.site-tab-panel.active{display:block}.site-tab-panel label{display:grid;gap:6px;color:rgba(245,245,245,.75);font-size:12px;font-weight:850}.site-tab-panel input,.site-tab-panel select,.site-tab-panel textarea{background:rgba(245,245,245,.07);border:1px solid var(--line);color:#fff;border-radius:14px;outline:none}.site-tab-panel input,.site-tab-panel select{height:40px;padding:0 11px}.site-tab-panel textarea{padding:12px}.span-two{grid-column:1/-1}.info-strip.span-two{grid-column:1/-1}.table-wrap{overflow:auto}.data-table{width:100%;border-collapse:collapse}.data-table th,.data-table td{padding:9px;border-bottom:1px solid var(--line);text-align:left}.data-table th{color:var(--muted2);text-transform:uppercase;font-size:10px;letter-spacing:.12em}.ignored-list{display:grid;gap:10px}.ignored-row{display:flex;justify-content:space-between;align-items:center;gap:10px;border:1px solid var(--line);background:rgba(245,245,245,.045);border-radius:16px;padding:10px}.ignored-row b,.ignored-row span{display:block}.ignored-row span{color:var(--muted);font-size:12px}.live-dot.ok{background:var(--green);box-shadow:0 0 12px var(--green)}.live-dot.bad{background:var(--red);box-shadow:0 0 12px var(--red)}.info-strip.good{border-color:rgba(114,217,121,.24);background:rgba(114,217,121,.08)}.info-strip.warn{border-color:rgba(216,155,91,.24);background:rgba(216,155,91,.07)}
@media(max-width:1280px){.v30-commandbar{grid-template-columns:240px 1fr}.v30-commandbar .top-tools{grid-column:auto}.site-dock{grid-template-columns:1fr 280px 58px}.site-dock>button.primary-btn,.site-dock>button.soft-btn{grid-column:auto}.health-strip{grid-template-columns:repeat(3,1fr)}.overview-grid-v30{grid-template-columns:1fr}.site-side-panel{position:static}.v30-scan-add{grid-template-columns:1fr 1fr 110px 90px}.scan-item-actions{grid-column:1/-1}.favorite-rail{grid-template-columns:1fr}}@media(max-width:900px){.site-dock{grid-template-columns:1fr}.site-dock-gear{width:auto;height:50px}.health-strip{grid-template-columns:repeat(2,1fr)}.onboarding-steps{grid-template-columns:1fr 1fr}.v30-scan-add{grid-template-columns:1fr}.device-table-v30{min-width:760px}}

/* v34 - Site config generator */
.generator-page { display: grid; gap: 18px; }
.generator-hero {
  display: flex; justify-content: space-between; gap: 18px; align-items: flex-start;
  padding: 24px; border: 1px solid rgba(216,155,91,.22); border-radius: 28px;
  background: linear-gradient(135deg, rgba(192,86,30,.18), rgba(43,45,49,.78));
  box-shadow: 0 24px 70px rgba(0,0,0,.28);
}
.generator-hero h1 { margin: 6px 0 8px; font-size: 30px; letter-spacing: -.04em; }
.generator-hero p { margin: 0; color: rgba(245,245,245,.68); max-width: 760px; }
.generator-actions { display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; }
.generator-grid { display:grid; grid-template-columns: 1.15fr .85fr 1fr; gap:16px; }
.generator-card {
  border: 1px solid rgba(255,255,255,.09); border-radius: 24px; padding: 18px;
  background: rgba(30,30,34,.78); box-shadow: 0 18px 45px rgba(0,0,0,.22);
}
.generator-card h2 { margin: 4px 0 12px; font-size: 26px; }
.generator-card p { margin: 7px 0; color: rgba(245,245,245,.7); }
.generator-card code, .generator-hero code, .install-steps code { color: #D89B5B; background: rgba(0,0,0,.22); padding: 2px 6px; border-radius: 8px; }
.ok-card { border-color: rgba(70,211,132,.22); }
.warn-card { border-color: rgba(216,155,91,.38); }
.mini-site-list { display:grid; gap:8px; max-height:210px; overflow:auto; }
.mini-site-list button { display:flex; justify-content:space-between; gap:12px; align-items:center; border:1px solid rgba(255,255,255,.08); background:rgba(255,255,255,.05); color:#F5F5F5; border-radius:14px; padding:10px 12px; cursor:pointer; }
.mini-site-list button:hover { border-color: rgba(216,155,91,.45); background:rgba(192,86,30,.12); }
.mini-site-list span { color:rgba(245,245,245,.48); font-size:12px; }
.generator-preview { border:1px solid rgba(255,255,255,.09); border-radius:28px; padding:18px; background:rgba(43,45,49,.72); }
.generator-summary { display:grid; grid-template-columns: repeat(5, minmax(0,1fr)); gap:10px; margin-bottom:14px; }
.generator-summary div { padding:14px; border-radius:18px; background:rgba(0,0,0,.16); border:1px solid rgba(255,255,255,.07); }
.generator-summary span { display:block; color:rgba(245,245,245,.45); font-size:12px; text-transform:uppercase; letter-spacing:.08em; }
.generator-summary b { display:block; margin-top:6px; font-size:17px; color:#F5F5F5; }
.generator-toolbar { display:flex; gap:10px; flex-wrap:wrap; margin: 10px 0 16px; }
.code-panels { display:grid; grid-template-columns: 1.35fr .75fr; gap:16px; }
.code-panels h3 { margin: 0 0 10px; }
.code-box { width:100%; min-height:520px; resize:vertical; border:1px solid rgba(216,155,91,.18); border-radius:18px; background:#111217; color:#F5F5F5; padding:16px; font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size:12px; line-height:1.45; }
.code-box.small { min-height:180px; }
.install-steps { margin-top:14px; border:1px solid rgba(255,255,255,.08); border-radius:18px; padding:16px; background:rgba(0,0,0,.18); color:rgba(245,245,245,.7); }
.install-steps b { color:#F5F5F5; }
.install-steps ol { margin: 10px 0 0 20px; padding:0; }
.install-steps li { margin: 6px 0; }
@media (max-width: 1000px) { .generator-grid, .code-panels, .generator-summary { grid-template-columns: 1fr; } .generator-hero { flex-direction: column; } }

/* v35 - Service Discovery Mode */
.discovery-mode-card { display:grid; gap:10px; border-color: rgba(216,155,91,.18); }
.discovery-mode-card.active { border-color: rgba(216,155,91,.42); background: linear-gradient(135deg, rgba(192,86,30,.16), rgba(30,30,34,.72)); }
.discovery-mode-card h3 { margin: 2px 0 0; }
.discovery-mode-card select { width:100%; height:40px; border-radius:14px; border:1px solid var(--line); background:rgba(245,245,245,.07); color:#fff; padding:0 12px; }
.discovery-mode-card .tiny-label { color: var(--muted2); font-size:10px; text-transform:uppercase; letter-spacing:.14em; font-weight:950; margin-top:4px; }
.discovery-timer { font-size:42px; font-weight:950; letter-spacing:-.05em; color: var(--warm-gold); line-height:1; }
.full { width:100%; justify-content:center; }
.muted-copy { color: var(--muted); font-size:12px; line-height:1.45; }


/* v37 - global alerts and log page */
.global-notice {
  margin: 16px 0 0;
  border: 1px solid rgba(216,155,91,.35);
  background: linear-gradient(135deg, rgba(216,155,91,.16), rgba(43,45,49,.82));
  border-radius: 18px;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 18px 50px rgba(0,0,0,.18);
}
.global-notice.critical { border-color: rgba(255,91,91,.42); background: linear-gradient(135deg, rgba(192,86,30,.20), rgba(43,45,49,.86)); }
.global-notice b { display: block; color: #F5F5F5; font-size: .95rem; }
.global-notice span { display: block; color: rgba(245,245,245,.72); margin-top: 2px; }
.logs-page { display: grid; gap: 18px; }
.alert-summary { border: 1px solid rgba(192,86,30,.38); background: rgba(192,86,30,.13); border-radius: 18px; padding: 14px 16px; }
.alert-summary b { display: block; color: #F5F5F5; margin-bottom: 4px; }
.alert-summary span { color: rgba(245,245,245,.72); }
.log-list { display: grid; gap: 10px; }
.log-row { border: 1px solid rgba(255,255,255,.10); background: rgba(43,45,49,.78); border-radius: 16px; padding: 13px 14px; display: grid; grid-template-columns: 10px 1fr auto; gap: 12px; align-items: center; }
.log-row .log-dot { width: 10px; height: 10px; border-radius: 999px; background: rgba(245,245,245,.35); }
.log-row.ok .log-dot { background: #54d38a; }
.log-row.warn .log-dot { background: #D89B5B; }
.log-row.bad .log-dot { background: #ff6b6b; }
.log-main b { display:block; color:#F5F5F5; }
.log-main span { display:block; color:rgba(245,245,245,.70); margin-top:2px; }
.log-main small { display:block; color:rgba(245,245,245,.42); margin-top:4px; }
.log-row time { color:rgba(245,245,245,.45); font-size:.82rem; white-space:nowrap; }
@media (max-width: 760px) { .global-notice, .log-row { grid-template-columns: 1fr; display: grid; } .log-row time { white-space: normal; } }

/* v38 UX refresh: roligere, luftigere og mer servicevennlig layout */
html,
body,
#app {
  min-height: 100%;
  height: auto;
}

body {
  overflow: auto;
  font-size: 14px;
  line-height: 1.45;
}

/* Mindre kompakt toppområde */
.v30-shell,
.shell {
  min-height: 100vh;
  height: auto;
  grid-template-rows: auto auto 1fr;
  padding: 18px;
  gap: 16px;
}

.v30-commandbar,
.commandbar {
  min-height: 88px;
  grid-template-columns: 240px minmax(0, 1fr) 210px;
  padding: 14px 18px;
  gap: 18px;
}

.brand-orb {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.brand-title { font-size: 19px; }
.brand-caption { font-size: 10px; }

/* Toppnavigasjon: færre valg, mer lesbart */
.top-nav,
.primary-nav {
  gap: 8px;
  padding: 4px;
  justify-content: center;
}

.nav-pill {
  height: 46px;
  padding: 0 17px;
  font-size: 14px;
  font-weight: 850;
  border-radius: 15px;
}

.nav-pill.more-pill {
  border-color: rgba(216,155,91,.20);
}

.global-search {
  width: 100%;
  min-width: 140px;
}

/* Site-dock: tydeligere hovedkontekst */
.site-dock {
  grid-template-columns: minmax(280px, 1fr) 280px auto auto auto;
  gap: 10px;
}

.site-dock-main,
.site-select-large,
.site-dock-gear {
  border-radius: 20px;
}

.site-dock-title {
  font-size: 22px;
  letter-spacing: .02em;
}

/* Workspace skal kunne scrolle naturlig */
.v30-workspace,
.workspace {
  height: auto;
  min-height: 0;
  overflow: visible;
  padding-bottom: 44px;
}

/* Cleaner visual system */
:root {
  --radius-lg: 20px;
  --radius-md: 14px;
  --surface-clean: rgba(30, 30, 34, .78);
  --surface-soft: rgba(245, 245, 245, .045);
  --shadow-clean: 0 14px 38px rgba(0,0,0,.26);
}

.hero-panel,
.signal-panel,
.page-card,
.inspector-card,
.device-workbench,
.map-info,
.abstract-map,
.settings-card,
.support-card,
.site-hero-v30,
.side-card,
.category-lane,
.settings-clean-card,
.settings-hero-clean {
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-clean);
}

.nav-pill,
.primary-btn,
.gold-btn,
.soft-btn,
.ghost-btn,
.danger-btn,
.global-search,
select,
input,
textarea {
  border-radius: var(--radius-md);
}

/* Mindre glow og mindre gaming-dashboard-følelse */
.brand-orb,
.empty-orb,
.primary-btn,
.gold-btn {
  box-shadow: none;
}

.hero-panel::after,
.site-hero-v30::after,
.settings-hero-clean::after {
  opacity: .30;
}

/* Hero: bedre lesbarhet */
.site-hero-v30 {
  padding: 22px;
  border-radius: 24px;
}

.site-hero-copy h1 {
  font-size: clamp(28px, 4vw, 38px);
}

.site-hero-actions { align-items: center; }

/* Statuskort: mer minimalistiske, farge brukes mest ved avvik */
.health-strip {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.health-card {
  border-radius: 18px;
  padding: 14px;
  background: var(--surface-soft);
  border: 1px solid var(--line);
  box-shadow: none;
}

.health-card b { font-size: 22px; }
.health-card small {
  color: var(--muted);
  font-size: 12px;
}
.health-card.ok { border-color: rgba(114,217,121,.18); }
.health-card.warn { border-color: rgba(216,155,91,.32); }
.health-card.bad,
.health-card.critical {
  border-color: rgba(240,107,104,.42);
  background: rgba(240,107,104,.08);
}

/* Favoritter skal ikke ta for mye plass */
.favorite-rail { grid-template-columns: 130px minmax(0, 1fr); }
.favorite-chip { min-width: 160px; }

/* Enhetstabell: roligere og mer servicevennlig */
.device-table-wrap {
  overflow-x: auto;
  padding-bottom: 4px;
}

.device-table-v30 { min-width: 820px; }

.device-table-v30 th {
  color: var(--muted2);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.device-table-v30 td {
  padding-top: 12px;
  padding-bottom: 12px;
}

/* Vis kun hovedhandling + meny i tabellen. Resten ligger under ••• */
.row-actions .soft-btn {
  display: none;
}

.ghost-menu-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Bedre touch targets */
button,
.nav-pill,
.site-card,
.favorite-chip,
.map-site-card {
  min-height: 44px;
}

/* Mer synlig fokus for tastaturbrukere */
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(216,155,91,.45);
  outline-offset: 3px;
}

/* Mer luft mellom hovedseksjoner */
.service-dashboard,
.settings-page-clean,
.logs-page,
.map-command-layout {
  display: grid;
  gap: 18px;
}

.overview-grid-v30 { gap: 18px; }
.category-lane { margin-bottom: 14px; }
.section-title { margin-bottom: 18px; }

/* Én tydelig aksentfarge: copper/gold for handling, nøytralt for resten */
.soft-btn {
  background: rgba(245,245,245,.055);
  border-color: rgba(245,245,245,.10);
  color: rgba(245,245,245,.78);
}
.soft-btn:hover {
  background: rgba(245,245,245,.09);
  border-color: rgba(245,245,245,.16);
}
.nav-pill.active {
  background: rgba(216,155,91,.16);
  border-color: rgba(216,155,91,.38);
  box-shadow: none;
}

.more-menu-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}
.more-menu-grid button { width: 100%; }

/* Mobil/tablet */
@media (max-width: 1120px) {
  .v30-commandbar,
  .commandbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }
  .brand-block { justify-content: flex-start; }
  .top-nav { overflow-x: auto; justify-content: flex-start; padding-bottom: 8px; }
  .nav-pill { flex: 0 0 auto; }
  .top-tools { width: 100%; }
  .global-search { width: 100%; }
  .site-dock { grid-template-columns: 1fr; }
  .site-dock > button,
  .site-dock-gear { width: 100%; min-height: 48px; }
  .site-hero-v30 { grid-template-columns: 1fr; }
  .site-hero-actions { justify-content: stretch; flex-wrap: wrap; }
  .site-hero-actions button { flex: 1 1 160px; }
  .favorite-rail { grid-template-columns: 1fr; }
  .overview-grid-v30 { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .v30-shell,
  .shell { padding: 12px; }
  .health-strip { grid-template-columns: 1fr 1fr; }
  .site-dock-title { font-size: 19px; }
  .site-hero-actions { display: grid; grid-template-columns: 1fr; }
  .modal-card { width: 96vw; padding: 16px; border-radius: 22px; }
  .more-menu-grid { grid-template-columns: 1fr; }

  /* Enhetslisten som kort på mobil i stedet for bred tabell */
  .device-table-wrap { overflow: visible; }
  .device-table-v30,
  .device-table-v30 thead,
  .device-table-v30 tbody,
  .device-table-v30 tr,
  .device-table-v30 td {
    display: block;
    width: 100%;
    min-width: 0;
  }
  .device-table-v30 thead { display: none; }
  .device-row-v30 {
    border: 1px solid var(--line);
    background: rgba(245,245,245,.045);
    border-radius: 18px;
    margin: 10px 0;
    padding: 12px;
  }
  .device-table-v30 td {
    border: 0 !important;
    padding: 8px 0;
  }
  .device-table-v30 td:not(.device-name-cell)::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--muted2);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-weight: 900;
  }
  .row-actions {
    display: grid !important;
    grid-template-columns: 1fr 54px;
    gap: 8px;
  }
  .row-actions .gold-btn { width: 100%; }
}

/* v39: samlet toppmeny med aktiv site og site-verktøy */
html, body, #app { min-height: 100%; height: auto; }
body { overflow: auto; font-size: 14px; line-height: 1.45; }
.v39-shell {
  min-height: 100vh;
  height: auto;
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 16px;
  gap: 14px;
}
.v39-commandbar {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto auto;
  gap: 14px;
  min-height: unset;
  padding: 16px 18px 18px;
  border-radius: 30px;
}
.v39-top-row {
  display: grid;
  grid-template-columns: 235px minmax(0, 1fr) 260px;
  align-items: center;
  gap: 18px;
}
.v39-nav {
  justify-content: center;
  gap: 9px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px;
}
.v39-nav .nav-pill {
  height: 48px;
  padding: 0 18px;
  font-size: 14px;
  font-weight: 950;
  border-radius: 16px;
  flex: 0 0 auto;
}
.v39-tools { justify-content: flex-end; }
.v39-tools .global-search {
  width: 100%;
  min-width: 210px;
  height: 46px;
  border-radius: 16px;
}
.v39-sitebar {
  display: grid;
  grid-template-columns: minmax(360px, 1fr) minmax(240px, 340px) 120px 160px;
  gap: 12px;
  align-items: stretch;
}
.v39-active-site,
.v39-site-select,
.v39-main-action,
.v39-secondary-action {
  min-height: 76px;
}
.v39-active-site {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 52px;
  align-items: center;
  gap: 12px;
  padding: 12px 12px 12px 18px;
  border-radius: 22px;
  border: 1px solid rgba(216,155,91,.30);
  background: linear-gradient(135deg, rgba(192,86,30,.18), rgba(43,45,49,.68));
  box-shadow: 0 14px 38px rgba(0,0,0,.22);
  min-width: 0;
}
.v39-active-site.empty {
  border-color: var(--line);
  background: rgba(245,245,245,.045);
}
.v39-active-site span,
.v39-site-select label {
  display: block;
  color: var(--warm-gold);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 950;
  margin-bottom: 4px;
}
.v39-active-site strong {
  display: block;
  font-size: clamp(20px, 2.2vw, 30px);
  letter-spacing: .035em;
  line-height: 1.05;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v39-active-site small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v39-gear {
  width: 52px;
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(216,155,91,.28);
  background: rgba(245,245,245,.065);
  color: var(--warm-gold);
  font-size: 21px;
  display: grid;
  place-items: center;
}
.v39-gear:hover { background: rgba(216,155,91,.14); transform: translateY(-1px); }
.v39-site-select {
  display: grid;
  align-content: center;
  gap: 6px;
  padding: 10px 14px;
  border-radius: 22px;
  border: 1px solid var(--line);
  background: rgba(30,30,34,.62);
}
.v39-site-select select {
  height: 42px;
  width: 100%;
  border-radius: 15px;
  padding: 0 12px;
  background: rgba(245,245,245,.07);
  border: 1px solid var(--line);
  color: #fff;
  outline: none;
}
.v39-main-action,
.v39-secondary-action {
  border-radius: 20px;
  font-size: 14px;
}
.v39-workspace {
  height: auto;
  min-height: calc(100vh - 235px);
  overflow: visible;
  padding-bottom: 44px;
}
/* Hovedvinduet får mer luft siden site-konteksten ligger i toppmenyen */
.hero-grid { margin-top: 2px; }
.hero-panel { padding: 22px; }
.hero-panel h1, .page-card h1 { font-size: clamp(28px, 3vw, 36px); }
.dashboard-split { gap: 18px; }
.device-workbench, .inspector-card, .hero-panel, .signal-panel, .page-card { border-radius: 24px; }

@media (max-width: 1400px) {
  .v39-top-row { grid-template-columns: 220px 1fr; }
  .v39-tools { grid-column: 1 / -1; }
  .v39-tools .global-search { width: 100%; }
  .v39-nav { justify-content: flex-start; }
}
@media (max-width: 980px) {
  .v39-shell { padding: 12px; }
  .v39-commandbar { padding: 14px; border-radius: 24px; }
  .v39-top-row { grid-template-columns: 1fr; }
  .brand-block { justify-content: flex-start; }
  .v39-sitebar { grid-template-columns: 1fr; }
  .v39-active-site, .v39-site-select, .v39-main-action, .v39-secondary-action { min-height: 58px; }
  .v39-nav { justify-content: flex-start; }
  .v39-nav .nav-pill { height: 44px; padding: 0 15px; font-size: 13px; }
  .v39-active-site strong { font-size: 22px; }
  .v39-workspace { min-height: 0; }
}
@media (max-width: 640px) {
  .v39-active-site { grid-template-columns: 1fr 48px; }
  .v39-active-site small { white-space: normal; }
  .v39-nav .nav-pill { height: 42px; padding: 0 13px; }
}

/* v41: all site context moved into the top menu */
.v41-shell {
  min-height: 100vh;
  height: auto;
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 16px;
  gap: 14px;
}
.v41-commandbar {
  display: block;
  min-height: unset;
  padding: 16px 18px;
  border-radius: 30px;
}
.v41-brandline {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) minmax(620px, 760px);
  align-items: center;
  gap: 18px;
}
.v41-nav {
  justify-content: center;
  gap: 10px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 4px;
}
.v41-nav .nav-pill {
  height: 50px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 950;
  border-radius: 16px;
  flex: 0 0 auto;
}
.v41-site-tools {
  display: grid;
  grid-template-columns: minmax(190px, 1fr) minmax(180px, 230px) 54px 96px 104px;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}
.v41-active-site,
.v41-site-picker,
.v41-icon-action,
.v41-scan-action,
.v41-sites-action {
  min-height: 58px;
  border-radius: 18px;
}
.v41-active-site {
  display: grid;
  align-content: center;
  min-width: 0;
  padding: 9px 13px;
  border: 1px solid rgba(216,155,91,.30);
  background: linear-gradient(135deg, rgba(192,86,30,.18), rgba(43,45,49,.64));
}
.v41-active-site.empty {
  border-color: var(--line);
  background: rgba(245,245,245,.045);
}
.v41-active-site span,
.v41-site-picker label {
  color: var(--warm-gold);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-weight: 950;
}
.v41-active-site strong {
  display: block;
  margin-top: 2px;
  color: #fff;
  font-size: 20px;
  line-height: 1;
  letter-spacing: .045em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v41-active-site small {
  margin-top: 4px;
  display: block;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.v41-site-picker {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  background: rgba(245,245,245,.045);
}
.v41-site-picker select {
  height: 32px;
  background: rgba(245,245,245,.07);
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 12px;
  padding: 0 10px;
}
.v41-icon-action {
  border: 1px solid rgba(216,155,91,.28);
  background: rgba(216,155,91,.08);
  color: var(--warm-gold);
  font-size: 20px;
  font-weight: 950;
}
.v41-icon-action:hover:not(:disabled) {
  background: rgba(216,155,91,.14);
  transform: translateY(-1px);
}
.v41-scan-action,
.v41-sites-action {
  padding: 0 16px;
  font-weight: 950;
}
.v41-workspace {
  height: auto;
  min-height: calc(100vh - 140px);
  overflow: visible;
  padding-bottom: 50px;
}
.v41-dashboard-clean .health-strip {
  margin-top: 0;
}
.v41-dashboard-clean .overview-grid-v30 {
  margin-top: 14px;
}
.site-hero-v30 {
  display: none;
}
@media (max-width: 1580px) {
  .v41-brandline { grid-template-columns: 220px minmax(0, 1fr); }
  .v41-site-tools { grid-column: 1 / -1; grid-template-columns: minmax(220px, 1fr) minmax(200px, 270px) 54px 120px 130px; }
  .v41-nav { justify-content: flex-start; }
}
@media (max-width: 900px) {
  .v41-shell { padding: 12px; }
  .v41-brandline { grid-template-columns: 1fr; gap: 12px; }
  .v41-site-tools { grid-template-columns: 1fr; }
  .v41-active-site,
  .v41-site-picker,
  .v41-icon-action,
  .v41-scan-action,
  .v41-sites-action { min-height: 48px; width: 100%; }
  .v41-nav { justify-content: flex-start; padding-bottom: 8px; }
}

/* v42: cleaner topbar, bigger visible navigation, no extra scan/site action buttons */
.v41-commandbar {
  padding: 20px 22px;
  border-radius: 32px;
}
.v41-brandline {
  grid-template-columns: 240px minmax(0, 1fr) minmax(470px, 560px);
  gap: 20px;
}
.v41-nav {
  justify-content: center;
  gap: 12px;
  padding: 6px;
}
.v41-nav .nav-pill {
  height: 60px;
  padding: 0 24px;
  font-size: 16px;
  border-radius: 18px;
  min-width: 108px;
}
.v41-site-tools {
  grid-template-columns: minmax(230px, 1fr) minmax(210px, 260px) 62px;
  gap: 12px;
}
.v41-active-site,
.v41-site-picker,
.v41-icon-action {
  min-height: 64px;
  border-radius: 20px;
}
.v41-active-site strong {
  font-size: 22px;
}
.v41-site-picker select {
  height: 38px;
  font-size: 14px;
}
.v41-icon-action {
  font-size: 22px;
}
.v41-scan-action,
.v41-sites-action {
  display: none !important;
}
@media (max-width: 1680px) {
  .v41-brandline {
    grid-template-columns: 230px minmax(0, 1fr);
  }
  .v41-site-tools {
    grid-column: 1 / -1;
    grid-template-columns: minmax(260px, 1fr) minmax(240px, 320px) 62px;
  }
  .v41-nav { justify-content: flex-start; }
}
@media (max-width: 1200px) {
  .v41-nav .nav-pill {
    height: 54px;
    min-width: 96px;
    padding: 0 18px;
    font-size: 15px;
  }
}
@media (max-width: 900px) {
  .v41-commandbar { padding: 14px; }
  .v41-brandline { grid-template-columns: 1fr; }
  .v41-site-tools { grid-template-columns: 1fr; }
  .v41-nav { justify-content: flex-start; overflow-x: auto; }
  .v41-nav .nav-pill { flex: 0 0 auto; min-width: 110px; }
}

/* v43: top site bar above main navigation */
.v43-shell {
  min-height: 100vh;
  height: auto;
  display: grid;
  grid-template-rows: auto auto 1fr;
  padding: 12px;
  gap: 12px;
}

.v43-commandbar {
  min-height: 150px;
  display: grid;
  grid-template-rows: 58px 74px;
  gap: 10px;
  padding: 10px;
  background: linear-gradient(135deg, rgba(30,30,34,.92), rgba(20,20,23,.86));
  border: 1px solid rgba(216,155,91,.18);
  border-radius: 28px;
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
}

.v43-sitebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: stretch;
}

.v43-site-main {
  min-width: 0;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas:
    "label title"
    "label meta";
  gap: 0 18px;
  align-items: center;
  text-align: left;
  border: 1px solid rgba(216,155,91,.24);
  background:
    radial-gradient(circle at 10% 50%, rgba(192,86,30,.24), transparent 34%),
    linear-gradient(135deg, rgba(43,45,49,.78), rgba(30,30,34,.70));
  border-radius: 20px;
  color: var(--soft-white, #F5F5F5);
  padding: 9px 18px;
  cursor: pointer;
}

.v43-site-main:hover {
  border-color: rgba(216,155,91,.46);
  background:
    radial-gradient(circle at 10% 50%, rgba(192,86,30,.32), transparent 34%),
    linear-gradient(135deg, rgba(43,45,49,.88), rgba(30,30,34,.76));
}

.v43-site-main span {
  grid-area: label;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .18em;
  font-weight: 950;
  color: var(--warm-gold, #D89B5B);
  padding-right: 4px;
  border-right: 1px solid rgba(216,155,91,.22);
  align-self: stretch;
  display: flex;
  align-items: center;
}

.v43-site-main strong {
  grid-area: title;
  font-size: clamp(20px, 2.1vw, 32px);
  line-height: 1;
  letter-spacing: .035em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v43-site-main small {
  grid-area: meta;
  color: rgba(245,245,245,.62);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v43-sitebar.empty .v43-site-main strong { color: rgba(245,245,245,.72); }

.v43-site-actions {
  display: flex;
  align-items: stretch;
  gap: 10px;
}

.v43-site-action {
  min-height: 56px;
  padding: 0 18px;
  border-radius: 18px;
  border: 1px solid rgba(216,155,91,.26);
  background: rgba(216,155,91,.09);
  color: var(--warm-gold, #D89B5B);
  font-weight: 950;
  letter-spacing: .01em;
  cursor: pointer;
}
.v43-site-action:hover { background: rgba(216,155,91,.15); }
.v43-site-action:disabled { opacity: .45; cursor: not-allowed; }

.v43-menubar {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) minmax(180px, 250px);
  gap: 16px;
  align-items: center;
}

.v43-brand {
  min-width: 0;
}

.v43-nav {
  justify-content: center;
  gap: 8px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
  padding: 3px;
}

.v43-nav .nav-pill {
  min-height: 52px;
  padding: 0 18px;
  font-size: 15px;
  font-weight: 950;
  flex: 0 0 auto;
}

.v43-search {
  width: 100%;
  min-height: 52px;
  border-radius: 18px;
}

.v43-workspace {
  height: auto;
  min-height: 0;
  overflow: visible;
  padding-bottom: 40px;
}

@media (max-width: 1380px) {
  .v43-menubar { grid-template-columns: 220px minmax(0, 1fr); }
  .v43-search { display: none; }
  .v43-nav .nav-pill { padding: 0 15px; font-size: 14px; }
}

@media (max-width: 980px) {
  .v43-commandbar { grid-template-rows: auto auto; min-height: auto; }
  .v43-sitebar { grid-template-columns: 1fr; }
  .v43-site-actions { display: grid; grid-template-columns: 1fr; }
  .v43-menubar { grid-template-columns: 1fr; gap: 10px; }
  .v43-brand { justify-content: flex-start; }
  .v43-nav { justify-content: flex-start; }
  .v43-site-main { grid-template-columns: 1fr; grid-template-areas: "label" "title" "meta"; gap: 3px; }
  .v43-site-main span { border-right: 0; padding-right: 0; align-self: auto; }
}

@media (max-width: 640px) {
  .v43-shell { padding: 8px; }
  .v43-commandbar { border-radius: 22px; }
  .v43-site-main strong { font-size: 20px; }
  .v43-nav .nav-pill { min-height: 48px; padding: 0 14px; }
}

/* v44: full-width active site ribbon above navigation */
.v44-shell {
  min-height: 100vh;
  height: auto;
  display: grid;
  grid-template-rows: auto auto 1fr;
  gap: 14px;
  padding: 14px;
}

.v44-header {
  display: grid;
  gap: 10px;
}

.v44-site-ribbon {
  min-height: 92px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  gap: 14px;
  background: linear-gradient(135deg, rgba(14,14,16,.96), rgba(30,30,34,.92));
  border: 1px solid rgba(216,155,91,.34);
  border-radius: 22px;
  box-shadow: 0 18px 42px rgba(0,0,0,.30);
  overflow: hidden;
}

.v44-site-ribbon.empty {
  border-color: rgba(245,245,245,.10);
}

.v44-site-title {
  min-width: 0;
  width: 100%;
  border: 0;
  background: transparent;
  color: var(--soft-white);
  display: grid;
  place-items: center;
  gap: 4px;
  padding: 18px 22px;
  text-align: center;
}

.v44-site-title:hover {
  background: radial-gradient(circle at 50% 30%, rgba(216,155,91,.10), transparent 58%);
}

.v44-site-title span {
  color: var(--warm-gold);
  font-size: 11px;
  letter-spacing: .24em;
  text-transform: uppercase;
  font-weight: 950;
}

.v44-site-title strong {
  max-width: 100%;
  color: #fff;
  font-size: clamp(26px, 3vw, 42px);
  line-height: 1;
  letter-spacing: .08em;
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v44-site-title small {
  max-width: 100%;
  color: rgba(245,245,245,.58);
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v44-site-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px 14px 0;
}

.v44-compact-action {
  height: 48px;
  min-width: 120px;
}

.v44-gear {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.v44-menu-row {
  min-height: 76px;
  display: grid;
  grid-template-columns: 255px minmax(0, 1fr) 250px;
  align-items: center;
  gap: 18px;
  background: rgba(30,30,34,.82);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: 0 16px 42px rgba(0,0,0,.26);
  padding: 10px 18px;
  backdrop-filter: blur(14px);
}

.v44-brand .brand-orb {
  width: 50px;
  height: 50px;
  border-radius: 16px;
}

.v44-brand .brand-title {
  font-size: 21px;
}

.v44-nav {
  justify-content: center;
  gap: 10px;
  padding: 4px;
}

.v44-nav .nav-pill {
  height: 50px;
  padding: 0 18px;
  border-radius: 16px;
  font-size: 15px;
  font-weight: 950;
}

.v44-search {
  width: 100%;
  height: 50px;
  border-radius: 16px;
}

.v44-workspace {
  height: auto;
  min-height: calc(100vh - 210px);
  overflow: visible;
  padding-bottom: 40px;
}

@media (max-width: 1400px) {
  .v44-menu-row { grid-template-columns: 230px minmax(0, 1fr) 210px; }
  .v44-nav .nav-pill { padding: 0 14px; font-size: 14px; }
}

@media (max-width: 1120px) {
  .v44-site-ribbon { grid-template-columns: 1fr; }
  .v44-site-tools { justify-content: center; padding: 0 16px 16px; }
  .v44-menu-row { grid-template-columns: 1fr; }
  .v44-brand { justify-content: center; }
  .v44-nav { justify-content: flex-start; overflow-x: auto; }
  .v44-search { width: 100%; }
}

@media (max-width: 640px) {
  .v44-shell { padding: 8px; gap: 10px; }
  .v44-site-title strong { font-size: 24px; }
  .v44-site-title small { white-space: normal; }
  .v44-site-tools { display: grid; grid-template-columns: 1fr 56px; }
  .v44-compact-action { width: 100%; }
  .v44-nav .nav-pill { min-height: 48px; }
}

/* v45: MLST-logo i samme site-ramme, og renere meny under */
.v45-shell {
  grid-template-rows: auto auto 1fr;
}

.v45-header {
  gap: 10px;
}

.v45-site-ribbon {
  min-height: 118px;
  grid-template-columns: 260px minmax(0, 1fr) 260px;
  align-items: center;
  padding: 0 20px;
  background:
    radial-gradient(circle at 12% 20%, rgba(192,86,30,.16), transparent 38%),
    linear-gradient(135deg, rgba(10,10,12,.98), rgba(30,30,34,.94));
}

.v45-site-logo {
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  cursor: pointer;
}

.v45-site-logo img {
  display: block;
  width: min(210px, 100%);
  max-height: 82px;
  object-fit: contain;
  filter: drop-shadow(0 12px 28px rgba(192,86,30,.20));
}

.v45-site-title {
  min-height: 104px;
  border-radius: 18px;
  padding: 14px 22px;
}

.v45-site-title strong {
  font-size: clamp(30px, 3.4vw, 54px);
  letter-spacing: .10em;
}

.v45-site-title small {
  font-size: 13px;
  max-width: 85%;
}

.v45-site-hint {
  justify-self: end;
  align-self: center;
  color: rgba(245,245,245,.42);
  font-weight: 850;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  text-align: right;
  max-width: 210px;
}

.v45-menu-row {
  grid-template-columns: minmax(0, 1fr) 300px;
  min-height: 84px;
  padding: 12px 18px;
}

.v45-nav {
  justify-content: flex-start;
  overflow-x: auto;
  gap: 12px;
}

.v45-nav .nav-pill {
  height: 54px;
  min-width: 92px;
  padding: 0 20px;
  font-size: 15px;
}

.v45-search {
  justify-self: end;
  width: 300px;
  height: 52px;
}

.v45-workspace {
  min-height: calc(100vh - 245px);
}

@media (max-width: 1280px) {
  .v45-site-ribbon {
    grid-template-columns: 220px minmax(0, 1fr) 180px;
  }
  .v45-site-logo img { width: 180px; }
  .v45-site-hint { font-size: 11px; }
  .v45-menu-row { grid-template-columns: 1fr 240px; }
  .v45-search { width: 240px; }
  .v45-nav .nav-pill { min-width: auto; padding: 0 16px; }
}

@media (max-width: 900px) {
  .v45-site-ribbon {
    grid-template-columns: 1fr;
    padding: 14px;
    gap: 10px;
    text-align: center;
  }
  .v45-site-logo {
    justify-content: center;
  }
  .v45-site-logo img {
    width: 180px;
    max-height: 70px;
  }
  .v45-site-hint {
    justify-self: center;
    text-align: center;
    max-width: none;
  }
  .v45-menu-row {
    grid-template-columns: 1fr;
  }
  .v45-search {
    justify-self: stretch;
    width: 100%;
  }
}

@media (max-width: 560px) {
  .v45-site-title strong { font-size: 24px; white-space: normal; }
  .v45-site-title small { white-space: normal; max-width: 100%; }
  .v45-nav .nav-pill { height: 50px; font-size: 14px; }
}

/* v46: renere sitebar + større, fordelte menyknapper med ikoner */
.v45-site-ribbon {
  grid-template-columns: 260px minmax(0, 1fr) !important;
  min-height: 124px;
  padding: 16px 22px;
}

.v45-site-hint { display: none !important; }

.v45-site-title {
  min-height: 86px;
  justify-content: center;
  text-align: center;
}

.v45-site-title span {
  color: var(--warm-gold);
  font-size: 11px;
  letter-spacing: .20em;
}

.v45-site-title strong {
  font-size: clamp(28px, 3vw, 44px);
  letter-spacing: .075em;
}

.v45-site-title small {
  font-size: 13px;
  opacity: .75;
}

.v45-menu-row {
  grid-template-columns: minmax(0, 1fr) 280px !important;
  align-items: stretch;
  gap: 18px;
}

.v45-nav {
  width: 100%;
  display: grid !important;
  grid-template-columns: repeat(9, minmax(92px, 1fr));
  gap: 10px;
  overflow: visible !important;
}

.v45-nav .nav-pill {
  height: 62px;
  min-width: 0;
  width: 100%;
  border-radius: 20px;
  padding: 0 12px;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.nav-icon {
  width: 22px;
  height: 22px;
  border-radius: 8px;
  display: inline-grid;
  place-items: center;
  background: rgba(216,155,91,.10);
  color: var(--warm-gold);
  font-size: 14px;
  line-height: 1;
  flex: 0 0 auto;
}

.nav-pill.active .nav-icon {
  background: rgba(216,155,91,.22);
  color: #fff;
}

.v45-search {
  height: 62px;
  width: 100% !important;
  border-radius: 20px;
  font-size: 14px;
}

@media (max-width: 1500px) {
  .v45-nav {
    grid-template-columns: repeat(5, minmax(120px, 1fr));
  }
  .v45-menu-row {
    grid-template-columns: 1fr !important;
  }
  .v45-search {
    max-width: 420px;
    justify-self: end;
  }
}

@media (max-width: 900px) {
  .v45-site-ribbon {
    grid-template-columns: 1fr !important;
  }
  .v45-site-logo {
    justify-content: center;
  }
  .v45-nav {
    display: flex !important;
    overflow-x: auto !important;
    padding-bottom: 8px;
  }
  .v45-nav .nav-pill {
    flex: 0 0 145px;
  }
  .v45-search {
    max-width: none;
  }
}


/* v47: større og tydeligere tekst/ikoner i toppmeny uten å øke knappestørrelsen */
.v45-nav .nav-pill {
  height: 62px;
  font-size: 16.5px !important;
  font-weight: 950;
  letter-spacing: .005em;
  gap: 11px;
  padding: 0 14px;
}

.v45-nav .nav-pill > span:not(.nav-icon) {
  display: inline-block;
  line-height: 1.05;
  transform: translateY(1px);
}

.nav-icon {
  width: 31px !important;
  height: 31px !important;
  border-radius: 11px;
  font-size: 19px !important;
  font-weight: 950;
  background: rgba(216,155,91,.14);
  border: 1px solid rgba(216,155,91,.16);
}

.nav-pill.active .nav-icon {
  background: rgba(216,155,91,.30);
  border-color: rgba(216,155,91,.34);
}

@media (max-width: 1500px) {
  .v45-nav .nav-pill {
    font-size: 16px !important;
  }
  .nav-icon {
    width: 29px !important;
    height: 29px !important;
    font-size: 18px !important;
  }
}

@media (max-width: 900px) {
  .v45-nav .nav-pill {
    flex-basis: 165px;
    font-size: 16px !important;
  }
}


/* v48: samlet toppbar – logo, aktiv site, søk og meny i én ramme */
.v48-shell {
  grid-template-rows: auto auto 1fr;
  gap: 14px;
}

.v48-header {
  display: grid;
  grid-template-rows: auto auto;
  gap: 14px;
  padding: 18px 22px 20px;
  border-radius: 30px;
  border: 1px solid rgba(216,155,91,.28);
  background:
    radial-gradient(circle at 10% 12%, rgba(192,86,30,.18), transparent 36%),
    radial-gradient(circle at 88% 18%, rgba(216,155,91,.08), transparent 32%),
    linear-gradient(135deg, rgba(16,16,19,.98), rgba(30,30,34,.96));
  box-shadow: 0 18px 48px rgba(0,0,0,.30);
  backdrop-filter: blur(16px);
}

.v48-header .v45-site-ribbon,
.v48-header .v45-menu-row {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  border-radius: 0 !important;
}

.v48-site-ribbon {
  min-height: 92px !important;
  grid-template-columns: 260px minmax(0, 1fr) 260px !important;
  align-items: center !important;
  padding: 0 !important;
  gap: 18px !important;
  overflow: visible !important;
}

.v48-site-logo {
  align-self: center !important;
  height: 92px;
}

.v48-site-logo img,
.v45-site-logo img {
  width: min(210px, 100%) !important;
  max-height: 84px !important;
}

.v48-site-spacer {
  min-width: 0;
}

.v48-site-title {
  min-height: 82px !important;
  padding: 8px 12px !important;
  border-radius: 22px;
  background: transparent !important;
}

.v48-site-title:hover {
  background: radial-gradient(circle at 50% 45%, rgba(216,155,91,.11), transparent 62%) !important;
}

.v48-site-title span {
  font-size: 11px !important;
  color: var(--warm-gold);
  letter-spacing: .22em;
}

.v48-site-title strong {
  font-size: clamp(28px, 3vw, 46px) !important;
  letter-spacing: .095em !important;
  line-height: 1.05;
}

.v48-site-title small {
  margin-top: 4px;
  font-size: 13px !important;
  max-width: 100% !important;
  color: rgba(245,245,245,.64);
}

.v48-menu-row {
  min-height: auto !important;
  grid-template-columns: minmax(0, 1fr) 310px !important;
  align-items: center !important;
  padding: 0 !important;
  gap: 16px !important;
}

.v48-menu-row::before {
  content: "";
  display: none;
}

.v48-header .top-nav {
  width: 100%;
  display: grid !important;
  grid-template-columns: repeat(9, minmax(112px, 1fr));
  gap: 10px;
  padding: 0;
  overflow: visible !important;
}

.v48-header .nav-pill {
  height: 60px !important;
  min-width: 0 !important;
  border-radius: 18px !important;
  padding: 0 14px !important;
  font-size: 16px !important;
  background: rgba(245,245,245,.042);
  border-color: rgba(245,245,245,.08);
}

.v48-header .nav-icon {
  width: 30px !important;
  height: 30px !important;
  font-size: 18px !important;
}

.v48-header .global-search {
  width: 100% !important;
  height: 60px !important;
  border-radius: 18px !important;
  background: rgba(245,245,245,.06);
}

.v48-workspace,
.v45-workspace {
  min-height: calc(100vh - 250px);
}

@media (max-width: 1500px) {
  .v48-site-ribbon {
    grid-template-columns: 220px minmax(0, 1fr) 220px !important;
  }
  .v48-site-logo img,
  .v45-site-logo img {
    width: 175px !important;
  }
  .v48-menu-row {
    grid-template-columns: 1fr !important;
  }
  .v48-header .top-nav {
    grid-template-columns: repeat(5, minmax(130px, 1fr));
  }
  .v48-header .global-search {
    max-width: 420px;
    justify-self: end;
  }
}

@media (max-width: 900px) {
  .v48-header {
    padding: 14px;
    border-radius: 24px;
  }
  .v48-site-ribbon {
    grid-template-columns: 1fr !important;
    min-height: auto !important;
    gap: 8px !important;
    text-align: center;
  }
  .v48-site-logo {
    height: auto;
    justify-content: center;
  }
  .v48-site-logo img,
  .v45-site-logo img {
    width: 150px !important;
    max-height: 62px !important;
  }
  .v48-site-spacer {
    display: none;
  }
  .v48-site-title strong {
    font-size: 24px !important;
    white-space: normal;
  }
  .v48-header .top-nav {
    display: flex !important;
    overflow-x: auto !important;
    padding-bottom: 8px;
  }
  .v48-header .nav-pill {
    flex: 0 0 165px;
  }
  .v48-header .global-search {
    max-width: none;
  }
}

/* v49 - tydelig global offline-varsling */
.global-notice {
  border-width: 1px;
  align-items: flex-start;
  padding: 16px 18px;
}
.global-notice.critical {
  border-color: rgba(240,107,104,.62);
  background: linear-gradient(135deg, rgba(113, 27, 24, .72), rgba(43,45,49,.92));
  box-shadow: 0 18px 60px rgba(192,86,30,.20), inset 0 1px 0 rgba(255,255,255,.04);
}
.global-notice-icon {
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: rgba(240,107,104,.18);
  border: 1px solid rgba(240,107,104,.38);
  color: #fff;
  font-weight: 950;
  font-size: 18px;
}
.global-notice-main { min-width: 0; flex: 1; display: grid; gap: 8px; }
.global-notice-heading {
  color: #fff;
  font-weight: 950;
  font-size: 16px;
  letter-spacing: .01em;
}
.global-notice-list { display: grid; gap: 7px; }
.global-notice-row {
  display: grid;
  gap: 2px;
  padding: 8px 10px;
  border-radius: 12px;
  background: rgba(0,0,0,.18);
  border: 1px solid rgba(255,255,255,.06);
}
.global-notice-row b { color: #fff; font-size: 14px; }
.global-notice-row span { color: rgba(245,245,245,.76); font-size: 12px; line-height: 1.35; }
.toast.toast-error {
  border-color: rgba(240,107,104,.75);
  background: linear-gradient(135deg, #311514, #18191d);
  box-shadow: 0 22px 70px rgba(240,107,104,.22), 0 20px 70px rgba(0,0,0,.55);
}
@media (max-width: 760px) {
  .global-notice { align-items: stretch; }
  .global-notice-icon { display: none; }
}

/* v50 - Frakoblede enheter */
.offline-page { display: grid; gap: 18px; }
.offline-title-row { align-items: center; }
.offline-summary-pill {
  min-width: 150px;
  border: 1px solid rgba(245,245,245,.12);
  background: rgba(245,245,245,.055);
  border-radius: 18px;
  padding: 14px 18px;
  display: grid;
  place-items: center;
  text-align: center;
}
.offline-summary-pill b { font-size: 30px; line-height: 1; color: #fff; }
.offline-summary-pill span { margin-top: 5px; color: rgba(245,245,245,.62); font-size: 12px; font-weight: 850; text-transform: uppercase; letter-spacing: .08em; }
.offline-summary-pill.bad { border-color: rgba(240,107,104,.46); background: rgba(240,107,104,.10); }
.offline-summary-pill.ok { border-color: rgba(84,211,138,.30); background: rgba(84,211,138,.08); }
.offline-toolbar { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.offline-site-list { display: grid; gap: 16px; }
.offline-site-card {
  border: 1px solid rgba(216,155,91,.22);
  background: linear-gradient(135deg, rgba(30,30,34,.88), rgba(43,45,49,.72));
  border-radius: 24px;
  box-shadow: 0 14px 38px rgba(0,0,0,.24);
  overflow: hidden;
}
.offline-site-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(245,245,245,.08);
}
.offline-site-head h2 { margin: 3px 0 4px; font-size: 22px; letter-spacing: .01em; color: #fff; }
.offline-site-head p { margin: 0; color: rgba(245,245,245,.58); font-size: 13px; }
.offline-device-list { display: grid; }
.offline-device-row {
  display: grid;
  grid-template-columns: 14px minmax(260px, 1fr) minmax(160px, 240px) auto;
  gap: 14px;
  align-items: center;
  padding: 15px 18px;
  border-bottom: 1px solid rgba(245,245,245,.055);
}
.offline-device-row:last-child { border-bottom: 0; }
.offline-severity-dot { width: 10px; height: 10px; border-radius: 999px; background: #ff6b6b; box-shadow: 0 0 0 6px rgba(240,107,104,.10); }
.offline-device-main { display: grid; gap: 3px; min-width: 0; }
.offline-device-main b { color: #fff; font-size: 15px; }
.offline-device-main span { color: rgba(245,245,245,.70); font-size: 13px; }
.offline-device-main small { color: var(--warm-gold); font-size: 12px; line-height: 1.35; }
.offline-status-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.offline-status-grid div { border: 1px solid rgba(245,245,245,.09); background: rgba(245,245,245,.045); border-radius: 14px; padding: 8px 10px; }
.offline-status-grid span { display: block; color: rgba(245,245,245,.48); font-size: 10px; font-weight: 900; text-transform: uppercase; letter-spacing: .10em; }
.offline-status-grid b { display: block; margin-top: 2px; color: rgba(245,245,245,.86); }
.offline-status-grid b.ok { color: #54d38a; }
.offline-status-grid b.bad { color: #ff6b6b; }
.offline-status-grid b.unknown { color: rgba(245,245,245,.55); }
.offline-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.offline-empty {
  min-height: 380px;
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  gap: 12px;
  border: 1px solid rgba(84,211,138,.20);
  background: rgba(84,211,138,.045);
  border-radius: 28px;
  padding: 30px;
}
.offline-empty h2 { margin: 0; font-size: 28px; }
.offline-empty p { margin: 0; color: rgba(245,245,245,.62); }
@media (max-width: 980px) {
  .offline-site-head, .offline-device-row { grid-template-columns: 1fr; display: grid; }
  .offline-actions { justify-content: stretch; }
  .offline-actions button { flex: 1 1 120px; }
  .offline-status-grid { grid-template-columns: 1fr 1fr; }
}

/* v51: ryddigere samlet toppbar. Søk opp i site-raden, menyen får full bredde og wrapper ikke på desktop. */
.v48-header.v51-header,
.v48-header {
  gap: 12px !important;
  padding: 18px 20px 18px !important;
}

.v48-site-ribbon {
  grid-template-columns: 230px minmax(0, 1fr) 320px !important;
  min-height: 88px !important;
  gap: 18px !important;
}

.v51-top-search {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-width: 0;
}

.v51-top-search .global-search,
.v48-header .v51-top-search .global-search {
  width: min(320px, 100%) !important;
  height: 52px !important;
  border-radius: 17px !important;
  font-size: 14px !important;
}

.v51-menu-row,
.v48-menu-row.v51-menu-row {
  display: block !important;
  min-height: auto !important;
  padding: 0 !important;
  gap: 0 !important;
}

.v51-nav,
.v48-header .v51-nav {
  display: grid !important;
  grid-template-columns: repeat(10, minmax(98px, 1fr)) !important;
  gap: 10px !important;
  width: 100% !important;
  overflow: visible !important;
  padding: 0 !important;
}

.v51-nav .nav-pill,
.v48-header .v51-nav .nav-pill {
  min-width: 0 !important;
  height: 58px !important;
  padding: 0 12px !important;
  border-radius: 18px !important;
  font-size: 15px !important;
  justify-content: center !important;
}

.v51-nav .nav-icon,
.v48-header .v51-nav .nav-icon {
  width: 30px !important;
  height: 30px !important;
  font-size: 18px !important;
  flex: 0 0 30px;
}

.v48-site-title strong {
  font-size: clamp(26px, 2.75vw, 42px) !important;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v48-site-title small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

@media (max-width: 1550px) {
  .v48-site-ribbon {
    grid-template-columns: 200px minmax(0, 1fr) 280px !important;
  }
  .v48-site-logo img,
  .v45-site-logo img {
    width: 165px !important;
  }
  .v51-nav,
  .v48-header .v51-nav {
    grid-template-columns: repeat(10, minmax(88px, 1fr)) !important;
    gap: 8px !important;
  }
  .v51-nav .nav-pill,
  .v48-header .v51-nav .nav-pill {
    font-size: 14px !important;
    padding: 0 8px !important;
  }
  .v51-nav .nav-icon,
  .v48-header .v51-nav .nav-icon {
    width: 26px !important;
    height: 26px !important;
    font-size: 16px !important;
  }
}

@media (max-width: 1180px) {
  .v48-site-ribbon {
    grid-template-columns: 1fr !important;
    text-align: center;
  }
  .v51-top-search {
    justify-content: center;
  }
  .v51-top-search .global-search,
  .v48-header .v51-top-search .global-search {
    width: 100% !important;
    max-width: 520px;
  }
  .v51-nav,
  .v48-header .v51-nav {
    display: flex !important;
    overflow-x: auto !important;
    padding-bottom: 8px !important;
  }
  .v51-nav .nav-pill,
  .v48-header .v51-nav .nav-pill {
    flex: 0 0 145px !important;
  }
}


/* v52 Discovery UX: nye funn øverst + bulk add */
.discovery-summary-actions {
  align-items: center;
  gap: 12px;
}
.discovery-summary-actions .scan-bulk-add {
  min-width: 180px;
  justify-self: end;
  margin-left: auto;
}
.scan-item.already {
  opacity: .58;
}
.scan-item.already .scan-main b::after {
  content: "  · allerede lagt til";
  color: var(--muted2);
  font-size: 12px;
  font-weight: 800;
}
@media (max-width: 760px) {
  .discovery-summary-actions .scan-bulk-add {
    width: 100%;
    margin-left: 0;
  }
}

/* v59 hierarchy polish */
.customer-card-shell { display:flex; flex-direction:column; align-items:stretch; gap:12px; text-align:left; }
.customer-main-button { display:flex; align-items:center; gap:14px; width:100%; border:0; background:transparent; color:inherit; text-align:left; cursor:pointer; padding:0; }
.customer-card-actions { display:flex; gap:8px; flex-wrap:wrap; padding-top:10px; border-top:1px solid rgba(255,255,255,.08); }
.site-avatar img { width:100%; height:100%; object-fit:cover; border-radius:inherit; display:block; }
select { width:100%; border:1px solid rgba(255,255,255,.12); background:rgba(255,255,255,.07); color:#fff; border-radius:14px; padding:13px 14px; outline:none; font:inherit; }
select option { background:#1b1a20; color:#fff; }

/* v60 context/navigation + room editor */
.locked-context {
  border: 1px solid rgba(216,155,91,.35);
  background: rgba(216,155,91,.08);
  border-radius: 14px;
  padding: 12px 14px;
  display: grid;
  gap: 4px;
}
.locked-context span,
.label-like {
  color: var(--muted, #aaa);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.locked-context b { color: #fff; }
.room-editor-block {
  display: grid;
  gap: 10px;
  margin-top: 10px;
}
.room-editor-rows {
  display: grid;
  gap: 8px;
}
.room-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}
.room-row input {
  width: 100%;
}
.mini-site-link {
  width: 100%;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.035);
  color: inherit;
  border-radius: 14px;
  padding: 10px 12px;
  margin-top: 8px;
  display: grid;
  text-align: left;
  gap: 2px;
  cursor: pointer;
}
.mini-site-link span {
  color: var(--muted, #aaa);
  font-size: 12px;
}
.home-page .customer-card-grid { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* v61: site room dashboard */
.room-dashboard-card {
  background: linear-gradient(135deg, rgba(43,45,49,.78), rgba(30,30,34,.62));
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 16px 50px rgba(0,0,0,.22);
  padding: 18px;
}
.room-chip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
}
.room-chip {
  text-align: left;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(245,245,245,.045);
  color: #fff;
  border-radius: 18px;
  padding: 14px 15px;
  display: grid;
  gap: 4px;
  cursor: pointer;
  min-height: 72px;
}
.room-chip:hover {
  border-color: rgba(216,155,91,.35);
  background: rgba(216,155,91,.08);
}
.room-chip.active {
  border-color: rgba(216,155,91,.55);
  background: linear-gradient(135deg, rgba(192,86,30,.22), rgba(216,155,91,.10));
  box-shadow: inset 0 0 0 1px rgba(216,155,91,.12);
}
.room-chip b { font-size: 16px; }
.room-chip span { color: var(--muted, #aaa); font-size: 12px; font-weight: 750; }
.service-dashboard .favorite-rail { margin-top: 0; }

/* v62: Discovery skal scanne hele site, rom velges etter scan */
.v30-scan-add {
  grid-template-columns: minmax(220px,1fr) 150px 100px 82px 170px auto !important;
}
.scan-room-bulk {
  display: grid;
  gap: 5px;
  color: var(--muted, #aaa);
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 850;
  min-width: 220px;
}
.scan-room-bulk select {
  height: 38px;
  background: rgba(245,245,245,.07);
  border: 1px solid var(--line);
  color: #fff;
  border-radius: 14px;
  padding: 0 10px;
}
.discovery-summary.discovery-summary-actions {
  grid-template-columns: repeat(3, minmax(120px,1fr)) minmax(220px, .9fr) auto !important;
  align-items: end;
}
.v48-header .nav-pill,
.v48-header .nav-pill:focus,
.v48-header .nav-pill:active {
  background: rgba(245,245,245,.042) !important;
  color: rgba(245,245,245,.82) !important;
  border-color: rgba(245,245,245,.08) !important;
  outline: none;
}
.v48-header .nav-pill.active {
  background: rgba(216,155,91,.16) !important;
  border-color: rgba(216,155,91,.38) !important;
  color: #fff !important;
}
.v48-header .nav-pill:hover {
  background: rgba(216,155,91,.08) !important;
  border-color: rgba(216,155,91,.24) !important;
}
@media(max-width: 1250px) {
  .v30-scan-add { grid-template-columns: 1fr 1fr !important; }
  .discovery-summary.discovery-summary-actions { grid-template-columns: 1fr 1fr !important; }
}
.user-pill {
  min-width: 132px;
  height: 52px;
  border-radius: 18px;
  border: 1px solid rgba(245,245,245,.12);
  background: rgba(245,245,245,.045);
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  padding: 0 14px;
  text-align: left;
  cursor: pointer;
}
.user-pill b { font-size: 13px; line-height: 1.1; }
.user-pill span { font-size: 11px; color: var(--muted, #aaa); }
.user-pill:hover { border-color: rgba(216,155,91,.38); background: rgba(216,155,91,.10); }
.v51-top-search { gap: 12px; align-items: center; }
.login-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 14px;
  margin: 18px 0;
}
.role-card {
  border: 1px solid rgba(245,245,245,.12);
  background: rgba(245,245,245,.045);
  color: #fff;
  border-radius: 18px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  text-align: left;
  cursor: pointer;
}
.role-card.active { border-color: rgba(216,155,91,.55); background: rgba(216,155,91,.14); }
.role-card span { color: #d89b5b; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; }
.role-card small { color: rgba(245,245,245,.74); }
.role-card em { color: var(--muted, #aaa); font-style: normal; font-size: 12px; line-height: 1.45; }
.user-role-list small { color: var(--muted, #aaa); line-height: 1.45; display: block; }
@media(max-width: 1000px) { .user-pill { min-width: 110px; } }


/* v64 - rom kan endres etter at enheten er lagt inn */
.room-inline-select {
  min-width: 130px;
  max-width: 190px;
  height: 34px;
  border-radius: 11px;
  border: 1px solid rgba(245,245,245,.14);
  background: rgba(245,245,245,.06);
  color: #fff;
  padding: 0 10px;
  font-weight: 700;
}
.room-inline-select:focus { outline: 2px solid rgba(216,155,91,.35); }

/* =========================================================
   v68 Light UI + hierarchical left navigation
   Keeps all existing views/functions, replaces the app shell.
   ========================================================= */
:root{
  --light-bg:#F4F6FA;
  --light-surface:#FFFFFF;
  --light-surface-2:#F8FAFC;
  --light-line:#DDE4EE;
  --light-line-strong:#CBD5E1;
  --light-text:#172033;
  --light-muted:#64748B;
  --light-muted-2:#94A3B8;
  --light-copper:#C0561E;
  --light-copper-soft:#FFF2EA;
  --light-gold:#D89B5B;
  --light-green:#16A34A;
  --light-red:#DC2626;
  --light-blue:#2563EB;
  --light-shadow:0 18px 50px rgba(15,23,42,.08);
  --light-shadow-soft:0 8px 24px rgba(15,23,42,.06);
}
html,body,#app{height:100%;}
body{
  background:var(--light-bg)!important;
  color:var(--light-text)!important;
  overflow:hidden;
}
select{color-scheme:light;background-color:#fff;color:var(--light-text)}
select option{background:#fff!important;color:var(--light-text)!important}
.light-shell{
  height:100%;
  display:grid;
  grid-template-columns:318px minmax(0,1fr);
  background:linear-gradient(135deg,#F8FAFC 0%,#EEF2F7 100%);
}
.light-sidebar{
  min-width:0;
  height:100vh;
  overflow:auto;
  background:rgba(255,255,255,.92);
  border-right:1px solid var(--light-line);
  padding:18px 14px;
  box-shadow:8px 0 30px rgba(15,23,42,.04);
}
.light-sidebar::-webkit-scrollbar,.light-workspace::-webkit-scrollbar{width:10px;height:10px}
.light-sidebar::-webkit-scrollbar-thumb,.light-workspace::-webkit-scrollbar-thumb{background:#CBD5E1;border-radius:99px}
.light-brand{display:flex;align-items:center;gap:12px;padding:8px 8px 14px;cursor:pointer;border-bottom:1px solid var(--light-line);margin-bottom:14px}
.light-brand-logo{width:46px;height:46px;border-radius:15px;background:#fff;border:1px solid var(--light-line);display:grid;place-items:center;box-shadow:var(--light-shadow-soft);overflow:hidden}
.light-brand-logo img{width:36px;height:36px;object-fit:contain}
.light-brand b{display:block;font-size:18px;letter-spacing:-.03em;color:var(--light-text)}
.light-brand span{display:block;margin-top:2px;font-size:11px;text-transform:uppercase;letter-spacing:.16em;color:var(--light-copper);font-weight:900}
.light-sidebar-search{padding:0 4px 14px}
.light-sidebar-search input{width:100%;height:42px;border:1px solid var(--light-line);background:#fff;color:var(--light-text);border-radius:14px;padding:0 13px;outline:none;box-shadow:0 1px 0 rgba(15,23,42,.03)}
.light-sidebar-search input:focus{border-color:var(--light-copper);box-shadow:0 0 0 4px rgba(192,86,30,.10)}
.tree-section{padding:10px 0;border-top:1px solid rgba(221,228,238,.8)}
.tree-section:first-child{border-top:0}
.tree-section-title{display:flex;align-items:center;justify-content:space-between;padding:7px 10px 8px;color:var(--light-muted-2);font-size:10px;font-weight:950;letter-spacing:.16em;text-transform:uppercase}
.tree-section-title button{width:24px;height:24px;border:1px solid var(--light-line);border-radius:8px;background:#fff;color:var(--light-copper);font-weight:950;line-height:1}
.tree-item{width:100%;border:0;background:transparent;color:var(--light-muted);display:grid;grid-template-columns:24px minmax(0,1fr) auto;align-items:center;gap:7px;min-height:36px;border-radius:12px;padding:7px 9px;text-align:left;font-weight:800;margin:2px 0;transition:.13s ease}
.tree-item span{width:24px;height:24px;border-radius:9px;display:grid;place-items:center;color:var(--light-muted-2);font-size:12px}
.tree-item b{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-weight:850}
.tree-item em{font-style:normal;font-size:10px;color:var(--light-muted-2);background:#F1F5F9;padding:2px 7px;border-radius:99px}
.tree-item:hover{background:#F8FAFC;color:var(--light-text);transform:translateX(1px)}
.tree-item:hover span{color:var(--light-copper);background:var(--light-copper-soft)}
.tree-item.active{background:linear-gradient(135deg,var(--light-copper-soft),#fff);color:var(--light-copper);box-shadow:inset 0 0 0 1px rgba(192,86,30,.16)}
.tree-item.active span{color:var(--light-copper);background:#fff;border:1px solid rgba(192,86,30,.16)}
.tree-children{margin-left:16px;padding-left:10px;border-left:1px solid var(--light-line)}
.tree-item.child{min-height:34px}
.tree-item.grandchild{min-height:32px;font-size:12px}
.tree-site .tree-children{margin-left:27px}
.tree-empty{padding:12px;color:var(--light-muted-2);font-size:12px;background:#F8FAFC;border:1px dashed var(--light-line);border-radius:12px;margin:4px 0}
.light-main{height:100vh;min-width:0;display:grid;grid-template-rows:auto auto minmax(0,1fr);overflow:hidden}
.light-topbar{display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 28px 16px;background:rgba(248,250,252,.82);backdrop-filter:blur(12px);border-bottom:1px solid rgba(221,228,238,.75)}
.light-page-context{min-width:0}
.light-breadcrumbs{font-size:12px;color:var(--light-copper);font-weight:900;margin-bottom:6px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.light-page-context h1{margin:0;color:var(--light-text);font-size:30px;line-height:1.05;letter-spacing:-.045em}
.light-page-context p{margin:6px 0 0;color:var(--light-muted);font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:70vw}
.light-top-actions{display:flex;align-items:center;gap:10px;flex:0 0 auto}
.light-icon-button{width:42px;height:42px;border:1px solid var(--light-line);border-radius:14px;background:#fff;color:var(--light-red);font-weight:950;box-shadow:var(--light-shadow-soft)}
.light-user-pill{height:46px;border:1px solid var(--light-line);background:#fff;color:var(--light-text);border-radius:16px;padding:0 14px;box-shadow:var(--light-shadow-soft);text-align:left;display:grid;align-content:center}
.light-user-pill b{font-size:12px;line-height:1.1}.light-user-pill span{font-size:10px;text-transform:uppercase;letter-spacing:.12em;color:var(--light-muted);font-weight:900}
.light-workspace{height:auto!important;min-height:0;overflow:auto;padding:22px 28px 34px!important;color:var(--light-text)}

/* Lighten existing panels without rewriting their feature content */
.hero-panel,.signal-panel,.page-card,.inspector-card,.device-workbench,.map-info,.abstract-map,.settings-card,.support-card,.category-lane,.modal-card,.selector-card,.quick-card,.quick-actions,.site-card,.customer-card,.global-notice,.device-row,.scan-item,.setting-row,.settings-clean-card,.support-grid > *, .stat-bars, .config-card, .file-card{
  background:var(--light-surface)!important;
  color:var(--light-text)!important;
  border-color:var(--light-line)!important;
  box-shadow:var(--light-shadow-soft)!important;
  backdrop-filter:none!important;
}
.page-card,.device-workbench,.hero-panel,.signal-panel,.support-card,.settings-card{border-radius:24px!important}
.hero-panel:after{background:radial-gradient(circle,rgba(192,86,30,.10),transparent 70%)!important}
.eyebrow,.brand-caption{color:var(--light-copper)!important}
.muted,.small-muted,.hero-panel p,.category-lane small,.device-id small,.site-info span,.site-info small,.quick-card span,.signal-tile small,.section-title p,.page-card p,.modal-head p{color:var(--light-muted)!important}
.hero-panel h1,.page-card h1,.section-title h1,.section-title h2,.modal-head h2,.device-id strong,.site-info b,.signal-tile b,.quick-card b{color:var(--light-text)!important}
.signal-tile,.device-row,.category-lane summary,.no-devices,.info-strip,.global-notice-row,.room-chip,.map-site-row,.customer-main-button,.role-card,.scan-add,.scan-item{background:#F8FAFC!important;border-color:var(--light-line)!important;color:var(--light-text)!important}
.primary-btn,.gold-btn{background:linear-gradient(135deg,var(--light-copper),var(--light-gold))!important;color:#fff!important;box-shadow:0 12px 26px rgba(192,86,30,.18)!important}
.soft-btn,.ghost-btn,.icon-btn,.site-gear-btn{background:#fff!important;border:1px solid var(--light-line)!important;color:var(--light-text)!important;box-shadow:0 2px 8px rgba(15,23,42,.04)!important}
.danger-btn{background:#FEF2F2!important;border-color:#FECACA!important;color:var(--light-red)!important}
input,select,textarea,.global-search,.form-card input,.form-card select,.scan-add input,.scan-add select{background:#fff!important;border-color:var(--light-line)!important;color:var(--light-text)!important}
input:focus,select:focus,textarea:focus{border-color:var(--light-copper)!important;box-shadow:0 0 0 4px rgba(192,86,30,.10)!important}
.pulse.green,.live-dot{background:var(--light-green)!important;color:var(--light-green)!important;box-shadow:0 0 12px rgba(22,163,74,.35)!important}
.pulse.gold{background:var(--light-gold)!important;color:var(--light-gold)!important}.pulse.red{background:var(--light-red)!important;color:var(--light-red)!important}.pulse.blue{background:var(--light-blue)!important;color:var(--light-blue)!important}.pulse.gray{background:#94A3B8!important;color:#94A3B8!important}
.status-pill.ok{background:#DCFCE7!important;color:#166534!important;border-color:#BBF7D0!important}.status-pill.bad{background:#FEE2E2!important;color:#991B1B!important;border-color:#FECACA!important}.status-pill.unknown{background:#F1F5F9!important;color:#475569!important;border-color:#E2E8F0!important}
.modal{background:rgba(15,23,42,.28)!important}.modal-card{max-height:calc(100vh - 56px)}
.toast{background:#fff!important;color:var(--light-text)!important;border:1px solid var(--light-line)!important;box-shadow:var(--light-shadow)!important}.toast-error{border-color:#FECACA!important;color:#991B1B!important}

@media (max-width: 980px){
  .light-shell{grid-template-columns:1fr}
  .light-sidebar{position:fixed;z-index:20;left:0;top:0;bottom:0;width:315px;transform:translateX(-100%);transition:.2s ease}
  .light-main{grid-template-rows:auto auto minmax(0,1fr)}
  .light-topbar{padding:16px}.light-workspace{padding:16px!important}
}

/* =========================================================
   v69 cleanup - lysere, roligere, mindre rot + skjult Service Discovery
   ========================================================= */
:root{
  --panel:#FFFFFF!important;
  --panel2:#F8FAFC!important;
  --line:#DDE4EE!important;
  --line-gold:#F1C9A4!important;
  --muted:#64748B!important;
  --muted2:#94A3B8!important;
  --warm-gold:#B86B2B!important;
  --copper:#C0561E!important;
  --green:#22C55E!important;
  --red:#DC2626!important;
  --shadow:0 14px 34px rgba(15,23,42,.07)!important;
}
body{background:#F4F6FA!important;color:#172033!important;}
.light-topbar{background:#F8FAFC!important;box-shadow:none!important;}
.light-workspace{background:#F4F6FA!important;}
.light-sidebar{background:#FFFFFF!important;}

/* Fjern gammel mørk/glass-følelse som fortsatt hang igjen på flere v30/v41-komponenter */
.service-dashboard,
.v41-dashboard-clean,
.overview-grid-v30,
.site-side-panel,
.v30-workbench-card,
.device-workbench,
.page-card,
.side-card,
.service-note-card,
.discovery-mode-card,
.favorite-rail,
.site-hero-v30,
.health-card,
.room-overview-panel,
.room-card,
.room-chip,
.category-lane,
.category-lane summary,
.device-row,
.device-table-v30 td,
.no-devices,
.info-strip,
.log-row,
.settings-card,
.support-card,
.stat-bars,
.config-card,
.file-card,
.data-table td,
.ignored-row{
  background:#FFFFFF!important;
  background-image:none!important;
  color:#172033!important;
  border-color:#DDE4EE!important;
  box-shadow:0 8px 22px rgba(15,23,42,.055)!important;
  text-shadow:none!important;
}
.side-card,
.device-workbench,
.page-card,
.favorite-rail,
.room-overview-panel{border-radius:22px!important;}

/* Innholdstekst må alltid være lesbar på lys bakgrunn */
h1,h2,h3,h4,b,strong,label,summary,
.light-page-context h1,
.section-title h1,
.section-title h2,
.side-card h3,
.device-table-v30 td,
.device-table-v30 th,
.room-chip b,
.health-card b,
.log-main b,
.customer-main-button b,
.site-info b{
  color:#172033!important;
}
p,small,span,time,em,
.muted,.muted-copy,.small-muted,
.section-title p,.side-card p,.health-card small,.room-chip small,.log-main span,.log-main small,
.device-name-cell small,.side-kv span,.data-table th,.site-info span,.site-info small{
  color:#64748B!important;
}
.eyebrow{color:#C0561E!important;letter-spacing:.14em!important;}

/* Romoversikten var altfor mørk og skjulte tekst */
.room-overview-panel,
.rooms-panel,
.room-dashboard,
.room-section,
.room-list,
.room-card-grid{
  background:#FFFFFF!important;
  color:#172033!important;
  border-color:#DDE4EE!important;
}
.room-chip,
.room-card,
.room-tab{
  background:#F8FAFC!important;
  color:#172033!important;
  border:1px solid #DDE4EE!important;
  box-shadow:none!important;
}
.room-chip.active,
.room-card.active,
.room-tab.active{
  background:#FFF2EA!important;
  color:#C0561E!important;
  border-color:#F1C9A4!important;
}

/* Knapper og inputs */
button{font-family:inherit;}
.primary-btn,.gold-btn{
  background:#C0561E!important;
  background-image:linear-gradient(135deg,#C0561E,#D89B5B)!important;
  color:#FFFFFF!important;
  border-color:transparent!important;
}
.soft-btn,.ghost-btn,.icon-btn,.site-gear-btn,.ghost-menu-btn{
  background:#FFFFFF!important;
  color:#172033!important;
  border:1px solid #DDE4EE!important;
}
.soft-btn:hover,.ghost-btn:hover,.icon-btn:hover,.site-gear-btn:hover,.ghost-menu-btn:hover{
  border-color:#F1C9A4!important;
  background:#FFF8F3!important;
}
.danger-btn{background:#FEF2F2!important;color:#B91C1C!important;border:1px solid #FECACA!important;}
input,select,textarea,.room-inline-select{
  background:#FFFFFF!important;
  color:#172033!important;
  border:1px solid #DDE4EE!important;
}
::placeholder{color:#94A3B8!important;opacity:1!important;}

/* Health cards skal være kompakte og rene */
.health-strip{gap:12px!important;}
.health-card{min-height:58px!important;padding:13px 16px!important;}
.health-card span{box-shadow:0 0 14px currentColor!important;}
.health-card.ok{border-color:#BBF7D0!important;background:#F0FDF4!important;}
.health-card.warn{border-color:#FED7AA!important;background:#FFF7ED!important;}
.health-card.bad{border-color:#FECACA!important;background:#FEF2F2!important;}
.health-card.unknown{border-color:#E2E8F0!important;background:#F8FAFC!important;}

/* Venstremeny: litt mindre støy */
.tree-item{box-shadow:none!important;}
.tree-item.active{background:#FFF2EA!important;border:1px solid #F1C9A4!important;}
.tree-children{border-left-color:#E2E8F0!important;}

/* Superbruker Discovery-side */
.superuser-page{max-width:1180px;}
.superuser-grid{display:grid;grid-template-columns:minmax(420px,1fr) 420px;gap:16px;align-items:start;margin-top:16px;}
.superuser-discovery-panel{display:grid;gap:12px;}
.superuser-discovery-panel .discovery-mode-card{box-shadow:none!important;border-style:dashed!important;}
.session-row{display:grid;grid-template-columns:1fr auto;gap:8px;align-items:center;border:1px solid #DDE4EE;border-radius:16px;padding:10px;margin:8px 0;background:#F8FAFC;}
.session-row b,.session-row span{display:block;}.session-row button{grid-row:1 / span 2;grid-column:2;}
.discovery-timer{color:#C0561E!important;}

/* Skann/discovery-modal og tabeller */
.modal-backdrop{background:rgba(15,23,42,.36)!important;}
.modal-card{background:#FFFFFF!important;color:#172033!important;border-color:#DDE4EE!important;}
.scan-item,.scan-results > *{background:#F8FAFC!important;color:#172033!important;border-color:#DDE4EE!important;}
.scan-main b,.scan-main span,.scan-main small{color:inherit!important;}
.scan-main span,.scan-main small{color:#64748B!important;}

@media(max-width:1200px){.superuser-grid{grid-template-columns:1fr;}}

/* v70 - Admin UI refactor: renere lys UI, ekte varselpanel, ingen overlay som stjeler scroll */
:root{
  --ui-bg:#F6F8FB;
  --ui-panel:#FFFFFF;
  --ui-panel-soft:#F8FAFC;
  --ui-line:#DDE5F0;
  --ui-line-strong:#CBD5E1;
  --ui-text:#172033;
  --ui-muted:#64748B;
  --ui-muted-2:#94A3B8;
  --ui-orange:#C0561E;
  --ui-orange-soft:#FFF2EA;
  --ui-orange-line:#F1C9A4;
  --ui-shadow:0 18px 45px rgba(15,23,42,.075);
}
html,body,#app{background:var(--ui-bg)!important;color:var(--ui-text)!important;}
.light-shell{background:var(--ui-bg)!important;min-height:100vh!important;}
.light-sidebar{background:rgba(255,255,255,.96)!important;border-right:1px solid var(--ui-line)!important;box-shadow:4px 0 28px rgba(15,23,42,.035)!important;}
.light-main{background:var(--ui-bg)!important;overflow:auto!important;scroll-behavior:auto!important;}
.light-topbar{position:sticky!important;top:0!important;z-index:20!important;background:rgba(246,248,251,.92)!important;backdrop-filter:blur(14px)!important;border-bottom:1px solid var(--ui-line)!important;box-shadow:none!important;}
.light-page-context h1{color:var(--ui-text)!important;}
.light-page-context p,.light-breadcrumbs{color:var(--ui-muted)!important;}
.light-breadcrumbs{font-weight:850!important;color:var(--ui-orange)!important;}
.light-user-pill,.light-icon-button{background:#fff!important;color:var(--ui-text)!important;border:1px solid var(--ui-line)!important;box-shadow:0 8px 20px rgba(15,23,42,.055)!important;}
.light-icon-button{color:#DC2626!important;}
.light-brand{border-bottom:1px solid var(--ui-line)!important;}
.light-brand b{color:var(--ui-text)!important;}.light-brand span{color:var(--ui-orange)!important;}
.light-sidebar-search input{background:#fff!important;border:1px solid var(--ui-line)!important;color:var(--ui-text)!important;box-shadow:none!important;}
.tree-section{border-bottom:1px solid var(--ui-line)!important;}
.tree-section-title{color:#94A3B8!important;}
.tree-item{background:transparent!important;color:#334155!important;border:1px solid transparent!important;text-shadow:none!important;}
.tree-item b,.tree-item span{color:inherit!important;}
.tree-item:hover{background:#F8FAFC!important;border-color:#E2E8F0!important;}
.tree-item.active{background:var(--ui-orange-soft)!important;color:var(--ui-orange)!important;border-color:var(--ui-orange-line)!important;box-shadow:none!important;}
.tree-item em{background:#EEF2FF!important;color:#64748B!important;}
.tree-children{border-left:1px solid #E2E8F0!important;}
.light-workspace{padding:24px 32px 34px!important;background:var(--ui-bg)!important;}

/* Varsler: panel i dokumentflyt, ikke popup/overlay. Kan minimeres og holder scroll-posisjon via JS. */
.global-notice{
  position:relative!important;
  inset:auto!important;
  z-index:5!important;
  margin:18px 32px 0!important;
  display:grid!important;
  gap:12px!important;
  padding:18px!important;
  border-radius:22px!important;
  background:#fff!important;
  background-image:none!important;
  color:var(--ui-text)!important;
  border:1px solid var(--ui-line)!important;
  box-shadow:var(--ui-shadow)!important;
  max-height:none!important;
  overflow:visible!important;
}
.global-notice.critical{border-left:4px solid #EF4444!important;}
.global-notice.warn{border-left:4px solid #F59E0B!important;}
.global-notice-header{display:flex!important;align-items:center!important;justify-content:space-between!important;gap:12px!important;}
.global-notice-title-block{display:flex!important;align-items:center!important;gap:12px!important;min-width:0!important;}
.global-notice-title-block div{display:grid!important;gap:2px!important;}
.global-notice-title-block b{color:var(--ui-text)!important;font-size:16px!important;}
.global-notice-title-block small{color:var(--ui-muted)!important;font-size:13px!important;}
.global-notice-title-block em{display:grid!important;place-items:center!important;min-width:24px!important;height:24px!important;border-radius:999px!important;background:#FFEDD5!important;color:var(--ui-orange)!important;font-style:normal!important;font-weight:950!important;font-size:12px!important;}
.global-notice-icon,.global-notice-dot{display:grid!important;place-items:center!important;width:34px!important;height:34px!important;border-radius:13px!important;background:#FEF2F2!important;border:1px solid #FECACA!important;color:#DC2626!important;font-weight:950!important;flex:0 0 auto!important;}
.global-notice-actions{display:flex!important;gap:8px!important;align-items:center!important;}
.global-notice-list{display:grid!important;gap:8px!important;}
.global-notice-row{display:grid!important;gap:3px!important;text-align:left!important;width:100%!important;padding:11px 13px!important;border-radius:15px!important;background:#F8FAFC!important;border:1px solid var(--ui-line)!important;color:var(--ui-text)!important;box-shadow:none!important;cursor:pointer!important;}
.global-notice-row:hover{background:#FFF8F3!important;border-color:var(--ui-orange-line)!important;}
.global-notice-row b{color:var(--ui-text)!important;font-size:14px!important;}
.global-notice-row span{color:var(--ui-muted)!important;font-size:12px!important;line-height:1.35!important;}
.global-notice-collapsed{display:flex!important;align-items:center!important;justify-content:space-between!important;padding:12px 14px!important;border-radius:18px!important;}
.global-notice-compact-main{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;border:0!important;background:transparent!important;color:var(--ui-text)!important;text-align:left!important;cursor:pointer!important;}
.global-notice-compact-main b{color:var(--ui-text)!important;white-space:nowrap!important;}
.global-notice-compact-main small{color:var(--ui-muted)!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important;}

/* Toast er kun små kvitteringer nede til høyre, ikke systemvarselpanel */
.toast{position:fixed!important;right:24px!important;bottom:24px!important;top:auto!important;left:auto!important;max-width:420px!important;background:#fff!important;color:var(--ui-text)!important;border:1px solid var(--ui-line)!important;border-left:4px solid var(--ui-orange)!important;border-radius:16px!important;box-shadow:var(--ui-shadow)!important;z-index:200!important;}
.toast.toast-error{background:#fff!important;color:#991B1B!important;border-color:#FECACA!important;border-left-color:#EF4444!important;box-shadow:var(--ui-shadow)!important;}

/* Fjern gamle mørke v30/v50 rester i undersider */
.page-card,.slim-page,.side-card,.device-workbench,.offline-site-card,.offline-empty,.map-card,.support-card,.log-row,.file-row,.user-card,.settings-card,.stat-card,.customer-card,.site-card,.scan-card,.discovery-command-panel,.discovery-mode-card,.room-editor-block,.table-wrap,.data-table,.ignored-row,.modal-card,
.v41-dashboard-clean,.service-dashboard,.favorite-rail,.overview-card,.customer-structure-card,.panel,.card{
  background:#fff!important;
  background-image:none!important;
  color:var(--ui-text)!important;
  border-color:var(--ui-line)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.06)!important;
  text-shadow:none!important;
}
.health-card,.summary-card,.metric-card,.stat-tile,.offline-summary-pill,.discovery-summary div,.onboarding-steps div,.offline-status-grid div,.device-table-v30 td,.device-table-v30 th,.scan-item,.scan-results > *, .site-info, .device-row, .device-card{
  background:#fff!important;
  background-image:none!important;
  color:var(--ui-text)!important;
  border-color:var(--ui-line)!important;
  text-shadow:none!important;
}
.device-table-v30 td,.device-table-v30 tr td:first-child,.device-table-v30 tr td:last-child{background:#fff!important;border-color:var(--ui-line)!important;}
.status-pill{background:#F8FAFC!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;}
.status-pill.ok{background:#ECFDF5!important;color:#047857!important;border-color:#BBF7D0!important;}
.status-pill.bad{background:#FEF2F2!important;color:#B91C1C!important;border-color:#FECACA!important;}
.offline-site-head h2,.offline-device-main b,.offline-summary-pill b,.alert-summary b,.discovery-command-panel b,.discovery-summary b,.device-table-v30 th,.device-table-v30 td,.data-table td,.data-table th,
.site-tab-panel label,.support-card b,.support-card h3,.log-row b,.file-row b,.settings-card b,.user-card b{color:var(--ui-text)!important;}
.offline-site-head p,.offline-device-main span,.offline-device-main small,.offline-summary-pill span,.alert-summary span,.discovery-command-panel span,.discovery-summary span,.data-table th,
.support-card p,.log-row span,.log-row small,.file-row span,.settings-card span,.settings-card small,.user-card span{color:var(--ui-muted)!important;}
.offline-summary-pill.bad{background:#FEF2F2!important;border-color:#FECACA!important;}.offline-summary-pill.ok{background:#F0FDF4!important;border-color:#BBF7D0!important;}
.alert-summary{background:#FFF7ED!important;border-color:#FED7AA!important;color:var(--ui-text)!important;}
.site-tabs button{background:#fff!important;color:#475569!important;border-color:var(--ui-line)!important;}.site-tabs button.active{background:var(--ui-orange-soft)!important;color:var(--ui-orange)!important;border-color:var(--ui-orange-line)!important;}
.site-tab-panel input,.site-tab-panel select,.site-tab-panel textarea,.discovery-mode-card select{background:#fff!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;}

/* Superbruker-fanen skal være tydelig separert fra vanlig drift */
.tree-section:last-child .tree-item[onclick*="superdiscovery"]{margin-top:10px!important;background:#F5F3FF!important;color:#6D28D9!important;border-color:#DDD6FE!important;}
.superuser-page .page-card,.superuser-discovery-panel .discovery-mode-card{background:#fff!important;border-color:#DDD6FE!important;}
.superuser-page .eyebrow{color:#6D28D9!important;}

@media(max-width:900px){
  .global-notice{margin:12px 14px 0!important;}
  .global-notice-header,.global-notice-collapsed{align-items:stretch!important;}
  .global-notice-header{display:grid!important;}
  .global-notice-actions{justify-content:flex-start!important;}
  .light-workspace{padding:16px!important;}
}

/* v71 Context UI cleanup --------------------------------------------------
   Mer luft, riktige kontekstknapper, nøytral superbruker og scroll-stabilitet. */
.light-main,
.light-workspace{
  scroll-behavior:auto!important;
}
.light-workspace{
  padding:36px 42px 48px!important;
}
.page-card,
.device-workbench,
.side-card,
.offline-site-card,
.settings-card,
.support-card,
.map-card,
.customer-card,
.site-card{
  border-radius:28px!important;
}
.page-card{
  padding:32px!important;
}
.section-title{
  margin-bottom:28px!important;
  padding-bottom:0!important;
}
.dashboard-title-only{
  margin-bottom:32px!important;
}
.health-strip{
  gap:20px!important;
  margin:28px 0 30px!important;
}
.health-card{
  min-height:92px!important;
  padding:22px 24px!important;
}
.overview-grid-v30{
  gap:28px!important;
  align-items:start!important;
}
.v30-workbench-card,
.device-workbench{
  padding:26px!important;
}
.site-card-grid,
.customer-card-grid{
  gap:20px!important;
}
.side-card{
  padding:24px!important;
  margin-bottom:18px!important;
}
.global-notice{
  margin:24px 32px 0!important;
}
.alert-summary{
  margin-bottom:24px!important;
}
/* Superbruker skal ikke se aktiv/hover ut før den faktisk er valgt */
.tree-section:last-child .tree-item[onclick*="superdiscovery"]{
  margin-top:10px!important;
  background:transparent!important;
  color:#334155!important;
  border-color:transparent!important;
}
.tree-section:last-child .tree-item[onclick*="superdiscovery"]:hover{
  background:#F8FAFC!important;
  border-color:#E2E8F0!important;
  color:#334155!important;
}
.tree-section:last-child .tree-item[onclick*="superdiscovery"].active{
  background:var(--ui-orange-soft)!important;
  color:var(--ui-orange)!important;
  border-color:var(--ui-orange-line)!important;
}
/* Undermenyer må aldri arve mørke/kraftige panel-farger */
.tree-children,
.tree-grandchildren{
  background:transparent!important;
}
.tree-item.child,
.tree-item.grandchild{
  color:#475569!important;
}
.tree-item.child.active,
.tree-item.grandchild.active{
  color:var(--ui-orange)!important;
  background:var(--ui-orange-soft)!important;
  border-color:var(--ui-orange-line)!important;
}
@media(max-width:1200px){
  .light-workspace{padding:24px!important;}
  .health-strip{gap:14px!important;}
  .overview-grid-v30{gap:20px!important;}
}

/* v72 dashboard cleanup: dashboard skal være drift/status, ikke navigasjon */
.v72-dashboard{
  display:grid;
  gap:28px;
  padding:0;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.v72-dashboard .dashboard-hero{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:24px;
  padding:26px 30px;
  border:1px solid #dbe4f0;
  border-radius:28px;
  background:#fff;
  box-shadow:0 18px 50px rgba(15,23,42,.06);
}
.v72-dashboard .dashboard-hero h1{margin:6px 0 8px;font-size:34px;letter-spacing:-.04em;color:#08112b;}
.v72-dashboard .dashboard-hero p{max-width:820px;margin:0;color:#596986;line-height:1.55;}
.v72-dashboard .dashboard-kpis{grid-template-columns:repeat(5,minmax(150px,1fr));gap:18px;}
.v72-dashboard .health-card{min-height:82px;background:#fff;border-color:#dbe4f0;box-shadow:0 14px 34px rgba(15,23,42,.05);}
.v72-dashboard .health-card.ok{background:linear-gradient(135deg,#ffffff,#f0fff5);border-color:#aaf3c0;}
.v72-dashboard .health-card.warn{background:linear-gradient(135deg,#ffffff,#fff8ea);border-color:#ffd38b;}
.v72-dashboard .health-card b{font-size:25px;color:#08112b;}
.v72-dashboard .health-card small{color:#667394;}
.dashboard-map-grid{display:grid;grid-template-columns:minmax(0,1fr) 330px;gap:24px;align-items:start;}
.dashboard-map-card,.dashboard-side-card{background:#fff;border:1px solid #dbe4f0;border-radius:28px;box-shadow:0 18px 50px rgba(15,23,42,.06);}
.dashboard-map-card{padding:22px;overflow:hidden;}
.dashboard-map-card .section-title{margin-bottom:18px;align-items:flex-start;}
.dashboard-map-card h2{margin:4px 0 6px;color:#08112b;}
.dashboard-map-card p{margin:0;color:#667394;}
.dashboard-map-canvas{min-height:520px;height:58vh;border:1px solid #dbe4f0;border-radius:24px;overflow:hidden;background:#eef3f8;}
.dashboard-side-stack{display:grid;gap:20px;position:sticky;top:18px;}
.dashboard-side-card{padding:20px;background:#fff!important;}
.dashboard-side-card .mini-site-link{border-color:#e1e8f2;background:#f8fafc;color:#08112b;}
.dashboard-side-card .mini-site-link.warning{border-color:#ffd38b;background:#fff8ea;}
.v72-dashboard .map-placeholder h2{color:#08112b;}
.v72-dashboard .map-legend{background:#f8fafc;border-top-color:#dbe4f0;color:#596986;}

@media(max-width:1280px){
  .v72-dashboard .dashboard-kpis{grid-template-columns:repeat(3,1fr);}
  .dashboard-map-grid{grid-template-columns:1fr;}
  .dashboard-side-stack{position:static;grid-template-columns:1fr 1fr;}
}
@media(max-width:900px){
  .v72-dashboard .dashboard-hero{flex-direction:column;padding:22px;}
  .v72-dashboard .dashboard-kpis{grid-template-columns:1fr 1fr;}
  .dashboard-side-stack{grid-template-columns:1fr;}
  .dashboard-map-canvas{height:420px;min-height:420px;}
}

/* v73 dashboard density/responsive cleanup ---------------------------------
   Dashboard skal få plass på vanlig 1920x1080, uten dobbel Online/Offline og uten Nylige sites. */
.v73-dashboard{
  display:grid;
  gap:18px;
  padding:0;
  background:transparent!important;
  border:0!important;
  box-shadow:none!important;
}
.v73-dashboard .compact-dashboard-hero{
  padding:20px 24px;
  min-height:auto;
}
.v73-dashboard .compact-dashboard-hero h1{
  margin:4px 0 6px;
  font-size:30px;
  line-height:1.05;
}
.v73-dashboard .compact-dashboard-hero p{font-size:14px;}
.v73-dashboard .dashboard-kpis{
  grid-template-columns:repeat(4,minmax(150px,1fr));
  gap:14px!important;
}
.v73-dashboard .health-card{
  min-height:76px;
  padding:14px 16px;
  background:#fff;
  border-color:#dbe4f0;
  box-shadow:0 10px 28px rgba(15,23,42,.045);
}
.v73-dashboard .health-card.ok{background:linear-gradient(135deg,#ffffff,#f0fff5);border-color:#aaf3c0;}
.v73-dashboard .health-card.warn{background:linear-gradient(135deg,#ffffff,#fff8ea);border-color:#ffd38b;}
.v73-dashboard .health-card b{font-size:24px;color:#08112b;line-height:1;}
.v73-dashboard .health-card small{color:#667394;}
.v73-dashboard .health-card em{
  grid-column:2;
  font-style:normal;
  color:#667394;
  font-size:12px;
  font-weight:800;
  margin-top:3px;
}
.compact-dashboard-grid{
  grid-template-columns:minmax(0,1fr) minmax(280px,320px);
  gap:18px;
}
.v73-dashboard .dashboard-map-card{padding:18px;}
.v73-dashboard .compact-section-title{margin-bottom:12px;}
.v73-dashboard .compact-section-title h2{font-size:22px;}
.v73-dashboard .dashboard-map-canvas{
  min-height:360px;
  height:clamp(360px, calc(100vh - 500px), 520px);
  background:#d8eef5;
}
.v73-dashboard .dashboard-side-stack{gap:14px;}
.v73-dashboard .dashboard-side-card{padding:16px;max-height:calc(100vh - 430px);overflow:auto;}
.v73-dashboard .active-problems-card .mini-site-link{padding:10px 12px;}
.map-offline-bg{
  position:absolute;
  inset:0;
  z-index:210;
  pointer-events:none;
  background:
    radial-gradient(circle at 46% 42%, rgba(255,255,255,.65) 0 2px, transparent 3px),
    linear-gradient(135deg, rgba(180,217,195,.62), rgba(159,202,214,.62)),
    repeating-linear-gradient(30deg, rgba(255,255,255,.18) 0 1px, transparent 1px 42px);
}
.map-offline-bg:before{
  content:"";
  position:absolute;
  left:34%; top:10%; width:22%; height:78%;
  background:rgba(238,246,238,.78);
  clip-path:polygon(52% 0,66% 8%,61% 19%,72% 29%,58% 36%,67% 48%,51% 56%,60% 67%,45% 79%,39% 100%,28% 84%,35% 70%,24% 57%,34% 45%,22% 31%,36% 17%);
  filter:drop-shadow(0 6px 14px rgba(15,23,42,.12));
}
.map-offline-label{
  position:absolute;
  left:14px;
  bottom:14px;
  max-width:310px;
  padding:10px 12px;
  border:1px solid rgba(219,228,240,.95);
  border-radius:14px;
  background:rgba(255,255,255,.86);
  color:#08112b;
  box-shadow:0 10px 28px rgba(15,23,42,.10);
}
.map-offline-label b,.map-offline-label span{display:block;}
.map-offline-label span{font-size:12px;color:#596986;margin-top:2px;}
.leaflet-marker-pane,.leaflet-popup-pane,.leaflet-control-container{position:relative;z-index:650!important;}
@media (min-width:1500px){
  .light-workspace{padding:24px 32px 28px!important;}
  .v73-dashboard{gap:18px;}
}
@media (max-width:1350px){
  .compact-dashboard-grid{grid-template-columns:1fr;}
  .v73-dashboard .dashboard-side-card{max-height:none;}
}
@media (max-width:980px){
  .v73-dashboard .dashboard-kpis{grid-template-columns:1fr 1fr;}
  .v73-dashboard .compact-dashboard-hero{flex-direction:column;}
}

/* === v74 UI cleanup: dashboard + site page === */
.v74-dashboard{display:grid;gap:20px;padding-top:0;}
.v74-dashboard .v74-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0;}
.v74-dashboard-grid{grid-template-columns:minmax(0,1fr) minmax(270px,310px);gap:18px;align-items:start;}
.v74-map-card{padding:18px;border-radius:24px;background:#fff;border:1px solid #dbe4f0;box-shadow:0 18px 45px rgba(15,23,42,.06);}
.v74-map-canvas{min-height:420px;height:clamp(420px,calc(100vh - 410px),610px);border-radius:18px;overflow:hidden;background:#d7eef4;}
.v74-side-stack .side-card{border-radius:24px;background:#fff;border:1px solid #dbe4f0;box-shadow:0 18px 45px rgba(15,23,42,.06);}
.v74-site-page{display:grid;gap:18px;}
.v74-site-kpis{grid-template-columns:repeat(4,minmax(0,1fr));gap:16px;margin:0;}
.v74-site-page .health-card,.v74-dashboard .health-card{min-height:72px;padding:14px 16px;border-radius:18px;box-shadow:0 12px 28px rgba(15,23,42,.05);background:#fff;border-color:#dbe4f0;}
.v74-site-page .health-card.ok,.v74-dashboard .health-card.ok{background:linear-gradient(135deg,#ffffff,#f0fff5);border-color:#aaf3c0;}
.v74-site-page .health-card.warn,.v74-dashboard .health-card.warn{background:linear-gradient(135deg,#ffffff,#fff8ea);border-color:#ffd38b;}
.v74-site-page .health-card.unknown,.v74-dashboard .health-card.unknown{background:linear-gradient(135deg,#ffffff,#f7f9fc);border-color:#dbe4f0;}
.v74-site-page .health-card b,.v74-dashboard .health-card b{font-size:24px;line-height:1;color:#08112b;}
.v74-site-page .health-card small,.v74-dashboard .health-card small{color:#667394;letter-spacing:.08em;}
.v74-site-page .health-card em,.v74-dashboard .health-card em{grid-column:2;font-style:normal;font-size:12px;font-weight:800;color:#667394;margin-top:3px;}
.v74-room-filter{display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:14px;padding:14px 16px;border:1px solid #dbe4f0;border-radius:22px;background:#fff;box-shadow:0 12px 30px rgba(15,23,42,.045);}
.v74-room-filter .room-filter-title{min-width:130px;}
.v74-room-filter .room-filter-title p{margin:3px 0 0;color:#667394;font-size:12px;}
.v74-room-chips{display:flex!important;flex-wrap:wrap;gap:8px;align-items:center;}
.v74-room-chips .room-chip{width:auto;min-width:76px;display:flex;align-items:center;gap:8px;padding:8px 11px;border-radius:999px;background:#f8fafc;border:1px solid #dbe4f0;box-shadow:none;color:#08112b;}
.v74-room-chips .room-chip b{font-size:12px;line-height:1;}
.v74-room-chips .room-chip span{font-size:11px;color:#667394;margin:0;}
.v74-room-chips .room-chip.active{background:#fff4e8;border-color:#f3b06b;color:#b85413;box-shadow:none;}
.v74-site-grid{grid-template-columns:minmax(0,1fr) minmax(270px,310px);gap:18px;align-items:start;}
.v74-device-workbench,.v74-note-card,.v74-meta-card{background:#fff!important;border:1px solid #dbe4f0!important;border-radius:24px!important;box-shadow:0 18px 45px rgba(15,23,42,.06)!important;}
.v74-device-workbench{padding:18px!important;}
.v74-workbench-title{margin-bottom:12px!important;}
.v74-workbench-title h2{font-size:22px!important;margin:2px 0 3px!important;}
.v74-workbench-title p{margin:0;color:#667394;font-size:13px;}
.v74-site-side-panel{display:grid;gap:16px;}
.v74-note-card textarea{background:#fbfdff!important;color:#08112b!important;border:1px solid #dbe4f0!important;border-radius:16px!important;min-height:118px;}
.v74-site-page .room-dashboard-card{background:#fff!important;color:#08112b!important;}
.v74-site-page .category-lane,.v74-site-page .v30-category{background:#fff;border-color:#dbe4f0;border-radius:18px;}
.v74-site-page .device-table-wrap{border-radius:16px;overflow:auto;background:#fff;}
.v74-site-page .device-table-v30 th{background:#f8fafc;color:#51617f;}
.v74-site-page .device-row-v30 td{background:#fff;color:#08112b;}
.v74-site-page .side-card h3,.v74-site-page h2,.v74-site-page strong,.v74-site-page b{color:#08112b;}
.map-offline-bg{opacity:.9;}
.v74-map-canvas:before{content:"";position:absolute;inset:0;z-index:0;pointer-events:none;background:linear-gradient(135deg,rgba(185,220,204,.55),rgba(178,215,229,.55));}
.v74-map-canvas .leaflet-pane,.v74-map-canvas .leaflet-control-container{z-index:400;}
@media (min-width:1500px){
  .light-workspace{padding:20px 32px 24px!important;}
  .v74-dashboard{gap:18px;}
  .v74-site-page{gap:16px;}
}
@media (max-width:1350px){
  .v74-dashboard-grid,.v74-site-grid{grid-template-columns:1fr;}
  .v74-dashboard .v74-kpis,.v74-site-kpis{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width:860px){
  .v74-room-filter{grid-template-columns:1fr;align-items:stretch;}
  .v74-dashboard .v74-kpis,.v74-site-kpis{grid-template-columns:1fr;}
}

/* v75 - calmer dashboard / less duplicated alert UI */
.v74-dashboard{gap:22px!important;}
.v74-dashboard .v74-kpis{margin-top:0!important;}
.v75-events-card .mini-site-link,
.mini-site-link.neutral{
  background:#fff!important;
  border-color:#E2E8F0!important;
  color:#0F172A!important;
}
.v75-events-card .mini-site-link:hover,
.mini-site-link.neutral:hover{
  background:#F8FAFC!important;
  border-color:#CBD5E1!important;
}
.v75-events-card .mini-site-link b{color:#0F172A!important;}
.v75-events-card .mini-site-link span{color:#64748B!important;}
.v74-dashboard-grid{margin-top:2px!important;}
.v74-map-card{min-height:0!important;}
.v74-map-canvas{height:clamp(360px,52vh,560px)!important;}
@media (min-width: 1600px){
  .light-workspace{padding:28px 34px 34px!important;}
  .v74-dashboard-grid{grid-template-columns:minmax(0,1fr) 300px!important;}
}
@media (max-width: 1200px){
  .v74-dashboard .v74-kpis{grid-template-columns:repeat(2,minmax(0,1fr))!important;}
  .v74-dashboard-grid{grid-template-columns:1fr!important;}
  .v74-map-canvas{height:420px!important;}
}


/* v76 cleanup: remove sidebar add shortcut, make search useful, and stop map fallback from covering tiles */
.tree-section-row button{display:none!important;}
.global-search-results{margin-top:8px;border:1px solid #dbe4f0;background:#fff;border-radius:14px;box-shadow:0 16px 36px rgba(15,23,42,.10);overflow:hidden;max-height:280px;overflow-y:auto;}
.global-search-results button{width:100%;border:0;background:#fff;text-align:left;padding:10px 12px;display:grid;gap:3px;cursor:pointer;color:#08112b;border-bottom:1px solid #eef2f7;}
.global-search-results button:last-child{border-bottom:0;}
.global-search-results button:hover{background:#fff7ef;}
.global-search-results b{font-size:13px;line-height:1.2;}
.global-search-results span,.global-search-empty{font-size:11px;color:#667394;line-height:1.35;}
.global-search-empty{padding:11px 12px;}
.map-offline-bg{display:none!important;}
.map-tile-warning{position:absolute;left:14px;bottom:14px;z-index:900;background:rgba(255,255,255,.94);border:1px solid #dbe4f0;border-radius:14px;padding:10px 12px;color:#08112b;box-shadow:0 12px 32px rgba(15,23,42,.12);pointer-events:none;}
.map-tile-warning b,.map-tile-warning span{display:block;}
.map-tile-warning span{font-size:12px;color:#667394;margin-top:2px;}
.v74-map-canvas,.dashboard-map-canvas{background:#eef3f8!important;}
.leaflet-container{background:#eef3f8!important;}

/* v78 - global polish: remove old alert button, modernize modals/toasts, and kill dark/grey leftovers */
.light-top-actions .light-icon-button{display:none!important;}
.light-top-actions{gap:10px!important;}
.light-user-pill{min-width:130px!important;}

/* Toast/push notifications should live above everything, not under maps/cards */
.toast{
  position:fixed!important;
  right:28px!important;
  top:92px!important;
  bottom:auto!important;
  left:auto!important;
  width:min(420px,calc(100vw - 56px))!important;
  max-width:420px!important;
  padding:13px 16px!important;
  border-radius:16px!important;
  background:#FFFFFF!important;
  color:#0F172A!important;
  border:1px solid #DBE4F0!important;
  border-left:4px solid #D89B5B!important;
  box-shadow:0 22px 60px rgba(15,23,42,.18)!important;
  z-index:2147483000!important;
  font-weight:800!important;
  line-height:1.35!important;
  pointer-events:none!important;
}
.toast.toast-error,
.toast-error{
  background:#FFFFFF!important;
  color:#0F172A!important;
  border-color:#DBE4F0!important;
  border-left-color:#C0561E!important;
}

/* Modal shell - one coherent light design system */
.modal{z-index:2147482000!important;background:transparent!important;}
.modal-backdrop{
  background:rgba(15,23,42,.48)!important;
  backdrop-filter:blur(6px)!important;
  padding:28px!important;
}
.modal-card{
  background:#FFFFFF!important;
  color:#0F172A!important;
  border:1px solid #DBE4F0!important;
  border-radius:28px!important;
  box-shadow:0 34px 90px rgba(15,23,42,.25)!important;
  padding:24px!important;
}
.modal-head{align-items:flex-start!important;border-bottom:1px solid #EEF2F7!important;padding-bottom:16px!important;margin-bottom:18px!important;}
.modal-head h2{color:#0F172A!important;letter-spacing:-.02em!important;}
.modal-head p{color:#64748B!important;}
.modal-head .eyebrow{color:#C0561E!important;}
.icon-btn{background:#FFFFFF!important;color:#334155!important;border:1px solid #DBE4F0!important;box-shadow:0 8px 20px rgba(15,23,42,.06)!important;}
.icon-btn:hover{background:#F8FAFC!important;color:#C0561E!important;}

/* Forms inside modal: no old dark/grey panel */
.form-card,
.form-card.wide-form,
.tabbed-site-form,
.site-tab-panel,
.site-admin-list,
.room-editor-block{
  background:#FFFFFF!important;
  color:#0F172A!important;
  border:1px solid #DBE4F0!important;
  box-shadow:none!important;
}
.tabbed-site-form{
  padding:0!important;
  border:0!important;
  display:grid!important;
  gap:16px!important;
}
.site-tabs{
  display:flex!important;
  gap:8px!important;
  flex-wrap:wrap!important;
  padding:6px!important;
  background:#F8FAFC!important;
  border:1px solid #DBE4F0!important;
  border-radius:18px!important;
}
.site-tabs button{
  border:1px solid transparent!important;
  background:transparent!important;
  color:#475569!important;
  border-radius:14px!important;
  padding:10px 14px!important;
  font-weight:900!important;
  box-shadow:none!important;
}
.site-tabs button:hover{background:#FFFFFF!important;border-color:#E2E8F0!important;color:#0F172A!important;}
.site-tabs button.active{background:#FFF3EA!important;border-color:#F1C9A4!important;color:#C0561E!important;}
.site-tab-panel{
  display:none!important;
  padding:18px!important;
  border-radius:20px!important;
}
.site-tab-panel.active{display:grid!important;gap:14px!important;}
.form-card label,
.site-tab-panel label,
.label-like{
  color:#334155!important;
  font-size:12px!important;
  font-weight:900!important;
}
.form-card input,
.form-card select,
.form-card textarea,
.site-tab-panel input,
.site-tab-panel select,
.site-tab-panel textarea,
.room-editor-block input{
  background:#FFFFFF!important;
  color:#0F172A!important;
  border:1px solid #CBD5E1!important;
  border-radius:14px!important;
  box-shadow:none!important;
}
.form-card input:focus,
.form-card select:focus,
.form-card textarea:focus,
.site-tab-panel input:focus,
.site-tab-panel select:focus,
.site-tab-panel textarea:focus{
  border-color:#D89B5B!important;
  box-shadow:0 0 0 3px rgba(216,155,91,.16)!important;
}
.locked-context,
.info-strip,
.advanced-box{
  background:#F8FAFC!important;
  border:1px solid #DBE4F0!important;
  color:#0F172A!important;
  border-radius:16px!important;
}
.locked-context span,.info-strip,.advanced-box p{color:#64748B!important;}
.locked-context b{color:#0F172A!important;}
.button-row.end{border-top:1px solid #EEF2F7!important;padding-top:14px!important;margin-top:0!important;}

/* Keep map below UI overlays */
.leaflet-container,
.leaflet-pane,
.leaflet-top,
.leaflet-bottom,
.leaflet-control-container{z-index:1!important;}
.leaflet-popup-pane{z-index:10!important;}
.v74-map-card,.dashboard-map-card,.v74-map-canvas,.dashboard-map-canvas{position:relative!important;z-index:0!important;}

/* Final light palette normalization */
:root{--ui-bg:#F4F6FA;--ui-panel:#FFFFFF;--ui-line:#DBE4F0;--ui-text:#0F172A;--ui-muted:#64748B;--ui-orange:#C0561E;--ui-gold:#D89B5B;}
body{background:#F4F6FA!important;color:#0F172A!important;}
.light-sidebar,.light-topbar{background:#FFFFFF!important;}
.light-workspace{background:#F4F6FA!important;}
.side-card,.page-card,.dashboard-side-card,.v74-map-card,.v74-device-workbench,.v74-note-card,.v74-meta-card{background:#FFFFFF!important;color:#0F172A!important;border-color:#DBE4F0!important;}
.side-card h3,.page-card h2,.dashboard-side-card h3{color:#0F172A!important;}
.muted, .side-card p, .dashboard-side-card span{color:#64748B!important;}

/* v81 auth foundation */
.login-shell{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:32px;background:linear-gradient(135deg,#f7f7f8,#eceff3)}
.login-card{width:min(460px,100%);background:#fff;border:1px solid rgba(20,20,25,.08);border-radius:28px;box-shadow:0 24px 70px rgba(15,23,42,.12);padding:30px;display:flex;flex-direction:column;gap:16px}
.login-brand{display:flex;align-items:center;gap:14px;margin-bottom:6px}.login-brand img{width:54px;height:54px;object-fit:contain}.login-brand b{display:block;font-size:1.1rem}.login-brand span{display:block;color:#64748b;font-size:.85rem}.login-card h1{margin:0;font-size:2rem}.login-card p{margin:0;color:#64748b;line-height:1.5}.login-form{display:flex;flex-direction:column;gap:12px}.login-form label{font-size:.85rem;font-weight:700;color:#334155;display:flex;flex-direction:column;gap:6px}.login-form input{border:1px solid #d5dbe4;border-radius:14px;padding:13px 14px;font-size:1rem;background:#f8fafc}.login-form input:focus{outline:2px solid rgba(192,86,30,.22);border-color:#C0561E;background:#fff}.login-error{border:1px solid rgba(220,38,38,.22);background:#fef2f2;color:#991b1b;border-radius:14px;padding:10px 12px;font-weight:700}.danger-btn{border:0;border-radius:14px;background:#fee2e2;color:#991b1b;padding:10px 14px;font-weight:800;cursor:pointer}.danger-btn:hover{filter:brightness(.98)}

/* v83 login cleanup + new MLST HUB logo */
.login-brand-wide{justify-content:center;margin-bottom:10px}
.login-brand-wide img{width:min(320px,90%);height:auto;max-height:130px;object-fit:contain;border-radius:0}
.light-brand-logo img{width:42px;height:auto;max-height:28px;object-fit:contain}
@media (max-width:560px){.login-brand-wide img{width:min(280px,92%)}}

/* v84 - MLST HUB clean settings/users */
.settings-hero-clean,
.settings-clean-card{
  background:#fff!important;
  background-image:none!important;
  color:var(--ui-text)!important;
  border:1px solid var(--ui-line)!important;
  box-shadow:0 14px 34px rgba(15,23,42,.06)!important;
}
.settings-hero-clean:after{display:none!important;}
.settings-hero-clean h1,.settings-clean-card h3,.settings-chip span{color:var(--ui-text)!important;}
.settings-hero-clean p,.settings-clean-head p,.settings-summary-strip span,.settings-note-card span{color:var(--ui-muted)!important;}
.settings-summary-strip div{background:#F8FAFC!important;border-color:var(--ui-line)!important;color:var(--ui-text)!important;}
.settings-inline-add{background:#F8FAFC!important;border-color:var(--ui-line)!important;}
.settings-inline-add input{background:#fff!important;color:var(--ui-text)!important;border-color:var(--ui-line)!important;}
.settings-chip{background:#fff!important;border-color:var(--ui-line)!important;}
.settings-note-card{background:#FFF7ED!important;border-color:#FED7AA!important;}
.users-page{max-width:1200px!important;}
.user-list-groups{display:grid;gap:18px;}
.user-list-group{background:#fff;border:1px solid var(--ui-line);border-radius:22px;box-shadow:0 14px 34px rgba(15,23,42,.05);overflow:hidden;}
.user-list-heading{display:flex;justify-content:space-between;gap:20px;align-items:center;padding:18px 20px;background:#F8FAFC;border-bottom:1px solid var(--ui-line);}
.user-list-heading b{display:block;font-size:18px;color:var(--ui-text);}
.user-list-heading span{display:block;margin-top:4px;color:var(--ui-muted);font-size:13px;line-height:1.4;}
.user-list-heading em{font-style:normal;min-width:36px;height:36px;border-radius:14px;background:var(--ui-orange-soft);color:var(--ui-orange);display:grid;place-items:center;font-weight:950;border:1px solid var(--ui-orange-line);}
.user-table-wrap{overflow:auto;}
.user-table{width:100%;border-collapse:collapse;}
.user-table th,.user-table td{padding:13px 16px;border-bottom:1px solid var(--ui-line);text-align:left;font-size:13px;color:var(--ui-text);vertical-align:middle;}
.user-table th{font-size:11px;text-transform:uppercase;letter-spacing:.08em;color:var(--ui-muted);background:#fff;}
.user-table tr:last-child td{border-bottom:0;}
.user-table .table-actions{display:flex;justify-content:flex-end;gap:8px;white-space:nowrap;}
.user-table .empty-table{text-align:center;color:var(--ui-muted);padding:22px;}
.user-table .muted-row{opacity:.58;}


/* v85 MLST HUB logo/users cleanup */
.light-brand.logo-only{justify-content:center;padding:8px 8px 18px;}
.light-brand.logo-only .light-brand-logo{width:168px;height:70px;border-radius:0;background:transparent;border:0;box-shadow:none;overflow:visible;}
.light-brand.logo-only .light-brand-logo img{width:168px!important;height:auto!important;max-height:70px!important;object-fit:contain;}
.users-page{width:100%!important;max-width:none!important;margin:0!important;}
.users-page .section-title{align-items:flex-start;}
.user-list-groups{width:100%;}
.user-list-group{width:100%;}
.user-table{width:100%;}
@media(max-width:900px){.light-brand.logo-only .light-brand-logo,.light-brand.logo-only .light-brand-logo img{width:140px!important;}}

/* v87 cleanup */
.compact-logo-topbar { min-height: 76px; justify-content: flex-end; }
.empty-page-context { display: none !important; }
.users-page .section-title p { display: none; }
#userWgIdRow.hidden { display: none !important; }
.user-modal-grid label small { display:block; margin-top:6px; line-height:1.35; color:#6b778c; }
.reset-password-panel { border:1px solid #dbe5f1; border-radius:16px; padding:14px; display:flex; gap:12px; align-items:center; justify-content:space-between; background:#f8fbff; }
.reset-password-panel span { color:#66758d; font-size:13px; }
.copy-textarea { width:100%; min-height:92px; border:1px solid #dbe5f1; border-radius:14px; padding:12px; font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace; }

/* v88 user/auth cleanup */
.user-modal-grid { grid-template-columns: 1fr 1fr; align-items:start; }
.user-modal-grid .form-field { display:grid; gap:8px; font-weight:800; color:#1b2537; }
.user-modal-grid .form-field > span { display:block; font-size:14px; line-height:1.2; }
.user-modal-grid input,
.user-modal-grid select,
.user-modal-grid textarea { width:100%; min-height:44px; box-sizing:border-box; }
.user-modal-grid select[multiple] { min-height:150px; }
.user-modal-grid .hidden { display:none !important; }
.reset-password-panel { min-height:110px; align-items:flex-start; flex-direction:column; justify-content:center; }
.reset-password-panel b { display:block; }
.reset-password-panel .soft-btn { align-self:flex-start; }
.user-list-heading span { display:none; }
.email-settings-card { grid-column:1/-1; }
.email-form-grid { display:grid; grid-template-columns:repeat(2,minmax(220px,1fr)); gap:12px; margin-top:12px; }
.email-form-grid label { display:grid; gap:7px; font-weight:850; color:#1b2537; }
.email-form-grid input,
.email-form-grid textarea { width:100%; box-sizing:border-box; border:1px solid #d8e2ef; border-radius:12px; padding:10px 12px; background:#fff; color:#142033; }
.email-form-grid textarea { min-height:110px; resize:vertical; }
.email-form-grid .span-2 { grid-column:1/-1; }
.email-form-grid .check-row { display:flex; align-items:center; gap:10px; background:#f8fbff; border:1px solid #dbe5f1; border-radius:14px; padding:10px 12px; }
.email-form-grid .check-row input { width:auto; min-height:auto; }
@media(max-width:900px){ .user-modal-grid,.email-form-grid{grid-template-columns:1fr;} }
