/* Shared company selector for finance + work; compact header left of the company logo. */
body .nw-global-business-toolbar{
  display:flex!important;
  align-items:center!important;
  gap:8px!important;
  min-width:0!important;
  box-sizing:border-box!important;
  color:#1a365f!important;
  font:800 11px/1.25 "Malgun Gothic","Noto Sans KR",sans-serif!important;
  white-space:nowrap!important;
}
body .nw-global-business-picker,
body .nw-global-business-month{
  display:flex!important;
  flex-direction:column!important;
  gap:3px!important;
  margin:0!important;
  min-width:0!important;
  font-size:10px!important;
  color:#526984!important;
}
body .nw-global-business-picker select,
body .nw-global-business-month input{
  min-height:34px!important;
  height:34px!important;
  border:1px solid #b8cae5!important;
  border-radius:8px!important;
  padding:4px 7px!important;
  box-sizing:border-box!important;
  background:#fff!important;
  color:#183e71!important;
  font:800 11px/1.15 "Malgun Gothic",sans-serif!important;
  box-shadow:none!important;
}
body .nw-global-business-picker select{max-width:175px!important;min-width:120px!important}
body .nw-global-business-month input{width:125px!important;min-width:125px!important}
body .nw-global-business-buttons{display:flex!important;align-items:flex-end!important;gap:5px!important;min-width:0!important}
body .nw-global-business-buttons>button{
  min-height:34px!important;
  padding:5px 7px!important;
  border:1px solid #cfdbed!important;
  border-radius:8px!important;
  background:#f0f5fd!important;
  color:#24539b!important;
  font:850 10px/1.2 "Malgun Gothic",sans-serif!important;
  cursor:pointer!important;
  white-space:nowrap!important;
}
body .nw-global-business-buttons>button:hover{background:#dceafb!important}
body .nw-global-business-buttons>button:focus-visible,
body .nw-global-business-picker select:focus-visible,
body .nw-global-business-month input:focus-visible{outline:2px solid #2563eb!important;outline-offset:2px!important}
@media(min-width:981px){
 body .app-shell .reference-header .header-start{
   visibility:visible!important;
   width:auto!important;
   min-width:0!important;
   max-width:min(660px,43vw)!important;
   overflow:visible!important;
   position:relative!important;
   z-index:76!important;
 }
 body .app-shell .reference-header .header-start #hamb{flex:0 0 auto!important}
 body #nwGlobalBusinessToolbar{
   max-width:min(620px,40vw)!important;
   overflow-x:auto!important;
   overscroll-behavior-x:contain!important;
   scrollbar-width:thin!important;
   padding:4px 2px!important;
 }
}
@media(max-width:980px){
 body #nwGlobalBusinessToolbar{
   width:100%!important;
   max-width:100%!important;
   overflow-x:auto!important;
   scrollbar-width:thin!important;
   -webkit-overflow-scrolling:touch!important;
   position:sticky!important;
   top:var(--system-top,0px)!important;
   z-index:78!important;
   padding:9px 11px!important;
   border-bottom:1px solid #cbd8eb!important;
   background:#f4f8ff!important;
   box-shadow:0 3px 8px rgba(29,63,107,.07)!important;
   gap:11px!important;
 }
 body #nwGlobalBusinessToolbar .nw-global-business-picker select{min-width:135px!important;max-width:200px!important}
 body #nwGlobalBusinessToolbar .nw-global-business-month input{width:123px!important}
 body #nwGlobalBusinessToolbar .nw-global-business-buttons button{min-height:39px!important}
}
body.nw-business-global-ready .nw-accounting-page .accounting-toolbar>label,
body.nw-business-global-ready .nw-accounting-page .accounting-toolbar>.acct-business-toolbar-actions,
body.nw-business-global-ready .nw-accounting-page .accounting-toolbar>button.acct-page-print,
body.nw-business-global-ready .nw-accounting-page .accounting-toolbar>[data-acct-quarter]{display:none!important}
body .nw-global-business-work-notice{
  background:#f1f7ff!important;
  color:#294e7b!important;
  border:1px solid #c5daf6!important;
  border-left:4px solid #3674ce!important;
  border-radius:10px!important;
  padding:12px 15px!important;
  font-size:12px!important;
  line-height:1.7!important;
  margin:0 0 15px!important;
}
body .nw-global-business-work-notice span{color:#855c12!important}
@media print{
 body #nwGlobalBusinessToolbar{display:none!important}
 body .nw-global-business-work-notice{display:none!important}
}
/* Mobile shell controls occupy their own flow rows; never cover company controls or the bottom dock. */
@media screen and (max-width:980px){
 html body #nwGlobalBusinessToolbar{
  position:relative!important;top:auto!important;z-index:auto!important;
  flex-wrap:wrap!important;overflow:visible!important;height:auto!important;
 }
 html body #nwSmartMatchLauncher.nw-sm-fixed-launch{
  position:relative!important;inset:auto!important;display:flex!important;
  width:calc(100% - 24px)!important;min-width:0!important;max-width:none!important;
  box-sizing:border-box!important;margin:12px 12px max(160px,calc(110px + var(--system-bottom,0px)),calc(110px + env(safe-area-inset-bottom,0px)))!important;
  z-index:auto!important;box-shadow:0 3px 10px rgba(20,54,117,.15)!important;
 }
}

/* Drawer bounds include native system bars; footer stays inside the usable viewport. */
@media screen and (max-width:980px){
 html body #nwEmergencyDrawer,html body #sidebar.sidebar{
  box-sizing:border-box!important;top:0!important;bottom:0!important;
  height:auto!important;max-height:100dvh!important;
  padding-bottom:calc(12px + max(var(--system-bottom,0px),env(safe-area-inset-bottom,0px)))!important;
  overflow:hidden!important;
 }
 html body #nwEmergencyDrawer .nw-drawer-head,
 html body #nwEmergencyDrawer .nw-drawer-foot,
 html body #sidebar .side-brand,html body #sidebar .side-foot{flex:0 0 auto!important}
 html body #nwEmergencyDrawer .nw-drawer-nav,html body #sidebar #nav{
  flex:1 1 auto!important;min-height:0!important;overflow-y:auto!important;
  overscroll-behavior-y:contain!important;
 }
}

/* Desktop and mobile share the same company control cards. */
@media screen{
 html body #nwGlobalBusinessToolbar{
  display:grid!important;grid-template-columns:repeat(4,minmax(0,1fr))!important;
  align-items:stretch!important;gap:9px!important;
  width:calc(100% - 24px)!important;max-width:calc(100% - 24px)!important;
  margin:8px 12px 10px!important;padding:14px 12px!important;
  border:1px solid #dce8f4!important;border-radius:20px!important;
  background:linear-gradient(135deg,#fff,#f1f8ff 60%,#edf9f6)!important;
  box-shadow:0 6px 20px rgba(40,75,115,.06)!important;
  white-space:normal!important;overflow:visible!important;
 }
 html body #nwGlobalBusinessToolbar .nw-global-business-buttons{display:contents!important}
 html body #nwGlobalBusinessToolbar .nw-global-business-picker{
  grid-column:1 / 3!important;grid-row:1!important;gap:5px!important;
 }
 html body #nwGlobalBusinessToolbar .nw-global-business-month{
  grid-column:3 / 5!important;grid-row:1!important;gap:5px!important;
 }
 html body #nwGlobalBusinessToolbar label>span{font-size:11px!important;color:#5d738e!important;padding-left:3px}
 html body #nwGlobalBusinessToolbar .nw-global-business-picker select,
 html body #nwGlobalBusinessToolbar .nw-global-business-month input{
  width:100%!important;min-width:0!important;max-width:100%!important;
  height:42px!important;min-height:42px!important;padding:8px!important;
  border:1px solid #d6e4f2!important;border-radius:12px!important;
  background:#fff!important;color:#284764!important;font-size:12px!important;
 }
 html body #nwGlobalBusinessToolbar .nw-global-business-buttons>button{
  --ci-start:#4398ff;--ci-end:#4265df;--ci-tint:#eef5ff;
  grid-row:2!important;display:flex!important;flex-direction:column!important;
  align-items:center!important;justify-content:center!important;gap:8px!important;
  width:100%!important;min-width:0!important;min-height:90px!important;
  margin:2px 0 0!important;padding:10px 3px!important;
  border:1px solid #e0e9f2!important;border-radius:15px!important;
  background:linear-gradient(150deg,#fff,var(--ci-tint))!important;
  color:#314766!important;font-size:11px!important;font-weight:800!important;
  white-space:normal!important;line-height:1.3!important;word-break:keep-all!important;
  box-shadow:0 3px 10px rgba(44,70,104,.04)!important;touch-action:manipulation!important;
 }
 html body #nwGlobalBusinessToolbar .nw-global-business-buttons>button::before{
  content:'🏢';display:flex;align-items:center;justify-content:center;
  width:40px;height:40px;flex:0 0 40px;border-radius:12px;
  background:linear-gradient(140deg,var(--ci-start),var(--ci-end));
  font-size:25px;line-height:1;box-shadow:0 5px 11px rgba(42,75,116,.16),inset 0 1px 0 rgba(255,255,255,.3);
 }
 html body #nwGlobalBusinessToolbar button[data-nwb-action=manage]{--ci-start:#40ceb7;--ci-end:#18a58e;--ci-tint:#edfbf6}
 html body #nwGlobalBusinessToolbar button[data-nwb-action=manage]::before{content:'⚙️'}
 html body #nwGlobalBusinessToolbar button[data-nwb-action=hometax]{--ci-start:#aa8cf1;--ci-end:#7750d3;--ci-tint:#f6f1ff}
 html body #nwGlobalBusinessToolbar button[data-nwb-action=hometax]::before{content:'🔐'}
 html body #nwGlobalBusinessToolbar button[data-nwb-action=print]{--ci-start:#ffc168;--ci-end:#ee9234;--ci-tint:#fff8ec}
 html body #nwGlobalBusinessToolbar button[data-nwb-action=print]::before{content:'🖨️'}
 html body #nwGlobalBusinessToolbar .nw-global-business-buttons>button:active{transform:scale(.97)}
 html body #nwGlobalBusinessToolbar .nw-global-business-buttons>button:focus-visible{outline:3px solid #99c3f7!important;outline-offset:2px!important}
}

/* Align the company cards with the full-width primary navigation beneath them. */
@media screen and (min-width:981px){
 html body #nwGlobalBusinessToolbar{
  position:relative!important;top:auto!important;z-index:auto!important;
  width:calc(100% - 16px)!important;max-width:none!important;
  margin:8px 8px 12px!important;padding:14px!important;
  gap:10px!important;border-radius:20px!important;
 }
 html body #nwGlobalBusinessToolbar .nw-global-business-buttons>button{
  min-height:108px!important;margin:0!important;border-radius:15px!important;
  font-size:12px!important;
 }
 html body #nwGlobalBusinessToolbar .nw-global-business-buttons>button::before{
  width:48px!important;height:48px!important;flex-basis:48px!important;
  border-radius:14px!important;font-size:29px!important;
 }
}



/* Report periods remain visible independently of the removed company toolbar. */
@media screen{
 html body .nw-accounting-page .accounting-toolbar>.acct-report-period{display:flex!important;align-items:center;flex-wrap:wrap;gap:10px;padding:4px 0;min-width:0;max-width:100%}
 html body .acct-report-period>label{display:flex!important;align-items:center;gap:7px;font-size:12px;font-weight:700;color:#526984}
 html body .acct-report-period :is(select,input){min-height:38px;max-width:170px;padding:7px 10px;border:1px solid #ccdcef;border-radius:9px;background:#fff;color:#26466b}
 html body .acct-report-period .acct-quarter-buttons{display:flex!important;gap:5px;flex-wrap:wrap}
 html body .acct-report-period .acct-quarter-buttons button{min-height:36px;padding:7px 12px;border:1px solid #d5e3f1;border-radius:8px;background:#fff;color:#486582}
 html body .acct-report-period .acct-quarter-buttons button.active{background:#eaf3ff;color:#1766be;border-color:#8db9ed}
 html body .acct-report-period .acct-period-label{font-size:13px;color:#1766be;padding:7px 11px;border-radius:8px;background:#f0f6ff}
}
@media print{.acct-report-period{display:none!important}}
