:root{
  --tvbar-bg:#ffffff;
  --tvbar-ink:#0f172a;
  --tvbar-muted:#64748b;
  --tvbar-line:#e5e7eb;
  --tvbar-hover:#f1f5f9;
  --tvbar-primary:#0ea5e9;
  --tvbar-primary-dark:#0369a1;
  --tvbar-orange:#f97316;
  --tvbar-shadow:0 14px 34px rgba(15,23,42,.13);
}

#tvGlobalTopbarMount{
  position:sticky;
  top:0;
  z-index:999999;
  width:100%;
  height:40px;
  background:rgba(248,250,252,.94);
  backdrop-filter:blur(12px);
  border-bottom:1px solid rgba(226,232,240,.95);
  font-family:Inter,Arial,Tahoma,sans-serif;
  direction:ltr;
}

#tvGlobalTopbarMount *{
  box-sizing:border-box;
}

.tvtopbar{
  height:40px;
  display:flex;
  align-items:center;
  gap:5px;
  padding:3px 6px;
  overflow:visible;
  color:var(--tvbar-ink);
}

.tvbrand{
  height:30px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 9px 0 4px;
  border:1px solid var(--tvbar-line);
  border-radius:12px;
  background:#fff;
}

.tvbrand-logo{
  width:24px;
  height:24px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:linear-gradient(135deg,var(--tvbar-primary),var(--tvbar-orange));
  color:#fff;
  font-size:9px;
  font-weight:950;
}

.tvbrand-title{
  max-width:132px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
  font-size:11px;
  font-weight:950;
  letter-spacing:-.02em;
}

.tvsearch{
  height:30px;
  flex:0 0 250px;
  max-width:250px;
  min-width:180px;
  display:flex;
  align-items:center;
  gap:6px;
  padding:0 8px;
  border:1px solid var(--tvbar-line);
  border-radius:12px;
  background:#fff;
}

.tvsearch span{
  color:var(--tvbar-muted);
  font-size:12px;
}

.tvsearch input{
  width:100%;
  height:28px;
  border:0;
  outline:0;
  background:transparent;
  color:var(--tvbar-ink);
  font-size:11px;
  font-weight:800;
}

.tvnav{
  flex:1 1 auto;
  min-width:0;
  display:flex;
  align-items:center;
  gap:4px;
  overflow-x:auto;
  overflow-y:hidden;
  scrollbar-width:none;
}

.tvnav::-webkit-scrollbar{
  display:none;
}

.tvdd{
  position:relative;
  flex:0 0 auto;
}

.tvbtn,
.tvlink{
  height:30px;
  min-height:30px;
  display:inline-flex;
  align-items:center;
  gap:6px;
  padding:0 8px;
  border:1px solid var(--tvbar-line);
  border-radius:11px;
  background:#fff;
  color:var(--tvbar-ink);
  text-decoration:none;
  cursor:pointer;
  font-size:11px;
  font-weight:950;
  white-space:nowrap;
  user-select:none;
}

.tvbtn:hover,
.tvlink:hover{
  background:var(--tvbar-hover);
}

.tvmodule-property > .tvbtn{
  background:linear-gradient(135deg,var(--tvbar-primary),var(--tvbar-primary-dark));
  border-color:transparent;
  color:#fff;
}

.tvmodule-reports > .tvbtn{
  background:#fff7ed;
  border-color:#fed7aa;
  color:#9a3412;
}

.tvchev{
  opacity:.6;
  transition:.15s;
}

.tvdd.open > .tvbtn .tvchev{
  transform:rotate(180deg);
}

.tvmega,
.tvpanel{
  display:none;
  background:#fff;
  border:1px solid var(--tvbar-line);
  border-radius:15px;
  box-shadow:var(--tvbar-shadow);
  padding:8px;
}

.tvdd.open > .tvmega,
.tvdd.open > .tvpanel{
  display:block;
}

.tv-floating-menu{
  position:fixed !important;
  top:var(--tv-menu-top,44px) !important;
  left:var(--tv-menu-left,8px) !important;
  right:auto !important;
  width:var(--tv-menu-width,360px) !important;
  max-width:calc(100vw - 16px) !important;
  max-height:calc(100vh - 54px) !important;
  overflow:auto !important;
  z-index:2147483000 !important;
}

.tvmega-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(210px,1fr));
  gap:7px;
}

.tvpanel-grid{
  display:grid;
  grid-template-columns:1fr;
  gap:7px;
}

.tvgroup{
  border:1px solid #eef2f7;
  background:linear-gradient(180deg,#fff,#f8fafc);
  border-radius:13px;
  padding:7px;
}

.tvgroup-title{
  margin:1px 4px 5px;
  color:var(--tvbar-muted);
  font-size:9px;
  font-weight:950;
  text-transform:uppercase;
  letter-spacing:.08em;
}

.tvitem{
  min-height:27px;
  display:flex;
  align-items:center;
  gap:8px;
  padding:6px 7px;
  border-radius:9px;
  color:var(--tvbar-ink);
  text-decoration:none;
  font-size:11px;
  font-weight:850;
  white-space:nowrap;
}

.tvitem:hover{
  background:#e0f2fe;
  color:#075985;
}

.tvbadge{
  margin-left:auto;
  min-width:19px;
  height:17px;
  padding:0 6px;
  border-radius:999px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  font-size:9px;
  font-weight:950;
  background:#e0f2fe;
  color:#075985;
}

.tvbadge.warn{
  background:#fef3c7;
  color:#92400e;
}

.tvbadge.danger{
  background:#fee2e2;
  color:#991b1b;
}

.tvmenu-search{
  height:30px;
  display:flex;
  align-items:center;
  gap:7px;
  border:1px solid var(--tvbar-line);
  border-radius:11px;
  background:#fff;
  padding:0 9px;
  margin-bottom:7px;
}

.tvmenu-search span{
  color:var(--tvbar-muted);
}

.tvmenu-search input{
  width:100%;
  border:0;
  outline:0;
  background:transparent;
  color:var(--tvbar-ink);
  font-size:11px;
  font-weight:800;
}

.tvuser{
  height:30px;
  flex:0 0 auto;
  display:flex;
  align-items:center;
  gap:7px;
  padding:0 8px;
  border:1px solid var(--tvbar-line);
  border-radius:11px;
  background:#fff;
  color:#334155;
  font-size:11px;
  font-weight:950;
}

.tvavatar{
  width:21px;
  height:21px;
  border-radius:7px;
  display:grid;
  place-items:center;
  background:#f1f5f9;
  color:#0f172a;
  font-size:10px;
  font-weight:950;
}

.tvmobile{
  display:none;
}

body{
  scroll-padding-top:44px;
}

@media(max-width:900px){
  #tvGlobalTopbarMount{
    height:auto;
    min-height:40px;
  }

  .tvtopbar{
    height:auto;
    flex-wrap:wrap;
  }

  .tvbrand-title,
  .tvuser{
    display:none;
  }

  .tvsearch{
    flex:1 1 calc(100% - 82px);
    max-width:none;
  }

  .tvmobile{
    width:30px;
    height:30px;
    display:inline-flex;
    align-items:center;
    justify-content:center;
    border:1px solid var(--tvbar-line);
    border-radius:11px;
    background:#fff;
    cursor:pointer;
    font-weight:950;
  }

  .tvnav{
    display:none;
    width:100%;
  }

  .tvnav.open{
    display:flex;
  }

  .tv-floating-menu{
    left:8px !important;
    right:8px !important;
    width:auto !important;
    top:84px !important;
  }

  .tvmega-grid{
    grid-template-columns:1fr;
  }
}
