
/* ==========================================================================
   MVR WAVE REFERENCE UI
   WaveShield-inspired visual system for MVR — structure, spacing and chrome
   are intentionally aligned to the supplied reference screenshots while
   retaining MVR functionality and branding.
   ========================================================================== */
:root{
  --wave-bg:var(--mvr-surface-4);
  --wave-panel:var(--mvr-surface-2);
  --wave-panel2:#03111f;
  --wave-line:var(--mvr-surface-1);
  --wave-line2:var(--mvr-accent-7);
  --wave-text:var(--mvr-text-10);
  --wave-muted:var(--mvr-text-14);
  --wave-blue:var(--mvr-accent-2);
  --wave-blue2:#35a9ff;
  --wave-green:var(--mvr-accent-28);
  --wave-red:var(--mvr-accent-88);
  --wave-purple:var(--mvr-accent-89);
  --wave-orange:#ff7800;
  --wave-radius:10px;
}

/* App chrome / sidebar */
body:has(.app){background:var(--wave-bg)!important;color:var(--wave-text)}
body:has(.app):before{display:none}
.app{grid-template-columns:222px minmax(0,1fr)!important;background:var(--wave-bg)}
.sidebar{
  background:linear-gradient(180deg,#000b17 0%,var(--mvr-surface-4) 100%)!important;
  border-right:1px solid var(--mvr-surface-119)!important;
}
.sidebar:before{background:linear-gradient(180deg,rgba(7,151,255,.07),transparent 24%)!important}
.sidebar-scroll{padding:14px 10px 12px!important}
.brand-row{padding:4px 6px 14px!important;gap:10px!important}
.brand-logo{width:38px!important;height:38px!important;border-radius:10px!important}
.brand-copy b{font-size:12px!important;color:#e8f5ff!important}
.brand-copy small{font-size:9px!important;color:#65a9d7!important}
.sidebar .searchbox{
  height:34px!important;margin:4px 2px 10px!important;
  background:var(--mvr-surface-5)!important;border:1px solid #08345a!important;
  border-radius:8px!important;color:#6fa9d4!important;
}
.sidebar .searchbox input{font-size:11px!important;color:#cfeaff!important}
.nav-group{margin:10px 0!important}
.nav-group-title{
  padding:6px 8px!important;font-size:9px!important;letter-spacing:.11em!important;
  color:var(--mvr-line-12)!important;text-transform:uppercase!important;
}
.sidebar a[data-path]{
  min-height:34px!important;border-radius:7px!important;margin:2px 0!important;
  padding:0 9px!important;color:#77a8c9!important;border:1px solid transparent!important;
}
.sidebar a[data-path]:hover{
  background:#031b30!important;border-color:#073e68!important;color:#d9efff!important;
}
.sidebar a[data-path].active{
  background:var(--mvr-accent-50)!important;border-color:var(--mvr-accent-2)!important;
  box-shadow:0 0 0 1px rgba(7,151,255,.14),inset 0 0 18px rgba(7,151,255,.07)!important;
  color:var(--mvr-text-1)!important;
}
.nav-icon{width:22px!important;color:#70b7e8!important}
.nav-label{font-size:11px!important;font-weight:700!important}
.sidebar-bottom{
  border-top:1px solid var(--mvr-surface-119)!important;background:var(--mvr-surface-4)!important;
  padding:9px 10px!important;
}
.side-status{font-size:8px!important;color:#4e91bd!important}

/* Main canvas */
.content{background:var(--mvr-surface-4)!important}
.page{max-width:none!important;padding:18px 18px 42px!important}
.topbar{margin-bottom:16px!important;align-items:center!important}
.topbar h1{font-size:25px!important;letter-spacing:-.025em!important;color:var(--mvr-text-63)!important}
.eyebrow{font-size:9px!important;color:#5aaee8!important;letter-spacing:.16em!important}
.topbar .muted{font-size:11px!important;color:var(--mvr-text-14)!important}

/* Wave-style buttons */
.btn{
  border-radius:7px!important;font-size:10px!important;font-weight:800!important;
  min-height:34px!important;
}
.btn.secondary{
  background:var(--mvr-surface-6)!important;border-color:var(--mvr-accent-7)!important;color:var(--mvr-accent-26)!important;
}
.btn.secondary:hover{background:#06233b!important;border-color:#159dff!important;color:var(--mvr-text-1)!important}

/* Cards / stats */
.card,.config-card,.settings-large-card{
  background:var(--mvr-surface-2)!important;border:1px solid var(--mvr-surface-1)!important;
  border-radius:var(--wave-radius)!important;box-shadow:none!important;
}
.card:before{display:none!important}
.grid{gap:10px!important}
.grid-2,.grid-3{gap:10px!important}
.card.stat{padding:14px!important;min-height:92px!important}
.card.stat .label{color:#4d98c9!important;font-size:8px!important}
.card.stat .big{font-size:23px!important;color:#e0f2ff!important}
.pill{
  border-radius:6px!important;background:var(--mvr-surface-90)!important;border-color:var(--mvr-accent-7)!important;
  color:var(--mvr-accent-40)!important;font-size:9px!important;font-weight:800!important;
}
.pill.ok,.pill.live{background:rgba(0,216,139,.10)!important;border-color:#08785b!important;color:#53eab4!important}
.pill.bad{background:rgba(255,54,84,.10)!important;border-color:var(--mvr-accent-49)!important;color:var(--mvr-accent-27)!important}
.pill.warn{background:rgba(255,120,0,.09)!important;border-color:#81400e!important;color:#ff9d4b!important}

/* Dashboard */
.wave-dashboard .wave-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:16px;
}
.wave-dashboard .wave-head-left{min-width:0}
.wave-dashboard .wave-server-chip{
  display:inline-flex;align-items:center;gap:8px;height:34px;padding:0 11px;
  border:1px solid #073c64;border-radius:8px;background:var(--mvr-surface-5);color:#9ccbed;
  font-size:10px;font-weight:800;
}
.wave-dashboard .wave-server-chip .dot{
  width:7px;height:7px;border-radius:50%;background:#718aa0;
}
.wave-dashboard .wave-server-chip .dot.online{
  background:var(--mvr-accent-28);box-shadow:0 0 0 4px rgba(0,216,139,.10);
}
.wave-dashboard .wave-kpis{
  display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-top:15px;
}
.wave-dashboard .wave-kpi{
  position:relative;min-height:84px;padding:13px 14px 12px;
  background:var(--mvr-surface-2);border:1px solid var(--mvr-surface-1);border-radius:10px;overflow:hidden;
}
.wave-dashboard .wave-kpi:before{
  content:"";position:absolute;left:0;top:0;bottom:0;width:3px;background:var(--mvr-accent-2);
}
.wave-dashboard .wave-kpi:nth-child(2):before{background:var(--mvr-accent-89)}
.wave-dashboard .wave-kpi:nth-child(3):before{background:var(--mvr-accent-88)}
.wave-dashboard .wave-kpi:nth-child(4):before{background:var(--mvr-accent-28)}
.wave-dashboard .wave-kpi .k-label{font-size:9px;text-transform:uppercase;letter-spacing:.07em;color:#579bc7;font-weight:900}
.wave-dashboard .wave-kpi .k-value{font-size:24px;font-weight:900;line-height:1.05;margin-top:9px;color:#e5f5ff}
.wave-dashboard .wave-kpi .k-sub{font-size:9px;color:#648ba8;margin-top:5px}
.wave-dashboard .wave-main-grid{
  display:grid;grid-template-columns:minmax(0,1.55fr) minmax(320px,.9fr);gap:10px;margin-top:10px;
}
.wave-dashboard .wave-panel{
  background:var(--mvr-surface-2);border:1px solid var(--mvr-surface-1);border-radius:10px;overflow:hidden;
}
.wave-dashboard .wave-panel-head{
  display:flex;align-items:flex-start;justify-content:space-between;gap:12px;
  padding:13px 14px;border-bottom:1px solid var(--mvr-surface-35);
}
.wave-dashboard .wave-panel-head h2{margin:0;font-size:14px;color:var(--mvr-text-3)}
.wave-dashboard .wave-panel-head p{margin:4px 0 0;font-size:9px;color:#648aa8}
.wave-dashboard .wave-panel-body{padding:12px}
.wave-dashboard .chart-shell{background:var(--mvr-surface-18);border:0!important;border-radius:0!important}
.wave-dashboard .wave-two-col{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:10px}
.wave-dashboard .wave-donut{
  min-height:260px;display:grid;place-items:center;background:var(--mvr-surface-18);border-radius:8px;
}
.wave-dashboard .wave-list{display:grid;gap:6px}
.wave-dashboard .wave-list-row{
  display:grid;grid-template-columns:8px 1fr auto;gap:9px;align-items:center;
  padding:9px 10px;background:#020d1b;border:1px solid var(--mvr-surface-120);border-radius:7px;
}
.wave-dashboard .wave-list-dot{width:8px;height:8px;border-radius:50%;background:var(--mvr-accent-2)}
.wave-dashboard .wave-list-row b{font-size:10px;color:#bcd9ed}
.wave-dashboard .wave-list-row small{display:block;color:#5f86a2;font-size:8px;margin-top:2px}
.wave-dashboard .wave-list-row strong{font-size:12px;color:#e1f2ff}
.wave-dashboard .wave-activity table{width:100%;border-collapse:collapse}
.wave-dashboard .wave-activity td{border-bottom:1px solid #062b48;padding:9px 10px;font-size:9px;color:#84a9c3}
.wave-dashboard .wave-activity tr:last-child td{border-bottom:0}

/* Configuration: match supplied WaveShield tabs/cards/rows */
.mvr-config-page{padding-top:8px!important}
.mvr-config-page .topbar{margin-bottom:12px!important}
.mvr-config-page .topbar h1{font-size:25px!important}
.mvr-config-page .config-toolbar{
  background:var(--mvr-surface-2)!important;border:1px solid var(--mvr-surface-1)!important;border-radius:10px!important;
  padding:10px!important;display:grid!important;grid-template-columns:1fr auto!important;gap:8px!important;
}
.mvr-config-page .config-search{
  height:38px!important;background:var(--mvr-surface-5)!important;border:1px solid var(--mvr-accent-7)!important;
  border-radius:7px!important;
}
.mvr-config-page .config-search input{font-size:11px!important;color:var(--mvr-text-10)!important}
.mvr-config-page .config-tabs{
  display:grid!important;grid-template-columns:repeat(7,minmax(0,1fr))!important;gap:5px!important;
  margin:10px 0!important;background:var(--mvr-surface-5)!important;padding:4px!important;
  border:1px solid var(--mvr-surface-40)!important;border-radius:9px!important;
}
.mvr-config-page .config-tab{
  min-height:38px!important;border:1px solid transparent!important;border-radius:7px!important;
  background:transparent!important;color:#70a8cf!important;font-size:10px!important;font-weight:800!important;
}
.mvr-config-page .config-tab:hover{background:#04233b!important;color:var(--mvr-text-57)!important}
.mvr-config-page .config-tab.active{
  background:#042a49!important;border-color:var(--mvr-accent-2)!important;color:var(--mvr-text-1)!important;
  box-shadow:0 0 0 1px rgba(7,151,255,.12)!important;
}
.mvr-config-page .config-masonry{
  display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:10px!important;
}
.mvr-config-page .config-masonry-col{display:flex!important;flex-direction:column!important;gap:10px!important}
.mvr-config-page .config-card{margin:0!important}
.mvr-config-page .config-card-head{padding:13px 14px!important;border-bottom:1px solid var(--mvr-surface-40)!important}
.mvr-config-page .config-card-head h2{font-size:14px!important;color:var(--mvr-text-3)!important}
.mvr-config-page .config-card-head p{font-size:9px!important;color:#6490ad!important;margin-top:4px!important}
.mvr-config-page .cat-icon{color:#72b9e9!important}
.mvr-config-page .config-rule-list{padding:0!important}
.mvr-config-page .clean-rule-row{
  min-height:36px!important;padding:0 10px!important;border-top:1px solid var(--mvr-surface-40)!important;
  background:var(--mvr-surface-2)!important;display:grid!important;grid-template-columns:minmax(0,1fr) auto!important;
  gap:8px!important;align-items:center!important;
}
.mvr-config-page .clean-rule-row:hover{background:#031323!important}
.mvr-config-page .clean-rule-row.off{opacity:.78!important}
.mvr-config-page .clean-rule-name{font-size:10px!important;font-weight:800!important;color:#cce7f8!important}
.mvr-config-page .clean-rule-desc{font-size:8px!important;color:#5f88a4!important;margin-top:2px!important}
.mvr-config-page .clean-rule-actions{display:flex!important;align-items:center!important;gap:5px!important}
.mvr-config-page .mvr-switch{
  width:34px!important;height:18px!important;border-radius:999px!important;
  background:#07304d!important;border:1px solid #0c527f!important;
}
.mvr-config-page .mvr-switch:after{
  width:14px!important;height:14px!important;top:1px!important;left:1px!important;
  background:#b9d8ed!important;box-shadow:none!important;
}
.mvr-config-page .mvr-switch[aria-checked="true"]{
  background:var(--mvr-accent-2)!important;border-color:var(--mvr-accent-2)!important;
}
.mvr-config-page .mvr-switch[aria-checked="true"]:after{transform:translateX(16px)!important;background:#e8f7ff!important}
.mvr-config-page .action-segment{
  order:0!important;opacity:.55!important;transform:scale(.82);transform-origin:right center;
}
.mvr-config-page .action-btn{
  background:var(--mvr-surface-56)!important;border-color:#0a3d63!important;color:#648ba7!important;
  min-height:23px!important;font-size:7px!important;padding:0 5px!important;
}
.mvr-config-page .action-btn.active{color:var(--mvr-text-1)!important;background:var(--mvr-accent-9)!important;border-color:var(--mvr-accent-2)!important}
.mvr-config-page .tag-badge,.mvr-config-page .compat-badge{
  font-size:7px!important;padding:2px 4px!important;border-radius:4px!important;
}
.mvr-config-page .settings-clean-row,.mvr-config-page .premium-row{
  min-height:42px!important;border-top:1px solid var(--mvr-surface-40)!important;padding:8px 10px!important;
  background:var(--mvr-surface-2)!important;
}
.mvr-config-page .runtime-card .config-card-head{display:flex!important}
.mvr-config-page .runtime-settings-grid{display:grid!important;grid-template-columns:repeat(3,minmax(0,1fr))!important;gap:8px!important;padding:10px!important}
.mvr-config-page .runtime-field{
  background:var(--mvr-surface-5)!important;border:1px solid var(--mvr-surface-1)!important;border-radius:7px!important;padding:8px!important;
}
.mvr-config-page .runtime-field input{height:30px!important;background:var(--mvr-surface-4)!important;border-color:#0a416b!important}
.mvr-config-page .ban-editor-clean{padding:10px!important}

/* Monitoring / WebRTC */
.ws-shell{
  grid-template-columns:minmax(0,1fr) 300px!important;gap:10px!important;
}
.ws-main,.ws-side{min-width:0}
.ws-side{
  background:var(--mvr-surface-2)!important;border-color:var(--mvr-surface-1)!important;border-radius:10px!important;
  box-shadow:none!important;top:14px!important;height:calc(100vh - 110px)!important;
}
.ws-stagebar{
  background:var(--mvr-surface-2)!important;border:1px solid var(--mvr-surface-1)!important;border-radius:9px!important;
  padding:8px!important;
}
.ws-wall{
  background:var(--mvr-surface-18)!important;border:1px solid var(--mvr-surface-1)!important;border-radius:10px!important;
  min-height:540px!important;
}
.ws-wall-empty{color:var(--mvr-text-14)!important}
.ws-glyph{border-color:var(--mvr-accent-7)!important;color:var(--mvr-accent-2)!important;background:var(--mvr-surface-5)!important}
.ws-screen{
  background:var(--mvr-surface-2)!important;border-color:var(--mvr-surface-1)!important;border-radius:9px!important;
}
.ws-sc-top{background:var(--mvr-surface-5)!important;border-bottom-color:var(--mvr-surface-1)!important}
.ws-sc-bot{background:var(--mvr-surface-5)!important;border-top-color:var(--mvr-surface-1)!important}
.ws-prow{
  background:var(--mvr-surface-5)!important;border-color:var(--mvr-surface-1)!important;border-radius:7px!important;
}
.ws-prow:hover,.ws-prow.active{
  background:var(--mvr-accent-50)!important;border-color:var(--mvr-accent-2)!important;
}
.ws-side .ws-search input{
  background:var(--mvr-surface-4)!important;border-color:var(--mvr-accent-7)!important;border-radius:7px!important;
}

/* Responsive */
@media(max-width:1100px){
  .wave-dashboard .wave-kpis{grid-template-columns:repeat(2,1fr)}
  .wave-dashboard .wave-main-grid{grid-template-columns:1fr}
  .mvr-config-page .config-masonry{grid-template-columns:1fr 1fr!important}
  .ws-shell{grid-template-columns:1fr!important}
  .ws-side{position:relative;height:auto!important;top:auto!important}
}
@media(max-width:760px){
  .app{grid-template-columns:1fr!important}
  /* 17.2.61 MOBILE MENU FIX.
     This rule was `display:none`, and because this stylesheet loads AFTER
     style.css it beat the slide-in drawer defined there. The hamburger fired
     and .open applied correctly, but the sidebar was display:none, so nothing
     ever appeared — the menu was unusable on every phone, on every page.
     It must stay in the layout and slide off-screen instead. */
  .sidebar{display:flex;position:fixed;left:0;top:0;height:100dvh;
    width:min(300px,88vw);transform:translateX(-105%);
    transition:transform .2s ease;z-index:1001}
  .sidebar.open{transform:translateX(0)}
  .page{padding:14px 10px 34px!important}
  .wave-dashboard .wave-kpis{grid-template-columns:1fr}
  .wave-dashboard .wave-two-col{grid-template-columns:1fr}
  .mvr-config-page .config-toolbar{grid-template-columns:1fr!important}
  .mvr-config-page .config-tabs{grid-template-columns:repeat(2,1fr)!important}
  .mvr-config-page .config-masonry{grid-template-columns:1fr!important}
  .mvr-config-page .runtime-settings-grid{grid-template-columns:1fr!important}
}

/* MVR monitoring — Wave-style live command deck */
.ws-shell{grid-template-columns:minmax(0,1fr) 302px!important;gap:10px!important;align-items:start}
.ws-main{min-width:0}.ws-stagebar{height:48px;display:flex;align-items:center;gap:8px}
.ws-wall{padding:0!important;display:grid;grid-template-columns:repeat(var(--ws-cols),minmax(0,1fr));gap:10px;align-content:start;background:var(--mvr-surface-121)!important;min-height:calc(100vh - 255px)!important}
.ws-screen{min-width:0;aspect-ratio:16/10;display:flex!important;flex-direction:column;overflow:hidden;border-radius:9px!important;background:var(--mvr-surface-122)!important}
.ws-screen.ws-focus{aspect-ratio:auto;min-height:calc(100vh - 270px)}
.ws-sc-top{height:42px;min-height:42px;display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px;background:var(--mvr-surface-64)!important}
.ws-sc-title{min-width:0;display:flex;align-items:center;gap:7px}.ws-sc-title b{max-width:150px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--mvr-text-10);font-size:12px}.ws-id{color:#6d91ac;font:700 10px var(--mono)}.ws-ping{color:var(--mvr-accent-90);font:700 10px var(--mono)}
.ws-tag{border:1px solid #104f79;background:var(--mvr-surface-65);color:#70bfff;border-radius:5px;padding:3px 6px;font-size:9px;white-space:nowrap}.ws-rec{width:7px;height:7px;border-radius:50%;background:var(--mvr-accent-14);box-shadow:0 0 8px rgba(255,49,88,.5)}
.ws-sc-actions{display:flex;gap:4px}.ws-sc-actions button{width:29px;height:27px;border:1px solid #163b59;background:var(--mvr-surface-61);color:#a9c7dc;border-radius:6px;cursor:pointer}.ws-sc-actions button:hover{border-color:var(--mvr-accent-13);color:var(--mvr-text-1)}.ws-sc-actions .stop:hover{border-color:#ff4162;color:#ff8ba0}
.ws-video-frame{position:relative;flex:1;min-height:0;background:var(--mvr-surface-3);overflow:hidden}.ws-video-frame video,.ws-video-frame img{display:block;width:100%!important;height:100%!important;object-fit:cover;background:var(--mvr-surface-3)}.ws-video-frame video{position:absolute;inset:0}.ws-sc-wait{position:absolute;inset:42px 0 31px;display:flex;align-items:center;justify-content:center;flex-direction:column;gap:7px;background:rgba(0,4,10,.82);z-index:3;color:var(--mvr-text-64)}.ws-sc-wait strong{font-size:12px;color:var(--mvr-text-10)}.ws-sc-wait span{font-size:9px;text-align:center;max-width:80%;line-height:1.45}.ws-screen.ws-live .ws-sc-wait{display:none}
.ws-sc-bot{height:31px;min-height:31px;display:flex;align-items:center;gap:12px;padding:0 10px;background:var(--mvr-surface-64)!important}.ws-sc-state{color:#ff526d;font:900 9px var(--mono)}.ws-screen.ws-live .ws-sc-state{color:var(--mvr-accent-91)}.ws-live-clock{color:#d6e8f4;font:800 9px var(--mono);display:flex;align-items:center;gap:5px}.ws-live-clock i{width:6px;height:6px;border-radius:50%;background:var(--mvr-accent-91);box-shadow:0 0 8px rgba(0,217,139,.7)}
.ws-side{position:sticky!important;top:14px!important;height:calc(100vh - 118px)!important;overflow:hidden}.ws-side .ws-search input{height:37px!important}.ws-side .ws-prow{padding:8px 9px!important}.ws-side .ws-prow.active{box-shadow:inset 2px 0 0 var(--mvr-accent-2)}
@media(max-width:1100px){.ws-shell{grid-template-columns:1fr!important}.ws-side{position:relative!important;height:auto!important;max-height:420px}.ws-wall{min-height:500px!important}}
