#dialog_worktime {
	overflow: hidden;
	padding: 5px;
	--worktime-accent-color: var(--gs-accent-color-1, #2B82D4);
}

.ui-dialog:has(> #dialog_worktime) .ui-dialog-title:before,
.ui-dialog:has(> #dialog_worktime_driver_settings) .ui-dialog-title:before,
.ui-dialog:has(> #dialog_worktime_day_edit) .ui-dialog-title:before,
.ui-dialog:has(> #dialog_worktime_driver_report) .ui-dialog-title:before {
	content: "";
	display: inline-block;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	background-image: url("images/time.svg");
	background-position: center center;
	background-repeat: no-repeat;
	background-size: 16px 16px;
	filter: brightness(0) invert(1);
}

.worktime-month-layout {
	display: flex;
	flex-direction: column;
	height: 100%;
	min-height: 0;
	background: #fff;
	color: #333;
}

.worktime-month-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	border-bottom: 1px solid #d8d8d8;
	box-sizing: border-box;
	background: #fff;
}

.worktime-driver-name {
	font-size: 18px;
	font-weight: bold;
	line-height: 1.25;
}

.worktime-week-range {
	margin-top: 2px;
	color: #777;
}

.worktime-month-actions {
	display: flex;
	align-items: center;
	gap: 6px;
}

.worktime-month-caption {
	margin-right: 6px;
	color: #555;
	font-size: 15px;
	font-weight: bold;
	line-height: 28px;
	white-space: nowrap;
}

.worktime-week-button {
	min-width: 28px;
	width: 28px;
	padding-left: 0;
	padding-right: 0;
}

.worktime-export-all {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	height: 28px;
	margin-left: 4px;
	padding: 0 9px;
	box-sizing: border-box;
}

.worktime-export-all img {
	width: 13px;
	height: 13px;
}

.worktime-empty {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	color: #777;
}

.worktime-month-grid {
	flex: 1;
	min-height: 0;
	overflow: auto;
	padding: 10px 12px 12px;
	box-sizing: border-box;
	background: #fff;
}

.worktime-month-table {
	width: 100%;
	min-width: 1120px;
	border-collapse: separate;
	border-spacing: 3px 5px;
	table-layout: fixed;
	background: #fff;
}

.worktime-month-table th {
	background: var(--worktime-accent-color);
	color: #fff;
	font-weight: bold;
	text-align: center;
	white-space: nowrap;
}

.worktime-driver-head {
	width: 190px;
	padding: 6px 8px;
	text-align: left !important;
}

.worktime-driver-head-inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	height: 22px;
}

.worktime-driver-head-inner span {
	display: block;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.worktime-driver-search-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	padding: 0;
	border: 1px solid rgba(255,255,255,0.25);
	box-sizing: border-box;
	background: rgba(255,255,255,0.12);
	cursor: pointer;
}

.worktime-driver-search-button:hover {
	background: rgba(255,255,255,0.25);
}

.worktime-driver-search-button img {
	width: 12px;
	height: 12px;
	filter: brightness(0) invert(1);
}

.worktime-driver-search-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 22px;
	box-sizing: border-box;
	font-size: 11px;
}

.worktime-day-head {
	width: 28px;
	height: 22px;
	padding: 0;
	font-size: 11px;
	line-height: 22px;
}

.worktime-report-head {
	width: 56px;
	padding: 0;
}

.worktime-driver-cell {
	position: sticky;
	left: 0;
	z-index: 2;
	height: 26px;
	padding: 0 7px;
	background: #f1f1f1 !important;
	color: #333 !important;
	border: 1px solid #d7d7d7;
	box-sizing: border-box;
	text-align: left !important;
	overflow: hidden;
	line-height: 24px;
}

.worktime-driver-cell span {
	display: inline-block;
	max-width: calc(100% - 28px);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	vertical-align: middle;
}

.worktime-driver-edit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	float: right;
	width: 20px;
	height: 20px;
	padding: 0;
	flex: 0 0 auto;
	border: 1px solid transparent;
	box-sizing: border-box;
	background: transparent;
	cursor: pointer;
}

.worktime-driver-edit:hover {
	border-color: #c9c9c9;
	background: #fff;
}

.worktime-driver-edit img {
	width: 13px;
	height: 13px;
}

.worktime-month-cell {
	height: 26px;
	padding: 0;
	box-sizing: border-box;
	border: 1px solid #d7d7d7;
	background: #d0d0d0;
	color: #222;
	text-align: center;
	font-size: 10px;
	line-height: 24px;
	cursor: pointer;
	user-select: none;
	overflow: hidden;
}

.worktime-month-cell:hover {
	border-color: var(--worktime-accent-color);
	box-shadow: inset 0 0 0 1px var(--worktime-accent-color);
}

.worktime-month-cell.cell-empty {
	background: #d2d2d2;
	color: transparent;
}

.worktime-month-cell.cell-outside-month {
	background: #fff;
	border-color: #fff;
	color: transparent;
	cursor: default;
	pointer-events: none;
}

.worktime-month-cell.cell-weekend {
	background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.35) 0, rgba(255,255,255,0.35) 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 5px);
}

.worktime-month-cell.cell-work {
	background: #202020;
	border-color: #202020;
	color: #fff;
	font-weight: bold;
}

.worktime-month-cell.cell-work.cell-work-fill {
	background:
		linear-gradient(to top, #202020 0, #202020 var(--worktime-fill, 0%), #d0d0d0 var(--worktime-fill, 0%), #d0d0d0 100%);
	border-color: #b8b8b8;
	color: #fff;
	text-shadow: 0 1px 1px rgba(0,0,0,0.85);
}

.worktime-month-cell.cell-work.cell-target-reached {
	background: #3f8f4e;
	border-color: #3f8f4e;
	color: #fff;
}

.worktime-month-cell.cell-vacation {
	background: #f06aa7;
	border-color: #f06aa7;
	color: #fff;
	font-weight: bold;
}

.worktime-month-cell.cell-sick {
	background: #fff2a8;
	border-color: #ead374;
	color: #6f5c00;
	font-weight: bold;
}

.worktime-month-cell.cell-holiday {
	background: #d8d8d8;
	color: #555;
	font-weight: bold;
}

.worktime-month-cell.cell-free {
	background: #c7c7c7;
	background-image: repeating-linear-gradient(135deg, rgba(255,255,255,0.35) 0, rgba(255,255,255,0.35) 2px, rgba(0,0,0,0.03) 2px, rgba(0,0,0,0.03) 5px);
	color: transparent;
}

.worktime-report-cell {
	height: 26px;
	padding: 0;
	text-align: center;
	white-space: nowrap;
}

.worktime-driver-report,
.worktime-driver-export {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 1px solid #d7d7d7;
	box-sizing: border-box;
	background: #fff;
	cursor: pointer;
}

.worktime-driver-export {
	margin-left: 3px;
}

.worktime-driver-report:hover,
.worktime-driver-export:hover {
	border-color: var(--worktime-accent-color);
	box-shadow: inset 0 0 0 1px var(--worktime-accent-color);
}

.worktime-driver-report img,
.worktime-driver-export img {
	width: 14px;
	height: 14px;
}

.worktime-no-results {
	height: 34px;
	padding: 0 8px;
	color: #777;
	background: #f7f7f7;
	border: 1px solid #d8d8d8;
	text-align: left;
	line-height: 34px;
}

.worktime-day-tooltip {
	position: absolute;
	z-index: 100000;
	display: none;
	width: 290px;
	padding: 10px 10px 8px;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #d8d8d8;
	box-shadow: 0 8px 24px rgba(0,0,0,0.18);
	color: #444;
	pointer-events: none;
}

.worktime-tooltip-title {
	font-weight: bold;
	font-size: 13px;
}

.worktime-tooltip-date {
	margin: 2px 0 8px;
	color: #777;
	font-size: 11px;
}

.worktime-tooltip-timeline {
	position: relative;
	padding-left: 52px;
}

.worktime-tooltip-timeline:before {
	content: "";
	position: absolute;
	left: 36px;
	top: 4px;
	bottom: 4px;
	width: 3px;
	background: var(--worktime-accent-color);
}

.worktime-tooltip-item {
	position: relative;
	display: grid;
	grid-template-columns: 44px 14px 1fr;
	align-items: center;
	margin: 0 0 8px -52px;
}

.worktime-tooltip-time {
	color: #777;
	font-size: 11px;
	text-align: right;
}

.worktime-tooltip-dot {
	position: relative;
	z-index: 1;
	width: 9px;
	height: 9px;
	margin-left: 9px;
	border-radius: 50%;
	background: var(--worktime-accent-color);
	box-shadow: 0 0 0 3px #fff;
}

.worktime-tooltip-item.is-pause .worktime-tooltip-dot {
	background: #f28c22;
}

.worktime-tooltip-item.is-pause .worktime-tooltip-card {
	border-left: 3px solid #f28c22;
}

.worktime-tooltip-card {
	min-height: 44px;
	padding: 8px 10px;
	border: 1px solid #eeeeee;
	background: #fff;
	box-shadow: 0 4px 12px rgba(0,0,0,0.12);
	box-sizing: border-box;
	font-size: 12px;
}

.worktime-tooltip-card div:first-child {
	margin-bottom: 4px;
	color: #777;
}

.worktime-tooltip-card strong {
	color: #444;
}

.worktime-tooltip-card span {
	float: right;
	margin-left: 8px;
	color: #444;
	font-size: 18px;
	font-weight: bold;
}

.worktime-day-caption {
	margin: 0 0 10px;
	padding-bottom: 8px;
	border-bottom: 1px solid #d8d8d8;
	font-weight: bold;
}

.worktime-settings-subtitle {
	margin: 10px 0 6px;
	padding-top: 8px;
	border-top: 1px solid #d8d8d8;
	font-weight: bold;
}

.worktime-report {
	padding: 6px 8px 12px;
	text-align: center;
}

.worktime-report-month {
	color: #333;
	font-size: 17px;
	font-weight: bold;
	margin-bottom: 14px;
	text-align: center;
}

.worktime-report-top {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 24px;
	margin-bottom: 14px;
}

.worktime-report-person {
	min-width: 210px;
	text-align: left;
}

.worktime-report-person-line {
	display: grid;
	grid-template-columns: 112px 1fr;
	gap: 8px;
	margin-bottom: 4px;
	color: #555;
	font-size: 12px;
}

.worktime-report-person-line span {
	color: #777;
}

.worktime-report-person-line strong {
	color: #333;
	font-size: 13px;
}

.worktime-report-photo {
	display: flex;
	justify-content: flex-start;
	margin: 10px 0 0;
}

.worktime-report-photo img {
	width: 92px;
	height: 92px;
	object-fit: cover;
	border: 1px solid #d8d8d8;
	background: #f4f4f4;
}

.worktime-report-traffic {
	display: flex;
	align-items: center;
	gap: 12px;
	text-align: left;
}

.worktime-traffic-light {
	display: flex;
	flex-direction: column;
	gap: 5px;
	width: 30px;
	padding: 6px;
	border: 1px solid #d8d8d8;
	background: #2d2d2d;
	box-sizing: border-box;
}

.worktime-traffic-light span {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: #5a5a5a;
	box-shadow: inset 0 0 0 1px rgba(255,255,255,0.14);
}

.worktime-traffic-light.state-red span:first-child {
	background: #d94343;
	box-shadow: 0 0 8px rgba(217,67,67,0.8);
}

.worktime-traffic-light.state-yellow span:nth-child(2) {
	background: #f0c737;
	box-shadow: 0 0 8px rgba(240,199,55,0.8);
}

.worktime-traffic-light.state-green span:nth-child(3) {
	background: #3f8f4e;
	box-shadow: 0 0 8px rgba(63,143,78,0.8);
}

.worktime-traffic-values {
	display: grid;
	gap: 5px;
	min-width: 110px;
}

.worktime-traffic-values div {
	display: grid;
	grid-template-columns: 1fr 44px;
	align-items: baseline;
	gap: 10px;
}

.worktime-traffic-values strong {
	color: #333;
	font-size: 14px;
}

.worktime-traffic-values span {
	color: #777;
	font-size: 11px;
}

.worktime-traffic-values .is-red span {
	color: #b83b3b;
}

.worktime-traffic-values .is-yellow span {
	color: #9a7a00;
}

.worktime-traffic-values .is-green span {
	color: #32723e;
}

.worktime-report-stats {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	margin-bottom: 16px;
	text-align: left;
}

.worktime-report-stats div {
	padding: 9px 10px;
	border: 1px solid #d8d8d8;
	background: #f8f8f8;
	box-sizing: border-box;
}

.worktime-report-stats span {
	display: block;
	color: #777;
	font-size: 11px;
}

.worktime-report-stats strong {
	display: block;
	margin-top: 3px;
	color: #333;
	font-size: 16px;
}

.worktime-report-chart-row {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 26px;
	text-align: left;
}

.worktime-report-donut {
	position: relative;
	width: 210px;
	height: 210px;
	border-radius: 50%;
	flex: 0 0 auto;
}

.worktime-report-donut div {
	position: absolute;
	inset: 58px;
	border-radius: 50%;
	background: #fff;
}

.worktime-report-legend {
	min-width: 210px;
}

.worktime-report-legend div {
	display: grid;
	grid-template-columns: 12px minmax(90px, 1fr) auto;
	align-items: center;
	gap: 8px;
	min-height: 24px;
	color: #555;
}

.worktime-report-legend span {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

.worktime-report-legend strong {
	font-weight: normal;
}

.worktime-report-legend em {
	color: #777;
	font-style: normal;
	white-space: nowrap;
}

@media (max-width: 900px) {
	.worktime-month-toolbar {
		align-items: flex-start;
	}

	.worktime-month-grid {
		padding: 8px;
	}

	.worktime-month-table {
		min-width: 1120px;
		border-spacing: 2px 4px;
	}

	.worktime-driver-head {
		width: 160px;
	}

	.worktime-day-head,
	.worktime-month-cell {
		width: 26px;
	}

	.worktime-report-chart-row {
		flex-direction: column;
	}

	.worktime-report-top {
		flex-direction: column;
		gap: 10px;
	}
}
