body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 20px;
    background-color: #f4f4f4;
    box-sizing: border-box;
}

.container {
     width: 950px;
    max-width: 100%;
    margin: 0 auto;
    background-color: #fff;
    padding: 10px;
    border-radius: 1px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    overflow: hidden; /* Prevent content overflow */
}

.table-container {
    flex: 1;
    
    max-height: none;
    overflow-y: auto;
    border: 1px solid #ddd;
    margin-bottom: 10px;
    background: white;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ccc;
    margin: -10px -20px 15px -20px; /* Expand to container edges */
    padding: 10px 20px;
}

.column {
    flex: 1;
    padding: 10px;
    min-width: 300px;
    display: flex;
    flex-direction: column;
    min-height: 0;
    background: none;
    border-radius:10px;
}

.left img {
    max-width: 180px;
    height: auto;
}

.middle {
    text-align: center;
    padding: 0 10px;
}

.right {
    text-align: right;
}

.centered-link {
    text-align: center;
    margin: 10px 0;
}

.form-container {
    display: flex;
    flex-wrap: nowrap;
    gap: px;
    justify-content: space-between;
    width: 100%;
    margin: 15px 0;
    align-items: flex-start;
}

.column-small {
    flex: 1;
    min-width: 0;
	max-width: 290px;
    padding: 10px;
    box-sizing: border-box;
    overflow: hidden;
    background: #fff;
    
    border-radius: 4px;
}

.form-group {
    margin-bottom: 12px;
}

.form-group label {
    display: block;
    font-weight: 400;
    margin-bottom: 5px;
    font-size: 12px;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 12px;
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 10px;
    background-color: #f9f9f9;
    border: 2px dashed #ddd;
    border-radius: 4px;
    margin-bottom: 15px;
    cursor: pointer;
}

.file-list {
    list-style-type: none;
    padding-left: 0;
    width: 100%;
}

.file-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px;
    margin: 5px 0;
    background-color: #fff;
    border: 1px solid #eee;
    border-radius: 4px;
}

.file-list-item button {
    padding: 3px 8px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

th, td {
    padding:3px;
    text-align: left;
    word-wrap: break-word;
    font-size: 12px;
    vertical-align: top;
}

th {
    background-color: #000080;
    color: white;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
}

table input {
    width: 99%;
    padding: 3px;
    border: 1px solid #ddd;
    border-radius: 3px;
    box-sizing: border-box;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield; /* Firefox */
}

/* Add remove button styling */
.remove-row {
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 3px;
    padding: 5px 8px;
    cursor: pointer;
    font-size: 12px;
}

/* Adjust table column widths */
th:nth-child(1) { width: 7%; }
th:nth-child(2) { width: 40%; }
th:nth-child(3) { width: 11%; }
th:nth-child(4) { width: 11%; }
th:nth-child(5) { width: auto;}

.submit-container {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.submit-button,
.clear-button,
.print-button {
    padding: 8px 20px; /* Reduced padding */
    
    max-width: 160px; /* Narrower buttons */
    min-width: 120px;
}

.submit-button {
    background-color: #007bff;
    color: #fff;
	font-size: 18px;
	font-weight: bold;
    border: 2px solid #0069d9;
}

.clear-button {
    background-color: #dc3545;
    color: white;
    border: 1px solid #c82333;
	font-size: 13px; /* Smaller text */
}

.print-button {
    background-color: #28a745;
    color: white;
    border: 1px solid #218838;
	font-size: 13px; /* Smaller text */
}

.sred {
    color: #dc3545;
    font-size: 13px;
    font-weight: 500;
}

.sblue {
    color: #007bff;
    font-size: 13px;
    font-weight: 500;
}

.revision-date {
    font-size: 11px;
    color: #666;
    display: block;
    margin-top: 5px;
}

@media screen and (max-width: 980px) {
    .container {
        width: 95%;
        padding: 15px;
    }
    
    .form-container {
        flex-wrap: wrap;
    }
    
    .column-small,
    .column {
        flex: 1 1 100%;
        min-width: auto;
        min-height: auto;
    }
    
    .table-container {
        max-height: 300px;
    }
    
    header {
        flex-wrap: wrap;
        text-align: center;
    }
    
    .column {
        text-align: center !important;
        margin: 5px 0;
    }
    
    .left img {
        margin: 0 auto;
    }
}

@media print {
    body {
        background-color: #fff;
        padding: 0;
        font-size: 10px;
    }
    
    .container {
        box-shadow: none;
        border-radius: 0;
        padding: 5px;
        width: 100%;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        padding: 5px;
        font-size: 10px;
        border: 1px solid #999;
    }
    
    th, td {
        font-size: 10px;
        padding: 4px;
    }
    
    .submit-container {
        display: none;
    }
    
    .dropzone {
        border: 1px solid #ccc;
    }
    
    .table-container {
        overflow: visible;
        max-height: none;
    }
}