.commentsTextArea{
    width: 100%
}

.top-right{
	float: right;
	text-align: right;
}

div {
  	word-wrap: break-word
}
/*this is used to display text with line breaks*/
.preformatted {
    white-space: pre-wrap;
}

.preformatted-col-header span{
    white-space: pre-wrap;
}

/* MatrixTable search functionality styles */
.matrix-table-search-container {
    padding-bottom: 15px;
    display: flex;
    align-items: center;
}

.matrix-table-search-input {
    flex: 1;
}

div.inline { float:left; }

div.header{
	text-align: center;
	font-weight: bold;
}

div.center{
    margin-top:auto;
    margin-bottom:auto;	
	text-align: center;
}

h1.center, h2.center, h3.center, h4.center, h5.center{
	text-align: center;
}

.reportDateContainer{
	float: left;
	text-align: left;
}

.reportDate {
	font-size: large;
	padding-right: 5px;
}
.sm-label-large{
	font-size: large;
	font-weight: bold;
}

.sm-value-large{
	font-size: large;
	text-align: right;
	width: 150px;
	display:inline-block;
}
/*daily report styles*/
.sm-badge {
  border-radius: 2px;
  padding: 0.25em 0.5rem;
  text-transform: uppercase;
  font-weight: 700;
  font-size: 11px;
  letter-spacing: 0.3px;
  white-space:nowrap;
}
.sm-badge.work_schedule {
  background: #C8E6C9 !important;
  color: #256029 !important;
}
.sm-badge.green {
  background: #C8E6C9;
  color: #256029;
}
.sm-badge.stand_by {
  background: #FFCDD2 !important;
  color: #C63737 !important;
}
.sm-badge.red {
  background: #FFCDD2;
  color: #C63737;
}
.sm-badge.extra_work {
  background: #FEEDAF !important;
  color: #8A5340 !important;
}
.sm-badge.orange {
  background: #FEEDAF;
  color: #8A5340;
}
.sm-badge.blue {
  background: #cdf0ff;
  color: #376ec6;
}

.persons{
	color: blue;
}

.equipment{
	color: #bead24;
}

.resources-type-col{
	width:37px;
	text-align: center;
}

.resources-identifier-col{
	width:100px;
}

.resources-name-col{
	width:150px;
}

.resources-description-col{
	width:150px;
}
.resources-quantity-col{
	width:60px;
}

body .ui-datatable .sm-borderless-table tbody,
body .ui-datatable .sm-borderless-table tbody td {
  border: none;
  border-collapse:collapse; 
}

body .ui-datatable tbody .sm-borderless-table tr{
  border: none;
  border-collapse:collapse;
}

body .ui-datatable .sm-borderless-table thead th{
  border: none;
  border-collapse:collapse;
  color: gray;	
}

body .ui-datatable tbody .sm-borderless-table th.col-align-right,
body .ui-datatable tbody .sm-borderless-table td.col-align-right{
  text-align: right;
}

body .ui-datatable tbody .sm-borderless-table th.col-align-left,
body .ui-datatable tbody .sm-borderless-table td.col-align-left{
  text-align: left;
}

.hidden-header .ui-datatable-header {
    display: none;
}

.light-paginator .ui-paginator {
    background-color: white;
    color: black;
    border: 1px dotted #bdbdbd;
    border-top: none;
}

body .light-paginator .ui-paginator > a {
    color: black;
}

body .light-paginator .ui-paginator .ui-paginator-pages a {
    color: black;
}

body .light-paginator .ui-paginator .ui-paginator-pages a.ui-state-active {
    color: #fff;
}

.light-rowgroup .ui-rowgroup-header {
    background-color: white;
    color: black;
    border: 1px dotted #bdbdbd;
}

.light-header .ui-datatable-header {
    background-color: white;
    color: black;
    border: 1px dotted #bdbdbd;
}

h1.weather-header{
	margin-top: 0px !important;
}

/*daily report styles - end*/

.ui-autocomplete.units input{
    width:50px;
}

.ui-calendar.daily-report-time input{
    width:45px;
}

.ui-datepicker-week-col{
    color: black;
    background-color: #F5F5F5;
}

td.progress-table-cell { width: 160px }

.nopadding{
	padding: 0 !important;
}

.comment-info{font: normal 10px/normal "Times New Roman", Times, serif;}

.progress-header{
	color: black;
	cursor: text;
}

.progress-box, body.layout-compact tbody td .progress-box {
	-webkit-border-radius: 5px;
	border-radius: 5px;
	min-width: 48px;
	width:auto;
	height:auto;
	display: flex;
	justify-content: center;
	color: black;
	cursor: text;
}

.counter-box{
	padding: 2px;
    border-radius: 40%;
    text-align: center;
    background-color: #E6EE9C;
}

.colour-0, .colour-5{
	background-color: rgba(235, 50, 25,0.9);
}
.colour-10, .colour-15{
	background-color: rgba(235, 90, 25,0.9);
}
.colour-20, .colour-25{
	background-color: rgba(235, 130, 25,0.9);
}
.colour-30, .colour-35{
	background-color: rgba(235, 170, 25,0.9);
}
.colour-40, .colour-45{
	background-color: rgba(235, 210, 25,0.9);
}
.colour-50, .colour-55{
	background-color: rgba(235, 250, 25,0.9);
}
.colour-60, .colour-65{
	background-color: rgba(240, 235, 25,0.9);
}
.colour-70, .colour-75{
	background-color: rgba(220, 235, 25,0.9);
}
.colour-80, .colour-85{
	background-color: rgba(180, 235, 25,0.9);
}
.colour-90, .colour-95{
	background-color: rgba(140, 235, 25,0.9);
}
.colour-100{
	background-color: rgba(0, 235, 25,0.9);
}

.blue{
	background-color: rgba(45, 195, 245,0.9);
}
/*STATUSES*/
tr.ui-state-highlight span[class*="status-"]{
	color: #ffffff;
}

.status-PENDING, .status-DRAFT {
	color: rgba(139, 132, 116);
	font-weight: bold;
}

.status-INPROGRESS {
	color: blue;
	font-weight: bold;
}

.status-ACCEPTED, .status-RELEASED {
	color: green;
	font-weight: bold;
}

.status-PARTIALLY_ACCEPTED {
	color: #83d509;
	font-weight: bold;
}

.status-REOPENED, .status-OUTDATED, .certificate-status-REJECTED {
	color: red;
	font-weight: bold;
}

.project-status-PENDING, .certificate-status-PENDING {
	color: rgba(139, 132, 116);
	font-weight: bold;
}

.project-status-ACTIVE, .certificate-status-ACCEPTED {
    color: green;
    font-weight: bold;
}

.project-status-SERVICE, .certificate-status-IN_PROGRESS {
    color: blue;
    font-weight: bold;
}

.project-status-CLOSED {
	color: rgba(128,128,128,0.6);
	font-weight: bold;
}

.date-PENDING1{
    --color1: rgba(128,128,128,0.6);
}

.date-PENDING2{
    --color2: rgba(128,128,128,0.6);
}

.date-INPROGRESS1{
    --color1: rgba(0,0,255,0.6);
}

.date-INPROGRESS2{
    --color2: rgba(0,0,255,0.6);
}

.date-ACCEPTED1{
    --color1: rgba(76,175,80,0.6);
}

.date-ACCEPTED2{
    --color2: rgba(76,175,80,0.6);
}

.date-PARTIALLY_ACCEPTED1 {
    --color1: rgba(131,213,9,0.6);
}

.date-PARTIALLY_ACCEPTED2 {
    --color2: rgba(131,213,9,0.6);
}

.date-REOPENED1{
    --color1: rgba(255,0,0,0.6);
}

.date-REOPENED2{
    --color2: rgba(255,0,0,0.6);
}

.date-colours{
	color: #ffffff;
	background: linear-gradient(to right, var(--color1,var(--color2, white)) 50%,var(--color2,var(--color1, white)) 50%);
}
/*date colours class for calendar component*/
td.date-colours{
	border: 1px;
	border-style: dotted;
}

/*date colours class for date picker component*/
span.date-colours{
	-webkit-border-radius: 50%;
	border-radius: 50%;
}

/*badges*/
/* Notification badge styles */
.notification-badge {
    position: absolute;
    top: -7px;
    right: -7px;
    background-color: #f44336;
    color: white;
    border-radius: 50%;
    font-size: 10px;
    font-weight: bold;
    line-height: 1;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.notification-badge-content {
    display: flex;
    align-items: center;
    width: 18px;
    height: 18px;
    justify-content: center;
}

.notification-bell-link {
    position: relative;
    display: inline-block;
}

.notification-bell-link i {
    position: relative;
}

.notification-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.notification-item {
    transition: background-color 0.2s, border-left-color 0.2s;
    border-bottom: 1px solid #ddd;
    padding: 10px;
    border-left: 5px solid transparent;
}

.notification-item:hover {
    background-color: #f5f5f5;
}

.notification-icon {
    font-size: 18px;
    color: #4a5568;
}

.notification-action {
    color: #666;
    text-decoration: none;
    padding: 5px;
    display: inline-block;
}

.notification-action:hover {
    color: #333;
}

.notification-item.notification-severity-HIGH {
    border-left-color: #e53935; /* deep red */
}
.notification-item.notification-severity-MEDIUM {
    border-left-color: #ffb300; /* amber */
}
.notification-item.notification-severity-LOW {
    border-left-color: #4caf50; /* green */
}

.notification-unread {
    background-color: #f7f9ff;
}

.notification-unread .notification-title {
    font-weight: 700;
    color: #111;
}

.notification-read .notification-title {
    font-weight: 600;
    color: #4a5568;
    opacity: 0.8;
}

.notification-unread .notification-icon {
    color: #111;
    opacity: 0.95;
}

.notification-read .notification-icon {
    color: #4a5568;
    opacity: 0.6;
}

.current-project-badge {   
    padding: 2px;
    text-align: center;
    background-color: #42a0ff;
	-webkit-border-radius: 6px;
	border-radius: 6px;
	justify-content: center;
	float:right;
  }

html.progress, html.progress * {
    cursor: progress !important;
}

.sm-list-even {
    background-color: #ffffff;
}
.sm-list-odd {
    background-color: #f4f4f4;
}
/*chart scroling*/
.chartWrapper {
 position: relative;
}

.chartWrapper > canvas {
  position: absolute;
  left: 0;
  top: 0;
  pointer-events: none;
}

.chartAreaWrapper {
  width: 100%;
  overflow-x: scroll;
}
.customChart{
	width:3600px;
}

/*planning groups*/
.sm-move-buttons-left{
	float: left;
}

.sm-move-buttons-right{
	float: right;
}

.sm-group-row{
	line-height: 20px;
}
.sm-group-row .sm-group-text{
	font-size: 16px;
}

.sm-table-row-footer{
	margin-top: .25rem;
	font-size: 0.7rem;
	font-style: italic;
	display: block;
	border-left: solid;
  	padding-left: .1rem;
  	border-left-color: rgba(66, 160, 255, 0.45);	
}
div.sm-table-toolbar{
    min-height: 42px;
}
.sm-group-row-expansion-content {
	padding-left: 20px;
	padding-right: 20px;
	padding-bottom: 20px;
}

.sm-activity-row-expansion {
    border-bottom: 1px dotted #bdbdbd !important;
    border-top: 1px dotted #bdbdbd !important;
}

.sm-disabled-as-normal.ui-state-disabled{
	opacity: 1;
}

body .ui-inputfield.ui-state-disabled, .ui-selectonemenu.ui-state-disabled {
	opacity: 0.8;
}

body .ui-inputtextarea {
    border: 1px solid #a6a6a6;
}

body .ui-inputtextarea.ui-state-focus {
    border: 1px solid #a6a6a6;
}

body .ui-menu.sm-accept-and-forwadrd{
	width: 21em;
}

/*progress compact*/
.sm-progress-compact-panel{
}
ul.sm-radials li.sm-radial {
  display:inline-block;
  float: left;
line-height:15px;
border-top: 2px solid gray;
}
.sm-available-units {
    width: 130px;
    min-height: 20px;
    list-style-type: none;
    margin: 0;
    padding: 0;
    float: left;
    margin-right: 10px;
}
.sm-radial-units{
    border: 1px solid #eee;
    width: 120px;
    min-height: 20px;
    list-style-type: none;
    margin: 0;
    padding: 5px 0 0 0;
    float: left;
    margin-right: 10px;
}

.sm-editable-row{
	height: 33px;
}

.sm-group-items {
    border: 1px solid #eee;
    width: 120px;
    min-height: 20px;
    list-style-type: none;
    margin: 0;
    padding: 5px 0 0 0;
    float: left;
    margin-right: 10px;
}

ul.sm-radial-units li.sm-radial-unit::before {
	content: "";
	border-left: 2px solid grey;
	padding-bottom: 10px;
	position: absolute;
	top: -20px;
	left: 29px;
	height: 10px;
	display: block;
	width: 2px;
}

li.sm-radial-unit {
	border-radius: 50%;
	display: inline-block;
	margin: 13px 20px 0 20px;
	width: 60px;
	height: 60px;
	background: #a2d674;
	position: relative;
	border: 2px solid grey;
}

li.sm-radial-unit-placeholder {
	border-radius: 50%;
	display: inline-block;
	margin: 13px 20px 0 20px;
	width: 60px;
	height: 60px;
	position: relative;
	border: 2px solid grey;
}

li.sm-placeholder {
	background: #c0c0c0;
}

div.circle {
	width: 40px;
	height: 40px;
	background: #fff;
	position: absolute;
	top: 8px;
	left: 8px;
	display: block;
	border: 2px solid gray;
	font-size: 11px;
	font-weight: bold;
	text-align: center;
	line-height: 41px;
	border-radius: 50%;
	display: inline-block;
	margin-right: 20px;
}
li.sm-available-unit {
    font-size: 11px;
    font-weight: bold;
	padding:3px;
	border-left:1px solid #eee;
	border-right:1px solid #eee;
	border-bottom:1px solid #eee;
}

.sm-radial-units {
  border:none !important;
}
ul#radials {
	background: url('../resources/images/acdc.png') center 0px no-repeat;
	background-clip: padding-box;
	overflow-x: visible;
	overflow-y: hidden;
	width: auto;
	float: left;
	padding: 50px 0 0 0;
	margin: 0;
	display: flex;
	position: relative;
}

ul#radials li.sm-radial::before{
  content:"";
  border-right:2px solid grey;
  padding-left: 52px;
line-height:14px;
}   
.sm-radial h4{

  line-height:21px;
  height:10px;
  margin:0 0 0 15px;
  padding:2px 0 10px 0;
}
#cutleft{
background:#fff;
height:5px;
display:flex;
padding-right:52px;
top:57px;
margin-top:-8px;
position:absolute;
}
#cutright{
background:#fff;
height:5px;
display:flex;
padding-right:76px;
top:57px;
right:0;
margin-top:-8px;
position:absolute;
}

.center-horizontally {
    display: flex;
    justify-content: center;
}

.registration-body {
    padding: 20px 20px;
}

li.availableunits{
font-size:16px;
padding:5px 2px;
}

/* .password-reset-panel{
    top: 50%;
    left: 50%;
    width:500px;
    height:440px;
    margin-top: -220px; set to a negative number 1/2 of your height
    margin-left: -250px; set to a negative number 1/2 of your width
} */

.password-reset-panel {
	width: 450px;
	min-height: 440px;
	padding: 0.3px
}

.confirm-registration-panel, .confirm-registration-fail-panel, .registration-success-panel {
    width: 450px;
    min-height: 340px;
    padding: 0.3px
}

.gray-bg {
    background: top left no-repeat #f7f7f7;
}

.session-expired-panel {
	width: 450px;
	min-height: 440px;
	padding: 0.3px
}

/* If menu item contains both icon and a long text, then text is moved below icon.
   Use this class to enforce text alignment right to the icon.
*/
body .ui-menu .ui-menu-list li.ui-menuitem .ui-menuitem-link.sm-menuitem-link-flex-row  {
    display: flex;
    flex-direction: row;
}

.flex-row {
    display: flex;
    flex-direction: row;
}

.flex-column {
    display: flex;
    flex-direction: column;
}

.justify-content-end {
    justify-content: end;
}

.align-items-end {
    align-items: end;
}

.mr-5px {
    margin-right: 5px;
}

.mb-0px, h3.mb-0px{
    margin-bottom: 0px;
}

.mb-5px {
    margin-bottom: 5px;
}

.mb-10px {
    margin-bottom: 10px;
}
/* 
---------------------------------------------------------------------------------
 ULTIMA AND PRIMEFACES LAYOUT fixes 
--------------------------------------------------------------------------------- 
 */

/*
TODO In selectcheckboxmenu with multiple=true arrow is to low. The same problem is in Omega theme and in next version of Omega will be fixed
(https://forum.primefaces.org/viewtopic.php?t=50972). We have to check if in ULTIMA this will be fixed too.
Fixed: in ultima version 1.1.4 it is look like its fixed.
*/
/* body .ui-selectcheckboxmenu-multiple .ui-selectcheckboxmenu-trigger .ui-icon { */
/*        top: auto; */
/* } */


/* allow wrapping of selected items in select checkbox menu, see #9 */
.ui-selectcheckboxmenu-token{
	white-space: normal;
}

.sm-datatable-header-light .ui-widget-header{
	background-color: #969696;
	color: #ffffff;
}
.sm-checkbox-column{
	width:25px;
}

.sm-checkbox-column div.ui-chkbox{
	margin: 0 auto;
	display: block;
}

.sm-checkbox-column.sm-select-ac-column{
	background-color: #42a0ff1c;
}

/* top menu*/
@media (min-width: 1025px) {
	
	.sm-top-menu-current-project{
		color: #ffffff;
		padding-right: 25px;
		padding-top: 10px;
		display:block;
	}

	.sm-top-menu-current-project .ui-selectonemenu .ui-selectonemenu-trigger .ui-icon{
		color: #ffffff;
	}	
	
	.sm-top-menu-current-project .ui-selectonemenu label.ui-selectonemenu-label{
		font-size: 14px;
	}
	.sm-top-menu-current-project  .ui-selectonemenu{
		width: 260px;
	}
	
	.sm-top-menu-current-project span{
		text-align: left;
		font-size: 16px;
		padding-right: 15px;
	}	
}

@media (max-width: 1024px) {

	
	.sm-top-menu-current-project  .ui-selectonemenu{
		width: 244px;
	}
	
	.sm-top-menu-current-project span{
		text-align: left;
		font-size: 16px;
		display: block;
		padding-bottom: 5px;
		padding-right: 15px;
		font-weight: bold;		
	}
}

.sm-top-menu-user-details{
	padding-left: 20px;
	
	padding-top: 5px;
	
	border-bottom-width: 1px;
	
	border-bottom-style: solid;
	
	padding-bottom: 5px;
	
	border-top-width: 1px;
	
	border-top-style: solid;
	
	border-color: #bdbdbd;
}
.sm-template-picklist.ui-picklist {
    height: 100%;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
}

.sm-template-picklist.ui-picklist .ui-picklist-list-wrapper {
    height: 100%;
}

.sm-template-picklist.ui-picklist .ui-picklist-list {
    height: calc(100% - 25px);
}

.sm-template-picklist.ui-picklist .ui-picklist-buttons {
    align-self: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.cell-ul, ul.cell-ul {
	padding:0;
	padding-left: 15px;
	margin:0;
	text-align: left;
}

.ui-datatable.workaround-for-squeezed-parent-row-in-mobile-view table {
    /* Default table-layout value set by Primefaces  */
    table-layout: fixed;
}

/* Styles for matrix table START */
.matrix-table-parent-row {
    font-weight: bold;
}
/* Styles for matrix table END */

/*classes used to hide html tags depends on screen size*/
@media screen and (max-width: 40em) {
	.ui-sm-nodisplay{
		display: none;
	}
}
@media screen and (min-width: 40.063em) {
	.ui-md-nodisplay{
		display: none;
	}	
}
@media screen and (min-width: 64.063em) {
	.ui-lg-nodisplay{
		display: none;
	}	
}
@media screen and (min-width: 90.063em) {
	.ui-xl-nodisplay{
		display: none;
	}	
}
/* Use this class on dialog in following way:
dialog buttons should be located in footer instead in dialog content,
following dialog properties should be
blockScroll="true"
fitViewport="true"

Take taskProgressRowEditDialog.xhtml as example.
*/
.sm-small-dialog{
	min-width: 40% !important;
}

.sm-medium-dialog{
	min-width: 75% !important;
}

.sm-large-dialog{
	width: 95% !important;
	height: 95% !important;
}

.sm-large-dialog .ui-dialog-content{
	overflow:auto;
	height: 90% !important;
}

.sm-full-height-dialog, .sm-full-height-dialog .ui-dialog-content {
    height: 100% !important;
}

.sm-report-template-edit-dialog.sm-price-edit-dialog .ui-dialog-content{
	height: calc(100% - 80px) !important;
}

.sm-price-edit-dialog .ui-dialog-content{
	overflow:auto;
	height: 90% !important;
}

@media screen and (max-width: 40em) {
	.sm-price-edit-dialog.sm-sm-dialog{
		width: 100% !important;
		height: 95% !important;
	}
}

@media screen and (min-width: 40.063em) {
	.sm-price-edit-dialog.sm-md-dialog{
		width: 100% !important;
		height: 95% !important;
	}
}

@media screen and (min-width: 64.063em) {
	.sm-price-edit-dialog.sm-lg-dialog{
		width: 80% !important;
	}
}
@media screen and (min-width: 90.063em) {
	.sm-price-edit-dialog.sm-xl-dialog{
		width: 60% !important;
	}
}

@media (min-width: 1300px) {
    .sm-responsive-panel {
        margin: 0 auto;
        max-width: 850px;
    }

    .sm-responsive-panel input, .sm-responsive-panel textarea {
        max-width: 750px;
    }
}

@media (min-width: 1000px) {
    .registration-panel {
        margin: 0 auto;
        max-width: 850px;
    }
}

/* Custom styles for the Timeline - START */
.vis-timeline {
    overflow: visible !important;
}

div.vis-tooltip {
    font-size: 12px;
    max-inline-size: 50%;
    white-space: normal;
}

div.work_schedule {
    border-color: #136e13 !important;     /* green */
    background-color: rgba(127, 191, 63, 0.4) !important;
}

div.extra_work {
    border-color: #cc8100 !important;     /* orange */
    background-color: rgba(233, 127, 21, 0.4) !important;
}
div.stand_by {
    border-color: #bd2828 !important;     /* red */
    background-color: rgba(233, 39, 21, 0.4) !important;
}

div.no_type {
    border-color: #1e5aa8 !important; /* deep blue */
    background-color: rgba(70, 130, 180, 0.4) !important; /* steel blue with transparency */
}

/* Custom styles for the Timeline - END */

/* Custom styles for the progress bar - START */
.progressbar {
    height: 5.5em;
    text-align: left;
    position: relative;
    border: 1px solid #ccc;
}

.progressbar-determinate .progressbar-value {
    margin: -1px;
    height: 100%;
    width: 0%;
    position: absolute;
    display: none;
    background-color: #b3ddff;
}

.progressbar-determinate .progressbar-label {
    text-align: center;
    height: 100%;
    width: 100%;
    position: absolute;
    display: none;
    font-weight: bold;
    font-size: 200%;
    text-align: center;
    padding: 25px;
}
/* Custom styles for the progress bar - END */

#topbar-items-form .sm-users-options-menu {
    width: 280px;
}

@media (max-width: 1024px) {
    .layout-wrapper .topbar .topbar-right .sm-topbar-items {
        width: 300px;
    }

    #topbar-items-form .sm-users-options-menu {
        width: 300px;
    }
}

.small-checkbox .ui-chkbox .ui-chkbox-box {
  width: 14px !important;
  height: 14px !important;
}

.small-checkbox .ui-chkbox .ui-chkbox-box .ui-chkbox-icon {
  font-size: 14px !important;
  margin-left: -2px !important;
  margin-top: -2px !important;
}

.sm-custom-checkbox {
  accent-color: #757575;
}

.progressProportioningHintTooltip table,
.progressProportioningHintTooltip td,
.progressProportioningHintTooltip th {
    border: 1px solid;
}

.progressProportioningHintTooltip table {
    border-collapse: collapse;
    text-align: center;
}

/* styles parent panel and children panel - START */
.sm-panel-parent.ui-panel {
    border: none;
    margin-bottom: 10px;
}

.sm-panel-parent.ui-panel > .ui-panel-titlebar {
    background: white;
    color: black;
    text-align: center;
    font-size: large;
    border: 1px solid #bdbdbd;
}

.sm-panel-parent.ui-panel > .ui-panel-content {
    padding: 0 !important;
}

.sm-panel-parent.ui-panel > .ui-panel-titlebar .ui-panel-titlebar-icon span {
    color: black;
}

.sm-panel-parent.light-colour div.ui-panel-titlebar {
    background: #f4f4f4;
    color: black;
    font-size: 15px;
}

.sm-panel-parent.small div.ui-panel-titlebar {
    background: white;
    color: black;
    font-size: 14px;
}

.sm-panel-child.ui-panel {
    border: none;
}

.sm-panel-child.ui-panel > .ui-panel-content {
    padding: 0 !important;
}

/* Certificate types admin: inset subcategory panels inside category */
.certificate-types-add-panel.ui-panel,
.certificate-types-scope-panel.ui-panel,
.certificate-types-category-panel.ui-panel,
.certificate-types-subcategory-panel.ui-panel {
    border: 1px solid #bdbdbd;
}

.certificate-types-add-panel.ui-panel > .ui-panel-content {
    padding: 0.75rem 1rem !important;
}

.certificate-types-add-panel.ui-panel > .ui-panel-titlebar {
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid #bdbdbd;
}

.certificate-types-scope-panel.sm-panel-parent.ui-panel > .ui-panel-titlebar {
    border: none;
    border-bottom: 1px solid #bdbdbd;
}

.certificate-types-category-panel.sm-panel-child.ui-panel > .ui-panel-titlebar {
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid #bdbdbd;
}

.certificate-types-subcategory-panel.sm-panel-child.ui-panel > .ui-panel-titlebar {
    border-left: none;
    border-right: none;
    border-top: none;
    border-bottom: 1px solid #bdbdbd;
}

.certificate-types-scope-panel.sm-panel-parent.ui-panel > .ui-panel-content {
    padding: 0.75rem 1rem !important;
}

.certificate-types-category-panel.sm-panel-child.ui-panel > .ui-panel-content {
    padding: 0.75rem 1rem !important;
}

.certificate-types-category-body .certificate-types-subcategory-nested {
    padding: 0.5rem 0 0 0;
}

.certificate-types-subcategory-panel.ui-panel > .ui-panel-content {
    padding: 0.5rem 0.75rem 0.75rem 0.75rem !important;
}

.certificate-types-subcategory-desc {
    margin-bottom: 0.5rem;
}

.sm-panel-child.ui-panel > .ui-panel-titlebar {
    text-align: center;
}

.sm-panel-parent.sm-activity-panel-parent.ui-panel > .ui-panel-content {
    border: 1px solid #bdbdbd;
}

.sm-estimated-time-inputfield{
    width: 70px;
    display: inline-block;
    text-align: center;
}

.sm-estimate-col {
    min-width: 120px;
}

td.sm-estimate-col .ui-cell-editor, td.ui-cell-editor-disabled.sm-estimate-col .sm-estimated-time-inputfield {
    text-align: right;
    display: inline-block;
    width: calc(100% - 32px);
    min-width: 70px;
}

td.sm-estimate-col.sm-estimate-col-full-width .ui-cell-editor {
    width: 100%;
    padding-right: 8px;
}
/* styles parent panel and children panel - END */

.sm-dashboard-panel.ui-panel {
    border: none;
}

.sm-dashboard-panel.ui-panel > .ui-panel-content {
    padding: 1rem;
    padding-top: .5rem;
    background-color: #efefef;
}

.sm-dashboard-panel.ui-panel > .ui-panel-titlebar {
    text-align: center;
    background-color: #efefef;
    color: #212121;
    font-size: 1.5rem;
    font-weight: bold;
    padding-top: 0.5rem !important;
}

.sticky-horizontally {
    /* Some ancient browsers/browsers versions do not support "position: sticky" - in that case stickiness will not be applied */
}

table.sticky-header thead {}

table.sticky-footer tfoot {}

body .ui-dialog .ui-dialog-buttonpane .align-left, body .ui-dialog .ui-dialog-footer .align-left {
    text-align: left !important;
}

.sm-panel-child.hide-panel-header div.ui-panel-titlebar {
    display: none;
}

body .ui-datalist.no-border .ui-widget-content {
    border: 0;
}

body .ui-datalist.no-top-padding .ui-widget-content {
    padding-top: 0;
}

@supports (position: sticky) or (position: -webkit-sticky) {
    .sticky-horizontally {
        /* Stick to the left */
        left: 0;
        position: -webkit-sticky;
        position: sticky;

        /* Displayed on top of other rows when scrolling */
        z-index: 3;
    }

    table.sticky-header thead {
        top: 0;

        position: -webkit-sticky;
        position: sticky;
    }

    table.sticky-footer tfoot {
        bottom: 0;

        position: -webkit-sticky;
        position: sticky;
    }

    th.sticky-horizontally, td.sticky-horizontally {
        background-color: inherit;
    }

    /* Reset border set in primefaces styles */
    body .ui-datatable table.contains-sticky-column thead th {
        border: none;
    }

    /* Reset border set in primefaces styles */
    body .ui-datatable table.contains-sticky-column tbody tr td {
        border: none;
    }

    table.contains-sticky-column {
        border-collapse: separate;
        border-spacing: 0;
    }

    table.contains-sticky-column thead th {
        border-bottom: 1px dotted #bdbdbd !important;
        border-right: 1px dotted #bdbdbd !important;
    }

    table.contains-sticky-column thead tr:first-child th {
        border-top: 1px dotted #bdbdbd !important;
    }

    table.contains-sticky-column tbody td {
        border-right: 1px dotted #bdbdbd !important;
    }

    table.contains-sticky-column tbody tr:last-child td {
        border-bottom: 1px dotted #bdbdbd !important;
    }

    table.contains-sticky-column thead th:first-child,
    table.contains-sticky-column tbody td:first-child {
      /* Apply a left border on the first <td> or <th> in a row */
      border-left: 1px dotted #bdbdbd !important;
    }

    table.contains-sticky-column thead th.ui-state-active, table.contains-sticky-column thead th.ui-state-highlight {
      /* Resets opacity to 1, so when table header is active (e.g user clicked on it to sort data), then anything beneath it is not visible) */
      background-color: rgba(255, 145, 36, 1);
      border-top-color: rgba(255, 145, 36, 1);
    }
}

.table-max-height-250px .ui-datatable-tablewrapper {
    max-height: 250px;
}

.grid.grid-border > div:not(.grid-no-border), .grid.grid-border > span:not(.grid-no-border) {
    border-top: 1px solid #e4e4e4;
    padding: 5px 0px 5px 0;
}

@media screen and (min-width: 768px) {
    .md\:top-5-deviations-col-width {
        width: 70px;
    }
}

@media screen and (min-width: 1660px) {
    .xxl\:col {
        flex-grow: 1;
        flex-basis: 0;
        padding: 0.5rem;
    }

    .xxl\:hidden {
        display: none !important;
    }

    .xxl\:block {
        display: block !important;
    }

    .xxl\:flex {
        display: flex !important;
    }

    .xxl\:col-4 {
        flex: 0 0 auto;
        padding: 0.5rem;
        width: 33.3333%;
    }

    .xxl\:col-6 {
        flex: 0 0 auto;
        padding: 0.5rem;
        width: 50%;
     }

    .xxl\:col-8 {
        flex: 0 0 auto;
        padding: 0.5rem;
        width: 66.6667%;
    }

     .xxl\:col-10 {
        flex: 0 0 auto;
        padding: 0.5rem;
        width: 83.3333%;
     }

     .xxl\:col-fixed {
        flex: 0 0 auto;
        padding: 0.5rem;
     }

    .xxl\:deviation-table-dashboard-col-width {
        width: 155px;
    }

    .grid.grid-border > div.xxl\:grid-border, .grid.grid-border > span.xxl\:grid-border {
        border-top: 1px solid #e4e4e4;
        padding: 5px 0px 5px 0;
    }

    .xxl\:dashboard-deviation-table-col-width {
        width: 155px;
    }
}

@media screen and (min-width: 1796px) {
    .hidden-1796pxmin {
        display: none !important;
    }

    .block-1796pxmin {
        display: block !important;
    }

    .top-5-external-deviations-grouping-col-width-1796pxmin {
        width: 625px;
    }

    .top-5-deviations-grouping-col-width-1796pxmin {
        width: 500px;
    }

    .top-5-deviations-col-width-1796pxmin {
        width: 125px;
    }

    .col-fixed-1796pxmin {
        flex: 0 0 auto;
        padding: 0.5rem;
    }

    .col-10-1796pxmin {
        flex: 0 0 auto;
        padding: 0.5rem;
        width: 83.3333%;
    }

    .flex-1796pxmin {
        display: flex !important;
    }

    .cost-grouping-col-width-1796pxmin {
        width: 500px;
    }

    .cost-external-grouping-col-width-1796pxmin {
        width: 625px;
    }

    .cost-col-width-1796pxmin {
        width: 125px;
    }
}

@media screen and (min-width: 2400px) {
    .xxxl\:col-6 {
        flex: 0 0 auto;
        padding: 0.5rem;
        width: 50% !important;
    }

    .xxxl\:ml-3 {
        margin-left: 1rem;
    }
}

@media screen and (min-width: 3000px) {
    .xxxxl\:col-6 {
        flex: 0 0 auto;
        padding: 0.5rem;
        width: 50% !important;
    }

    .xxxxl\:pl-8 {
        padding-left: 5rem !important;
    }
}

#block-overlay, #viewport-block-overlay {
    position: fixed !important;
    width: 100%;
    height: 100vh;
    z-index: 99999;
    display: none;
}

.center-vertically {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
}

/* Move title bar icons (e.g. minimize) to the left on all panels */
.ui-panel .ui-panel-titlebar-icon {
    float: left;
}

body .ui-button.sm-blue-btn {
    background-color: #0000ff;
}

body .ui-button.sm-blue-btn.ui-state-hover {
    background-color: #0000b3;
}

.sm-message {
    padding: 4px 8px;
    min-height: 20px;
    border-radius: 3px;
}

.sm-message.sm-message-info {
    background-color: #2196F3;
    border-color: #2196F3;
    color: #ffffff;
    font-weight: bold
}

.sm-message.sm-message-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #ffffff;
    font-weight: bold
}

.ui-overlaypanel.no-padding, .ui-overlaypanel.no-padding .ui-overlaypanel-content {
    padding: 0;
}

.sm-chip {
    align-items: center;
    display: inline-flex;
    justify-content: center;

    background-color: #d1d5db;

    border-radius: 9999px;

    padding: 0.1rem 0.5rem;
}

.sm-chip-content {
    margin-right: 0.25rem;
}

body .ui-datatable.sm-activities-table tbody tr td .ui-row-toggler {
    display: inline-flex;
    align-items: center;
    margin-left: 0.40rem;
    height: 100%;
    vertical-align: top;
}

body .ui-datatable.sm-activities-table thead th:first-child {
    border-left: none;
}

body .ui-datatable.sm-activities-table table, body .ui-datatable.sm-activities-table table tbody {
    height: 100%;
}

body .ui-datatable.sm-activities-table table tbody .activity-type {
    display: inline-block;
    width: 15px;
    padding: 0;
    height: 100%;
    border-radius: 0;
    vertical-align: top
}

body .ui-datatable.sm-activities-table table tbody .first-col {
    width: 60px !important;
    padding: 0 !important;
}

.billing-subcontractors-list .subcontractor {
    z-index: 3;
}

.billing-subcontractors-list .subcontractor.subcontractor-draggable:hover {
    cursor: grab;
}

.dragging-active {
    position: relative;
    width: 100%;
    height: 100%;
}

.draggable-indicator {
    display: none;
}

.dragging-active .draggable-indicator {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    color: #42a0ff;
    border: 1px solid #42a0ff;
    background-color: white;
    z-index: 2;
}

.dragging-active .content-to-hide-when-dragging-active {
    opacity: 0;
}

.reset-margin-except-bottom {
    margin-top: 0;
    margin-left: 0;
    margin-right: 0;
}

.weather-condition:not(:last-child) {
    border-bottom: 1px dotted #bdbdbd;
}

/*
    Primefaces by default does not show tooltip if commandLink is disabled. Following style forces display of tooltip.
    To make it work use it with pass through title attribute.
*/
.ui-state-disabled.forceShowTooltip{
    pointer-events: all;
}

@media screen and (max-width: 640px) {
    .ui-datatable.workaround-for-squeezed-parent-row-in-mobile-view table {
        /* Fixes issue with squeezed parent row of expanded row in mobile view */
        table-layout: auto;
    }

    body .ui-datatable.sm-activities-table table tbody .activity-type {
         height: 20px !important;
         width: 60px !important;
    }

    body .ui-datatable.sm-activities-table table tbody .first-col {
        width: 100% !important;
        text-align: left;
    }

    .ui-datatable-reflow.sm-activities-table .ui-datatable-data td.first-col .ui-column-title {
       display: none;
    }
}

#activityDetailsId.ui-dialog .ui-dialog-content {
    -moz-transform: none;
    -o-transform: none;
    -webkit-transform: none;
    transform: none;
}

td:not(:last-child) .ui-radiobutton ~ label {
    padding-right: .8em;
}

body .ui-radiobutton {
    margin-right: 0.2em;
}

.sm-spinner,
.sm-spinner:after {
  width: 1.8em;
  height: 1.8em;
  border-radius: 50%;
}

.sm-spinner {
  font-size: 10px;
  position: relative;
  text-indent: -9999em;
  border-top: 0.2em solid rgba(0,0,0, 0.2);
  border-right: 0.2em solid rgba(0,0,0, 0.2);
  border-bottom: 0.2em solid rgba(0,0,0, 0.2);
  border-left: 0.2em solid #000000;
  transform: translateZ(0);
  animation: sm-spinner-keyframes 1.1s infinite linear;
}

@keyframes sm-spinner-keyframes {
  0% {
    -webkit-transform: rotate(0deg);
    transform: rotate(0deg);
  }
  100% {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.ellipsify {
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
    max-width: 100%;
    display: inline-block;
}

.variantStatusFilterPanel .ui-selectcheckboxmenu-item[data-item-value="CONFIGURATION_NOT_COMPLETE"]::before {
    content: '-------------------------------------------------';
    display: block;
}

.without-selectall .ui-selectcheckboxmenu-header .ui-chkbox {
    display: none;
}

body .ui-datatable tbody tr.sm-row-even {
  background-color: #f4f4f4;
}

body .ui-datatable tbody tr.sm-row-odd {
  background-color: #fff;
}

.table-max-height-60vh .ui-datatable-tablewrapper {
    max-height: 60vh;
    overflow-y: scroll;
}

.autocomplete-full-width {
    width: 95%;
}

.autocomplete-full-width > ul {
    width: 100%;
}

.caret-color-transparent {
    caret-color: transparent;
}

.autocomplete-cursor-pointer > ul, .autocomplete-cursor-pointer input {
    cursor: pointer;
}

.overflow-visible, .overflow-visible .ui-dialog-content {
    overflow: visible;
}

/*
  Fix for stacking context issue inside dialog:
  The dialog body has a 'transform' property (or another property) that creates a new stacking context.
  This causes overlay elements (like overlayPanel) rendered inside the body to be visually trapped
  beneath the dialog's header and footer, even with high z-index.

  Applying 'transform: none' removes the stacking context,
  allowing overlays to properly render above other parts of the dialog.
*/
.ui-dialog.fix-stacking-context .ui-dialog-content {
    -moz-transform: none;
    -o-transform: none;
    -webkit-transform: none;
    transform: none;
}

.activity-details-dialog-deviation-tooltip {
    max-width: 1500px;
}

/* Hide default selected date style */
.week-picker-panel .ui-datepicker-current-day .ui-state-active {
    background: none !important;
    border-color: transparent !important;
    color: #000000 !important;
}

/* Week hover effect */
.week-picker-panel .ui-datepicker-calendar tr.week-hover td:not(.ui-datepicker-week-col) {
    background: #e8e8e8 !important;
    border-color: #e8e8e8!important;
    color: #000000 !important;
}

/* Make week number column clickable */
.week-picker-panel .ui-datepicker-week-col {
    cursor: pointer;
}
/* Certificates*/

.cert-utilities-panel {
display: grid;
    grid-template-columns: auto 1fr auto;   /* buttons take their natural width, legend takes the rest */
    align-items: center;
    gap: 1rem;
    margin-top: 10px;
    width: 100%;
}
.cert-buttons {
    display: flex;
    gap: .5rem;
}

.cert-buttons-right {
    display: flex;
    gap: .5rem;
    justify-self: end;
}

.cert-legend {
    display: flex;
    gap: 15px;
    font-size: 12px;
    align-items: center;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    justify-self: end;
}

.cert-date {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 4px;
}

.cert-legend .cert-date {
    width: 73px;
}

.cert-status-bar {
    display: inline-block;
    width: 5px;
    height: 22px;
    flex-shrink: 0;
}

.valid {
    background-color: green;
}

.near-expire {
    background-color: orange;
}

.expired {
    background-color: red;
}

/* ===== HSE Module - Custom CSS START =====*/
/* Global resets for this page */
.hse-container {
    color: #333;
    line-height: 1.6;
}

/* ---- Hero ---- */
.hse-hero-section {
    background: linear-gradient(120deg, #43a047 0%, #009688 100%);
    border-radius: 12px;
    padding: 2rem 2rem;
    margin-bottom: 1.5rem;
    color: #fff;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}
/* Decorative circles */
.hse-hero-section::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 300px;
    height: 300px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}
.hse-hero-section::after {
    content: '';
    position: absolute;
    bottom: -80px;
    right: 100px;
    width: 200px;
    height: 200px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 50%;
}

.hse-hero-section h2 {
    margin-top: 0;
    font-size: 2rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 1rem;
}
.hse-hero-section p {
    color: rgba(255,255,255,0.95);
    font-size: 1.1rem;
    line-height: 1.7;
    max-width: 800px;
}
.hse-hero-section strong {
    color: #fff;
    font-weight: 600;
}

/* ---- Hero icon column ---- */
.hse-hero-icon-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 100%;
    position: relative;
    z-index: 1;
}
.hse-hero-badge {
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255,255,255,0.3);
    border-radius: 50%;
    width: 80px;
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
.hse-hero-badge .pi {
    font-size: 2.5rem;
    color: #fff;
}
.hse-hero-badge.large {
    width: 120px;
    height: 120px;
    background: rgba(255,255,255,0.2);
    border: 2px solid rgba(255,255,255,0.5);
}
.hse-hero-badge.large .pi {
    font-size: 4rem;
}

/* ---- Feature list in Hero ---- */
.hse-feature-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.5rem;
}
.hse-feature-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    color: rgba(255,255,255,0.95);
    position: relative;
    padding-left: 20px;
    font-size: 1rem;
}
.hse-feature-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 10px;
    height: 10px;
    background-color: #81c784;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(129, 199, 132, 0.2);
}

/* ---- CTA banner ---- */
.hse-cta-banner {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #43a047;
    border-radius: 8px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.hse-cta-banner .hse-billing-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 1rem;
    text-align: left;
    max-width: 700px;
}

.hse-cta-btn {
    height: max-content !important;
}

.hse-cta-btn .ui-button-text {
    font-size: 1.2rem !important;
    padding: 0.8rem 3rem !important;
    font-weight: 600;
}

.hse-cta-btn-footer .ui-button-text {
    font-size: 1rem !important;
    padding: 0.5rem 2rem !important;
}

/* ---- Section Headers ---- */
.hse-section-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: .5rem;
    margin-top: 0;
    display: flex;
    align-items: center;
}

.hse-section-title-green {
    color: #2e7d32;
}

.hse-section-title .pi {
    color: #2e7d32;
    font-size: 1.5rem;
}

/* ---- Why cards ---- */
.hse-why-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.hse-why-card {
    background: #fff;
    border-radius: 10px;
    padding: 1rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-top: 4px solid #43a047;
    transition: transform 0.2s, box-shadow 0.2s;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.hse-why-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(0,0,0,0.12);
}
.hse-why-card .pi {
    font-size: 2rem;
    color: #2e7d32;
    margin-bottom: 1rem;
    background: #e8f5e9;
    padding: 10px;
    border-radius: 8px;
}
.hse-why-card span {
    font-size: 1.05rem;
    color: #444;
    font-weight: 500;
    line-height: 1.5;
}

/* ---- What happens list ---- */
.hse-info-section {
    background: #fff;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.hse-what-list {
    list-style: none;
    padding: 0;
    margin: 0.5rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0.5rem;
}
.hse-what-list li {
    background: #fff;
    padding: 0.8rem 1rem;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 500;
    color: #333;
}
.hse-what-list li .pi {
    color: #1976d2;
    font-size: 1.2rem;
}

/* ---- Pricing ---- */
.hse-pricing-container {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    margin-bottom: 1.5rem;
}
.hse-pricing-header {
    background: #f1f8e9;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dcedc8;
}
.hse-pricing-header h3 {
    margin: 0;
    color: #33691e;
    font-size: 1.3rem;
}
.hse-pricing-header span {
    font-size: .9rem;
}
.hse-pricing-body {
    padding: 1.5rem;
}
.hse-pricing-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    border-bottom: 1px solid #f0f0f0;
}
.hse-pricing-item:last-child {
    border-bottom: none;
}
.hse-pricing-item-label {
    font-size: 1rem;
    color: #444;
    flex: 1;
    padding-right: 1rem;
}
.hse-pricing-item-price {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2e7d32;
    background: #e8f5e9;
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .hse-pricing-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }
    .hse-pricing-item-label {
        padding-right: 0;
        margin-bottom: 0.25rem;
    }
    .hse-pricing-item-price {
        align-self: flex-start;
        white-space: normal;
        font-size: 1rem;
    }
}

.hse-subcontractor-box {
    background: #f8fbff;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 1rem;
    margin-top: 1.5rem;
}
.hse-subcontractor-title {
    color: #1565c0;
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
}

/* ---- Note box ---- */
.hse-note-box {
    background: #fff8e1;
    border-left: 4px solid #ffc107;
    border-radius: 4px;
    padding: 0.8rem 1rem;
    margin-top: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.hse-note-box .pi {
    color: #f57f17;
    font-size: 1.2rem;
    margin-top: 0.2rem;
}

/* ---- Footer CTA ---- */
.hse-footer-cta {
    text-align: center;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}
.hse-footer-cta h3 {
    margin-bottom: 1rem;
    color: #333;
}
.hse-footer-actions {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    align-items: center;
    flex-wrap: wrap;
}

/* ---- Enabled View Feature List ---- */
.hse-enabled-feature-list {
    list-style: none;
    padding: 0;
    margin: 0.75rem 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0.75rem;
}
.hse-enabled-feature-list li {
    background: #f9fbe7;
    padding: 1rem 1.25rem;
    border-radius: 8px;
    border: 1px solid #dcedc8;
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}
.hse-enabled-feature-list li .pi {
    color: #2e7d32;
    font-size: 1.3rem;
    flex-shrink: 0;
    margin-top: 0.15rem;
    background: #e8f5e9;
    padding: 7px;
    border-radius: 4px;
}
.hse-enabled-feature-title {
    font-weight: 600;
    color: #1b5e20;
    margin-bottom: 0.35rem;
    font-size: 1rem;
}
.hse-enabled-feature-desc {
    font-weight: 400;
    font-size: 0.9rem;
    color: #555;
    line-height: 1.5;
    margin: 0;
}
.hse-enabled-outro {
    font-size: 0.9rem;
}

/* ---- Enabled View Cards ---- */
.hse-quick-card {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 1.5rem;
    height: 100%;
    transition: all 0.2s;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}
.hse-quick-card:hover {
    border-color: #4caf50;
    box-shadow: 0 5px 15px rgba(76, 175, 80, 0.15);
    transform: translateY(-2px);
}
.hse-quick-card .hse-quick-card-icon {
    font-size: 2rem;
    color: #2e7d32;
    margin-bottom: 0.75rem;
    background: #e8f5e9;
    padding: 10px;
    border-radius: 8px;
    display: block;
}
.hse-quick-card h4 {
    margin: 0 0 0.8rem 0;
    color: #2e7d32;
    font-size: 1.1rem;
    font-weight: 600;
}
.hse-quick-card p {
    margin: 0;
    color: #666;
    font-size: 0.95rem;
    line-height: 1.5;
}

.hse-quick-card .hse-quick-card-arrow {
  transition: transform .15s ease, opacity .15s ease;
  opacity: .85;
}
.hse-quick-card:hover .hse-quick-card-arrow,
.hse-quick-card:focus .hse-quick-card-arrow {
  transform: translateX(4px);
  opacity: 1;
}


.hse-contact-link {
    color: #555;
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: background-color 0.2s;
}
.hse-contact-link:hover {
    background-color: #f5f5f5;
    color: #333;
}
.hse-status-badge {
    background-color: #4caf50;
    color: #fff;
    border-radius: 20px;
    padding: 0.25rem 1rem;
    font-size: 0.85rem;
    font-weight: 600;
    vertical-align: middle;
    margin-left: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* New utility classes to replace inline styles */
.hse-card-transparent {
    border: none !important;
    background: transparent !important;
    box-shadow: none !important;
}
.hse-text-muted {
    font-size: 1.1rem;
    color: #555;
    margin-top: -0.5rem;
}
.hse-mt-1-5 {
    margin-top: 1.5rem;
}
.hse-mt-1 {
    margin-top: 1rem;
}
.hse-mr-0-5 {
    margin-right: 0.5rem;
}
.hse-text-info {
    font-size: 1.05rem;
    color: #444;
}
.hse-pricing-org-label {
    color: #222;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}
.hse-pricing-note-text {
    font-size: 0.9rem;
    color: #5d4037;
    line-height: 1.5;
}
.hse-footer-contact-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.hse-footer-contact-text {
    color: #666;
}
.hse-envelope-icon-container {
    column-gap: 5px;
}
.hse-title-with-badge {
    display: flex;
    align-items: center;
}
.hse-status-details {
    font-size: 1.1rem;
    color: #555;
    font-weight: 400;
    text-transform: none;
    letter-spacing: normal;
    margin-left: 1rem;
}
.hse-welcome-box {
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1.5rem;
    border: 1px solid #e0e0e0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}
.hse-welcome-title {
    font-size: 1.1rem;
    color: #2e7d32;
    font-weight: 600;
    margin-top: 0;
    margin-bottom: 0.5rem;
}
.hse-welcome-intro {
    margin-bottom: 0;
    color: #444;
    font-size: 1.05rem;
}
.hse-billing-snapshot-header {
    background: #f5f5f5;
    border-bottom: 1px solid #e0e0e0;
}
.hse-billing-snapshot-title {
    color: #455a64;
}
.hse-billing-snapshot-body-box {
    background: #fafafa;
    padding: 1.5rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    border: 1px solid #e0e0e0;
}
.hse-billing-snapshot-icon {
    font-size: 1.5rem;
    color: #90a4ae;
}
.hse-billing-snapshot-placeholder {
    color: #666;
    font-size: 1.05rem;
}
.hse-disable-section {
    display: block;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
}
.hse-disable-note {
    color: #666;
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Missing utility classes */
.color-gray666 {
    color: #666 !important;
}
.color-gray555 {
    color: #555 !important;
}
.hse-mb-1-5 {
    margin-bottom: 1.5rem;
}
.hse-mt-0-5 {
    margin-top: 0.5rem;
}
.hse-text-info-small {
    font-size: 0.95rem;
    color: #555;
}
/* ===== HSE Module - Custom CSS END =====*/

/* ===== HSE Settings - Custom CSS START =====*/
.sm-alert {
    border-left: 4px solid;
    border-radius: 6px;
    padding: 1rem 1.25rem;
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.sm-alert-warning {
    background: #fff3cd;
    border-left-color: #ffc107;
    color: #856404;
}

.sm-alert-warning-icon {
    font-size: 1.1rem;
    color: #f57f17;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.sm-alert-info {
    background: #e3f2fd;
    border-left-color: #1976d2;
    color: #1a237e;
}

.sm-alert-info-icon {
    font-size: 1.1rem;
    color: #1976d2;
    flex-shrink: 0;
    margin-top: 0.2rem;
}

.hse-settings-panel-content {
    padding: 1rem 1.25rem;
}

.hse-settings-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    font-weight: 700;
    color: #546e7a;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 1px solid #e0e0e0;
}

.hse-settings-section-icon {
    color: #78909c;
}

.hse-settings-cert-column {
    padding: 0 0.75rem;
}

.hse-settings-cert-type-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.45rem 0.75rem;
    border-radius: 4px;
    margin-bottom: 0.6rem;
}

.hse-settings-cert-type-persons {
    background: #e8eaf6;
    color: #283593;
    border-left: 3px solid #3949ab;
}

.hse-settings-cert-type-equipment {
    background: #f8f3d1;
    color: #bead24;
    border-left: 3px solid #d4c017;
}

.hse-settings-cert-type-icon {
    font-size: 0.9rem;
}

.hse-settings-cert-list {
    padding-left: 0.25rem;
}

.hse-settings-category-header {
    font-size: 0.75rem;
    font-weight: 700;
    color: #546e7a;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
    padding-bottom: 0.2rem;
    border-bottom: 1px dotted #cfd8dc;
}

.hse-settings-subcategory-header {
    font-size: 0.8rem;
    font-weight: 600;
    color: #455a64;
    margin-top: 0.5rem;
    margin-bottom: 0.15rem;
}

.hse-settings-block-description {
    color: #607d8b;
    line-height: 1.35;
}

.sm-select-many-checkbox-description {
    font-size: inherit;
    color: #607d8b;
    line-height: 1.35;
    margin-top: 0.125rem;
}

.hse-settings-cert-item {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    padding: 0.25rem 0;
    font-size: 0.9rem;
    color: #37474f;
}

.hse-settings-cert-item-stack {
    align-items: flex-start;
}

.hse-settings-cert-item-text {
    flex: 1;
    min-width: 0;
}

.hse-settings-cert-description {
    font-size: 0.82rem;
    color: #607d8b;
    margin-top: 0.15rem;
    line-height: 1.35;
}

.hse-settings-cert-item-icon {
    color: #66bb6a;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.hse-settings-no-certs {
    font-style: italic;
    color: #9e9e9e;
    font-size: 0.88rem;
}

@media screen and (min-width: 768px) {
    .col-6-md {
        width: 50%;
    }
}

.hse-settings-org-panel.ui-panel {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08), 0 6px 16px rgba(0, 0, 0, 0.10);
}

.hse-settings-org-panel.ui-panel > .ui-panel-content {
    border: none;
}

/* Make the titlebar a stable flex row */
.hse-settings-org-panel.ui-panel > .ui-panel-titlebar {
  border: none;
  border-bottom: 1px solid #e0e0e0;

  display: flex !important;
  align-items: center;
  /* Space between the left group (icon+title) and the actions area */
}

/* Order the children so the icon is FIRST, then title, then actions */
.hse-settings-org-panel .ui-panel-titlebar .ui-panel-titlebar-icon {
  order: 1;
  margin-right: 1rem !important;     /* space between icon and title */
  position: static !important;
}

.hse-settings-org-panel .ui-panel-titlebar .ui-panel-title {
  order: 2;
  line-height: 1.5 !important;
  /* Keep a stable visual line; prevent wrapping under the icon */
  display: inline-flex;
  align-items: center;
  min-height: 1.5rem;       /* tune to your header height if needed */
}

/* Make sure actions are the last item in the row */
.hse-settings-org-panel .ui-panel-titlebar .ui-panel-actions {
  order: 3;
  margin-left: auto;   /* pushes actions to the right */
  /* Optional: prevent actions from shrinking so title stays aligned */
  flex: 0 0 auto;
}

.hse-settings-module-status-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-end;
    gap: 0.4rem;
}

.hse-settings-status-label {
    font-weight: 600;
    color: #495057;
    font-size: 0.875rem;
}

.hse-settings-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.hse-badge-enabled {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.hse-badge-disabled {
    background-color: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

.hse-badge-not-covered {
    background-color: #e9ecef;
    color: #6c757d;
    border: 1px solid #dee2e6;
}

.hse-coverage-dialog-content {
    padding: 0.5rem 0;
    line-height: 1.6;
}

.hse-coverage-dialog-content ul {
    margin: 0.5rem 0 1rem 0;
    padding-left: 1.5rem;
}

.hse-coverage-dialog-content li {
    margin-bottom: 0.4rem;
}

.hse-coverage-dialog-note {
    margin-top: 0.5rem;
}
/* ===== HSE Settings - Custom CSS END =====*/

/* hierarchical select one menu with indentation */
.hierarchical-select-one-menu-with-indentation .ui-selectonemenu-item-group {
    padding-left: 10px !important;
}

.hierarchical-select-one-menu-with-indentation .ui-selectonemenu-item {
    padding-left: 30px !important;
}

.hierarchical-select-one-menu-with-indentation .ui-selectonemenu-item.ui-state-disabled {
    padding-left: 20px !important;
    opacity: 0.7;
}

/* ===== Attachment Viewer Dialog =====*/

/* Attachment viewer: stretch content below titlebar — eliminates large blank strip under toolbar.
   Use .attachment-viewer-dialog (on p:dialog) because client id is not always #viewAttachmentDialog;
   e.g. nested in p:tabView it renders as certificatesTabView:viewAttachmentDialog. */
body .attachment-viewer-dialog.ui-dialog .ui-dialog-content {
    height: calc(100% - 40px) !important;
}

/* Attachment viewer context rows: one shared label column so ":" spacing and value start line up */
.attachment-viewer-attachment-context-panel.attachment-viewer-context-grid {
    display: grid;
    grid-template-columns: auto 1fr;
    column-gap: 0.35rem;
    row-gap: 0.25rem;
    align-items: center;
}

.attachment-viewer-context-grid-row {
    display: contents;
}

.attachment-viewer-context-value-cell {
    min-width: 0;
}

/* Space between internal status label value and accept/reject/forward icons (certificate viewer strip) */
.attachment-viewer-certificate-context-panel .attachment-viewer-certificate-context-value-pre-actions {
    margin-inline-end: 0.65rem;
}

/* Slightly larger accept / reject / forward icons in certificate viewer strip */
.attachment-viewer-certificate-context-panel .attachment-viewer-certificate-status-actions .ui-icon {
    font-size: 1.5rem;
    width: 1em;
    height: 1em;
}
.attachment-viewer-list-sidebar {
    width: 220px;
    min-width: 220px;
    overflow-y: auto;
    border-right: 1px solid #dee2e6;
    padding: 0.25rem;
    background: #f8f9fa;
}

body .attachment-viewer-dialog .attachment-viewer-list-sidebar .attachment-viewer-sidebar-thumbs-toggle,
body .attachment-viewer-dialog .attachment-viewer-list-sidebar .attachment-viewer-sidebar-thumbs-label {
    font-size: inherit !important;
    line-height: inherit !important;
    font-weight: inherit;
}

.attachment-viewer-sidebar-thumbs-toggle {
    flex-shrink: 0;
}

.attachment-viewer-sidebar-thumbs-label {
    margin-left: 0.35rem;
}

.attachment-viewer-list-thumb {
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    vertical-align: middle;
}

.attachment-viewer-list-sidebar-with-thumbs .attachment-viewer-list-thumb {
    width: 72px;
    height: 72px;
    margin-right: 0;
    margin-bottom: 0.35rem;
}

.attachment-viewer-list-sidebar-with-thumbs .attachment-viewer-list-item {
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.attachment-viewer-list-sidebar-with-thumbs .attachment-viewer-list-item-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 72px;
    height: 72px;
    margin-right: 0;
    margin-bottom: 0.35rem;
    flex-shrink: 0;
    box-sizing: border-box;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    background-color: #fff;
    font-size: 2.25rem;
    line-height: 1;
}

.attachment-viewer-list-sidebar-with-thumbs .attachment-viewer-list-item-name {
    width: 100%;
    white-space: normal;
    overflow: visible;
    text-overflow: unset;
    word-break: break-word;
    line-height: 1.25;
}

/* Thumbnail-mode placeholder tiles stay white; do not inherit light active text (would hide PDF etc. glyphs). */
body .attachment-viewer-list-sidebar-with-thumbs .attachment-viewer-list-item.ui-state-active .attachment-viewer-list-item-icon {
    color: #495057;
}

.attachment-viewer-list-item {
    display: flex;
    align-items: center;
    padding: 0.2rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none !important;
    color: #495057;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 2px;
    word-break: break-word;
}

/* Hover only when not selected — selection uses theme body .ui-state-active (accent highlight) */
.attachment-viewer-list-item:hover:not(.ui-state-active) {
    background-color: #e9ecef;
    color: #212529;
}

/* Match list emphasis; colors come from PrimeFaces / Ultima theme .ui-state-active */
body .attachment-viewer-list-item.ui-state-active {
    font-weight: 600;
}

/* Theme targets .ui-icon; FA icons need to follow accent text color */
body .attachment-viewer-list-item.ui-state-active .attachment-viewer-list-item-icon {
    color: inherit;
}

.attachment-viewer-list-item-icon {
    margin-right: 0.5rem;
    flex-shrink: 0;
}

attachment-viewer-list-item-name {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Per-row download in attachment viewer sidebar (multi-file list). */
body .attachment-viewer-dialog .attachment-viewer-list-row-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.35rem;
    margin-left: 0.25rem;
    text-decoration: none !important;
    color: #6c757d;
    align-self: center;
}
body .attachment-viewer-dialog .attachment-viewer-list-row-download:hover:not(.ui-state-disabled) {
    color: #212529;
    background-color: #e9ecef;
}

.attachment-viewer-dialog-footer-strip {
    flex-shrink: 0;
    border-top: 1px solid #dee2e6;
    background-color: #f8f9fa;
    padding: 0.2rem 0.35rem;
    margin-top: 0;
}

.attachment-viewer-footer-row {
    display: grid;
    /* Equal outer tracks split remaining footer width — middle intrinsic column lands at true horizontal center of dialog strip */
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: center;
    width: 100%;
    column-gap: 0.5rem;
    /* Same vertical footprint whether rotate/zoom is shown (~2.3em icons) or the slot is empty */
    min-height: 2rem;
}

/* Center column: paging + footer extensions single row; intrinsic width participates in footer-wide centering via grid row above */
.attachment-viewer-footer-middle {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.75rem;
    min-width: 0;
}

/* Right column begins immediately after the centered intrinsic column — rotate/zoom stay adjacent to paging */
.attachment-viewer-footer-right-tools {
    justify-self: stretch;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.attachment-viewer-footer-nav-cluster {
    max-width: 100%;
}

.attachment-viewer-footer-image-tools-slot {
    flex: 0 0 auto;
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Matches ~2.3em FA icons row so footer height aligns with toolbar when tools are absent */
    min-height: 2rem;
}

.attachment-viewer-footer-image-tools-slot-active {
    padding-left: 0.65rem;
    margin-left: 0.15rem;
    border-left: 1px solid #dee2e6;
}

.attachment-viewer-footer-image-tools {
    flex-wrap: nowrap !important;
}

.attachment-viewer-footer-left {
    justify-self: stretch;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.25rem 0.35rem;
    min-width: 0;
    overflow-x: auto;
    overflow-y: hidden;
}

.attachment-viewer-dialog-footer-strip .attachment-viewer-footer-left .ui-button {
    flex-shrink: 0;
}

.attachment-viewer-dialog-footer-strip .attachment-viewer-footer-left .ui-button-text {
    white-space: nowrap;
}

/* Below ~xlarge: footer collides — stack middle + tools row, downloads row underneath */
@media (max-width: 1080px) {
    .attachment-viewer-footer-row {
        row-gap: 0.4rem;
        grid-template-columns: 1fr;
        column-gap: 0;
    }
    .attachment-viewer-footer-middle {
        justify-self: center;
        flex-wrap: wrap;
        justify-content: center;
        order: -1;
        width: 100%;
    }
    .attachment-viewer-footer-right-tools {
        justify-self: center;
        justify-content: center;
        width: 100%;
        order: 0;
    }
    .attachment-viewer-footer-left {
        justify-self: stretch;
        justify-content: center;
        order: 1;
    }
}

.attachment-viewer-unsupported-panel {
    align-self: center;
    max-width: 28rem;
    width: 100%;
}

.attachment-viewer-nav-counter {
    display: inline-block;
    box-sizing: border-box;
    padding: 0 0.75rem;
    font-size: 0.875rem;
    color: #6c757d;
    min-width: 4.5rem;
    text-align: center;
}
/* ===== Attachment Viewer Dialog END =====*/

/* ===== Generic smFileUpload component (sumitComponents/smFileUpload.xhtml) ===== */

/* --- Drag-and-drop overlay (works both inside a container div and on a dialog root) --- */
.sm-file-upload-overlay {
    display: none;
    position: absolute;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    box-sizing: border-box;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    padding: 1.5rem;
    background: rgba(255, 255, 255, 0.92);
    border: 3px dashed rgba(33, 150, 243, 0.9);
    margin: 0;
    pointer-events: none;
}
.sm-file-upload-dragover .sm-file-upload-overlay {
    display: flex;
}
/* Full-page (body) mode: overlay pinned to the viewport */
body.sm-file-upload-dragover > .sm-file-upload-overlay {
    position: fixed;
    left: 0;
    top: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
}
/* Dialog-mode glow */
.ui-dialog.sm-file-upload-dragover {
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.75), 0 0 20px rgba(33, 150, 243, 0.3);
}
/* Non-dialog container-mode highlight */
.sm-file-upload-container.sm-file-upload-dragover {
    border-color: rgba(33, 150, 243, 0.9);
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.35);
}
.sm-file-upload-overlay-icon {
    font-size: 2rem;
    color: #1976d2;
    pointer-events: none;
}
.sm-file-upload-overlay-text {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1976d2;
    text-align: center;
    line-height: 1.4;
    max-width: 24rem;
    pointer-events: none;
}

/* --- Container (non-dialog mode) --- */
.sm-file-upload-container {
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    background: rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
    transition: border-color 0.15s, box-shadow 0.15s;
}

/* --- Upload row: grid so validation messages sit on row 2, below button + hint --- */
.sm-file-upload-row {
    display: grid;
    /*
     * Col1 = button, col2 = hint (tight), col3 = 1fr absorbs free space on row 1.
     * Without a flexible column, only “auto auto” track widths count and row 2 (1 / -1)
     * stays that narrow — the red validation bar looked “half width”.
     */
    grid-template-columns: auto max-content minmax(0, 1fr);
    align-items: center;
    column-gap: 0.5rem;
    /* No extra strip between row 1 and idle row 2; validation uses PF message margins */
    row-gap: 0;
    margin-bottom: 0;
    width: 100%;
}

/* Flatten PF wrapper so buttonbar, content, and hint share one grid (PF adds messages in .ui-fileupload-content) */
.sm-file-upload-pf.ui-fileupload {
    display: contents;
}
/* Grid placement: cannot use ">" — with display:contents, buttonbar/content stay DOM children of .ui-fileupload */
.sm-file-upload-row .ui-fileupload-buttonbar {
    grid-column: 1;
    grid-row: 1;
}
.sm-file-upload-row .ui-fileupload-content {
    grid-column: 1 / -1;
    grid-row: 2;
    align-self: stretch;
    justify-self: stretch;
    width: 100%;
    min-width: 0;
    max-width: none;
    box-sizing: border-box;
}
.sm-file-upload-row .sm-file-upload-hint {
    grid-column: 2;
    grid-row: 1;
    justify-self: start;
    text-align: left;
    /* Long hints wrap instead of blowing up max-content column */
    max-width: min(36rem, 100%);
    white-space: normal;
}

/* --- Compact PrimeFaces fileUpload inside the component (button only, no strip) --- */
.sm-file-upload-pf.ui-fileupload .ui-fileupload-buttonbar {
    padding: 0;
    margin: 0;
    background: transparent;
    border: 0 none;
    flex: 0 0 auto;
    display: flex;
    align-items: center;
}
.sm-file-upload-pf.ui-fileupload .ui-fileupload-content {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    border: 0 none;
    margin: 0;
    padding: 0;
    background: transparent;
    min-height: 0;
}

/* PF: .ui-messages and .ui-fileupload-files are siblings — stack and use full width */
.sm-file-upload-pf.ui-fileupload .ui-fileupload-content > .ui-messages.ui-fileupload-messages {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
}
.sm-file-upload-pf.ui-fileupload .ui-fileupload-content > .ui-messages.ui-fileupload-messages .ui-messages-error {
    display: flow-root;
    width: 100%;
    box-sizing: border-box;
}
.sm-file-upload-pf.ui-fileupload .ui-fileupload-content > .ui-messages.ui-fileupload-messages .ui-messages-error ul {
    display: block;
    width: auto;
    max-width: none;
    overflow: visible;
}
.sm-file-upload-pf.ui-fileupload .ui-fileupload-content > .ui-messages.ui-fileupload-messages .ui-messages-error-summary {
    word-break: break-word;
}
.sm-file-upload-pf.ui-fileupload .ui-fileupload-content > .ui-fileupload-files {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    flex: 0 0 auto;
    margin: 0;
    border-spacing: 0;
    border-collapse: collapse;
}
/* PF leaves an empty display:table + margins — hide until at least one queued file row exists */
.sm-file-upload-pf.ui-fileupload .ui-fileupload-files:not(:has(.ui-fileupload-row)) {
    display: none;
}

/* --- Drag-and-drop hint text next to the button --- */
.sm-file-upload-hint {
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    box-sizing: border-box;
    font-size: 12px;
    line-height: 1;
    color: #546e7a;
}
.sm-file-upload-hint span {
    line-height: 1;
}
/* ===== END smFileUpload component ===== */

/* ===== Shared attachment list (certificate dialog + inline rows in tables) ===== */
.edit-attachments {
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    /* Horizontal inset only — avoids extra space above the first row and below the last row of the list */
    padding: 0 1.25rem;
    background: rgba(0, 0, 0, 0.02);
    box-sizing: border-box;
}
/* Toolbar row with “Download all attachments” (title + button) */
.attachment-download-all-toolbar {
    margin-top: 0.2rem;
    margin-bottom: 0.2rem;
}
.edit-attachments .edit-attachment-datalist.ui-datalist {
    margin-top: 0;
    margin-bottom: 0;
}
.edit-attachments .edit-attachment-datalist .ui-datalist-content {
    padding: 0;
    border: 0 none;
    background: transparent;
}
.edit-attachment-datalist ul,
.edit-attachment-datalist.ui-datalist ul {
    list-style: none;
    margin: 0;
    padding: 0;
}
.edit-attachment-datalist li {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    /* Between rows only — slightly tighter than the original 0.4rem */
    padding: 0.3rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}
.edit-attachment-datalist li:last-child {
    border-bottom: none;
}
.edit-attachment-datalist {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    text-decoration: none;
    vertical-align: baseline;
    min-width: 0;
}
.edit-attachment-datalist {
    flex-shrink: 0;
    font-size: 1em;
}
.edit-attachments .p-datatable {
    margin-top: 0;
    margin-bottom: 0;
}
.edit-attachments .p-datatable {
    word-break: break-word;
}
/* ===== END shared attachment list ===== */