body {
    font-family: SimSun, sans-serif; /* 使用宋体或无衬线字体 */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    margin: 20px;
    background-color: #f4f4f4;
    color: #000; /* 设置默认文字颜色为黑色 */
}

.container {
    width: 90%;
    max-width: 1000px;
    border: 1px solid #0056b3; /* 边框改为蓝色 */
    padding: 20px;
    background-color: #fff;
}

h1 {
    text-align: center;
    font-size: 24px;
    margin-bottom: 20px;
    font-weight: bold;
    color: #0056b3; /* 标题颜色改为蓝色 */
}

.header-info {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #0056b3; /* 头部信息文字颜色改为蓝色 */
}

.header-info > div:first-child label {
    margin-right: 5px; /* Add a small gap between label and value */
}

.date-section {
    text-align: right;
}

/* Styles for header inputs */
#department-input,
.date-input {
    border: none; /* Remove default border */
    border-bottom: 1px solid #ccc; /* Optional: Add a subtle underline */
    background-color: transparent;
    color: #000; /* Ensure text is black */
    font-size: 14px; /* Match table input font size */
    padding: 0 2px; /* Adjust padding as needed */
    margin: 0 2px; /* Add slight margin */
    text-align: left; /* Default alignment for department */
    width: auto; /* Allow natural width for department */
    display: inline-block; /* Ensure proper layout */
    vertical-align: baseline; /* Align with surrounding text */
}

/* Specific adjustments for date inputs */
.date-input {
    width: 45px; /* Adjust width for year */
    text-align: center; /* Center align date parts */
}

#month-input, #day-input {
    width: 30px; /* Smaller width for month/day */
}

table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #0056b3; /* 表格外边框改为蓝色 */
    font-size: 14px;
}

.header-info > div:first-child label {
    margin-right: 5px; /* Add a small gap between label and value */
}

th, td {
    border: 1px solid #0056b3; /* 单元格边框改为蓝色 */
    padding: 8px;
    text-align: center;
    height: 35px; /* 固定行高 */
}

thead th {
    background-color: #f2f2f2; /* 表头背景色 */
    font-weight: normal;
    color: #0056b3; /* 表头文字颜色改为蓝色 */
}

tbody td {
    vertical-align: top; /* 内容顶部对齐 */
}

tbody input[type="text"],
tbody input[type="number"] {
    width: 95%;
    border: none;
    outline: none;
    background-color: transparent;
    text-align: center;
    font-size: 14px;
    padding: 5px 0;
    color: #000; /* 输入框内文字保持黑色 */
}

tbody input[type="number"] {
    text-align: center; /* Changed from right to center */
}

tbody input[type="text"].amount {
    text-align: center;
}

/* Specific column widths */
table th:nth-child(1), table td:nth-child(1) { width: 15%; } /* 费用摘要 */
table th:nth-child(2), table td:nth-child(2) { width: 12%; } /* 产品店铺 */
table th:nth-child(3), table td:nth-child(3) { width: 12%; } /* 产品SKU */
table th:nth-child(4), table td:nth-child(4) { width: 15%; } /* 产品名称 */
table th:nth-child(5), table td:nth-child(5) { width: 15%; } /* 产品规格/颜色 */
table th:nth-child(6), table td:nth-child(6) { width: 10%; text-align: center; } /* 金额 */
table th:nth-child(7), table td:nth-child(7) { width: 11%; } /* 备注 */

.remarks-cell {
    position: relative; /* Needed for absolute positioning */
    vertical-align: top; /* Align content to the top */
    padding: 0; /* Remove default padding if any */
}

.remarks-textarea {
    width: 100%; /* Occupy full width */
    height: calc(100% - 20px); /* Leave space at the bottom */
    border: none;
    outline: none;
    background-color: transparent;
    font-size: 14px;
    padding: 8px; /* Add padding inside textarea */
    box-sizing: border-box; /* Include padding in size */
    resize: none; /* Disable resizing */
    position: absolute; /* Position relative to remarks-cell */
    top: 0;
    left: 0;
    color: #000;
    /* Ensure textarea doesn't overlap approval text */
}

.approval-text {
    position: absolute;
    bottom: 5px; /* Position within the reserved space */
    right: 8px; /* Position within the reserved space */
    font-size: 14px;
    color: #0056b3; /* Match other blue text */
    white-space: nowrap; /* Prevent text wrapping */
}

/* Remove the old approval-cell style if it exists */
/* .approval-cell { ... } */

tfoot td {
    text-align: left;
    font-weight: normal;
    border-top: 2px solid #0056b3; /* 合计行上边框改为蓝色 */
    color: #0056b3; /* 页脚文字颜色改为蓝色 */
}

tfoot tr:first-child td:nth-child(2) {
    text-align: left;
}

#total-numeric {
    font-weight: bold;
    color: #000; /* 设置数字为黑色 */
}

#total-chinese .chinese-digit {
    color: #000; /* 数字显示为黑色 */
}

#total-chinese .chinese-unit {
    color: #0056b3; /* 单位显示为蓝色 */
}

.footer-signatures {
    text-align: center;
    padding-top: 15px;
    padding-bottom: 15px;
}

.footer-signatures span {
    margin-right: 130px;
    color: #0056b3; /* 签名区域文字颜色改为蓝色 */
}

.footer-signatures span:last-child {
    margin-right: 0;
}

/* Hide number input spinners */
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;
}