/* ============================================================
 * 文件：style.css
 * 作用：全局样式文件，控制页面外观
 * 说明：定义了整个系统的视觉风格，包括导航栏、按钮、表格、表单等样式
 * ============================================================ */

/* 隐藏 number 输入框的上下箭头 */
input[type="number"]::-webkit-outer-spin-button,
input[type="number"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
input[type="number"] {
    -moz-appearance: textfield;
}

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

body {
    font-family: "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
    font-size: 14px;
}

/* 顶部导航栏 */
.navbar {
    background-color: #2c3e50;
    color: white;
    padding: 0 20px;
    display: flex;
    align-items: center;
    height: 50px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.navbar .logo {
    font-size: 18px;
    font-weight: bold;
    margin-right: 30px;
}

.navbar a {
    color: #ecf0f1;
    text-decoration: none;
    padding: 0 15px;
    height: 50px;
    line-height: 50px;
    display: inline-block;
}

.navbar a:hover, .navbar a.active {
    background-color: #34495e;
    color: #3498db;
}

/* 主内容区域 */
.container {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* 页面标题 */
.page-title {
    font-size: 20px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
    color: #2c3e50;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 6px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 统计卡片（首页用） */
.stats-row {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    flex: 1;
    background: white;
    border-radius: 6px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-card .number {
    font-size: 36px;
    font-weight: bold;
    color: #3498db;
}

.stat-card .label {
    font-size: 14px;
    color: #999;
    margin-top: 5px;
}

/* 按钮样式 */
.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    text-align: center;
    transition: opacity 0.2s;
}

.btn:hover {
    opacity: 0.85;
}

.btn-primary {
    background-color: #3498db;
    color: white;
}

.btn-success {
    background-color: #27ae60;
    color: white;
}

.btn-danger {
    background-color: #e74c3c;
    color: white;
}

.btn-warning {
    background-color: #f39c12;
    color: white;
}

.btn-info {
    background-color: #17a2b8;
    color: white;
}

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.table th, .table td {
    padding: 10px 12px;
    border: 1px solid #ddd;
    text-align: center;
    overflow: hidden;
    word-break: break-word;
}

/* 两行截断：用 JS 初始化时给需要截断的单元格套 span */
.table td .cell-clamp, .table th .cell-clamp {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
}

/* 列宽拖拽手柄 */
.table th .col-resizer {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    cursor: col-resize;
    user-select: none;
    z-index: 5;
}
.table th .col-resizer:hover {
    background: #409eff;
}

/* 冻结操作列（右侧）和复选框列（左侧） */
.table th[data-col="actions"],
.table td[data-col="actions"] {
    position: sticky;
    right: 0;
    z-index: 1;
    background: white;
}
.table th[data-col="actions"] {
    background: #f8f9fa;
    z-index: 3;
}

.table th[data-col="checkbox"],
.table td[data-col="checkbox"] {
    position: sticky;
    left: 0;
    z-index: 1;
    background: white;
}
.table th[data-col="checkbox"] {
    background: #f8f9fa;
    z-index: 3;
}

.table th {
    background-color: #f8f9fa;
    font-weight: bold;
    color: #2c3e50;
}

.table tr:hover {
    background-color: #f5f5f5;
}

/* 表单样式 */
.form-group {
    margin-bottom: 15px;
}

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

.form-control {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.form-control:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 3px rgba(52, 152, 219, 0.3);
}

/* 表单行（多个字段并排） */
.form-row {
    display: flex;
    gap: 15px;
}

.form-row .form-group {
    flex: 1;
}

/* 搜索/筛选栏 */
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: flex-end;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.filter-bar .form-group {
    margin-bottom: 0;
}

/* 操作按钮栏 */
.action-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

/* 悬浮提示消息（Toast 样式） */
.flash-message {
    padding: 12px 20px;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    max-width: 400px;
    cursor: pointer;
    animation: flashSlideIn 0.3s ease-out;
    font-size: 14px;
    line-height: 1.5;
    pointer-events: auto;
}

.flash-message:hover {
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

@keyframes flashSlideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flash-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.flash-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* 打印页面专用样式 */
.print-page {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background: white;
}

.print-page .company-name {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 5px;
}

.print-page .doc-title {
    text-align: center;
    font-size: 20px;
    margin-bottom: 20px;
}

.print-page .info-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
}

/* 打印时隐藏不需要打印的元素 */
@media print {
    .no-print {
        display: none !important;
    }
    .navbar {
        display: none !important;
    }
    body {
        background: white;
    }
    .print-page {
        box-shadow: none;
        padding: 0;
    }
}

/* 材料选择弹窗 */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 8px;
    padding: 20px;
    width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #ddd;
}

.modal-close {
    cursor: pointer;
    font-size: 20px;
    color: #999;
    background: none;
    border: none;
}

/* 空数据提示 */
.empty-tip {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 16px;
}

/* 表格内的输入框样式（车辆信息可编辑字段） */
.table .v-field {
    padding: 4px 6px;
    font-size: 13px;
    border: 1px solid #ccc;
    border-radius: 3px;
    width: 100%;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.table .v-field:focus {
    border-color: #3498db;
    box-shadow: 0 0 2px rgba(52, 152, 219, 0.5);
    outline: none;
}

/* ============================================================
 * 自定义下拉选择框样式（汽车客户名快速选择）
 * ============================================================ */

/* 下拉选择框容器 */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

/* 显示区域：模拟select的外观 */
.custom-select-display {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.custom-select-display:hover {
    border-color: #3498db;
}

.custom-select-display:focus {
    border-color: #3498db;
    outline: none;
    box-shadow: 0 0 3px rgba(52, 152, 219, 0.3);
}

/* 下拉箭头 */
.dropdown-arrow {
    color: #999;
    font-size: 12px;
    margin-left: 8px;
}

/* 下拉菜单 */
.custom-select-dropdown {
    display: none;  /* 默认隐藏 */
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    max-height: 250px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

.custom-select-dropdown.show {
    display: block;
}

/* 下拉选项 */
.customer-option {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f5f5f5;
    transition: background-color 0.2s;
}

.customer-option:hover {
    background-color: #f0f7ff;
}

.customer-option:last-child {
    border-bottom: none;
}

/* 搜索更多选项（特殊样式） */
.search-more-option {
    padding: 10px 12px;
    cursor: pointer;
    background-color: #f8f9fa;
    color: #3498db;
    text-align: center;
    font-weight: bold;
    border-top: 1px solid #ddd;
    transition: background-color 0.2s;
}

.search-more-option:hover {
    background-color: #e8f4ff;
}

/* ============================================================
 * 材料图片相关样式
 * ============================================================ */

/* 列表页缩略图 */
.material-thumb {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
    transition: transform 0.2s;
}

.material-thumb:hover {
    transform: scale(1.1);
    border-color: #3498db;
}

/* 暂无图片提示文字 */
.no-image-tip {
    color: #ccc;
    font-size: 12px;
}

/* 编辑弹窗中的图片预览列表 */
.image-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 10px;
    min-height: 40px;
}

/* 单张图片预览项 */
.image-preview-item {
    position: relative;
    width: 80px;
    text-align: center;
}

.image-preview-thumb {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

/* 图片操作按钮区域 */
.image-preview-actions {
    margin-top: 4px;
    display: flex;
    gap: 2px;
    justify-content: center;
}

.image-preview-actions .btn {
    padding: 2px 6px;
    font-size: 11px;
}

/* 大图查看器弹窗 */
.image-viewer-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.image-viewer-content img {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

.image-viewer-close {
    position: fixed;
    top: 20px;
    right: 30px;
    font-size: 36px;
    color: white;
    z-index: 1100;
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.image-viewer-close:hover {
    color: #3498db;
}

/* ============================================================
 * 全屏模式样式
 * 用于报价单编辑页面和详情页面，隐藏导航栏并让内容占满整个视口宽度
 * ============================================================ */

/* 全屏模式下隐藏导航栏 */
body.full-screen .navbar {
    display: none;
}

/* 全屏模式下去掉 container 的宽度限制 */
body.full-screen .container {
    max-width: 100%;
    margin: 0;
    padding: 15px 20px;
}

/* ============================================================
 * 图片拖拽/粘贴上传区域样式
 * ============================================================ */

/* 拖拽上传区域 */
.drop-zone {
    border: 2px dashed #ccc;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    color: #999;
    cursor: pointer;
    transition: border-color 0.3s, background-color 0.3s;
    margin-bottom: 10px;
    background-color: #fafafa;
}

.drop-zone:hover,
.drop-zone.drag-over {
    border-color: #3498db;
    background-color: #eaf4fd;
    color: #3498db;
}

/* 粘贴/拖拽后的图片预览 */
.paste-preview-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.paste-preview-item {
    position: relative;
    width: 70px;
    height: 70px;
}

.paste-preview-item img {
    width: 70px;
    height: 70px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.paste-preview-item .remove-paste {
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 12px;
    line-height: 18px;
    text-align: center;
    cursor: pointer;
    padding: 0;
}

/* ============================================================
 * 加宽容器（列表页使用）
 * ============================================================ */
.container.container-wide {
    max-width: 1600px;
}

/* ============================================================
 * 分页样式
 * ============================================================ */
.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px;
    background: white;
    border-top: 1px solid #eee;
    flex-wrap: wrap;
    gap: 10px;
}

.pagination-info {
    color: #666;
    font-size: 13px;
}

.pagination-info strong {
    color: #2c3e50;
}

.pagination-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.per-page-select {
    padding: 4px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    cursor: pointer;
}

.page-btns {
    display: flex;
    gap: 4px;
}

.page-btn {
    display: inline-block;
    padding: 4px 10px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 13px;
    color: #3498db;
    text-decoration: none;
    cursor: pointer;
    background: white;
    transition: all 0.2s;
}

.page-btn:hover {
    background: #3498db;
    color: white;
    border-color: #3498db;
}

.page-btn.active {
    background: #3498db;
    color: white;
    border-color: #3498db;
    font-weight: bold;
}

.page-btn.disabled {
    color: #ccc;
    cursor: not-allowed;
    pointer-events: none;
}

/* ============================================================
 * 可排序/筛选表头
 * ============================================================ */
.table-th-sortable {
    cursor: pointer;
    user-select: none;
    transition: background 0.15s;
    position: relative;
}

.table-th-sortable:hover {
    background-color: #ecf5ff !important;
    color: #409eff;
}

.table-th-sortable.th-active {
    background-color: #ecf5ff !important;
    color: #409eff;
    font-weight: 700;
}

.sort-indicator {
    position: absolute;
    top: 2px;
    right: 4px;
    font-size: 11px;
    color: #c0c4cc;
    line-height: 1;
    pointer-events: none;
}

.sort-indicator.active {
    color: #409eff;
    font-weight: bold;
}

/* ============================================================
 * 批量选择 / 批量删除
 * ============================================================ */
.table input[type="checkbox"] {
    cursor: pointer;
    width: 16px;
    height: 16px;
    accent-color: #409eff;
    vertical-align: middle;
}

.bulk-delete-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px !important;
    background-color: #f56c6c;
    color: #ffffff;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.bulk-delete-btn:hover:not(:disabled) {
    background-color: #f78989;
}
.bulk-delete-btn .bulk-count {
    display: inline-block;
    min-width: 22px;
    height: 20px;
    line-height: 20px;
    text-align: center;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
    padding: 0 8px;
    font-size: 12px;
    font-weight: 600;
}

/* ============================================================
 * 字段显示设置按钮和下拉
 * ============================================================ */
.col-settings-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 14px !important;
    background-color: #ffffff;
    color: #606266;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.col-settings-btn:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
}

.col-settings-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    z-index: 100;
    background: #ffffff;
    border: 1px solid #e4e7ed;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    padding: 8px 0;
    min-width: 220px;
    margin-top: 4px;
}

.col-settings-list {
    max-height: 350px;
    overflow-y: auto;
}

.col-setting-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 16px;
    font-size: 13px;
    color: #303133;
    cursor: pointer;
    transition: background 0.15s;
}

.col-setting-item:hover {
    background: #f5f7fa;
}

.col-setting-item.col-dragging {
    opacity: 0.4;
    background: #ecf5ff;
}

.col-drag-handle {
    color: #c0c4cc;
    font-size: 12px;
    cursor: grab;
    margin-right: 4px;
    user-select: none;
    letter-spacing: -1px;
}
.col-drag-handle:hover {
    color: #409eff;
}

.col-setting-item input[type="checkbox"] {
    width: 16px;
    height: 16px;
    accent-color: #409eff;
    cursor: pointer;
}

.col-setting-item input[type="checkbox"]:disabled {
    accent-color: #c0c4cc;
    cursor: not-allowed;
}

.col-settings-footer {
    display: flex;
    justify-content: space-between;
    padding: 6px 16px;
    border-top: 1px solid #ebeef5;
    font-size: 12px;
}

.col-settings-footer a {
    color: #409eff;
    text-decoration: none;
    cursor: pointer;
}

.col-settings-footer a:hover {
    text-decoration: underline;
}

/* ============================================================
 * 表头筛选下拉框
 * ============================================================ */
.filter-dropdown {
    position: absolute;
    z-index: 999;
    width: 300px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.12), 0 0 1px rgba(0,0,0,0.1);
    display: none;
    flex-direction: column;
    overflow: hidden;
    animation: filterDropdownIn 0.18s ease-out;
}

.filter-dropdown.show {
    display: flex;
}

@keyframes filterDropdownIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.filter-dropdown-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: linear-gradient(135deg, #409eff 0%, #3375d6 100%);
    color: #ffffff;
}

.filter-dropdown-title {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.filter-dropdown-close {
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    opacity: 0.85;
    transition: opacity 0.2s;
    padding: 2px 6px;
    border-radius: 3px;
}

.filter-dropdown-close:hover {
    opacity: 1;
    background: rgba(255,255,255,0.18);
}

.filter-search-wrap {
    position: relative;
    padding: 12px 16px 8px;
}

.filter-search-icon {
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-25%);
    color: #c0c4cc;
    font-size: 13px;
    pointer-events: none;
}

.filter-search {
    width: 100%;
    padding: 7px 10px 7px 30px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: #f5f7fa;
}

.filter-search:focus {
    border-color: #409eff;
    background: #ffffff;
}

.filter-dropdown-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 16px 10px;
    font-size: 12px;
    border-bottom: 1px solid #ebeef5;
}

.filter-action-link {
    color: #409eff;
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.filter-action-link:hover {
    color: #66b1ff;
    text-decoration: underline;
}

.filter-action-divider {
    color: #dcdfe6;
    margin: 0 4px;
}

/* 顶部操作行：全选/清空/排序 */
.filter-top-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px;
    padding: 8px 16px;
    border-bottom: 1px solid #ebeef5;
    background: #fafbfc;
    font-size: 12px;
}
.filter-top-actions .filter-action-link {
    padding: 2px 6px;
    border-radius: 3px;
    transition: all 0.15s;
}
.filter-top-actions .filter-action-link:hover {
    background: #ecf5ff;
}

.filter-selected-count {
    margin-left: auto;
    color: #909399;
    font-size: 12px;
}

.filter-dropdown-list {
    max-height: 240px;
    overflow-y: auto;
    padding: 4px 0;
}

.filter-dropdown-list::-webkit-scrollbar {
    width: 6px;
}

.filter-dropdown-list::-webkit-scrollbar-thumb {
    background: #dcdfe6;
    border-radius: 3px;
}

.filter-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 16px;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.15s;
    color: #606266;
}

.filter-option:hover {
    background: #f5f7fa;
}

.filter-option input[type="checkbox"] {
    margin: 0;
    flex-shrink: 0;
    cursor: pointer;
    accent-color: #409eff;
}

.filter-option-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1;
}

.filter-loading {
    text-align: center;
    padding: 20px;
    color: #909399;
    font-size: 13px;
}

.filter-sort-section {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 16px;
    border-bottom: 1px solid #ebeef5;
    background: #fafbfc;
}

.filter-sort-label {
    font-size: 12px;
    color: #909399;
    margin-right: 4px;
}

.filter-sort-btn {
    padding: 3px 10px;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 3px;
    font-size: 12px;
    color: #606266;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-sort-btn:hover {
    border-color: #409eff;
    color: #409eff;
    background: #ecf5ff;
}

/* 日期筛选模式 */
.filter-mode-date {
    padding: 16px;
}

.date-range-inputs {
    display: flex;
    align-items: flex-end;
    gap: 8px;
    margin-bottom: 14px;
}

.date-input-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.date-input-group label {
    font-size: 12px;
    color: #909399;
    font-weight: normal;
}

.filter-date-input {
    width: 100%;
    padding: 7px 10px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    background: #ffffff;
}

.filter-date-input:focus {
    border-color: #409eff;
}

.date-input-separator {
    color: #c0c4cc;
    font-size: 12px;
    padding-bottom: 8px;
}

.date-quick-section {
    background: #f5f7fa;
    border-radius: 6px;
    padding: 10px 12px;
}

.date-quick-label {
    font-size: 12px;
    color: #909399;
    margin-bottom: 8px;
}

.date-quick-btns {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.date-quick-btn {
    padding: 4px 12px;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 14px;
    color: #606266;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}

.date-quick-btn:hover {
    border-color: #409eff;
    color: #409eff;
    background: #ecf5ff;
}

.date-quick-btn:active {
    background: #409eff;
    color: #ffffff;
}

.filter-dropdown-footer {
    padding: 10px 16px;
    background: #fafbfc;
    border-top: 1px solid #ebeef5;
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.filter-btn {
    padding: 6px 18px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s;
}

.filter-btn-primary {
    background: #409eff;
    color: #ffffff;
    border-color: #409eff;
}

.filter-btn-primary:hover {
    background: #66b1ff;
    border-color: #66b1ff;
}

.filter-btn-default {
    background: #ffffff;
    color: #606266;
    border-color: #dcdfe6;
}

.filter-btn-default:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
}

/* 全选行内提示 */
.select-all-inline {
    font-size: 13px;
    color: #409eff;
    white-space: nowrap;
}

.select-all-inline-link {
    font-size: 13px;
    color: #409eff;
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
    white-space: nowrap;
}

.select-all-inline-link:hover {
    color: #3375d6;
}

/* 导出小提示弹窗（紧凑型） */
.export-tip-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
}
.export-tip-modal.show {
    display: flex;
}
.export-tip-content {
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.2);
    padding: 22px 28px 20px;
    min-width: 280px;
    text-align: center;
}
.export-tip-text {
    font-size: 14px;
    color: #303133;
    margin-bottom: 16px;
    font-weight: 500;
}
.export-tip-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.export-tip-btns .btn {
    padding: 8px 18px;
    font-size: 13px;
}

/* ============================================================
 * 移动端/响应式适配 (max-width: 768px)
 * ============================================================ */
@media (max-width: 768px) {

    /* ---------- 全局基础 ---------- */
    body {
        font-size: 14px;
        -webkit-tap-highlight-color: rgba(52, 152, 219, 0.15);
    }

    /* ---------- 导航栏：汉堡菜单 ---------- */
    .navbar {
        position: sticky;
        top: 0;
        z-index: 100;
        flex-wrap: wrap;
        height: auto;
        min-height: 52px;
        padding: 0 12px;
        background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    }

    .navbar .logo {
        font-size: 15px;
        margin-right: auto;
        line-height: 52px;
        height: 52px;
        letter-spacing: 0.3px;
    }

    /* 汉堡菜单按钮 */
    .navbar-toggle {
        display: flex !important;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        width: 40px;
        height: 40px;
        margin: 6px 0;
        cursor: pointer;
        background: none;
        border: none;
        border-radius: 8px;
        padding: 10px;
        gap: 4px;
        -webkit-tap-highlight-color: transparent;
    }

    .navbar-toggle:active {
        background: rgba(255,255,255,0.1);
    }

    .navbar-toggle span {
        display: block;
        width: 20px;
        height: 2px;
        background: #ecf0f1;
        border-radius: 1px;
        transition: all 0.25s;
    }

    .navbar-toggle.open span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    .navbar-toggle.open span:nth-child(2) {
        opacity: 0;
    }
    .navbar-toggle.open span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }

    /* 导航链接默认隐藏 */
    .navbar a {
        display: none;
        width: 100%;
        height: 46px;
        line-height: 46px;
        padding: 0 16px;
        border-top: 1px solid rgba(255,255,255,0.06);
        font-size: 14px;
        transition: background 0.15s;
    }

    .navbar.open a {
        display: block;
    }

    .navbar a:active {
        background: rgba(255,255,255,0.1);
    }

    /* ---------- 容器 ---------- */
    .container {
        margin: 0 auto;
        padding: 12px 10px;
        max-width: 100%;
    }

    .container.container-wide {
        max-width: 100%;
    }

    /* ---------- 页面标题：现代化 ---------- */
    .page-title {
        font-size: 20px;
        font-weight: 600;
        margin: 4px 0 12px;
        padding: 0 0 10px;
        border-bottom: none;
        color: #1a252f;
        display: flex !important;
        flex-direction: column !important;
        align-items: stretch !important;
        gap: 10px;
    }

    .page-title > span {
        display: block;
        line-height: 1.3;
    }

    /* 标题右侧的按钮组：横向滚动 */
    .page-title > div {
        display: flex !important;
        gap: 6px !important;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        flex-wrap: nowrap;
        margin: 0 -10px;
        padding: 0 10px;
        scrollbar-width: none;
    }

    .page-title > div::-webkit-scrollbar {
        display: none;
    }

    .page-title .btn {
        flex-shrink: 0;
        padding: 7px 14px !important;
        font-size: 13px !important;
        min-height: 32px;
        border-radius: 16px;
        box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    }

    /* ---------- 卡片：更轻量 ---------- */
    .card {
        padding: 12px;
        border-radius: 8px;
        margin-bottom: 10px;
        box-shadow: 0 1px 4px rgba(0,0,0,0.06);
    }

    /* ---------- 统计卡片：垂直堆叠 ---------- */
    .stats-row {
        flex-direction: column;
        gap: 8px;
    }

    .stat-card {
        padding: 14px;
        border-radius: 8px;
    }

    .stat-card .number {
        font-size: 26px;
    }

    /* ---------- 按钮：现代化 Material 风格 ---------- */
    .btn {
        padding: 8px 14px;
        font-size: 13px;
        border-radius: 6px;
        min-height: 36px;
        line-height: 1.3;
        font-weight: 500;
        transition: all 0.15s;
        box-shadow: 0 1px 2px rgba(0,0,0,0.08);
    }

    .btn:active {
        transform: scale(0.97);
        box-shadow: 0 1px 1px rgba(0,0,0,0.05);
    }

    .btn-sm {
        padding: 4px 10px;
        font-size: 11px;
        min-height: 28px;
        border-radius: 4px;
    }

    /* 重置按钮用更柔和的颜色 */
    .btn-warning {
        background-color: #95a5a6 !important;
    }

    /* ---------- 操作按钮栏：横向滚动 ---------- */
    .action-bar {
        flex-wrap: nowrap;
        gap: 6px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -10px;
        padding: 0 10px;
        scrollbar-width: none;
    }

    .action-bar::-webkit-scrollbar {
        display: none;
    }

    .action-bar .btn {
        flex-shrink: 0;
    }

    /* ---------- 筛选栏：现代化紧凑布局 ---------- */
    .filter-bar {
        flex-direction: column;
        gap: 8px;
        align-items: stretch;
    }

    .filter-bar .form-group {
        width: 100%;
        margin-bottom: 0 !important;
        flex: 0 0 auto !important;
    }

    /* 第三个 form-group 强制不自适应（避免被 flex:1 撑大） */
    .filter-bar .form-group:nth-child(n+3) {
        display: none !important;
    }

    /* 搜索输入框：圆形现代感 */
    .filter-bar .form-group:first-child {
        position: relative;
        margin-bottom: 0;
    }

    .filter-bar input.form-control {
        padding: 8px 14px 8px 36px;
        background: #f5f7fa;
        border: 1px solid #ebedf0;
        border-radius: 20px;
        font-size: 14px;
        height: 38px;
    }

    .filter-bar input.form-control:focus {
        background: white;
        border-color: #3498db;
        box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.15);
    }

    /* 给搜索框加个 🔍 图标 - 定位在 input 内部 */
    .filter-bar .form-group:first-child input {
        position: relative;
    }

    .filter-bar .form-group:first-child::before {
        content: "";
        position: absolute;
        left: 14px;
        top: 50%;
        transform: translateY(-50%);
        width: 14px;
        height: 14px;
        background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
        background-size: contain;
        background-repeat: no-repeat;
        pointer-events: none;
        z-index: 1;
    }

    /* 隐藏搜索框 label 在移动端 */
    .filter-bar .form-group:first-child label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    /* 搜索/重置按钮：紧凑横向 */
    .filter-bar .form-group:nth-child(2) {
        display: flex !important;
        gap: 8px;
        margin-top: 0;
    }

    .filter-bar .form-group:nth-child(2) .btn {
        flex: 1;
        min-height: 36px;
        border-radius: 18px;
        font-size: 13px;
    }

    /* 重置 按钮：柔和次要按钮 */
    .filter-bar .form-group:nth-child(2) .btn-warning {
        background-color: transparent !important;
        color: #666 !important;
        border: 1px solid #ddd;
        box-shadow: none;
    }

    /* ---------- 表单行：垂直堆叠 ---------- */
    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .form-row .form-group {
        margin-bottom: 10px;
    }

    .form-group label {
        font-size: 13px;
        color: #555;
        margin-bottom: 4px;
    }

    .form-control {
        padding: 9px 12px;
        font-size: 16px;
        border-radius: 6px;
        border: 1px solid #dcdfe6;
    }

    .form-control:focus {
        border-color: #3498db;
    }

    select.form-control {
        font-size: 16px;
    }

    /* ---------- 表格：横向滚动 + GPU 加速 ---------- */
    .table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
        font-size: 13px;
        -ms-overflow-style: -ms-autohiding-scrollbar;
        /* 强制 GPU 合成层 */
        transform: translateZ(0);
        -webkit-transform: translateZ(0);
        will-change: transform;
    }

    .card .table {
        margin: 0 -12px;
        padding: 0 12px;
        width: calc(100% + 24px);
    }

    .table th, .table td {
        padding: 9px 8px;
        font-size: 12px;
        white-space: nowrap;
    }

    .table th {
        background-color: #fafbfc;
        font-weight: 600;
        color: #606266;
        font-size: 11px;
    }

    /* 表格操作按钮 */
    .table .btn-sm {
        padding: 3px 8px;
        font-size: 11px;
        min-height: 26px;
        border-radius: 3px;
    }

    /* 冻结列：移动端降低层级避免重绘开销 */
    .table th[data-col="actions"],
    .table td[data-col="actions"] {
        z-index: 1;
        background: white;
        position: sticky;
        right: 0;
    }

    .table th[data-col="checkbox"],
    .table td[data-col="checkbox"] {
        position: sticky;
        left: 0;
        background: white;
        z-index: 1;
    }

    .table th[data-col="actions"] {
        z-index: 2;
        background: #fafbfc;
    }

    /* 表格行：禁用 hover 效果（移动端无 hover） */
    .table tr:hover {
        background-color: transparent;
    }

    /* 表格行：点击高亮 */
    .table tr:active {
        background-color: #f0f7ff;
    }

    /* ---------- 弹窗：底部弹出式 sheet ---------- */
    .modal-overlay {
        align-items: flex-end !important;
    }

    .modal-content {
        width: 100% !important;
        max-width: 100% !important;
        max-height: 85vh;
        padding: 16px;
        border-radius: 14px 14px 0 0 !important;
        box-shadow: 0 -4px 20px rgba(0,0,0,0.15);
        animation: slideUp 0.25s ease-out;
    }

    @keyframes slideUp {
        from { transform: translateY(100%); }
        to { transform: translateY(0); }
    }

    .modal-header {
        font-size: 15px;
        padding-bottom: 12px;
        position: relative;
    }

    .modal-header h3 {
        font-size: 16px;
        font-weight: 600;
    }

    /* ---------- 分页：紧凑样式 ---------- */
    .pagination-bar {
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        gap: 10px;
        border-radius: 8px;
    }

    .pagination-info {
        text-align: center;
        font-size: 12px;
        color: #909399;
    }

    .pagination-controls {
        flex-wrap: wrap;
        justify-content: center;
        gap: 6px;
    }

    .page-btns {
        flex-wrap: wrap;
        justify-content: center;
        gap: 4px;
    }

    .page-btn {
        padding: 6px 10px;
        font-size: 13px;
        min-width: 32px;
        text-align: center;
        border-radius: 4px;
    }

    .per-page-select {
        font-size: 13px;
        padding: 4px 8px;
        border-radius: 4px;
    }

    /* ---------- 筛选下拉框：底部弹出 ---------- */
    .filter-dropdown {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        border-radius: 14px 14px 0 0 !important;
        max-height: 70vh;
        animation: slideUp 0.25s ease-out;
    }

    .col-settings-dropdown {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-width: 100% !important;
        transform: none !important;
        border-radius: 14px 14px 0 0 !important;
        max-height: 70vh;
    }

    /* ---------- Toast 消息：顶部安全区 ---------- */
    #flash-container {
        top: 60px !important;
        left: 12px !important;
        right: 12px !important;
        transform: none !important;
        width: auto !important;
    }

    .flash-message {
        width: 100%;
        max-width: 100%;
        font-size: 13px;
        padding: 10px 14px;
        border-radius: 8px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }

    /* ---------- 空数据提示 ---------- */
    .empty-tip {
        padding: 40px 20px;
        color: #c0c4cc;
        font-size: 14px;
    }

    /* ---------- 全屏模式 ---------- */
    body.full-screen .container {
        padding: 8px;
    }

    /* ---------- 打印页 ---------- */
    .print-page {
        padding: 10px;
    }

    .print-page .company-name {
        font-size: 18px;
    }

    .print-page .doc-title {
        font-size: 16px;
    }

    .print-page .info-row {
        flex-direction: column;
        gap: 4px;
    }

    /* ---------- 自定义下拉选择器 ---------- */
    .custom-select-display {
        padding: 10px 12px;
        font-size: 16px;
        border-radius: 6px;
    }

    .customer-option {
        padding: 12px;
        font-size: 14px;
    }

    /* ---------- 图片预览 ---------- */
    .image-preview-item {
        width: 60px;
    }

    .image-preview-thumb {
        width: 60px;
        height: 60px;
    }

    .paste-preview-item {
        width: 55px;
        height: 55px;
    }

    .paste-preview-item img {
        width: 55px;
        height: 55px;
    }

    /* ---------- 材料缩略图 ---------- */
    .material-thumb {
        width: 44px;
        height: 44px;
    }

    /* ---------- 拖拽上传区域 ---------- */
    .drop-zone {
        padding: 20px 14px;
        font-size: 13px;
        border-radius: 8px;
    }

    /* ---------- 导出提示弹窗：底部 sheet ---------- */
    .export-tip-modal {
        align-items: flex-end !important;
    }

    .export-tip-content {
        min-width: auto;
        width: 100%;
        max-width: 100%;
        padding: 20px 20px 24px;
        border-radius: 14px 14px 0 0;
        animation: slideUp 0.25s ease-out;
    }

    /* ---------- 批量删除按钮：圆角胶囊 ---------- */
    .bulk-delete-btn {
        padding: 8px 14px !important;
        font-size: 13px;
        border-radius: 16px !important;
    }

    /* ---------- 列设置按钮：圆角胶囊 ---------- */
    .col-settings-btn {
        padding: 8px 14px !important;
        font-size: 13px;
        border-radius: 16px !important;
    }

    /* ---------- 隐藏桌面端特定元素 ---------- */
    .pc-only {
        display: none !important;
    }

    /* ---------- 性能优化：减少动画 ---------- */
    * {
        animation-duration: 0.2s !important;
    }
}

/* ============================================================
 * 平板端适配 (max-width: 1024px)
 * ============================================================ */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 100%;
        padding: 0 15px;
    }

    .container.container-wide {
        max-width: 100%;
    }

    .navbar {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        white-space: nowrap;
    }

    .navbar .logo {
        font-size: 15px;
        margin-right: 12px;
    }

    .navbar a {
        padding: 0 8px;
        font-size: 13px;
    }

    .stats-row {
        gap: 12px;
    }

    .stat-card {
        padding: 14px;
    }

    .stat-card .number {
        font-size: 28px;
    }

    .form-row {
        gap: 10px;
    }

    .table-wrapper {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table {
        min-width: 600px;
    }
}

/* ============================================================
 * 提醒功能样式
 * ============================================================ */
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.6;
}
.badge-success { background: #e8f5e9; color: #2e7d32; }
.badge-danger { background: #ffebee; color: #c62828; }
.badge-info { background: #e3f2fd; color: #1565c0; }

.reminder-overdue-row { background-color: #fff3e0 !important; }
.reminder-done-row { background-color: #f5f5f5 !important; color: #999; }
.reminder-done-row td { color: #999; }

/* 右上角铃铛（提醒通知入口） */
.bell-wrap {
    position: relative;
}
.user-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 50px;
    padding: 0 14px;
    margin-left: 4px;
}
.user-name {
    color: #ecf0f1;
    font-size: 13px;
    max-width: 120px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.logout-link {
    color: #bdc3c7;
    font-size: 13px;
    text-decoration: none;
    padding: 4px 10px;
    border-radius: 4px;
    transition: background 0.2s, color 0.2s;
}
.logout-link:hover {
    background-color: #34495e;
    color: #e74c3c;
}
.bell-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: #ecf0f1;
    width: 46px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    -webkit-tap-highlight-color: transparent;
}
.bell-btn:hover {
    background-color: #34495e;
    color: #3498db;
}
.bell-dot {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 8px;
    height: 8px;
    background: #e74c3c;
    border-radius: 50%;
    border: 1px solid #fff;
}
.bell-dropdown {
    position: absolute;
    top: 54px;
    right: 0;
    width: 360px;
    max-width: 92vw;
    background: #fff;
    color: #333;
    border-radius: 8px;
    box-shadow: 0 6px 24px rgba(0,0,0,0.18);
    display: none;
    z-index: 1000;
    overflow: hidden;
    text-align: left;
}
.bell-dropdown.open {
    display: block;
}
.bell-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #eee;
    font-weight: bold;
    font-size: 14px;
    color: #2c3e50;
}
.bell-header a {
    color: #3498db;
    font-size: 12px;
    font-weight: normal;
    text-decoration: none;
}
.bell-body {
    max-height: 420px;
    overflow-y: auto;
}
.bell-section-label {
    padding: 8px 16px;
    background: #fafafa;
    font-size: 12px;
    color: #888;
    font-weight: 600;
    border-bottom: 1px solid #f0f0f0;
}
.bell-item {
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
}
.bell-item:last-child {
    border-bottom: none;
}
.bell-item-done {
    opacity: 0.6;
}
.bell-item-title {
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
    color: #2c3e50;
}
.bell-item-content {
    font-size: 12px;
    color: #666;
    margin-bottom: 6px;
    word-break: break-all;
}
.bell-item-time {
    font-size: 11px;
    color: #999;
}
.bell-overdue {
    color: #e74c3c;
    font-weight: 600;
}
.bell-item-actions {
    margin-top: 8px;
    display: flex;
    gap: 8px;
}
.bell-item-actions .btn {
    font-size: 12px;
    padding: 3px 10px;
}
.bell-empty {
    padding: 30px 16px;
    text-align: center;
    color: #999;
    font-size: 13px;
}

/* 桌面端：铃铛推到导航栏最右侧 */
@media (min-width: 769px) {
    .bell-wrap {
        margin-left: auto;
    }
}

/* ============================================================
 * 桌面端覆盖（确保汉堡菜单按钮在桌面端不可见）
 * ============================================================ */
@media (min-width: 769px) {
    .navbar-toggle {
        display: none !important;
    }
}
