* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: #f0f2f5;
    color: #333;
}

.app {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
    width: 220px;
    background-color: #2c3e50;
    color: #fff;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.sidebar-footer {
    margin-top: auto;
    padding: 16px;
    text-align: center;
    border-top: 1px solid #34495e;
    background-color: #1a252f;
}

.footer-logo {
    width: 90px;
    height: auto;
    opacity: 0.9;
}

.logo {
    padding: 20px;
    background-color: #1a252f;
    text-align: center;
}

.logo h2 {
    font-size: 16px;
    font-weight: 500;
    color: #fff;
    line-height: 1.4;
}

.nav-menu ul {
    list-style: none;
    padding: 10px 0;
}

.nav-item {
    padding: 12px 20px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: background-color 0.3s;
}

.nav-item:hover {
    background-color: #34495e;
}

.nav-item.active {
    background-color: #3498db;
}

.nav-item .icon {
    font-size: 18px;
}

.nav-item .text {
    font-size: 14px;
}

/* 主内容区 */
.main-content {
    flex: 1;
    padding: 24px;
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    background-color: #f0f2f5;
}

.page {
    display: none;
}

.page.active {
    display: block;
}

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

.page-header h2 {
    font-size: 20px;
    font-weight: 600;
}

/* 统计卡片 */
.stats-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: transform 0.2s, box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.stat-value {
    font-size: 28px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 8px;
}

.stat-value.income {
    color: #27ae60;
}

.stat-value.expense {
    color: #e74c3c;
}

.stat-value.profit {
    color: #3498db;
}

.stat-label {
    font-size: 14px;
    color: #95a5a6;
}

/* 操作按钮 */
.action-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.btn {
    border: none;
    border-radius: 6px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.2s;
}

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

.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-1px);
}

.btn-secondary {
    background-color: #ecf0f1;
    color: #2c3e50;
}

.btn-secondary:hover {
    background-color: #bdc3c7;
}

.btn-block {
    width: 100%;
}

.btn-default {
    background-color: #ecf0f1;
    color: #2c3e50;
    border: 1px solid #dfe4ea;
}

.btn-default:hover {
    background-color: #d5dbdb;
}

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

.btn-success:hover {
    background-color: #229954;
    transform: translateY(-1px);
}

/* 筛选栏 */
.filter-bar {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 16px;
    background: #fff;
    padding: 20px 24px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin: 20px 0;
}

.filter-bar .filter-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
    flex: 1 1 180px;
    min-width: 160px;
}

.filter-bar .filter-item > label {
    font-size: 13px;
    color: #576574;
    font-weight: 500;
}

.filter-bar .filter-item > input,
.filter-bar .filter-item > select {
    width: 100%;
    height: 38px;
    padding: 0 12px;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    font-size: 14px;
    color: #2c3e50;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s;
}

.filter-bar .filter-item > input:focus,
.filter-bar .filter-item > select:focus {
    outline: none;
    border-color: #e67e22;
}

/* 自定义时间范围控件：包裹两个原生date，视觉上合并为一个控件 */
.filter-range {
    display: inline-flex;
    align-items: stretch;
    width: 100%;
    height: 38px;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
    overflow: hidden;
    box-sizing: border-box;
    background: #fff;
    transition: border-color .15s, box-shadow .15s;
}

.filter-range:focus-within {
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230,126,34,0.12);
}

.filter-range > input[type="date"] {
    flex: 1 1 0;
    min-width: 0;
    height: 100%;
    padding: 0 10px;
    border: 0;
    background: transparent;
    font-size: 14px;
    color: #2c3e50;
    box-sizing: border-box;
}

.filter-range > input[type="date"]:focus {
    outline: none;
}

.filter-range-sep {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 8px;
    color: #95a5a6;
    background: #f8f9fa;
    border-left: 1px solid #ecf0f1;
    border-right: 1px solid #ecf0f1;
    font-size: 12px;
}

.filter-bar .filter-btns {
    flex: 0 0 auto;
    flex-direction: row;
    align-items: center;
    gap: 10px;
}

.filter-bar .filter-btns .btn {
    padding: 9px 22px;
    height: 38px;
}

/* 查询结果统计区 */
.filter-stats {
    margin: 0 0 20px;
}

/* 登录页 */
.login-view {
    position: fixed;
    inset: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background:
        linear-gradient(135deg, rgba(255,140,66,0.14) 0%, rgba(255,193,130,0.08) 60%, rgba(255,255,255,0) 100%),
        #f4f6f8;
}

.login-card {
    width: 100%;
    max-width: 420px;
    background: #fff;
    border-radius: 14px;
    padding: 40px 36px 32px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-logo {
    width: 72px;
    height: 72px;
    margin: 0 auto 14px;
    display: block;
    object-fit: contain;
}

.login-title {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 600;
    color: #2c3e50;
    letter-spacing: 1px;
}

.login-subtitle {
    margin: 0;
    font-size: 13px;
    color: #7f8c8d;
}

.login-form .form-group {
    margin-bottom: 18px;
}

.login-form .form-group > label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #576574;
    margin-bottom: 8px;
}

.login-form .form-group > input {
    width: 100%;
    height: 42px;
    padding: 0 14px;
    border: 1px solid #dfe4ea;
    border-radius: 8px;
    font-size: 14px;
    color: #2c3e50;
    background: #fff;
    box-sizing: border-box;
    transition: border-color .15s, box-shadow .15s;
}

.login-form .form-group > input:focus {
    outline: none;
    border-color: #e67e22;
    box-shadow: 0 0 0 3px rgba(230,126,34,0.12);
}

.login-error {
    font-size: 13px;
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.08);
    border: 1px solid rgba(231, 76, 60, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 12px;
}

.login-hint {
    font-size: 12px;
    color: #95a5a6;
    margin-bottom: 14px;
    line-height: 1.6;
}

.login-submit {
    height: 44px;
    font-size: 15px;
    letter-spacing: 4px;
    border-radius: 8px;
}

.login-footer {
    margin-top: 24px;
    text-align: center;
    font-size: 12px;
    color: #b2bec3;
    line-height: 1.8;
}

.login-footer a {
    color: #b2bec3;
    text-decoration: none;
}

.login-footer a:hover {
    color: #e67e22;
    text-decoration: underline;
}

/* 主页面底部备案 */
.site-footer {
    margin-top: auto;
    padding: 20px 0;
    text-align: center;
    font-size: 13px;
    color: #7f8c8d;
    line-height: 1.8;
    border-top: 1px solid #ecf0f1;
}

.site-footer a {
    color: #7f8c8d;
    text-decoration: none;
}

.site-footer a:hover {
    color: #e67e22;
    text-decoration: underline;
}

/* 侧边栏：左下角用户菜单（图标 + 点击弹出退出登录） */
.sidebar-footer {
    position: relative;
}

.user-menu {
    position: absolute;
    left: 16px;
    bottom: 16px;
}

.user-menu-trigger {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background .15s, transform .15s;
    padding: 0;
}

.user-menu-trigger:hover {
    background: rgba(255,255,255,0.16);
    transform: translateY(-1px);
}

.user-menu-trigger:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(255,140,66,0.28);
}

.user-menu-popover {
    position: absolute;
    left: 0;
    bottom: 52px;
    min-width: 156px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.14);
    padding: 6px;
    display: none;
    z-index: 60;
}

.user-menu.active .user-menu-popover,
.user-menu-popover.show {
    display: block;
}

.user-menu-item {
    width: 100%;
    display: inline-flex;
    align-items: center;
    padding: 9px 12px;
    border-radius: 6px;
    border: 0;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
    color: #2c3e50;
    text-align: left;
}

.user-menu-item:hover {
    background: #fdf0e4;
    color: #c0392b;
}

/* 表格容器 */
.table-container {
    background-color: #fff;
    border-radius: 8px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #ecf0f1;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

/* 客户管理列表：固定表头+列宽布局（列宽可拖拽）；外层容器横向滚动防止撑破页面 */
#customer #customerTableContainer {
    overflow-x: auto;
    max-width: 100%;
}
#customer .data-table {
    table-layout: fixed;
    width: max-content;       /* 由 colgroup 实际宽度决定；总宽超出容器时自动滚动 */
    min-width: 100%;
}
#customer .data-table th,
#customer .data-table td {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
    position: relative;
}
/* 拖拽手柄：插入在每个列头右侧，鼠标移到分隔条时可拉动 */
#customer .data-table thead th .col-resize-handle {
    position: absolute;
    top: 0;
    right: -3px;
    width: 7px;
    height: 100%;
    cursor: col-resize;
    user-select: none;
    z-index: 2;
}
#customer .data-table thead th:hover .col-resize-handle {
    background-color: rgba(230, 126, 34, 0.25);
}
/* 拖拽整列过程中：禁止文字选中，光标统一 */
body.col-resize-dragging,
body.col-resize-dragging * {
    cursor: col-resize !important;
    user-select: none !important;
}
/* 操作列固定最小宽度，保持在一行不换行 */
#customer .data-table td:nth-child(9) {
    white-space: nowrap !important;
    min-width: 100px;
}


.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #ecf0f1;
    font-size: 14px;
}

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

.data-table tbody tr:hover {
    background-color: #f8f9fa;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

.table-footer {
    margin-top: 16px;
    text-align: right;
}

.table-footer a {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
}

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

/* 标签 */
.tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
}

.tag-income {
    background-color: #d4edda;
    color: #155724;
}

.tag-expense {
    background-color: #f8d7da;
    color: #721c24;
}

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

.modal.active {
    display: flex;
}

.modal-content {
    background-color: #fff;
    border-radius: 8px;
    width: 400px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

/* 订单录入弹窗加宽：给多条刀具行足够的空间，避免单价/数量拥挤 */
#orderModal .modal-content {
    width: 860px;
    max-width: 94vw;
}

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

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

.close {
    font-size: 24px;
    cursor: pointer;
    color: #95a5a6;
    line-height: 1;
}

.close:hover {
    color: #2c3e50;
}

.modal-body {
    padding: 24px;
}

/* 表单 */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 4px;
    font-weight: 700;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    resize: vertical;
}

.form-group textarea {
    min-height: 100px;
    line-height: 1.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
}

/* ================== 自定义 Combobox（订单录入：客户、刀具类型共用）================== */
.cb-wrap {
    position: relative;
    width: 100%;
    display: inline-block;
}
.cb-wrap .cb-input {
    width: 100%;
    padding: 10px 64px 10px 12px;   /* 右侧留清空 + 箭头按钮空间 */
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    background: #fff;
    transition: border-color 0.3s;
    box-sizing: border-box;
}
.cb-wrap .cb-input:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.12);
}
.cb-clear, .cb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    line-height: 20px;
    text-align: center;
    border-radius: 50%;
    color: #999;
    cursor: pointer;
    user-select: none;
    font-size: 16px;
    transition: background 0.15s, color 0.15s;
}
.cb-clear { right: 28px; font-size: 18px; line-height: 20px; }
.cb-arrow { right: 6px; font-size: 12px; color: #bbb; }
.cb-clear:hover { background: #f0f0f0; color: #e74c3c; }
.cb-arrow:hover { background: #f0f0f0; color: #555; }

/* 下拉弹出面板（全局共享，position fixed 防父容器 overflow 裁剪）*/
.cb-list {
    position: fixed;
    z-index: 999999;
    background: #fff;
    border: 1px solid #d5d5d5;
    border-radius: 4px;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
    padding: 4px 0;
    max-height: 280px;
    min-width: 180px;
    overflow-y: auto;
    display: none;
    font-size: 14px;
    color: #333;
}
.cb-list.cb-open { display: block; }
.cb-option {
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
    line-height: 1.5;
}
.cb-option:hover {
    background: #1e6fba;     /* 截图中深蓝 hover */
    color: #fff;
}
.cb-option.cb-active {
    background: #1e6fba;
    color: #fff;
}
.cb-empty {
    padding: 12px 14px;
    color: #999;
    font-size: 13px;
    cursor: default;
}

/* 操作链接 */
.action-link {
    color: #3498db;
    text-decoration: none;
    font-size: 14px;
    margin-right: 8px;
}

.action-link:hover {
    text-decoration: underline;
}

.action-link.delete {
    color: #e74c3c;
}

.action-link.edit {
    color: #f39c12;
}

/* 分页控件 */
.pagination {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    padding: 16px 0 4px;
    flex-wrap: wrap;
}

.pagination .page-info {
    color: #7f8c8d;
    font-size: 14px;
    margin-right: 12px;
}

.pagination .page-btn {
    min-width: 34px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid #dfe4ea;
    background: #fff;
    color: #2c3e50;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: all .15s ease;
}

.pagination .page-btn:hover:not(:disabled) {
    border-color: #e67e22;
    color: #e67e22;
}

.pagination .page-btn.active {
    background: #e67e22;
    border-color: #e67e22;
    color: #fff;
    cursor: default;
}

.pagination .page-btn:disabled {
    background: #f4f6f8;
    color: #b2bec3;
    cursor: not-allowed;
    border-color: #ecf0f1;
}

/* 响应式 */
@media (max-width: 600px) {
    .app {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .nav-menu ul {
        display: flex;
        overflow-x: auto;
    }

    .nav-item {
        white-space: nowrap;
    }

    .stats-cards {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-wrap: wrap;
    }

    .data-table {
        font-size: 12px;
    }

    .data-table th,
    .data-table td {
        padding: 8px;
    }
}

/* ========== 订单多条刀具明细 ========== */
.btn-ghost {
    background: #fff;
    color: #e67e22;
    border: 1px dashed #e67e22;
    padding: 4px 10px;
    font-size: 12px;
    border-radius: 4px;
    cursor: pointer;
    transition: all .15s ease;
}
.btn-ghost:hover {
    background: #fff4ea;
}

.order-item-row {
    border: 1px solid #e6e8eb;
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
    background: #fafbfc;
}
.order-item-row:last-child {
    margin-bottom: 0;
}
.order-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 10px;
}
.order-item-index {
    font-weight: 600;
    font-size: 13px;
    color: #2c3e50;
}
.order-item-del {
    background: none;
    border: none;
    color: #e74c3c;
    font-size: 12px;
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
}
.order-item-del:hover {
    background: #fdecea;
}

.order-items-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.2fr;
    gap: 10px;
}
.order-items-grid .form-group {
    margin-bottom: 0;
}
.order-items-grid .form-group label {
    font-size: 12px;
    color: #636e72;
    margin-bottom: 4px;
}

.order-summary {
    border-top: 1px dashed #dfe4ea;
    padding: 12px 4px 4px;
    margin: 8px 0 16px;
    display: flex;
    justify-content: flex-end;
    gap: 24px;
    font-size: 13px;
    color: #2c3e50;
}
.order-summary strong {
    font-size: 14px;
    margin-left: 4px;
}

/* ====== 送货单模块样式 ====== */
.delivery-modal-content { max-width: 1400px !important; width: 92vw !important; max-height: 92vh; display: flex; flex-direction: column; }
.delivery-modal-body { flex: 1; overflow-y: auto; padding: 16px 24px; }
.delivery-modal .modal-footer { padding: 12px 24px; border-top: 1px solid #eee; display: flex; justify-content: flex-end; gap: 12px; }
.delivery-form-header { text-align: center; padding: 8px 0 16px; border-bottom: 2px solid #e67e22; margin-bottom: 16px; }
.delivery-company { font-size: 20px; font-weight: bold; letter-spacing: 2px; color: #333; }
.delivery-title { font-size: 22px; font-weight: bold; letter-spacing: 10px; color: #e67e22; margin-top: 4px; }
.delivery-form-info { margin-bottom: 16px; }
.delivery-info-row { display: flex; gap: 20px; margin-bottom: 8px; }
.delivery-info-item { flex: 1; display: flex; align-items: center; gap: 6px; }
.delivery-info-item label { white-space: nowrap; font-size: 14px; color: #555; min-width: 60px; }
.delivery-info-item input, .delivery-info-item select { flex: 1; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; font-size: 14px; min-width: 0; }
.delivery-info-item input[readonly] { background: #f9f9f9; color: #888; }
.delivery-items-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; padding-top: 8px; border-top: 1px dashed #ddd; }
.delivery-items-header span { font-weight: 600; color: #333; font-size: 14px; }
.delivery-items-wrapper { overflow-x: auto; border: 1px solid #ddd; border-radius: 4px; }
.delivery-items-table { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 900px; }
.delivery-items-table th { background: #f8f8f8; padding: 8px 6px; border: 1px solid #ddd; font-weight: 600; text-align: center; font-size: 13px; }
.delivery-items-table td { padding: 4px; border: 1px solid #ddd; text-align: center; }
.delivery-items-table input { width: 100%; padding: 6px 4px; border: none; font-size: 13px; text-align: center; background: transparent; outline: none; }
.delivery-items-table input:focus { background: #fff8e7; box-shadow: inset 0 0 0 1px #e67e22; }
.delivery-items-table input[readonly] { background: #f9f9f9; color: #e67e22; font-weight: 600; }
.di-del-btn { width: 26px; height: 26px; border-radius: 50%; border: none; background: #ffeaea; color: #e74c3c; font-size: 16px; cursor: pointer; line-height: 1; }
.di-del-btn:hover { background: #ffd6d6; }
.delivery-total-row { display: flex; justify-content: space-between; align-items: center; padding: 12px 8px; margin-top: 10px; border-top: 2px solid #e67e22; }
.delivery-total-label { font-weight: 600; font-size: 15px; color: #333; }
.delivery-total-amount { font-size: 15px; color: #333; }
.delivery-total-amount span { font-size: 18px; font-weight: 700; color: #e67e22; margin-left: 4px; }
.delivery-remark-row { display: flex; align-items: center; gap: 8px; padding: 10px 8px; background: #fffaf0; border: 1px solid #ffe0b2; border-radius: 4px; margin-bottom: 10px; }
.delivery-remark-row label { font-weight: 600; font-size: 14px; color: #555; white-space: nowrap; }
.delivery-remark-input { flex: 1; padding: 6px 10px; border: 1px solid transparent; background: transparent; font-size: 13px; color: #666; }
.delivery-remark-input:focus { outline: none; border-color: #e67e22; background: #fff; border-radius: 3px; }
.delivery-sign-row { display: flex; gap: 16px; padding: 12px 8px 4px; border-top: 1px dashed #ddd; }
.delivery-sign-item { flex: 1; display: flex; align-items: center; gap: 6px; }
.delivery-sign-item label { font-size: 13px; color: #555; white-space: nowrap; }
.delivery-sign-item input { flex: 1; padding: 6px 8px; border: none; border-bottom: 1px solid #aaa; font-size: 13px; background: transparent; outline: none; }
.delivery-sign-item input:focus { border-bottom-color: #e67e22; }

/* 送货单 右侧竖排联次 */
.delivery-body-inner {
    display: flex;
    gap: 10px;
    align-items: stretch;
}
.delivery-body-main { flex: 1; min-width: 0; }
.delivery-vertical-coupon {
    flex-shrink: 0;
    width: 34px;
    padding: 16px 2px;
    border-left: 2px solid #333;
    margin-left: 2px;
    font-size: 13px;
    color: #333;
    letter-spacing: 2px;
    font-weight: 600;
    writing-mode: vertical-rl;
    -webkit-writing-mode: vertical-rl;
    text-orientation: upright;
    user-select: none;
    text-align: center;
    line-height: 1.6;
}

.print-delivery-inner {
    display: flex;
    gap: 8px;
    align-items: stretch;
}
.print-delivery-main { flex: 1; min-width: 0; }
.print-delivery .delivery-vertical-coupon {
    width: 30px;
    border-left: 2px solid #000;
    padding: 14px 2px;
    margin-left: 4px;
    font-size: 12px;
    letter-spacing: 2px;
    color: #000;
    font-weight: 500;
}

.print-modal-content { max-width: 1400px !important; width: 92vw !important; }
.print-modal-body { max-height: 70vh; overflow-y: auto; padding: 20px; background: #f5f5f5; }
.print-delivery { background: #fff; padding: 30px; box-shadow: 0 2px 12px rgba(0,0,0,0.1); }
.print-delivery-company { text-align: center; font-size: 22px; font-weight: bold; letter-spacing: 2px; padding: 10px 0 4px; color: #000; }
.print-delivery-title { text-align: center; font-size: 24px; font-weight: bold; letter-spacing: 12px; padding: 6px 0 14px; color: #000; }
.print-delivery-info { border: 1px solid #000; border-bottom: none; }
.print-info-row { display: flex; padding: 6px 12px; }
.print-info-item { flex: 1; font-size: 13px; display: flex; color: #000; }
.print-info-item-full { flex: 2; }
.print-delivery-table { width: 100%; border-collapse: collapse; border: 1px solid #000; }
.print-delivery-table th, .print-delivery-table td { border: 1px solid #000; padding: 6px 8px; font-size: 12px; text-align: center; color: #000; }
.print-delivery-table th { background: #f5f5f5; font-weight: bold; }
.print-delivery-total { display: flex; border: 1px solid #000; border-top: none; padding: 8px 12px; font-size: 13px; color: #000; }
.print-total-left { flex: 1; }
.print-total-right { flex: 1; text-align: right; font-weight: bold; }
.print-delivery-remark { border: 1px solid #000; border-top: none; padding: 8px 12px; font-size: 12px; min-height: 40px; color: #000; }
.print-delivery-sign { display: flex; justify-content: space-between; padding: 16px 12px; font-size: 13px; border: 1px solid #000; border-top: none; color: #000; }
.print-delivery-sign > div { flex: 1; }
@media print {
    body * { visibility: hidden; }
    .print-modal, .print-modal * { visibility: visible; }
    .print-modal { position: absolute; left: 0; top: 0; width: 100%; background: #fff !important; }
    .print-modal .modal-header, .print-modal .modal-footer { display: none !important; }
    .print-modal-content { max-width: 100% !important; box-shadow: none !important; border: none !important; }
    .print-delivery { box-shadow: none; padding: 0; }
}
