/* css/incoming_other_materials.css - FINAL CONSOLIDATED VERSION */

/* --- Global and Header Styles --- */

body { 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; 
    margin: 0; padding: 0; 
    background-color: #f4f4f9; 
}
header { 
    background-color: #28a745; /* Green header */
    color: white; 
    padding: 20px 0; 
    text-align: center; 
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}
header h1 { 
    margin: 0; 
    font-size: 1.8em; 
}
.main-container { 
    max-width: 90%; 
    margin: 30px auto; 
    padding: 20px; 
    background-color: #f0fff0; /* Light green container */
    border-radius: 8px; 
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.1);
}

/* --- Input Form Styles --- */
.form-section { text-align: center; }
.form-group { margin-bottom: 20px; }
.form-group label { 
    display: block; 
    font-weight: bold; 
    margin-bottom: 8px; 
    color: #333; 
}
input[type="file"], select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 100%;
    max-width: 400px;
    box-sizing: border-box;
    font-size: 1em;
    margin-bottom: 15px;
}
button {
    background-color: #28a745; /* Green button */
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    transition: background-color 0.3s;
}
button:hover { background-color: #1e7e34; }
.warning-label { 
    font-weight: bold; 
    font-size: 1.1em; 
    color: #dc3545;
    display: block;
    margin-top: 10px;
}

/* Instructions Box Styling */
.instructions { 
    background-color: #e9ecef; 
    padding: 15px; 
    border-radius: 4px; 
    margin: 20px auto; /* Center it */
    text-align: left;
    white-space: pre-wrap;
    font-size: 0.9em;
    color: #555;
    border: 1px solid #ccc;
    width: 100%;
    box-sizing: border-box;
}

/* --- Report Table Styles --- */
.report-section h2 { 
    text-align: center; 
    color: #28a745; 
    margin-bottom: 20px; 
}
.table-container { 
    overflow-x: auto; 
    margin-top: 20px; 
    border: 1px solid #ddd; 
    border-radius: 6px;
}
table { 
    width: 100%; 
    border-collapse: collapse; 
    font-size: 0.85em;
}
th, td { 
    padding: 8px 12px; 
    border-right: 1px solid #ddd;
}
th:last-child, td:last-child { 
    border-right: none; 
}
th { 
    background-color: #e2f0d9;
    font-weight: bold; 
    text-align: center;
    border-bottom: 2px solid #28a745;
}
td { 
    text-align: right; 
    border-bottom: 1px solid #eee; 
}
tr:nth-child(even) { background-color: #fcfcfc; }

.total-row td { 
    font-weight: bold; 
    border-top: 2px solid #333; 
    border-bottom: 2px solid #333;
    background-color: #d4edda !important;
}
.action-bar { 
    text-align: center; 
    margin-top: 30px; 
    padding-top: 20px; 
    border-top: 1px solid #ddd; 
}
.action-bar a, .action-bar button { margin: 0 10px; }
.exit-link { text-align: center; padding: 20px; }


/* --- FINAL SIGNATURE STYLING --- */
.signature-notes-section {
    clear: both;
    margin-top: 40px;
    padding: 0 10px;
    text-align: center;
}

.inspection-note {
    font-size: 0.9em;
    text-align: left;
    margin-bottom: 30px;
    white-space: pre-wrap; 
}

.signature-line-group {
    display: flex;
    justify-content: space-between; /* Space out the two signature blocks */
    gap: 100px;
    width: 100%;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.signature-block {
    width: 250px; /* Width of the underline */
    text-align: center;
    position: relative; 
    height: 30px; 
}

.signature-line {
    border-bottom: 1px solid black;
    height: 1px;
    width: 100%;
    margin-bottom: 5px;
    position: absolute;
    top: 0;
    left: 0;
}

.signature-block .label {
    display: block;
    font-size: 0.85em;
    font-weight: normal; /* FINAL FIX: Ensure text is not bold */
    text-align: center;
    position: absolute;
    width: 100%;
    top: 5px; /* Pushes text down below the line */
}

/* --- Print Styles --- */
@media print {
    body { font-size: 8pt; }
    header, .action-bar, .instructions, .exit-link { 
        display: none !important;
    }
    .main-container { 
        box-shadow: none; margin: 0; padding: 0; max-width: 100%; width: 100%;
    }
    .table-container { overflow: visible; border: none; margin: 0 !important; padding: 0 !important; }
    table { width: 100%; page-break-inside: auto; }
    th, td { 
        border: 1px solid #000; padding: 2px 4px; 
    }
    th:last-child, td:last-child { border-right: 1px solid #000; }
    .total-row td:first-child { text-align: right; }
    
    /* Ensure signatures and notes are visible and correctly positioned for print */
    .signature-notes-section {
        display: block !important;
        margin-top: 20px;
        text-align: center;
    }
    .signature-line-group {
        display: flex;
        justify-content: space-between;
        gap: 30px;
        margin-top: 40px;
        width: 100%;
    }
    .signature-block {
        width: 45%; 
        height: auto;
    }
    .signature-line {
        border-bottom: 1px solid black;
        top: 0;
    }
    .signature-block .label {
        font-weight: normal;
        font-size: 7pt;
        top: 5px;
    }
}