/* 2.24: master refresh, strict sticky header, compact scale and clear actions. */
body.wlcrm-page :is(#page,#content,.site-content,.content-area,.entry-content,.elementor,.elementor-section,.elementor-container,.elementor-column,.elementor-widget,.elementor-widget-container,.e-con,.e-con-inner){overflow:visible!important}
body #wlcrm-app.wlcrm-app{font-size:11.7px!important}

/* Four deliberate header tracks: brand, attendance, master refresh, account. */
@media(min-width:1200px){
  body .wlcrm-app .wlcrm-header{grid-template-columns:226px minmax(620px,1fr) 44px 148px!important;column-gap:10px!important;min-height:70px!important;padding:7px 10px!important}
  body .wlcrm-app .wlcrm-brand-area{gap:8px!important}
  body .wlcrm-app .wlcrm-company-logo{width:101px!important;height:57px!important}
  body .wlcrm-app .wlcrm-pi-link{height:32px!important;padding:0 12px!important}
  body .wlcrm-app .wlcrm-attendance{grid-template-columns:minmax(58px,.75fr) 90px 66px repeat(3,minmax(58px,.75fr)) repeat(4,40px)!important;min-height:51px!important}
  body .wlcrm-app .wlcrm-attendance-top{min-width:0!important}
  body .wlcrm-app #wlcrm-att-name{overflow:hidden!important;text-overflow:ellipsis!important;white-space:nowrap!important}
  body .wlcrm-app .wlcrm-att-buttons button{min-height:27px!important}
}

body .wlcrm-app .wlcrm-master-refresh{align-self:center!important;justify-self:center!important;width:40px!important;height:40px!important;min-width:40px!important;padding:0!important;border:1px solid #b9d7ef!important;border-radius:12px!important;background:linear-gradient(145deg,#eaf7ff,#dceeff)!important;color:#0875b9!important;box-shadow:0 4px 12px rgba(11,111,174,.13)!important;display:inline-flex!important;align-items:center!important;justify-content:center!important;cursor:pointer!important;transition:transform .18s ease,box-shadow .18s ease,background .18s ease!important}
body .wlcrm-app .wlcrm-master-refresh span{font-size:23px!important;line-height:1!important;font-weight:700!important}
body .wlcrm-app .wlcrm-master-refresh b{position:absolute!important;width:1px!important;height:1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important}
body .wlcrm-app .wlcrm-master-refresh:hover{transform:translateY(-1px)!important;background:linear-gradient(145deg,#dff4ff,#cfe9fb)!important;box-shadow:0 6px 16px rgba(11,111,174,.2)!important}
body .wlcrm-app .wlcrm-master-refresh.is-refreshing span{animation:wlcrm-master-spin .72s linear infinite}
body .wlcrm-app .wlcrm-master-refresh.is-complete{background:#e4f8ee!important;border-color:#9ed8bb!important;color:#087a4c!important}
@keyframes wlcrm-master-spin{to{transform:rotate(360deg)}}

/* Fixed-mode fallback makes the header genuinely persistent across theme wrappers. */
body .wlcrm-app .wlcrm-header-marker{height:0!important;width:100%!important}
body .wlcrm-app .wlcrm-header-spacer{height:0;transition:none!important}
body .wlcrm-app .wlcrm-header.wlcrm-header-fixed{position:fixed!important;left:var(--wlcrm-fixed-left)!important;top:var(--wlcrm-fixed-top)!important;width:var(--wlcrm-fixed-width)!important;z-index:100100!important;margin:0!important;border-radius:0 0 12px 12px!important}

/* Approximately ten percent denser without browser zoom or distorted content. */
body .wlcrm-app :is(input,select,textarea,button){font-size:11px!important}
body .wlcrm-app :is(input:not([type="checkbox"]):not([type="radio"]),select){min-height:32px!important}
body .wlcrm-app .wlcrm-tabs{padding:6px 10px!important;gap:7px!important}
body .wlcrm-app .wlcrm-tabs button{min-height:49px!important;padding:6px 8px!important;font-size:10.5px!important}
body .wlcrm-app .wlcrm-panel{padding:12px!important}
body .wlcrm-app .wlcrm-table-wrap table{font-size:10.8px!important}
body .wlcrm-app .wlcrm-table-wrap :is(th,td){padding-top:7px!important;padding-bottom:7px!important}

/* Keep the complete follow-up action set readable and inside its own column. */
body .wlcrm-app .wlcrm-followup-table{overflow-x:auto!important;overflow-y:visible!important}
body .wlcrm-app .wlcrm-followup-table table{min-width:1280px!important;table-layout:fixed!important}
body .wlcrm-app .wlcrm-followup-table :is(th,td):last-child{width:220px!important;min-width:220px!important;overflow:visible!important}
body .wlcrm-app .wlcrm-followup-table td:last-child .wlcrm-followup-actions{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:5px!important;width:100%!important}
body .wlcrm-app .wlcrm-followup-table td:last-child button{width:100%!important;min-width:0!important;min-height:29px!important;padding:4px 5px!important;font-size:10px!important;font-weight:700!important;white-space:nowrap!important}
body .wlcrm-app .wlcrm-records-table .col-actions,body .wlcrm-app .wlcrm-records-table td:last-child{min-width:180px!important;width:180px!important}
body .wlcrm-app .wlcrm-records-table td.row-actions{overflow:visible!important}
body .wlcrm-app .wlcrm-record-actions{grid-template-columns:repeat(2,minmax(0,1fr))!important;width:100%!important;gap:5px!important}
body .wlcrm-app .wlcrm-record-actions>button{min-height:29px!important;font-size:9.5px!important;white-space:nowrap!important}

@media(max-width:1199px){
  body .wlcrm-app .wlcrm-master-refresh{width:38px!important;height:38px!important;min-width:38px!important}
}
@media(min-width:768px) and (max-width:1199px){
  body .wlcrm-app .wlcrm-header{grid-template-columns:minmax(0,1fr) 40px 148px!important}
  body .wlcrm-app .wlcrm-header>.wlcrm-brand-area{grid-column:1!important;grid-row:1!important}
  body .wlcrm-app .wlcrm-master-refresh{grid-column:2!important;grid-row:1!important}
  body .wlcrm-app .wlcrm-header>.wlcrm-user{grid-column:3!important;grid-row:1!important;width:148px!important;max-width:148px!important}
  body .wlcrm-app .wlcrm-header>.wlcrm-attendance{grid-column:1/-1!important;grid-row:2!important}
}
@media(max-width:767px){
  body .wlcrm-app .wlcrm-header{grid-template-columns:minmax(0,1fr) 40px auto!important}
  body .wlcrm-app .wlcrm-brand-area{grid-column:1!important}
  body .wlcrm-app .wlcrm-master-refresh{grid-column:2!important;grid-row:1!important}
  body .wlcrm-app .wlcrm-user{grid-column:3!important;grid-row:1!important}
  body .wlcrm-app .wlcrm-attendance{grid-column:1/-1!important;grid-row:2!important}
}
