/* ===== 首屏引导遮罩样式 ===== */
.first-load-guide {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start; /* 改为靠上对齐 */
    padding-top: 10vh; /* 添加顶部内边距 */
    z-index: 10000;
    animation: fadeOut 0.8s ease-out 5s forwards;
    opacity: 1;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
        visibility: hidden;
    }
}

.guide-content {
    text-align: center;
    color: white;
    padding: 40px;
    animation: fadeIn 0.8s ease-out;
    max-width: 50vw; /* 限制最大宽度为视口宽度的50% */
    max-height: 50vh; /* 限制最大高度为视口高度的50% */
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.guide-icon {
    font-size: 77px; /* 96px * 0.8 */
    margin-bottom: 24px; /* 30px * 0.8 */
    animation: pulse 2s ease-in-out infinite, rotate 4s linear infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.guide-title {
    font-size: 38px; /* 48px * 0.8 */
    font-weight: bold;
    margin: 0 0 36px 0; /* 45px * 0.8 */
    text-shadow: 3px 3px 6px rgba(0,0,0,0.4);
    animation: titleGlow 2s ease-in-out infinite alternate;
}

@keyframes titleGlow {
    from {
        text-shadow: 6px 6px 12px rgba(0,0,0,0.4), 0 0 20px rgba(255,255,255,0.3);
    }
    to {
        text-shadow: 6px 6px 12px rgba(0,0,0,0.4), 0 0 40px rgba(255,255,255,0.6);
    }
}

.guide-description {
    margin-top: 36px; /* 45px * 0.8 */
}

.guide-feature {
    display: flex;
    align-items: center;
    gap: 24px; /* 30px * 0.8 */
    margin-bottom: 30px; /* 38px * 0.8 */
    animation: slideInFromLeft 1s ease-out;
    animation-fill-mode: both;
}

.guide-feature:nth-child(1) { 
    animation-delay: 0.3s;
}
.guide-feature:nth-child(2) { 
    animation-delay: 0.6s;
}
.guide-feature:nth-child(3) { 
    animation-delay: 0.9s;
}
.guide-feature:nth-child(4) { 
    animation-delay: 1.2s;
}

@keyframes slideInFromLeft {
    0% {
        opacity: 0;
        transform: translateX(-100vw);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.feature-icon {
    font-size: 48px; /* 60px * 0.8 */
    animation: iconBounce 2s ease-in-out infinite;
}

@keyframes iconBounce {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.2);
    }
}

.feature-text {
    font-size: 24px; /* 30px * 0.8 */
    color: white;
    margin: 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    line-height: 1.6;
}

@keyframes fadeInText {
    to {
        opacity: 1;
    }
}

/* 手机端适配 */
@media (max-width: 768px) {
    .guide-content {
        padding: 20px;
        max-width: 90vw;
        max-height: 90vh;
    }
    
    .guide-title {
        font-size: 23px; /* 18px * 1.3 */
        margin-bottom: 20px; /* 15px * 1.3 */
    }
    
    .guide-icon {
        font-size: 52px; /* 40px * 1.3 */
        margin-bottom: 20px; /* 15px * 1.3 */
    }
    
    .guide-feature {
        gap: 16px; /* 12px * 1.3 */
        margin-bottom: 20px; /* 15px * 1.3 */
    }
    
    .feature-icon {
        font-size: 36px; /* 28px * 1.3 */
    }
    
    .feature-text {
        font-size: 18px; /* 14px * 1.3 */
        line-height: 1.4;
    }
}

/* ===== 装货单计算器 - 放大字体（说明行/列标题/输入框）===== */
/* 说明行分组标题：放大一个字号 */
#collaboration-calculator .excel-table thead tr:first-child th {
    font-size: 18px !important; /* 原16px → 放大一级 */
}

/* 第二行列标题：放大一个字号 */
#collaboration-calculator .excel-table thead tr:nth-child(2) th {
    font-size: 16px !important; /* 原14px → 放大一级 */
}

/* 表体输入框字体：放大一个字号（含占位符） */
#collaboration-calculator .excel-table tbody td input {
    font-size: 16px !important; /* 再放大一个字号 */
}
#collaboration-calculator .excel-table tbody td input::placeholder {
    font-size: 16px; /* 与输入一致，再放大一个字号 */
}

/* 装货单计算器字体放大一个字号 */
#collaboration-calculator .excel-table tbody tr td {
    font-size: 16px !important; /* 再放大一个字号 */
}

/* 装货单计算器 - 说明行中特定分组绿色底色 */
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(1),
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(4),
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(6),
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(7) {
    background-color: #10B981 !important; /* 绿色 */
    color: #FFFFFF !important; /* 白色文字 */
}

/* ===== 螺纹钢计算器 - 放大字体（说明行/列标题/输入框）===== */
/* 说明行分组标题：放大一个字号 */
#rebar-calculator .excel-table thead tr:first-child th {
    font-size: 18px !important; /* 原16px → 放大一级 */
}

/* 第二行列标题：放大一个字号 */
#rebar-calculator .excel-table thead tr:nth-child(2) th {
    font-size: 16px !important; /* 原14px → 放大一级 */
}

/* 表体输入框字体：放大一个字号（含占位符） */
#rebar-calculator .excel-table tbody td input {
    font-size: 15px !important; /* 原14px → 放大一级 */
}
#rebar-calculator .excel-table tbody td input::placeholder {
    font-size: 15px; /* 与输入一致，放大一级 */
}

/* ===== 板型管计算器 - 放大字体（说明行/列标题/输入框）===== */
/* 说明行分组标题：放大一个字号 */
#steel-plate-calculator .excel-table thead tr:first-child th {
    font-size: 18px !important; /* 原16px → 放大一级 */
}

/* 第二行列标题：放大一个字号 */
#steel-plate-calculator .excel-table thead tr:nth-child(2) th {
    font-size: 16px !important; /* 原14px → 放大一级 */
}

/* 表体输入框字体：放大一个字号（含占位符） */
#steel-plate-calculator .excel-table tbody td input {
    font-size: 15px !important; /* 原14px → 放大一级 */
}
#steel-plate-calculator .excel-table tbody td input::placeholder {
    font-size: 15px; /* 与输入一致，放大一级 */
}

/* 螺纹钢计算器字体放大一个字号 */
#rebar-calculator .excel-table tbody tr td {
    font-size: 15px !important; /* 原14px → 放大一级 */
}

/* 板型管计算器字体放大一个字号 */
#steel-plate-calculator .excel-table tbody tr td {
    font-size: 15px !important; /* 原14px → 放大一级 */
}

/* 管理卖货单位页面字体再次加大 */
#supplierModal {
    font-size: 17px; /* 原16px → 再加大一个字号 */
}

#supplierModal h3 {
    font-size: 23px !important; /* 原22px → 再加大一个字号 */
}

#supplierModal h4 {
    font-size: 19px !important; /* 原18px → 再加大一个字号 */
}

#supplierModal label {
    font-size: 16px !important; /* 原15px → 再加大一个字号 */
}

#supplierModal input[type="text"] {
    font-size: 16px !important; /* 原15px → 再加大一个字号 */
}

#supplierModal input[type="text"]::placeholder {
    font-size: 16px !important; /* 原15px → 再加大一个字号 */
}

#supplierModal .btn {
    font-size: 16px !important; /* 原15px → 再加大一个字号 */
}

#supplierModal .btn-sm {
    font-size: 14px !important; /* 原13px → 再加大一个字号 */
}

#supplierModal table th {
    font-size: 16px !important; /* 原15px → 再加大一个字号 */
}

#supplierModal table td {
    font-size: 16px !important; /* 原15px → 再加大一个字号 */
}

#supplierModal .supplier-table .btn-small {
    font-size: 14px !important; /* 原13px → 再加大一个字号 */
}

#supplierModal #productSelectionCount {
    font-size: 15px !important; /* 原14px → 再加大一个字号 */
}

#supplierModal .category-header {
    font-size: 16px !important; /* 原15px → 再加大一个字号 */
}

#supplierModal .product-item label {
    font-size: 15px !important; /* 原14px → 再加大一个字号 */
}

/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 表格排序样式 */
.sortable {
    cursor: pointer;
    user-select: none;
    position: relative;
    transition: background-color 0.2s ease;
}

.sortable:hover {
    background-color: #f0f4ff !important;
}

.sort-icon {
    margin-left: 5px;
    font-size: 12px;
    color: #667eea;
    transition: transform 0.2s ease;
}

.sort-icon.asc {
    transform: rotate(180deg);
}

.sort-icon.desc {
    transform: rotate(0deg);
}

.sort-icon.neutral {
    opacity: 0.5;
}

body {
    font-family: 'Microsoft YaHei', 'PingFang SC', 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 25%, #f8fafc 50%, #e2e8f0 75%, #c3cfe2 100%);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    color: #1a202c;
    line-height: 1.5;
    font-size: 15px;
    min-height: 100vh;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    -webkit-text-size-adjust: 100%;
    -ms-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

.container {
    max-width: 1800px;
    margin: 0 auto;
    padding: 10px;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #2563eb 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 15px;
    text-align: center;
    box-shadow: 0 8px 30px rgba(37, 99, 235, 0.2);
    position: relative;
    overflow: hidden;
}

.header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: shimmer 8s ease-in-out infinite;
}

@keyframes shimmer {
    0%, 100% { transform: translateX(-100%) translateY(-100%) rotate(0deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(180deg); }
}

.header-icon {
    font-size: 3em;
    margin-bottom: 10px;
    display: block;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0); }
    40% { transform: translateY(-10px); }
    60% { transform: translateY(-5px); }
}

.header h1 {
    font-size: 2.4em;
    margin-bottom: 8px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.subtitle {
    font-size: 1.1em;
    opacity: 0.9;
    margin-bottom: 15px;
    font-weight: 400;
}

.calculator-selector {
    margin-top: 20px;
}

.selector-label {
    font-size: 1.5em;
    margin-bottom: 12px;
    font-weight: 700;
    opacity: 1;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    letter-spacing: 0.5px;
}

.region-selector-wrapper {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.calculator-type-wrapper {
    margin-top: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.region-select-btn {
    max-width: 250px;
    width: 100%;
    padding: 14px 18px;
    font-size: 1.3em;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1a202c;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    transition: all 0.1s ease;
    position: relative;
    backdrop-filter: blur(10px);
    transform: translateZ(0);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin: 0 auto;
}

.region-select-btn:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    transform: translateY(-1px);
}

.region-select-btn:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.region-btn-text {
    flex: 1;
    text-align: center;
}

.region-btn-icon {
    font-size: 1.2em;
}

.calculator-dropdown {
    width: 100%;
    max-width: 500px;
    padding: 16px 20px;
    font-size: 1.3em;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 12px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1a202c;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    font-weight: 600;
    transition: all 0.1s ease;
    position: relative;
    backdrop-filter: blur(10px);
    transform: translateZ(0);
    will-change: auto;
    text-align: center;
    text-align-last: center;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

.calculator-dropdown option {
    text-align: center;
    text-align-last: center;
}

.calculator-dropdown:hover {
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.2);
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
}

.calculator-dropdown:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.calculator-dropdown:active {
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.calculator-dropdown::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 10px;
    opacity: 0;
    transition: opacity 0.1s ease;
    z-index: -1;
}

.calculator-dropdown:hover::before {
    opacity: 0.05;
}

.calculator-dropdown::after {
    content: '▼';
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #667eea;
    font-size: 14px;
    font-weight: bold;
    transition: all 0.1s ease;
    pointer-events: none;
}

.calculator-dropdown:hover::after {
    color: #5a67d8;
    transform: translateY(-50%) scale(1.1);
}

.calculator-dropdown:focus::after {
    color: #4c51bf;
    transform: translateY(-50%) rotate(180deg);
}

/* 下拉菜单滚动条样式 */
.calculator-dropdown::-webkit-scrollbar,
select::-webkit-scrollbar {
    width: 18px;
    height: 18px;
}

.calculator-dropdown::-webkit-scrollbar-track,
select::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 9px;
    border: 1px solid #e9ecef;
}

.calculator-dropdown::-webkit-scrollbar-thumb,
select::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    border-radius: 9px;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.5);
}

.calculator-dropdown::-webkit-scrollbar-thumb:hover,
select::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
    box-shadow: 0 5px 12px rgba(59, 130, 246, 0.7);
    transform: scale(1.05);
}

.calculator-dropdown::-webkit-scrollbar-thumb:active,
select::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 50%, #1e2a5e 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.9);
}

.calculator-dropdown::-webkit-scrollbar-corner,
select::-webkit-scrollbar-corner {
    background: #f8f9fa;
}

/* 计算器区域 */
.calculator-section {
    display: none;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 50%, #e2e8f0 100%);
    border-radius: 15px;
    padding: 20px 20px 15px 20px; /* 调整底部内边距，为汇总信息留出空间 */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.8);
    position: relative;
    overflow: hidden;
}

.calculator-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #2563eb 100%);
}

.calculator-section.active {
    display: block;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-header {
    margin-bottom: 0;
    text-align: center;
    position: relative;
    z-index: 1;
}

.calculator-header h2 {
    color: #1a202c;
    margin-bottom: 15px;
    font-size: 2em;
    font-weight: 700;
}

.summary-bar {
    background: linear-gradient(135deg, #10b981 0%, #059669 50%, #047857 100%);
    color: white;
    padding: 15px 25px;
    border-radius: 12px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    font-weight: 600;
    font-size: 1.1em;
    box-shadow: 0 6px 20px rgba(16, 185, 129, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    margin: 15px 0 0 0; /* 调整底部边距，顶部保持15px，底部设为0 */
    position: relative;
    overflow: hidden;
}

.summary-bar::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: sweep 3s ease-in-out infinite;
}

/* 桌面端汇总栏保持原有水平布局 */

@keyframes sweep {
    0% { left: -100%; }
    100% { left: 100%; }
}


/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    max-height: 70vh;
    overflow-y: auto;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.calculation-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    border: 1px solid #e2e8f0;
}

.calculation-table th {
    background: linear-gradient(135deg, #1e3a8a 0%, #1e40af 100%);
    color: white;
    font-weight: 600;
    padding: 8px 6px;
    text-align: center;
    border: none;
    border-bottom: 2px solid #1e40af;
    white-space: nowrap;
    font-size: 13px;
    position: sticky;
    top: 0;
    z-index: 10;
    box-shadow: 0 2px 4px rgba(30, 58, 138, 0.2);
}

.calculation-table td {
    padding: 8px 6px;
    text-align: center;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    font-size: 14px;
    background: #fffef7;
    height: 40px;
    overflow: visible;
}

.calculation-table input,
.calculation-table select {
    width: 100%;
    min-width: 60px;
    max-width: 120px;
    padding: 6px 8px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    text-align: center;
    background: #fffef7;
    height: 32px;
    overflow: visible;
    white-space: normal;
}

.calculation-table input:focus,
.calculation-table select:focus {
    outline: none;
    border-color: #1e40af;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
    background: white;
    min-width: 80px;
    max-width: 150px;
}

.calculation-table .readonly {
    background-color: #f8f9fa;
    color: #6c757d;
}

/* 美观的表格样式 - 重新设计 */
.excel-table-container {
    overflow-x: auto;
    margin: -20px -20px 15px -20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 0 0 15px 15px;
    padding: 20px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-top: none;
    position: relative;
}

.excel-table-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #2563eb 100%);
    border-radius: 16px 16px 0 0;
}

.excel-table {
    width: 100%;
    min-width: 1600px;
    border-collapse: collapse;
    background: white;
    font-size: 14px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    table-layout: fixed;
}

.excel-table th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #1e3a8a 100%);
    color: white;
    font-weight: 600;
    padding: 10px 6px;
    text-align: center;
    border: none;
    border-bottom: 3px solid #667eea;
    white-space: nowrap;
    font-size: 12px;
    position: sticky;
    top: 0;
    z-index: 10;
    line-height: 1.2;
    height: 36px;
    vertical-align: middle;
    overflow: hidden;
    box-shadow: 0 3px 6px rgba(102, 126, 234, 0.3);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.excel-table td {
    padding: 6px 4px;
    text-align: center;
    border: none;
    border-bottom: 1px solid #e2e8f0;
    background: #fffef7;
    height: 32px;
    vertical-align: middle;
    overflow: visible;
    font-size: 14px; /* 从13px增加到14px */
    position: relative;
    z-index: 1;
}

.excel-table tr:nth-child(even) td {
    background: #fefce8;
}

.excel-table tr:hover td {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    transform: scale(1.01);
    transition: all 0.1s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.excel-table input,
.excel-table select {
    width: 100%;
    min-width: 60px;
    max-width: 90px;
    height: 28px;
    padding: 4px 6px;
    border: 1px solid #d1d5db;
    background: #fffef7;
    font-size: 14px; /* 从13px增加到14px */
    text-align: center;
    outline: none;
    border-radius: 4px;
    transition: all 0.1s ease;
    box-sizing: border-box;
    line-height: 1.2;
    vertical-align: middle;
    margin: 0;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
}

.excel-table input:focus,
.excel-table select:focus {
    background: white;
    border-color: #1e40af;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2);
    overflow: visible;
    white-space: normal;
    min-width: 80px;
    max-width: 110px;
    z-index: 10;
    position: relative;
}

/* 修复datalist下拉菜单遮挡问题 */
.excel-table datalist {
    position: absolute;
    z-index: 1000;
    background: white;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
}

/* 隐藏安卓设备上原生datalist的下拉箭头（防止三角图标残留） */
.excel-table input[data-android-enhanced="true"],
.excel-table input[data-original-list] {
    /* 强制设置为textfield样式，清除任何可能的下拉箭头 */
    -webkit-appearance: textfield !important;
    appearance: textfield !important;
    /* 隐藏可能的原生下拉指示器 */
    background-image: none !important;
}

/* 针对Webkit内核，隐藏可能的datalist下拉箭头 */
.excel-table input[data-android-enhanced="true"]::-webkit-calendar-picker-indicator,
.excel-table input[data-original-list]::-webkit-calendar-picker-indicator {
    display: none !important;
    opacity: 0 !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
}

/* 针对Firefox，隐藏可能的datalist下拉箭头 */
.excel-table input[data-android-enhanced="true"]::-moz-list-bullet,
.excel-table input[data-original-list]::-moz-list-bullet {
    display: none !important;
}

.excel-table select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 14px;
    padding-right: 32px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 6px;
    background-color: #ffffff;
    transition: all 0.1s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateZ(0);
    will-change: auto;
}

.excel-table select:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background-color: #f8fafc;
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.1);
}

.excel-table select:focus {
    border-color: #667eea;
    background-color: #f0f4ff;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.excel-table select:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.2);
}

/* 表格下拉菜单滚动条样式 */
.excel-table select::-webkit-scrollbar {
    width: 18px;
    height: 18px;
}

.excel-table select::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 9px;
    border: 1px solid #e9ecef;
}

.excel-table select::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    border-radius: 9px;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.5);
}

.excel-table select::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
    box-shadow: 0 5px 12px rgba(59, 130, 246, 0.7);
    transform: scale(1.05);
}

.excel-table select::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 50%, #1e2a5e 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.9);
}

.excel-table select::-webkit-scrollbar-corner {
    background: #f8f9fa;
}

.excel-table .readonly {
    background-color: #f5f5f5;
    color: #666;
    font-weight: 500;
}

.excel-table .readonly input {
    background-color: #f5f5f5;
    color: #666;
    cursor: not-allowed;
    border-color: #ddd;
}

/* 确保文字完全可见 */
.excel-table th {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

.excel-table td {
    width: 120px;
    min-width: 120px;
    max-width: 120px;
}

/* 特殊列宽调整 - 统一界面风格 */
.excel-table th:nth-child(1), .excel-table td:nth-child(1) { width: 100px; min-width: 100px; max-width: 100px; } /* 品名 */
.excel-table th:nth-child(2), .excel-table td:nth-child(2) { width: 90px; min-width: 90px; max-width: 90px; }  /* 钢厂 */
.excel-table th:nth-child(3), .excel-table td:nth-child(3) { width: 100px; min-width: 100px; max-width: 100px; } /* 规格 */
.excel-table th:nth-child(4), .excel-table td:nth-child(4) { width: 90px; min-width: 90px; max-width: 90px; }  /* 材质 */

/* 螺纹钢计算器 - 前4列宽度增加50%后再增加30%然后缩小30% */
#rebar-calculator .excel-table th:nth-child(1), #rebar-calculator .excel-table td:nth-child(1) { width: 137px; min-width: 137px; max-width: 137px; } /* 品名 195*0.7 */
#rebar-calculator .excel-table th:nth-child(2), #rebar-calculator .excel-table td:nth-child(2) { width: 90px; min-width: 90px; max-width: 90px; }  /* 钢厂 - 接近输入框宽度 */
#rebar-calculator .excel-table th:nth-child(3), #rebar-calculator .excel-table td:nth-child(3) { width: 100px; min-width: 100px; max-width: 100px; } /* 规格 - 接近输入框宽度 */
#rebar-calculator .excel-table th:nth-child(4), #rebar-calculator .excel-table td:nth-child(4) { width: 123px; min-width: 123px; max-width: 123px; }  /* 材质 176*0.7 */
/* 列宽设置 - 根据不同计算器调整 */
/* 板型管计算器 - 调整列宽 */
#steel-plate-calculator .excel-table th:nth-child(2), #steel-plate-calculator .excel-table td:nth-child(2) { width: 63px; min-width: 63px; max-width: 63px; }  /* 钢厂 90*0.7 */
#steel-plate-calculator .excel-table th:nth-child(5), #steel-plate-calculator .excel-table td:nth-child(5) { width: 80px; min-width: 80px; max-width: 80px; }  /* 米重(公斤) */
#steel-plate-calculator .excel-table th:nth-child(6), #steel-plate-calculator .excel-table td:nth-child(6) { width: 56px; min-width: 56px; max-width: 56px; }  /* 长度(米) 80*0.7 */
#steel-plate-calculator .excel-table th:nth-child(7), #steel-plate-calculator .excel-table td:nth-child(7) { width: 56px; min-width: 56px; max-width: 56px; }  /* 数量(件) 80*0.7 */
#steel-plate-calculator .excel-table th:nth-child(8), #steel-plate-calculator .excel-table td:nth-child(8) { width: 80px; min-width: 80px; max-width: 80px; }  /* 计重方式 */
/* 计重方式下拉框字体放大 */
#steel-plate-calculator .excel-table td:nth-child(8) select { font-size: 15px !important; }
#steel-plate-calculator .excel-table th:nth-child(9), #steel-plate-calculator .excel-table td:nth-child(9) { width: 56px; min-width: 56px; max-width: 56px; }  /* 重量(吨) 80*0.7 */
#steel-plate-calculator .excel-table th:nth-child(10), #steel-plate-calculator .excel-table td:nth-child(10) { width: 56px; min-width: 56px; max-width: 56px; }  /* 单价 80*0.7 */
#steel-plate-calculator .excel-table th:nth-child(11), #steel-plate-calculator .excel-table td:nth-child(11) { width: 80px; min-width: 80px; max-width: 80px; }  /* 金额(元) */
#steel-plate-calculator .excel-table th:nth-child(12), #steel-plate-calculator .excel-table td:nth-child(12) { width: 100px; min-width: 100px; max-width: 100px; }  /* 备注 */
#steel-plate-calculator .excel-table th:nth-child(13), #steel-plate-calculator .excel-table td:nth-child(13) { width: 100px; min-width: 100px; max-width: 100px; }  /* 工程总长度 */
#steel-plate-calculator .excel-table th:nth-child(14), #steel-plate-calculator .excel-table td:nth-child(14) { width: 140px; min-width: 140px; max-width: 140px; }  /* 执行标准 */
#steel-plate-calculator .excel-table th:nth-child(15), #steel-plate-calculator .excel-table td:nth-child(15) { width: 50px; min-width: 50px; max-width: 50px; }  /* 操作 */

#rebar-calculator .excel-table th:nth-child(5), #rebar-calculator .excel-table td:nth-child(5) { width: 80px; min-width: 80px; max-width: 80px; }  /* 件重(吨) - 接近输入框宽度 */
#rebar-calculator .excel-table th:nth-child(6), #rebar-calculator .excel-table td:nth-child(6) { width: 80px; min-width: 80px; max-width: 80px; }  /* 支/件 - 接近输入框宽度 */
#rebar-calculator .excel-table th:nth-child(7), #rebar-calculator .excel-table td:nth-child(7) { width: 80px; min-width: 80px; max-width: 80px; }  /* 件数 - 接近输入框宽度 */
#rebar-calculator .excel-table th:nth-child(8), #rebar-calculator .excel-table td:nth-child(8) { width: 80px; min-width: 80px; max-width: 80px; }  /* 重量(吨) - 接近输入框宽度 */
#rebar-calculator .excel-table th:nth-child(9), #rebar-calculator .excel-table td:nth-child(9) { width: 80px; min-width: 80px; max-width: 80px; }  /* 单价(元/吨) - 接近输入框宽度 */
#rebar-calculator .excel-table th:nth-child(10), #rebar-calculator .excel-table td:nth-child(10) { width: 109px; min-width: 109px; max-width: 109px; }  /* 金额(元) 156*0.7 */
#rebar-calculator .excel-table th:nth-child(11), #rebar-calculator .excel-table td:nth-child(11) { width: 137px; min-width: 137px; max-width: 137px; }  /* 备注 195*0.7 */
#rebar-calculator .excel-table th:nth-child(12), #rebar-calculator .excel-table td:nth-child(12) { width: 82px; min-width: 82px; max-width: 82px; }  /* 操作 117*0.7 */

/* 装货单计算器 - 调整列宽（在当前基础上再增加20%） */
#collaboration-calculator .excel-table th:nth-child(5), #collaboration-calculator .excel-table td:nth-child(5) { width: 138px; min-width: 138px; max-width: 138px; }  /* 米重(公斤) 115*1.2 */
#collaboration-calculator .excel-table th:nth-child(6), #collaboration-calculator .excel-table td:nth-child(6) { width: 138px; min-width: 138px; max-width: 138px; }  /* 长度(米) 115*1.2 */
#collaboration-calculator .excel-table th:nth-child(8), #collaboration-calculator .excel-table td:nth-child(8) { width: 208px; min-width: 208px; max-width: 208px; }  /* 理论支/件重量 173*1.2 */

/* 理论支/件重(公斤) 字体缩小一个字号 */
.smaller-font {
    font-size: 14px !important; /* 从16px缩小到14px */
}
#collaboration-calculator .excel-table th:nth-child(6), #collaboration-calculator .excel-table td:nth-child(6) { width: 138px; min-width: 138px; max-width: 138px; }  /* 数量(件) 115*1.2 */
#collaboration-calculator .excel-table th:nth-child(7), #collaboration-calculator .excel-table td:nth-child(7) { width: 138px; min-width: 138px; max-width: 138px; } /* 计重方式 115*1.2 */
/* 装货单计算器计重方式下拉框字体放大 */
#collaboration-calculator .excel-table td:nth-child(7) select { font-size: 15px !important; }
#collaboration-calculator .excel-table th:nth-child(8), #collaboration-calculator .excel-table td:nth-child(8) { width: 138px; min-width: 138px; max-width: 138px; } /* 工程总长度 115*1.2 */
#collaboration-calculator .excel-table th:nth-child(9), #collaboration-calculator .excel-table td:nth-child(9) { width: 208px; min-width: 208px; max-width: 208px; }  /* 理论支/件重量 173*1.2 */
#collaboration-calculator .excel-table th:nth-child(10), #collaboration-calculator .excel-table td:nth-child(10) { width: 173px; min-width: 173px; max-width: 173px; } /* 理论重量(吨) 144*1.2 */
#collaboration-calculator .excel-table th:nth-child(11), #collaboration-calculator .excel-table td:nth-child(11) { width: 173px; min-width: 173px; max-width: 173px; } /* 过磅重量(吨) 144*1.2 */
#collaboration-calculator .excel-table th:nth-child(12), #collaboration-calculator .excel-table td:nth-child(12) { width: 173px; min-width: 173px; max-width: 173px; } /* 单价(元/吨) 144*1.2 */
#collaboration-calculator .excel-table th:nth-child(13), #collaboration-calculator .excel-table td:nth-child(13) { width: 138px; min-width: 138px; max-width: 138px; } /* 金额(元) 115*1.2 */
#collaboration-calculator .excel-table th:nth-child(14), #collaboration-calculator .excel-table td:nth-child(14) { width: 173px; min-width: 173px; max-width: 173px; } /* 供应商 144*1.2 */
#collaboration-calculator .excel-table th:nth-child(15), #collaboration-calculator .excel-table td:nth-child(15) { width: 156px; min-width: 156px; max-width: 156px; } /* 电话 130*1.2 */
#collaboration-calculator .excel-table th:nth-child(16), #collaboration-calculator .excel-table td:nth-child(16) { width: 173px; min-width: 173px; max-width: 173px; } /* 地址 144*1.2 */
#collaboration-calculator .excel-table th:nth-child(17), #collaboration-calculator .excel-table td:nth-child(17) { width: 121px; min-width: 121px; max-width: 121px; } /* 承诺厚度 101*1.2 */
#collaboration-calculator .excel-table th:nth-child(18), #collaboration-calculator .excel-table td:nth-child(18) { width: 55px; min-width: 55px; max-width: 55px; } /* 测量厚度 138*0.4 */
#collaboration-calculator .excel-table th:nth-child(19), #collaboration-calculator .excel-table td:nth-child(19) { width: 121px; min-width: 121px; max-width: 121px; } /* 承诺负差(%) 101*1.2 */
#collaboration-calculator .excel-table th:nth-child(20), #collaboration-calculator .excel-table td:nth-child(20) { width: 156px; min-width: 156px; max-width: 156px; } /* 承诺支/件重 130*1.2 */
#collaboration-calculator .excel-table th:nth-child(21), #collaboration-calculator .excel-table td:nth-child(21) { width: 280px; min-width: 280px; max-width: 280px; } /* 实际支/件重(公斤) 大幅增加宽度 */
#collaboration-calculator .excel-table th:nth-child(22), #collaboration-calculator .excel-table td:nth-child(22) { width: 260px; min-width: 260px; max-width: 260px; } /* 实际支/件价(元) 大幅增加宽度 */
#collaboration-calculator .excel-table th:nth-child(23), #collaboration-calculator .excel-table td:nth-child(23) { width: 240px; min-width: 240px; max-width: 240px; } /* 实际负差(%) 大幅增加宽度 */
#collaboration-calculator .excel-table th:nth-child(24), #collaboration-calculator .excel-table td:nth-child(24) { width: 200px; min-width: 200px; max-width: 200px; } /* 执行标准 */
#collaboration-calculator .excel-table th:nth-child(25), #collaboration-calculator .excel-table td:nth-child(25) { width: 50px; min-width: 50px; max-width: 50px; } /* 操作 */

/* 装货单计算器需要更宽的表格（隐藏米重列后重新计算） */
/* 原总宽度约3500px，隐藏米重列（110px）后，新宽度约3245px */
#collaboration-calculator .excel-table {
    min-width: 3245px !important; /* 隐藏米重列后重新计算的宽度 */
    table-layout: fixed !important; /* 强制固定列宽布局 */
    width: 100% !important;
}

/* 装货单说明行样式 - 覆盖默认的th样式 */
#collaboration-calculator .excel-table thead tr:first-child th {
    background: #ffffff !important;
    color: #000 !important;
    border: 1px solid #000 !important;
    border-bottom: 1px solid #000 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    min-width: auto !important;
    width: auto !important;
}

/* 隐藏装货单计算器的米重列（第5列） */
#collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(5),
#collaboration-calculator .excel-table tbody tr td:nth-child(5) {
    display: none !important;
}

/* 说明行第1个单元格 - 货主填写(8列，隐藏米重后) 品名到工程长度可不填 */
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(1) {
    min-width: 858px !important; /* 968px - 110px(米重列宽度) = 858px */
    max-width: 858px !important;
}

/* 说明行第2个单元格 - 装货人填写(1列) 过磅重量 */
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(2) {
    min-width: 173px !important; /* 144 * 1.2 */
}

/* 说明行第3个单元格 - 货主填写(2列) 单价+金额 */
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(3) {
    min-width: 346px !important; /* 288 * 1.2 */
}

/* 说明行第4个单元格 - 货主填写(5列) 单价+金额+供应商+电话+地址 */
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(4) {
    min-width: 813px !important; /* 173+138+173+156+173 = 813px */
}

/* 说明行第5个单元格 - 装货人填写(1列) 测量厚度 */
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(5) {
    min-width: 55px !important; /* 138 * 0.4 */
}

/* 说明行第6个单元格 - 货主填写(3列) 承诺厚度+承诺负差+承诺支/件重 */
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(6) {
    min-width: 397px !important; /* 121+121+156 = 398px */
}

/* 说明行第7个单元格 - 自动生成(5列) 实际支/件重+实际支/件价+实际负差+执行标准+操作 */
#collaboration-calculator .excel-table thead tr:first-child th:nth-child(7) {
    min-width: 1025px !important; /* 280+260+240+200+50 = 1030px */
}

/* 按钮样式 */
.action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 0;
    margin: 0 -20px -20px -20px;
    padding: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 0 0 15px 15px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-top: none;
    position: relative;
}

.action-buttons::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, #667eea 0%, #764ba2 50%, #2563eb 100%);
    border-radius: 16px 16px 0 0;
}

.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    transition: left 0.2s;
}

.btn:hover::before {
    left: 100%;
}

.btn:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.btn:active {
    transform: translateY(-1px) scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-purple {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-pink {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-blue {
    background: linear-gradient(135deg, #1e40af 0%, #1e3a8a 100%);
    color: white;
}

.btn-green {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.btn-orange {
    background: linear-gradient(135deg, #FF9800, #F57C00);
    color: white;
}

.btn-gray {
    background: linear-gradient(135deg, #9E9E9E, #757575);
    color: white;
}

.btn-large {
    padding: 12px 24px;
    font-size: 16px;
}

.action-buttons .btn {
    font-size: 16px;
}

/* 协作计算器样式 */
.collaboration-container {
    display: grid;
    gap: 30px;
}

.collaboration-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.collaboration-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.4em;
}

/* 单据区域 */
.document-section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
}

.document-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
    text-align: center;
}

.title-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    gap: 10px;
}

.title-input-group label {
    font-weight: 600;
    color: #1a202c;
    font-size: 20px;
}

.title-input-group input {
    padding: 14px 20px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    font-size: 20px;
    min-width: 300px;
    text-align: center;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    font-weight: 600;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.1s ease;
    transform: translateZ(0);
    will-change: auto;
}

.title-input-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.title-input-group input:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 6px 12px rgba(102, 126, 234, 0.1);
}

.title-input-group input:active {
    transform: translateY(1px);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
}

.editable-hint {
    font-size: 14px !important;
    color: #666 !important;
    font-style: italic !important;
    background: #fff3e0 !important;
    padding: 3px 8px !important;
    border-radius: 4px !important;
    border: 1px solid #ffb74d !important;
    font-weight: 500 !important;
}

.editable-label {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    gap: 8px;
}

.label-input {
    background: #f1f5f9 !important;
    border: 1px solid #2563eb !important;
    border-radius: 4px !important;
    padding: 4px 8px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1d4ed8 !important;
    width: auto !important;
    min-width: 60px !important;
    max-width: 120px !important;
    display: inline-block !important;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.1) !important;
}

.label-input:focus {
    outline: none !important;
    border-color: #1d4ed8 !important;
    background: #e0f2fe !important;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.1) !important;
}

.document-section h4 {
    color: #1a202c;
    margin-bottom: 12px;
    font-size: 1.3em;
    text-align: center;
    padding: 8px 0;
    border-bottom: 1px solid #2563eb;
}

/* 单据头信息和尾信息区域 */
.document-header-section,
.document-footer-section {
    background: #f8fafc;
    border-radius: 6px;
    padding: 12px;
    margin: 12px 0;
    border: 1px solid #e2e8f0;
}

/* 表单行布局 */
.form-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 10px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 6px;
    color: #1a202c;
    font-size: 16px;
}

.form-group input,
.form-group textarea {
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 16px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    transition: all 0.1s ease;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateZ(0);
    will-change: auto;
    width: 200px; /* 设置固定宽度 */
    min-width: 200px;
    max-width: 200px;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.form-group input:hover,
.form-group textarea:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.1);
}

.form-group input:active,
.form-group textarea:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.2);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

/* 备注输入框特殊样式 - 3倍宽度 */
#remarks {
    width: 600px !important; /* 设置3倍宽度 */
    min-width: 600px !important;
    max-width: 600px !important;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .form-group.full-width {
        grid-column: 1;
    }
}

/* 弹窗样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    margin: 1% auto;
    padding: 0;
    border-radius: 20px;
    width: 98%;
    max-width: 95vw;
    max-height: 95vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(20px);
}

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #2563eb 100%);
    color: white;
    padding: 20px 25px;
    border-radius: 20px 20px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    position: relative;
    overflow: hidden;
}

.modal-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    animation: sweep 3s ease-in-out infinite;
}

.modal-header h3 {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
}

.close {
    color: white;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.2s ease;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    padding: 0;
    margin: 0;
    position: relative;
    top: -2px;
    right: -2px;
}

.close:hover {
    background: rgba(255, 107, 107, 0.2);
    border-color: #ff6b6b;
    color: #ff6b6b;
    transform: scale(1.1);
}

.close:active {
    transform: scale(0.95);
    background: rgba(255, 107, 107, 0.3);
}

body.modal-open {
    position: fixed;
    overflow: hidden;
    width: 100%;
    left: 0;
    right: 0;
    touch-action: none;
}

.modal-body {
    padding: 15px;
}

.region-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    padding: 10px;
}

.region-btn {
    padding: 14px 16px;
    font-size: 1em;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 10px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    color: #1a202c;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    font-weight: 600;
    transition: all 0.2s ease;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.region-btn:hover {
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    border-color: rgba(102, 126, 234, 0.5);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    transform: translateY(-2px);
}

.region-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(102, 126, 234, 0.2);
}

.region-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.region-btn.active:hover {
    background: linear-gradient(135deg, #5a67d8 0%, #6a3d91 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
}

@media (max-width: 768px) {
    .region-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 10px;
    }
    
    .region-btn {
        padding: 12px 14px;
        font-size: 0.9em;
    }
}

.supplier-form {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid #e9ecef;
}

.supplier-form h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 17px;
    font-weight: 600;
}

.supplier-form .form-group {
    margin-bottom: 15px;
}

.supplier-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.supplier-form input,
.supplier-form textarea,
.supplier-form select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.1s ease;
    box-sizing: border-box;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateZ(0);
    will-change: auto;
}

.supplier-form input:focus,
.supplier-form textarea:focus,
.supplier-form select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.supplier-form input:hover,
.supplier-form textarea:hover,
.supplier-form select:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.1);
}

.supplier-form input:active,
.supplier-form textarea:active,
.supplier-form select:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.2);
}

.supplier-form select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23667eea' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6,9 12,15 18,9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 14px;
    padding-right: 40px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

/* 弹窗下拉菜单滚动条样式 */
.supplier-form select::-webkit-scrollbar,
.save-template-form select::-webkit-scrollbar {
    width: 18px;
    height: 18px;
}

.supplier-form select::-webkit-scrollbar-track,
.save-template-form select::-webkit-scrollbar-track {
    background: #f8f9fa;
    border-radius: 9px;
    border: 1px solid #e9ecef;
}

.supplier-form select::-webkit-scrollbar-thumb,
.save-template-form select::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    border-radius: 9px;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 8px rgba(59, 130, 246, 0.5);
}

.supplier-form select::-webkit-scrollbar-thumb:hover,
.save-template-form select::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
    box-shadow: 0 5px 12px rgba(59, 130, 246, 0.7);
    transform: scale(1.05);
}

.supplier-form select::-webkit-scrollbar-thumb:active,
.save-template-form select::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 50%, #1e2a5e 100%);
    box-shadow: 0 2px 6px rgba(59, 130, 246, 0.9);
}

.supplier-form select::-webkit-scrollbar-corner,
.save-template-form select::-webkit-scrollbar-corner {
    background: #f8f9fa;
}

.supplier-form textarea {
    height: 80px;
    resize: vertical;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.supplier-list h4 {
    margin: 0 0 20px 0;
    color: #2c3e50;
    font-size: 17px;
    font-weight: 600;
}

.supplier-table-container {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.supplier-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    font-size: 15px;
}

.supplier-table th {
    background: #f8f9fa;
    color: #2c3e50;
    font-weight: 600;
    padding: 12px;
    text-align: left;
    border-bottom: 2px solid #e9ecef;
    white-space: nowrap;
}

.supplier-table td {
    padding: 12px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
}

.supplier-table tr:hover {
    background: #f8f9fa;
}

.supplier-actions {
    display: flex;
    gap: 5px;
}

.btn-small {
    padding: 6px 12px;
    font-size: 13px;
    border-radius: 4px;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideIn {
    from { 
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to { 
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px rgba(102, 126, 234, 0.3); }
    50% { box-shadow: 0 0 30px rgba(102, 126, 234, 0.6); }
}

/* 移动端全局优化 */
@media (max-width: 768px) {
    html {
        -webkit-text-size-adjust: 100%;
        -ms-text-size-adjust: 100%;
        text-size-adjust: 100%;
        overflow-x: hidden;
    }
    
    * {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
    }
    
    input, textarea, select {
        -webkit-user-select: text;
        -moz-user-select: text;
        -ms-user-select: text;
        user-select: text;
    }
    
    /* 确保下拉框文字在移动端居中 */
    .calculator-dropdown {
        text-align: center !important;
        text-align-last: center !important;
        -webkit-appearance: none !important;
        -moz-appearance: none !important;
        appearance: none !important;
    }
    
    .calculator-dropdown option {
        text-align: center !important;
        text-align-last: center !important;
    }
}

/* 响应式设计 - 手机端优化 */
@media (max-width: 768px) {
    .container {
        padding: 2px;
        margin: 0;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .header {
        padding: 8px 10px;
        margin-bottom: 5px;
        border-radius: 8px;
    }
    
    .header h1 {
        font-size: 1.4em;
        margin-bottom: 3px;
    }
    
    .subtitle {
        font-size: 0.8em;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .selector-label {
        font-size: 1.1em;
        margin-bottom: 6px;
    }
    
    .calculator-dropdown {
        padding: 8px 12px;
        font-size: 1em;
        text-align: center;
        text-align-last: center;
        max-width: 100%;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .region-select-btn {
        padding: 8px 12px;
        font-size: 1em;
    }
    
    .summary-bar {
        flex-direction: column;
        gap: 8px;
        text-align: left;
        padding: 10px 12px; /* 增加内边距 */
        font-size: 1em; /* 从0.85em增加到1em，提高可读性 */
        margin: 8px 0 0 0; /* 调整底部边距 */
    }
    
    /* 手机端：标签和数值分行显示 */
    .summary-bar span {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 2px 0;
    }
    
    /* 表格容器优化 - 允许水平滚动 */
    .excel-table-container {
        margin: -8px -8px 5px -8px;
        padding: 8px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        max-height: 50vh;
        white-space: nowrap;
    }
    
    .excel-table {
        font-size: 12px; /* 减小字体以适应移动端 */
        table-layout: fixed !important; /* 使用固定布局确保列宽 */
        width: max-content !important; /* 让表格根据内容确定宽度 */
    }
    
    /* 不同计算器的表格最小宽度 */
    #steel-plate-calculator .excel-table {
        min-width: 1000px; /* 板型管计算器：12列 */
    }
    
    #rebar-calculator .excel-table {
        min-width: 1000px; /* 螺纹钢计算器：12列 */
    }
    
    #collaboration-calculator .excel-table {
        min-width: 2500px !important; /* 装货单计算器：25列，需要更宽 */
        table-layout: fixed !important; /* 强制固定布局 */
    }
    
    .excel-table th,
    .excel-table td {
        padding: 4px 3px;
        font-size: 11px; /* 减小字体以适应移动端 */
        min-height: 32px; /* 增加行高以适应文字 */
        white-space: nowrap !important; /* 防止文字换行 */
        overflow: visible !important; /* 允许文字显示 */
        text-overflow: clip !important;
    }
    
    /* 装货单计算器表头特殊处理 - 确保列有足够宽度 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th {
        min-width: 60px !important; /* 减小最小宽度 */
        padding: 6px 4px !important;
        font-size: 13px !important; /* 增大字体，与板型管计算器一致 */
        line-height: 1.4 !important;
        white-space: normal !important; /* 允许表头文字换行 */
        word-break: break-word !important;
        vertical-align: middle !important;
        height: auto !important; /* 允许高度自适应 */
        min-height: 40px !important; /* 确保有足够高度显示文字 */
    }
    
    /* 装货单计算器 - 移动端列宽优化（减小过宽的列） */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(6),
    #collaboration-calculator .excel-table tbody td:nth-child(6) { width: 65px !important; min-width: 65px !important; max-width: 80px !important; } /* 长度(米) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(7),
    #collaboration-calculator .excel-table tbody td:nth-child(7) { width: 65px !important; min-width: 65px !important; max-width: 80px !important; } /* 数量(件) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(8),
    #collaboration-calculator .excel-table tbody td:nth-child(8) { width: 70px !important; min-width: 70px !important; max-width: 90px !important; } /* 计重方式 */
    
    /* 装货单计算器 - 输入框占满单元格 */
    #collaboration-calculator .excel-table td input,
    #collaboration-calculator .excel-table td select {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important; /* 占满整个单元格 */
        height: 28px !important; /* 增加高度 */
        padding: 4px 2px !important; /* 减小内边距 */
        font-size: 13px !important; /* 增大字体 */
        box-sizing: border-box !important; /* 确保padding包含在宽度内 */
        margin: 0 !important; /* 移除外边距 */
    }
    
    /* 装货单计算器 - 单元格内边距优化 */
    #collaboration-calculator .excel-table td {
        padding: 2px !important; /* 减小单元格内边距，让输入框占满 */
    }
    
    .excel-table input,
    .excel-table select {
        height: 32px; /* 增加输入框高度以适应更大字体 */
        padding: 4px 6px; /* 增加内边距 */
        font-size: 13px; /* 从11px增加到13px，提高可读性 */
        min-width: 40px;
        max-width: 100%;
        width: 100%;
    }
    
    /* 按钮区域优化 - 紧凑布局 */
    .action-buttons {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px;
        margin: 0 -8px -8px -8px;
        padding: 8px;
    }
    
    .btn {
        min-width: auto;
        font-size: 13px; /* 从11px增加到13px，提高可读性 */
        padding: 8px 10px; /* 增加内边距 */
        min-height: 40px; /* 增加按钮高度 */
        touch-action: manipulation;
    }

    .action-buttons .btn {
        font-size: 16px;
    }
    
    .btn-large {
        grid-column: 1 / -1;
        padding: 10px 14px; /* 增加内边距 */
        font-size: 14px; /* 从12px增加到14px，提高可读性 */
        margin-top: 4px;
    }
    
    /* 表单优化 */
    .form-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .form-group input,
    .form-group textarea {
        font-size: 16px;
        min-height: 36px;
        width: 100%;
        min-width: auto;
        max-width: none;
    }
    
    #remarks {
        width: 100% !important;
        min-width: auto !important;
        max-width: none !important;
    }
    
    /* 模态框优化 */
    .modal-content {
        width: 98%;
        max-height: 95vh;
        margin: 1% auto;
    }
    
    .modal-body {
        max-height: 80vh;
        overflow-y: auto;
        padding: 8px;
    }
    
    .modal-header {
        padding: 10px 15px;
    }
    
    .modal-header h3 {
        font-size: 14px;
    }
    
    .close {
        font-size: 20px;
    }
    
    /* 移动端模板列表样式已在下面的媒体查询中定义 */
    /* 注意：模板卡片使用grid布局，不使用flex布局 */
    
    /* 供应商表格优化 */
    .supplier-table-container {
        max-height: 250px;
        overflow-y: auto;
    }
    
    .supplier-table {
        font-size: 11px;
    }
    
    .supplier-table th,
    .supplier-table td {
        padding: 6px;
    }
}

/* 超小屏幕优化 */
@media (max-width: 480px) {
    .container {
        padding: 1px;
        margin: 0;
    }
    
    .header {
        padding: 6px 8px;
        margin-bottom: 3px;
    }
    
    .header h1 {
        font-size: 1.2em;
        margin-bottom: 2px;
    }
    
    .subtitle {
        font-size: 0.7em;
        margin-bottom: 6px;
        line-height: 1.2;
    }
    
    .calculator-dropdown {
        padding: 6px 8px;
        font-size: 0.9em;
        text-align: center;
        text-align-last: center;
        -webkit-appearance: none;
        -moz-appearance: none;
        appearance: none;
    }
    
    .region-select-btn {
        padding: 6px 8px;
        font-size: 0.9em;
    }
    
    .excel-table {
        font-size: 12px; /* 从10px增加到12px，提高可读性 */
        table-layout: auto;
        width: max-content;
    }
    
    /* 不同计算器的表格最小宽度 - 超小屏幕 */
    #steel-plate-calculator .excel-table {
        min-width: 800px; /* 板型管计算器：12列 */
    }
    
    #rebar-calculator .excel-table {
        min-width: 800px; /* 螺纹钢计算器：12列 */
    }
    
    #collaboration-calculator .excel-table {
        min-width: 1600px; /* 装货单计算器：25列，需要更宽 */
    }
    
    .excel-table th,
    .excel-table td {
        padding: 4px 2px; /* 增加内边距 */
        font-size: 12px; /* 从10px增加到12px，提高可读性 */
        min-height: 28px; /* 增加行高 */
        min-width: 70px;
        white-space: nowrap;
    }
    
    .excel-table input,
    .excel-table select {
        height: 28px; /* 增加输入框高度 */
        padding: 3px 5px; /* 增加内边距 */
        font-size: 12px; /* 从10px增加到12px，提高可读性 */
        min-width: 30px;
        max-width: 100%;
        width: 100%;
    }
    
    .btn {
        min-width: auto;
        font-size: 12px; /* 从10px增加到12px，提高可读性 */
        padding: 6px 8px; /* 增加内边距 */
        min-height: 36px; /* 增加按钮高度 */
    }
    
    .summary-bar {
        padding: 8px 10px; /* 增加内边距 */
        font-size: 0.9em; /* 从0.75em增加到0.9em，提高可读性 */
        margin: 6px 0 0 0; /* 调整底部边距 */
        flex-direction: column;
        gap: 6px;
    }
    
    /* 更小屏幕：标签和数值分行显示 */
    .summary-bar span {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 1px 0;
    }
    
    .excel-table-container {
        margin: -6px -6px 3px -6px;
        padding: 6px;
        max-height: 45vh;
    }
    
    .action-buttons {
        margin: 0 -6px -6px -6px;
        padding: 6px;
        gap: 3px;
    }
}

/* 横屏手机优化 */
@media (max-width: 768px) and (orientation: landscape) {
    .excel-table-container {
        max-height: 60vh;
        overflow-y: auto;
    }
    
    .modal-content {
        max-height: 95vh;
    }
    
    .modal-body {
        max-height: 80vh;
    }
}

/* 触摸设备优化 */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    }
    
    .excel-table tr:hover td {
        background: #fefce8;
        transform: none;
    }
    
    .btn:active {
        transform: translateY(1px) scale(0.98);
    }
    
    .excel-table input:focus,
    .excel-table select:focus {
        transform: none;
    }
}

/* 手机端表格优化 - 允许水平滚动显示所有列 */
@media (max-width: 768px) {
    /* 取消第一列固定效果 */
    .excel-table th:first-child,
    .excel-table td:first-child {
        position: static;
        background: inherit;
        z-index: auto;
        box-shadow: none;
    }
    
    .excel-table th:first-child {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #1e3a8a 100%);
        color: white;
    }
}

/* 超小屏幕进一步优化 */
@media (max-width: 480px) {
    /* 保持所有列可见，通过水平滚动查看 */
    .excel-table th,
    .excel-table td {
        min-width: 60px; /* 超小屏幕使用更小的最小列宽 */
    }
}

/* 删除手机端滚动提示 */

/* 手机端按钮组优化 */
@media (max-width: 768px) {
    .action-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
    }
    
    .btn-large {
        grid-column: 1 / -1;
    }
    
    .btn {
        padding: 8px 12px;
        font-size: 12px;
        min-height: 36px;
        min-width: 80px;
    }
    
    .btn-small {
        padding: 6px 10px;
        font-size: 11px;
        min-height: 32px;
        min-width: 60px;
    }
}

/* 手机端表单优化 */
@media (max-width: 768px) {
    .title-input-group {
        flex-direction: column;
        gap: 8px;
    }
    
    .title-input-group input {
        min-width: auto;
        width: 100%;
    }
    
    .document-header-section,
    .document-footer-section {
        padding: 10px;
    }
    
    .form-group input,
    .form-group textarea {
        border-radius: 6px;
    }
}

/* 手机端模态框进一步优化 */
@media (max-width: 480px) {
    .modal-content {
        width: 98%;
        margin: 1% auto;
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 12px 15px;
        border-radius: 10px 10px 0 0;
    }
    
    .modal-body {
        padding: 8px;
    }
}

/* 动画效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.calculator-section {
    animation: fadeIn 0.5s ease-in-out;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 16px;
    height: 16px;
}

::-webkit-scrollbar-track {
    background: #e2e8f0;
    border-radius: 8px;
    border: 2px solid #cbd5e0;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 50%, #1e40af 100%);
    border-radius: 8px;
    border: 2px solid #ffffff;
    box-shadow: 0 3px 6px rgba(59, 130, 246, 0.4);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #2563eb 0%, #1e40af 50%, #1e3a8a 100%);
    box-shadow: 0 5px 10px rgba(59, 130, 246, 0.6);
    transform: scale(1.05);
}

::-webkit-scrollbar-thumb:active {
    background: linear-gradient(135deg, #1d4ed8 0%, #1e3a8a 50%, #1e2a5e 100%);
    box-shadow: 0 2px 4px rgba(59, 130, 246, 0.8);
}

::-webkit-scrollbar-corner {
    background: #e2e8f0;
}

/* 模板管理弹窗样式 */
.template-tabs {
    display: flex;
    border-bottom: 2px solid #e0e0e0;
    margin-bottom: 15px;
    background: #f8f9fa;
    border-radius: 6px 6px 0 0;
    overflow: hidden;
}

.tab-button {
    background: none;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    font-size: 15px;
    color: #666;
    border-bottom: 2px solid transparent;
    transition: all 0.1s ease;
    flex: 1;
    font-weight: 500;
    position: relative;
}

.tab-button.active {
    color: #667eea;
    border-bottom-color: #667eea;
    font-weight: bold;
    background: white;
}

.tab-button:hover {
    color: #667eea;
    background: rgba(102, 126, 234, 0.05);
}

.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

.tab-content.active {
    display: block;
}

/* 模板操作按钮栏 */
.template-buttons-bar {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.template-buttons-bar .btn {
    flex: 1;
    min-width: 160px;
    max-width: 280px;
}

.template-actions {
    text-align: center;
    margin-bottom: 25px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.template-actions h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    font-size: 19px;
    font-weight: 600;
}

.template-list {
    margin-top: 10px;
}

.template-list h4 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-size: 19px;
    font-weight: 600;
    text-align: center;
    padding: 6px 0;
    border-bottom: 2px solid #667eea;
}

.template-list-container {
    /* 超密集网格布局，能放更多模板 */
    display: grid;
    /* 默认桌面端：6列网格（1200px以上） */
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
    max-height: 70vh;
    overflow-y: auto;
    padding: 10px;
    /* 当内容较少时，让卡片居中显示 */
    justify-items: center;
    /* 【性能优化】硬件加速，减少闪烁 */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    will-change: opacity;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* 平滑过渡 */
    transition: opacity 0.1s ease-out;
}

#templateListContainer {
    /* 【关键修复】使用 display: contents 让内部容器不干扰grid布局 */
    display: contents;
    /* 【性能优化】确保内部容器也有硬件加速 */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.template-card {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 10px 13px;
    margin-bottom: 0;
    transition: all 0.1s ease;
    position: relative;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    /* 网格布局：卡片宽度自适应列宽 */
    width: 100%;
    max-width: 100%;
    min-width: 0;
    /* 【性能优化】硬件加速，减少渲染闪烁 */
    transform: translate3d(0, 0, 0);
    -webkit-transform: translate3d(0, 0, 0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    /* 避免内容变化时的重排 */
    contain: layout style paint;
}

.template-card:hover {
    border-color: #667eea;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
    /* 保持 translateZ(0) 的同时添加 translateY */
    transform: translate3d(0, -1px, 0);
    -webkit-transform: translate3d(0, -1px, 0);
}

.template-card.preset {
    border-color: #2196f3;
    background: linear-gradient(135deg, #f8f9ff, #e3f2fd);
}

.template-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 5px;
}

.template-title {
    font-size: 18px;
    font-weight: bold;
    color: #2c3e50;
    flex: 1;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-tag {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.2px;
    box-shadow: 0 1px 2px rgba(102, 126, 234, 0.3);
    white-space: nowrap;
    flex-shrink: 0;
}

.template-tag.custom {
    background: linear-gradient(135deg, #4caf50 0%, #45a049 100%);
}

.template-meta {
    color: #666;
    font-size: 14px;
    margin-bottom: 4px;
    line-height: 1.3;
}

.template-meta div {
    margin-bottom: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.template-actions-buttons {
    display: flex;
    gap: 3px;
    justify-content: flex-end;
    margin-top: 3px;
    flex-wrap: wrap;
}

/* 确保按钮在小屏幕上也能正常显示 */
.template-actions-buttons .btn-small {
    flex: 1;
    min-width: 50px;
    font-size: 16px;
    padding: 5px 8px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 17px;
    border-radius: 3px;
    font-weight: 500;
    transition: all 0.1s ease;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
}

.save-template-form {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    padding: 15px;
    border-radius: 6px;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.save-template-form h4 {
    color: #2c3e50;
    margin-bottom: 15px;
    text-align: center;
    font-size: 19px;
    font-weight: 600;
}

.save-template-form .form-group {
    margin-bottom: 12px;
}

.save-template-form label {
    display: block;
    margin-bottom: 4px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 15px;
}

.save-template-form input,
.save-template-form textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid rgba(102, 126, 234, 0.2);
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.1s ease;
    box-sizing: border-box;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    transform: translateZ(0);
    will-change: auto;
}

.save-template-form input:focus,
.save-template-form textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
}

.save-template-form input:hover,
.save-template-form textarea:hover {
    border-color: rgba(102, 126, 234, 0.4);
    background: linear-gradient(135deg, #ffffff 0%, #f1f5f9 100%);
    box-shadow: 0 4px 8px rgba(102, 126, 234, 0.1);
}

.save-template-form input:active,
.save-template-form textarea:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(102, 126, 234, 0.2);
}

.save-template-form textarea {
    height: 50px;
    resize: vertical;
    font-family: inherit;
}

.form-actions {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-top: 15px;
}

/* 空状态样式 */
#templateListContainer > div[style*="text-align: center"] {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    padding: 20px 15px;
    color: #6c757d;
    font-size: 15px;
    margin: 10px 0;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .template-tabs {
        flex-direction: column;
    }
    
    .tab-button {
        border-bottom: 1px solid #e0e0e0;
        border-right: none;
    }
    
    .tab-button.active {
        border-bottom-color: #667eea;
        border-right: none;
    }
    
    .template-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .template-buttons-bar {
        flex-direction: column;
        gap: 10px;
    }
    
    .template-buttons-bar .btn {
        width: 100%;
        max-width: 100%;
        min-width: auto;
    }
    
    .template-actions-buttons {
        justify-content: center;
        margin-top: 10px;
    }
    
    .save-template-form {
        margin: 0;
        padding: 15px;
    }
    
    /* 移动端模板样式已在下面的@media规则中定义 */
}

/* 超大屏幕（>1920px） */
@media (min-width: 1921px) {
    .template-list-container {
        /* 超大屏幕显示8列 */
        grid-template-columns: repeat(8, 1fr) !important;
        gap: 8px;
        justify-items: center;
    }
}

/* 大屏幕（1600px-1920px） */
@media (min-width: 1600px) and (max-width: 1920px) {
    .template-list-container {
        /* 大屏幕显示7列 */
        grid-template-columns: repeat(7, 1fr) !important;
        justify-items: center;
    }
}

/* 桌面端（1200px-1599px）确保6列 */
@media (min-width: 1200px) and (max-width: 1599px) {
    .template-list-container {
        /* 桌面端显示6列 */
        grid-template-columns: repeat(6, 1fr) !important;
        justify-items: center;
    }
}

/* 中等屏幕（平板，900px-1199px） */
@media (min-width: 900px) and (max-width: 1199px) {
    .template-list-container {
        /* 平板显示4列 */
        grid-template-columns: repeat(4, 1fr) !important;
        gap: 6px;
        justify-items: center;
    }
}

/* 小平板（768px-899px） */
@media (min-width: 768px) and (max-width: 899px) {
    .template-list-container {
        /* 小平板显示3列 */
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px;
        justify-items: center;
    }
}

/* 小屏幕（手机横向或大屏手机） */
@media (max-width: 768px) {
    .template-list-container {
        /* 手机显示3列 */
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 5px;
        padding: 6px;
        justify-items: center;
    }
    
    .template-card {
        padding: 4px 5px;
        width: 100%;
    }
    
    .template-title {
        font-size: 11px;
    }
    
    .template-tag {
        font-size: 9px;
        padding: 2px 5px;
    }
    
    .template-meta {
        font-size: 8px;
    }
    
    .template-actions-buttons .btn-small {
        font-size: 9px;
        padding: 2px 4px;
        min-width: 45px;
    }
    }
    
/* 超小屏幕 */
@media (max-width: 480px) {
    .template-list-container {
        /* 超小屏幕显示2列 */
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 4px;
        justify-items: center;
    }
}

/* 方案C：确保第一行和第二行输入框样式一致 */
/* 强制统一所有计算器第一行的输入框样式，确保与第二行完全一致 */

/* 基础输入框样式统一 - 应用到所有行 */
#rebar-table-body td input,
#steel-plate-table-body td input,
#collaboration-table-body td input {
    width: 100% !important;
    min-width: 60px !important;
    max-width: 120px !important;
    height: 28px !important;
    padding: 2px 4px !important;
    font-size: 14px !important;
    border: 1px solid #d1d5db !important;
    border-radius: 4px !important;
    background-color: white !important;
    box-sizing: border-box !important;
    margin: 0 !important;
    vertical-align: middle !important;
}

/* 焦点状态样式统一 - 应用到所有行 */
#rebar-table-body td input:focus,
#steel-plate-table-body td input:focus,
#collaboration-table-body td input:focus {
    background: white !important;
    border-color: #1e40af !important;
    box-shadow: 0 0 0 2px rgba(30, 64, 175, 0.2) !important;
    outline: none !important;
    transform: none !important;
}

/* 单元格样式统一 - 应用到所有行 */
#rebar-table-body td,
#steel-plate-table-body td,
#collaboration-table-body td {
    padding: 2px !important;
    vertical-align: middle !important;
    border: 1px solid #e5e7eb !important;
}

/* 确保第一行没有特殊的背景色（与第二行保持一致） */
#rebar-table-body tr:first-child td,
#steel-plate-table-body tr:first-child td,
#collaboration-table-body tr:first-child td {
    background: white !important;
}

/* 覆盖任何可能影响所有行输入框大小的JavaScript动态样式 */
#rebar-table-body td input[style*="width"],
#steel-plate-table-body td input[style*="width"],
#collaboration-table-body td input[style*="width"] {
    width: 100% !important;
    min-width: 60px !important;
    max-width: 120px !important;
}

/* 优化规格列宽度，平衡显示效果和移动端体验 */
.excel-table th:nth-child(3), .excel-table td:nth-child(3) { 
    width: 120px !important; 
    min-width: 120px !important; 
    max-width: 120px !important; 
} /* 规格列 - 优化为120px */

/* 螺纹钢计算器规格列宽度调整 */
#rebar-calculator .excel-table th:nth-child(3), #rebar-calculator .excel-table td:nth-child(3) { 
    width: 100px !important; 
    min-width: 100px !important; 
    max-width: 100px !important; 
} /* 螺纹钢规格列 - 接近输入框宽度 */

/* 板型管计算器规格列宽度调整 */
#steel-plate-calculator .excel-table th:nth-child(3), #steel-plate-calculator .excel-table td:nth-child(3) { 
    width: 120px !important; 
    min-width: 120px !important; 
    max-width: 120px !important; 
} /* 板型管规格列 - 优化为120px */

/* 装货单计算器规格列宽度调整 - 使用更高优先级 */
#collaboration-calculator .excel-table th:nth-child(3), 
#collaboration-calculator .excel-table td:nth-child(3),
#collaboration-calculator .excel-table thead th:nth-child(3),
#collaboration-calculator .excel-table tbody td:nth-child(3) { 
    width: 180px !important; 
    min-width: 180px !important; 
    max-width: 180px !important; 
} /* 装货单规格列 - 变宽50%为180px */

/* 确保所有输入框都能充分利用单元格宽度 */
.excel-table td input {
    width: 100% !important;
    min-width: 60px !important;
    max-width: none !important;
}

/* 螺纹钢计算器输入框宽度调整 - 充分利用单元格宽度 */
#rebar-calculator .excel-table td input {
    max-width: none !important;
}

/* 板型管计算器输入框宽度调整 - 充分利用单元格宽度 */
#steel-plate-calculator .excel-table td input {
    max-width: none !important;
}

/* 装货单计算器输入框宽度调整 - 充分利用单元格宽度 */
#collaboration-calculator .excel-table td input {
    max-width: none !important;
}

/* ===== 数据管理模态框样式 ===== */
.data-management-buttons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.data-management-buttons .btn {
    flex: 1;
    min-width: 120px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 600;
}

.data-section {
    margin-top: 20px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.data-section h4 {
    margin-bottom: 15px;
    color: #333;
    font-size: 18px;
    font-weight: 600;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #555;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

/* 装货单列表样式 */
.notes-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.note-item {
    padding: 15px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
    transition: background-color 0.2s;
}

.note-item:hover {
    background-color: #f8f9fa;
}

.note-item:last-child {
    border-bottom: none;
}

.note-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.note-name {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.note-date {
    color: #666;
    font-size: 14px;
}

.note-summary {
    color: #777;
    font-size: 14px;
    margin-top: 5px;
}

/* 筛选区域样式 */
.filter-section {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    margin-bottom: 20px;
}

.filter-row {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: nowrap;
    align-items: end;
}

.filter-item {
    flex: 1;
    min-width: 120px;
    max-width: 180px;
}

.filter-item label {
    display: block;
    margin-bottom: 3px;
    font-weight: 600;
    color: #555;
    font-size: 12px;
}

.filter-item input,
.filter-item select {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.filter-item .btn {
    margin-right: 8px;
    padding: 6px 12px;
    font-size: 12px;
}

.filter-actions {
    flex: 0 0 220px;
    max-width: 240px;
}

.filter-actions-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(120px, 1fr));
    column-gap: 16px;
    row-gap: 10px;
}

.filter-actions-grid .btn {
    margin-right: 0;
    width: 100%;
    white-space: nowrap;
}

/* 装货数据列表样式 */
.data-list {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

/* 查询装货数据表格 - 固定横向滚动条（仅针对查询装货数据） */
#deliveryDataList .data-group {
    position: relative;
    display: flex;
    flex-direction: column;
}

#deliveryDataList .data-group .data-table-wrapper {
    position: relative;
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    max-height: calc(70vh - 100px);
}

/* 固定横向滚动条容器 */
#deliveryDataList .data-group .fixed-horizontal-scrollbar {
    position: sticky;
    bottom: 0;
    left: 0;
    right: 0;
    height: 17px;
    background: #f5f5f5;
    border-top: 1px solid #ddd;
    z-index: 10;
    overflow-x: auto;
    overflow-y: hidden;
    pointer-events: auto;
}

#deliveryDataList .data-group .fixed-horizontal-scrollbar-inner {
    height: 1px;
}

/* 自定义滚动条样式（仅针对查询装货数据） */
#deliveryDataList .data-group .data-table-wrapper::-webkit-scrollbar,
#deliveryDataList .data-group .fixed-horizontal-scrollbar::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}

#deliveryDataList .data-group .data-table-wrapper::-webkit-scrollbar-track,
#deliveryDataList .data-group .fixed-horizontal-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 6px;
}

#deliveryDataList .data-group .data-table-wrapper::-webkit-scrollbar-thumb,
#deliveryDataList .data-group .fixed-horizontal-scrollbar::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 6px;
    border: 2px solid #f1f1f1;
}

#deliveryDataList .data-group .data-table-wrapper::-webkit-scrollbar-thumb:hover,
#deliveryDataList .data-group .fixed-horizontal-scrollbar::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f91 100%);
}

.data-group {
    margin-bottom: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
}

.data-group:last-child {
    margin-bottom: 0;
}

.group-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 1px solid #e9ecef;
    border-radius: 8px 8px 0 0;
}

.group-header h4 {
    margin: 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.data-group .excel-table {
    margin: 0;
    border: none;
    border-radius: 0 0 8px 8px;
}

.data-group .excel-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    padding: 12px 8px;
    border: 1px solid #e9ecef;
    font-size: 14px;
}

.data-group .excel-table td {
    padding: 10px 8px;
    border: 1px solid #e9ecef;
    font-size: 14px;
    color: #333;
}

/* 确保复选框列可以正常点击，不被遮挡 */
#deliveryDataList .data-group .excel-table td:first-child,
#deliveryDataList .data-group .excel-table th:first-child {
    position: relative;
    z-index: 1000;
    background: white;
    min-width: 50px !important;
    width: 50px !important;
    max-width: 50px !important;
    padding: 8px 6px;
    box-sizing: border-box;
}

#deliveryDataList .data-group .excel-table .data-import-checkbox,
#deliveryDataList .data-group .excel-table #selectAllCheckbox {
    position: relative;
    z-index: 1001;
    cursor: pointer;
    pointer-events: auto;
    width: 18px;
    height: 18px;
    margin: 0 auto;
    display: block;
    flex-shrink: 0;
}

.data-group .excel-table tr:nth-child(even) {
    background: #f8f9fa;
}

.data-group .excel-table tr:hover {
    background: #e3f2fd;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .data-management-buttons {
        flex-direction: column;
    }
    
    .data-management-buttons .btn {
        width: 100%;
        margin-bottom: 10px;
    }
    
    .filter-row {
        flex-direction: column;
    }
    
    .filter-item {
        width: 100%;
    }
    
    .data-details {
        grid-template-columns: 1fr;
    }
}

/* ===== 删除按钮样式 ===== */
.btn-red {
    background-color: #EF4444 !important;
    color: #FFFFFF !important;
    border: 1px solid #EF4444 !important;
}

.btn-red:hover {
    background-color: #DC2626 !important;
    border-color: #DC2626 !important;
}

.btn-small {
    padding: 4px 8px !important;
    font-size: 12px !important;
    border-radius: 4px !important;
}

/* 装货单列表删除按钮样式 */
.note-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    background-color: #FFFFFF;
}

.note-content {
    flex: 1;
    cursor: pointer;
}

.note-actions {
    margin-left: 12px;
}

/* 装货数据组删除按钮样式 */
.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.group-header h4 {
    margin: 0;
    color: #374151;
}

.group-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* ===== 装货单计算器按钮和汇总栏字体放大 ===== */
/* 保存数据、查询装货单、查询装货数据按钮字体放大 */
#collaboration-calculator .btn-green,
#collaboration-calculator .btn-blue,
#collaboration-calculator .btn-purple {
    font-size: 15px !important; /* 从14px放大到15px */
}

/* 汇总栏字体放大 */
#collaboration-calculator .summary-bar {
    font-size: 17px !important; /* 从16px放大到17px */
}

#collaboration-calculator .summary-bar span {
    font-size: 17px !important; /* 确保所有汇总文字都是17px */
}

/* ===== 数据管理模态框字体放大 ===== */
/* 数据管理模态框内所有文字放大一个字号 */
#dataManagerModal {
    font-size: 16px !important; /* 基础字体从15px放大到16px */
}

#dataManagerModal h3 {
    font-size: 20px !important; /* 标题从19px放大到20px */
}

#dataManagerModal h4 {
    font-size: 18px !important; /* 子标题从17px放大到18px */
}

#dataManagerModal label {
    font-size: 16px !important; /* 标签从15px放大到16px */
}

#dataManagerModal input,
#dataManagerModal select {
    font-size: 16px !important; /* 输入框和选择框从15px放大到16px */
}

#dataManagerModal .btn {
    font-size: 16px !important; /* 按钮从15px放大到16px */
}

#dataManagerModal .note-item {
    font-size: 16px !important; /* 装货单项目从15px放大到16px */
}

#dataManagerModal .note-name {
    font-size: 17px !important; /* 装货单名称从16px放大到17px */
}

#dataManagerModal .note-date {
    font-size: 15px !important; /* 装货单日期从14px放大到15px */
}

#dataManagerModal .note-summary {
    font-size: 15px !important; /* 装货单摘要从14px放大到15px */
}

#dataManagerModal .filter-item label {
    font-size: 16px !important; /* 筛选标签从15px放大到16px */
}

#dataManagerModal .filter-item select {
    font-size: 16px !important; /* 筛选选择框从15px放大到16px */
}

#dataManagerModal .data-group h4 {
    font-size: 18px !important; /* 数据组标题从17px放大到18px */
}

#dataManagerModal .excel-table th {
    font-size: 15px !important; /* 表格标题从14px放大到15px */
}

#dataManagerModal .excel-table td {
    font-size: 15px !important; /* 表格内容从14px放大到15px */
}

/* ===== 电话号码点击拨号样式 ===== */
/* 查询装货单数据中的电话号码链接样式 */
#deliveryDataList a[href^="tel:"] {
    color: #007bff !important;
    text-decoration: none !important;
    font-weight: bold;
    padding: 2px 4px;
    border-radius: 3px;
    transition: all 0.2s ease;
    display: inline-block;
    min-width: 80px;
    text-align: center;
}

/* 电话号码悬停效果 */
#deliveryDataList a[href^="tel:"]:hover {
    background-color: #007bff;
    color: white !important;
    text-decoration: none !important;
}

/* 电话号码点击效果 */
#deliveryDataList a[href^="tel:"]:active {
    background-color: #0056b3;
    color: white !important;
}

/* 手机端电话号码样式优化 */
@media (max-width: 768px) {
    #deliveryDataList a[href^="tel:"] {
        font-size: 16px !important;
        padding: 8px 12px;
        min-width: 100px;
        border: 2px solid #007bff;
        border-radius: 5px;
        background-color: #f8f9fa;
    }
    
    #deliveryDataList a[href^="tel:"]:hover {
        background-color: #007bff;
        color: white !important;
        border-color: #0056b3;
    }
}

/* ===== 手机端隐藏品名说明文字 ===== */
@media (max-width: 768px) {
    /* 隐藏头部的品名说明文字，节省手机端屏幕空间 */
    .subtitle {
        display: none !important;
    }
    
    /* 手机端筛选条件分行显示 */
    .filter-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .filter-item {
        min-width: 100px;
        max-width: 150px;
        flex: 0 0 calc(50% - 4px);
    }
    
    .filter-item:last-child {
        flex: 0 0 100%;
        margin-top: 10px;
    }
}

/* ===== 手机端重量显示优化 ===== */
@media (max-width: 768px) {
    /* 装货单计算器汇总栏 - 手机端重量分行显示 */
    #collaboration-total-weight {
        display: block !important;
        line-height: 1.4;
        margin: 5px 0;
    }
    
    /* 手机端重量分行显示的样式 */
    .weight-line {
        display: block;
        margin-bottom: 3px;
        font-size: 17px !important; /* 与总件数字体大小保持一致 */
        color: white;
        font-weight: bold;
    }
    
    .weight-line:last-child {
        margin-bottom: 0;
    }
}

/* ===== 手机端装货单列表卡片式优化布局 ===== */
@media (max-width: 768px) {
    /* 装货单列表项 - 卡片式布局 */
    #dataManagerModal .note-item {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        padding: 16px;
        border: 1px solid #E5E7EB;
        border-radius: 12px;
        margin-bottom: 12px;
        background-color: #FFFFFF;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }
    
    /* 装货单内容区域 */
    #dataManagerModal .note-content {
        flex: 1;
        margin-bottom: 12px;
        cursor: pointer;
    }
    
    /* 装货单标题和日期 - 上下排列 */
    #dataManagerModal .note-header {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }
    
    /* 装货单名称 - 大字体，加粗 */
    #dataManagerModal .note-name {
        font-size: 18px !important;
        font-weight: 700;
        color: #1F2937;
        line-height: 1.4;
    }
    
    /* 装货单日期 - 小字体，灰色 */
    #dataManagerModal .note-date {
        font-size: 14px !important;
        color: #6B7280;
        font-weight: 400;
    }
    
    /* 操作按钮区域 - 水平排列在底部 */
    #dataManagerModal .note-actions {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
    }
    
    /* 按钮样式优化 */
    #dataManagerModal .note-actions .btn {
        width: 100%;
        padding: 12px 8px;
        font-size: 14px;
        border-radius: 8px;
        font-weight: 500;
        text-align: center;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    
    /* 按钮文字优化 */
    #dataManagerModal .note-actions .btn-small {
        padding: 12px 8px !important;
        font-size: 14px !important;
        width: 100%;
    }

    /* 移动端避免模态框闪烁：关闭动画和毛玻璃效果 */
    .modal {
        animation: none;
    }

    .modal-content {
        animation: none;
        backdrop-filter: none;
    }

    .modal-header::before {
        animation: none;
        display: none;
    }
}

/* ===== 手机端计算器表格样式优化 ===== */
@media (max-width: 768px) {
    /* 基础表格样式 - 手机端优化 */
    .excel-table {
        min-width: 100% !important;
        width: 100% !important;
        table-layout: auto !important;
        font-size: 12px !important;
    }
    
    /* 表格容器 - 手机端优化 */
    .excel-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: -10px -10px 10px -10px;
        padding: 10px;
    }
    
    /* 表头和单元格 - 手机端优化 */
    .excel-table th,
    .excel-table td {
        width: auto !important;
        min-width: 60px !important;
        max-width: none !important; /* 移除最大宽度限制 */
        padding: 4px 3px !important;
        font-size: 11px !important;
        white-space: nowrap !important;
        overflow: visible !important; /* 允许文字显示 */
        text-overflow: clip !important;
    }
    
    /* 装货单计算器表头特殊处理 - 允许文字换行 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th {
        white-space: normal !important; /* 允许表头文字换行 */
        word-break: break-word !important;
        line-height: 1.4 !important;
        min-width: 60px !important; /* 减小最小宽度 */
        padding: 6px 4px !important;
        vertical-align: middle !important;
        height: auto !important; /* 允许高度自适应 */
        min-height: 40px !important; /* 确保有足够高度显示文字 */
        font-size: 13px !important; /* 增大字体，与板型管计算器一致 */
    }
    
    /* 装货单计算器 - 移动端列宽优化（完整设置所有列，确保标题文字可见） */
    /* 第1-4列 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(1),
    #collaboration-calculator .excel-table tbody td:nth-child(1) { width: 70px !important; min-width: 70px !important; max-width: 90px !important; } /* 品名 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(2),
    #collaboration-calculator .excel-table tbody td:nth-child(2) { width: 60px !important; min-width: 60px !important; max-width: 80px !important; } /* 钢厂 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(3),
    #collaboration-calculator .excel-table tbody td:nth-child(3) { width: 80px !important; min-width: 80px !important; max-width: 100px !important; } /* 规格 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(4),
    #collaboration-calculator .excel-table tbody td:nth-child(4) { width: 60px !important; min-width: 60px !important; max-width: 80px !important; } /* 材质 */
    /* 第5列（米重）已隐藏，不需要设置 */
    /* 第6-26列 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(6),
    #collaboration-calculator .excel-table tbody td:nth-child(6) { width: 65px !important; min-width: 65px !important; max-width: 80px !important; } /* 长度(米) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(7),
    #collaboration-calculator .excel-table tbody td:nth-child(7) { width: 65px !important; min-width: 65px !important; max-width: 80px !important; } /* 数量(件) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(8),
    #collaboration-calculator .excel-table tbody td:nth-child(8) { width: 70px !important; min-width: 70px !important; max-width: 90px !important; } /* 计重方式 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(9),
    #collaboration-calculator .excel-table tbody td:nth-child(9) { width: 70px !important; min-width: 70px !important; max-width: 90px !important; } /* 工程长度可不填 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(10),
    #collaboration-calculator .excel-table tbody td:nth-child(10) { width: 80px !important; min-width: 80px !important; max-width: 100px !important; } /* 理论支/件重(kg) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(11),
    #collaboration-calculator .excel-table tbody td:nth-child(11) { width: 75px !important; min-width: 75px !important; max-width: 95px !important; } /* 理论重量(吨) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(12),
    #collaboration-calculator .excel-table tbody td:nth-child(12) { width: 65px !important; min-width: 65px !important; max-width: 80px !important; } /* 单价 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(13),
    #collaboration-calculator .excel-table tbody td:nth-child(13) { width: 70px !important; min-width: 70px !important; max-width: 90px !important; } /* 金额(元) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(14),
    #collaboration-calculator .excel-table tbody td:nth-child(14) { width: 70px !important; min-width: 70px !important; max-width: 90px !important; } /* 供应商 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(15),
    #collaboration-calculator .excel-table tbody td:nth-child(15) { width: 65px !important; min-width: 65px !important; max-width: 80px !important; } /* 电话 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(16),
    #collaboration-calculator .excel-table tbody td:nth-child(16) { width: 80px !important; min-width: 80px !important; max-width: 100px !important; } /* 地址 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(17),
    #collaboration-calculator .excel-table tbody td:nth-child(17) { width: 70px !important; min-width: 70px !important; max-width: 90px !important; } /* 承诺厚度 */
    /* 第18列（测量厚度）- 安卓手机端需要更窄，由JavaScript强制控制 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(18),
    #collaboration-calculator .excel-table tbody td:nth-child(18) { 
        width: 20px !important; 
        min-width: 20px !important; 
        max-width: 25px !important; 
    } /* 测量厚度 - 缩小到原来的40% */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(19),
    #collaboration-calculator .excel-table tbody td:nth-child(19) { width: 70px !important; min-width: 70px !important; max-width: 90px !important; } /* 承诺负差(%) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(20),
    #collaboration-calculator .excel-table tbody td:nth-child(20) { width: 75px !important; min-width: 75px !important; max-width: 95px !important; } /* 承诺支/件重 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(21),
    #collaboration-calculator .excel-table tbody td:nth-child(21) { width: 85px !important; min-width: 85px !important; max-width: 105px !important; } /* 实际支/件重(kg) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(22),
    #collaboration-calculator .excel-table tbody td:nth-child(22) { width: 85px !important; min-width: 85px !important; max-width: 105px !important; } /* 实际支/件价(元) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(23),
    #collaboration-calculator .excel-table tbody td:nth-child(23) { width: 75px !important; min-width: 75px !important; max-width: 95px !important; } /* 实际负差(%) */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(24),
    #collaboration-calculator .excel-table tbody td:nth-child(24) { width: 80px !important; min-width: 80px !important; max-width: 100px !important; } /* 执行标准 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th:nth-child(25),
    #collaboration-calculator .excel-table tbody td:nth-child(25) { width: 50px !important; min-width: 50px !important; max-width: 60px !important; } /* 操作 */
    
    /* 输入框和选择框 - 手机端优化 */
    .excel-table input,
    .excel-table select {
        width: 100% !important;
        min-width: 50px !important;
        max-width: 100px !important;
        height: 24px !important;
        padding: 2px 4px !important;
        font-size: 11px !important;
        border: 1px solid #ccc !important;
    }
    
    /* 板型管计算器 - 手机端列宽优化 */
    #steel-plate-calculator .excel-table th,
    #steel-plate-calculator .excel-table td {
        width: 60px !important;
        min-width: 60px !important;
        max-width: 80px !important;
    }
    
    #steel-plate-calculator .excel-table th:nth-child(1),
    #steel-plate-calculator .excel-table td:nth-child(1) { width: 80px !important; min-width: 80px !important; max-width: 100px !important; } /* 品名 */
    #steel-plate-calculator .excel-table th:nth-child(2),
    #steel-plate-calculator .excel-table td:nth-child(2) { width: 50px !important; min-width: 50px !important; max-width: 70px !important; } /* 钢厂 */
    #steel-plate-calculator .excel-table th:nth-child(3),
    #steel-plate-calculator .excel-table td:nth-child(3) { width: 80px !important; min-width: 80px !important; max-width: 100px !important; } /* 规格 */
    #steel-plate-calculator .excel-table th:nth-child(4),
    #steel-plate-calculator .excel-table td:nth-child(4) { width: 60px !important; min-width: 60px !important; max-width: 80px !important; } /* 材质 */
    #steel-plate-calculator .excel-table th:nth-child(12),
    #steel-plate-calculator .excel-table td:nth-child(12) { width: 100px !important; min-width: 100px !important; max-width: 120px !important; } /* 备注 */
    #steel-plate-calculator .excel-table th:nth-child(13),
    #steel-plate-calculator .excel-table td:nth-child(13) { width: 100px !important; min-width: 100px !important; max-width: 120px !important; } /* 工程总长度 */
    #steel-plate-calculator .excel-table th:nth-child(14),
    #steel-plate-calculator .excel-table td:nth-child(14) { width: 120px !important; min-width: 120px !important; max-width: 140px !important; } /* 执行标准 */
    #steel-plate-calculator .excel-table th:nth-child(15),
    #steel-plate-calculator .excel-table td:nth-child(15) { width: 45px !important; min-width: 45px !important; max-width: 50px !important; } /* 操作 */
    
    /* 螺纹钢计算器 - 手机端列宽优化 */
    #rebar-calculator .excel-table th,
    #rebar-calculator .excel-table td {
        width: 60px !important;
        min-width: 60px !important;
        max-width: 80px !important;
    }
    
    #rebar-calculator .excel-table th:nth-child(1),
    #rebar-calculator .excel-table td:nth-child(1) { width: 80px !important; min-width: 80px !important; max-width: 100px !important; } /* 品名 */
    #rebar-calculator .excel-table th:nth-child(2),
    #rebar-calculator .excel-table td:nth-child(2) { width: 60px !important; min-width: 60px !important; max-width: 80px !important; } /* 钢厂 */
    #rebar-calculator .excel-table th:nth-child(3),
    #rebar-calculator .excel-table td:nth-child(3) { width: 80px !important; min-width: 80px !important; max-width: 100px !important; } /* 规格 */
    #rebar-calculator .excel-table th:nth-child(4),
    #rebar-calculator .excel-table td:nth-child(4) { width: 70px !important; min-width: 70px !important; max-width: 90px !important; } /* 材质 */
    #rebar-calculator .excel-table th:nth-child(11),
    #rebar-calculator .excel-table td:nth-child(11) { width: 100px !important; min-width: 100px !important; max-width: 120px !important; } /* 备注 */
    
    /* 装货单计算器 - 手机端列宽优化 */
    /* 表格总宽度根据列宽自动计算：540+155+56+135+215+49+215+375 = 1740px */
    #collaboration-calculator .excel-table {
        min-width: 1740px !important; /* 根据实际列宽计算，确保不限制表格宽度 */
        width: max-content !important;
        table-layout: fixed !important; /* 使用固定布局 */
    }
    
    /* 装货单计算器 - 表体单元格（不包括表头） */
    #collaboration-calculator .excel-table tbody td {
        padding: 4px 3px !important;
        font-size: 11px !important; /* 减小字体以适应更多文字 */
        white-space: nowrap !important;
        overflow: visible !important; /* 允许文字溢出以便查看 */
        text-overflow: clip !important;
    }
    
    /* 装货单计算器 - 表头单元格（允许换行） */
    #collaboration-calculator .excel-table thead th {
        padding: 4px 3px !important;
        font-size: 11px !important;
        white-space: normal !important; /* 表头允许换行 */
        overflow: visible !important;
        text-overflow: clip !important;
    }
    
    /* 注意：列宽设置已在上面统一设置，这里不再重复 */
    
    /* 装货单计算器 - 说明行优化 */
    #collaboration-calculator .excel-table thead tr:first-child th {
        font-size: 13px !important; /* 手机端再放大一个字号 */
        padding: 2px 1px !important;
        min-width: 60px !important;
    }
    
    /* 装货单计算器 - 说明行宽度优化（根据实际列宽计算，确保不限制表格宽度） */
    /* 第1个说明区：货主填写（8列：品名70+钢厂60+规格80+材质60+长度65+数量65+计重方式70+工程长度70 = 540px） */
    #collaboration-calculator .excel-table thead tr:first-child th:nth-child(1) { 
        min-width: 540px !important; 
        max-width: none !important; 
    } /* 货主填写 */
    
    /* 第2个说明区：自动生成数据区（2列：理论支/件重80+理论重量75 = 155px） */
    #collaboration-calculator .excel-table thead tr:first-child th:nth-child(2) { 
        min-width: 155px !important; 
        max-width: none !important; 
    } /* 自动生成数据区 */
    
    /* 第3个说明区：装货人填写（1列：过磅重量56 = 56px，安卓手机端缩窄30%） */
    #collaboration-calculator .excel-table thead tr:first-child th:nth-child(3) { 
        min-width: 56px !important; 
        max-width: none !important; 
    } /* 装货人填写 */
    
    /* 第4个说明区：货主填写（5列：单价65+金额70+供应商70+电话65+地址80 = 350px） */
    #collaboration-calculator .excel-table thead tr:first-child th:nth-child(4) { 
        min-width: 350px !important; 
        max-width: none !important; 
    } /* 货主填写 */
    
    /* 第5个说明区：装货人填写（1列：测量厚度20 = 20px，缩小到原来的40%） */
    #collaboration-calculator .excel-table thead tr:first-child th:nth-child(5) { 
        min-width: 20px !important; 
        max-width: none !important; 
    } /* 装货人填写 */
    
    /* 第6个说明区：货主填写（3列：承诺厚度70+承诺负差70+承诺支/件重75 = 215px） */
    #collaboration-calculator .excel-table thead tr:first-child th:nth-child(6) { 
        min-width: 215px !important; 
        max-width: none !important; 
    } /* 货主填写 */
    
    /* 第7个说明区：自动生成（5列：实际支/件重85+实际支/件价85+实际负差75+执行标准80+操作50 = 375px） */
    #collaboration-calculator .excel-table thead tr:first-child th:nth-child(7) { 
        min-width: 375px !important; 
        max-width: none !important; 
    } /* 自动生成 */
    
    /* 装货单计算器 - 第二行标题优化 */
    #collaboration-calculator .excel-table thead tr:nth-child(2) th {
        font-size: 13px !important; /* 增大字体，与板型管计算器一致 */
        padding: 6px 4px !important; /* 增加内边距 */
        min-width: 70px !important; /* 确保最小宽度 */
        white-space: normal !important; /* 允许文字换行 */
        word-break: break-word !important;
        line-height: 1.4 !important;
        vertical-align: middle !important;
        height: auto !important; /* 允许高度自适应 */
        min-height: 40px !important; /* 确保有足够高度 */
    }
    
    /* 装货单计算器 - 输入框优化 */
    #collaboration-calculator .excel-table input,
    #collaboration-calculator .excel-table select {
        width: 100% !important;
        min-width: 100% !important;
        max-width: 100% !important; /* 占满整个单元格 */
        height: 28px !important; /* 增加高度 */
        padding: 4px 2px !important; /* 减小内边距，让输入框占满 */
        font-size: 13px !important; /* 增大字体 */
        box-sizing: border-box !important; /* 确保padding包含在宽度内 */
        margin: 0 !important; /* 移除外边距 */
    }
    
    /* 装货单计算器 - 单元格内边距优化 */
    #collaboration-calculator .excel-table td {
        padding: 2px !important; /* 减小单元格内边距，让输入框占满 */
    }
    
    /* 装货单计算器 - 只读字段优化 */
    #collaboration-calculator .excel-table .readonly input {
        font-size: 12px !important; /* 手机端再放大一个字号 */
        height: 20px !important;
    }
}

