:root {
    --header-bg: #000000;
    --text-color: #000000;
}

body {
    font-family: Arial, sans-serif;
    background-color: #f0f0f0;
    margin: 0;
    padding: 20px;
    color: var(--text-color);
}

.container {
    max-width: 210mm;
    margin: 0 auto;
    background: white;
    padding: 20px 40px;
    /* Adjusted padding */
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    min-height: 297mm;
    box-sizing: border-box;
    position: relative;
}

/* Header Logos Area */
.header-logos {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: none;
    /* Removed previous border */
}

.logo-placeholder {
    /* Simulating the logos in the top header */
    display: flex;
    gap: 15px;
    align-items: center;
}

.top-title-bar {
    background-color: black;
    color: white;
    text-align: center;
    padding: 10px 0;
    font-weight: bold;
    font-size: 16px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

/* Section Headers */
.section-header {
    background-color: black;
    color: white;
    text-align: center;
    padding: 5px 0;
    border-radius: 20px;
    font-weight: bold;
    margin-top: 5px;
    margin-bottom: 5px;
    font-size: 14px;
    text-transform: uppercase;
}

/* Form Layout */
.row {
    display: flex;
    gap: 30px;
    margin-bottom: 5px;
}

.col {
    flex: 1;
}

.form-group {
    display: flex;
    align-items: flex-start;
    margin-bottom: 4px;
}

.form-group label {
    width: 140px;
    /* Fixed width for labels */
    font-size: 13px;
    font-weight: normal;
    padding-top: 3px;
    flex-shrink: 0;
}

.tbl-item {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.tbl-item th, #tbl-item td {
    border: 1px solid #000;
    padding: 3px;
    font-size: 12px;
}


/* Dotted Inputs */
.dotted-input {
    flex-grow: 1;
    border: none;
    border-bottom: 1px dotted #000;
    font-family: inherit;
    font-size: 13px;
    padding: 2px 5px;
    outline: none;
    background: transparent;
    width: 100%;
    resize: none;
    overflow: hidden;
    min-height: 20px;
    vertical-align: bottom;
}

.auto-shrink {
    white-space: nowrap;
    overflow: hidden;
    height: 25px !important;
    /* Force static height for shrink fields */
    resize: none;
}

.dotted-input:focus {
    border-bottom: 1px solid #000;
}

/* Checkboxes */
.checkbox-group {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
    font-size: 13px;
}

.checkbox-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

/* Table */
.test-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    font-size: 13px;
}

.test-table th {
    border: 1px solid black;
    padding: 5px;
    text-align: center;
    font-weight: bold;
    background: #fff;
    font-size: 11px;
}

.test-table td {
    border: 1px solid black;
    padding: 2px;
    height: 20px;
}

.test-table textarea {
    width: 100%;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: inherit;
    resize: none;
    overflow: hidden;
    background: transparent;
}

/* Footer Section */
.footer-info {
    font-size: 12px;
    margin-top: 10px;
    font-style: italic;
    text-align: center;
    margin-bottom: 30px;
}

.signatures {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
    border-top: 1px dashed #000;
    padding-top: 10px;
}

.sign-left {
    width: 40%;
}

.sign-right {
    width: 50%;
    display: flex;
    justify-content: space-between;
}

.sign-box {
    text-align: center;
}

.sign-line {
    margin-top: 50px;
    border-top: 1px solid #000;
    width: 150px;
    margin-left: auto;
    margin-right: auto;
    margin-bottom: 5px;
}

.bottom-bar {
    background-color: black;
    color: white;
    text-align: center;
    font-size: 11px;
    padding: 5px;
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
}

.controls {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.btn {
    padding: 10px 20px;
    cursor: pointer;
    font-weight: bold;
    border-radius: 5px;
    border: none;
    color: white;
}

.btn-download {
    background: #e74c3c;
}

.btn-email {
    background: #3498db;
}

/* Print Overrides */
@media print {
    body {
        background: white;
        padding: 0;
    }

    .container {
        box-shadow: none;
        padding: 20px;
        width: 100%;
        max-width: 100%;
        margin: 0;
    }

    .controls {
        display: none;
    }

    /* Ensure background graphics print */
    * {
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
}