body {
	display: flex;
	min-height: 100vh;
	background: linear-gradient(312deg, rgba(1,96,109,1) 0%, rgb(3, 150, 165) 100%);
	flex-direction: column;
}
header:before {
    content: "";
    position: fixed;
    z-index: 1;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: url("img/pattern.png") top left no-repeat transparent;
    background-size: cover;
    opacity: 0.7;
}
header,
footer {
	width: calc(100% + 6rem);
	margin-left: -3rem;
	max-height: none;
    background: rgba(0,0,0,0.2);
}
header {
    text-align: center;
    margin-bottom: 4rem;
}
header img {
	max-width: 80px;
	margin-right: 40px;
	filter: brightness(4);
}
header h2.text-light {
    opacity: 0.9;
}

#main_form {
    position: relative;
    z-index: 2;
}
#main_form > fieldset,
#referto {
    padding: 1.8rem 2.3rem 2.3rem;
    background: #dfeeef;
    border-radius: 5px;
    overflow: hidden;
    box-shadow: 0 0 0 8px rgba(0,0,0,0.08);
    margin-bottom: 4rem;
}
#main_form > fieldset > h4 {
	background: #b0d2d2;
	padding: 1rem 2.3rem;
	position: relative;
	width: calc(100% + 2.3rem + 2.3rem);
	top: -1.8rem;
	left: -2.3rem;
}
#main_form > fieldset hr {
    max-width: calc(100% - 1.6rem - 1.6rem);
    margin-left: 1.6rem;
    color: #00595f;
}
#main_form .input-group-text {
	background-color: #b0d2d2;
}

#main_form button,
#pageend_btns button {
    background: #00595f;
    color: #fff;
    font-weight: 600;
    text-shadow: 0 0 3px rgba(0,0,0,0.2);
    border: 2px solid rgba(255, 255, 255, 0.4);
    transition: all .2s ease;
}
#main_form button:hover,
#pageend_btns button:hover {
    background: #07848c;
}
.hide_report {
    background: rgba(91, 0, 0, 0.7) !important;
    color: #d2d2d2 !important;
}
.hide_report:hover {
    background: rgba(91, 0, 0, 0.9) !important;
}
footer {
    color: #bbb;
    display: flex;
	justify-content: center;
	align-items: center;
    font-size: 85%;
    padding: 16px 0;
    text-align: center;
}
@media screen and (max-width: 800px) {
    header > .d-flex {
        flex-direction: column !important;        
    }
    header img {
        margin: 0 0 15px;
        max-width: 55px;
    }
    header > .d-flex > div {
        text-align: center !important;        
    }
    header h1.fs-3 {
        font-size: 1.3rem !important;
    }
    header h2.fs-5 {
        font-size: 1.1rem !important;
    }
    .btns_wrap {
        display: grid;
        grid-template-columns: 100%;
        grid-gap: 12px;
    }
    .btns_wrap button {
        margin: 0 !important;   
    }
    #pageend_btns {
        padding: 3rem 0;    
    }
}





#referto {
    padding: 0;
    background: #fff;
	max-width: 1000px;
	margin: auto;
}
#referto,
#pageend_btns {
    margin-bottom: 0 !important;
    position: relative;
    z-index: 100;
}
#referto:empty {
    height: 0; !important;
    visibility: hidden;
}

#header_referto tr:first-of-type th:first-child,
#header_referto tr:first-of-type th:last-child {
	width: 170px;
	padding-top: 0 !important;
	padding-left: 0 !important;
	padding-bottom: 0 !important;
}
#header_referto tr:first-of-type th:last-child img {
	width: 115px;
    position: relative;
    top: 47px;
}
#referto > table {
    margin-bottom: 2.7rem;
}
#referto > table:first-of-type {
    margin: .3rem 0 .7rem;
}
#referto > table:last-of-type {
    margin-bottom: 0;
}
#referto > table tr:last-child th,
#referto > table tr:last-child td,
#header_referto th,
#header_referto td,
.referto_body_table > tbody > tr > td {
    border-bottom: none;
}
#referto table:not(#header_referto) .fs-5 {
    background: #b0d2d2; 
}
.referto_body_table:not(.referto_esame_eco_table) > tbody > tr > td {
    padding-top: .45rem !important;
    padding-bottom: 0 !important;
}
.referto_body_table:not(.referto_esame_eco_table) > tbody > tr:first-child > td {
    padding-top: 1rem !important;
}
.referto_body_table:not(.referto_esame_eco_table):last-of-type > tbody > tr:last-child > td {
    padding-bottom: 2rem !important;
}
#referto th,
#referto td {
    padding: .5rem 2rem;
}
#referto_esame_eco_head {
    margin-bottom: 0 !important;
}
#referto:not(.pdfing) .referto_esame_eco_table {
    margin-bottom: 35px !important;
}
#referto:not(.pdfing) .referto_esame_eco_table .fs-5 {
    font-size: 1.15rem !important;
    background: #f1f1f1 !important;
}
#referto:not(.pdfing) .referto_esame_eco_table tr td {
    transition: all .2s ease;
    vertical-align: middle;
}
#referto:not(.pdfing) .referto_esame_eco_table tr:hover td {
    background: #dff3f6 !important;
}
#referto:not(.pdfing) .table_2nd_td_right {
    margin: 0;
}
#referto:not(.pdfing) .table_2nd_td_right td {
    border: none !important;
    padding-top: 6px !important;
    padding-bottom: 6px !important;
    font-size: 0.9rem;
}
#referto:not(.pdfing) .table_2nd_td_right tbody td:nth-child(2) {
	text-align: right;
	padding-right: 0.7rem !important;
}
#referto:not(.pdfing) .table_2nd_td_right tbody td:nth-child(3) {
    padding-left: 0 !important;
    font-size: 88%;
    vertical-align: middle;
    width: 45px;
}
#referto:not(.pdfing) .table_2nd_td_right th {
    border-bottom: none !important;
}




.pdfing #header_referto .fs-4 {
    font-size: 18px !important;
    padding-top: 5px !important;
    line-height: 10px !important;
}
.pdfing #header_referto .fs-5 {
    font-size: 16px !important;
}
.pdfing #header_referto .fs-6 {
    font-size: 13px !important;
}
.pdfing #header_referto tr:last-of-type .fs-6 {
    padding-bottom: 15px !important;
    line-height: 0 !important;
}
.pdfing .referto_body_table th, 
.pdfing .referto_body_table td {
	padding: .5rem !important;
}
.pdfing .referto_body_table:not(.referto_esame_eco_table) th.fs-5 {
    padding-top: 0.7rem !important;
    font-size: 0.9rem !important;
}
.pdfing .referto_body_table > tbody > tr > td {
    font-size: 13px !important;
    padding-bottom: 12px !important;
    padding-top: 0 !important;
}
.pdfing .referto_body_table > tbody > tr:first-child > td {
    padding-top: 18px !important;
}
.pdfing .referto_body_table > tbody > tr:last-child > td {
    padding-bottom: 18px !important;
}

.pdfing .referto_esame_eco_table > thead th {
    font-size: 0.85rem !important;
    color: #555555;
    background: #eee !important;
    margin-bottom: 0 !important;
}
.pdfing .referto_esame_eco_table > tbody > tr > td {
    font-size: 12px !important;
    padding-bottom: 4px !important;
    padding-top: 4px !important;
    padding-left: 0.5rem !important;
}
.pdfing .referto_esame_eco_table > tbody > tr > td:nth-child(2) {
    text-align: right;
    padding-right: 0px !important;
}
.pdfing .referto_esame_eco_table > tbody > tr > td:nth-child(3) {
    font-size: 11px !important;
    color: #666666;
}