/* ==========================================================================
   common.css - 统一导航页面样式（所有非 index.html 页面共享）
   包含: 重置、布局、卡片、按钮、表格、弹窗、分页、搜索、表单、页脚
         以及各页面独特样式（定价计算器、暗色表格、图片浏览等）
   ========================================================================== */

/* ========== 国际化语言显隐 ========== */
html.lang-zh-cn .i18n-en, html.lang-zh-cn .i18n-zh-tw { display: none !important; }
html.lang-en .i18n-zh-cn, html.lang-en .i18n-zh-tw { display: none !important; }
html.lang-zh-tw .i18n-zh-cn, html.lang-zh-tw .i18n-en { display: none !important; }
html.lang-zh-cn title.i18n-en, html.lang-zh-cn meta.i18n-en,
html.lang-zh-cn title.i18n-zh-tw, html.lang-zh-cn meta.i18n-zh-tw { display: none; }
html.lang-en title.i18n-zh-cn, html.lang-en meta.i18n-zh-cn,
html.lang-en title.i18n-zh-tw, html.lang-en meta.i18n-zh-tw { display: none; }
html.lang-zh-tw title.i18n-zh-cn, html.lang-zh-tw meta.i18n-zh-cn,
html.lang-zh-tw title.i18n-en, html.lang-zh-tw meta.i18n-en { display: none; }

/* ========== 全局重置 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
}

/* ========== 页面基础 ========== */
body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 10px 20px;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ========== 容器 ========== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    flex: 1;
    width: 100%;
}

/* ========== 头部与标题 ========== */
header {
    text-align: center;
    margin-bottom: 20px;
    position: relative;
}

h1 {
    color: #2c3e50;
    margin-bottom: 5px;
    font-weight: 600;
}

.session-info {
    position: absolute;
    top: 0;
    right: 0;
    font-size: 14px;
    color: #7f8c8d;
}

.session-id {
    font-weight: bold;
    color: #3498db;
}

.clear-session {
    background: #e74c3c;
    color: white;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 10px;
    transition: background 0.3s;
}
.clear-session:hover { background: #c0392b; }

/* ========== 动画 ========== */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ========== 卡片 ========== */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.08);
    padding: 20px;
    margin-bottom: 20px;
}

.card h2 {
    color: #2c3e50;
    margin-bottom: 12px;
    font-weight: 600;
    font-size: 16px;
    display: flex;
    align-items: center;
}
.card h2 i { margin-right: 10px; color: #3498db; }

/* ========== 按钮 ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #3498db;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    white-space: nowrap;
}
.btn:hover { background: #2980b9; box-shadow: 0 4px 8px rgba(0,0,0,0.1); }
.btn i { margin-right: 6px; }
.btn:disabled { background-color: #bdc3c7; cursor: not-allowed; opacity: 0.6; }

/* 按钮变体 */
.btn.delete-btn { background: #e74c3c; }
.btn.delete-btn:hover { background: #c0392b; }
.btn.edit-btn { background: #f39c12; }
.btn.edit-btn:hover { background: #e67e22; }
.btn.save-btn { background: #2ecc71; }
.btn.save-btn:hover { background: #27ae60; }
.btn.reset-btn { background: #95a5a6; }
.btn.reset-btn:hover { background: #7f8c8d; }
.btn.back-btn { background: #95a5a6; }
.btn.back-btn:hover { background: #7f8c8d; }
.btn.sync-btn { background: #2ecc71; }
.btn.sync-btn:hover { background: #27ae60; }

/* ========== 通知 ========== */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 6px;
    color: white;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1100;
    transition: all 0.3s ease;
}
.notification.success { background-color: #2ecc71; }
.notification.error { background-color: #e74c3c; }
.notification.info { background-color: #3498db; }
.notification.warning { background-color: #f39c12; }

/* ========== 空状态 ========== */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #7f8c8d;
}
.empty-state i {
    font-size: 48px;
    margin-bottom: 12px;
    color: #bdc3c7;
    display: block;
}

/* ========== 加载中 ========== */
.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}
.loading i {
    font-size: 20px;
    margin-right: 8px;
    animation: spin 1s linear infinite;
}

/* ========== 表格 ========== */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
    table-layout: fixed;
}

th {
    background-color: #f8f9fa;
    padding: 10px 6px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 2px solid #e9ecef;
    font-size: 13px;
    white-space: nowrap;
}

td {
    padding: 10px 6px;
    border-bottom: 1px solid #e9ecef;
    font-size: 13px;
    word-wrap: break-word;
}

tr:hover { background-color: #f8fafc; }

/* ========== 弹窗 ========== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    animation: modalFadeIn 0.25s ease;
}
@keyframes modalFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: auto;
    min-width: 360px;
    max-width: 560px;
    max-height: 80vh;
    overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    display: flex;
    flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}
@keyframes modalSlideIn {
    from { opacity: 0; transform: translateY(-30px) scale(0.95); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.modal-title {
    font-size: 17px;
    color: #2c3e50;
    font-weight: 600;
}

.close-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: #7f8c8d;
    cursor: pointer;
    transition: color 0.3s;
}
.close-btn:hover { color: #e74c3c; }

/* 弹窗外部关闭按钮（如 customer_view 图片预览） */
.modal-close {
    position: absolute;
    top: 16px; right: 16px;
    background: rgba(0,0,0,0.6);
    color: white; border: none;
    width: 40px; height: 40px; border-radius: 50%;
    font-size: 22px; cursor: pointer;
    z-index: 1001;
    display: flex; justify-content: center; align-items: center;
    transition: all 0.2s;
}
.modal-close:hover { background: rgba(231,76,60,0.85); transform: scale(1.1); }

/* 弹窗内嵌图片 */
.modal-image {
    display: block;
    max-width: 100%;
    max-height: 75vh;
    object-fit: contain;
    border-radius: 8px;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-footer {
    padding: 15px 20px;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    flex-shrink: 0;
}

/* 通用弹窗 - 内容自适应（无 header/footer 时） */
.modal-overlay > .modal-content:only-child,
.modal-overlay > .modal-content:not(:has(.modal-header)) {
    width: auto; min-width: 280px; max-width: 560px;
}

/* ========== 分页 ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 16px;
    gap: 4px;
    flex-wrap: wrap;
}

.page-btn {
    padding: 6px 10px;
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 4px;
    cursor: pointer;
    color: #3498db;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.2s;
    min-width: 32px;
    text-align: center;
}
.page-btn:hover { background: #e9ecef; }
.page-btn.active { background: #3498db; color: white; border-color: #3498db; }
.page-btn.disabled {
    color: #6c757d; cursor: not-allowed;
    pointer-events: none; opacity: 0.6;
}

.page-ellipsis { padding: 6px 4px; color: #7f8c8d; font-size: 12px; }
.page-info { margin-left: 12px; font-size: 12px; color: #7f8c8d; }

/* ========== 搜索区域 ========== */
.search-container {
    display: flex;
    margin-bottom: 20px;
    gap: 10px;
}

.search-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 12px;
}
.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #2c3e50;
    font-size: 13px;
}
.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 13px;
    transition: all 0.3s;
}
.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52,152,219,0.2);
}

/* ========== 操作按钮（表格内） ========== */
.action-buttons {
    display: flex;
    gap: 8px;
}

.action-btn {
    background: none;
    border: none;
    color: #3498db;
    cursor: pointer;
    font-size: 14px;
    transition: color 0.3s;
    padding: 4px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
}
.action-btn:hover { color: #2980b9; }
.action-btn.delete { color: #e74c3c; }
.action-btn.delete:hover { color: #c0392b; }

/* ========== 状态标签 ========== */
.status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}
.status.active { background-color: #d4edda; color: #155724; }
.status.inactive { background-color: #f8d7da; color: #721c24; }
.status.waiting { background-color: #fff3cd; color: #856404; }
.status.processing { background-color: #cce5ff; color: #004085; }
.status.completed { background-color: #d4edda; color: #155724; }
.status.failed { background-color: #f8d7da; color: #721c24; }
.status.yes { background-color: rgba(46,204,113,0.1); color: #27ae60; }
.status.no { background-color: rgba(189,195,199,0.1); color: #95a5a6; }

/* ========== 页脚 ========== */
.footer {
    padding: 15px 20px;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.85rem;
    border-top: 1px solid #eaeaea;
    width: 100%;
    background-color: rgba(255,255,255,0.9);
    border-radius: 10px 10px 0 0;
    margin-top: 20px;
    flex-shrink: 0;
}
.footer-content { max-width: 800px; margin: 0 auto; }
.logo { font-size: 1.5rem; font-weight: 700; color: #3498db; margin-bottom: 8px; }
.copyright { margin-bottom: 12px; line-height: 1.4; font-size: 0.9rem; }
.quick-links ul, .record-info ul {
    display: flex; justify-content: center; align-items: center;
    flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 10px 0;
}
.quick-links li, .record-info li { display: inline-flex; align-items: center; gap: 8px; }
.quick-links a, .record-info a {
    color: #3498db; text-decoration: none; transition: color 0.3s ease;
}
.quick-links a:hover, .record-info a:hover { color: #2c3e50; text-decoration: underline; }
.separator, .record-separator { color: #bdc3c7; user-select: none; }

/* ========== 搜索高亮 ========== */
.search-highlight { background-color: #fff3cd; padding: 2px 4px; border-radius: 2px; }

/* ==========================================================================
   页面专属样式 - price.html (定价计算器)
   ========================================================================== */
.page-price body,
body.page-price {
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    padding: 70px 20px 10px 20px;
    display: block;
    min-height: auto;
}

.page-price header,
body.page-price header {
    position: fixed; top: 0; left: 0; right: 0;
    text-align: center; padding: 10px 20px; margin-bottom: 0;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    z-index: 100; border-bottom: 1px solid #ddd;
}
.page-price h1,
body.page-price h1 {
    font-size: 1.3rem; margin-bottom: 0;
    background: linear-gradient(to right, #3498db, #2c3e50);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}

.page-price .container,
body.page-price .container { max-width: 1400px; flex: none; width: auto; }

.page-price .card,
body.page-price .card {
    border-radius: 12px; padding: 15px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); margin-bottom: 10px;
}

/* price: 标题 */
.price-page .card h2,
.card-title {
    font-size: 1rem; color: #2c3e50; margin-bottom: 12px; padding-bottom: 8px;
    border-bottom: 2px solid #3498db; display: flex; align-items: center; gap: 8px;
}
.card-title i { color: #3498db; }
.subtitle { font-size: 1rem; color: #7f8c8d; max-width: 800px; margin: 0 auto; line-height: 1.5; }

/* price: 主布局 */
.main-content { display: grid; grid-template-columns: 1fr; gap: 15px; }
.input-section { display: grid; grid-template-columns: repeat(3, 1fr); gap: 15px; align-items: stretch; }
.input-section .input-card { height: 100%; }
.input-card { background: white; border-radius: 12px; padding: 15px; box-shadow: 0 4px 10px rgba(0,0,0,0.08); }
.input-card h2 { font-size: 0.9rem; color: #2c3e50; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid #3498db; display: flex; align-items: center; gap: 8px; }
.input-card h2 i { color: #3498db; }

/* price: 表单 */
.page-price .form-group,
body.page-price .form-group { margin-bottom: 8px; }
.page-price .form-group label,
body.page-price .form-group label { font-size: 0.75rem; color: #555; margin-bottom: 3px; font-weight: 500; }
.page-price .form-group input,
body.page-price .form-group input {
    width: 100%; padding: 6px 8px; border: 2px solid #e0e0e0;
    border-radius: 6px; font-size: 0.9rem; transition: border-color 0.3s;
}
.page-price .form-group input:focus,
body.page-price .form-group input:focus { outline: none; border-color: #3498db; }
.page-price .form-group input[type="range"],
body.page-price .form-group input[type="range"] { padding: 0; border: none; }

.input-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.form-group .input-hint { font-size: 0.7rem; color: #999; margin-top: 2px; }

/* price: 效率滑块 */
.efficiency-slider {
    -webkit-appearance: none; appearance: none;
    width: 100%; height: 8px; border-radius: 4px;
    background: linear-gradient(to right, #3498db 0%, #3498db 80%, #e0e0e0 80%, #e0e0e0 100%);
    outline: none;
}
.efficiency-slider::-webkit-slider-thumb {
    -webkit-appearance: none; appearance: none;
    width: 20px; height: 20px; border-radius: 50%; background: #3498db;
    cursor: pointer; border: 2px solid white; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.efficiency-slider::-moz-range-thumb {
    width: 20px; height: 20px; border-radius: 50%; background: #3498db;
    cursor: pointer; border: 2px solid white; box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}
.slider-labels { display: flex; justify-content: space-between; font-size: 0.75rem; color: #555; margin-top: 5px; }
.slider-labels strong { color: #3498db; }

/* price: 摘要/对比/价值 */
.summary-box {
    background: linear-gradient(135deg, #3498db, #2980b9);
    color: white; border-radius: 6px; padding: 10px 15px; margin-top: 10px;
    font-size: 1rem; display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
}
.summary-box i { margin-right: 3px; }

.comparison-table { width: 100%; border-collapse: collapse; margin-top: 10px; font-size: 0.75rem; }
.comparison-table th { background: #2c3e50; color: white; padding: 8px 5px; text-align: left; font-weight: 500; }
.comparison-table td { padding: 8px 5px; border-bottom: 1px solid #eee; vertical-align: top; }
.comparison-table tr:nth-child(even) { background: #f8f9fa; }
.comparison-table tr:hover { background: #e8f4fc; }

.price-tag { font-weight: bold; color: #e74c3c; font-size: 0.95rem; }

.badge { display: inline-block; padding: 2px 6px; border-radius: 4px; font-size: 0.7rem; font-weight: 500; }
.badge-primary { background: #3498db; color: white; }
.badge-success { background: #27ae60; color: white; }
.badge-warning { background: #f39c12; color: white; }
.badge-info { background: #9b59b6; color: white; }

.advantage-list { list-style: none; padding: 0; margin: 0; }
.advantage-list li { padding: 2px 0; font-size: 0.7rem; }
.advantage-list li::before { content: "✓ "; color: #27ae60; font-weight: bold; margin-right: 3px; }
.disadvantage-list li::before { content: "✗ "; color: #e74c3c; font-weight: bold; margin-right: 3px; }

.merged-comparison {
    background: linear-gradient(135deg, #34495e, #4a6278);
    color: white; border-radius: 8px; padding: 12px; margin-top: 10px;
}
.merged-comparison h3 { font-size: 0.9rem; margin-bottom: 10px; text-align: center; color: white; }
.merged-table { width: 100%; border-collapse: collapse; font-size: 0.8rem; color: #ecf0f1; }
.merged-table th { background: rgba(255,255,255,0.2); padding: 10px 6px; text-align: center; font-weight: 600; border-bottom: 2px solid rgba(255,255,255,0.3); color: #fff; }
.merged-table td { padding: 10px 6px; text-align: center; border-bottom: 1px solid rgba(255,255,255,0.1); color: #ecf0f1; border: 1px solid rgba(255,255,255,0.2); }
.merged-table tr:last-child td { border-bottom: none; }
.merged-table .plan-name { font-weight: bold; font-size: 0.85rem; color: #fff; }
.merged-table .highlight { background: rgba(255,255,255,0.08); }
.merged-table .profit { color: #58d68d; font-weight: bold; }
.merged-table .cost { color: #f1948a; }
.section-header { background: rgba(255,255,255,0.2); font-weight: bold; font-size: 0.7rem; color: #fff; }
.sub-header { background: rgba(0,0,0,0.3); font-weight: bold; font-size: 0.75rem; color: #fff; }
.before-col { background: rgba(231,76,60,0.25); color: #f5b7b1; }
.after-col { background: rgba(39,174,96,0.25); color: #abebc6; }
.before-header { background: #c0392b; color: white; }
.after-header { background: #27ae60; color: white; }

.value-section { background: linear-gradient(135deg, #9b59b6, #8e44ad); color: white; border-radius: 8px; padding: 12px; margin-top: 10px; }
.value-section h3 { font-size: 0.85rem; margin-bottom: 10px; }
.value-list { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.value-item { background: rgba(255,255,255,0.15); border-radius: 6px; padding: 8px; }
.value-item .value-num { font-size: 1rem; font-weight: bold; color: #ffd700; }
.value-item .value-label { font-size: 0.65rem; opacity: 0.9; margin-top: 2px; }

.time-savings { background: rgba(255,255,255,0.15); border-radius: 6px; padding: 10px; margin-top: 10px; }
.time-savings-row { display: flex; justify-content: space-between; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,0.2); font-size: 0.8rem; }
.time-savings-row:last-child { border-bottom: none; }
.time-savings-row.highlight { font-weight: bold; color: #ffd700; font-size: 0.9rem; }

.warning-box { background: #fff3cd; border-left: 4px solid #f39c12; padding: 8px 12px; border-radius: 0 6px 6px 0; margin-top: 10px; font-size: 0.75rem; color: #856404; }
.warning-box i { margin-right: 6px; }

.recommendation-box { background: linear-gradient(135deg, #f39c12, #d35400); color: white; border-radius: 8px; padding: 12px; margin-top: 10px; text-align: center; }
.recommendation-box h3 { font-size: 0.9rem; margin-bottom: 6px; }
.recommendation-box .best-choice { font-size: 1.3rem; font-weight: bold; margin: 6px 0; }
.recommendation-box .reason { font-size: 0.8rem; opacity: 0.95; }

.contact-box { background: linear-gradient(135deg, #2c3e50, #34495e); color: white; border-radius: 8px; padding: 15px; margin-top: 10px; text-align: center; }
.contact-box h3 { font-size: 0.9rem; margin-bottom: 10px; color: #3498db; }
.contact-phone { font-size: 1.3rem; font-weight: bold; color: #ffd700; margin: 10px 0; letter-spacing: 2px; }
.contact-phone i { margin-right: 8px; }
.contact-desc { font-size: 0.8rem; opacity: 0.9; margin-top: 8px; }

.benefits-section { background: linear-gradient(135deg, #3498db, #2980b9); color: white; border-radius: 8px; padding: 12px; margin-top: 10px; }
.benefits-section h3 { font-size: 0.85rem; margin-bottom: 10px; }
.benefits-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.benefit-item { background: rgba(255,255,255,0.15); border-radius: 6px; padding: 8px; display: flex; align-items: flex-start; gap: 8px; }
.benefit-icon { font-size: 1rem; flex-shrink: 0; }
.benefit-content h4 { font-size: 0.75rem; margin-bottom: 2px; }
.benefit-content p { font-size: 0.65rem; opacity: 0.9; line-height: 1.3; }

.nav-links { display: flex; justify-content: center; gap: 15px; margin-top: 10px; flex-wrap: wrap; }
.nav-links a { color: #3498db; text-decoration: none; font-size: 0.75rem; }
.nav-links span { color: #bdc3c7; }
.section-divider { height: 1px; background: linear-gradient(to right, transparent, #3498db, transparent); margin: 12px 0; }

/* ==========================================================================
   页面专属样式 - customer_view.html (暗色表格 + 图片模态框)
   ========================================================================== */

/* 客户详情 */
.customer-details { margin-top: 20px; }
.detail-group { margin-bottom: 25px; padding-bottom: 15px; border-bottom: 1px solid #eee; }
.detail-group:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.detail-group h3 { color: #2c3e50; margin-bottom: 15px; font-size: 18px; font-weight: 600; }
.detail-item { display: flex; padding: 12px 0; border-bottom: 1px solid #f5f5f5; }
.detail-item:last-child { border-bottom: none; }
.detail-label { font-weight: 500; color: #7f8c8d; width: 150px; flex-shrink: 0; }
.detail-value { font-weight: 500; color: #2c3e50; flex: 1; }

/* 暗色主题表格 */
.dark-table { width: 100%; border-collapse: collapse; margin-top: 10px; table-layout: fixed; }
.dark-table th { background-color: #000; padding: 12px 8px; text-align: left; font-weight: 600; color: #fff; border-bottom: 2px solid #444; }
.dark-table th.center-header { text-align: center; }
.dark-table td { padding: 12px 8px; border-bottom: 1px solid #444; word-wrap: break-word; background-color: #000; color: #fff; }
.dark-table tr:hover { background-color: #222; }
.dark-table tr:hover td { background-color: #222; }

.image-cell { text-align: center; vertical-align: middle; background-color: #000; padding: 10px; }
.config-name-cell { text-align: center; vertical-align: middle; background-color: #000; color: #fff; font-weight: 500; padding: 15px 10px; }
.dimension-cell { text-align: center; vertical-align: middle; padding: 10px; background-color: #000; color: #fff; }
.image-cell img { max-width: 100%; max-height: 100px; border-radius: 4px; object-fit: contain; display: block; margin: 0 auto; cursor: pointer; transition: transform 0.3s ease; }
.image-cell img:hover { transform: scale(1.05); }

.list-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.list-title { display: flex; align-items: center; margin: 0; }
.list-count { margin-left: 15px; color: #7f8c8d; font-size: 14px; font-style: italic; }

/* 无权限 */
.no-access { text-align: center; padding: 50px 20px; color: #7f8c8d; }
.no-access i { font-size: 60px; margin-bottom: 20px; color: #e74c3c; }

/* ==========================================================================
   页面专属样式 - view_imgs.html (图片网格浏览)
   ========================================================================== */

.image-grid {
    display: grid; grid-template-columns: repeat(2, 1fr);
    gap: 40px; margin-top: 20px; justify-items: center;
    max-width: 100%; margin-left: auto; margin-right: auto;
}
.image-card {
    background: white; border-radius: 12px; overflow: hidden;
    transition: all 0.3s ease; border: 1px solid #e9ecef;
    position: relative; width: 100%; max-width: 500px;
    cursor: pointer; box-shadow: 0 4px 8px rgba(0,0,0,0.05);
    display: flex; flex-direction: column;
}
.image-card:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.12); border-color: #3498db; }
.image-title { background: #3498db; color: white; padding: 10px 15px; font-weight: 600; text-align: center; font-size: 0.95rem; }
.image-title[data-type="top"] { background: linear-gradient(to right, #3498db, #2980b9); }
.image-title[data-type="bottom"] { background: linear-gradient(to right, #2ecc71, #27ae60); }
.image-title[data-type="other"] { background: linear-gradient(to right, #95a5a6, #7f8c8d); }
.image-preview { width: 100%; height: 350px; overflow: hidden; position: relative; }
.image-card img { width: 100%; height: 100%; object-fit: contain; transition: transform 0.5s ease; cursor: pointer; }
.image-card:hover img { transform: scale(1.05); }
.open-btn {
    position: absolute; top: 15px; right: 15px;
    background: rgba(52,152,219,0.9); color: white;
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    text-decoration: none; opacity: 0; transition: all 0.3s ease; z-index: 10;
}
.image-card:hover .open-btn { opacity: 1; }
.open-btn:hover { background: #2980b9; transform: scale(1.1); }
.click-hint {
    position: absolute; bottom: 10px; left: 0; right: 0;
    text-align: center; color: white; font-size: 0.8rem;
    opacity: 0; transition: opacity 0.3s ease; pointer-events: none;
    background: rgba(0,0,0,0.5); padding: 5px; border-radius: 4px; margin: 0 10px;
}
.image-preview:hover .click-hint { opacity: 1; }

.file-info-container {
    background: #f8f9fa; border-radius: 10px; padding: 15px 20px;
    margin: 15px auto 20px; max-width: 100%; border-left: 4px solid #3498db;
}
.file-info-row { display: flex; justify-content: space-between; margin-bottom: 10px; border-bottom: 1px solid #eee; padding-bottom: 10px; }
.file-info-row:last-child { margin-bottom: 0; border-bottom: none; }
.file-info-row .file-info-item { flex: 0 0 48%; display: flex; align-items: center; padding: 8px 0; }
.file-info-row .file-info-label { font-weight: 600; color: #2c3e50; min-width: 100px; margin-right: 10px; }
.file-info-row .file-info-value { color: #555; word-break: break-all; flex: 1; }

.image-info-table { padding: 20px; border-top: 1px solid #eee; background-color: #fafafa; cursor: pointer; transition: all 0.3s ease; }
.image-info-table:hover { background-color: #f0f7ff; box-shadow: inset 0 0 0 1px rgba(52,152,219,0.2); }
.image-info-table h4 { color: #2c3e50; margin-bottom: 10px; font-size: 1rem; }
.image-info-table:hover h4 { color: #2980b9; }
.info-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.info-item { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px dashed #e0e0e0; }
.info-item:last-child { border-bottom: none; }
.info-label { font-weight: 600; color: #2c3e50; font-size: 0.9rem; }
.info-value { color: #555; font-size: 0.9rem; text-align: right; max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.click-to-yolo { display: inline-flex; align-items: center; font-size: 0.85rem; color: #3498db; margin-top: 8px; opacity: 0; transition: opacity 0.3s ease; }
.image-info-table:hover .click-to-yolo { opacity: 1; }

.header-info { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; flex-wrap: wrap; }
.header-actions { display: flex; gap: 10px; }

/* 深色主题图片查看器 (view_imgs) */
.image-modal {
    display: none; position: fixed; top: 0; left: 0;
    width: 100%; height: 100%; background-color: rgba(0,0,0,0.9);
    z-index: 2000; justify-content: center; align-items: center;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* 深色查看器内覆盖通用弹窗尺寸 */
.image-modal .modal-content {
    max-width: 90vw; max-height: 90vh; min-width: auto;
    background: #111; color: #f0f0f0;
    border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,0.6);
    animation: modalSlideIn 0.3s ease;
}
.image-modal .modal-header {
    padding: 15px 20px; background-color: #222; color: white;
    border-bottom: 1px solid #333;
}
.image-modal .modal-title { color: #f0f0f0; font-size: 1.05rem; }
.image-modal .modal-close {
    position: static; background: none; color: #aaa; font-size: 1.5rem;
    width: 30px; height: 30px; border-radius: 50%;
}
.image-modal .modal-close:hover { color: white; background-color: rgba(255,255,255,0.1); transform: none; }
.image-modal .modal-body {
    flex: 1; display: flex; justify-content: center; align-items: center;
    padding: 20px; overflow: hidden;
}
.image-modal .modal-image {
    max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain;
}
.image-modal .modal-footer {
    padding: 15px 20px; background-color: #222; color: #aaa;
    font-size: 0.9rem; border-top: 1px solid #333;
    display: flex; justify-content: space-between; align-items: center;
}
.modal-controls { display: flex; gap: 10px; }
.modal-btn {
    background-color: rgba(255,255,255,0.1); border: none; color: white;
    width: 40px; height: 40px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s ease;
}
.modal-btn:hover { background-color: rgba(255,255,255,0.2); }
.modal-btn:disabled { opacity: 0.3; cursor: not-allowed; }
.image-counter { font-size: 0.9rem; color: #aaa; }
.no-gtx-warning { color: #e74c3c; margin-top: 8px; font-size: 0.85rem; display: flex; align-items: center; gap: 5px; }
.status-tag { display: inline-block; padding: 4px 8px; border-radius: 20px; font-size: 12px; font-weight: 500; }
.status-tag.yes { background-color: rgba(46,204,113,0.1); color: #27ae60; }
.status-tag.no { background-color: rgba(189,195,199,0.1); color: #95a5a6; }

/* ==========================================================================
   页面专属样式 - 方案/元件/规则选择 (customer_plan.html & gerber.html 共享)
   ========================================================================== */

/* 方案表单区域 */
.plan-form-section { margin-bottom: 20px; padding: 16px; background-color: #f8fafc; border-radius: 8px; border: 1px solid #e9ecef; }
.plan-form-section h3 { color: #2c3e50; margin-bottom: 16px; font-size: 16px; font-weight: 600; display: flex; align-items: center; }
.plan-form-section h3 i { margin-right: 8px; color: #3498db; }

/* 表单行内布局：label 与 input 同一行 */
.plan-form-section .form-group {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}
.plan-form-section .form-group label {
    min-width: 90px;
    flex-shrink: 0;
    margin-bottom: 0;
    font-weight: 500;
    color: #2c3e50;
    font-size: 13px;
}
.plan-form-section .form-group .form-control {
    flex: 1;
}
.form-control.textarea { resize: vertical; min-height: 80px; }

/* 客户选择区域（行内布局） */
.customer-selection {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}
.customer-selection > label {
    min-width: 90px;
    flex-shrink: 0;
    font-weight: 500;
    color: #2c3e50;
    font-size: 13px;
    margin-bottom: 0;
}
.selection-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.customer-select-container { position: relative; flex: 1; min-width: 200px; }
.customer-select { width: 100%; padding: 10px 12px; border: 2px solid #e0e0e0; border-radius: 8px; font-size: 14px; appearance: none; background: white; cursor: pointer; }
.select-icon { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: #7f8c8d; }
.customer-hint { width: 100%; font-size: 12px; color: #7f8c8d; padding-left: 100px; }
.loading-indicator { width: 100%; color: #3498db; font-size: 13px; padding-left: 100px; }
.loading-indicator i { animation: spin 1s linear infinite; }

/* 元件选择 */
.components-selection, .rules-selection { margin-bottom: 24px; }
.components-header, .rules-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px;
    padding-bottom: 10px; border-bottom: 2px solid #e8f0fe;
}
.components-header h4, .rules-header h4 {
    font-size: 15px; font-weight: 600; color: #2c3e50; display: flex; align-items: center; gap: 6px;
    margin: 0;
}
.components-header h4 i, .rules-header h4 i { color: #3498db; }
.components-counter, .rules-counter {
    font-size: 13px; color: #7f8c8d; background: #f0f4f8; padding: 4px 12px; border-radius: 20px;
}

.component-actions, .rule-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; align-items: center; }
.component-action-btn, .rule-action-btn {
    padding: 6px 12px; border: 1px solid #ddd; border-radius: 6px;
    background: white; cursor: pointer; font-size: 12px; transition: all 0.2s;
}
.component-action-btn:hover, .rule-action-btn:hover { background: #f0f0f0; }
.component-action-btn.all, .rule-action-btn.all { color: #3498db; border-color: #3498db; }
.component-action-btn.clear, .rule-action-btn.clear { color: #e74c3c; border-color: #e74c3c; }
.component-action-btn.invert, .rule-action-btn.invert { color: #f39c12; border-color: #f39c12; }

/* 搜索框（带图标） */
.component-search-container, .rule-search-container {
    position: relative;
    flex: 1;
    min-width: 150px;
}
.component-search-container i, .rule-search-container i {
    position: absolute; left: 10px; top: 50%; transform: translateY(-50%);
    color: #aaa; font-size: 13px; pointer-events: none;
}
.component-search, .rule-search {
    width: 100%; padding: 8px 12px 8px 32px; border: 1px solid #ddd;
    border-radius: 6px; font-size: 13px; transition: border-color 0.3s;
}
.component-search:focus, .rule-search:focus { border-color: #3498db; outline: none; }

/* 网格 */
.components-grid-container, .rules-grid-container { margin-top: 10px; }
.components-grid {
    display: flex; flex-wrap: wrap; gap: 8px;
}
.rules-grid {
    display: flex; flex-wrap: wrap; gap: 8px;
}

/* 元件卡片 */
.component-grid-item { flex: 0 0 calc(25% - 9px); }
.component-card {
    background: #fff; border: 1px solid #e9ecef; border-radius: 8px;
    padding: 12px; cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center; position: relative;
    min-height: 90px;
}
.component-card:hover { border-color: #3498db; transform: translateY(-2px); box-shadow: 0 4px 12px rgba(0,0,0,0.1); }
.component-card.selected { border-color: #3498db; background: #ebf5fb; box-shadow: 0 0 0 2px rgba(52,152,219,0.3); }
.component-card-header { width: 100%; display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
.component-checkbox-wrapper { display: flex; align-items: center; flex-shrink: 0; }
.component-checkbox { accent-color: #3498db; width: 16px; height: 16px; cursor: pointer; }
.component-name {
    flex: 1; font-size: 13px; font-weight: 500; color: #2c3e50;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.component-type-tag { display: inline-block; padding: 2px 6px; border-radius: 3px; font-size: 11px; font-weight: 500; flex-shrink: 0; }
.component-type-tag.zip { background: #e8f4fd; color: #2471a3; }
.component-type-tag.rar { background: #fdecea; color: #c0392b; }
.component-type-tag.other { background: #f0f0f0; color: #7f8c8d; }
.component-info { width: 100%; margin-top: auto; padding-top: 6px; border-top: 1px solid #f0f0f0; }
.component-info > div {
    font-size: 12px; color: #7f8c8d;
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.component-status { font-size: 10px; padding: 2px 6px; border-radius: 10px; }
.component-status.waiting { background: #fff3cd; color: #856404; }
.component-status.progressing { background: #cce5ff; color: #004085; }
.component-status.completed { background: #d4edda; color: #155724; }
.component-status.failed { background: #f8d7da; color: #721c24; }

/* 规则卡片 - 暗色主题 */
.rule-grid-item { flex: 0 0 calc(12.5% - 7px); }
.rule-card {
    background: #1e1e1e; border: 1px solid #333; border-radius: 8px;
    padding: 8px; cursor: pointer; transition: all 0.2s;
    display: flex; flex-direction: column; align-items: center;
}
.rule-card:hover { background: #2a2a2a; border-color: #3498db; transform: translateY(-2px); }
.rule-card.selected { background: #2d2d2d; border-color: #3498db; }
.rule-card-header { width: 100%; display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.rule-checkbox-wrapper { display: flex; align-items: center; }
.rule-checkbox { accent-color: #3498db; }
.rule-name { font-size: 11px; color: #fff; text-align: center; word-break: break-all; margin-bottom: 4px; }
.rule-type-tag { display: inline-block; padding: 1px 4px; border-radius: 3px; font-size: 9px; font-weight: 500; }
.rule-type-tag.gtp { background: #4caf50; color: white; }
.rule-dimensions { font-size: 10px; color: #bbb; text-align: center; margin-top: 2px; }
.rule-image-container {
    width: 100%; height: 100px; margin-top: 2px; background: #2d2d2d;
    border-radius: 4px; overflow: hidden; display: flex;
    justify-content: center; align-items: center;
}
.rule-image { width: 100%; height: 100%; object-fit: contain; }
.no-image { font-size: 9px; color: #bbb; padding: 10px 0; text-align: center; }

/* 已选摘要 */
.selected-component-summary, .selected-summary {
    margin-top: 12px; padding: 10px; background: #f8fafc; border-radius: 8px; border: 1px solid #e0e0e0;
}
.component-summary-header, .summary-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.component-summary-title, .summary-title { font-size: 14px; font-weight: 600; color: #2c3e50; }
.component-summary-content, .summary-content { display: flex; flex-wrap: wrap; gap: 6px; }
.selected-component-item, .selected-rule-item { display: inline-flex; align-items: center; gap: 4px; padding: 3px 8px; background: #fff; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; color: #333; }
.component-summary-more, .summary-more { font-size: 12px; color: #7f8c8d; margin-left: 4px; }
.no-components-available, .no-rules-available { text-align: center; padding: 20px; color: #7f8c8d; font-size: 13px; }
.no-components-available i, .no-rules-available i { font-size: 24px; margin-bottom: 8px; display: block; color: #bdc3c7; }

/* 自定义元件/规则区域 */
.custom-components, .custom-rules {
    margin-top: 12px; padding: 14px; background: #fafbfc; border: 1px solid #e9ecef; border-radius: 8px;
}
.custom-components-header, .custom-rules-header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px;
}
.custom-components-header h4, .custom-rules-header h4 { font-size: 14px; color: #2c3e50; }

/* 方案列表 */
.plan-list-section { margin-top: 24px; }
.plans-table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.plan-id { width: 60px; text-align: center; }
.plan-name { font-weight: 500; }
.plan-customer { width: 120px; }
.plan-rules-count { width: 80px; text-align: center; }
.plan-actions { width: 160px; text-align: center; }
.plan-action-btn { padding: 4px 10px; border: none; border-radius: 4px; cursor: pointer; font-size: 12px; transition: all 0.2s; }
.plan-action-btn.edit { background: #f39c12; color: white; }
.plan-action-btn.edit:hover { background: #e67e22; }
.plan-action-btn.delete { background: #e74c3c; color: white; }
.plan-action-btn.delete:hover { background: #c0392b; }

/* 表单操作 */
.form-actions { display: flex; gap: 10px; margin-top: 16px; justify-content: flex-end; }
.plan-required-note { margin-top: 12px; padding: 8px 12px; background: #fff3cd; border-radius: 6px; font-size: 12px; color: #856404; }

/* ==========================================================================
   页面专属样式 - 上传/处理流水 (upload_conf.html & gerber.html 共享)
   ========================================================================== */

/* 上传区域 */
.upload-area {
    border: 2px dashed #3498db; border-radius: 8px; padding: 15px;
    text-align: center; cursor: pointer; transition: all 0.3s ease;
    margin-bottom: 15px; background-color: #f8fafc;
}
.upload-area:hover { border-color: #2980b9; background-color: #f0f7ff; }
.upload-area i { font-size: 28px; color: #3498db; margin-bottom: 8px; }
.upload-text { font-size: 14px; color: #3498db; margin-bottom: 5px; }
.upload-hint { color: #7f8c8d; font-size: 12px; }

/* 已选文件 */
.selected-files { margin: 15px 0; padding: 10px; background-color: #f8f9fa; border-radius: 6px; border-left: 4px solid #3498db; }
.selected-files h3 { font-size: 14px; margin-bottom: 8px; color: #2c3e50; }
.file-list { list-style-type: none; }
.file-list li { padding: 10px 0; display: flex; align-items: center; border-bottom: 1px solid #eee; }
.file-list li:last-child { border-bottom: none; }
.file-info { display: flex; align-items: center; flex: 1; }
.file-list i { color: #3498db; margin-right: 8px; }
.file-icon { color: #3498db; margin-right: 10px; }
.file-name { font-weight: 500; }
.file-remark, .file-company { margin-left: 15px; }
.file-remark input, .file-company select {
    padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px;
}
.file-remark input:focus, .file-company select:focus { border-color: #3498db; outline: none; box-shadow: 0 0 0 2px rgba(52,152,219,0.2); }
.required-field::after { content: " *"; color: #e74c3c; }
.required-star { color: #e74c3c; font-weight: 700; }
.selected-file-actions { margin-left: 15px; display: flex; align-items: center; }
.remove-file-btn {
    background: #e74c3c; color: white; border: none; border-radius: 4px;
    padding: 6px 10px; cursor: pointer; font-size: 12px; transition: background 0.3s;
}
.remove-file-btn:hover { background: #c0392b; }

/* 进度条 */
.progress-container { margin: 15px 0; }
.progress-bar { height: 10px; background-color: #e9ecef; border-radius: 5px; overflow: hidden; }
.progress { height: 100%; background-color: #3498db; width: 0%; transition: width 0.3s ease; }
.progress-text { text-align: center; font-size: 14px; margin-top: 5px; color: #7f8c8d; }

/* 文件操作 */
.file-actions { display: flex; justify-content: flex-start; }
.file-info-container { display: flex; align-items: center; flex: 1; min-width: 200px; }
.company-label { display: block; margin-bottom: 5px; font-size: 13px; color: #555; }
.company-select { border: 1px solid #ddd; border-radius: 4px; padding: 8px 10px; width: 100%; font-size: 14px; }
.company-select.required { border-color: #e74c3c; background-color: #fff9f9; }
.company-select:focus { border-color: #3498db; outline: none; box-shadow: 0 0 0 2px rgba(52,152,219,0.2); }
.action-btn.mark { color: #2ecc71; }
.action-btn.mark:hover { color: #27ae60; }
.action-btn.mark.disabled { color: #bdc3c7; cursor: not-allowed; }
.action-btn:disabled { color: #bdc3c7; cursor: not-allowed; }

/* 刷新状态 */
.refresh-status-inline { display: inline-flex; align-items: center; margin-left: 15px; font-size: 13px; color: #7f8c8d; }
.refresh-status-inline .fa-spin { animation: fa-spin 2s infinite linear; margin-right: 5px; color: #3498db; }
.refresh-status-inline .last-refresh { margin-left: 10px; color: #95a5a6; font-size: 12px; }
.refresh-btn-inline { background: none; border: 1px solid #3498db; color: #3498db; padding: 3px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; transition: all 0.3s ease; margin-left: 8px; }
.refresh-btn-inline:hover { background-color: #3498db; color: white; }
.refresh-toggle-btn-inline { background: none; border: 1px solid #e74c3c; color: #e74c3c; padding: 3px 8px; border-radius: 4px; cursor: pointer; font-size: 12px; transition: all 0.3s ease; margin-left: 8px; }
.refresh-toggle-btn-inline:hover { background-color: #e74c3c; color: white; }
@keyframes fa-spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

/* 上传要求提示 */
.upload-requirement-hint {
    display: inline-flex; align-items: center; margin-top: 10px; padding: 6px 8px;
    background-color: #f0f8ff; border-radius: 6px; border: 1px solid #d1e7ff;
    font-size: 11.5px; line-height: 1.3; color: #2c3e50; max-width: 100%;
    flex-wrap: nowrap; white-space: nowrap;
}
.upload-requirement-hint i { color: #3498db; margin-right: 6px; font-size: 12px; flex-shrink: 0; }
.upload-requirement-hint strong { color: #2c3e50; font-size: 11.5px; margin-right: 3px; white-space: nowrap; flex-shrink: 0; }
.upload-requirement-hint .requirement-text { white-space: nowrap; flex-shrink: 0; }
.upload-requirement-hint .requirement-list { display: inline-flex; align-items: center; white-space: nowrap; flex-wrap: nowrap; }
.upload-requirement-hint .requirement-item { margin-right: 2px; }
.upload-requirement-hint .separator { margin: 0 2px; color: #95a5a6; }

/* 处理明细弹窗 */
.detail-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.7); z-index: 1000;
    display: flex; justify-content: center; align-items: center;
    animation: modalFadeIn 0.25s ease;
}
.detail-content {
    background: white;
    border-radius: 12px; width: 90%; min-width: 480px; max-width: 1100px;
    max-height: 82vh; overflow: hidden;
    box-shadow: 0 12px 40px rgba(0,0,0,0.25);
    display: flex; flex-direction: column;
    animation: modalSlideIn 0.3s ease;
}
.detail-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 18px 24px; border-bottom: 1px solid #eee;
}
.detail-title { font-size: 20px; color: #2c3e50; font-weight: 600; }
.detail-body { flex: 1; overflow-y: auto; padding: 0 24px; }

/* 流程图 */
.flow-section { padding: 20px 0; border-bottom: 1px solid #e9ecef; }
.flow-steps { display: flex; justify-content: space-between; position: relative; margin: 20px 0; flex-wrap: wrap; }
.flow-steps::before {
    content: ''; position: absolute; top: 30px; left: 0;
    width: 100%; height: 3px; background-color: #e9ecef; z-index: 1;
}
.flow-step { display: flex; flex-direction: column; align-items: center; position: relative; z-index: 2; flex: 1; min-width: 80px; max-width: 120px; }
.step-icon {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 16px; margin-bottom: 8px;
    background-color: #e9ecef; color: #6c757d; transition: all 0.3s ease;
}
.step-icon.completed { background-color: #28a745; color: white; }
.step-info { text-align: center; width: 100%; }
.step-label { font-weight: 500; margin-bottom: 4px; color: #2c3e50; font-size: 12px; white-space: nowrap; }
.step-time { font-size: 11px; color: #6c757d; white-space: nowrap; }
.flow-legend { display: flex; justify-content: center; margin-top: 15px; padding-top: 10px; border-top: 1px solid #eee; }
.legend-item { display: flex; align-items: center; margin: 0 10px; font-size: 12px; }
.legend-color { width: 16px; height: 16px; border-radius: 4px; margin-right: 6px; }
.legend-completed { background-color: #28a745; }
.legend-pending { background-color: #e9ecef; }

/* 日志区域 */
.logs-section { padding: 20px 0; }
.logs-title { font-size: 18px; color: #2c3e50; margin-bottom: 15px; font-weight: 600; }
.log-list { max-height: 300px; overflow-y: auto; border: 1px solid #e9ecef; border-radius: 6px; padding: 10px; }
.log-item { padding: 10px; border-bottom: 1px solid #f1f1f1; font-family: 'Courier New', monospace; font-size: 13px; }
.log-item:last-child { border-bottom: none; }
.log-time { color: #7f8c8d; font-weight: 500; margin-right: 10px; }
.log-level { padding: 2px 6px; border-radius: 4px; font-size: 11px; font-weight: bold; margin-right: 8px; }
.log-level.info { background-color: #d4edda; color: #155724; }
.log-level.warning { background-color: #fff3cd; color: #856404; }
.log-level.error { background-color: #f8d7da; color: #721c24; }
.log-level.success { background-color: #d1ecf1; color: #0c5460; }
.log-message { color: #2c3e50; }
.no-logs { text-align: center; padding: 20px; color: #7f8c8d; }
.error-banner { background-color: #f8d7da; color: #721c24; padding: 12px 15px; border-radius: 6px; margin: 15px 0; border-left: 4px solid #e74c3c; display: flex; align-items: center; }
.error-banner i { margin-right: 10px; font-size: 18px; }

/* 方案管理按钮 */
.plan-manage-btn { background: #9b59b6; color: white; }
.plan-manage-btn:hover { background: #8e44ad; }

/* 上传禁用状态 */
.upload-area.disabled { border-color: #bdc3c7; background-color: #f5f5f5; cursor: not-allowed; opacity: 0.6; }
.upload-disabled-hint { text-align: center; color: #e74c3c; font-size: 12px; margin-top: 10px; }

/* ==========================================================================
   页面专属样式 - user.html (用户中心)
   ========================================================================== */

/* 头部 */
.user-page header { margin-bottom: 30px; padding-top: 10px; }
.user-page header h1 { font-size: 28px; font-weight: 700; margin-bottom: 6px; }
.user-page header h1 i { color: #3498db; margin-right: 8px; }
.user-page header .subtitle { font-size: 14px; color: #7f8c8d; }

/* 资料布局 */
.profile-grid { display: grid; grid-template-columns: 300px 1fr; gap: 24px; }
.profile-avatar-row { display: flex; align-items: center; gap: 16px; padding-bottom: 20px; border-bottom: 1px solid #f0f0f0; margin-bottom: 20px; }
.avatar-circle { width: 64px; height: 64px; border-radius: 50%; background: linear-gradient(135deg, #3498db, #2980b9); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 28px; font-weight: 700; flex-shrink: 0; }
.profile-avatar-row .user-meta h3 { font-size: 18px; color: #2c3e50; margin-bottom: 4px; }
.profile-avatar-row .user-meta .reg-date { font-size: 13px; color: #999; }

/* 信息行 */
.info-row { display: flex; align-items: center; padding: 14px 0; border-bottom: 1px solid #f5f5f5; }
.info-row:last-child { border-bottom: none; }
.info-row .info-label { width: 72px; font-size: 14px; color: #888; flex-shrink: 0; }
.info-row .info-value { flex: 1; font-size: 14px; color: #333; }
.info-row .info-value.empty { color: #ccc; font-style: italic; }

/* 用户卡片 */
.card-header { padding: 16px 24px; border-bottom: 1px solid #f0f0f0; display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 600; color: #2c3e50; background: #fafbfc; }
.card-header i { color: #3498db; font-size: 18px; }
.card-body { padding: 24px; }

/* 表单 */
.user-page .form-group { margin-bottom: 16px; }
.user-page .form-group:last-child { margin-bottom: 0; }
.user-page .form-group label { font-size: 13px; color: #555; }
.user-page .form-group label .opt { color: #aaa; font-weight: 400; }
.user-page .form-group input { width: 100%; padding: 10px 14px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; font-family: inherit; transition: border-color 0.2s, box-shadow 0.2s; }
.user-page .form-group input:focus { outline: none; border-color: #3498db; box-shadow: 0 0 0 3px rgba(52,152,219,0.12); }
.user-page .form-group input.error { border-color: #e74c3c; }
.user-page .form-group .field-error { color: #e74c3c; font-size: 12px; margin-top: 4px; display: none; }
.user-page .form-group .field-error.show { display: block; }

/* 消息 */
.alert { padding: 10px 14px; border-radius: 8px; font-size: 13px; margin-bottom: 16px; display: none; }
.alert.show { display: block; }
.alert.success { background: #e8f5e9; color: #2e7d32; }
.alert.error { background: #fde8e8; color: #c0392b; }

/* 用户按钮 */
.btn-primary { background: #3498db; color: #fff; }
.btn-primary:hover { background: #2980b9; }
.btn-primary:disabled { background: #bdc3c7; cursor: not-allowed; }
.btn-outline { background: #fff; color: #3498db; border: 1.5px solid #3498db; }
.btn-outline:hover { background: #ebf5fb; }
.btn-full { width: 100%; }
.btn-group { display: flex; gap: 10px; margin-top: 8px; }

/* 未登录 */
.not-logged-in { text-align: center; padding: 80px 20px; }
.not-logged-in .icon-box { width: 80px; height: 80px; margin: 0 auto 20px; background: #e8f0fe; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.not-logged-in .icon-box i { font-size: 36px; color: #3498db; }
.not-logged-in h3 { font-size: 18px; color: #2c3e50; margin-bottom: 8px; }
.not-logged-in p { font-size: 14px; color: #888; margin-bottom: 24px; }

/* ==========================================================================
   页面专属样式 - operate_log.html (操作日志)
   ========================================================================== */

/* 返回导航 */
.back-nav { margin-bottom: 10px; }
.back-nav a { color: #3498db; text-decoration: none; font-size: 13px; font-weight: 500; transition: color 0.3s; }
.back-nav a:hover { color: #2c3e50; }
.back-nav i { margin-right: 4px; }

/* 筛选 */
.filter-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.filter-item { display: flex; flex-direction: column; gap: 4px; min-width: 120px; }
.filter-item label { font-size: 12px; font-weight: 500; color: #7f8c8d; }
.filter-item select, .filter-item input { padding: 7px 10px; border: 1px solid #ddd; border-radius: 6px; font-size: 13px; color: #2c3e50; background: #fff; transition: border-color 0.3s; }
.filter-item select:focus, .filter-item input:focus { border-color: #3498db; outline: none; box-shadow: 0 0 0 2px rgba(52,152,219,0.2); }
.filter-item.keyword { flex: 1; min-width: 180px; }
.filter-item.date { min-width: 150px; }

/* 统计条 */
.stats-bar { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; margin-bottom: 10px; border-bottom: 1px solid #eee; }
.stats-info { font-size: 13px; color: #7f8c8d; }
.stats-info strong { color: #3498db; font-size: 15px; }
.page-size-select { padding: 5px 8px; border: 1px solid #ddd; border-radius: 4px; font-size: 12px; margin-left: 6px; }

/* 表格 */
.table-wrapper { overflow-x: auto; }
td.cell-desc { max-width: 280px; }

/* 操作日志 badge */
.badge.success { background-color: #d4edda; color: #155724; }
.badge.fail { background-color: #f8d7da; color: #721c24; }
.badge.event { background-color: #e8f4fd; color: #2471a3; font-size: 11px; }

/* 详情网格 */
.detail-grid { display: grid; grid-template-columns: 100px 1fr; gap: 6px 12px; font-size: 13px; }
.detail-label-2 { color: #7f8c8d; font-weight: 500; text-align: right; padding-top: 2px; }
.detail-value-2 { color: #2c3e50; word-break: break-all; }
.detail-value-2 pre { background: #f8f9fa; border: 1px solid #e9ecef; border-radius: 6px; padding: 10px 14px; font-size: 12px; font-family: 'Consolas', 'Courier New', monospace; white-space: pre-wrap; word-break: break-all; max-height: 260px; overflow-y: auto; margin: 0; line-height: 1.5; }
.detail-value-2 .ua-text { font-size: 11px; color: #95a5a6; word-break: break-all; }
.nav-counter { font-size: 13px; color: #7f8c8d; }

/* operate_log: 按钮适配 */
.operate-log .btn { height: 34px; font-size: 13px; padding: 7px 16px; }
.operate-log .btn i { font-size: 12px; }

/* operate_log: card适配 */
.operate-log .card { margin-bottom: 14px; }
.operate-log .card h2 { font-size: 15px; }
.operate-log .card h2 i { margin-right: 8px; }

/* ==========================================================================
   页面专属样式 - customer.html (客户管理)
   ========================================================================== */

/* 搜索 */
.customer-page .search-container { margin-bottom: 16px; }
.customer-page .search-input { font-size: 13px; }

/* 同步按钮 */
.btn.sync-btn { margin-left: 5px; padding: 4px 10px; font-size: 12px; }

/* 表单只读 */
.form-control:read-only { background-color: #f8f9fa; color: #6c757d; cursor: not-allowed; }

/* 表格 */
.customer-page table { margin-bottom: 0; }
.customer-page th { font-size: 12px; }
.customer-page td { font-size: 12px; padding: 8px 6px; }

/* ==========================================================================
   响应式 768px
   ========================================================================== */
@media (max-width: 768px) {
    body { padding: 8px; }

    /* 导航会话信息 */
    .session-info { position: static; text-align: center; margin-top: 10px; }

    /* 通知 */
    .notification { left: 20px; right: 20px; top: 10px; }

    /* 操作按钮 */
    .action-buttons { flex-direction: column; gap: 5px; }

    /* 表格 */
    th, td { padding: 10px 6px; font-size: 12px; }
    .table-wrapper td { white-space: normal; }

    /* 用户中心 */
    .profile-grid { grid-template-columns: 1fr; }
    .card-body { padding: 16px; }
    .card-header { padding: 14px 16px; }
    .profile-avatar-row { flex-direction: column; text-align: center; }

    /* 操作日志 */
    .filter-row { flex-direction: column; }
    .filter-item { min-width: 100%; }
    .filter-item.keyword { flex: 0 0 100%; }
    .detail-grid { grid-template-columns: 70px 1fr; }

    /* customer_view */
    .detail-item { flex-direction: column; }
    .detail-label { width: 100%; margin-bottom: 5px; }

    /* 文件列表 */
    .file-list li { flex-direction: column; align-items: flex-start; }
    .file-remark, .file-company { margin-left: 0; margin-top: 8px; width: 100%; }
    .selected-file-actions { margin-left: 0; margin-top: 8px; align-self: flex-end; }
    .file-actions { flex-direction: column; }
    .file-actions .action-btn { margin-bottom: 5px; }
    .action-btn { margin-right: 8px; font-size: 14px; }

    /* 表单：小屏幕回退为上下布局 */
    .plan-form-section .form-group { flex-direction: column; align-items: flex-start; gap: 4px; }
    .plan-form-section .form-group label { min-width: auto; }
    .plan-form-section .form-group .form-control { width: 100%; }
    .customer-selection { flex-direction: column; align-items: flex-start; gap: 6px; }
    .customer-selection > label { min-width: auto; }
    .customer-select-container { width: 100%; }
    .customer-hint, .loading-indicator { padding-left: 0; }

    /* 元件卡片 */
    .component-grid-item { flex: 0 0 calc(50% - 6px); }

    /* 上传要求 */
    .upload-requirement-hint { padding: 5px 6px; font-size: 10.5px; margin-top: 8px; white-space: normal; display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-start; }
    .upload-requirement-hint i { font-size: 11px; margin-right: 4px; }
    .upload-requirement-hint strong { font-size: 10.5px; margin-right: 2px; }
    .upload-requirement-hint .requirement-list { white-space: normal; flex-wrap: wrap; }
    .upload-requirement-hint .requirement-item { margin-right: 1px; }

    /* 表格列宽 */
    .upload-page th:nth-child(1), .upload-page td:nth-child(1) { width: 18% !important; }
    .upload-page th:nth-child(8), .upload-page td:nth-child(8) { width: 12% !important; }
    .upload-page th:nth-child(9), .upload-page td:nth-child(9) { width: 8% !important; }
    .upload-page th:nth-child(10), .upload-page td:nth-child(10) { width: 5% !important; }

    /* 刷新状态 */
    .refresh-status-inline { display: block; margin-left: 0; margin-top: 5px; }
    .refresh-status-inline .last-refresh { display: block; margin-left: 0; margin-top: 5px; }
    .refresh-btn-inline, .refresh-toggle-btn-inline { margin-left: 0; margin-right: 8px; margin-top: 5px; }

    /* 弹窗：小屏适配 */
    .modal-content { min-width: auto; max-width: 92vw; }
    .detail-content { min-width: auto; max-width: 96vw; max-height: 88vh; }
    .modal-close { top: 10px; right: 10px; width: 36px; height: 36px; }
    .modal-header, .detail-header { padding: 14px 18px; }
    .modal-body { padding: 14px; }
    .modal-footer { padding: 12px 18px; }
    .detail-body { padding: 0 18px; }

    /* view_imgs */
    .image-preview { height: 250px; }
    .image-modal .modal-content { max-width: 95vw; max-height: 95vh; }
    .image-modal .modal-footer { flex-direction: column; gap: 10px; align-items: center; }
    .file-info-row { flex-direction: column; }
    .file-info-row .file-info-item { flex: 0 0 100%; margin-bottom: 10px; }
    .file-info-container { padding: 10px 15px; }
    .image-title { padding: 8px 12px; font-size: 0.9rem; }
    .info-grid { grid-template-columns: 1fr; }
    .detail-content { width: 95%; }

    /* 元件/规则 */
    .component-grid-item { flex: 0 0 calc(33.33% - 8px); }
    .rule-grid-item { flex: 0 0 calc(25% - 6px); }
    .form-actions { flex-direction: column; }
}

/* ==========================================================================
   响应式 1024px (图片网格)
   ========================================================================== */
@media (max-width: 1024px) {
    .image-grid { grid-template-columns: 1fr; gap: 30px; }
}

/* ==========================================================================
   响应式 1000px (定价计算器)
   ========================================================================== */
@media (max-width: 1000px) {
    .input-section { grid-template-columns: repeat(2, 1fr); }
    .input-row { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   响应式 600px (定价计算器)
   ========================================================================== */
@media (max-width: 600px) {
    .input-section { grid-template-columns: 1fr; }
    .input-row { grid-template-columns: 1fr; }
}

/* ==========================================================================
   响应式 480px
   ========================================================================== */
@media (max-width: 480px) {
    .not-logged-in { padding: 40px 16px; }
    .profile-avatar-row { flex-direction: column; text-align: center; }

    .upload-requirement-hint { font-size: 10px; padding: 4px 5px; }
    .upload-requirement-hint i { font-size: 10px; }
    .upload-requirement-hint strong { font-size: 10px; }

    .record-info a { display: block; margin: 5px 0; }
    .record-separator { display: none; }

    .upload-page th:nth-child(1), .upload-page td:nth-child(1) { width: 18% !important; }
    .upload-page th:nth-child(2), .upload-page td:nth-child(2) { width: 10% !important; }
}
