:root {
  --input-padding-x: .75rem;
  --input-padding-y: .75rem;
}
html,
body {
	height: 100%;
}
body {
	font-size: 14px;
	padding-top: 3.5rem;
}
body.login {
	display: -ms-flexbox;
	display: flex;
	-ms-flex-align: center;
	align-items: center;
	padding-top: 40px;
	padding-bottom: 40px;
	background: #6c757d linear-gradient(150deg, #6c757d 0%, #343a40 100%);
}
.login h1 {
	color: #ccc;
}
.form-login {
	width: 100%;
	max-width: 480px;
	padding: 24px;
	margin: auto;

}
@media screen and (min-width: 800px) {
	body.login {
		background: linear-gradient(105deg, #c60769 0%, #c60769 25%, #333 25%, #111 100%) no-repeat top left;
	}
	.form-login {
		background: #6c757d linear-gradient(150deg, #6c757d 0%, #343a40 100%);
		border: 8px solid white;
		border-radius: 1em;
		box-shadow: 0 0 200px #222;
	}
}
.form-label-group {
	position: relative;
	margin-bottom: 1rem;
}
.form-label-group > input,
.form-label-group > label {
	padding: var(--input-padding-y) var(--input-padding-x);
}
.form-label-group > label {
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	width: 100%;
	margin-bottom: 0; /* Override default `<label>` margin */
	line-height: 1.5;
	color: #495057;
	border: 1px solid transparent;
	border-radius: .25rem;
	transition: all .1s ease-in-out;
	pointer-events: none;
}
.form-label-group input::-webkit-input-placeholder {
	color: transparent;
}
.form-label-group input:-ms-input-placeholder {
	color: transparent;
}
.form-label-group input::-ms-input-placeholder {
	color: transparent;
}
.form-label-group input::-moz-placeholder {
	color: transparent;
}
.form-label-group input::placeholder {
	color: transparent;
}
.form-label-group input:not(:placeholder-shown) {
	padding-top: calc(var(--input-padding-y) + var(--input-padding-y) * (2 / 3));
	padding-bottom: calc(var(--input-padding-y) / 3);
}
.form-label-group input:not(:placeholder-shown) ~ label {
	padding-top: calc(var(--input-padding-y) / 3);
	padding-bottom: calc(var(--input-padding-y) / 3);
	font-size: 12px;
	color: #777;
}

main.dashboard {
	padding: 1em;
}
main.dashboard .job-item {
	clear: both;
}

.sidebar-sticky {
	position: sticky;
	top: 3rem;
}

button.add,
button.clone,
button.edit,
button.info,
button.delete,
button.status,
button.complete-all,
button.time-tracking,
button.accounting-account,
button.accounting-skip {
	border: none;
	background: none;
	cursor: pointer;
}
button.add {
	margin-right: 1em;
}

.user-list .inactive td {
	color: #6c757d;
}
.user-list th:last-child,
.user-list td:last-child {
	text-align: right;
}
.user-list td.toggle {
  width: 4em;
}
.user-list button.toggle-active {
	width: 3em;
	border: 2px solid #2196f3;
	background: #2196f3;
	position: relative;
	outline: none;
  height: 20px;
  border-radius: 4px;
  top: 2px;
}
.user-list .inactive button.toggle-active {
	background: #5a6268;
}
.user-list button.toggle-active::after {
	display: block;
	content: 'I';
	text-align: center;
	position: absolute;
	top: 0;
	left: 1.5em;
	width: calc(1.5em - 4px);
	height: 100%;
	background: white;
	transition: left .3s;
  font-size: 16px;
  line-height: 1;
  padding: 1px;
  border-radius: 2px;
}
.user-list .inactive button.toggle-active {
	border-color: #ccc;
	background-color: #ccc;
}
.user-list .inactive button.toggle-active::after {
	content: 'O';
	left: 0;
}
.user-list button.toggle-active span {
	visibility: hidden;
}

.customer-list th:last-child,
.customer-list td:last-child {
	text-align: right;
}
#customer_color {
	height: 2.4em;
}

.customer-badge {
	display: inline-block;
	padding: .5ex 1ex;
  border-radius: .5ex;
}
.customer-bar-left {
	border-left: 1ex solid;
	padding-left: 1ex;
}

.free-list {
	float: right;
	width: 15em;
  padding: .2ex 0;
	overflow: auto;
  background-color: #f0f0f0;
}
.free-list > div {
  background-color: #ccc;
  color: #666;
  border-bottom: 2px solid white;
}
.calendar .free-list .task-list {
  padding: 0 .5ex;
}

.calendar-container {
	overflow: auto;
	border-right: 2px solid white;
}
.calendar-heading,
.orga-heading,
.vacation-heading {
  border-bottom: 1px solid #ccc;
  background-color: #e0e0e0;
}
.calendar-heading h2,
.orga-heading h2,
.vacation-heading h2 {
  color: #fff;
  text-shadow: 2px 2px #ccc;
  margin: .25em 1em;
  white-space: nowrap;
}
.calendar-heading a,
.orga-heading a,
.vacation-heading a {
  color: #6c757d;
}
.calendar-heading a:hover,
.vacation-heading a:hover {
  background-color: white;
}
.calendar-heading a img,
.orga-heading a img,
.vacation-heading a img {
  width: 24px;
  height: 24px;
}
.calendar-heading a span,
.orga-heading a span,
.vacation-heading a span {
  color: #dc3545;
}
.calendar-task-types {
	margin: 1em;
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
}
.calendar-task-types button {
	margin: .25ex;
	flex-grow: 1;
}
@media screen and (min-width: 1200px) {
	.calendar-task-types button {
		min-width: 10em;
	}
}
.calendar-task-types button img {
	margin-right: .5ex;
}
.calendar-users {
	text-align: center;
}
.calendar-users button {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
	border-bottom: none;
	font-size: 90%;
}

div.calendar,
div.orga-calendar {
	display: table;
	table-layout: fixed;
}

.calendar .head,
.calendar .user,
.orga-calendar .head,
.orga-calendar .line {
	display: table-row;
}
.calendar .head {
	position: sticky;
	top: 0;
	background: white;
	z-index: 2;
}
.calendar .cell,
.orga-calendar .cell {
	display: table-cell;
	vertical-align: top;
	min-width: 15em;
	width: 16vw;
	max-width: 25em;
	border-top: 2px solid white;
  border-right: 1px solid #ccc;
  border-bottom: 1px solid #ccc;
  border-left: 2px solid white;
	background: #fafafa linear-gradient(170deg, white 0%, transparent 50%) no-repeat left center;
	padding-right: 2px;
}
.calendar .cell.is-vacation,
.calendar .cell.is-holiday {
	background-image: repeating-linear-gradient(150deg, #e8e8e8, #e8e8e8 1ex, transparent 1ex, transparent 1em),
	                  linear-gradient(170deg, white 0%, transparent 50%);
}
.calendar .head .cell {
	background: transparent;
  vertical-align: middle;
  padding: .5ex;
}
.calendar .toggle-move,
.calendar .toggle-weekends {
	font-size: 80%;
}
button.complete-all {
  background-image: url(/icon/si-glyph-clipboard-checked.svg);
  background-repeat: no-repeat;
  background-size: 20px;
  background-position: 0px 3px;
  font-size: 9px;
  line-height: 9px;
  text-transform: uppercase;
  padding-left: 24px;
  border: 1px solid transparent;
}
button.complete-all:hover {
  border-color: #dc3545;
}

.calendar .day-actions {
	float: right;
}
.calendar .day-name {
  line-height: 26px;
}
.calendar .cell:first-child {
	border-right: thin solid #ccc;
	text-align: right;
  vertical-align: middle;
	background: #f0f0f0;
	position: sticky;
	left: 0;
	min-width: 10em;
	width: 10em;
	z-index: 1;
}
.calendar .cell.parking {
	position: sticky;
	left: 10em;
	z-index: 1;
	background: #faf0f8 linear-gradient(170deg, white 0%, transparent 50%) no-repeat left center;
}
.calendar .head .today {
  color: #dc3545;
  position: relative;
}
.calendar .head .day-highlight {
  position: absolute;
  bottom: 2px;
  left: 0;
  width: calc(100% - 2px);
  height: 2px;
  background-color: #dc3545;
}
.calendar.hide-weekend .cell.weekend {
	display: none;
}
.calendar .job-prototype-list,
.calendar .task-list {
	margin: 0;
	padding: 0;
	list-style: none;
}
.calendar .job-prototype-list {
	padding: 0 .5ex;
}
.calendar .task.cell {
	position: relative;
	padding-bottom: 2.5ex;
}
.calendar .task.cell.parking {
	position: sticky;
	left: 10em;
	z-index: 1;
}
.calendar .task.cell.parking .task-list {
	max-height: 30em;
	overflow: auto;
}
.calendar .estimate-sum {
	position: absolute;
	bottom: 0;
  left: 0;
	right: 0;
	font-size: 85%;
  background: transparent linear-gradient(170deg, transparent 60%, #eaeaea 100%) no-repeat left center;
  text-align: right;
  padding-right: .5ex;
}
.calendar .proto-item .card,
.calendar .task-item {
	margin: 1ex 0;
	list-style: none;
	border: 1px solid #ccc;
	border-radius: .5ex;
	background: white;
	font-size: 85%;
	cursor: move;
	overflow: hidden;
}
.calendar .proto-item .card {
	cursor: auto;
}
.calendar-container.locked .task-item {
	cursor: auto;
}
.calendar .task-item::after {
	display: block;
	content: ' ';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: .5em;
	background: transparent linear-gradient(0deg, white, transparent) no-repeat center bottom;
}
.calendar .proto-item:last-child {
	border-bottom: medium dashed silver;
	margin-bottom: 1ex;
}
.calendar .proto-item .customer-badge,
.calendar .task-item .customer-badge {
  padding: 0;
}
.calendar .proto-item .card > div,
.calendar .task-item > div {
  padding: .5ex;
}
.calendar .proto-item .card > div.card-header,
.calendar .task-item > div.card-header {
  padding: 0 .5ex;
}
.calendar .task-item .glyph-icon {
  width: 12px;
  height: 12px;
}
.calendar .task-item.locked {
	cursor: initial;
}
.calendar .day.holiday {
	background: repeating-linear-gradient(150deg, #e8e8e8, #e8e8e8 1ex, white 1ex, white 1em);
}
.calendar .task-item.too-early {
	background: repeating-linear-gradient(150deg, #ffffaa, #ffffaa 1ex, white 1ex, white 1em);
}
.calendar .day.too-early {
	background: repeating-linear-gradient(150deg, #ffffaa, #ffffaa 1ex, white 1ex, white 1em);
}
.calendar .task-item.too-late {
	background: repeating-linear-gradient(150deg, #ffdddd, #ffdddd 1ex, white 1ex, white 1em);
}
.calendar .day.too-late {
	background: repeating-linear-gradient(150deg, #ffdddd, #ffdddd 1ex, white 1ex, white 1em);
}
.calendar .placeholder {
	border: none;
	background: repeating-linear-gradient(150deg, #eee, #eee 1ex, white 1ex, white 1em);
	min-height: 2.5em;
}
.material-item.soon {
	background: rgba(255, 127, 0, .5);
}
.material-item.overdue {
	background: rgba(255, 0, 0, .5);
}
.material-item.complete,
.task-item.complete,
.todo-item.complete {
	background: repeating-linear-gradient(150deg, #eee, #eee 1ex, white 1ex, white 1em);
}
.calendar .proto-actions {
	display: flex;
	align-items: stretch;
	justify-content: space-between;
}
.calendar .task-actions {
	float: right;
}
.calendar .task-item button {
	background-color: rgba(255, 255, 255, .5);
}
.calendar .task-item button:last-child {
	border-top-right-radius: 0.5ex;
}
.calendar .task-item button.info,
.calendar .task-item button:hover,
.calendar .task-item.complete button.complete {
	opacity: 1;
}
.calendar .task-item.complete {
	opacity: .3;
}
.task-item .task-type .glyph-icon {
	vertical-align: text-top;
}
.event-item .event-name,
.proto-item .proto-orderno,
.proto-item .proto-name,
.task-item .task-orderno,
.task-item .task-name,
.todo-item .todo-orderno,
.todo-item .todo-name {
	font-weight: bold;
}
.calendar .proto-item .proto-orderno:after,
.calendar .task-item .task-orderno:after {
	content: " - ";
}
.task-item .task-estimate {
	margin-left: 1ex;
	font-size: 90%;
}
.task-item .task-description {
	overflow-wrap: break-word;
	-ms-hyphens: auto;
	-moz-hyphens: auto;
	-webkit-hyphens: auto;
	hyphens: auto;
}
.task-item .task-description p {
	margin-bottom: .5ex;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	line-height: 1.2;
	height: 1.2em;
}
.task-item .task-description p:last-child {
	margin-bottom: 0;
}

.agenda-task-list .table td,
.agenda-task-list .table th {
	vertical-align: middle;
}
.agenda-task-list .event-item {
	background-color: rgba(0, 0, 0, 0.02);
}
.agenda-task-list .todo-item {
	background-color: rgba(0, 0, 255, 0.05);
}

.editable.orga-calendar .cell[data-date] {
	cursor: pointer;
}
.orga-calendar .cell:first-child {
	width: 5em;
	min-width: 5em;
	text-align: right;
}
.orga-calendar .cell.other-month {
	opacity: .5;
}
.orga-calendar .day-no {
	text-align: right;
	font-size: 85%;
}
.orga-calendar .day-no::before {
	float: left;
	content: attr(title);
}
.orga-calendar .weekend .day-no,
.orga-calendar .holiday .day-no {
	color: #dc3545;
}

.entries {
	list-style: none;
	margin: 0;
	padding: 0;
}
.entries .entry {
	position: relative;
	list-style: none;
	margin: 1ex -2px;
	padding: .5ex 1ex;
	border: thin solid silver;
	border-style: solid none;
	background: #f0f0f0;
	cursor: default;
}
.entries .entry.with-editing,
.entries .entry.with-authoring {
	background: linear-gradient(150deg, #fed, #feb);
}
.entries .entry.complete {
	background: repeating-linear-gradient(150deg, #eee, #eee 1ex, white 1ex, white 1em);
	opacity: .3;
}
.editable.orga-calendar .entries .entry {
	cursor: pointer;
}
.orga-calendar .entries .entry[data-vid] {
	background: #f9f9e0;
	cursor: default;
}
.entries .entry.first {
	margin-left: 0;
	border-left-style: solid;
	border-top-left-radius: .5ex;
	border-bottom-left-radius: .5ex;
}
.entries .entry.last {
	margin-right: 0;
	border-right-style: solid;
	border-top-right-radius: .5ex;
	border-bottom-right-radius: .5ex;
}
.entries .entry.highlight {
	border-color: red;
	background: white;
}
.entries .entry.extern {
	border-color: #c60769;
}
.entries .entry.editable {
	cursor: pointer;
}
.entries .entry.editable:hover {
	border-color: red;
	background: white;
}
.entries .entry .event-time {
	float: right;
	font-size: 85%;
}
.entries .entry .user-name {
	font-size: 85%;
	font-weight: bold;
}
.entries .entry .icons {
	position: absolute;
	right: .5ex;
	bottom: .5ex;
}

#event_form .btn-delete {
	order: -1;
	margin-right: auto;
}

label {
  margin-bottom: .1rem;
  font-size: 0.8rem;
  color: #6c757d;
}
fieldset {
  background-color: #e9ecef;
  border: 1px solid #ced4da;
  padding: 1ex;
  border-radius: .5ex;
  margin: 1em 0;
}
fieldset legend {
  width: auto;
  padding: 0 1.5ex;
  font-size: 1rem;
  background-color: #ced4da;
  border-radius: .5ex;
  color: white;
  text-shadow: 1px 1px #bbb;
}

input[type=color] {
  padding: .25rem;
  height: 2rem;
}

textarea.form-control {
	min-height: 10em;
}

.custom-control {
  margin-bottom: .5ex;
  padding-left: 2.55rem;
}
.custom-control-label {
  color: #343a40;
}
.custom-control-label::before {
  background-color: white;
  border: 1px solid #ced4da;
  width: 1.25rem;
  height: 1.25rem;
  top: 0;
  left: -2.2rem;
}
.custom-control-label::after {
  width: 1.25rem;
  height: 1.25rem;
  top: 0;
  left: -2.2rem;
}
.form-group.datetime label {
	display: block;
}
.form-group.datetime input {
	display: inline-block;
}
.form-group.datetime input[type=date] {
	width: 50%;
}
.form-group.datetime input[type=text] {
	width: 25%;
}

.task-job-customer {
  position: relative;
  top: 0;
  left: 0;
}
#clone_unlock_customer,
#task_unlock_customer,
#unlock_customer {
  position: absolute;
  top: .5ex;
  right: .5ex;
}
.tracking-info {
  font-size: 0.8rem;
}
.tracking-info .form-group {
  margin-bottom: 0;
}
.tracking-info span.info-date,
.tracking-info span.info-user {
  font-weight: bold;
}

.job-list {
	margin: 1em 0;
	padding: 0;
	list-style: none;
}
.job-item {
	margin: 1em 0;
	padding: 1ex;
	list-style: none;
	border-top: 1px solid #dee2e6;
}
.job-item .customer-badge {
	float: right;
}
.job-item .job-orderno,
.job-item .job-name {
	font-size: 110%;
	font-weight: bold;
}
.job-item .job-orderno::after {
	content: ' - ';
}
.job-item .job-actions {
	float: right;
	clear: both;
	margin: 1ex 0;
}
.job-item .job-completion {
	cursor: pointer;
}
.job-completion,
.job-ttr-completion {
	padding: .5ex .5ex .5ex 0;
	width: 64%;
}
.job-completion .job-progress,
.job-ttr-completion .job-ttr-progress {
  border: thin solid #dee2e6;
  background: white repeating-linear-gradient(150deg, #118dc6, #118dc6 1ex, #7ad5ff 1.2ex, #7ad5ff 2ex, #118dc6 2.2ex) no-repeat left top;
  height: 2ex;
  border-radius: 1ex;
  margin-top: .5ex;
}
.job-ttr-completion .job-ttr-progress {
	background-image: repeating-linear-gradient(150deg, #c60769, #c60769 1ex, #ff80bf 1.2ex, #ff80bf 2ex, #c60769 2.2ex);
}

.job-item .job-tasks {
	margin: 0 1em;
}
.job-item .job-tasks thead th {
	border-top: none;
}

#time_tracking_form .list legend {
	cursor: pointer;
}
#time_tracking_form .list legend:hover {
	color: #333;
}

.accounting-toolbar {
	float: right;
	margin: 1em 0 0 1em;
}
.accounting-summary {
	margin: 1em 0 0 0;
	border-left: thin solid #dee2e6;
	border-right: thin solid #dee2e6;
}
.accounting-details .toggle-container {
	border: thin solid #dee2e6;
	box-shadow: #dee2e6 0 0.2ex 0.5ex inset;
}
.accounting-details .toggle-button {
	text-align: center;
	background: #dee2e6;
	border-radius: 0 0 1ex 1ex;
	cursor: pointer;
}
.accounting-details tr.comment td {
	border-top: 0;
	padding-top: 0;
	padding-left: 2em;
	font-style: italic;
}

.vacation-container {
	overflow: auto;
}
.vacation-table {
	display: table;
	table-layout: fixed;
}
.vacation-row {
	display: table-row;
}
.vacation-row .cell {
	display: table-cell;
	min-width: 4em;
	width: 4em;
	padding: .5ex 1ex;
	position: relative;
	text-align: right;
}
.vacation-row:first-child .cell {
	font-weight: bold;
	position: sticky;
	top: 0;
	background: white;
	border-bottom: 1px solid black;
	z-index: 1;
	writing-mode: vertical-rl;
}
.vacation-row .cell:first-child {
	font-weight: bold;
	text-align: right;
	position: sticky;
	min-width: 8em;
	width: 8em;
	left: 0;
	background: white;
	border-right: 1px solid black;
	z-index: 1;
}
.vacation-row:first-child .cell:first-child {
	vertical-align: bottom;
	writing-mode: horizontal-tb;
	z-index: 2;
}
.vacation-row .cell:hover {
	background: #eee;
}
.vacation-row .cell .details {
	display: none;
	position: absolute;
	top: 1.5em;
	right: 1em;
	background: white;
	border: 1px solid black;
	padding: 1ex;
	width: 15em;
	z-index: 2;
	box-shadow: .25ex .25ex .5ex rgba(0, 0, 0, .25);
}
.vacation-row .cell:hover .details {
	display: block;
}
.vacation-row .cell .details ul {
	margin: 0;
	padding: 0 0 0 2ex;
}
.vacation-row .cell .details form {
	display: inline;
}

.vacation-row.sum .cell,
.vacation-row.entitlement .cell {
	border-top: thin solid black;
}

.search-results {
	margin: 1em 0;
	padding: 0;
}
.search-result {
	margin: 1em;
	padding: 1ex;
	list-style: none;
	border-top: 1px solid #dee2e6;
	clear: both;
}
.search-result .customer-badge {
	float: right;
}
.search-result .todo-type,
.search-result .todo-orderno,
.search-result .todo-name {
	font-size: 110%;
	font-weight: bold;
}
.search-result .todo-orderno::after {
	content: ' - ';
}
.search-result .todo-actions {
	float: right;
}

/* jquery-sortable */

body.dragging, body.dragging * {
	cursor: move !important;
}

.dragged {
	position: absolute;
	opacity: 0.5;
	z-index: 2000;
}
