.company-matrix-card {
	overflow: hidden;
	margin-bottom: 0;
}

.company-matrix-card .card-body {
	overflow: hidden;
}

.company-matrix-scroll {
	position: relative;
	width: 100%;
	height: calc(100vh - 260px);
	min-height: 400px;
	overflow: auto;
}

.company-matrix-table {
	width: max-content;
	min-width: 100%;
	margin-bottom: 0;
	border-collapse: separate;
	border-spacing: 0;
}

.company-matrix-table th,
.company-matrix-table td {
	border-right: 1px solid #e9e9ef;
	border-bottom: 1px solid #e9e9ef;
	vertical-align: middle;
	background: #fff;
}

.company-matrix-table thead th {
	position: sticky;
	top: 0;
	z-index: 20;
	padding: 8px 6px;
	background: #f8f9fa;
	font-size: 12px;
	font-weight: 600;
	text-align: center;
	white-space: nowrap;
}

.company-matrix-table tbody td {
	padding: 5px 6px;
	font-size: 13px;
}

.company-column {
	position: sticky;
	left: 0;
	z-index: 10;
	width: 140px;
	min-width: 140px;
	max-width: 140px;
	background: #fff !important;
}

.company-matrix-table thead .company-column {
	z-index: 30;
	background: #f8f9fa !important;
}

.company-name {
	margin-bottom: 3px;
	color: #343a40;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.2;
	white-space: normal;
	overflow-wrap: anywhere;
}

.company-meta {
	color: #74788d;
	font-size: 10px;
	line-height: 1.25;
	white-space: normal;
}

.vector-column {
	position: sticky;
	left: 140px;
	z-index: 10;
	width: 280px;
	min-width: 280px;
	max-width: 280px;
	background: #fff !important;
	box-shadow: 4px 0 6px -5px rgba(0, 0, 0, 0.35);
}

.company-matrix-table thead .vector-column {
	z-index: 30;
	background: #f8f9fa !important;
}

.vector-column-header {
	position: relative;
	display: block;
	padding-right: 31px;
}

.vector-list {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.vector-badge {
	display: flex;
	align-items: center;
	justify-content: space-between;
	width: 100%;
	padding: 2px 5px;
	overflow: hidden;
	border-radius: 3px;
	background: #f1f3f5;
	color: #495057;
	font-size: 10px;
	line-height: 1.2;
	white-space: nowrap;
}

.vector-badge strong {
	margin-right: 5px;
	overflow: hidden;
	text-overflow: ellipsis;
}

.vector-badge span {
	flex-shrink: 0;
}

.edit-fiscal-vectors-btn {
	position: absolute;
	top: 0;
	right: 0;
	z-index: 15;
	padding: 2px 6px;
	line-height: 1.2;
}

.task-column {
	width: 110px;
	min-width: 110px;
	max-width: 110px;
	text-align: center;
}

.company-matrix-table thead .task-column {
	height: 72px;
	padding: 6px;
	overflow: visible;
	font-size: 12px;
	line-height: 1.2;
	vertical-align: middle;
	white-space: normal;
	overflow-wrap: break-word;
	word-break: normal;
}

.task-cell {
	position: relative;
	height: 48px;
	text-align: center;
}

.task-cell-content {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 34px;
}

.task-cell-na {
	background: #f5f6f8 !important;
	color: #adb5bd;
}

.task-na {
	color: #adb5bd;
	font-size: 15px;
}

.task-cell-completed {
	background: #d1e7dd !important;
}

.task-cell-zero {
	background: #fff3cd !important;
}

.task-cell-saving {
	opacity: 0.6;
}

.matrix-checkbox {
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.matrix-checkbox:disabled {
	cursor: wait;
	opacity: 0.7;
}

.task-applicability-btn,
.task-zero-amount-btn {
	position: absolute;
	top: 4px;
	right: 4px;
	z-index: 15;
	min-width: 21px;
	height: 20px;
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 10px;
	font-weight: 700;
	line-height: 16px;
}

.task-applicability-btn i {
	font-size: 11px;
	line-height: 1;
}

.task-zero-amount {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 28px;
	height: 22px;
	padding: 2px 7px;
	border-radius: 10px;
	background: #ffc107;
	color: #343a40;
	font-size: 11px;
	font-weight: 700;
}

.company-matrix-table tbody tr:hover td {
	background: #fbfcfd;
}

.company-matrix-table tbody tr:hover .company-column,
.company-matrix-table tbody tr:hover .vector-column {
	background: #fbfcfd !important;
}

.company-matrix-table tbody tr:hover .task-cell-na {
	background: #f1f2f4 !important;
}

.company-matrix-table tbody tr:hover .task-cell-completed {
	background: #badbcc !important;
}

.company-matrix-table tbody tr:hover .task-cell-zero {
	background: #ffecb5 !important;
}

.matrix-period {
	display: flex;
	align-items: end;
	gap: 10px;
	flex-wrap: wrap;
}

.matrix-period .form-group {
	min-width: 130px;
}

.matrix-period .matrix-user-group {
	min-width: 220px;
}

.matrix-period .form-label {
	margin-bottom: 4px;
	font-size: 12px;
}

.matrix-info {
	color: #74788d;
	font-size: 12px;
}

.matrix-fiscal-vectors-modal-body {
	padding: 12px;
}

.matrix-fiscal-vector-field {
	height: 100%;
	padding: 8px 10px;
	border: 1px solid #e9e9ef;
	border-radius: 4px;
	background: #f8f9fa;
}

.matrix-fiscal-vector-field .form-label {
	display: block;
	margin-bottom: 3px;
	color: #495057;
	font-size: 12px;
	font-weight: 600;
}

.matrix-fiscal-vector-field .form-select {
	font-size: 12px;
}

.company-matrix-scroll::-webkit-scrollbar {
	width: 12px;
	height: 12px;
}

.company-matrix-scroll::-webkit-scrollbar-thumb {
	border-radius: 6px;
	background: #c5c7cc;
}

.company-matrix-scroll::-webkit-scrollbar-track {
	background: #f1f1f1;
}

@media (max-width: 991px) {
	.company-column {
		width: 130px;
		min-width: 130px;
		max-width: 130px;
	}

	.vector-column {
		left: 130px;
		width: 260px;
		min-width: 260px;
		max-width: 260px;
	}
}
.task-cell-manually-na {
	background: #f8d7da !important;
}

.task-manually-na {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #dc3545;
	color: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
}

.company-matrix-table tbody tr:hover .task-cell-manually-na {
	background: #f5c2c7 !important;
}