/* 劳务报酬到手倒推税前 */
.tool-card-mark.labor, .workspace-mark.labor { color: #0e7490; background: #cffafe; }

.labor-mode {
    display: inline-flex;
    gap: 4px;
    margin: 0 0 16px;
    padding: 4px;
    border: 1px solid #dbe4ee;
    border-radius: 9px;
    background: #f4f7fa;
}
.labor-mode button {
    border: 0;
    border-radius: 6px;
    padding: 9px 16px;
    background: transparent;
    color: #52606d;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}
.labor-mode button.active {
    background: #ffffff;
    color: #174b7a;
    box-shadow: 0 1px 4px rgba(23, 75, 122, .14);
}

.labor-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.labor-input-card {
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #f8fbff;
}
.labor-input-card h3 {
    margin: 0 0 6px;
    color: #1e3a8a;
    font-size: 15px;
}
.labor-input-card p {
    margin: 0 0 12px;
    color: #475569;
    font-size: 13px;
    line-height: 1.6;
}
.labor-input-card textarea {
    width: 100%;
    box-sizing: border-box;
    min-height: 150px;
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    color: #0f172a;
    font: 13px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    tab-size: 12;
    resize: vertical;
}
.labor-input-card textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.labor-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin-top: 12px;
}
.labor-actions button,
.labor-file-btn {
    min-width: 110px;
    padding: 10px 18px;
    font-size: 14px;
    text-align: center;
    box-sizing: border-box;
}
.labor-actions button:disabled { background: #9ca3af; color: #ffffff; cursor: wait; }
.labor-file-btn {
    position: relative;
    display: inline-block;
    overflow: hidden;
}
.labor-file-btn input {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}
.labor-file-btn.busy { opacity: .6; pointer-events: none; }
.labor-status {
    margin-top: 12px;
    padding: 10px 12px;
    border-radius: 6px;
    background: #eff6ff;
    color: #1e3a8a;
    font-size: 13px;
    line-height: 1.6;
}
.labor-status.success { background: #f0fdf4; color: #166534; }
.labor-status.warn { background: #fffbeb; color: #92400e; }
.labor-status.error { background: #fee2e2; color: #991b1b; }

.labor-result {
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #ffffff;
}
.labor-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.labor-summary > div {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.labor-summary > div.primary { border-color: #86efac; background: #f0fdf4; }
.labor-summary span { color: #64748b; font-size: 12px; }
.labor-summary strong { color: #0f172a; font-size: 20px; font-variant-numeric: tabular-nums; }
.labor-summary > div.primary strong { color: #14532d; }
.labor-notes {
    margin: 12px 0 0;
    padding: 10px 14px 10px 30px;
    border: 1px solid #fde68a;
    border-radius: 8px;
    background: #fffbeb;
    color: #92400e;
    font-size: 13px;
    line-height: 1.6;
}
.labor-table-wrap {
    margin-top: 12px;
    max-height: 520px;
    overflow: auto;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}
.labor-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    white-space: nowrap;
}
.labor-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 9px 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #f1f5f9;
    color: #334155;
    font-weight: 600;
    text-align: left;
}
.labor-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
    color: #1e293b;
}
.labor-table td.num,
.labor-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.labor-table td.gross { color: #14532d; font-weight: 700; }
.labor-table td.remark { white-space: normal; min-width: 220px; color: #92400e; }
.labor-table tr.labor-row-error td { background: #fef2f2; }
.labor-table tr.labor-row-error td.remark { color: #991b1b; }
.labor-table tr.labor-row-dup td { background: #fffbeb; }
.labor-table.no-id th:nth-child(3),
.labor-table.no-id td:nth-child(3) { display: none; }
.labor-download-status { color: #475569; font-size: 13px; }
.labor-download-status.error { color: #991b1b; }
.labor-download-status.success { color: #166534; }

#laborSingleResult .reverse-result-head { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.labor-rules {
    margin-top: 16px;
    padding: 12px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
    color: #475569;
    font-size: 13px;
    line-height: 1.7;
}
.labor-rules > summary {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.labor-rules ul { margin: 10px 0 0; padding-left: 20px; }

@media (max-width: 820px) {
    .labor-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
    #laborSingleResult .reverse-result-head { grid-template-columns: 1fr; }
}
