/* =============================================
   无痕补单页面样式
   ============================================= */

.wuhen-page {
    padding-top: 40px;
    padding-bottom: 60px;
}

/* 顶部说明 */
.wuhen-header {
    margin-bottom: 28px;
}

.wuhen-header h1 {
    font-size: 22px;
    font-weight: 700;
    color: var(--text);
    margin: 0 0 6px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.wuhen-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

/* 次数提示条 */
.wuhen-usage-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    font-size: 13px;
    color: var(--primary);
    margin-bottom: 20px;
}

.wuhen-usage-bar i { font-size: 14px; }
.wuhen-usage-bar .wuhen-usage-num { font-weight: 700; }
.wuhen-usage-bar.over-limit { background: #fef2f2; border-color: #fecaca; color: #dc2626; }

/* 表单卡片 */
.wuhen-form-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
}

/* 商品列表表头 */
.wuhen-table-head {
    display: grid;
    grid-template-columns: 36px 1fr 1fr 80px 36px;
    gap: 8px;
    align-items: center;
    padding: 0 4px 10px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 12px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: .04em;
}

/* 商品行 */
.wuhen-row {
    display: grid;
    grid-template-columns: 36px 1fr 1fr 80px 36px;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.wuhen-row-num {
    font-size: 13px;
    color: var(--text-muted);
    text-align: center;
    font-weight: 500;
}

.wuhen-input {
    width: 100%;
    height: 38px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    padding: 0 10px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    outline: none;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.wuhen-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37,99,235,.08);
}

.wuhen-input-count {
    width: 100%;
    height: 38px;
    border: 1.5px solid var(--border);
    border-radius: 7px;
    padding: 0 8px;
    font-size: 14px;
    color: var(--text);
    background: #fff;
    outline: none;
    font-family: inherit;
    text-align: center;
    transition: border-color .15s;
}

.wuhen-input-count:focus { border-color: var(--primary); }

.wuhen-del-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: none;
    color: #9ca3af;
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: color .15s, background .15s;
    margin: 0 auto;
}

.wuhen-del-btn:hover { color: #ef4444; background: #fef2f2; }
.wuhen-del-btn:disabled { opacity: .3; cursor: default; }

/* 添加按钮 */
.wuhen-add-row {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px dashed var(--border);
}

.wuhen-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 16px;
    background: none;
    border: 1.5px dashed var(--border);
    border-radius: 7px;
    font-size: 13px;
    color: var(--text-muted);
    cursor: pointer;
    transition: border-color .15s, color .15s;
    font-family: inherit;
}

.wuhen-add-btn:hover { border-color: var(--primary); color: var(--primary); }
.wuhen-add-btn:disabled { opacity: .4; cursor: not-allowed; }

/* 底部操作 */
.wuhen-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 20px;
    flex-wrap: wrap;
}

.wuhen-count-tip {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: auto;
}

/* 结果区 — 复用 tool.css */

/* ===== 响应式 ===== */
@media (max-width: 768px) {
    .wuhen-page { padding: 20px 0 40px; }
    .wuhen-header h1 { font-size: 18px; }
    .wuhen-form-card { padding: 16px; }

    .wuhen-table-head { display: none; }

    /* 移动端：每行改为两行布局 */
    .wuhen-row {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
        row-gap: 6px;
        padding: 10px 0;
        border-bottom: 1px solid var(--border);
        margin-bottom: 0;
    }

    .wuhen-row-num { display: none; }

    /* 删除按钮右对齐 */
    .wuhen-del-btn { grid-column: 2; justify-self: end; }
    .wuhen-input-count { max-width: 80px; }

    .wuhen-count-tip { margin-left: 0; width: 100%; }
}

@media (max-width: 480px) {
    .wuhen-footer { flex-direction: column; align-items: stretch; }
    .wuhen-footer .tool-generate-btn { width: 100%; justify-content: center; }
}
