/* =========================================================
   电商订单转开票工具 - 页面样式
   说明：本工具 JS/CSS 直接放 public/invoice/ 目录，不混淆打包。
   布局类与站点其它工具视觉一致，但独立维护，不依赖 cap 的 CSS。
   ========================================================= */

:root {
    --primary: #174da1;
    --primary-strong: #0e3d8f;
    --text-strong: #15233b;
    --text-soft: #5a6b85;
    --line: rgba(21, 35, 59, 0.1);
    --bg-soft: #f4f7fb;
    --panel-bg: #ffffff;
    --danger: #e53e3e;
    --ok: #2f9e44;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    color: var(--text-strong);
    background: var(--bg-soft);
    -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.wrap {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==================== 顶栏 ==================== */
.topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.86);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--line);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 16px;
}
.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text-strong);
}
.brand-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #174da1, #2f6fd0);
    color: #fff;
    flex: none;
}
.brand-copy { line-height: 1.25; }
.brand-title { margin: 0; font-size: 17px; font-weight: 800; }
.brand-subtitle { margin: 2px 0 0; font-size: 12px; color: var(--text-soft); }

.topbar-actions .nav {
    display: flex;
    align-items: center;
    gap: 14px;
}
.topbar-actions .nav a {
    color: var(--text-soft);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    padding: 6px 2px;
}
.topbar-actions .nav a:hover { color: var(--primary); }

/* ==================== 页面主体 ==================== */
.page { padding: 26px 0 0; }
.section { padding-bottom: 40px; }

/* ==================== 工具整体说明 ==================== */
.inv-intro {
    background: #f0f6ff;
    border: 1px solid rgba(23, 77, 161, 0.18);
    border-radius: 12px;
    padding: 16px 22px;
    margin-bottom: 18px;
    font-size: 14px;
    line-height: 1.8;
    color: var(--text-strong);
}
.inv-intro p { margin: 0 0 6px; }
.inv-intro p:last-child { margin-bottom: 0; color: var(--text-soft); }
.inv-intro strong { color: var(--primary); }
.inv-intro .inv-intro-disclaimer {
    margin-top: 8px;
    font-size: 12px;
    color: #8a6d1a;
    background: #fdf6e3;
    border: 1px solid #f3e3b0;
    border-radius: 6px;
    padding: 6px 10px;
}

/* ==================== 功能按钮 ==================== */
.inv-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    gap: 12px;
    flex-wrap: wrap;
}
.inv-functions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* ==================== 操作步骤时间轴 ==================== */
.inv-head {
    flex-direction: column;
    align-items: stretch;
}
.inv-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 26px;
    padding: 16px 22px;
    margin-bottom: 2px;
    background: linear-gradient(90deg, rgba(23, 77, 161, 0.05), rgba(47, 111, 208, 0.05));
    border: 1px solid var(--line);
    border-radius: 12px;
}
.inv-steps-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.inv-steps-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    border: 1.5px solid rgba(23, 77, 161, 0.55);
    color: var(--primary);
    background: transparent;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
    flex: none;
}
.inv-steps-text {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-strong);
    white-space: nowrap;
}
.inv-steps-arrow {
    color: var(--primary);
    font-size: 18px;
    font-weight: 800;
    line-height: 1;
    flex: none;
}
.inv-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--text-strong);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    line-height: 1;
}
.inv-btn:hover { border-color: var(--primary); color: var(--primary); }
.inv-btn-primary {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.inv-btn-primary:hover { background: var(--primary-strong); color: #fff; }
.inv-btn-sm { padding: 6px 12px; font-size: 13px; }
.inv-btn-xs { padding: 4px 10px; font-size: 12px; }
/* 表格操作列内按钮之间的间隔 */
.inv-op-sep { display: inline-block; width: 14px; }
.inv-btn-danger { color: var(--danger); }
.inv-btn-danger:hover { border-color: var(--danger); color: var(--danger); }
.inv-btn[disabled] { opacity: .5; cursor: not-allowed; }
.inv-btn-disabled { opacity: .5; cursor: not-allowed; }
.inv-btn-disabled:hover { border-color: var(--line); color: var(--text-strong); }

/* ==================== 使用帮助说明区 ==================== */
.inv-help {
    background: var(--panel-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 22px 24px;
    margin-bottom: 20px;
    scroll-margin-top: 84px; /* 顶栏 sticky 时锚点跳转不遮挡 */
}
.inv-help-title {
    margin: 0 0 6px;
    font-size: 18px;
    font-weight: 800;
    color: var(--text-strong);
}
.inv-help-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-top: 14px;
}
.inv-help-card {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    background: #fbfcfe;
}
.inv-help-h3 {
    margin: 0 0 10px;
    font-size: 14px;
    font-weight: 700;
    color: var(--primary);
    padding-bottom: 8px;
    border-bottom: 1px dashed var(--line);
}
.inv-help-ol, .inv-help-ul {
    margin: 0;
    padding-left: 20px;
    font-size: 13px;
    line-height: 1.8;
    color: var(--text-strong);
}
.inv-help-ol li, .inv-help-ul li { margin-bottom: 6px; }
.inv-help-ol li:last-child, .inv-help-ul li:last-child { margin-bottom: 0; }
.inv-help-qa { margin-bottom: 12px; }
.inv-help-qa:last-child { margin-bottom: 0; }
.inv-help-q {
    margin: 0 0 3px;
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong);
}
.inv-help-a {
    margin: 0;
    font-size: 13px;
    line-height: 1.7;
    color: var(--text-soft);
}

/* ==================== 面板 ==================== */
.inv-panel {
    background: var(--panel-bg);
    border: 1px solid var(--line);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 20px;
}
.inv-panel-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 16px 20px;
    border-bottom: 1px solid var(--line);
}
.inv-panel-title { font-size: 16px; font-weight: 800; }
.inv-panel-tools { display: flex; gap: 8px; }
.inv-panel-body { padding: 20px; }

.inv-empty {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-soft);
    font-size: 14px;
}
.inv-tip {
    padding: 12px 14px;
    margin-bottom: 16px;
    border-radius: 10px;
    background: rgba(23, 77, 161, 0.06);
    color: var(--text-soft);
    font-size: 13px;
    line-height: 1.7;
}
.inv-sub-title {
    font-size: 14px;
    font-weight: 700;
    margin: 18px 0 10px;
    color: var(--text-strong);
}

/* 导入订单：注意事项 + 示例表 + 模板下载 */
.inv-import-notes {
    margin-bottom: 18px;
    padding: 14px 16px;
    border-radius: 10px;
    border: 1px solid rgba(23, 77, 161, 0.18);
    background: #fff;
}
.inv-import-notes-title {
    font-size: 15px;
    font-weight: 700;
    color: #c0392b;
    margin-bottom: 10px;
}
.inv-import-notes-ul {
    margin: 0 0 14px 0;
    padding-left: 18px;
    font-size: 13px;
    line-height: 1.9;
    color: var(--text-soft);
}
.inv-import-notes-ul strong {
    color: var(--text-strong);
}
.inv-import-notes-sub {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong);
    margin: 4px 0 8px;
}
.inv-import-sample {
    margin: 0 0 6px;
    font-size: 12px;
}
.inv-import-sample th {
    background: #2f5496;
    color: #fff;
    text-align: center;
}
.inv-import-sample-note {
    font-size: 12px;
    color: var(--text-soft);
    margin: 2px 0 14px;
    line-height: 1.6;
}
.inv-import-template {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    padding-top: 4px;
}

/* 关联标识工作示意图 */
.inv-link-demo {
    display: flex;
    align-items: stretch;
    gap: 10px;
    margin: 10px 0 4px;
    flex-wrap: wrap;
}
.inv-link-col {
    flex: 1 1 0;
    min-width: 180px;
    background: #f7f9fc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.inv-link-col-title {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong);
}
.inv-link-col-desc {
    font-size: 11px;
    color: var(--text-soft);
    line-height: 1.5;
    margin: 0 0 2px;
}
.inv-link-box {
    border-radius: 6px;
    padding: 8px 10px;
    font-size: 12px;
    /*font-weight: 600;*/
    line-height: 1.5;
    border: 1px solid transparent;
}
.inv-link-box-1 { background: #e8f0fe; color: #174da1; border-color: #c3d6f5; }
.inv-link-box-2 { background: #eaf7ee; color: #1e7a46; border-color: #c3e8d0; }
.inv-link-box-3 { background: #fff4e5; color: #b9770e; border-color: #f3ddb5; }

/* 示意图：普通商品 / 套餐商品 分行 */
.inv-link-row {
    margin-bottom: 12px;
    padding: 10px 12px 6px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fcfdfe;
}
.inv-link-row-tag {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: #fff;
    border-radius: 4px;
    padding: 2px 10px;
    margin-bottom: 8px;
}
.inv-link-row-tag-normal { background: #2f5496; }
.inv-link-row-tag-package { background: #b9770e; }
.inv-link-arrow {
    align-self: center;
    font-size: 22px;
    color: #999;
    font-weight: 700;
}
/* 全局缩小 layui 弹层按钮（确认/取消/普票/专票/关闭），避免 3 个按钮换行 */
.layui-layer-btn a {
    height: 30px;
    line-height: 30px;
    padding: 0 13px;
    font-size: 13px;
}
.layui-layer-btn .layui-layer-btn0 {
    margin-right: 6px;
}

.inv-result { margin-top: 16px; }
.inv-result .inv-result-ok { color: var(--ok); font-weight: 600; }
.inv-result .inv-result-err { color: var(--danger); font-weight: 600; }
.inv-file-name { margin: 12px 0; color: var(--text-soft); font-size: 13px; }
.inv-import-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.inv-pager { display: flex; justify-content: space-between; align-items: center; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.inv-pager-info { font-size: 12px; color: var(--text-soft); margin-right: auto; }

/* 搜索栏 */
.inv-search-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
/* 列表上方操作按钮行（选中开票/开票/删除选中/刷新/清空） */
.inv-list-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 14px;
    flex-wrap: wrap;
}
.inv-search-input {
    flex: 1;
    max-width: 320px;
    height: 34px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-strong);
    box-sizing: border-box;
    outline: none;
}
/* 订单号搜索输入框：缩窄宽度，但保留足够空间完整显示 placeholder */
#order-search {
    max-width: 280px;
}
.inv-search-input:focus {
    border-color: var(--primary);
}
.inv-search-input::placeholder {
    color: #9aa3b2;
    font-size: 12px;
}
.inv-search-date {
    flex: 0 0 auto;
    width: 135px;
    padding: 0 6px;
    cursor: pointer;
}
.inv-search-sep {
    flex: 0 0 auto;
    color: #9aa3b2;
    font-size: 12px;
}
.inv-search-select {
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 12px;
    color: var(--text-strong);
    background: #fff;
    box-sizing: border-box;
    outline: none;
    cursor: pointer;
}
.inv-search-select:focus {
    border-color: var(--primary);
}

/* 发票类型选择 */
/* 提交导入按钮（映射区下方靠右） */
.inv-import-submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
}

/* ==================== 商品映射卡片 ==================== */
.product-card {
    border: 1px solid var(--line);
    border-radius: 10px;
    margin-bottom: 10px;
    padding: 10px 12px;
    background: #fff;
}
.product-card-top {
    display: grid;
    grid-template-columns: minmax(300px, 38%) 36px 1fr;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}
.pc-top-left {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-strong);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.pc-top-col2 { /* 与下方箭头列对齐占位 */ }
.pc-top-right-col {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 0;
}
.pc-top-right {
    font-size: 13px;
    font-weight: 400;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.product-card-actions { display: flex; gap: 12px; flex: none; align-items: center; }
/* 卡片操作文字按钮（无边框） */
.pc-text-btn {
    background: none;
    border: none;
    padding: 2px 0;
    font-size: 12px;
    color: var(--primary);
    cursor: pointer;
    line-height: 1;
    transition: color .15s ease;
}
.pc-text-btn:hover { color: var(--primary-strong); text-decoration: underline; }
.pc-text-btn-danger { color: var(--danger); }
.pc-text-btn-danger:hover { color: var(--danger); }
.pc-btn-gap { display: inline-block; width: 12px; }

.product-card-body {
    display: grid;
    grid-template-columns: minmax(300px, 38%) 36px 1fr;
    gap: 8px;
    align-items: stretch;
}
.pc-block {
    border: 1px dashed var(--line);
    border-radius: 8px;
    padding: 8px 10px;
    background: var(--bg-soft);
}
/* 左右关联箭头 */
.pc-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 22px;
    line-height: 1;
    user-select: none;
}
.pc-left-item { font-size: 12px; line-height: 1.7; color: var(--text-strong); }
.pc-left-value { font-weight: 600; word-break: break-word; }
.pc-right-item {
    font-size: 12px;
    line-height: 1.6;
    padding: 6px 0;
    border-bottom: 1px dashed var(--line);
}
.pc-right-item:last-child { border-bottom: 0; }
.pc-right-item .pc-name { font-weight: 600; }
.pc-right-item .pc-meta { color: var(--text-soft); font-size: 12px; }

/* ==================== 商品映射编辑弹层 ==================== */
#product-modal { padding: 18px; }
.product-editor {
    display: grid;
    grid-template-columns: 1fr 64px 1fr;
    gap: 12px;
    align-items: start;
}
.pe-left, .pe-right {
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 16px;
    background: #fafcff;
}
/* 映射编辑弹层内所有输入框统一 12px（含左侧三方信息 + 右侧开票明细） */
.product-editor .layui-input,
.product-editor .layui-select {
    font-size: 12px;
}
.product-editor .layui-input::placeholder {
    font-size: 12px;
    color: #9aa3b2;
}
/* 左侧三方信息的字段标题（layui-form-label）统一 12px */
.product-editor .layui-form-label {
    font-size: 12px;
}
/* 左侧关联标识输入框独占一行 */
.pe-uni-key-input {
    width: 100%;
    height: 36px;
    padding: 0 10px;
    font-size: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-sizing: border-box;
}
.pe-uni-key-input::placeholder {
    font-size: 12px;
    color: #9aa3b2;
}
/* 左侧关联标识说明块 */
.uni-key-help {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px dashed var(--line);
    border-radius: 10px;
    background: #f4f7fb;
    font-size: 12px;
    line-height: 1.7;
    color: var(--text-soft);
}
.uni-key-help p { margin: 0 0 6px; }
.uni-key-help pre {
    margin: 2px 0 8px;
    /* 与普通说明文字一致，避免像输入框 */
    font-family: inherit;
    font-size: 12px;
    line-height: 1.6;
    color: #9aa3b2;
    white-space: normal;
    overflow-x: auto;
}
.uni-key-help p:last-child { margin-bottom: 0; color: #8590a6; }
/* 套餐说明醒目样式 */
.uni-key-help p.uni-key-tip-strong {
    margin-top: 10px;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(23, 77, 161, 0.06);
    color: var(--primary-strong);
    font-weight: 600;
}

/* 导入三栏映射布局 */
.mapping-3col { display: flex; flex-direction: column; gap: 6px; }
/* 字段关联表头（与 mapping-row 同网格对齐） */
.mapping-head {
    display: grid;
    grid-template-columns: 1fr 48px 1.2fr;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    margin-bottom: 8px;
    border-bottom: 2px solid var(--primary);
}
.mapping-head-left {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-strong);
}
.mapping-head-mid {
    text-align: center;
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
}
.mapping-head-right {
    font-size: 13px;
    font-weight: 800;
    color: var(--primary-strong);
}
.mapping-head-hint {
    font-weight: 400;
    font-size: 12px;
    color: var(--text-soft);
}
.mapping-row {
    display: grid;
    grid-template-columns: 1fr 48px 1.2fr;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fafcff;
}
.mapping-left { font-size: 12px; color: var(--text-strong); }
.mapping-mid {
    text-align: center;
    color: var(--primary);
    font-size: 16px;
    font-weight: 800;
}
.mapping-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.mapping-right select {
    flex: 1;
    min-width: 0;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    font-size: 12px;
    color: var(--text-strong);
    cursor: pointer;
}
.mapping-right .req-flag {
    color: var(--danger);
    font-size: 12px;
    white-space: nowrap;
}
.pe-title {
    font-size: 14px;
    font-weight: 800;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}
.pe-arrow {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding-top: 60px;
    color: var(--primary);
}
.pe-arrow-line {
    width: 2px;
    flex: 1;
    min-height: 40px;
    background: linear-gradient(180deg, var(--primary), rgba(23, 77, 161, 0.2));
}
.pe-arrow-icon {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
}
.pe-item {
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 12px;
    background: #fff;
    position: relative;
}
.pe-item-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    border: 0;
    background: transparent;
    color: var(--danger);
    font-size: 18px;
    cursor: pointer;
    line-height: 1;
    padding: 0 4px;
}
.pe-item-fields {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-top: 10px;
}
.pe-item-fields .full { grid-column: 1 / -1; }
.pe-field { display: flex; flex-direction: column; gap: 4px; }
.pe-field > span { font-size: 12px; color: var(--text-soft); }
.pe-field .layui-input { height: 32px; line-height: 32px; font-size: 12px; }
.pe-field .layui-input::placeholder { font-size: 12px; color: #9aa3b2; }
.pe-field .req::after { content: " *"; color: var(--danger); }
/* 税率输入框 + 右侧说明横排 */
.rate-input-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}
.rate-input-wrap .layui-input {
    width: 164px;
    flex: none;
}
.rate-hint {
    font-size: 12px;
    color: var(--text-soft);
    white-space: nowrap;
}

/* ==================== 表格 ==================== */
.inv-table { width: 100%; border-collapse: collapse; }
.inv-table th, .inv-table td {
    border: 1px solid var(--line);
    padding: 9px 12px;
    font-size: 12px;
    text-align: left;
    vertical-align: middle;
}
.inv-table th {
    background: #f6f8fb;
    font-weight: 700;
    white-space: nowrap;
}
.inv-table tr:hover td { background: #fafbfd; }

/* 覆盖 layui 表格边距，保证一致性 */
.layui-table { margin: 0 0 14px !important; }
.layui-table td, .layui-table th { font-size: 12px; }

/* ==================== 订单列表：发票流水号 + 商品折叠 ==================== */
.inv-muted { color: #b0b8c6; }
.order-no-cell { color: var(--primary); cursor: pointer; }
.order-no-cell:hover { text-decoration: underline; }
/* 订单号列缩窄 */
.order-no-col { width: 110px; white-space: nowrap; }
/* 发票流水号列缩窄（最长20位数字/字母） */
.order-sn-col { width: 150px; white-space: nowrap; }
/* 购买方列加宽 */
.order-buyer-col { width: 220px; }
/* 导入时间列缩窄 + 两行（日期 / 时分秒） */
.order-time-col { width: 90px; white-space: nowrap; }
.order-time-cell { display: flex; flex-direction: column; line-height: 1.5; }
.order-time-date { font-size: 12px; }
.order-time-clock { font-size: 11px; color: var(--text-soft); }
/* 购买方列：名称 + 税号（有税号时第二行小字显示） */
.order-buyer-cell { white-space: nowrap; }
.order-buyer-name { line-height: 1.5; }
.order-buyer-tax { font-size: 11px; color: var(--text-soft); line-height: 1.5; }
/* 操作列缩窄 + 按钮上下摆放 */
.order-ops-col { width: 46px; text-align: center; }
.order-ops-cell { text-align: center; }
.order-ops-cell .pc-text-btn { display: block; margin: 0 auto; }
/* 展开/收起图标 */
.expand-wrap {
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
}
.order-expand {
    display: inline-block;
    width: 14px;
    height: 18px;
    margin-right: 3px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}
.order-expand:hover { color: var(--primary-strong); }

/* 发票列表展开/收起图标（与订单列表一致：无边框，只显示 +/−） */
.invoice-expand {
    display: inline-block;
    width: 14px;
    height: 18px;
    margin-right: 3px;
    color: var(--primary);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    user-select: none;
}
.invoice-expand:hover { color: var(--primary-strong); }

/* 发票列表流水号文本可点击展开 */
.invoice-sn-cell { color: var(--primary); cursor: pointer; }
.invoice-sn-cell:hover { text-decoration: underline; }

/* 商品明细展开子区（订单号下方折叠行） */
.order-items-row td {
    background: var(--bg-soft);
    padding: 0 12px 12px;
}
.order-items-box {
    margin-top: 10px;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: #fff;
    padding: 12px;
    overflow-x: auto;
}
.order-items-loading {
    color: var(--text-soft);
    font-size: 12px;
    padding: 8px 0;
}
.order-items-table {
    width: 100%;
    border-collapse: collapse;
}
.order-items-table th, .order-items-table td {
    border: 1px solid var(--line);
    padding: 7px 10px;
    font-size: 12px;
    text-align: left;
}
.order-items-table th {
    background: #f6f8fb;
    font-weight: 700;
    white-space: nowrap;
}
.inv-tag-ok, .inv-tag-no {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    line-height: 1.6;
}
.inv-tag-ok { color: #2f9e44; background: rgba(47, 158, 68, 0.1); }
.inv-tag-no { color: #e53e3e; background: rgba(229, 62, 62, 0.1); }

/* 关联标识锁定（只读）时弱化显示 */
#pe-uni-key[readonly] {
    background: #f4f5f7;
    color: #999;
    cursor: not-allowed;
}

/* ==================== 页脚 ==================== */
.footer {
    border-top: 1px solid var(--line);
    background: #fff;
    padding: 22px 0 26px;
    margin-top: 10px;
}
.footer-inner { text-align: center; }
.footer-copy { margin: 0; color: var(--text-soft); font-size: 13px; line-height: 1.75; }
.footer-disclaimer {
    margin: 12px auto 0;
    max-width: 760px;
    text-align: left;
    color: #8a6d1a;
    background: #fdf6e3;
    border: 1px solid #f3e3b0;
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 12px;
    line-height: 1.7;
}
.footer-contact { margin-top: 12px; }
.contact-link { color: var(--text-soft); cursor: pointer; font-size: 13px; text-decoration: none; }
.contact-link:hover { color: var(--primary); }

/* ==================== 右侧固定提示块 ==================== */
.inv-fixed-tip {
    position: fixed;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    z-index: 40;
    max-width: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.inv-fixed-tip-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 8px;
    color: var(--primary);
}
.inv-fixed-tip-box {
    padding: 10px 12px;
    font-size: 13px;
    line-height: 1.7;
    text-align: center;
    color: var(--text-soft);
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(21, 35, 59, 0.06);
    backdrop-filter: blur(4px);
    -webkit-font-smoothing: antialiased;
}
.inv-fixed-tip-box span {
    display: block;
}

/* ==================== 响应式（PC优先，移动端仅等比缩小） ==================== */
@media (max-width: 768px) {
    .inv-fixed-tip { display: none; }
    .wrap { padding: 0 12px; }
    .product-card-body { grid-template-columns: 1fr; }
    .product-card-top { grid-template-columns: 1fr; gap: 4px; }
    .pc-top-col2 { display: none; }
    .pc-arrow { padding: 4px 0; }
    .inv-help-grid { grid-template-columns: 1fr; }
    .inv-help { padding: 16px; }
    .product-editor { grid-template-columns: 1fr; }
    .pe-arrow { flex-direction: row; padding-top: 0; padding: 6px 0; }
    .pe-arrow-line { width: 40px; height: 2px; min-height: 0; background: linear-gradient(90deg, var(--primary), rgba(23, 77, 161, 0.2)); }
}
