* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: -apple-system, "Microsoft YaHei", Arial, sans-serif;
    background: #f2f3f5;
    color: #303133;
    font-size: 14px;
}
a { color: #d33; text-decoration: none; }

/* ---------- 登录 ---------- */
.login-wrap {
    height: 100vh; display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #2b3040, #464d61);
}
.login-box {
    width: 340px; background: #fff; padding: 34px 30px; border-radius: 6px;
    box-shadow: 0 8px 30px rgba(0,0,0,.25);
}
.login-box h1 { font-size: 19px; text-align: center; margin-bottom: 4px; }
.login-box .sub { text-align: center; color: #909399; font-size: 12px; margin-bottom: 22px; }

/* ---------- 布局 ---------- */
.topbar {
    height: 52px; background: #2b3040; color: #fff; display: flex;
    align-items: center; padding: 0 18px; justify-content: space-between;
}
.topbar .logo { font-size: 16px; font-weight: bold; }
.topbar .logo span { color: #e6a23c; }
.topbar .right { font-size: 13px; color: #c8ccd4; }
.topbar .right a { color: #ffd04b; margin-left: 12px; }

/* 角色标签 */
.rtag {
    display: inline-block; padding: 1px 7px; border-radius: 3px; font-size: 11px;
    margin-left: 6px; vertical-align: middle;
}
.rtag.ra { background: #d33; color: #fff; }
.rtag.rs { background: #eef1f6; color: #5f6572; }
td .rtag { margin-left: 0; }

.nav { background: #fff; border-bottom: 1px solid #e4e7ed; padding: 0 18px; display: flex; }
.nav a {
    padding: 12px 18px; color: #606266; font-size: 14px; border-bottom: 2px solid transparent;
}
.nav a:hover { color: #d33; }
.nav a.on { color: #d33; border-bottom-color: #d33; font-weight: bold; }

.container { padding: 16px 18px 40px; }

/* ---------- 卡片 / 统计 ---------- */
.card { background: #fff; border-radius: 4px; padding: 16px; margin-bottom: 14px; }
.card h3 { font-size: 15px; margin-bottom: 14px; padding-left: 8px; border-left: 3px solid #d33; }

.stat-row { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.stat {
    flex: 1; min-width: 150px; background: #fff; border-radius: 4px; padding: 16px 18px;
    border-left: 4px solid #409eff;
}
.stat.g { border-left-color: #67c23a; }
.stat.o { border-left-color: #e6a23c; }
.stat.r { border-left-color: #f56c6c; }
.stat .t { color: #909399; font-size: 12px; margin-bottom: 8px; }
.stat .v { font-size: 22px; font-weight: bold; }

/* ---------- 表单 ---------- */
.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.fi { display: flex; flex-direction: column; }
.fi.full { grid-column: 1 / -1; }
label { font-size: 13px; color: #606266; margin-bottom: 6px; }
label i { color: #f56c6c; font-style: normal; }
input[type=text], input[type=password], input[type=number], input[type=date],
input[type=datetime-local], select, textarea {
    height: 34px; border: 1px solid #dcdfe6; border-radius: 4px; padding: 0 10px;
    font-size: 14px; outline: none; width: 100%; font-family: inherit;
}
textarea { height: 62px; padding: 8px 10px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: #d33; }
input[readonly] { background: #f5f7fa; color: #606266; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 5px;
    height: 36px; padding: 0 18px; border: 1px solid transparent; border-radius: 6px;
    cursor: pointer; font-size: 14px; font-family: inherit; line-height: 1;
    background: #d33; color: #fff; white-space: nowrap;
    box-shadow: 0 1px 2px rgba(0,0,0,.06);
    transition: all .15s ease;
    text-decoration: none; vertical-align: middle;
}
.btn:hover  { background: #e04747; box-shadow: 0 3px 8px rgba(221,51,51,.3); transform: translateY(-1px); }
.btn:active { transform: translateY(0); box-shadow: 0 1px 2px rgba(0,0,0,.1); }

.btn.green  { background: #52a03a; }
.btn.green:hover  { background: #61b647; box-shadow: 0 3px 8px rgba(82,160,58,.3); }
.btn.blue   { background: #3a7fd5; }
.btn.blue:hover   { background: #4b8fe3; box-shadow: 0 3px 8px rgba(58,127,213,.3); }
.btn.orange { background: #e08e28; }
.btn.orange:hover { background: #ef9f3b; box-shadow: 0 3px 8px rgba(224,142,40,.3); }

/* 次要按钮：描边风格 */
.btn.gray {
    background: #fff; color: #5f6572; border-color: #d3d7de;
}
.btn.gray:hover {
    background: #f7f8fa; color: #303133; border-color: #b8bec9;
    box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.btn.block { width: 100%; height: 40px; font-size: 15px; }
.btn.sm    { height: 28px; padding: 0 11px; font-size: 12px; border-radius: 5px; gap: 3px; }
.btn.lg    { height: 40px; padding: 0 26px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; box-shadow: none; }

/* 按钮组间距 */
.btn-bar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
td .btn.sm { margin-right: 4px; }
td .btn.sm:last-child { margin-right: 0; }

/* ---------- 表格 ---------- */
.tbl-box {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    border: 1px solid #e4e7ed;
}
table { width: 100%; border-collapse: collapse; min-width: 1100px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #ebeef5; white-space: nowrap; }
th {
    background: #f8f9fa;
    color: #606266;
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
tbody tr { transition: all .2s ease; }
tbody tr:hover {
    background: #f5f7fa;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}
td.num { font-family: Consolas, monospace; }
.money { color: #f56c6c; font-weight: 600; }
.money.g { color: #67c23a; }

/* 订单表格专用 */
.ord-tbl {
    min-width: 1000px;
    font-size: 12px;
    table-layout: fixed;
    line-height: 1.5;
}
.ord-tbl td {
    vertical-align: middle;
    padding: 8px 10px;
    text-align: center;
    color: #303133;
}
.ord-tbl th {
    padding: 10px 10px;
    text-align: center;
    background: #f8f9fa;
    border-bottom: 2px solid #e4e7ed;
}
.ord-tbl .sub {
    color: #909399;
    font-size: 11px;
    margin-top: 3px;
    display: block;
}
.ord-tbl .dim { color: #c0c4cc; }

/* 时间列优化 - 确保紧凑不换行 */
.ord-tbl td.time-cell {
    white-space: nowrap;
    padding: 6px 8px;
    line-height: 1.4;
}
.ord-tbl td.time-cell .sub {
    margin-top: 2px;
}

/* 操作列 */
.ord-tbl .act-cell {
    white-space: nowrap;
    padding: 6px 8px;
}
.ord-tbl .act-cell .btn {
    margin: 0 2px;
}

/* 表格竖线分隔 */
.ord-tbl th,
.ord-tbl td {
    border-right: 1px solid #ebeef5;
}
.ord-tbl th:last-child,
.ord-tbl td:last-child {
    border-right: none;
}

/* 可调整列宽 */
.ord-tbl th.resizable {
    position: relative;
    user-select: none;
}

.ord-tbl .resize-handle {
    position: absolute;
    top: 0;
    right: -3px;
    width: 5px;
    height: 100%;
    cursor: col-resize;
    background: transparent;
    z-index: 2;
}

.ord-tbl .resize-handle:hover,
.ord-tbl .resize-handle.resizing {
    background: rgba(64, 158, 255, 0.3);
}

/* 行内编辑 */
.ord-tbl td.editable {
    cursor: pointer;
    position: relative;
    transition: background .2s;
}

.ord-tbl td.editable:hover:not(:has(input)) {
    background: #e8f4ff;
    border-radius: 4px;
}

/* 删除旧的 ::after 伪元素编辑按钮样式，改用真实按钮 */

.ord-tbl td.editable input {
    width: 100%;
    height: 32px;
    padding: 0 10px;
    border: 2px solid #409eff;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    outline: none;
    background: #fff;
}

/* 商品名：固定行高裁切，悬浮显示完整 */
.ord-tbl .g-cell {
    min-width: 280px;
    max-width: 430px;
    padding-right: 18px;
    font-size: 13px;
    line-height: 20px;
    letter-spacing: .3px;
    color: #303133;
    text-align: center;
}
.ord-tbl .g-cell b { margin-left: 5px; white-space: nowrap; }

/* 订单号列：单行显示 */
.ord-tbl .num {
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}

/* 除商品名和订单号外的列垂直居中，视觉对齐 */
.ord-tbl td:not(.g-cell):not(.num) { vertical-align: middle; }
/* 买家/卖家：单行省略 */
.ord-tbl .ell { max-width: 112px; overflow: hidden; text-overflow: ellipsis; }
/* 操作列按钮不换行 */
.ord-tbl .act-cell { white-space: nowrap; }
.ord-tbl .act-cell .btn.sm { margin-right: 3px; }
.ord-tbl .act-cell .btn.sm:last-child { margin-right: 0; }
/* 小标签 */
.mini-tag {
    display: inline-block; background: #eaf3ff; color: #3a7fd5;
    font-size: 10px; padding: 1px 4px; border-radius: 2px; vertical-align: middle;
}
.btn.sm.danger { background: #ef4444; color: #fff; }

/* 订单信息内联表格（紧凑横向） */
.info-tbl-inline {
    width: 100%;
    border-collapse: collapse;
    table-layout: auto;
}

.info-tbl-inline td {
    padding: 6px 8px;
    border-bottom: 1px solid #f0f0f0;
    vertical-align: middle;
    overflow: visible;
    word-wrap: break-word;
}

.info-tbl-inline tr:last-child td {
    border-bottom: none;
}

.info-tbl-inline .label {
    display: inline-block;
    color: #909399;
    font-size: 12px;
    margin-right: 4px;
    white-space: nowrap;
}

.info-tbl-inline .value {
    display: inline-block;
    color: #303133;
    font-size: 13px;
    font-weight: 500;
    word-wrap: break-word;
    max-width: 100%;
}

.info-tbl-inline .value.editable {
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: background .2s;
}

.info-tbl-inline .value.editable:hover {
    background: #f5f7fa;
}

.info-tbl-inline .value.num {
    font-family: Consolas, monospace;
}

/* 订单信息网格布局（已废弃） */
.order-info-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 20px;
    background: #fafbfc;
    padding: 20px;
    border-radius: 6px;
    border: 1px solid #e4e7ed;
}

.order-info-grid .info-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.order-info-grid .info-item.full {
    grid-column: 1 / -1;
}

.order-info-grid .info-label {
    font-size: 12px;
    color: #909399;
    font-weight: normal;
}

.order-info-grid .info-value {
    font-size: 14px;
    color: #303133;
    font-weight: 500;
    min-height: 22px;
    line-height: 22px;
}

.order-info-grid .info-value.editable {
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: background .2s;
}

.order-info-grid .info-value.editable:hover {
    background: #fff;
    box-shadow: 0 0 0 1px #e4e7ed;
}

.order-info-grid .info-value.num {
    font-family: Consolas, monospace;
}

/* 响应式：窄屏2列 */
@media (max-width: 900px) {
    .order-info-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px 16px;
        padding: 16px;
    }
}

/* 详情信息表（保留用于其他页面） */
.info-tbl {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.info-tbl th {
    background: #fafbfc; padding: 7px 12px; text-align: right; color: #606266;
    font-weight: normal; border: 1px solid #e4e7ed; white-space: nowrap;
}
.info-tbl td {
    padding: 7px 12px; border: 1px solid #e4e7ed; color: #303133;
}

/* 紧凑信息表（订单详情页顶部） */
.compact-info th { padding: 6px 10px; font-size: 12px; }
.compact-info td { padding: 6px 10px; font-size: 13px; }

.tag { display: inline-block; padding: 3px 10px; border-radius: 4px; font-size: 12px; font-weight: 500; }
.tag.s0 { background: #fef5e7; color: #e6a23c; border: 1px solid #f5dab1; }
.tag.s1 { background: #f0f9eb; color: #67c23a; border: 1px solid #c2e7b0; }
.tag.s2 { background: #fef0f0; color: #f56c6c; border: 1px solid #fab6b6; }
.tag.s3 { background: #eaf3ff; color: #409eff; border: 1px solid #b3d8ff; }

.filter {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-end;
    background: #fff;
    padding: 16px 18px;
    border-radius: 6px;
    border: 1px solid #e4e7ed;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}
.filter .fi {
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.filter label {
    font-size: 12px;
    color: #606266;
    font-weight: 500;
    margin-bottom: 0;
}
.filter input,
.filter select {
    height: 36px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    padding: 0 12px;
    font-size: 13px;
    transition: all .2s;
}
.filter input:focus,
.filter select:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 2px rgba(64,158,255,0.1);
}
.filter .btn {
    height: 36px;
    padding: 0 20px;
    font-size: 13px;
}

/* 一行筛选模式：自动收缩，按钮组固定右侧 */
.filter-1line {
    gap: 10px;
    flex-wrap: nowrap;
}
.filter-1line .fi {
    flex: 1;
    min-width: 120px;
}
.filter-1line .f-acts {
    flex: 0 0 auto;
    margin-left: auto;
}
.filter-1line .acts-row {
    display: flex;
    gap: 8px;
    align-items: center;
    white-space: nowrap;
}
.filter-1line .view-sw {
    margin-left: 4px;
}
/* 窄屏放弃单行，允许换行 */
@media (max-width: 1400px) {
    .filter-1line { flex-wrap: wrap; }
    .filter-1line .f-acts { margin-left: 0; }
}

/* ========== 分页组件（电商后台风格 - 右对齐单行）========== */
.page {
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

/* 总数信息 */
.page .page-total {
    color: #666;
    font-size: 13px;
    white-space: nowrap;
}

/* 页码按钮 */
.page a,
.page span.cur,
.page span.disabled,
.page span.ellipsis {
    min-width: 30px;
    height: 30px;
    padding: 0 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid #ddd;
    border-radius: 2px;
    color: #333;
    font-size: 13px;
    background: #fff;
    text-decoration: none;
    transition: all .2s;
    white-space: nowrap;
}

.page a:hover {
    color: #409eff;
    border-color: #409eff;
}

/* 当前页：蓝色边框高亮 */
.page span.cur {
    color: #409eff;
    border-color: #409eff;
    background: #fff;
    font-weight: 500;
}

/* 禁用状态 */
.page span.disabled {
    color: #c0c4cc;
    background: #f5f5f5;
    border-color: #e4e4e4;
    cursor: not-allowed;
}

/* 省略号 */
.page span.ellipsis {
    border: none;
    background: transparent;
    color: #999;
    cursor: default;
}

/* 每页条数选择器 */
.page select {
    flex: 0 0 auto;
    min-width: 90px;
    max-width: 100px;
    height: 30px;
    padding: 0 24px 0 10px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
    color: #333;
    background: #fff url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23999" d="M2 4l4 4 4-4z"/></svg>') no-repeat right 8px center;
    background-size: 12px;
    appearance: none;
    cursor: pointer;
    outline: none;
    transition: border-color .2s;
}

.page select:hover {
    border-color: #409eff;
}

/* 跳转区 */
.page .page-jump {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #666;
    white-space: nowrap;
}

.page .jump-input {
    width: 50px;
    height: 30px;
    padding: 0 8px;
    border: 1px solid #ddd;
    border-radius: 2px;
    font-size: 13px;
    text-align: center;
    outline: none;
    transition: border-color .2s;
}

.page .jump-input:focus {
    border-color: #409eff;
}

/* 窄屏适配 */
@media (max-width: 768px) {
    .page {
        padding: 12px 14px;
        justify-content: center;
    }

    .page .page-total {
        width: 100%;
        text-align: center;
    }
}

/* ========== 订单详情弹窗 ========== */
.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.2s;
}

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

.modal-content {
    position: fixed;
    top: 5vh;
    left: 50%;
    transform: translateX(-50%);
    width: min(70vw, 1200px);
    min-width: min(800px, 90vw);
    height: auto;
    max-height: 90vh;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    flex-direction: column;
    animation: fadeIn 0.2s;
}

@media (max-width: 900px) {
    .modal-content {
        width: 90vw;
        min-width: 0;
    }
}

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

/* 调整大小手柄 */
.modal-resize-handle {
    position: absolute;
    right: 0;
    bottom: 0;
    width: 20px;
    height: 20px;
    cursor: nwse-resize;
    z-index: 10;
}

.modal-resize-handle::after {
    content: '';
    position: absolute;
    right: 3px;
    bottom: 3px;
    width: 12px;
    height: 12px;
    border-right: 2px solid #d3d7de;
    border-bottom: 2px solid #d3d7de;
}

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

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    color: #303133;
    font-weight: 500;
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    font-size: 28px;
    line-height: 28px;
    color: #909399;
    cursor: pointer;
    transition: color 0.2s;
    padding: 0;
}

.modal-close:hover {
    color: #303133;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1;
    min-height: 0;
}

/* 弹窗内的卡片去掉外边距 */
.modal-body .card {
    margin-bottom: 16px;
}

.modal-body .card:last-child {
    margin-bottom: 0;
}

/* 窄屏适配 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 5% auto;
        max-height: 85vh;
    }

    .modal-header {
        padding: 16px 18px;
    }

    .modal-body {
        padding: 18px;
    }
}

.msg { padding: 9px 12px; border-radius: 4px; margin-bottom: 12px; font-size: 13px; }
.msg.err { background: #fef0f0; color: #f56c6c; }
.msg.ok  { background: #f0f9eb; color: #67c23a; }
.empty { text-align: center; padding: 50px 0; color: #909399; }

.vimg { width: 34px; height: 34px; object-fit: cover; border-radius: 3px; cursor: pointer; border: 1px solid #eee; }
.mask {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.75); z-index: 99999;
    align-items: center; justify-content: center;
}
.mask img { max-width: 88%; max-height: 88%; }

@media (max-width: 768px) {
    .nav { overflow-x: auto; }
    .nav a { padding: 12px 12px; white-space: nowrap; }
    .container { padding: 12px 10px 30px; }
}

/* ---------- 粘贴截图区 ---------- */
.paste-zone {
    border: 2px dashed #d3d7de; border-radius: 6px; background: #fafbfc;
    padding: 16px; text-align: center; cursor: pointer; transition: all .18s;
    min-height: 92px; display: flex; flex-direction: column;
    align-items: center; justify-content: center; gap: 6px;
}
.paste-zone:hover, .paste-zone.hot { border-color: #d33; background: #fff5f5; }
.paste-zone.has { border-style: solid; border-color: #52a03a; background: #f6fbf4; padding: 10px; }
.paste-zone .pz-tip { color: #909399; font-size: 13px; }
.paste-zone .pz-tip b { color: #d33; }
.paste-zone input[type=file] { display: none; }

/* 多图缩略图列表 */
.vlist { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; width: 100%; }
.vitem {
    position: relative; width: 96px; border: 1px solid #e4e7ed; border-radius: 5px;
    overflow: hidden; background: #fff;
}
.vitem img {
    width: 100%; height: 76px; object-fit: cover; display: block; cursor: zoom-in;
}
.vitem .vmeta {
    font-size: 11px; color: #909399; text-align: center; padding: 2px 0;
    background: #fafafa; border-top: 1px solid #f0f0f0;
}
.vitem .vdel {
    position: absolute; right: 2px; top: 2px; width: 18px; height: 18px; line-height: 16px;
    text-align: center; background: rgba(0,0,0,.55); color: #fff; border-radius: 50%;
    font-size: 14px; text-decoration: none;
}
.vitem .vdel:hover { background: #f56c6c; }

/* 列表页凭证角标 */
.vbadge { position: relative; display: inline-block; }
.vbadge b {
    position: absolute; right: -6px; top: -5px; background: #d33; color: #fff;
    font-size: 10px; border-radius: 8px; padding: 0 4px; line-height: 14px; min-width: 14px;
    text-align: center;
}

/* ---------- 备注时间线 ---------- */
.notes { margin: 0; padding: 0; list-style: none; }
.notes li {
    position: relative; padding: 0 0 12px 16px; border-left: 2px solid #ebeef5;
}
.notes li:last-child { border-left-color: transparent; padding-bottom: 0; }
.notes li:before {
    content: ''; position: absolute; left: -5px; top: 4px; width: 8px; height: 8px;
    border-radius: 50%; background: #d33;
}
.notes li:not(:first-child):before { background: #c0c4cc; }
.notes .n-meta { font-size: 12px; color: #909399; margin-bottom: 3px; }
.notes .n-txt  { font-size: 13px; color: #303133; white-space: pre-wrap; word-break: break-all; }
.notes-empty { color: #c0c4cc; font-size: 13px; }

/* 三级分类联动：始终并排一行 */
.cascade { display: flex; gap: 8px; align-items: center; }
.cascade > select { flex: 1 1 0; min-width: 0; }
/* 手机上也不换行，靠横向压缩 */
@media (max-width: 620px) {
    .cascade { gap: 6px; }
    .cascade > select { font-size: 13px; padding: 0 6px; }
}

/* 只读信息表 */
.info-tbl th { background: #fafafa; width: 110px; color: #606266; font-weight: normal; }
.info-tbl td { color: #303133; }
.info-tbl .editable { transition: background 0.2s; }
.info-tbl .editable:hover { background: #f5f7fa; }

/* 勾选框 / 单选 */
input[type=checkbox], input[type=radio] {
    width: 15px; height: 15px; cursor: pointer; accent-color: #d33; vertical-align: middle;
}
tbody tr:has(.ckRow:checked), tbody tr:has(.ck:checked) { background: #fff8f8; }

/* ============ 订单卡片（已废弃）============ */
/* 卡片视图已移除，保留注释以便将来参考 */

/* ============ 行内编辑按钮悬停显示 ============ */
.ord-tbl .edit-btn {
    position: absolute;
    right: 4px;
    top: 50%;
    transform: translateY(-50%);
    background: #409eff;
    color: #fff;
    border: none;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    font-size: 12px;
    cursor: pointer;
    opacity: 0 !important;
    transition: opacity 0.2s, background 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.ord-tbl .edit-btn:hover {
    background: #66b1ff;
}

.ord-tbl td:hover .edit-btn {
    opacity: 1 !important;
}

.ord-tbl .edit-content {
    display: inline-block;
    width: 100%;
    min-height: 20px;
}

/* ============ 单元格单击复制 ============ */
.ord-tbl td.copyable {
    cursor: pointer;
    position: relative;
}

.ord-tbl td.copyable:hover {
    background: #f5f7fa;
}

.ord-tbl td.copyable:active {
    background: #e8f4ff;
}

/* ========== 移动端响应式样式 ========== */
@media screen and (max-width: 768px) {
    /* 登录页 */
    .login-box {
        width: 90%;
        max-width: 340px;
        padding: 24px 20px;
    }

    /* 顶栏 */
    .topbar {
        padding: 10px 12px;
        flex-wrap: wrap;
    }
    .topbar .logo {
        font-size: 16px;
    }
    .topbar .right {
        font-size: 12px;
    }
    .topbar .right a {
        margin-left: 8px;
    }

    /* 导航栏 */
    .nav {
        padding: 0 8px;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
    }
    .nav a {
        padding: 10px 12px;
        font-size: 13px;
    }

    /* 容器 */
    .container {
        padding: 12px 8px 30px;
    }

    /* 卡片 */
    .card {
        padding: 12px;
        margin-bottom: 10px;
    }

    /* 筛选表单 */
    .filter {
        flex-direction: column;
        gap: 10px;
    }
    .filter .fi {
        flex: 1 !important;
        min-width: 100%;
    }
    .filter .f-acts {
        min-width: 100%;
    }
    .filter .acts-row {
        flex-wrap: wrap;
        gap: 8px;
    }
    .filter .acts-row .btn,
    .filter .acts-row a {
        flex: 1;
        min-width: calc(50% - 4px);
        text-align: center;
    }

    /* 表格 */
    .tbl-box {
        margin: 0;
        border-radius: 0;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .ord-tbl {
        font-size: 11px;
    }
    .ord-tbl th,
    .ord-tbl td {
        padding: 6px 4px;
        white-space: nowrap;
        font-size: 11px;
    }
    .ord-tbl .btn.sm {
        padding: 3px 6px;
        font-size: 10px;
    }

    /* 分页 */
    .page {
        font-size: 12px;
        flex-wrap: wrap;
        gap: 4px;
    }
    .page a,
    .page span {
        min-width: 30px;
        height: 30px;
        padding: 6px;
    }

    /* 表单 */
    form .fi {
        margin-bottom: 12px;
    }
    form label {
        font-size: 13px;
        margin-bottom: 4px;
    }
    form input[type="text"],
    form input[type="number"],
    form input[type="date"],
    form input[type="password"],
    form select,
    form textarea {
        font-size: 14px;
        padding: 8px 10px;
    }

    /* 按钮 */
    .btn {
        padding: 8px 14px;
        font-size: 13px;
    }

    /* 弹窗 */
    .modal {
        padding: 10px;
    }
    .modal-box {
        width: 95%;
        max-width: 500px;
        max-height: 90vh;
    }
    .modal-header {
        padding: 12px 15px;
    }
    .modal-body {
        padding: 15px;
    }
    .modal-footer {
        padding: 10px 15px;
    }

    /* 统计卡片 */
    .stat-row {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    .st-it {
        padding: 12px;
    }

    /* 详情页 */
    .detail-container {
        padding: 12px;
    }
    .section {
        padding: 12px;
        margin-bottom: 12px;
    }
    .field-grid {
        grid-template-columns: 1fr;
    }

    /* 选项管理 */
    .opt-section {
        padding: 12px;
    }
    .opt-items {
        gap: 8px;
    }
}

/* 小屏幕优化 */
@media screen and (max-width: 480px) {
    .topbar {
        font-size: 12px;
    }

    .stat-row {
        grid-template-columns: 1fr;
    }

    .filter .acts-row .btn,
    .filter .acts-row a {
        min-width: 100%;
    }
}
