BODY,DIV,TABLE,THEAD,TBODY,TFOOT,TR,TD,P {
	font-family:"Arial"; font-size:12px 
}
tab {
	padding-left: 4em;
}
p {
	font-size: 12px;
	font-family: Arial;
}
.break { 
	page-break-before: always; 
}

.doc-scale {
	width: 794px;
	margin: 0 auto;
}

.doc-sheet {
	width: 794px;
	min-height: 1122px;
	margin: 0 auto;
	background: #ffffff;
	padding: 25px 30px 30px 35px;
	box-shadow: 0 0 10px rgba(0,0,0,0.10);
	box-sizing: border-box;
}

.doc-viewport {
	width: 100%;
	padding: 10px 10px 10px 10px;
	box-sizing: border-box;
}

.page-gap {
	height: 35px;
}
.page-break {
	page-break-before: always;
}

.hidden_element {
	display: none !important;
	visibility: hidden !important;
}

.signature-pad {
    background: #fff;
    width: 100%;
    height: 100%;
    display: flex;
}

.clear-signature-button {
	height: 100%;
	background: green;
	border: 1px solid transparent;
	color: #fff;
	font-weight: 600;
	cursor: pointer;
}		
.clear-signature-button span {
    transform: rotate(90deg);
    display: block;
}
.tvlist td {
	color: #686868;
	font-size: 10px;
	font-family: Arial;
	text-align: left;
	vertical-align: middle;
	border-width: 0px;
	border-color: #c0c0c0;
	padding: 2px;
}
.calc_form td {
	color: #000000;
	font-size: 12px;
	font-family: Arial;
	text-align: left;
	vertical-align: middle;
	border-width: 1px;
	border-color: #c0c0c0;
}
.price_list td {
	color: #000000;
	font-size: 9px;
	font-family: Arial;
	text-align: center;
	vertical-align: top;
	border-width: 1px;
	border-color: #c0c0c0;
	padding: 1px;
	border-spacing: 0;
}	   

.input_form td
   {
	color: #000000;
	font-size: 12px;
	font-family: Arial;
	text-align: left;
	vertical-align: middle;
	border-width: 1px;
	border-color: #c0c0c0;
   }

a:link {
  color: green;
  text-decoration: none;
}

a:visited {
  text-decoration: none;
}

a:hover {
  text-decoration: none;
}

a:active {
  color: red;
  text-decoration: none;
}

.divTable2 {
    display: flex;
    flex-direction: column;
	min-width: 370px;
	max-width: 730px;
	background-color: #eee;
	border: 1px solid #666666;
	border-spacing: 5px; 
}

.divTable {
	display: block;
	min-width: 730px;
	max-width: 730px;
	background-color: #eee;
	border: 1px solid #666666;
	border-spacing: 5px; /*cellspacing:poor IE support for  this*/
   /* border-collapse:separate;*/
}

.divTableRow2 {
    display: flex;
    border-bottom: 1px solid #eee;
}

.divTableRow {
   display:table-row;
   width:auto;
}

.divTableCell2 {
    flex: 1; /* All cells share available space equally */
    padding: 8px 12px;
    border-right: 1px solid #eee;
    word-break: break-word;
	text-align:left;
	min-width: 360px;
	min-height: 26px;
	background-color:#ccc;
}

.divTableCell {
	float:left; /*fix for  buggy browsers*/
	display:flex;
	min-width: 360px;
	min-height: 27px;
	height: 27;
	align-items: center;
	background-color:#ccc;
}

mark_yellow {
  background-color: yellow;
  color: black;
}

.documents-button {
  margin-top: 5px;
  margin-bottom: 5px;
  width: 100%;
  padding: 8px;
}

.signature-block {
  margin-bottom: 30px;
}

.signature-row {
  display: flex;
  align-items: stretch;
  border: 1px solid #ccc;
  width: fit-content;
  background: #fff;
}

.signature-row canvas {
  background-color: yellow;
  border: none;
}

.clear-signature {
  background-color: green;
  color: white;
  border: none;
  writing-mode: vertical-rl;
  text-orientation: mixed;
  transform: rotate(180deg);
  padding: 10px 25px;
  font-weight: bold;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.signature-preview {
  margin-top: 10px;
  border: 1px dashed #aaa;
  max-width: 100%;
}

.signature-warning {
  box-shadow: 0 0 0 2px red;
}

.flatpickr-time input {
  font-size: 30px;
  height: 40px;
  align-items: center;       /* центрира съдържанието */
  font-size: 24px;           /* по-голям текст */
}
.flatpickr-time .flatpickr-am-pm {
  font-size: 18px;
}
/* По-големи стрелки за избор на час */
.flatpickr-time .numInputWrapper {
  width: 40px;         /* увеличава ширината */
}

/* По-големи самите стрелки */
.flatpickr-time .arrowUp,
.flatpickr-time .arrowDown {
  border-left: 20px solid transparent;
  border-right: 20px solid transparent;
}

.highlight-day {
background-color: #d41c62 !important;
color: 	#FFFFFF !important;
border-radius: 50%;
font-weight:bold;
}

input[readonly] {
  background-color: #f0f0f0;  /* светлосиво */
  color: #555;                /* по-тъмен текст */
  border: 1px solid #aaa;
}

select {
  background-color: white;
  color: #047857;
  padding: 0.5rem 1rem;
  border: 1px solid #047857;
  border-radius: 0.375rem;
}

select:disabled {
  background-color: #f0f0f0; /* Светлосиво */
  color: #555;               /* Тъмен текст */
  border: 1px solid #ccc;
}

.td-no-padding {
  padding: 0 !important;
}


.info-window-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
}

.info-window {
   position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    padding: 30px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    font-family: sans-serif;
}

.info-window button {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

  .info-window button#closeModal:hover {
    background-color: #218838;
  }
  
.tooltip-container {
  position: relative;
  display: inline-block;
  cursor: help;
  padding: 5px;
  color: #024d1c;
  max-width: 100%;
}

.tooltip-text {
  visibility: hidden;
  background-color: rgb(187 247 208);
  color: rgb(20 83 45 / var(--tw-text-opacity, 1));
  text-align: left;
  padding: 8px;
  border-radius: 6px;
  position: absolute;
  z-index: 1000;
  width: max-content;
  max-width: 90vw;
  bottom: 125%;
  left: 50%;
  transform: translateX(-50%);
  opacity: 0;
  transition: opacity 0.3s;
  white-space: normal;
  word-break: break-word;
}

/* Покажи tooltip при ховър */
.tooltip-container:hover .tooltip-text {
  visibility: visible;
  opacity: 1;
}

/* Когато няма място отгоре показва отдолу */
.tooltip-container:hover .tooltip-text {
  bottom: auto;
  top: 65%;
}

/* Ако tooltip излиза извън екрана отдясно — пренареди наляво */
@media screen and (max-width: 600px) {
  .tooltip-text {
    left: 0;
    transform: none;
  }
}

.doc-action-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 14px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: center;
}

.doc-action-btn.disabled {
	opacity: 0.45;
	cursor: not-allowed;
	filter: grayscale(1);
	pointer-events: none;
}

.doc-action-btn-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.doc-action-btn-text {
    font-size: 12px;
    opacity: 0.9;
}

.doc-action-btn.primary {
    background: #16a34a;
    color: #fff;
}

.doc-action-btn.primary:hover {
    background: #15803d;
}

.doc-action-btn.secondary {
    background: #86efac;
    color: #064e3b;
}

.doc-action-btn.secondary:hover {
    background: #4ade80;
}

.doc-action-btn.accent {
    background: #16a34a;
    color: #fff;
}

.doc-action-btn.accent:hover {
    background: #15803d;
}

.doc-action-btn.cancel {
    background: #fed7aa;
    color: #7c2d12;
}
.doc-action-btn.cancel:hover {
    background: #fdba74;
}

.doc-action-btn.select {
    background: #86efac;
    color: #14532d;
}
.doc-action-btn.select:hover {
    background: #4ade80;
}

.doc-action-btn.submit {
    background: #4ade80;
    color: #14532d;
}
.doc-action-btn.submit:hover {
    background: #22c55e;
}

.doc-action-btn.clear {
    background: #fecaca;
    color: #7f1d1d;
}
.doc-action-btn.clear:hover {
    background: #fca5a5;
}

.doc-action-btn.save {
    background: #bbf7d0;
    color: #14532d;
}
.doc-action-btn.save:hover {
    background: #86efac;
}

.doc-action-btn.delete {
    background: #ef4444;
    color: #fff;
}
.doc-action-btn.delete:hover {
    background: #dc2626;
}

.doc-action-form {
    margin: 0;
}

/* ========================= */


.signing-status-grid {
	display: grid;
	grid-template-columns: 180px 180px;
	column-gap: 10px;
	row-gap: 6px;

	min-width: 360px;
	max-width: 100%;

	margin-left: auto;
	margin-right: auto;

	justify-content: center;
	align-items: center;
	text-align: left;
}

.client-remote-copy-block {
	margin-top: 8px;
	width: 100%;
	max-width: 620px;
	min-width: 150px;

	margin-left: auto;
	margin-right: auto;

	display: flex;
	flex-direction: column;
	gap: 10px;
	box-sizing: border-box;
}

.client-remote-copy-item {
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	overflow: hidden;
	border: 1px solid #7fd6a3;
	background: #eefbf3;
	border-radius: 10px;
	padding: 10px 12px;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.client-remote-copy-item:hover {
	background: #e4f7eb;
	border-color: #34a853;
	box-shadow: 0 4px 14px rgba(34, 139, 74, 0.12);
}

.client-remote-copy-value {
	display: block;
	width: 100%;
	max-width: 100%;
	box-sizing: border-box;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	font-size: 13px;
	color: #1f7a3a;
	font-weight: 700;
}


.document-confirmation-block {
	box-sizing: border-box;
	width: calc(100% - 20px);
	min-width: 250px;
	max-width: 794px;
	margin: 40px auto;
	padding: 30px;
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	text-align: center;
	font-size: 20px;
}

.document-confirmation-title {
	font-size: 20px;
	font-weight: 600;
	margin-bottom: 8px;
}

.document-confirmation-subtitle {
	font-size: 14px;
	color: #6b7280;
}

.document-confirmation-notice {
	box-sizing: border-box;
	width: 100%;
	max-width: 100%;
	margin: 20px 0 30px;
	padding: 18px 16px;
	background: #fff8e1;
	border: 1px solid #ffe082;
	border-radius: 8px;
	font-size: 14px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 18px;
	overflow: hidden;
}

.document-confirmation-notice-body {
	width: 100%;
	min-width: 0;
}

.document-confirmation-notice-icon {
	font-size: 28px;
	background-color: #ff9800;
	color: #fff;
	width: 40px;
	height: 40px;
	min-width: 40px;
	min-height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	font-weight: bold;
}

.document-confirmation-actions {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
	gap: 15px;
	align-items: stretch;
}

.document-confirmation-actions form {
	display: flex;
	margin: 0;
	min-width: 0;
}

.document-confirmation-actions .doc-action-btn {
	width: 100%;
	min-height: 80px;
	height: 100%;
}

.qualified-upload-form .doc-action-btn {
	min-height: 80px;
	height: 100%;
}
.qualified-upload-form {
	display: contents !important;
}

.qualified-upload-form .doc-action-btn {
	min-height: 150px;
	height: 100%;
}

@media (max-width: 640px) {
	.document-confirmation-block {
		width: calc(100% - 16px);
		padding: 16px;
		margin: 20px auto;
	}

	.document-confirmation-notice {
		padding: 14px 12px;
		gap: 14px;
	}

	.document-confirmation-actions {
		grid-template-columns: 1fr;
	}

	.signing-status-grid {
		width: 100%;
		min-width: 0;
		grid-template-columns: 1fr;
		text-align: center;
		row-gap: 3px;
	}

	.signing-status-grid > div {
		text-align: center !important;
	}

	.signing-status-grid > div:nth-child(odd) {
		font-weight: 600;
		margin-top: 8px;
	}

	.client-remote-copy-block {
		max-width: 100%;
	}
}

/* ========================= */
.employee-remote-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(1px);
	z-index: 9998;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px 14px;
	box-sizing: border-box;
}

.employee-remote-modal {
	width: 100%;
	max-width: 460px;
	background: #ffffff;
	border-radius: 12px;
	border: 1px solid #e5e7eb;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
	padding: 24px;
	box-sizing: border-box;
	text-align: center;
}

.employee-remote-modal-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 600;
	color: #111827;
}

.employee-remote-modal-text {
	margin: 0 0 20px;
	font-size: 14px;
	color: #6b7280;
}

.employee-remote-modal select {
	width: 100%;
	height: 36px;
	padding: 0 12px;
	margin-bottom: 20px;
	font-size: 14px;
	box-sizing: border-box;
}

.employee-remote-modal-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.employee-remote-modal-error {
	display: none;
	margin: 0 0 15px;
	padding: 10px 12px;
	background: #fee2e2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	color: #7f1d1d;
	font-size: 13px;
}

@media (max-width: 480px) {
	.employee-remote-modal {
		padding: 18px;
	}

	.employee-remote-modal-actions {
		grid-template-columns: 1fr;
	}
}

.action-select-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(1px);
	z-index: 9998;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 24px 14px;
	box-sizing: border-box;
}

.action-select-modal {
	width: 100%;
	max-width: 460px;
	background: #fff;
	border-radius: 14px;
	padding: 24px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
}

.action-select-modal-title {
	margin: 0 0 10px 0;
	font-size: 20px;
	font-weight: 700;
	color: #222;
}

.action-select-modal-text {
	margin: 0 0 18px 0;
	font-size: 14px;
	line-height: 1.5;
	color: #555;
}

.action-select-modal-error {
	display: none;
	margin-bottom: 14px;
	padding: 10px 12px;
	border-radius: 8px;
	background: #ffe8e8;
	color: #a30000;
	font-size: 14px;
	font-weight: 600;
}

.action-select-methods {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin-bottom: 20px;
}

.action-select-method-btn {
	width: 100%;
	border: 1px solid #d8dce3;
	background: #f8f9fb;
	border-radius: 10px;
	padding: 14px 16px;

	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;

	text-align: left;
	cursor: pointer;

	transition:
		background 0.15s ease,
		border-color 0.15s ease,
		box-shadow 0.15s ease;
}

.action-select-method-btn .doc-action-btn-title,
.action-select-method-btn .doc-action-btn-text {
	width: 100%;
	text-align: left;
}

.action-select-method-btn:hover {
	background: #eefbf3;
	border-color: #7fd6a3;
	box-shadow: 0 4px 14px rgba(34, 139, 74, 0.12);
}

.action-select-method-btn.selected {
	background: #e4f7eb;
	border-color: #34a853;
}

.action-select-modal-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 12px;
}

.action-select-method-btn.action-disabled {
	opacity: 0.45;
	cursor: not-allowed;
	filter: grayscale(0.2);
}

.action-select-method-btn.action-disabled:hover {
	transform: none !important;
	box-shadow: none !important;
}

/* ========================= */
.tosign-page {
	max-width: 900px;
	margin: 0 auto;
	padding: 30px 20px;
}

.tosign-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 25px;
}

.tosign-title {
	font-size: 26px;
	font-weight: bold;
	color: #111827;
}

.tosign-user {
	font-size: 14px;
	color: #4b5563;
}

.tosign-logout-form {
	margin: 0;
}

.tosign-logout-btn {
	padding: 7px 14px;
	border: 1px solid #d1d5db;
	background: #fff;
	border-radius: 6px;
	cursor: pointer;
}

.tosign-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tosign-empty {
	padding: 35px;
	background: #fff;
	border: 1px dashed #d1d5db;
	border-radius: 10px;
	text-align: center;
	color: #6b7280;
	font-size: 18px;
}

.tosign-card {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 24px;
	align-items: center;
	padding: 28px 30px;
	border-radius: 16px;
	background: #ffffff;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
	border: 1px solid #e5e7eb;
	box-sizing: border-box;
}

.tosign-card-main {
	min-width: 0;
}

.tosign-card-title {
	font-size: 28px;
	font-weight: 800;
	color: #020617;
	margin-bottom: 26px;
	text-align: left;
}

.tosign-card-meta {
	display: grid;
	gap: 14px;
	max-width: 520px;
	margin-left: 40px;
}

.tosign-meta-row {
	display: grid;
	grid-template-columns: 160px 1fr;
	gap: 16px;
	align-items: baseline;
}

.tosign-meta-label {
	font-size: 18px;
	font-weight: 700;
	color: #64748b;
	text-align: right;
	white-space: nowrap;
}

.tosign-meta-value {
	font-size: 18px;
	font-weight: 400;
	color: #020617;
	text-align: left;
	word-break: break-word;
}

.tosign-card-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
}

.tosign-open-btn {
	min-width: 130px;
	height: 58px;
	border: 0;
	border-radius: 10px;
	background: #4ade80;
	color: #064e3b;
	font-size: 22px;
	font-weight: 400;
	cursor: pointer;
}

@media (max-width: 900px) {
	.tosign-card {
		grid-template-columns: 1fr;
		gap: 22px;
		padding: 24px 22px;
	}

	.tosign-card-title {
		font-size: 26px;
		text-align: center;
		margin-bottom: 26px;
	}

	.tosign-card-meta {
		margin-left: 0;
		max-width: none;
		gap: 18px;
	}

	.tosign-meta-row {
		display: block;
		text-align: center;
	}

	.tosign-meta-label {
		display: block;
		text-align: center;
		font-size: 18px;
		margin-bottom: 8px;
	}

	.tosign-meta-value {
		display: block;
		text-align: center;
		font-size: 18px;
	}

	.tosign-card-actions {
		justify-content: center;
	}

	.tosign-open-btn {
		width: 150px;
		height: 60px;
		font-size: 22px;
	}
}


.document-edit-field {
	min-height: 34px;
	padding: 6px 10px;
	border: 1px dashed #2563eb;
	border-radius: 8px;
	background: #eff6ff;
	color: #1e3a8a;
	font-size: 11px;
	box-sizing: border-box;
	width: 100%;
}

.document-edit-field:focus {
	outline: none;
	border-color: #1d4ed8;
	background: #dbeafe;
}

.document-edit-textarea {
	min-height: 70px;
	resize: vertical;
}

.option-label {
	display: flex;
	align-items: center;
	gap: 10px;

	margin: 7px 0;

	font-size: 14px;
	line-height: 1.45;

	cursor: pointer;
}

.option-label input[type="checkbox"],
.option-label input[type="radio"] {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

.custom-checkbox {
	position: relative;

	flex: 0 0 20px;

	width: 20px;
	height: 20px;

	box-sizing: border-box;

	border: 1px dashed #22c55e;
	border-radius: 5px;

	background: #f0fdf4;

	transition:
		background 0.15s ease,
		border-color 0.15s ease,
		transform 0.15s ease;
}

.option-label:hover .custom-checkbox {
	background: #dcfce7;
	border-color: #16a34a;
}

.option-label input[type="checkbox"]:checked + .custom-checkbox,
.option-label input[type="radio"]:checked + .custom-checkbox {
	background: #dcfce7;
	border-color: #16a34a;
}

.option-label input[type="checkbox"]:checked + .custom-checkbox::after,
.option-label input[type="radio"]:checked + .custom-checkbox::after {
	content: "";

	position: absolute;

	left: 5px;
	top: 0px;

	width: 10px;
	height: 16px;

	border-right: 4px solid #16a34a;
	border-bottom: 4px solid #16a34a;

	transform: rotate(45deg);
}

.document-template-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 6px 0 10px 0;
}

.document-template-chip {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 10px;
	border: 1px solid #bfdbfe;
	border-radius: 999px;
	background: #eff6ff;
	color: #1d4ed8;
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	transition:
		background 0.18s ease,
		border-color 0.18s ease,
		color 0.18s ease,
		transform 0.12s ease;
	-webkit-tap-highlight-color: transparent;
}

.document-template-chip:hover {
	background: #dbeafe;
	border-color: #93c5fd;
}

.document-template-chip:active {
	transform: scale(0.97);
	background: #bfdbfe;
}

.document-template-chip:focus {
	outline: none;
	box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.18);
}

@media (max-width: 900px) {

	.document-template-chips {
		gap: 8px;
	}

	.document-template-chip {
		min-height: 38px;
		padding: 8px 12px;
		font-size: 12px;
	}
}