/* =========================================================
   XOVOS TTB 5.8.1 — YAKUNIY BARQAROR LAYOUT
   2026-09-10
   Maqsad:
   - barcha public sahifalarda header bir xil qatorda
   - Admin Local header/nav o'lcham va offsetlari ishlaydi
   - Tahlil dashboardi desktopda ekranni to'liq ishlatadi
   - keraksiz HTTPS/localhost ogohlantirishi ko'rinmaydi
   ========================================================= */

/* Ovozli boshqaruv texnik ogohlantirishlarini ekranga chiqarmaslik. */
.xovos-voice-command.warn,
.xovos-voice-command[data-insecure="1"],
.voice-command-warning,
[data-voice-secure-warning]{display:none!important}

/* ===== 1. HEADER — bir xil geometriya ===== */
.topbar{overflow:visible!important}
.topbar .topbar-inner{box-sizing:border-box!important;overflow:visible!important}
.topbar .brand,.topbar .brand-link{display:flex!important;align-items:center!important;gap:10px!important;min-width:0!important;text-decoration:none!important}
.topbar .brand>div,.topbar .brand-link>div{min-width:0!important}
.topbar .brand-title{font-size:var(--hl-brand-title-size,18px)!important;line-height:1.12!important;font-weight:800!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.topbar .brand-subtitle{font-size:var(--hl-brand-subtitle-size,12px)!important;line-height:1.15!important;margin-top:4px!important;white-space:nowrap!important;overflow:hidden!important;text-overflow:ellipsis!important}
.topbar .contact-card .muted{font-size:calc(var(--hl-contact-font-size,12px) * .78)!important;line-height:1.05!important;white-space:nowrap!important}
.topbar .contact-card .strong{font-size:var(--hl-contact-font-size,12px)!important;line-height:1.12!important;white-space:nowrap!important}
.topbar .weather-lang-inline{display:flex!important;align-items:center!important;justify-content:flex-end!important;gap:7px!important;min-width:0!important;white-space:nowrap!important}
.topbar .top-weather{min-width:0!important;white-space:nowrap!important}
.topbar .lang-wrap{flex:0 0 auto!important;white-space:nowrap!important}

@media (min-width:1041px){
  body .topbar .container.topbar-inner,
  body .topbar.topbar-banner-active .container.topbar-inner,
  body .topbar.banner-mode-strip .container.topbar-inner,
  body .topbar.banner-mode-background .container.topbar-inner{
    display:grid!important;
    grid-template-columns:minmax(250px,.9fr) minmax(250px,.72fr) minmax(500px,1.38fr)!important;
    grid-template-rows:1fr!important;
    align-items:center!important;
    gap:var(--hl-gap,14px)!important;
    width:min(calc(100% - 24px),var(--hl-max-width,1440px))!important;
    max-width:var(--hl-max-width,1440px)!important;
    height:var(--hl-header-height,108px)!important;
    min-height:var(--hl-header-height,108px)!important;
    max-height:none!important;
    padding:8px 0!important;
    margin-inline:auto!important;
  }
  body .topbar .topbar-inner>.brand,
  body .topbar .topbar-inner>.brand-link{
    grid-column:1!important;grid-row:1!important;
    align-self:center!important;justify-self:start!important;
    width:100%!important;max-width:100%!important;
  }
  body .topbar .topbar-inner>.xovos-header-center{
    grid-column:2!important;grid-row:1!important;
    min-width:0!important;width:100%!important;
    display:flex!important;align-items:center!important;justify-content:center!important;
    flex-wrap:nowrap!important;
    gap:clamp(5px,calc(var(--hl-gap,14px) * .55),14px)!important;
    overflow:visible!important;
  }
  body .topbar .xovos-header-center>.topbar-promo:not(.hidden){
    flex:0 1 var(--hl-banner-width,144px)!important;
    width:min(var(--hl-banner-width,144px),100%)!important;
    min-width:70px!important;
    height:var(--hl-banner-height,62px)!important;
    min-height:var(--hl-banner-height,62px)!important;
    max-height:var(--hl-banner-height,62px)!important;
  }
  body .topbar .xovos-header-center>.xovos-top-socials{
    flex:0 0 auto!important;min-width:max-content!important;
    padding:5px!important;border-radius:14px!important;
  }
  body .topbar .topbar-inner>.contact-items{
    grid-column:3!important;grid-row:1!important;
    display:grid!important;
    grid-template-columns:minmax(120px,.8fr) minmax(145px,.95fr) minmax(205px,1.25fr)!important;
    align-items:center!important;justify-items:stretch!important;
    gap:8px!important;width:100%!important;min-width:0!important;
    margin:0!important;overflow:visible!important;
  }
  body .topbar .contact-items>.contact-card{
    display:flex!important;align-items:center!important;gap:6px!important;
    min-width:0!important;padding:4px 5px!important;margin:0!important;
  }
  body .topbar .contact-items>.contact-card .icon-circle{width:28px!important;height:28px!important;min-width:28px!important;font-size:13px!important}
  body .topbar .contact-items>.weather-lang-inline{min-width:0!important;width:100%!important}
}

@media (min-width:1041px) and (max-width:1260px){
  body .topbar .container.topbar-inner,
  body .topbar.topbar-banner-active .container.topbar-inner,
  body .topbar.banner-mode-strip .container.topbar-inner,
  body .topbar.banner-mode-background .container.topbar-inner{
    grid-template-columns:minmax(215px,.82fr) minmax(205px,.66fr) minmax(440px,1.42fr)!important;
    gap:min(var(--hl-gap,14px),8px)!important;
  }
  .topbar .brand-title{font-size:min(var(--hl-brand-title-size,18px),16px)!important}
  .topbar .brand-subtitle{font-size:min(var(--hl-brand-subtitle-size,12px),10px)!important}
  body .topbar .topbar-inner>.contact-items{grid-template-columns:minmax(105px,.75fr) minmax(135px,.9fr) minmax(190px,1.15fr)!important;gap:4px!important}
  body .topbar .contact-card .muted{display:none!important}
  body .topbar .contact-card .strong{font-size:min(var(--hl-contact-font-size,12px),10.5px)!important}
}

/* Tablet/mobil: logo va ijtimoiy tarmoqlar tepada, kontaktlar tartibli ikkinchi qatorda. */
@media (max-width:1040px){
  body .topbar .container.topbar-inner{
    display:grid!important;
    grid-template-columns:minmax(0,1fr) auto!important;
    grid-template-rows:auto auto!important;
    align-items:center!important;
    gap:7px 8px!important;
    width:100%!important;max-width:none!important;
    height:auto!important;min-height:0!important;
    padding:var(--x56-mobile-header-pad,10px)!important;
  }
  body .topbar .topbar-inner>.brand,
  body .topbar .topbar-inner>.brand-link{
    grid-column:1!important;grid-row:1!important;order:initial!important;
    flex:initial!important;width:auto!important;min-width:0!important;
  }
  body .topbar .brand .logo,body .topbar #logoImg{width:var(--x56-mobile-logo,46px)!important;height:var(--x56-mobile-logo,46px)!important;min-width:var(--x56-mobile-logo,46px)!important}
  body .topbar .brand-title{font-size:var(--x56-mobile-brand-title,16px)!important;white-space:normal!important;display:-webkit-box!important;-webkit-line-clamp:2!important;-webkit-box-orient:vertical!important}
  body .topbar .brand-subtitle{font-size:10px!important}
  body .topbar .topbar-inner>.xovos-header-center{
    grid-column:2!important;grid-row:1!important;order:initial!important;
    display:flex!important;align-items:center!important;justify-content:flex-end!important;
    flex-wrap:nowrap!important;gap:5px!important;width:auto!important;min-width:0!important;
  }
  body .topbar .xovos-header-center>.topbar-promo:not(.hidden){width:66px!important;min-width:50px!important;max-width:76px!important;height:38px!important;min-height:38px!important;max-height:38px!important;flex:0 1 66px!important}
  body .topbar .xovos-header-center>.xovos-top-socials{padding:3px!important;gap:3px!important;background:transparent!important;border:0!important;box-shadow:none!important}
  body .topbar .xovos-top-social-link{width:var(--x56-mobile-social,32px)!important;height:var(--x56-mobile-social,32px)!important;min-width:var(--x56-mobile-social,32px)!important;max-width:var(--x56-mobile-social,32px)!important}
  body .topbar .topbar-inner>.contact-items{
    grid-column:1/-1!important;grid-row:2!important;order:initial!important;
    width:100%!important;min-width:0!important;display:flex!important;align-items:center!important;justify-content:center!important;
    gap:7px!important;flex-wrap:nowrap!important;overflow-x:auto!important;overflow-y:hidden!important;scrollbar-width:none!important;transform:none!important;margin:0!important;padding:0!important;
  }
  body .topbar .contact-items::-webkit-scrollbar{display:none!important}
  body .topbar .contact-items>.contact-card{flex:0 0 auto!important;padding:3px 5px!important}
  body .topbar .contact-items>.weather-lang-inline{flex:0 0 auto!important;width:auto!important}
}

@media (max-width:620px){
  body .topbar .container.topbar-inner{padding:7px!important;gap:5px!important}
  body .topbar .brand .logo,body .topbar #logoImg{width:min(var(--x56-mobile-logo,46px),42px)!important;height:min(var(--x56-mobile-logo,46px),42px)!important;min-width:min(var(--x56-mobile-logo,46px),42px)!important}
  body .topbar .brand-title{font-size:min(var(--x56-mobile-brand-title,16px),15px)!important}
  body .topbar .brand-subtitle{display:none!important}
  body .topbar .xovos-header-center>.topbar-promo:not(.hidden){width:46px!important;min-width:42px!important;height:32px!important;min-height:32px!important;max-height:32px!important;flex-basis:46px!important}
  body .topbar .xovos-top-social-link{width:min(var(--x56-mobile-social,32px),27px)!important;height:min(var(--x56-mobile-social,32px),27px)!important;min-width:min(var(--x56-mobile-social,32px),27px)!important;max-width:min(var(--x56-mobile-social,32px),27px)!important;border-radius:8px!important}
  body .topbar .xovos-top-social-link svg{width:17px!important;height:17px!important}
  body .topbar .contact-items>.contact-card .muted{display:none!important}
  body .topbar .contact-items>.contact-card .strong{font-size:10px!important}
  body .topbar .contact-items>.contact-card .icon-circle{display:none!important}
  body .topbar .weather-status{max-width:74px!important;overflow:hidden!important;text-overflow:ellipsis!important}
}

/* ===== 2. TEPA MENYU — barcha desktop sahifalarda bitta qator ===== */
@media (min-width:981px){
  body .mainnav{height:var(--xovos-nav-height,48px)!important;min-height:var(--xovos-nav-height,48px)!important;overflow:hidden!important}
  body .mainnav .container.nav-inner{
    display:flex!important;align-items:center!important;flex-wrap:nowrap!important;
    width:min(calc(100% - 16px),var(--xovos-nav-max-width,1920px))!important;max-width:var(--xovos-nav-max-width,1920px)!important;
    height:var(--xovos-nav-height,48px)!important;min-height:var(--xovos-nav-height,48px)!important;
    padding:0 6px 0 var(--xovos-nav-left-pad,8px)!important;gap:7px!important;overflow:hidden!important;
  }
  body .mainnav .nav-links{
    display:flex!important;align-items:center!important;justify-content:var(--xovos-nav-justify,flex-start)!important;
    flex:1 1 auto!important;min-width:0!important;width:auto!important;
    height:var(--xovos-nav-height,48px)!important;flex-wrap:nowrap!important;
    gap:var(--xovos-nav-gap,2px)!important;overflow-x:auto!important;overflow-y:hidden!important;
    scrollbar-width:none!important;transform:translateX(var(--xovos-nav-offset-x,0px))!important;
  }
  body .mainnav .nav-links::-webkit-scrollbar{display:none!important}
  body .mainnav .nav-links a{
    flex:0 0 auto!important;min-width:max-content!important;
    height:calc(var(--xovos-nav-height,48px) - 6px)!important;min-height:calc(var(--xovos-nav-height,48px) - 6px)!important;
    padding:0 var(--xovos-nav-pad-x,7px)!important;
    font-size:var(--xovos-nav-font,14px)!important;line-height:1!important;white-space:nowrap!important;
    display:inline-flex!important;align-items:center!important;justify-content:center!important;
  }
  body .mainnav .nav-actions{flex:0 0 auto!important;min-width:0!important;max-width:205px!important;overflow:hidden!important}
  body .mainnav .live-datetime{height:min(38px,calc(var(--xovos-nav-height,48px) - 6px))!important;min-height:0!important;max-width:100%!important;padding:5px 8px!important;font-size:10px!important;white-space:nowrap!important}
}
@media (min-width:981px) and (max-width:1220px){
  body .mainnav .nav-links a{font-size:min(var(--xovos-nav-font-tablet,13px),11.5px)!important;padding-inline:min(var(--xovos-nav-pad-x,7px),4px)!important}
  body .mainnav .nav-actions{max-width:138px!important}
  body .mainnav .live-date-text{display:none!important}
}

/* ===== 3. TAHLIL — yon bo'shliqsiz, dashboard to'liq ko'rinadi ===== */
@media (min-width:981px){
  body.overall-report-page .or-main{
    width:100%!important;max-width:none!important;margin:0!important;
    padding:var(--or-page-top,8px) max(4px,var(--or-page-right,8px)) 10px max(4px,var(--or-page-left,8px))!important;
    height:calc(100dvh - var(--or-shell-top,156px))!important;
  }
  body.overall-report-page .or-workspace{
    width:100%!important;max-width:none!important;height:100%!important;
    grid-template-columns:var(--or-active-sidebar-width,var(--or-sidebar-width,270px)) minmax(0,1fr)!important;
    gap:clamp(6px,var(--or-workspace-gap,10px),24px)!important;
  }
  body.overall-report-page .or-sidebar{width:100%!important;max-width:none!important;border-radius:17px!important;padding:min(var(--or-menu-padding,12px),11px)!important}
  body.overall-report-page .or-content{width:100%!important;max-width:none!important;min-width:0!important;padding:0 2px 0 0!important}
  body.overall-report-page .or-hero{margin:0 0 8px!important;border-radius:17px!important}
  body.overall-report-page .or-filter-panel{margin:0 0 8px!important}
  body.overall-report-page .or-dashboard-head{margin-bottom:8px!important}
  body.overall-report-page .or-executive,body.overall-report-page .or-kpis,body.overall-report-page .or-chart-grid{width:100%!important;max-width:none!important}
  body.overall-report-page .or-chart-grid{grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:9px!important}
  body.overall-report-page .or-card{min-width:0!important}
}
@media (min-width:981px) and (max-width:1280px){
  body.overall-report-page .or-workspace{grid-template-columns:var(--or-active-sidebar-width,var(--or-sidebar-width-compact,242px)) minmax(0,1fr)!important;gap:clamp(6px,var(--or-workspace-gap,10px),16px)!important}
  body.overall-report-page .or-tab{min-height:min(var(--or-menu-row-height,64px),58px)!important;grid-template-columns:21px 36px minmax(0,1fr) 10px!important;padding:6px!important;gap:6px!important}
  body.overall-report-page .or-side-visual{width:36px!important;height:36px!important}
  body.overall-report-page .or-tab-copy b{font-size:min(var(--or-menu-title-size,14px),12px)!important}
  body.overall-report-page .or-tab-copy small{font-size:min(var(--or-menu-subtitle-size,11px),9px)!important;-webkit-line-clamp:1!important}
}

@media (max-width:980px){
  body.overall-report-page .or-main{width:100%!important;margin:0!important;padding:8px!important}
  body.overall-report-page .or-workspace{width:100%!important;gap:8px!important}
  body.overall-report-page .or-sidebar,body.overall-report-page .or-content{width:100%!important;max-width:none!important}
}

@media print{
  .xovos-voice-command{display:none!important}
}
