/* Font Definitions - Using modern, accessible fonts */
@font-face {
    font-family: 'GreatVibes';
    src: url('GreatVibes-Regular.otf') format('opentype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'AnandaBlack';
    src: url('Ananda Black Personal Use.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

@font-face {
    font-family: 'FeFCrm';
    src: url('FeFCrm2.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* Global Body Styling - Clean and professional */
body {
    font-size: 16px;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    background: linear-gradient(135deg, #f0f4f8, #e9ecef);
    color: #1a1a1a;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
}

/* General Table Styling (table2) - Modern and sleek */
table.table2 {
    color: #1a1a1a;
    width: 100%;
    border-collapse: collapse;
    margin: 24px auto;
    font-size: 15px;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-weight: 400;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    overflow: hidden;
}

/* Header Section - Bold and centered */
table.table2 h3 {
    text-align: center;
    font-size: 20px;
    text-transform: uppercase;
    font-weight: 700;
    color: #005f73;
    margin: 12px 0;
    letter-spacing: 0.05em;
}

/* Table Cells - Clean with subtle borders */
table.table2 td {
    border: 1px solid #94d2bd;
    padding: 12px;
    vertical-align: top;
    background: #ffffff;
    transition: background 0.2s ease;
}

/* Table Rows - Improved spacing */
table.table2 tr {
    margin-bottom: 12px;
}

/* Table Header - Gradient with contrast */
table.table2 tr th {
    background: linear-gradient(135deg, #005f73, #0a9396);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    border: 1px solid #005f73;
    padding: 12px;
    letter-spacing: 0.03em;
}

/* Highlighted Text - Emphasized */
table.table2 u {
    font-weight: 600;
    color: #005f73;
    text-decoration: underline;
}

/* Centered Text for Specific Columns */
table.table2 td[colspan="6"], table.table2 td[colspan="7"] {
    text-align: center;
}

/* Horizontal Rule - Subtle gradient */
table.table2 hr {
    border: 0;
    height: 2px;
    background: linear-gradient(to right, #005f73, #94d2bd);
    margin: 16px 0;
}

/* Watermark - Adjusted for clarity */
table.table2 {
    background: url('../<?php echo $wm; ?>') no-repeat center center;
    background-size: 300px auto;
    background-position: 50% 50%;
    opacity: 0.9;
}

/* Paragraphs - Smaller notes */
table.table2 p {
    font-size: 13px;
    margin: 6px 0;
    color: #4a4a4a;
}

/* Footer - Professional alignment */
table.table2 td[valign="bottom"] {
    text-align: right;
    font-size: 15px;
    padding-top: 24px;
    color: #005f73;
}

/* Print Styles - Optimized for clarity */
@media print {
    body {
        margin: 0;
        background: #ffffff;
    }

    @page {
        size: letter;
        margin: 0.5cm;
    }
}

/* Table3 Styling - Consistent with table2 */
table.table3 {
    width: 100%;
    border: 2px solid #005f73;
    border-collapse: collapse;
    margin: 24px auto;
    font-size: 15px;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    background-color: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

/* Table3 Header - Unified design */
table.table3 th {
    background: linear-gradient(135deg, #005f73, #0a9396);
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    padding: 14px;
    border: 2px solid #005f73;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Table3 Cells - Clean and readable */
table.table3 td {
    border: 1px solid #94d2bd;
    padding: 12px;
    vertical-align: top;
}

/* Borderless Cells for table3 */
table.table3 td2 {
    border: 0;
    padding: 12px;
    vertical-align: top;
}

/* Alternating Rows - Subtle contrast */
table.table3 tr:nth-child(even) {
    background-color: #e9ecef;
}

/* SOAP Content - Clear typography */
table.table3 td p {
    margin: 6px 0;
    font-size: 14px;
    color: #1a1a1a;
}

/* Table4 Styling - Consistent design */
table.table4 {
    width: 100%;
    border: 2px solid #94d2bd;
    border-collapse: collapse;
    margin: 24px auto;
    font-size: 15px;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    background-color: #f8fafc;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border-radius: 8px;
}

/* Table4 Header - Matching aesthetic */
table.table4 th {
    background: linear-gradient(135deg, #005f73, #0a9396);
    color: #ffffff;
    font-weight: 600;
    text-align: center;
    padding: 14px;
    border: 2px solid #94d2bd;
    text-transform: uppercase;
}

/* Table4 Cells - Consistent padding */
table.table4 td {
    border: 1px solid #94d2bd;
    padding: 12px;
    vertical-align: top;
}

/* Alternating Rows - Subtle contrast */
table.table4 tr:nth-child(even) {
    background-color: #e9ecef;
}

/* LABS Content - Readable */
table.table4 td p {
    margin: 6px 0;
    font-size: 14px;
    color: #1a1a1a;
}

/* Category Headers - Bold */
table.table4 td b {
    font-size: 15px;
    color: #005f73;
}

/* Table5 Styling - Modern and spacious */
table.table5 {
    width: 100%;
    margin: 24px auto;
    font-size: 15px;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    border-spacing: 0 14px;
}

/* Table5 Header - Clean and bold */
table.table5 th {
    background: linear-gradient(135deg, #005f73, #0a9396);
    color: #ffffff;
    font-weight: 600;
    text-align: left;
    padding: 14px 16px;
    text-transform: uppercase;
    font-size: 16px;
    letter-spacing: 0.05em;
}

/* Table5 Cells - Elevated with shadow */
table.table5 td {
    padding: 14px 16px;
    vertical-align: top;
    background-color: #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    color: #1a1a1a;
    border-radius: 6px;
}

/* Alternating Rows - Subtle variation */
table.table5 tr:nth-child(even) td {
    background-color: #f8fafc;
}

/* Hover Effect - Smooth transition */
table.table5 tr:hover td {
    background-color: #e9ecef;
}

/* Text Alignment - Consistent */
table.table5 th, table.table5 td {
    text-align: left;
}

/* Paragraphs in Cells - Spaced */
table.table5 td p {
    margin: 6px 0;
}

/* Responsive Design - Mobile-friendly */
@media screen and (max-width: 768px) {
    table.table5, table.table5 th, table.table5 td {
        font-size: 13px;
    }

    table.table5 th, table.table5 td {
        padding: 10px 12px;
    }
}

/* Borderless Table - Clean and minimal */
.borderless-table {
    width: 100%;
    margin: 24px auto;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    border-collapse: separate;
    border-spacing: 0 14px;
}

.borderless-table tr {
    background-color: #f8fafc;
}

.borderless-table tr:nth-child(even) {
    background-color: #e9ecef;
}

.borderless-table td {
    padding: 14px 16px;
    vertical-align: top;
    background-color: #ffffff;
    color: #1a1a1a;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
    border-radius: 6px;
}

/* Hover Effect - Smooth */
.borderless-table tr:hover td {
    background-color: #e9ecef;
}

/* Responsive Borderless Table */
@media screen and (max-width: 768px) {
    .borderless-table, .borderless-table td {
        font-size: 13px;
    }

    .borderless-table td {
        padding: 10px 12px;
    }
}

/* Style Classes - Refined */
.style1 {
    font-size: 13px;
    font-style: italic;
    font-weight: 600;
	    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    color: #005f73;
}

.style8 {
    font-size: 15px;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
}

.style9 {
    font-size: 15px;
    font-weight: 600;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
}

/* General Table - Simplified */
.table td, .table th {
    text-align: left;
    padding: 10px;
}

.td {
    padding: 16px;
}

/* Alternating Rows - Consistent gradients */
.even2 {
    background: linear-gradient(135deg, #0a9396, #94d2bd);
    color: #ffffff;
}

.odd {
    background: linear-gradient(135deg, #005f73, #0a9396);
    color: #ffffff;
    width: 100%;
    border-collapse: collapse;
    margin: 24px auto;
    font-size: 15px;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-weight: 500;
}

.odd2 {
    background: linear-gradient(135deg, #e9ecef, #f8fafc);
}

/* Form Controls - Modern and accessible */
.form-control2 {
    display: inline-block;
    width: 50%;
    height: 40px;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #ffffff;
    border: 1px solid #94d2bd;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control2:focus {
    border-color: #005f73;
    outline: 0;
    box-shadow: 0 0 6px rgba(0, 95, 115, 0.3);
}

.form-control3 {
    display: inline-block;
    width: 100%;
    height: 40px;
    padding: 10px 14px;
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a;
    background-color: #ffffff;
    border: 1px solid #94d2bd;
    border-radius: 8px;
    box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control3:focus {
    border-color: #005f73;
    outline: 0;
    box-shadow: 0 0 6px rgba(0, 95, 115, 0.3);
}

/* Images - Responsive */
img.100 {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

/* Links - Clean and interactive */
a {
    color: #005f73;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: #0a9396;
    text-decoration: underline;
}

a.white {
    color: #ffffff;
}

/* Footer - Fixed and modern */
p.footer {
    color: #ffffff;
    bottom: 0;
    height: 40px;
    right: 0;
    left: 0;
    position: fixed;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #005f73, #0a9396);
    padding: 10px 0;
    font-size: 14px;
}

/* Print Page Setup - Optimized */
@page {
    size: 8.5in 11in;
    margin: 0.5cm;
}

/* Footer for Print */
@media screen {
    div.divFooter {
        margin-top: 600px;
        text-align: center;
        display: none;
    }
}

@media print {
    div.divFooter {
        text-align: center;
        position: fixed;
        bottom: 0;
        color: #005f73;
    }
}

/* Popup Window - Modern and centered */
.window {
    max-width: 800px;
    z-index: 9999;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    margin: auto;
    background-color: #ffffff;
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 16px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.15);
}

.window img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

/* Popup Mask - Smooth fade */
#mask {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    right: 0;
    margin: auto;
    visibility: hidden;
    z-index: -2;
    background: rgba(0, 0, 0, 0.85);
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

#mask.showing {
    opacity: 1;
    z-index: 9000;
    visibility: visible;
    overflow: auto;
}

/* Popup Layout */
#boxes {
    display: table;
    width: 100%;
    height: 100%;
}

.inner {
    display: table-cell;
    vertical-align: middle;
}

#popupfoot {
    font-size: 15px;
    color: #1a1a1a;
}

.showImage {
    margin: 0 0 3.5em;
    display: table;
    text-align: center;
}

.showImage img {
    display: block;
    border-radius: 8px;
}

/* Custom Font - Elegant */
.wong {
    font-family: 'GreatVibes', cursive;
    font-size: 24px;
    color: #005f73;
}

/* Heading - Bold and modern */
.heading {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 26px;
    color: #005f73;
    font-weight: 700;
    text-transform: capitalize;
    text-decoration: underline;
    text-indent: 12px;
}

/* Footer - Clean and centered */
.foot {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-weight: 500;
    font-size: 13px;
    color: #ffffff;
    background: linear-gradient(135deg, #005f73, #0a9396);
    padding: 12px;
    text-align: center;
    border-radius: 6px;
}

/* Data - Clear and readable */
.data {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 600;
    vertical-align: middle;
}

/* Alternating Rows - Unified */
.odd {
    color: #ffffff;
    background: linear-gradient(135deg, #005f73, #0a9396);
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 15px;
    vertical-align: middle;
    text-indent: 2mm;
}

.even {
    color: #ffffff;
    background: linear-gradient(135deg, #0a9396, #94d2bd);
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 15px;
    vertical-align: middle;
    text-indent: 2mm;
}

/* Buttons - Modern and interactive */
.buttons {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 15px;
    color: #ffffff;
    white-space: normal;
    display: inline-block;
    border: 1px solid #005f73;
    font-weight: 600;
    background: linear-gradient(135deg, #005f73, #0a9396);
    cursor: pointer;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.buttons:hover {
    background: linear-gradient(135deg, #0a9396, #005f73);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Form Boxes - Clean input fields */
.forms_boxes {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 15px;
    padding: 1.2%;
    color: #1a1a1a;
    background-color: #ffffff;
    border: 1px solid #94d2bd;
    border-radius: 8px;
    transition: border-color 0.2s ease;
}

.forms_boxes:focus {
    border-color: #005f73;
    box-shadow: 0 0 6px rgba(0, 95, 115, 0.3);
}

/* Button Links - Consistent with buttons */
.buttons_links {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 15px;
    background: linear-gradient(135deg, #005f73, #0a9396);
    color: #ffffff;
    text-decoration: none;
    border: 1px solid #005f73;
    font-weight: 600;
    padding: 10px 16px;
    vertical-align: middle;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.buttons_links:hover {
    background: linear-gradient(135deg, #0a9396, #005f73);
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

/* Error Messages - Clear and noticeable */
.error {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    color: #d90429;
    font-style: italic;
}

/* Borders - Subtle dotted */
.borders {
    border: 1px dotted #005f73;
}

/* Instructions - Informative */
.instructions {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 14px;
    font-style: italic;
    font-weight: 500;
    color: #4a4a4a;
}

/* Prescription Titles and Data - Consistent and clear */
.rx_title {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #005f73, #0a9396);
    padding: 6px 12px;
    border-radius: 6px;
}

.rx_titlenew {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #0a9396, #94d2bd);
    padding: 6px 12px;
    border-radius: 6px;
}

.rx_even {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    background: #e9ecef;
    padding: 6px;
    border-radius: 4px;
}

.rx_odd {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
    background: #f8fafc;
    padding: 6px;
    border-radius: 4px;
}

.rx_print_title {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 15px;
    font-weight: 600;
    color: #005f73;
}

.rx_print_title_med {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: #005f73;
}

.rx_print_title2 {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 13px;
    font-weight: 600;
    color: #005f73;
}

.rx_print_title3 {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 14px;
    color: #1a1a1a;
}

.rx_print_data {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: normal;
    color: #1a1a1a;
}

.rx_print_data2 {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: normal;
    font-style: italic;
    color: #4a4a4a;
}

.rx_print_data3 {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 13px;
    font-weight: normal;
    color: #1a1a1a;
}

.rx_print_data_med {
    font-family: 'Inter', 'Poppins', 'Arial', sans-serif;
    font-size: 14px;
    font-weight: normal;
    line-height: 20px;
    color: #1a1a1a;
}

/* Paging - Clean and interactive */
.paging {
    padding: 12px 0;
    background: #ffffff;
    color: #d90429;
    text-align: center;
}

.paging a {
    padding: 6px 12px;
    color: #005f73;
    text-decoration: none;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.paging a:hover {
    background: #e9ecef;
    color: #0a9396;
}