body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
    margin: 0;
    background: #f5f6f8;
    color: #1f2937;
}

/* ==================== 发票智能归档 ==================== */
.invoice-sorter-hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 28px;
    padding: 28px 30px;
    border: 1px solid #bfdbfe;
    border-radius: 20px;
    background:
        radial-gradient(circle at 88% 18%, rgba(255, 255, 255, .9), transparent 28%),
        linear-gradient(135deg, #eff6ff 0%, #f8fafc 62%, #ecfeff 100%);
    box-shadow: 0 14px 36px rgba(30, 64, 175, .08);
}
.invoice-sorter-eyebrow {
    display: inline-block;
    margin-bottom: 7px;
    color: #1d4ed8;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .08em;
}
.invoice-sorter-hero h2 {
    margin: 0;
    color: #0f172a;
    font-size: 23px;
    line-height: 1.35;
}
.invoice-sorter-hero p {
    max-width: 710px;
    margin: 9px 0 0;
    color: #475569;
    font-size: 14px;
    line-height: 1.8;
}
.invoice-sorter-local {
    flex: 0 0 auto;
    min-width: 154px;
    padding: 13px 16px;
    border: 1px solid #a7f3d0;
    border-radius: 14px;
    color: #047857;
    background: rgba(236, 253, 245, .9);
    font-size: 12px;
    line-height: 1.55;
    text-align: center;
}
.invoice-sorter-local b { font-size: 14px; }
.invoice-sorter-flow {
    display: grid;
    grid-template-columns: 1fr auto 1fr auto 1.35fr auto .8fr;
    align-items: center;
    gap: 10px;
    margin: 16px 0;
}
.invoice-sorter-flow span {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 8px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    color: #334155;
    background: #fff;
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}
.invoice-sorter-flow span b {
    display: inline-grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    background: #2563eb;
    font-size: 12px;
}
.invoice-sorter-flow i {
    color: #94a3b8;
    font-style: normal;
}
.invoice-sorter-service {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    padding: 11px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #64748b;
    background: #f8fafc;
    font-size: 13px;
}
.invoice-sorter-service strong { color: inherit; }
.invoice-sorter-service.ready {
    border-color: #bbf7d0;
    color: #166534;
    background: #f0fdf4;
}
.invoice-sorter-service.error {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}
.invoice-sorter-form {
    padding: 18px;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #fff;
}
.invoice-sorter-dropzone {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 18px;
    min-height: 150px;
    padding: 24px;
    border: 2px dashed #93c5fd;
    border-radius: 16px;
    outline: 0;
    background: #f8fbff;
    cursor: pointer;
    transition: border-color .15s ease, background .15s ease, transform .15s ease;
}
.invoice-sorter-dropzone:hover,
.invoice-sorter-dropzone:focus,
.invoice-sorter-dropzone.dragging {
    border-color: #2563eb;
    background: #eff6ff;
    transform: translateY(-1px);
}
.invoice-sorter-hidden-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}
.invoice-sorter-drop-mark {
    display: grid;
    place-items: center;
    width: 62px;
    height: 62px;
    border-radius: 17px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 15px;
    font-weight: 900;
    letter-spacing: .04em;
}
.invoice-sorter-dropzone strong {
    display: block;
    color: #0f172a;
    font-size: 16px;
    line-height: 1.5;
}
.invoice-sorter-dropzone p {
    margin: 6px 0 0;
    color: #64748b;
    font-size: 13px;
}
.invoice-sorter-pickers {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.invoice-sorter-selected {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    align-items: center;
    gap: 6px 14px;
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 12px;
    color: #475569;
    background: #f8fafc;
    font-size: 13px;
}
.invoice-sorter-selected strong { color: #0f172a; }
.invoice-sorter-selected small {
    overflow: hidden;
    color: #64748b;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.invoice-sorter-selected.invalid {
    color: #991b1b;
    background: #fef2f2;
}
.invoice-sorter-selected em {
    grid-column: 1 / -1;
    color: #b91c1c;
    font-style: normal;
}
.invoice-sorter-submit-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
}
.invoice-sorter-submit-row > span {
    color: #64748b;
    font-size: 12px;
    line-height: 1.65;
}
.invoice-sorter-submit-row button { flex: 0 0 auto; min-width: 160px; }
.invoice-sorter-progress {
    margin-top: 14px;
    padding: 14px 16px;
    border: 1px solid #bfdbfe;
    border-radius: 14px;
    color: #1e40af;
    background: #eff6ff;
}
.invoice-sorter-progress > div {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 9px;
    font-size: 13px;
}
.invoice-sorter-progress progress { width: 100%; height: 9px; }
.invoice-sorter-progress.error {
    border-color: #fecaca;
    color: #b91c1c;
    background: #fef2f2;
}
.invoice-sorter-review {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid #dbe4f0;
    border-radius: 18px;
    background: #fff;
}
.invoice-sorter-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}
.invoice-sorter-review-head span {
    color: #2563eb;
    font-size: 12px;
    font-weight: 800;
}
.invoice-sorter-review-head h3 {
    margin: 3px 0 0;
    color: #0f172a;
    font-size: 19px;
}
.invoice-sorter-summary {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}
.invoice-sorter-summary > div {
    padding: 14px;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
}
.invoice-sorter-summary > div:last-child { border-right: 0; }
.invoice-sorter-summary > div.warning { background: #fffbeb; }
.invoice-sorter-summary span,
.invoice-sorter-summary small {
    display: block;
    color: #64748b;
    font-size: 11px;
}
.invoice-sorter-summary strong {
    display: block;
    margin: 4px 0 2px;
    color: #0f172a;
    font-size: 24px;
}
.invoice-sorter-summary .warning strong { color: #b45309; }
.invoice-sorter-purchasers {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
    color: #475569;
    font-size: 12px;
}
.invoice-sorter-purchasers b {
    padding: 7px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1e3a8a;
    background: #eff6ff;
    font-size: 12px;
}
.invoice-sorter-purchasers em {
    margin-left: 4px;
    color: #64748b;
    font-style: normal;
    font-weight: 600;
}
.invoice-sorter-review-notice {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    padding: 11px 13px;
    border-radius: 12px;
    font-size: 12px;
}
.invoice-sorter-review-notice.warning {
    color: #92400e;
    background: #fffbeb;
}
.invoice-sorter-review-notice.ready {
    color: #166534;
    background: #f0fdf4;
}
.invoice-sorter-table-wrap {
    overflow: auto;
    max-height: 660px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
}
.invoice-sorter-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 12px;
}
.invoice-sorter-table th {
    position: sticky;
    top: 0;
    z-index: 2;
    padding: 11px 12px;
    border-bottom: 1px solid #cbd5e1;
    color: #334155;
    background: #f1f5f9;
    text-align: left;
    white-space: nowrap;
}
.invoice-sorter-table td {
    min-width: 150px;
    padding: 11px 12px;
    border-bottom: 1px solid #eef2f7;
    color: #475569;
    vertical-align: top;
}
.invoice-sorter-table tr:last-child td { border-bottom: 0; }
.invoice-sorter-table tr.needs-review td { background: #fffdf2; }
.invoice-sorter-table td:first-child { width: 250px; }
.invoice-sorter-table td:nth-child(2) { width: 270px; }
.invoice-sorter-table td:last-child { min-width: 260px; }
.invoice-sorter-table td > strong,
.invoice-sorter-table td > small,
.invoice-sorter-table td > em,
.invoice-sorter-table td > span {
    display: block;
}
.invoice-sorter-table td > strong {
    overflow-wrap: anywhere;
    color: #0f172a;
}
.invoice-sorter-table td > small {
    margin-top: 4px;
    overflow: hidden;
    max-width: 290px;
    color: #64748b;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.invoice-sorter-table td > em {
    margin-top: 5px;
    color: #1d4ed8;
    font-style: normal;
}
.invoice-sorter-table input,
.invoice-sorter-table select {
    width: 100%;
    min-height: 38px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    color: #0f172a;
    background: #fff;
    font: inherit;
}
.invoice-sorter-table input:focus,
.invoice-sorter-table select:focus {
    border-color: #2563eb;
    outline: 3px solid rgba(37, 99, 235, .12);
}
.invoice-sorter-warning {
    display: block;
    margin-top: 7px;
    padding: 6px 8px;
    border-radius: 7px;
    color: #92400e !important;
    background: #fef3c7;
    font-size: 11px;
    line-height: 1.55;
}
.invoice-sorter-generate-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 14px;
}
.invoice-sorter-generate-row span {
    color: #64748b;
    font-size: 12px;
}
.invoice-sorter-generate-row button { min-width: 170px; }
.invoice-sorter-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 22px;
    margin-top: 18px;
    padding: 20px;
    border: 1px solid #bbf7d0;
    border-radius: 16px;
    background: #f0fdf4;
}
.invoice-sorter-result > div:last-child {
    display: flex;
    gap: 9px;
}
.invoice-sorter-result span {
    color: #15803d;
    font-size: 12px;
    font-weight: 800;
}
.invoice-sorter-result h2 {
    margin: 3px 0 5px;
    color: #14532d;
    font-size: 20px;
}
.invoice-sorter-result p {
    margin: 0;
    color: #3f6212;
    font-size: 12px;
    line-height: 1.65;
}

.reimbursement-summary-hero {
    background:
        radial-gradient(circle at 85% 10%, rgba(16, 185, 129, .15), transparent 34%),
        linear-gradient(135deg, #f0fdf4, #eff6ff);
}
.reimbursement-summary-rules {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin: 14px 0;
}
.reimbursement-summary-rules > div {
    padding: 13px 14px;
    border: 1px solid #dbe7e1;
    border-radius: 12px;
    background: #fbfefc;
}
.reimbursement-summary-rules b,
.reimbursement-summary-rules span {
    display: block;
}
.reimbursement-summary-rules b {
    color: #166534;
    font-size: 13px;
}
.reimbursement-summary-rules span {
    margin-top: 4px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.55;
}
.reimbursement-summary-drop-mark {
    color: #166534;
    background: #dcfce7;
}
.reimbursement-summary-stats {
    grid-template-columns: repeat(6, minmax(0, 1fr));
}
.reimbursement-summary-stats strong {
    font-size: 20px;
}
.reimbursement-company-wrap {
    overflow: hidden;
    margin: 12px 0;
    border: 1px solid #bbf7d0;
    border-radius: 13px;
}
.reimbursement-company-table {
    width: 100%;
    border-collapse: collapse;
}
.reimbursement-company-table th {
    padding: 10px 13px;
    color: #166534;
    background: #f0fdf4;
    font-size: 11px;
    text-align: left;
}
.reimbursement-company-table th:nth-child(2),
.reimbursement-company-table td:nth-child(2) {
    width: 120px;
    text-align: center;
}
.reimbursement-company-table th:last-child,
.reimbursement-company-table td:last-child {
    width: 190px;
    text-align: right;
}
.reimbursement-company-table td {
    padding: 11px 13px;
    border-top: 1px solid #dcfce7;
    color: #334155;
    font-size: 13px;
}
.reimbursement-company-table td b {
    color: #166534;
    font-size: 17px;
}
.reimbursement-company-empty {
    color: #94a3b8 !important;
    text-align: center !important;
}
.reimbursement-summary-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    table-layout: fixed;
}
.reimbursement-summary-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    padding: 10px 9px;
    border-bottom: 1px solid #dbe4f0;
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
    text-align: left;
}
.reimbursement-summary-table td {
    padding: 11px 9px;
    border-bottom: 1px solid #edf1f5;
    color: #334155;
    font-size: 12px;
    vertical-align: top;
}
.reimbursement-summary-table tr:last-child td { border-bottom: 0; }
.reimbursement-summary-table tr.needs-review td { background: #fffdf2; }
.reimbursement-summary-table th:first-child,
.reimbursement-summary-table td:first-child { width: 58px; text-align: center; }
.reimbursement-summary-table th:nth-child(2),
.reimbursement-summary-table td:nth-child(2) { width: 280px; }
.reimbursement-summary-table th:nth-child(3),
.reimbursement-summary-table td:nth-child(3) { width: 260px; }
.reimbursement-summary-table th:nth-child(4),
.reimbursement-summary-table td:nth-child(4) { width: 150px; }
.reimbursement-summary-table th:last-child,
.reimbursement-summary-table td:last-child { min-width: 290px; }
.reimbursement-summary-table td > strong,
.reimbursement-summary-table td > small,
.reimbursement-summary-table td > em,
.reimbursement-summary-table td > span {
    display: block;
}
.reimbursement-summary-table td > strong {
    color: #0f172a;
    word-break: break-word;
}
.reimbursement-summary-table td > small {
    margin-top: 5px;
    color: #64748b;
    line-height: 1.55;
}
.reimbursement-summary-table td > em {
    margin-top: 5px;
    color: #2563eb;
    font-size: 11px;
    font-style: normal;
}
.reimbursement-summary-table input[type="text"],
.reimbursement-summary-table input[type="number"] {
    box-sizing: border-box;
    width: 100%;
    padding: 8px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    color: #0f172a;
    background: #fff;
    font: inherit;
}
.reimbursement-summary-table input:focus {
    border-color: #60a5fa;
    outline: 3px solid rgba(59, 130, 246, .12);
}
.reimbursement-summary-check input {
    width: 20px;
    height: 20px;
    accent-color: #16a34a;
}

@media (max-width: 980px) {
    .invoice-sorter-hero { align-items: flex-start; }
    .invoice-sorter-flow {
        grid-template-columns: 1fr 1fr;
    }
    .invoice-sorter-flow i { display: none; }
    .invoice-sorter-dropzone {
        grid-template-columns: auto 1fr;
    }
    .invoice-sorter-pickers {
        grid-column: 1 / -1;
        flex-direction: row;
    }
    .invoice-sorter-summary { grid-template-columns: repeat(3, 1fr); }
    .invoice-sorter-summary > div { border-bottom: 1px solid #e2e8f0; }
    .reimbursement-summary-rules { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reimbursement-summary-stats { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 640px) {
    .invoice-sorter-hero,
    .invoice-sorter-submit-row,
    .invoice-sorter-review-head,
    .invoice-sorter-generate-row,
    .invoice-sorter-result,
    .invoice-sorter-review-notice {
        align-items: stretch;
        flex-direction: column;
    }
    .invoice-sorter-hero { padding: 20px 17px; }
    .invoice-sorter-hero h2 { font-size: 19px; }
    .invoice-sorter-local { align-self: flex-start; }
    .invoice-sorter-flow { grid-template-columns: 1fr; }
    .invoice-sorter-dropzone {
        grid-template-columns: 1fr;
        padding: 18px;
        text-align: center;
    }
    .invoice-sorter-drop-mark { margin: 0 auto; }
    .invoice-sorter-pickers { grid-column: 1; flex-direction: column; }
    .invoice-sorter-pickers button,
    .invoice-sorter-submit-row button,
    .invoice-sorter-review-head button,
    .invoice-sorter-generate-row button { width: 100%; }
    .invoice-sorter-selected { grid-template-columns: 1fr; }
    .invoice-sorter-summary { grid-template-columns: 1fr; }
    .invoice-sorter-summary > div {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }
    .invoice-sorter-result > div:last-child { flex-direction: column; }
    .invoice-sorter-result .btn-primary,
    .invoice-sorter-result .btn-secondary { width: 100%; text-align: center; }
    .reimbursement-summary-rules { grid-template-columns: 1fr; }
    .reimbursement-summary-stats { grid-template-columns: 1fr; }
}

/* 登录页 */
.login-box {
    max-width: 360px;
    margin: 100px auto;
    padding: 32px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}
.login-box h1 { margin: 0 0 8px; font-size: 20px; }
.login-box .subtitle { margin: 0 0 24px; color: #6b7280; font-size: 14px; }
.login-box input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.login-box .remember-login {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px;
    color: #374151;
    font-size: 14px;
    cursor: pointer;
}
.login-box .remember-login input {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin: 0;
    padding: 0;
    accent-color: #2563eb;
}
.login-box .remember-login small { color: #9ca3af; font-size: 12px; }
.login-box button {
    width: 100%;
    padding: 10px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.login-box button:hover { background: #1d4ed8; }
.login-box .error { color: #dc2626; font-size: 13px; min-height: 18px; }
.login-box .hint { color: #9ca3af; font-size: 12px; text-align: center; margin-top: 16px; }

/* 主页 */
.topbar {
    background: #1f2937;
    color: white;
    padding: 12px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}
.topbar a { color: #60a5fa; text-decoration: none; }
.main {
    max-width: 800px;
    margin: 32px auto;
    padding: 24px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
.main.foreign-mode { max-width: 1320px; }
.main h2 { margin-top: 0; font-size: 18px; }
.hint { color: #6b7280; font-size: 13px; margin-bottom: 20px; }

.row { margin-bottom: 12px; }
.row label { display: inline-block; width: 100px; font-size: 14px; }
.row select, .row input[type=file] {
    padding: 6px 10px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
}
button[type=submit] {
    margin-top: 8px;
    padding: 10px 24px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
button[type=submit]:disabled { background: #9ca3af; }

/* 状态 + 日志 */
.status {
    margin-top: 24px;
    padding: 12px;
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
}
.status.success { background: #d1fae5; color: #065f46; }
.status.error { background: #fee2e2; color: #991b1b; }
.logbox {
    margin-top: 12px;
    padding: 12px;
    background: #1f2937;
    color: #d1d5db;
    border-radius: 4px;
    font-family: monospace;
    font-size: 12px;
    max-height: 300px;
    overflow-y: auto;
    white-space: pre-wrap;
}
.logbox div { margin-bottom: 2px; }
.log-info { color: #d1d5db; }
.log-ok   { color: #34d399; }
.log-warn { color: #fbbf24; }
.log-err  { color: #f87171; }

.result {
    margin-top: 16px;
    padding: 16px;
    background: #f0fdf4;
    border-radius: 4px;
}
.result h3 { margin-top: 0; }
.result a {
    display: inline-block;
    color: #2563eb;
    text-decoration: none;
    padding: 4px 0;
}
.result a:hover { text-decoration: underline; }
.result a.tax-burden-action {
    color: #7c3aed;
    font-weight: 600;
}

.hidden { display: none !important; }

/* 任务列表 */
.recent-tasks { font-size: 13px; }
.task-row {
    display: grid;
    /* 时间 / 季度 / 客户名 / 状态 / 计数 / 详情 */
    grid-template-columns: 160px 60px 1fr 80px 160px 80px;
    gap: 12px;
    padding: 8px 0;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}
.task-row .client-cell {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #1f2937;
    font-weight: 500;
}
.task-row:last-child { border-bottom: none; }
.task-row a { color: #2563eb; text-decoration: none; font-size: 13px; }
.task-row a:hover { text-decoration: underline; }
.badge { padding: 2px 8px; border-radius: 4px; font-size: 12px; }
.badge-ok { background: #d1fae5; color: #065f46; }
.badge-err { background: #fee2e2; color: #991b1b; }
.badge-info { background: #fef3c7; color: #92400e; }

/* 改密对话框 */
.modal {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex; align-items: center; justify-content: center;
    z-index: 1000;
}
.modal-box {
    background: white;
    padding: 32px;
    border-radius: 8px;
    width: 360px;
}
.modal-box h2 { margin-top: 0; font-size: 18px; }
.modal-box input {
    display: block;
    width: 100%;
    padding: 10px 12px;
    margin-bottom: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}
.modal-box button {
    width: 100%;
    padding: 10px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
}
.modal-box .error { color: #dc2626; font-size: 13px; min-height: 18px; }

/* 管理后台 */
.admin-tabs {
    background: white;
    padding: 0 24px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    gap: 0;
}
.admin-tabs .tab {
    padding: 12px 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    border-bottom: 2px solid transparent;
}
.admin-tabs .tab.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
}
.admin-content {
    max-width: 1200px;
    margin: 24px auto;
    padding: 0 24px;
}
.tab-panel { background: white; padding: 24px; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.04); }
.actions { margin-bottom: 16px; }
.actions button { padding: 8px 16px; background: #2563eb; color: white; border: none; border-radius: 4px; cursor: pointer; }

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.data-table th {
    text-align: left;
    padding: 8px 12px;
    background: #f9fafb;
    color: #6b7280;
    font-weight: 600;
    border-bottom: 1px solid #e5e7eb;
}
.data-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #f3f4f6;
}
.data-table tr:hover td { background: #f9fafb; }
.data-table a { color: #2563eb; text-decoration: none; }

/* 分配管理 */
.mapping-layout { display: grid; grid-template-columns: 280px 1fr; gap: 24px; }
.mapping-left ul { list-style: none; padding: 0; }
.mapping-left li { padding: 8px 12px; border-bottom: 1px solid #f3f4f6; }
.mapping-left a { color: #1f2937; text-decoration: none; }
.mapping-left a:hover { color: #2563eb; }
.mapping-right { padding: 16px; background: #f9fafb; border-radius: 4px; }
.mapping-right h3 { margin-top: 0; }

.checkbox-row {
    display: block;
    padding: 6px 0;
    font-size: 14px;
    cursor: pointer;
}
.checkbox-row input { margin-right: 8px; }

#saveMappingBtn { margin-top: 16px; padding: 8px 16px; background: #2563eb; color: white; border: none; border-radius: 4px; cursor: pointer; }

/* 全工具使用统计看板 */
.stats-card, .tool-stats-card, .tool-anomaly-card {
    padding: 22px;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    background: #fff;
}
.tool-stats-card, .tool-anomaly-card { margin-top: 18px; }
.stats-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}
.stats-heading.compact { margin-bottom: 14px; }
.stats-heading h3 { margin: 0; font-size: 18px; color: #1f2937; }
.stats-heading p { margin: 5px 0 0; color: #6b7280; font-size: 12px; }
.stats-heading button { flex: 0 0 auto; }
.tool-usage-sort-controls {
    display: flex;
    flex: 0 0 auto;
    align-items: flex-end;
    gap: 8px;
}
.tool-usage-sort-controls label {
    display: grid;
    gap: 5px;
    color: #6b7280;
    font-size: 12px;
}
.tool-usage-sort-controls select {
    min-width: 150px;
    height: 34px;
    padding: 5px 30px 5px 10px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    background: #fff;
    font-size: 12px;
}
.tool-usage-sort-controls select:focus {
    outline: 2px solid rgba(37, 99, 235, .18);
    border-color: #60a5fa;
}
.tool-usage-sort-controls button { min-width: 76px; height: 34px; }
.tool-usage-sort-controls button:disabled { color: #9ca3af; cursor: default; background: #f9fafb; }
.stats-error {
    margin: 0 0 14px;
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 6px;
    color: #991b1b;
    background: #fef2f2;
    font-size: 13px;
}
.stats-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.stat-item {
    background: #f9fafb;
    border-radius: 8px;
    padding: 20px 16px;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.stat-num {
    font-size: 32px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.2;
}
.stat-num.stat-success { color: #16a34a; }   /* Tailwind green-600 */
.stat-num.stat-partial { color: #d97706; }   /* Tailwind amber-600 */
.stat-num.stat-failed  { color: #dc2626; }   /* Tailwind red-600 */
.stat-num.stat-rate    { color: #2563eb; }   /* 主站蓝 blue-600 */
.stat-num.stat-recent  { color: #7c3aed; }
.stat-num.stat-active  { color: #d97706; }
.stat-label {
    font-size: 13px;
    color: #6b7280;                          /* Tailwind gray-500 */
}
.stats-period {
    margin: 0 0 8px;
    font-size: 13px;
    color: #6b7280;
}
.stats-note {
    margin: 0;
    font-size: 12px;
    color: #9ca3af;                          /* Tailwind gray-400 */
    line-height: 1.6;
}
.tool-usage-bars {
    display: grid;
    gap: 8px;
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}
.tool-usage-bar-row {
    display: grid;
    grid-template-columns: 300px minmax(160px, 1fr) 64px;
    align-items: center;
    gap: 12px;
    min-height: 24px;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 12px;
}
.tool-usage-bar-button {
    width: 100%;
    color: inherit;
    background: transparent;
    font-family: inherit;
    text-align: left;
    cursor: pointer;
}
.tool-usage-bar-button:hover { border-color: #bfdbfe; background: #eff6ff; }
.tool-usage-bar-button:focus-visible { outline: 2px solid #60a5fa; outline-offset: 1px; }
.tool-usage-bar-button.selected { border-color: #93c5fd; background: #dbeafe; }
.tool-usage-bar-row > span { color: #374151; font-weight: 600; }
.tool-usage-bar-row > div {
    overflow: hidden;
    height: 9px;
    border-radius: 999px;
    background: #e5e7eb;
}
.tool-usage-bar-row i {
    display: block;
    min-width: 2px;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #2563eb, #60a5fa);
}
.tool-usage-bar-row strong { color: #111827; text-align: right; font-variant-numeric: tabular-nums; }
.tool-usage-bar-untracked > div { background: repeating-linear-gradient(135deg, #e5e7eb, #e5e7eb 5px, #f3f4f6 5px, #f3f4f6 10px); }
.tool-usage-bar-untracked i { display: none; }
.tool-usage-bar-untracked strong { color: #9ca3af; font-size: 11px; }
.tool-stats-table-wrap { overflow-x: auto; }
.tool-stats-table {
    width: 100%;
    min-width: 950px;
    border-collapse: collapse;
    font-size: 12px;
}
.tool-stats-table th {
    padding: 9px 10px;
    border-bottom: 1px solid #d1d5db;
    color: #6b7280;
    background: #f9fafb;
    text-align: right;
    white-space: nowrap;
}
.tool-stats-table th:first-child,
.tool-stats-table td:first-child { text-align: left; }
.tool-stats-table td {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.tool-stats-table tbody tr:hover td { background: #f9fafb; }
.tool-stat-clickable { cursor: pointer; }
.tool-stat-clickable:focus { outline: 2px solid #60a5fa; outline-offset: -2px; }
.tool-stat-clickable.selected td { background: #eff6ff; }
.tool-stat-clickable.selected td:first-child { box-shadow: inset 3px 0 #2563eb; }
.tool-stat-success { color: #15803d !important; }
.tool-stat-partial { color: #b45309 !important; }
.tool-stat-failed { color: #b91c1c !important; }
.tool-stat-time { color: #6b7280 !important; white-space: nowrap; }
.tool-stat-untracked td { color: #9ca3af; background: #fafafa; }
.tool-stat-untracked td:nth-child(2) { text-align: left; }
.tool-stat-untracked td:first-child small {
    display: block;
    margin-top: 3px;
    color: #9ca3af;
    font-weight: 400;
}

/* 单个工具使用详情：员工次数、同期增减与趋势 */
.tool-usage-detail-panel {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    background: #f8fbff;
}
.tool-usage-detail-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 14px;
}
.tool-usage-detail-heading > div > span {
    color: #2563eb;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}
.tool-usage-detail-heading h4 { margin: 4px 0 0; color: #1f2937; font-size: 17px; }
.tool-usage-detail-heading p { margin: 5px 0 0; color: #6b7280; font-size: 12px; }
.tool-usage-detail-heading label {
    display: grid;
    flex: 0 0 auto;
    gap: 5px;
    color: #6b7280;
    font-size: 12px;
}
.tool-usage-detail-heading select {
    min-width: 112px;
    height: 34px;
    padding: 5px 28px 5px 9px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    background: #fff;
}
.tool-usage-detail-loading {
    padding: 34px;
    color: #6b7280;
    text-align: center;
    font-size: 13px;
}
.tool-usage-detail-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 14px;
}
.tool-usage-detail-summary > div {
    display: grid;
    gap: 4px;
    padding: 13px 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}
.tool-usage-detail-summary span { color: #6b7280; font-size: 11px; }
.tool-usage-detail-summary strong { color: #111827; font-size: 22px; font-variant-numeric: tabular-nums; }
.tool-usage-detail-summary small { color: #9ca3af; font-size: 11px; }
.tool-usage-detail-summary > div.up strong { color: #15803d; }
.tool-usage-detail-summary > div.down strong { color: #b91c1c; }
.tool-usage-detail-summary > div.flat strong { color: #6b7280; }
.tool-usage-trend-section, .tool-usage-users-section {
    padding: 14px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fff;
}
.tool-usage-users-section { margin-top: 12px; }
.tool-usage-detail-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}
.tool-usage-detail-section-heading h5 { margin: 0; color: #1f2937; font-size: 14px; }
.tool-usage-detail-section-heading span { color: #9ca3af; font-size: 11px; }
.tool-usage-trend-chart { min-height: 210px; }
.tool-usage-trend-chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.tool-usage-trend-chart line { stroke: #e5e7eb; stroke-width: 1; }
.tool-usage-trend-chart text { fill: #9ca3af; font-size: 10px; }
.tool-usage-trend-chart .trend-area { fill: rgba(37, 99, 235, .10); }
.tool-usage-trend-chart .trend-line {
    fill: none;
    stroke: #2563eb;
    stroke-width: 2.5;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.tool-usage-trend-chart circle { fill: #fff; stroke: #2563eb; stroke-width: 2; }
.tool-usage-users-table-wrap { overflow-x: auto; }
.tool-usage-users-table {
    width: 100%;
    min-width: 720px;
    border-collapse: collapse;
    font-size: 12px;
}
.tool-usage-users-table th, .tool-usage-users-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.tool-usage-users-table th { color: #6b7280; background: #f9fafb; white-space: nowrap; }
.tool-usage-users-table th:first-child, .tool-usage-users-table td:first-child { text-align: left; }
.tool-usage-users-table td:first-child small { display: block; margin-top: 2px; color: #9ca3af; }
.tool-usage-user-results { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; }
.tool-usage-user-results span {
    padding: 2px 5px;
    border-radius: 4px;
    color: #6b7280;
    background: #f3f4f6;
    white-space: nowrap;
}
.tool-usage-user-results .success { color: #15803d; background: #f0fdf4; }
.tool-usage-user-results .partial, .tool-usage-user-results .active { color: #b45309; background: #fffbeb; }
.tool-usage-user-results .failed { color: #b91c1c; background: #fef2f2; }
.tool-usage-detail-empty { padding: 38px !important; color: #9ca3af !important; text-align: center !important; }

/* 异常留存与管理处理 */
.anomaly-heading { align-items: flex-start; }
.anomaly-counts {
    display: flex;
    flex: 0 0 auto;
    gap: 8px;
}
.anomaly-counts span {
    padding: 7px 10px;
    border-radius: 999px;
    color: #6b7280;
    background: #f3f4f6;
    font-size: 12px;
    white-space: nowrap;
}
.anomaly-counts b { margin-left: 3px; color: #111827; }
.anomaly-filters {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
    margin-bottom: 12px;
    padding: 12px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #f9fafb;
}
.anomaly-filters label {
    display: grid;
    gap: 5px;
    color: #6b7280;
    font-size: 12px;
}
.anomaly-filters select {
    min-width: 126px;
    height: 34px;
    padding: 0 30px 0 9px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    color: #374151;
    background: #fff;
    font-size: 12px;
}
#anomalyTool { min-width: 260px; max-width: 360px; }
.anomaly-filters button { height: 34px; }
.anomaly-retention-note {
    margin: 0 0 12px;
    padding: 9px 11px;
    border-left: 3px solid #60a5fa;
    color: #4b5563;
    background: #eff6ff;
    font-size: 12px;
    line-height: 1.6;
}
.anomaly-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: collapse;
    font-size: 12px;
}
.anomaly-table th {
    padding: 9px 10px;
    border-bottom: 1px solid #d1d5db;
    color: #6b7280;
    background: #f9fafb;
    text-align: left;
    white-space: nowrap;
}
.anomaly-table td {
    padding: 10px;
    border-bottom: 1px solid #f3f4f6;
    color: #374151;
    vertical-align: top;
}
.anomaly-table tbody tr:hover td { background: #f9fafb; }
.anomaly-table td small {
    display: block;
    margin-top: 4px;
    color: #9ca3af;
    line-height: 1.4;
}
.anomaly-time { white-space: nowrap; }
.anomaly-summary { min-width: 260px; max-width: 420px; line-height: 1.55; overflow-wrap: anywhere; }
.anomaly-review-note { color: #6b7280 !important; }
.anomaly-result, .anomaly-review-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
}
.anomaly-result.failed { color: #b91c1c; background: #fef2f2; }
.anomaly-result.partial { color: #b45309; background: #fffbeb; }
.anomaly-review-status.open { color: #b45309; background: #fffbeb; }
.anomaly-review-status.resolved { color: #15803d; background: #f0fdf4; }
.anomaly-action {
    padding: 5px 8px;
    border: 1px solid #2563eb;
    border-radius: 5px;
    color: #fff;
    background: #2563eb;
    cursor: pointer;
    font-size: 11px;
    white-space: nowrap;
}
.anomaly-action.secondary { color: #374151; border-color: #d1d5db; background: #fff; }
.anomaly-empty { padding: 24px !important; color: #9ca3af !important; text-align: center; }
@media (max-width: 1000px) {
    .stats-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tool-usage-bar-row { grid-template-columns: 220px minmax(120px, 1fr) 64px; }
    .tool-usage-detail-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 680px) {
    .stats-card, .tool-stats-card, .tool-anomaly-card { padding: 15px; }
    .stats-heading { align-items: stretch; flex-direction: column; }
    .tool-usage-sort-controls { align-items: stretch; flex-direction: column; }
    .tool-usage-sort-controls select, .tool-usage-sort-controls button { width: 100%; }
    .stats-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-usage-bar-row { grid-template-columns: 130px minmax(90px, 1fr) 52px; gap: 8px; }
    .tool-usage-detail-heading { align-items: stretch; flex-direction: column; }
    .tool-usage-detail-heading select { width: 100%; }
    .tool-usage-detail-summary { grid-template-columns: 1fr; }
    .tool-usage-detail-section-heading { align-items: flex-start; flex-direction: column; }
    .anomaly-counts { align-self: flex-start; }
    .anomaly-filters label, .anomaly-filters select, #anomalyTool { width: 100%; min-width: 0; max-width: none; }
    .anomaly-filters button { width: 100%; }
}
#saveMappingBtn:disabled { background: #9ca3af; }

/* 客户多选区 */
.client-checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 4px;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 4px;
    max-height: 200px;
    overflow-y: auto;
}

/* 通用 modal */
.modal-buttons { margin-top: 16px; display: flex; gap: 8px; justify-content: flex-end; }
.btn-primary { padding: 8px 16px; background: #2563eb; color: white; border: none; border-radius: 4px; cursor: pointer; }
.btn-secondary { padding: 8px 16px; background: #e5e7eb; color: #374151; border: none; border-radius: 4px; cursor: pointer; }

/* 下载全部按钮 */
.btn-download-all {
    display: inline-block;
    padding: 8px 16px;
    background: #2563eb;
    color: white !important;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 14px;
}

.status.warn { background: #fef3c7; color: #92400e; }
.result li.err { color: #991b1b; }

/* ==================== 第六批新增 ==================== */

/* Tab 切换 */
.upload-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    margin-bottom: 16px;
    border-bottom: 1px solid #e5e7eb;
}
.tab-btn {
    padding: 10px 20px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: #6b7280;
    cursor: pointer;
    font-size: 14px;
}
.tab-btn.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    font-weight: 600;
}
.tab-content { padding-top: 8px; }

/* 已核定工资表 → 个人工资条 */
.payroll-tool-note {
    margin: 4px 0 18px;
    padding: 14px 16px;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e3a8a;
    font-size: 14px;
    line-height: 1.6;
}
.payroll-tool-note p { margin: 6px 0 0; }
.payroll-tool-note .payroll-privacy {
    color: #92400e;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    padding: 6px 10px;
}
.payroll-paste-zone {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0 0 14px;
    padding: 16px 18px;
    border: 2px dashed #93c5fd;
    border-radius: 8px;
    background: #f8fbff;
    color: #1e3a8a;
    cursor: copy;
    line-height: 1.55;
    transition: border-color .15s, background .15s, box-shadow .15s;
}
.payroll-paste-zone:focus,
.payroll-paste-zone.dragging {
    outline: none;
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.payroll-paste-zone.has-file {
    border-color: #22c55e;
    background: #f0fdf4;
}
.payroll-paste-icon { font-size: 28px; }
.payroll-file-feedback {
    margin: -4px 0 10px;
    padding: 8px 10px;
    border-radius: 5px;
    font-size: 13px;
    overflow-wrap: anywhere;
}
.payroll-file-feedback.success { color: #166534; background: #dcfce7; }
.payroll-file-feedback.error { color: #991b1b; background: #fee2e2; }
.payroll-run-status {
    margin: 12px 0 0;
    padding: 11px 13px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #1e40af;
    background: #eff6ff;
    font-size: 13px;
    line-height: 1.55;
}
.payroll-run-status.running { color: #1d4ed8; background: #eff6ff; }
.payroll-run-status.success { color: #166534; border-color: #bbf7d0; background: #f0fdf4; }
.payroll-run-status.error { color: #991b1b; border-color: #fecaca; background: #fef2f2; }
.payroll-result-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 12px;
    padding: 14px 16px;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    background: #f0fdf4;
}
.payroll-result-panel h3 { margin: 0 0 4px; color: #166534; font-size: 15px; }
.payroll-result-panel p { margin: 0; color: #475569; font-size: 12px; line-height: 1.55; }
.payroll-result-panel .btn-secondary { flex: 0 0 auto; }

/* ==================== 个税录屏填表 ==================== */
.tax-video-note {
    padding: 18px 20px;
    margin-bottom: 18px;
    color: #14532d;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    line-height: 1.7;
}
.tax-video-note p { margin: 6px 0; }
.tax-video-note ol { margin: 8px 0 8px 22px; padding: 0; }
.tax-video-boundary {
    padding-top: 8px;
    border-top: 1px dashed #86efac;
    color: #3f6212;
}
.tax-https-warning {
    margin-bottom: 16px;
    padding: 14px 16px;
    border: 1px solid #fca5a5;
    border-radius: 8px;
    color: #991b1b;
    background: #fef2f2;
    font-weight: 600;
}
.tax-https-warning a { color: #b91c1c; text-decoration: underline; }
.tax-video-form { display: grid; gap: 16px; }
.tax-video-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}
.tax-video-grid label, .tax-file-field { display: grid; gap: 7px; }
.tax-video-grid label > span, .tax-file-field > span { font-weight: 600; color: #334155; }
.tax-file-field > span {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}
.tax-video-grid b, .tax-file-field b { color: #dc2626; }
.tax-video-grid input, .tax-video-grid select, .tax-file-field input {
    box-sizing: border-box;
    width: 100%;
    min-height: 42px;
    padding: 9px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
}
.tax-file-field {
    padding: 14px;
    border: 1px dashed #94a3b8;
    border-radius: 9px;
    background: #f8fafc;
}
.tax-file-field small { color: #64748b; }
.tax-file-dropzone {
    cursor: copy;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease, transform .15s ease;
}
.tax-file-dropzone:hover { border-color: #60a5fa; background: #f0f7ff; }
.tax-file-dropzone.dragging {
    border: 2px solid #2563eb;
    background: #dbeafe;
    box-shadow: 0 0 0 4px rgba(37, 99, 235, .14);
    transform: translateY(-1px);
}
.tax-file-dropzone.has-file { border-style: solid; border-color: #86efac; background: #f0fdf4; }
.tax-drop-cue {
    flex: 0 0 auto;
    padding: 3px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 10px;
    font-style: normal;
    font-weight: 700;
    white-space: nowrap;
}
.tax-file-dropzone.dragging .tax-drop-cue { color: #fff; border-color: #2563eb; background: #2563eb; }
.tax-video-progress {
    margin-top: 20px;
    padding: 14px 16px;
    border-radius: 9px;
    background: #eff6ff;
    color: #1e3a8a;
}
.tax-video-progress.failed { color: #991b1b; background: #fef2f2; }
.tax-video-progress > div { display: flex; justify-content: space-between; gap: 12px; }
.tax-video-progress progress { width: 100%; height: 14px; margin-top: 9px; accent-color: #2563eb; }
.tax-validations {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 10px;
    margin-top: 16px;
}
.tax-validation-alert,
.tax-validation-all-pass {
    grid-column: 1 / -1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 14px;
    padding: 15px 16px;
    border-radius: 9px;
}
.tax-validation-alert { color: #9a3412; background: #fff7ed; border: 1px solid #fdba74; }
.tax-validation-all-pass { color: #166534; background: #f0fdf4; border: 1px solid #86efac; }
.tax-validation-alert strong,
.tax-validation-all-pass strong { font-size: 17px; }
.tax-validation-alert span,
.tax-validation-all-pass span { font-size: 13px; }
.tax-validation {
    display: grid;
    gap: 4px;
    padding: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}
.tax-validation.passed { border-color: #86efac; background: #f0fdf4; color: #166534; }
.tax-validation.review { border-color: #fdba74; background: #fff7ed; color: #9a3412; }
.tax-validation.manual_confirmed { border-color: #93c5fd; background: #eff6ff; color: #1e40af; }
.tax-validation.empty { color: #475569; }
.tax-validation span, .tax-validation small { display: block; }
.tax-validation-diff { display: block; font-size: 17px; color: #c2410c; }
.tax-validation-settled {
    grid-column: 1 / -1;
    padding: 10px 12px;
    border: 1px solid #d1fae5;
    border-radius: 8px;
    color: #166534;
    background: #f8fafc;
}
.tax-validation-settled summary { cursor: pointer; font-weight: 600; }
.tax-validation-settled > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.tax-deduction-validations {
    display: grid;
    gap: 9px;
    margin-top: 16px;
    padding: 14px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    background: #f8fbff;
}
.tax-deduction-validation-title {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    color: #1e3a8a;
}
.tax-deduction-validation {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    background: #fff;
}
.tax-deduction-validation.review,
.tax-deduction-validation.not_seen { color: #9a3412; border-color: #fdba74; background: #fff7ed; }
.tax-deduction-validation.ready_with_notice { color: #854d0e; border-color: #facc15; background: #fefce8; }
.tax-deduction-validation.ready { color: #166534; border-color: #86efac; background: #f0fdf4; }
.tax-deduction-validations details summary { cursor: pointer; color: #475569; font-weight: 600; }
.tax-deduction-ready-grid { display: grid; gap: 8px; margin-top: 9px; }
.tax-review {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #fdba74;
    border-radius: 10px;
    background: #fffaf2;
}
.tax-review-summary {
    padding: 15px 16px;
    border-radius: 9px;
    background: #fff;
}
.tax-review-summary.has-issue { border-left: 5px solid #f97316; }
.tax-review-summary.ready { border-left: 5px solid #22c55e; color: #166534; }
.tax-review-summary strong { font-size: 20px; }
.tax-review-summary p { margin: 6px 0 2px; font-size: 16px; font-weight: 600; }
.tax-review-summary small { color: #64748b; }
.tax-review-actions { display: flex; flex-wrap: wrap; gap: 9px; margin: 12px 0 4px; }
.tax-review-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.tax-review-heading p { margin: 5px 0 12px; color: #9a3412; }
.tax-review-scroll { overflow-x: auto; margin: 10px 0 14px; }
.tax-review-table { width: 100%; min-width: 1050px; border-collapse: collapse; background: #fff; }
.tax-review-table th, .tax-review-table td { padding: 7px; border: 1px solid #d6d3d1; text-align: left; }
.tax-review-table th { background: #ffedd5; color: #7c2d12; }
.tax-review-table input, .tax-review-table select {
    box-sizing: border-box;
    width: 100%;
    min-width: 72px;
    padding: 7px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
}
.tax-review-table [data-field="payer"] { min-width: 220px; }
.tax-review-table [data-field="income_type"] { min-width: 160px; }
.tax-business-review-table { min-width: 900px; }
.tax-business-review-table [data-business-field="business_name"] { min-width: 280px; }
.tax-review-table tr.tax-review-row-error { background: #fff1f2; }
.tax-review-table input.tax-review-field-error {
    border-color: #dc2626;
    box-shadow: 0 0 0 2px rgba(220, 38, 38, 0.14);
}
.tax-business-review-section,
.tax-deduction-review-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #fdba74;
}
.tax-deduction-review-table { min-width: 900px; }
.tax-deduction-review-table [data-deduction-field="name"] { min-width: 180px; }
.tax-deduction-review-table [data-deduction-field="period"] { min-width: 190px; }
.tax-result-notice { padding: 10px 12px; border: 1px solid #facc15; border-radius: 7px; background: #fefce8; color: #854d0e; }
.tax-empty-year-confirm {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 16px;
    margin: 10px 0 14px;
    padding: 12px;
    border: 1px solid #fdba74;
    border-radius: 7px;
    background: #fff7ed;
}
.tax-empty-year-confirm label { font-weight: 600; color: #9a3412; }
.tax-frame-btn, .tax-delete-row {
    border: 0;
    background: transparent;
    color: #2563eb;
    cursor: pointer;
    text-decoration: underline;
}
.tax-delete-row { color: #b91c1c; }
.tax-review-error { margin: 10px 0; padding: 10px; color: #991b1b; background: #fee2e2; border-radius: 6px; }
.tax-review-error p { margin: 4px 0; }
.tax-review-error ul { margin: 8px 0 0; padding-left: 22px; }
.tax-review-error li + li { margin-top: 4px; }
.tax-manual-submit-hint { margin: 12px 0 8px; color: #7c2d12; font-size: 14px; }
.tax-video-result {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #86efac;
    border-radius: 10px;
    color: #166534;
    background: #f0fdf4;
}
.tax-video-result p { margin: 7px 0 12px; }
.tax-recent-title { margin: 24px 0 10px; }
.tax-video-recent { display: grid; gap: 8px; }
.tax-recent-item {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 11px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    color: #334155;
    background: #fff;
    cursor: pointer;
    text-align: left;
}
.tax-recent-item:hover { border-color: #93c5fd; background: #f8fafc; }
.tax-recent-item.review { border-color: #fdba74; }
.tax-recent-item.success { border-color: #86efac; }
.tax-recent-item.failed { border-color: #fca5a5; }

@media (max-width: 760px) {
    .tax-video-grid { grid-template-columns: 1fr; }
    .tax-review-heading, .tax-recent-item, .tax-validation-alert, .tax-validation-all-pass,
    .tax-deduction-validation-title, .tax-deduction-validation { flex-direction: column; }
}

/* ==================== 外币票据翻译 ==================== */
.foreign-note {
    margin-bottom: 12px;
    padding: 18px 20px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    color: #1e293b;
    background: #fff;
}
.foreign-note-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}
.foreign-note-heading > div { min-width: 0; }
.foreign-note-heading strong { color: #0f172a; font-size: 17px; }
.foreign-note-heading p { margin: 5px 0 0; color: #64748b; font-size: 13px; line-height: 1.6; }
.foreign-note-heading > span {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
    font-weight: 600;
}
.foreign-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin: 16px 0 12px;
}
.foreign-flow span {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #475569;
    font-size: 13px;
}
.foreign-flow span b {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 11px;
}
.foreign-note-details {
    padding-top: 10px;
    border-top: 1px solid #f1f5f9;
    color: #64748b;
    font-size: 12px;
    line-height: 1.65;
}
.foreign-note-details summary { color: #475569; cursor: pointer; font-weight: 600; }
.foreign-note-details p { margin: 8px 0 0; }
.foreign-note-details b { color: #334155; }
.foreign-service-status {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 12px;
    padding: 9px 12px;
    border-radius: 8px;
    font-size: 12px;
}
.foreign-service-status span { color: currentColor; opacity: .78; }
.foreign-service-status.ready { color: #166534; background: #f0fdf4; border: 1px solid #bbf7d0; }
.foreign-service-status.unavailable { color: #991b1b; background: #fef2f2; border: 1px solid #fecaca; }
.foreign-form {
    display: grid;
    grid-template-columns: minmax(240px, .7fr) minmax(440px, 1.3fr);
    gap: 18px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #f8fafc;
}
.foreign-form > label { display: grid; align-content: start; gap: 8px; }
.foreign-form label > span,
.foreign-field-label { font-weight: 600; color: #334155; }
.foreign-form label b,
.foreign-field-label b { color: #dc2626; }
.foreign-form label em {
    margin-left: 4px;
    color: #64748b;
    font-size: 11px;
    font-style: normal;
    font-weight: 400;
}
.foreign-form input,
.foreign-review-fields input,
.foreign-review-fields select {
    box-sizing: border-box;
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    color: #0f172a;
    background: #fff;
    font: inherit;
}
.foreign-form input:focus,
.foreign-review-fields input:focus,
.foreign-review-fields select:focus {
    border-color: #60a5fa;
    outline: 3px solid rgba(59, 130, 246, .12);
}
.foreign-client-field small { color: #64748b; font-size: 12px; line-height: 1.5; }
.foreign-upload-field { display: grid; gap: 8px; }
.foreign-hidden-input { position: absolute; width: 1px !important; height: 1px; opacity: 0; pointer-events: none; }
.foreign-dropzone {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    min-height: 92px;
    padding: 16px 18px;
    border: 1.5px dashed #94a3b8;
    border-radius: 9px;
    color: #334155;
    background: #fff;
    cursor: default;
    transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.foreign-dropzone:hover,
.foreign-dropzone:focus,
.foreign-dropzone.dragging {
    border-color: #2563eb;
    background: #eff6ff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .08);
    outline: none;
}
.foreign-dropzone-copy { display: grid; gap: 5px; min-width: 0; }
.foreign-dropzone-copy strong { color: #0f172a; font-size: 14px; }
.foreign-dropzone-copy span { color: #64748b; font-size: 12px; line-height: 1.5; }
.foreign-upload-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.foreign-upload-actions .btn-secondary {
    padding: 8px 11px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    color: #334155;
    background: #fff;
    white-space: nowrap;
}
.foreign-upload-actions .btn-secondary:hover { border-color: #60a5fa; color: #1d4ed8; background: #f8fbff; }
.foreign-selected-files {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
    min-height: 20px;
    color: #64748b;
    font-size: 12px;
}
.foreign-selected-files.ready { color: #166534; }
.foreign-selected-files.invalid { color: #b45309; }
.foreign-selected-files > div { min-width: 0; }
.foreign-selected-files button { padding: 0; border: 0; color: #64748b; background: transparent; cursor: pointer; }
.foreign-selected-files button:hover { color: #dc2626; }
.foreign-selected-names { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 5px; color: #64748b; }
.foreign-selected-names span {
    max-width: 210px;
    overflow: hidden;
    padding: 2px 6px;
    border-radius: 4px;
    background: #e2e8f0;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.foreign-selected-warning {
    margin-top: 5px;
    color: #b45309;
    line-height: 1.5;
}
.foreign-submit-row {
    grid-column: 1 / -1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    padding-top: 2px;
}
.foreign-submit-row > span { color: #64748b; font-size: 12px; }
.foreign-submit-row .btn-primary { min-width: 140px; min-height: 40px; margin: 0; }
.foreign-submit-row .btn-primary:disabled { opacity: .55; cursor: not-allowed; }
.pwd-notice {
    margin: -4px 0 14px;
    padding: 10px 12px;
    border: 1px solid #fde68a;
    border-radius: 7px;
    color: #92400e;
    background: #fffbeb;
    font-size: 13px;
    line-height: 1.55;
}
.foreign-progress {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #dbeafe;
    border-radius: 9px;
    color: #1e3a8a;
    background: #eff6ff;
}
.foreign-progress.failed { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.foreign-progress > div { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; }
.foreign-progress progress { width: 100%; height: 10px; margin-top: 8px; accent-color: #2563eb; }
.foreign-progress.is-indeterminate progress { accent-color: #7c3aed; }
.foreign-progress.is-indeterminate #foreignProgressPercent { color: #6d28d9; font-weight: 700; }
.foreign-review {
    margin-top: 16px;
    padding: 0;
    background: transparent;
}
.foreign-review-summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 18px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
}
.foreign-review-summary strong { font-size: 16px; }
.foreign-review-summary span { color: #64748b; font-size: 12px; }
.foreign-review-summary.has-issue { border-left: 4px solid #f59e0b; color: #9a3412; }
.foreign-review-summary.has-error { border-left: 4px solid #dc2626; color: #991b1b; background: #fffafa; }
.foreign-review-summary.ready { border-left: 4px solid #22c55e; color: #166534; }
.foreign-review-tip {
    margin: 8px 2px 12px;
    color: #64748b;
    font-size: 12px;
}
.foreign-review-tip summary { width: max-content; cursor: pointer; color: #475569; font-weight: 600; }
.foreign-review-tip p { margin: 7px 0 0; line-height: 1.6; }
.foreign-review-list { display: grid; gap: 14px; }
.foreign-review-card {
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .04);
}
.foreign-review-card.has-warning { border-color: #fed7aa; }
.foreign-review-card.has-error { border-color: #fca5a5; }
.foreign-review-card.is-duplicate {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, .12);
}
.foreign-review-card.is-duplicate .foreign-review-card-head { background: #fffbeb; }
.foreign-review-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 14px;
    border-bottom: 1px solid #eef2f7;
    background: #f8fafc;
}
.foreign-review-card-head > div { display: flex; align-items: center; min-width: 0; gap: 9px; }
.foreign-review-card-head strong { overflow: hidden; color: #334155; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.foreign-card-number {
    display: grid;
    place-items: center;
    width: 23px;
    height: 23px;
    flex: 0 0 auto;
    border-radius: 6px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 11px;
    font-weight: 700;
}
.foreign-card-status { flex: 0 0 auto; padding: 4px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.foreign-card-status.ready { color: #166534; background: #dcfce7; }
.foreign-card-status.warning { color: #9a3412; background: #ffedd5; }
.foreign-card-status.duplicate { color: #92400e; background: #fde68a; }
.foreign-card-status.failed { color: #991b1b; background: #fee2e2; }
.foreign-review-card-body {
    display: grid;
    grid-template-columns: minmax(420px, .95fr) minmax(430px, 1.05fr);
    gap: 20px;
    padding: 16px;
}
.foreign-preview-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 10px; min-width: 0; }
.foreign-preview-pair figure { min-width: 0; margin: 0; }
.foreign-preview-pair figcaption { margin-bottom: 6px; color: #64748b; font-size: 11px; font-weight: 600; }
.foreign-receipt-thumb {
    display: block;
    box-sizing: border-box;
    width: 100%;
    height: 310px;
    object-fit: contain;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #f8fafc;
    cursor: zoom-in;
}
.foreign-receipt-thumb.translation { width: 100%; }
.foreign-receipt-thumb.unavailable { color: #991b1b; background: #fef2f2; }
.foreign-compare-launch {
    grid-column: 1 / -1;
    align-self: start;
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    color: #334155;
    background: #fff;
    cursor: pointer;
    font-size: 12px;
    font-weight: 600;
}
.foreign-compare-launch:hover { border-color: #60a5fa; color: #1d4ed8; background: #f8fbff; }
.foreign-compare-launch:disabled { border-color: #e2e8f0; color: #94a3b8; background: #f8fafc; cursor: wait; }
.foreign-review-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-content: start;
    gap: 12px;
}
.foreign-review-fields label,
.foreign-cny-field { display: grid; align-content: start; gap: 6px; min-width: 0; }
.foreign-review-fields label > span,
.foreign-cny-field > span { color: #475569; font-size: 11px; font-weight: 600; }
.foreign-review-fields label > span small { margin-left: 4px; color: #94a3b8; font-size: 10px; font-weight: 400; }
.foreign-review-fields [data-foreign-field="currency"] { text-transform: uppercase; }
.foreign-duplicate-alert {
    grid-column: 1 / -1;
    display: grid;
    gap: 3px;
    padding: 9px 11px;
    border: 1px solid #fbbf24;
    border-radius: 7px;
    color: #92400e;
    background: #fffbeb;
    font-size: 11px;
    line-height: 1.5;
}
.foreign-duplicate-alert strong { color: #9a3412; }
.foreign-duplicate-alert span { color: #a16207; }
.foreign-rate-field,
.foreign-purpose-field { grid-column: 1 / -1; }
.foreign-context-review-hint {
    grid-column: 1 / -1;
    padding: 8px 10px;
    border-left: 3px solid #f59e0b;
    color: #9a3412;
    background: #fff7ed;
    font-size: 11px;
    line-height: 1.5;
}
.foreign-amount-field.has-candidates { grid-column: 1 / -1; }
.foreign-amount-candidates {
    display: grid;
    gap: 7px;
    margin-top: 2px;
    padding: 9px;
    border: 1px solid #fed7aa;
    border-radius: 7px;
    background: #fff7ed;
}
.foreign-amount-candidates > span { color: #9a3412; font-size: 11px; font-weight: 600; }
.foreign-amount-candidates > div { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.foreign-amount-choice {
    display: grid;
    min-width: 0;
    padding: 7px 9px;
    border: 1px solid #fdba74;
    border-radius: 6px;
    color: #7c2d12;
    background: #fff;
    cursor: pointer;
    text-align: left;
}
.foreign-amount-choice:hover,
.foreign-amount-choice.selected { border-color: #2563eb; color: #1d4ed8; background: #eff6ff; }
.foreign-amount-choice strong { font-size: 13px; }
.foreign-amount-choice small {
    overflow: hidden;
    margin-top: 2px;
    color: #64748b;
    font-size: 10px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.foreign-rate-field > small { color: #64748b; font-size: 10px; line-height: 1.5; }
.foreign-cny-field {
    padding: 9px 11px;
    border: 1px solid #bbf7d0;
    border-radius: 7px;
    background: #f0fdf4;
}
.foreign-cny-result { color: #166534; font-size: 18px; }
.foreign-review-card footer { padding: 9px 14px; border-top: 1px solid #eef2f7; font-size: 12px; line-height: 1.5; }
.foreign-warning { color: #9a3412; background: #fff7ed; }
.foreign-failed { color: #991b1b; background: #fef2f2; }
.foreign-ready { color: #166534; background: #f0fdf4; }
.foreign-review-error {
    margin: 12px 0;
    padding: 10px;
    border-radius: 7px;
    color: #991b1b;
    background: #fee2e2;
}
.foreign-review-action {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 9px;
    background: #fff;
}
.foreign-review-action span { color: #64748b; font-size: 12px; }
.foreign-review-action .btn-primary,
.foreign-review-action .btn-secondary { margin: 0; }
.foreign-review-action .btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.foreign-result {
    margin-top: 16px;
    padding: 15px 16px;
    border: 1px solid #86efac;
    border-radius: 10px;
    color: #166534;
    background: #f0fdf4;
}
.foreign-result p { margin: 7px 0 12px; }
.foreign-result .foreign-download-hint {
    max-width: 760px;
    padding: 9px 11px;
    border: 1px solid #fde68a;
    border-radius: 7px;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    line-height: 1.55;
}
.foreign-result .foreign-download-hint.error { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.foreign-result .btn-primary { margin: 0; }
.foreign-result .btn-primary:disabled { opacity: .72; cursor: wait; }
.foreign-recent-title { margin: 24px 0 10px; color: #334155; font-size: 15px; }
.foreign-recent { display: grid; gap: 8px; }
.foreign-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #334155;
    background: #fff;
    cursor: pointer;
    text-align: left;
}
.foreign-recent-item:hover { border-color: #93c5fd; background: #f8fafc; }
.foreign-recent-item.review { border-color: #fdba74; }
.foreign-recent-item.success { border-color: #86efac; }
.foreign-recent-item.failed { border-color: #fca5a5; }
.foreign-recent-item span:first-child { display: grid; gap: 3px; }
.foreign-recent-item small { color: #64748b; }

.foreign-compare-modal {
    position: fixed;
    inset: 0;
    z-index: 1400;
    display: grid;
    place-items: center;
    box-sizing: border-box;
    padding: 20px;
    background: rgba(15, 23, 42, .72);
}
.foreign-compare-shell {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    width: min(1480px, calc(100vw - 40px));
    height: min(920px, calc(100vh - 40px));
    overflow: hidden;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 24px 80px rgba(15, 23, 42, .34);
}
.foreign-compare-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 18px 13px;
    border-bottom: 1px solid #e2e8f0;
}
.foreign-compare-head h2 { margin: 0; color: #0f172a; font-size: 18px; }
.foreign-compare-head p { margin: 5px 0 0; color: #64748b; font-size: 12px; }
.foreign-compare-head-actions { display: flex; align-items: center; gap: 12px; }
.foreign-compare-modes { display: flex; padding: 3px; border-radius: 7px; background: #e2e8f0; }
.foreign-compare-modes button,
.foreign-compare-close,
.foreign-compare-toolbar button {
    width: auto;
    border: 0;
    color: #475569;
    background: transparent;
    cursor: pointer;
}
.foreign-compare-modes button { padding: 6px 10px; border-radius: 5px; font-size: 12px; }
.foreign-compare-modes button.active { color: #1d4ed8; background: #fff; box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.foreign-compare-close { padding: 0 4px; color: #64748b; font-size: 25px; line-height: 1; }
.foreign-compare-close:hover { color: #0f172a; }
.foreign-compare-toolbar {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 9px 18px;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    background: #f8fafc;
    font-size: 12px;
}
.foreign-compare-toolbar > button { padding: 5px 9px; border: 1px solid #cbd5e1; border-radius: 5px; background: #fff; }
.foreign-compare-toolbar > button:hover { border-color: #60a5fa; color: #1d4ed8; }
.foreign-compare-toolbar > input { width: 180px; accent-color: #2563eb; }
.foreign-compare-toolbar > strong { min-width: 42px; color: #334155; }
.foreign-compare-opacity { display: none; align-items: center; gap: 8px; margin-left: auto; }
.foreign-compare-opacity input { width: 150px; accent-color: #2563eb; }
.foreign-compare-modal[data-mode="overlay"] .foreign-compare-opacity { display: flex; }
.foreign-compare-content { min-height: 0; padding: 14px; background: #e9eef5; }
.foreign-compare-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); height: 100%; gap: 14px; }
.foreign-compare-pane,
.foreign-compare-overlay { min-width: 0; min-height: 0; }
.foreign-compare-pane { display: grid; grid-template-rows: auto minmax(0, 1fr); gap: 7px; }
.foreign-compare-pane > strong,
.foreign-compare-overlay > strong { color: #334155; font-size: 12px; }
.foreign-compare-overlay > strong small { margin-left: 6px; color: #64748b; font-weight: 400; }
.foreign-compare-viewport {
    min-width: 0;
    min-height: 0;
    overflow: auto;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: #fff;
    overscroll-behavior: contain;
}
.foreign-compare-pane .foreign-compare-viewport { height: 100%; }
.foreign-compare-pane img { display: block; max-width: none; height: auto; margin: 0 auto; }
.foreign-compare-overlay { display: none; grid-template-rows: auto minmax(0, 1fr); height: 100%; gap: 7px; }
.foreign-compare-modal[data-mode="overlay"] .foreign-compare-side { display: none; }
.foreign-compare-modal[data-mode="overlay"] .foreign-compare-overlay { display: grid; }
.foreign-compare-overlay-canvas { position: relative; min-width: 60%; margin: 0 auto; }
.foreign-compare-overlay-canvas img { display: block; width: 100%; height: auto; }
.foreign-compare-overlay-canvas img.translated { position: absolute; inset: 0; }

@media (max-width: 1080px) {
    .main.foreign-mode { max-width: none; }
    .foreign-review-card-body { grid-template-columns: 1fr; }
    .foreign-receipt-thumb { height: 360px; }
}

@media (max-width: 900px) {
    .foreign-compare-modal { padding: 8px; }
    .foreign-compare-shell { width: calc(100vw - 16px); height: calc(100vh - 16px); }
    .foreign-compare-head { gap: 12px; }
    .foreign-compare-head p { display: none; }
    .foreign-compare-toolbar { flex-wrap: wrap; }
    .foreign-compare-opacity { margin-left: 0; }
    .foreign-compare-side { grid-template-columns: repeat(2, minmax(320px, 1fr)); overflow-x: auto; }
}

@media (max-width: 820px) {
    .foreign-flow { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .foreign-form { grid-template-columns: 1fr; }
    .foreign-submit-row { grid-column: auto; }
    .foreign-dropzone { align-items: stretch; flex-direction: column; }
    .foreign-upload-actions { flex-wrap: wrap; }
}

@media (max-width: 580px) {
    .foreign-note-heading,
    .foreign-service-status,
    .foreign-review-summary,
    .foreign-review-card-head,
    .foreign-review-action,
    .foreign-recent-item { align-items: flex-start; flex-direction: column; }
    .foreign-flow,
    .foreign-preview-pair,
    .foreign-review-fields { grid-template-columns: 1fr; }
    .foreign-rate-field,
    .foreign-purpose-field,
    .foreign-amount-field.has-candidates { grid-column: auto; }
    .foreign-amount-candidates > div { grid-template-columns: 1fr; }
    .foreign-upload-actions { display: grid; grid-template-columns: 1fr; }
    .foreign-upload-actions .btn-secondary,
    .foreign-submit-row .btn-primary,
    .foreign-review-action .btn-primary { width: 100%; }
    .foreign-submit-row { align-items: stretch; flex-direction: column; }
    .foreign-receipt-thumb { height: 400px; }
}

/* 固定实发工资 → 应发工资和个税 */
.reverse-tool-note {
    margin: 4px 0 18px;
    padding: 14px 16px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
    font-size: 14px;
    line-height: 1.65;
}
.reverse-tool-note p { margin: 6px 0 0; }
.reverse-paste-card {
    margin: 0 0 16px;
    padding: 16px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #f8fbff;
}
.reverse-paste-card h3 {
    margin: 0 0 6px;
    color: #1e3a8a;
    font-size: 15px;
}
.reverse-paste-card p {
    margin: 0 0 10px;
    color: #4b5563;
    font-size: 13px;
    line-height: 1.55;
}
.reverse-paste-card textarea {
    width: 100%;
    min-height: 128px;
    box-sizing: border-box;
    padding: 10px 12px;
    resize: vertical;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    background: white;
    color: #1f2937;
    font: 12px/1.5 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.reverse-paste-card textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.reverse-paste-actions { margin-top: 10px; }
.reverse-paste-actions button { padding: 9px 16px; }
.reverse-paste-actions button:disabled { cursor: wait; opacity: .7; }
.reverse-parse-status {
    margin-top: 10px;
    padding: 9px 11px;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.55;
}
.reverse-parse-status.success { color: #166534; background: #dcfce7; }
.reverse-parse-status.error { color: #991b1b; background: #fee2e2; }
.reverse-form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.reverse-section,
.reverse-advanced {
    padding: 16px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #ffffff;
}
.reverse-section h3 {
    margin: 0 0 14px;
    color: #1f2937;
    font-size: 15px;
}
.reverse-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
}
.reverse-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}
.reverse-field span {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.reverse-field span b { color: #dc2626; }
.reverse-field input {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    color: #111827;
    background: white;
    font-size: 14px;
}
.reverse-field input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .1);
}
.reverse-field small {
    color: #6b7280;
    font-size: 12px;
    line-height: 1.4;
}
.reverse-advanced > summary {
    color: #374151;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}
.reverse-advanced[open] > summary { margin-bottom: 14px; }
.reverse-actions {
    display: flex;
    gap: 10px;
}
.reverse-actions button {
    min-width: 110px;
    padding: 10px 18px;
    font-size: 14px;
}
.reverse-actions button:disabled { background: #9ca3af; cursor: wait; }
.reverse-error {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    background: #fee2e2;
    color: #991b1b;
    font-size: 13px;
}
.reverse-result {
    margin-top: 18px;
    border: 1px solid #86efac;
    border-radius: 8px;
    overflow: hidden;
    background: #f0fdf4;
}
.reverse-result-head {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1px;
    background: #bbf7d0;
}
.reverse-result-head > div {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 16px;
    background: #f0fdf4;
}
.reverse-result-head span { color: #166534; font-size: 12px; }
.reverse-result-head strong { color: #14532d; font-size: 22px; }
.reverse-result-detail {
    padding: 14px 16px;
    border-top: 1px solid #bbf7d0;
    background: white;
    color: #374151;
    font-size: 13px;
    line-height: 1.65;
}
.reverse-result-detail p { margin: 6px 0; }
.reverse-ok { color: #166534; font-weight: 600; }
.reverse-warn { color: #92400e; font-weight: 600; }

@media (max-width: 700px) {
    .main { margin: 12px; padding: 16px; }
    .reverse-grid,
    .reverse-result-head { grid-template-columns: 1fr; }
    .tab-btn { padding: 9px 12px; }
}

/* 第 20b2：自动识别月份范围提示 */
.range-hint {
    margin: 12px 0;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.4;
}
.range-hint.ok {
    color: #065f46;
    background: #d1fae5;
    border: 1px solid #6ee7b7;
}
.range-hint.error {
    color: #991b1b;
    background: #fee2e2;
    border: 1px solid #fca5a5;
}

/* 文件夹选完后的预览清单 */
.files-preview {
    margin: 12px 0;
    padding: 12px 16px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    font-size: 13px;
}
.preview-summary { margin-bottom: 8px; }
.preview-list { margin: 0; padding-left: 0; }
.preview-list li { padding: 2px 0; list-style: none; }
.preview-list li.ok { color: #065f46; }
.preview-list li.warn { color: #92400e; }
.warn-text { color: #92400e; margin-top: 8px; }

/* 模态右上角 X 关闭按钮（第六批用 .modal-close 替代上一批的 .modal-close-x） */
.modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    background: transparent;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #6b7280;
    padding: 4px 10px;
    line-height: 1;
}
.modal-close:hover { color: #1f2937; }

/* X 按钮要 absolute 定位，父容器需 relative */
.modal-box { position: relative; }

/* badge-warn（partial 状态显示用） */
.badge-warn { background: #fef3c7; color: #92400e; }

/* ==================== 第 20b3 批：图片化上传指引（fix3 主站 palette 对齐）==================== */
/* palette 重写：Material → Tailwind（跟主站 #2563eb / #1d4ed8 / gray-800 / amber-100 一致）*/

/* 顶部"快速避坑"警告区（Tailwind amber 风格） */
.upload-guide-warnings {
    background: #fef3c7;            /* Tailwind amber-100（主站风）*/
    border-left: 4px solid #f59e0b; /* Tailwind amber-500 */
    padding: 12px 16px;
    margin: 12px 0;
    border-radius: 8px;             /* 主站卡片圆角 8px */
    font-size: 13px;
}
.upload-guide-warnings p { margin: 0 0 6px; font-weight: 600; color: #92400e; }     /* amber-800 */
.upload-guide-warnings ul { margin: 0; padding-left: 20px; }
.upload-guide-warnings li { color: #92400e; line-height: 1.6; padding: 1px 0; }

/* 临时系统公告条(蓝色中性信息色)· 2026-05-27 后随 .system-notice div 一起删 */
.system-notice {
    max-width: 800px;
    margin: 24px auto 0;            /* 上边距 + 居中,跟 .main 同宽对齐 */
    background: #eff6ff;            /* Tailwind blue-50 */
    border-left: 4px solid #3b82f6; /* Tailwind blue-500 */
    border-radius: 8px;             /* 跟主站卡片同款 */
    padding: 12px 16px;
    color: #1e3a5f;                 /* 深蓝灰文字 */
    font-size: 14px;
    line-height: 1.6;
}
.system-notice p { margin: 4px 0; }
.system-notice ul { margin: 4px 0 4px 20px; padding: 0; }
.system-notice li { margin: 2px 0; }

/* 5 大类图片分组容器 */
.upload-guide {
    margin: 16px 0;
}
.upload-guide h3 {
    margin: 0 0 12px;
    font-size: 18px;                /* 主站 H2 大小 */
    font-weight: 600;
    color: #1f2937;                 /* gray-800 */
}

/* 单个分组（主站风：白底 + 软阴影 + 无 border） */
.guide-section {
    background: #ffffff;
    border-radius: 8px;             /* 主站统一 8px */
    box-shadow: 0 2px 8px rgba(0,0,0,0.04); /* 主站软阴影 */
    padding: 12px 16px;
    margin: 8px 0;
    overflow-x: auto;               /* 兜底：宽图允许横向滚动 */
}

/* summary（Tailwind blue 风 + 自定义三角 + 字号回归 14px） */
.guide-section > summary {
    background: #eff6ff;            /* Tailwind blue-50（替代 Material #E3F2FD） */
    font-size: 14px;                /* 主站主体字号 */
    font-weight: 600;
    padding: 12px 16px;
    border-left: 4px solid #2563eb; /* Tailwind blue-600（替代 Material #1976D2，跟主站按钮主色一致） */
    border-radius: 4px;
    cursor: pointer;
    list-style: none;
    transition: background 0.2s;
    user-select: none;
    color: #1f2937;                 /* gray-800 */
}
.guide-section > summary::-webkit-details-marker { display: none; }
.guide-section > summary::before {
    content: "▶ ";
    display: inline-block;
    margin-right: 6px;
    transition: transform 0.2s;
}
.guide-section[open] > summary::before {
    content: "▼ ";
}
.guide-section > summary:hover {
    background: #dbeafe;            /* Tailwind blue-100 */
}
.guide-section[open] > summary {
    background: #dbeafe;            /* hover/[open] 同色 */
    border-radius: 4px 4px 0 0;
}
.guide-section > summary strong { font-weight: 600; }

/* 提示语（Tailwind blue-50 + blue-700） */
.guide-section .guide-tip {
    margin: 8px 0 12px;
    padding: 8px 12px;
    background: #eff6ff;            /* blue-50 */
    border-radius: 4px;
    color: #1d4ed8;                 /* blue-700（主站 hover 色） */
    font-size: 13px;
    line-height: 1.6;
}
.guide-section .guide-tip b { color: #b91c1c; } /* red-700 强调 */

/* 截图样式（max-width:100% 自适应容器） */
.guide-section img {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 12px 0;
    border: 1px solid #e5e7eb;      /* gray-200 边框（替代 #ddd） */
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06); /* 与主站 box-shadow 0.04 同档 */
}

/* 智能识别预览升级 */
.preview-section { margin-top: 12px; }
.preview-section:first-of-type { margin-top: 8px; }
.preview-section-title {
    font-weight: 600;
    color: #1f2937;
    font-size: 13px;
    margin-bottom: 6px;
}
.preview-list .files-sublist {
    margin: 4px 0 4px 22px;
    padding: 0;
    list-style: none;
    color: #4b5563;
    font-size: 12px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.preview-list .files-sublist li { padding: 1px 0; }
.preview-list li.info { color: #1f2937; }

.preview-ignored {
    background: #f3f4f6;
    border: 1px dashed #d1d5db;
    border-radius: 4px;
    padding: 8px 12px;
}
.preview-ignored .preview-list { margin: 0; padding-left: 0; list-style: none; }
.preview-ignored .preview-list li {
    color: #6b7280;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 12px;
    padding: 1px 0;
}

.preview-warnings {
    background: #fef3c7;
    border: 1px solid #fde68a;
    border-radius: 4px;
    padding: 8px 12px;
}
.preview-warnings .preview-section-title { color: #92400e; }
.preview-warnings .preview-list { margin: 0; padding-left: 0; list-style: none; }
.preview-warnings .preview-list li.warn { color: #92400e; padding: 2px 0; }

.preview-missing {
    background: #fee2e2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    padding: 8px 12px;
}
.preview-missing .preview-section-title { color: #991b1b; }
.preview-missing .preview-list { margin: 0; padding-left: 0; list-style: none; }
.preview-missing .preview-list li.warn { color: #991b1b; padding: 2px 0; }
.preview-missing .warn-text { margin-top: 6px; color: #991b1b; font-size: 12px; }

/* ==================== 工具大厅与独立工作区（2026-07） ==================== */
:root {
    --hall-navy: #172554;
    --hall-blue: #2563eb;
    --hall-border: #dbe2ea;
    --hall-muted: #64748b;
    --hall-surface: #ffffff;
}

body {
    background: #f3f6fa;
    color: #1e293b;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    padding: 0;
    color: #334155;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid #e2e8f0;
    backdrop-filter: blur(12px);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: min(1180px, calc(100% - 40px));
    min-height: 64px;
    margin: 0 auto;
}
.brand-home {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    padding: 0;
    border: 0;
    color: #0f172a;
    background: transparent;
    cursor: pointer;
    text-align: left;
}
.brand-mark {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    color: white;
    background: var(--hall-navy);
    font-size: 17px;
    font-weight: 700;
}
.brand-home > span:last-child { display: grid; gap: 1px; }
.brand-home strong { font-size: 15px; letter-spacing: .02em; }
.brand-home small { color: #64748b; font-size: 11px; }
.topbar .user {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 13px;
}
.topbar .user-greeting { color: #475569; }
.topbar a { color: #475569; }
.topbar a:hover { color: #1d4ed8; }

.main,
.main.foreign-mode {
    max-width: 1180px;
    margin: 30px auto 54px;
    padding: 0 20px;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
}
.main.foreign-mode { max-width: 1240px; }
.main.payroll-notice-mode { max-width: 1500px; }
.main.external-mode { max-width: 1600px; }

.hall-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
    min-height: 180px;
    padding: 36px 42px;
    overflow: hidden;
    border-radius: 16px;
    color: white;
    background:
        radial-gradient(circle at 88% 20%, rgba(147, 197, 253, .20), transparent 28%),
        linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
    box-sizing: border-box;
}
.hall-eyebrow {
    display: inline-block;
    margin-bottom: 10px;
    color: #bfdbfe;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .14em;
}
.hall-hero h1 {
    margin: 0 0 12px;
    font-size: 30px;
    line-height: 1.2;
    letter-spacing: .02em;
}
.hall-hero p {
    max-width: 660px;
    margin: 0;
    color: #dbeafe;
    font-size: 14px;
    line-height: 1.7;
}
.hall-summary {
    display: grid;
    min-width: 118px;
    padding: 16px 20px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
    text-align: center;
}
.hall-summary strong { font-size: 30px; line-height: 1; }
.hall-summary span { margin-top: 7px; color: #bfdbfe; font-size: 12px; }
.hall-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 30px 2px 14px;
}
.hall-section-heading h2 { margin: 0; color: #0f172a; font-size: 18px; }
.hall-section-heading p { margin: 4px 0 0; color: var(--hall-muted); font-size: 12px; }

.tool-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}
.tool-grid-featured {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}
.hall-catalog-heading { margin-top: 34px; }
.tool-catalog-layout {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}
.tool-catalog-results { min-width: 0; }
.tool-group-filter {
    position: sticky;
    top: 76px;
    display: grid;
    gap: 4px;
    padding: 10px;
    border: 1px solid #dbe4ee;
    border-radius: 15px;
    background: #fff;
}
.tool-group-filter h3 {
    margin: 2px 8px 7px;
    color: #64748b;
    font-size: 12px;
    font-weight: 650;
}
.tool-group-filter button {
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    min-width: 0;
    padding: 9px 9px 9px 7px;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #475569;
    background: transparent;
    cursor: pointer;
    font: inherit;
    font-size: 12px;
    text-align: left;
}
.tool-group-filter button b {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 8px;
    color: #64748b;
    background: #f1f5f9;
    font-size: 11px;
}
.tool-group-filter button span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tool-group-filter button em {
    min-width: 24px;
    padding: 4px 7px;
    border-radius: 999px;
    color: #64748b;
    background: #f1f5f9;
    font-size: 10px;
    font-style: normal;
    text-align: center;
}
.tool-group-filter button:hover { color: #1d4ed8; background: #eff6ff; }
.tool-group-filter button.active {
    border-color: #bfdbfe;
    color: #1d4ed8;
    background: #eff6ff;
    box-shadow: inset 3px 0 #2563eb;
}
.tool-group-filter button.active b { color: #1d4ed8; background: #dbeafe; }
.tool-group-filter button.active em { color: #1d4ed8; background: #fff; }
.tool-group-filter button:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .22);
    outline-offset: 2px;
}
.tool-group-empty {
    padding: 36px 18px;
    border: 1px dashed #bfdbfe;
    border-radius: 15px;
    color: #64748b;
    background: #f8fbff;
    font-size: 13px;
    text-align: center;
}
.favorite-tools {
    display: grid;
    gap: 14px;
    margin-bottom: 18px;
    padding: 16px;
    border: 1px solid #fde68a;
    border-radius: 15px;
    background: #fffbeb;
}
.favorite-tools-heading,
.favorite-tools-heading > div {
    display: flex;
    align-items: center;
    gap: 11px;
}
.favorite-tools-heading { justify-content: space-between; }
.favorite-tools-heading > div > div { display: grid; gap: 3px; }
.favorite-tools-heading h3 { margin: 0; color: #78350f; font-size: 15px; }
.favorite-tools-heading p { margin: 0; color: #92400e; font-size: 11px; }
.favorite-tools-mark {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    color: #b45309;
    background: #fef3c7;
    font-size: 18px;
}
.favorite-tools-count {
    flex: 0 0 auto;
    padding: 4px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 10px;
    font-weight: 600;
}
.favorite-tools-empty {
    padding: 17px;
    border: 1px dashed #f5c96a;
    border-radius: 11px;
    color: #a16207;
    background: rgba(255, 255, 255, .58);
    font-size: 12px;
    text-align: center;
}
.favorite-tools-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tool-card-wrap {
    position: relative;
    display: flex;
    min-width: 0;
}
.tool-card-wrap > .tool-card { width: 100%; height: 100%; box-sizing: border-box; }
.tool-card-wrap .tool-card-meta { padding-right: 27px; }
.tool-card-wrap.has-external-category-control {
    display: grid;
    align-content: start;
}
.external-tool-category-control {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 9px;
    width: 100%;
    margin-top: 8px;
    padding: 9px 10px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #475569;
    background: #eff6ff;
    box-sizing: border-box;
    font-size: 10px;
    font-weight: 650;
}
.external-tool-category-control select {
    min-width: 0;
    width: 100%;
    padding: 7px 28px 7px 9px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e3a8a;
    background: #fff;
    font: inherit;
    font-size: 11px;
}
.tool-favorite-toggle {
    position: absolute;
    z-index: 2;
    top: 11px;
    right: 11px;
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    padding: 0;
    border: 1px solid #dbe4ee;
    border-radius: 9px;
    color: #94a3b8;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 2px 8px rgba(15, 23, 42, .08);
    cursor: pointer;
    font-size: 17px;
    line-height: 1;
}
.tool-favorite-toggle:hover { border-color: #fbbf24; color: #b45309; background: #fffbeb; }
.tool-favorite-toggle.active { border-color: #f59e0b; color: #b45309; background: #fef3c7; }
.tool-favorite-toggle:focus-visible { outline: 3px solid rgba(245, 158, 11, .25); outline-offset: 2px; }
.tool-category-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
    gap: 18px;
}
.tool-category-group {
    display: grid;
    align-self: stretch;
    gap: 14px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #dbe4ee;
    border-radius: 15px;
    background: #f8fafc;
    box-sizing: border-box;
}
.tool-category-span-2,
.tool-category-span-4 { grid-column: 1; }
.tool-category-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 38px;
}
.tool-category-heading > div { display: grid; gap: 3px; min-width: 0; }
.tool-category-heading span { color: #0f172a; font-size: 15px; font-weight: 700; }
.tool-category-heading small { color: #64748b; font-size: 11px; }
.tool-category-heading > em {
    flex: 0 0 auto;
    padding: 4px 8px;
    border-radius: 999px;
    color: #475569;
    background: #e8eef5;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
}
.tool-grid-category,
.tool-category-span-2 .tool-grid-category,
.tool-category-span-4 .tool-grid-category {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
}
.tool-grid-category .tool-card {
    min-height: 218px;
    padding: 18px;
    gap: 12px;
}
.tool-grid-category .tool-card-mark {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    font-size: 17px;
}
.tool-grid-category .tool-card-copy > strong {
    font-size: 15px;
    line-height: 1.45;
}
.tool-grid-category .tool-card-copy > small { min-height: 58px; }
.tool-category-unassigned {
    border-style: dashed;
    background: #fbfcfe;
}
.tool-category-placeholder {
    border-style: dashed;
    background: #fbfcfe;
}
.tool-category-empty-slot {
    grid-column: 1 / -1;
    padding: 24px 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 11px;
    color: #64748b;
    background: rgba(255, 255, 255, .72);
    font-size: 12px;
    text-align: center;
}
.tool-card {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    min-height: 184px;
    padding: 22px;
    border: 1px solid var(--hall-border);
    border-radius: 13px;
    color: #1e293b;
    background: var(--hall-surface);
    cursor: pointer;
    text-align: left;
    transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}
.tool-card:hover {
    border-color: #93b4eb;
    box-shadow: 0 10px 26px rgba(15, 23, 42, .08);
    transform: translateY(-2px);
}
.tool-card:focus-visible,
.brand-home:focus-visible,
.back-to-hall:focus-visible {
    outline: 3px solid rgba(37, 99, 235, .22);
    outline-offset: 3px;
}
.tool-card.featured { border-color: #bfd2f5; }
.tool-card-mark,
.workspace-mark {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 11px;
    color: #1e40af;
    background: #dbeafe;
    font-size: 18px;
    font-weight: 700;
}
.tool-card-mark.tax, .workspace-mark.tax { color: #9f1239; background: #ffe4e6; }
.tool-card-mark.payroll, .workspace-mark.payroll { color: #166534; background: #dcfce7; }
.tool-card-mark.notice, .workspace-mark.notice { color: #9a3412; background: #ffedd5; }
.tool-card-mark.social-base, .workspace-mark.social-base { color: #0f766e; background: #ccfbf1; }
.tool-card-mark.social-fund, .workspace-mark.social-fund { color: #4338ca; background: #e0e7ff; }
.tool-card-mark.social-split, .workspace-mark.social-split { color: #0f766e; background: #ccfbf1; }
.tool-card-mark.input-vat, .workspace-mark.input-vat { color: #1d4ed8; background: #dbeafe; }
.tool-card-mark.reimbursement, .workspace-mark.reimbursement { color: #7c2d12; background: #ffedd5; }
.tool-card-mark.salary, .workspace-mark.salary { color: #854d0e; background: #fef9c3; }
.tool-card-mark.personal, .workspace-mark.personal { color: #6b21a8; background: #f3e8ff; }
.tool-card-mark.study, .workspace-mark.study { color: #0f766e; background: #ccfbf1; }
.tool-card-mark.receipt, .workspace-mark.receipt { color: #0f766e; background: #ccfbf1; }
.tool-card-mark.settlement, .workspace-mark.settlement { color: #1d4ed8; background: #dbeafe; }
.tool-card-mark.category, .workspace-mark.category { color: #6d28d9; background: #ede9fe; }
.tool-card-mark.archive, .workspace-mark.archive { color: #1e3a8a; background: #dbeafe; }
.tool-card-mark.payment-summary, .workspace-mark.payment-summary { color: #166534; background: #dcfce7; }
.tool-card-copy { display: flex; flex: 1; min-width: 0; flex-direction: column; height: 100%; }
.tool-card-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 22px;
    margin-bottom: 7px;
}
.tool-card-meta > span { color: var(--hall-muted); font-size: 11px; }
.tool-card-meta em {
    padding: 2px 7px;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 10px;
    font-style: normal;
    font-weight: 600;
}
.tool-card-copy > strong { color: #0f172a; font-size: 17px; }
.tool-card-copy > small {
    min-height: 44px;
    margin-top: 7px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.65;
}
.tool-card-action {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    color: #2563eb;
    font-size: 12px;
    font-weight: 600;
}
.tool-card-action b { font-size: 16px; font-weight: 500; transition: transform .16s ease; }
.tool-card:hover .tool-card-action b { transform: translateX(3px); }

.tool-workspace {
    padding: 26px 30px 34px;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: white;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .05);
}
.tool-workspace.external-tool-mode > :not(.workspace-nav):not(.workspace-heading):not(.external-tool-host) {
    display: none !important;
}
.external-tool-host {
    position: relative;
    min-height: 720px;
    margin: 0 -18px -22px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}
.external-tool-host iframe {
    display: block;
    width: 100%;
    min-height: max(720px, calc(100vh - 220px));
    border: 0;
    background: #fff;
}
.external-tool-loading {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: grid;
    place-items: center;
    color: #64748b;
    background: #f8fafc;
}
.workspace-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 18px;
    border-bottom: 1px solid #edf1f5;
}
.back-to-hall {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 0;
    border: 0;
    color: #475569;
    background: transparent;
    cursor: pointer;
    font-size: 13px;
}
.back-to-hall:hover { color: #1d4ed8; }
.workspace-breadcrumb { color: #94a3b8; font-size: 12px; }
.workspace-breadcrumb b { color: #475569; font-weight: 500; }
.workspace-heading {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 24px 0 22px;
}
.workspace-heading h1 { margin: 0; color: #0f172a; font-size: 24px; }
.workspace-heading p { margin: 5px 0 0; color: #64748b; font-size: 13px; line-height: 1.55; }
.workspace-section-title { margin: 24px 0 12px !important; color: #0f172a; font-size: 17px !important; }
.tool-workspace .tab-content { padding-top: 10px; }
.report-method-tabs { margin-top: 18px; }
.report-task-area { margin-top: 22px; }
.recent-section-title { margin: 30px 0 12px !important; color: #0f172a; font-size: 16px !important; }

.tool-workspace .system-notice {
    max-width: none;
    margin: 0 0 18px;
    padding: 13px 16px;
    border-left-color: #3b82f6;
    box-shadow: none;
}
.tool-workspace .system-notice p:first-child { color: #1e40af; }

/* 学习陪伴：一次安装、日常一键启动 */
.study-companion-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 260px;
    align-items: center;
    gap: 24px;
    padding: 24px 26px;
    border: 1px solid #ccfbf1;
    border-radius: 14px;
    background:
        radial-gradient(circle at 90% 10%, rgba(45, 212, 191, .15), transparent 30%),
        linear-gradient(135deg, #f0fdfa, #f8fafc);
}
.study-companion-eyebrow {
    display: inline-flex;
    margin-bottom: 8px;
    padding: 4px 9px;
    border-radius: 999px;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 11px;
    font-weight: 700;
}
.study-companion-hero h2 {
    margin: 0;
    color: #0f172a;
    font-size: 21px;
    line-height: 1.35;
}
.study-companion-hero p {
    max-width: 760px;
    margin: 9px 0 0;
    color: #475569;
    font-size: 13px;
    line-height: 1.75;
}
.study-companion-connection {
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 72px;
    padding: 14px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    background: rgba(255, 255, 255, .78);
}
.study-companion-connection > span {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 5px #f1f5f9;
}
.study-companion-connection > div { display: grid; min-width: 0; gap: 3px; }
.study-companion-connection strong { color: #334155; font-size: 13px; }
.study-companion-connection small { color: #64748b; font-size: 11px; }
.study-companion-connection.checking > span { animation: study-companion-pulse 1.1s infinite; }
.study-companion-connection.ready { border-color: #99f6e4; background: #f0fdfa; }
.study-companion-connection.ready > span { background: #14b8a6; box-shadow: 0 0 0 5px #ccfbf1; }
.study-companion-connection.ready strong { color: #115e59; }
.study-companion-connection.unavailable { border-color: #fed7aa; background: #fff7ed; }
.study-companion-connection.unavailable > span { background: #f97316; box-shadow: 0 0 0 5px #ffedd5; }
.study-companion-connection.unavailable strong { color: #9a3412; }
.study-companion-connection.outdated { border-color: #fcd34d; background: #fffbeb; }
.study-companion-connection.outdated > span { background: #d97706; box-shadow: 0 0 0 5px #fef3c7; }
.study-companion-connection.outdated strong { color: #92400e; }
@keyframes study-companion-pulse {
    50% { opacity: .35; transform: scale(.85); }
}
.study-companion-steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 16px 0;
    padding: 0;
    list-style: none;
}
.study-companion-steps li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
}
.study-companion-steps li:not(:last-child)::after {
    position: absolute;
    top: 50%;
    right: 0;
    width: 1px;
    height: 30px;
    background: #e2e8f0;
    content: "";
    transform: translateY(-50%);
}
.study-companion-steps b {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: #0f766e;
    background: #ccfbf1;
    font-size: 12px;
}
.study-companion-steps span { display: grid; gap: 2px; }
.study-companion-steps strong { color: #334155; font-size: 12px; }
.study-companion-steps small { color: #94a3b8; font-size: 10px; line-height: 1.4; }
.study-companion-install {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 12px;
    padding: 19px 21px;
    border: 1px solid #fed7aa;
    border-radius: 12px;
    background: #fffaf5;
}
.study-companion-install-tag {
    display: inline-block;
    margin-bottom: 6px;
    color: #c2410c;
    font-size: 10px;
    font-weight: 700;
}
.study-companion-install h3 { margin: 0; color: #7c2d12; font-size: 16px; }
.study-companion-install p { margin: 5px 0 0; color: #9a3412; font-size: 11px; line-height: 1.6; }
.study-companion-install-actions {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 9px;
}
.study-companion-download {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
}
.study-companion-guide {
    margin: 0 0 16px;
    padding: 0 16px;
    border: 1px solid #dbeafe;
    border-radius: 11px;
    background: #f8fbff;
}
.study-companion-guide summary {
    padding: 13px 0;
    color: #1e40af;
    cursor: pointer;
    font-size: 12px;
    font-weight: 700;
}
.study-companion-guide ol { margin: 0 0 10px 20px; padding: 0; color: #475569; font-size: 12px; line-height: 1.9; }
.study-companion-guide p { margin: 0 0 13px; color: #64748b; font-size: 11px; }
.study-companion-guide code { padding: 2px 5px; border-radius: 4px; background: #e2e8f0; }
.study-companion-control {
    padding: 22px;
    border: 1px solid #dbe4ee;
    border-radius: 13px;
    background: white;
}
.study-companion-control-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 16px;
    border-bottom: 1px solid #edf1f5;
}
.study-companion-control-head > div { display: grid; gap: 3px; }
.study-companion-control-head > div > span { color: #0f766e; font-size: 10px; font-weight: 700; letter-spacing: .08em; }
.study-companion-control-head h3 { margin: 0; color: #0f172a; font-size: 18px; }
.study-companion-local-only {
    padding: 5px 9px;
    border-radius: 999px;
    color: #166534;
    background: #dcfce7;
    font-size: 10px;
    font-weight: 600;
}
.study-companion-settings {
    display: grid;
    grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
    gap: 14px;
    margin-top: 17px;
}
.study-companion-settings > label {
    display: grid;
    gap: 7px;
    color: #475569;
    font-size: 11px;
}
.study-companion-settings select {
    width: 100%;
    height: 40px;
    padding: 0 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    background: white;
}
.study-companion-presence {
    display: flex !important;
    align-items: center;
    gap: 11px !important;
    padding: 10px 13px;
    border: 1px solid #dbe4ee;
    border-radius: 9px;
    background: #f8fafc;
    cursor: pointer;
}
.study-companion-presence input { flex: 0 0 auto; width: 17px; height: 17px; margin: 0; accent-color: #0f766e; }
.study-companion-presence > span { display: grid; gap: 2px; }
.study-companion-presence strong { color: #334155; font-size: 12px; }
.study-companion-presence small { color: #64748b; font-size: 10px; }
.study-companion-confirm { grid-column: 1 / -1; }
.study-companion-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}
.study-companion-actions button:disabled {
    cursor: not-allowed;
    opacity: .48;
}
.study-companion-live {
    margin-top: 18px;
    padding: 16px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #f8fafc;
}
.study-companion-live-head {
    display: flex;
    align-items: center;
    gap: 11px;
}
.study-companion-live-dot {
    flex: 0 0 auto;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #94a3b8;
    box-shadow: 0 0 0 5px #e2e8f0;
}
.study-companion-live-head > div { display: grid; gap: 3px; }
.study-companion-live-head strong { color: #334155; font-size: 13px; }
.study-companion-live-head small { color: #64748b; font-size: 11px; }
.study-companion-live.opening,
.study-companion-live.saving { border-color: #bfdbfe; background: #eff6ff; }
.study-companion-live.opening .study-companion-live-dot,
.study-companion-live.saving .study-companion-live-dot { background: #3b82f6; box-shadow: 0 0 0 5px #dbeafe; animation: study-companion-pulse 1.1s infinite; }
.study-companion-live.playing { border-color: #99f6e4; background: #f0fdfa; }
.study-companion-live.playing .study-companion-live-dot { background: #14b8a6; box-shadow: 0 0 0 5px #ccfbf1; }
.study-companion-live.attention { border-color: #fdba74; background: #fff7ed; }
.study-companion-live.attention .study-companion-live-dot { background: #f97316; box-shadow: 0 0 0 5px #ffedd5; }
.study-companion-live.complete { border-color: #bbf7d0; background: #f0fdf4; }
.study-companion-live.complete .study-companion-live-dot { background: #22c55e; box-shadow: 0 0 0 5px #dcfce7; }
.study-companion-current {
    display: grid;
    gap: 3px;
    margin-top: 13px;
    padding-top: 13px;
    border-top: 1px solid rgba(148, 163, 184, .24);
}
.study-companion-current span { color: #334155; font-size: 12px; font-weight: 600; }
.study-companion-current strong { color: #64748b; font-size: 11px; font-weight: 500; }
.study-companion-progress { margin-top: 12px; }
.study-companion-progress > div {
    display: flex;
    justify-content: space-between;
    margin-bottom: 6px;
    color: #64748b;
    font-size: 10px;
}
.study-companion-progress em { color: #0f766e; font-style: normal; font-weight: 700; }
.study-companion-progress progress { width: 100%; height: 7px; accent-color: #14b8a6; }
.study-companion-health {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 12px;
    margin-top: 12px;
    padding-top: 10px;
    border-top: 1px solid rgba(148, 163, 184, .24);
    color: #64748b;
    font-size: 10px;
}
.study-companion-health span { display: grid; gap: 2px; }
.study-companion-health strong { color: #334155; font-size: 11px; }
.study-companion-health small { color: #0f766e; grid-column: 1 / -1; }
.study-companion-boundary {
    margin-top: 13px;
    padding: 12px 14px;
    border-left: 3px solid #94a3b8;
    border-radius: 4px 9px 9px 4px;
    color: #475569;
    background: #f8fafc;
}
.study-companion-boundary strong { font-size: 11px; }
.study-companion-boundary p { margin: 4px 0 0; font-size: 10px; line-height: 1.65; }

/* 佣金结算：四步单向流程，每次只展示当前环节 */
.commission-workflow {
    margin: 0 0 20px;
    padding: 14px 16px;
    border: 1px solid #dbeafe;
    border-radius: 12px;
    background: #f8fbff;
}
.commission-workflow.hidden { display: none; }
.commission-stepper {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0;
    margin: 0;
    padding: 0;
    list-style: none;
}
.commission-stepper li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 7px 18px 7px 0;
    color: #94a3b8;
}
.commission-stepper li:not(:last-child)::after {
    content: "";
    position: absolute;
    top: 50%;
    right: 10px;
    width: 28px;
    height: 1px;
    background: #cbd5e1;
}
.commission-stepper li > b {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 28px;
    height: 28px;
    border: 1px solid #cbd5e1;
    border-radius: 50%;
    background: white;
    font-size: 12px;
}
.commission-stepper li > span { display: grid; min-width: 0; gap: 2px; }
.commission-stepper strong { font-size: 12px; white-space: nowrap; }
.commission-stepper small { overflow: hidden; font-size: 10px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.commission-stepper li.active { color: #1d4ed8; }
.commission-stepper li.active > b { border-color: #2563eb; color: white; background: #2563eb; box-shadow: 0 0 0 4px #dbeafe; }
.commission-stepper li.done { color: #166534; }
.commission-stepper li.done > b { border-color: #22c55e; color: white; background: #22c55e; }
.commission-stepper li.done:not(:last-child)::after { background: #86efac; }

.commission-stage-card {
    padding: 24px;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: white;
}
.commission-stage-heading {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    margin-bottom: 20px;
}
.commission-stage-heading > span {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 9px;
    color: white;
    background: #2563eb;
    font-size: 14px;
    font-weight: 700;
}
.commission-stage-heading > div { min-width: 0; }
.commission-stage-heading h2 { margin: 0 !important; color: #0f172a; font-size: 18px !important; }
.commission-stage-heading p { margin: 5px 0 0; color: #64748b; font-size: 12px; line-height: 1.55; }
.commission-stage-heading .commission-stage-back {
    flex: 0 0 auto;
    min-height: 36px;
    margin: 0 0 0 auto;
    padding: 8px 13px;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    color: #1d4ed8;
    background: #eff6ff;
    font-weight: 600;
    white-space: nowrap;
}
.commission-stage-heading .commission-stage-back:hover { border-color: #60a5fa; background: #dbeafe; }
.commission-stage-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    grid-column: 1 / -1;
    margin-top: 4px;
}
.commission-stage-actions button { margin: 0; }
.commission-stage-actions.back-only { justify-content: flex-start; margin-top: 18px; }
.commission-stage-actions.maintenance-done { margin-top: 18px; }
.commission-context-form {
    display: grid;
    grid-template-columns: minmax(250px, 2fr) repeat(3, minmax(140px, 1fr));
    gap: 14px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.commission-context-form .commission-field,
.commission-context-form .commission-field.compact { grid-column: span 1; }

.commission-category-decision { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.commission-decision-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 12px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.commission-decision-card.primary { border-color: #bfdbfe; background: #f8fbff; }
.commission-decision-mark {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #1d4ed8;
    background: #dbeafe;
    font-weight: 700;
}
.commission-decision-card strong { color: #1e293b; font-size: 14px; }
.commission-decision-card p { margin: 5px 0 0; color: #64748b; font-size: 11px; line-height: 1.55; }
.commission-decision-card button { grid-column: 1 / -1; width: 100%; margin: 4px 0 0; }
.category-maintenance-panel { margin-top: 18px; padding-top: 18px; border-top: 1px solid #e2e8f0; }
.category-note.compact { margin-bottom: 14px; padding: 14px 16px; }
.category-note.compact p:first-child { margin-top: 0; }
.category-library-details { margin-top: 20px; border: 1px solid #e2e8f0; border-radius: 9px; background: #f8fafc; }
.category-library-details > summary { padding: 13px 15px; color: #475569; cursor: pointer; font-size: 12px; font-weight: 600; }
.category-library-details[open] { padding: 0 14px 14px; }
.category-library-details[open] > summary { margin: 0 -14px 8px; border-bottom: 1px solid #e2e8f0; }

.commission-calculation-rule {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #475569;
    background: #eff6ff;
    font-size: 12px;
}
.commission-calculation-rule strong { flex: 0 0 auto; color: #1e40af; }
.commission-upload-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.commission-file-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px 12px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.commission-file-card > span:nth-child(2) { display: grid; gap: 4px; }
.commission-file-card strong { color: #1e293b; font-size: 13px; }
.commission-file-card strong b { color: #dc2626; }
.commission-file-card small { color: #64748b; font-size: 11px; line-height: 1.45; }
.commission-file-number {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border-radius: 7px;
    color: #1d4ed8;
    background: #dbeafe;
    font-size: 12px;
    font-weight: 700;
}
.commission-file-card input[type="file"] {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 9px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    background: white;
    font-size: 12px;
}
.commission-upload-error { grid-column: 1 / -1; padding: 10px 12px; border-radius: 7px; color: #991b1b; background: #fef2f2; font-size: 12px; }
.commission-output-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.commission-output-actions button { margin: 0; }

/* 客户承接品类库 */
.category-note {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #ddd6fe;
    border-radius: 10px;
    color: #3b2768;
    background: #faf9ff;
    font-size: 13px;
    line-height: 1.7;
}
.category-note p { margin: 12px 0 0; }
.category-note strong { color: #6d28d9; }
.category-privacy { color: #64748b; }
.category-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.category-flow span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #ede9fe;
    border-radius: 7px;
    color: #334155;
    background: white;
    font-size: 12px;
    font-weight: 600;
}
.category-flow b {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: white;
    background: #7c3aed;
    font-size: 11px;
}
.category-context {
    display: grid;
    grid-template-columns: minmax(260px, 2fr) minmax(150px, 1fr) minmax(150px, 1fr);
    gap: 14px;
    padding: 17px 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.category-field,
.category-manual-form label,
.category-candidate-fields label {
    display: grid;
    gap: 7px;
    min-width: 0;
}
.category-field > span,
.category-manual-form label > span,
.category-candidate-fields label > span { color: #334155; font-size: 12px; font-weight: 600; }
.category-field b,
.category-manual-form b { color: #dc2626; }
.category-field input,
.category-field select,
.category-manual-form input,
.category-manual-form select,
.category-candidate-fields input,
.category-candidate-fields select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    box-sizing: border-box;
    font-size: 13px;
}
.category-field small { color: #64748b; font-size: 11px; line-height: 1.45; }
.category-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 18px;
    margin: 13px 0;
    padding: 11px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #64748b;
    background: white;
    font-size: 12px;
}
.category-stats strong, .category-stats b { color: #4c1d95; }
.category-action-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}
.category-action-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    gap: 12px 14px;
    padding: 17px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: white;
}
.category-action-card.featured { border-color: #c4b5fd; background: #faf9ff; }
.category-action-card > div { grid-column: 1 / -1; }
.category-action-card strong { color: #1e293b; font-size: 14px; }
.category-action-card p { margin: 5px 0 0; color: #64748b; font-size: 11px; line-height: 1.5; }
.category-action-card input[type="file"] {
    min-width: 0;
    padding: 7px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    font-size: 11px;
}
.category-action-card button { margin: 0; white-space: nowrap; }
.category-progress {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    color: #5b21b6;
    background: #f5f3ff;
}
.category-progress.failed { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.category-progress > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.category-progress progress { width: 100%; height: 8px; margin-top: 9px; accent-color: #7c3aed; }
.category-section-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 16px;
    margin: 27px 0 10px;
}
.category-section-heading.recent { margin-top: 30px; }
.category-section-heading h3 { margin: 0; color: #0f172a; font-size: 16px; }
.category-section-heading p { margin: 4px 0 0; color: #94a3b8; font-size: 11px; }
.category-manual-form {
    display: grid;
    grid-template-columns: 1.35fr 1fr 1fr 1fr auto;
    align-items: end;
    gap: 10px;
    padding: 13px;
    border: 1px dashed #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
}
.category-manual-form button { min-height: 40px; margin: 0; white-space: nowrap; }
.category-rule-list { display: grid; gap: 8px; margin-top: 10px; }
.category-rule-row {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    padding: 11px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}
.category-rule-row.inactive { opacity: .68; background: #f8fafc; }
.category-rule-status {
    padding: 4px 7px;
    border-radius: 999px;
    color: #166534;
    background: #dcfce7;
    font-size: 10px;
    text-align: center;
}
.category-rule-row.inactive .category-rule-status { color: #64748b; background: #e2e8f0; }
.category-rule-copy { display: grid; min-width: 0; gap: 3px; }
.category-rule-copy strong { overflow: hidden; color: #1e293b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.category-rule-copy small { color: #475569; font-size: 11px; }
.category-rule-copy em { color: #94a3b8; font-size: 10px; font-style: normal; }
.category-empty { padding: 24px; border: 1px dashed #cbd5e1; border-radius: 8px; color: #64748b; text-align: center; }
.category-empty strong { color: #334155; }
.category-empty p { margin: 5px 0 0; font-size: 12px; }
.category-review {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #c4b5fd;
    border-radius: 10px;
    background: white;
}
.category-review.error { padding: 16px 18px; border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.category-review.error p { margin: 5px 0 0; }
.category-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 16px 18px;
    border-bottom: 1px solid #ede9fe;
    background: #faf9ff;
}
.category-review-head strong { color: #4c1d95; font-size: 15px; }
.category-review-head p { margin: 4px 0 0; color: #64748b; font-size: 11px; }
.category-review-head button { margin: 0; white-space: nowrap; }
.category-done-badge { padding: 5px 10px; border-radius: 999px; color: #166534; background: #dcfce7; font-size: 11px; }
.category-candidate-list { display: grid; gap: 0; }
.category-candidate {
    display: grid;
    grid-template-columns: 210px minmax(0, 1fr);
    gap: 16px;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
}
.category-candidate:last-child { border-bottom: 0; }
.category-candidate.existing { background: #fbfefc; }
.category-candidate-image {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 190px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.category-candidate-image img { width: 100%; height: 210px; object-fit: contain; background: white; }
.category-candidate-image > span { display: none; padding: 16px; color: #94a3b8; font-size: 11px; text-align: center; }
.category-candidate-image.missing img { display: none; }
.category-candidate-image.missing > span { display: block; }
.category-candidate-body { min-width: 0; }
.category-candidate-title { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 10px; margin-bottom: 12px; }
.category-candidate-title strong { max-width: 100%; overflow: hidden; color: #1e293b; font-size: 13px; text-overflow: ellipsis; white-space: nowrap; }
.category-candidate-title span { padding: 3px 7px; border-radius: 999px; color: #6d28d9; background: #ede9fe; font-size: 10px; }
.category-candidate.existing .category-candidate-title span { color: #166534; background: #dcfce7; }
.category-candidate-title em { color: #94a3b8; font-size: 10px; font-style: normal; }
.category-candidate-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 9px 12px; }
.category-candidate-fields label.decision { grid-column: 1 / -1; }
.category-candidate-fields input,
.category-candidate-fields select { min-height: 36px; padding: 6px 9px; font-size: 12px; }
.category-candidate-fields input:disabled,
.category-candidate-fields select:disabled { color: #64748b; background: #f1f5f9; }
.category-product-name, .category-library-reason, .category-evidence { margin: 9px 0 0; color: #64748b; font-size: 11px; line-height: 1.55; }
.category-product-name b, .category-library-reason b, .category-evidence b { color: #475569; }
.category-library-reason { color: #5b21b6; }
.category-candidate-warnings { margin: 8px 0 0; padding-left: 18px; color: #92400e; font-size: 11px; line-height: 1.55; }
.category-recent { display: grid; gap: 8px; }
.category-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    background: white;
    cursor: pointer;
    text-align: left;
}
.category-recent-item:hover { border-color: #c4b5fd; background: #faf9ff; }
.category-recent-item > span:first-child { display: grid; min-width: 0; gap: 3px; }
.category-recent-item strong { color: #334155; font-size: 12px; }
.category-recent-item small { color: #94a3b8; font-size: 11px; }
.category-recent-item em { color: #b91c1c; font-size: 11px; font-style: normal; }
.category-recent-item > span:last-child { flex: 0 0 auto; font-size: 11px; }
.category-recent-item.review > span:last-child { color: #6d28d9; }
.category-recent-item.success > span:last-child { color: #166534; }
.category-recent-item.failed > span:last-child { color: #b91c1c; }

/* 佣金结算 */
.commission-note {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #bfdbfe;
    border-radius: 10px;
    color: #1e3a5f;
    background: #f8fbff;
    font-size: 13px;
    line-height: 1.7;
}
.commission-note p { margin: 12px 0 0; }
.commission-note strong { color: #1e40af; }
.commission-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.commission-flow span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border: 1px solid #dbeafe;
    border-radius: 7px;
    color: #334155;
    background: white;
    font-size: 12px;
    font-weight: 600;
}
.commission-flow b {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: white;
    background: #2563eb;
    font-size: 11px;
}
.commission-privacy { color: #64748b; }
.commission-form {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: 14px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.commission-field { display: grid; grid-column: span 5; gap: 7px; min-width: 0; }
.commission-field.compact { grid-column: span 2; }
.commission-field.source { grid-column: span 3; }
.commission-field.file { grid-column: span 4; }
.commission-field > span { color: #334155; font-size: 13px; font-weight: 600; }
.commission-field > span b { color: #dc2626; }
.commission-field input,
.commission-field select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    box-sizing: border-box;
    font-size: 13px;
}
.commission-field input[type="file"] { padding: 6px 8px; }
.commission-field input:focus,
.commission-field select:focus { outline: 2px solid rgba(37, 99, 235, .18); border-color: #60a5fa; }
.commission-field small { min-height: 32px; color: #64748b; font-size: 11px; line-height: 1.45; }
.commission-rate-input { position: relative; }
.commission-rate-input input { padding-right: 34px; }
.commission-rate-input em {
    position: absolute;
    top: 50%;
    right: 12px;
    color: #64748b;
    font-size: 12px;
    font-style: normal;
    transform: translateY(-50%);
}
.commission-form > .btn-primary { grid-column: 1 / -1; width: max-content; min-height: 40px; }
.commission-progress {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1e40af;
    background: #eff6ff;
}
.commission-progress.failed { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.commission-progress > div { display: flex; justify-content: space-between; gap: 12px; font-size: 12px; }
.commission-progress progress { width: 100%; height: 8px; margin-top: 9px; accent-color: #2563eb; }
.commission-result {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: white;
}
.commission-result.error { padding: 16px 18px; border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.commission-result.error p { margin: 5px 0 0; }
.commission-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 18px;
    background: #f0fdf4;
}
.commission-result-head > div:first-child { display: flex; align-items: center; gap: 11px; }
.commission-success-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    background: #16a34a;
    font-weight: 700;
}
.commission-result-head strong { color: #14532d; font-size: 15px; }
.commission-result-head p { margin: 3px 0 0; color: #4b5563; font-size: 12px; }
.commission-downloads { display: flex; gap: 9px; }
.commission-downloads button { margin: 0; white-space: nowrap; }
.commission-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #dcfce7;
    border-bottom: 1px solid #e2e8f0;
}
.commission-summary-grid > div { display: grid; gap: 6px; padding: 16px 18px; border-right: 1px solid #e2e8f0; }
.commission-summary-grid > div:last-child { border-right: 0; }
.commission-summary-grid span { color: #64748b; font-size: 11px; }
.commission-summary-grid strong { color: #0f172a; font-size: 17px; }
.commission-summary-grid .total strong { color: #1d4ed8; }
.commission-summary-grid .settlement strong { color: #9f1239; }
.commission-match-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 9px 18px;
    padding: 12px 18px;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    background: #f8fafc;
    font-size: 11px;
}
.commission-match-summary b { color: #334155; }
.commission-warnings { margin: 14px 18px 17px; font-size: 12px; }
.commission-warnings summary { color: #92400e; cursor: pointer; font-weight: 600; }
.commission-warnings ul { margin: 9px 0 0; padding-left: 20px; color: #78350f; line-height: 1.65; }
.commission-no-warning { margin: 14px 18px 17px; color: #166534; font-size: 12px; }
.commission-recent-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 28px 0 10px;
}
.commission-recent-heading h3 { margin: 0; color: #0f172a; font-size: 16px; }
.commission-recent-heading p { margin: 4px 0 0; color: #94a3b8; font-size: 11px; }
.commission-recent { display: grid; gap: 8px; }
.commission-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    background: white;
    cursor: pointer;
    text-align: left;
}
.commission-recent-item:hover { border-color: #93c5fd; background: #f8fbff; }
.commission-recent-item > span:first-child { display: grid; min-width: 0; gap: 3px; }
.commission-recent-item strong { overflow: hidden; color: #334155; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.commission-recent-item small { color: #94a3b8; font-size: 11px; }
.commission-recent-item em { color: #b91c1c; font-size: 11px; font-style: normal; }
.commission-recent-item > span:last-child { flex: 0 0 auto; font-size: 11px; }
.commission-recent-item.success > span:last-child { color: #166534; }
.commission-recent-item.failed > span:last-child { color: #b91c1c; }

/* 独立税负测算 */
.tax-burden-note {
    margin-bottom: 20px;
    padding: 18px;
    border: 1px solid #fecdd3;
    border-radius: 10px;
    background: #fffafb;
    color: #4c1d2b;
    font-size: 13px;
    line-height: 1.7;
}
.tax-burden-note p { margin: 12px 0 0; }
.tax-burden-flow {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}
.tax-burden-flow span {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 12px;
    border-radius: 7px;
    color: #334155;
    background: white;
    border: 1px solid #f1d5db;
    font-size: 12px;
    font-weight: 600;
}
.tax-burden-flow b {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    color: white;
    background: #be123c;
    font-size: 11px;
}
.tax-burden-privacy { color: #64748b; }
.tax-burden-form {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr) minmax(210px, .9fr) auto;
    align-items: end;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #f8fafc;
}
.tax-burden-field { display: grid; gap: 7px; min-width: 0; }
.tax-burden-field > span { color: #334155; font-size: 13px; font-weight: 600; }
.tax-burden-field > span b { color: #dc2626; }
.tax-burden-field > span em { color: #94a3b8; font-size: 11px; font-style: normal; font-weight: 400; }
.tax-burden-field input,
.tax-burden-field select {
    width: 100%;
    min-height: 40px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    box-sizing: border-box;
    font-size: 13px;
}
.tax-burden-field select { cursor: pointer; }
.tax-burden-field input:focus,
.tax-burden-field select:focus { outline: 2px solid rgba(37, 99, 235, .18); border-color: #60a5fa; }
.tax-burden-field small { color: #64748b; font-size: 11px; line-height: 1.45; }
.tax-burden-form .btn-primary { min-height: 40px; margin: 0 0 24px; white-space: nowrap; }
.tax-burden-file-list {
    grid-column: 1 / -1;
    display: grid;
    gap: 9px;
    padding-top: 4px;
}
.tax-burden-file-list-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: #334155;
    font-size: 12px;
}
.tax-burden-file-list-head span { color: #64748b; }
.tax-burden-order-toolbar {
    display: grid;
    gap: 7px;
    padding: 11px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #f8fafc;
}
.tax-burden-order-toolbar > div { display: grid; gap: 3px; }
.tax-burden-order-toolbar strong { color: #334155; font-size: 12px; }
.tax-burden-order-toolbar small { color: #64748b; font-size: 11px; line-height: 1.45; }
.tax-burden-order-toolbar > span {
    overflow: hidden;
    color: #1d4ed8;
    font-size: 11px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tax-burden-group-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 11px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #eff6ff;
}
.tax-burden-group-toolbar > div { display: grid; gap: 3px; }
.tax-burden-group-toolbar strong { color: #1e3a8a; font-size: 12px; }
.tax-burden-group-toolbar small { color: #475569; font-size: 11px; line-height: 1.45; }
.tax-burden-group-toolbar button { flex: 0 0 auto; margin: 0; }
.tax-burden-display-groups { display: grid; gap: 8px; }
.tax-burden-group-empty {
    margin: 0;
    padding: 9px 12px;
    border: 1px dashed #cbd5e1;
    border-radius: 7px;
    color: #64748b;
    background: #f8fafc;
    font-size: 11px;
}
.tax-burden-display-group {
    display: grid;
    grid-template-columns: minmax(220px, 1.3fr) minmax(220px, 1fr) auto;
    align-items: end;
    gap: 12px;
    padding: 11px 12px;
    border: 1px solid #93c5fd;
    border-radius: 8px;
    background: #f8fbff;
}
.tax-burden-display-group > div,
.tax-burden-display-group label { display: grid; gap: 4px; min-width: 0; }
.tax-burden-display-group > div strong { color: #1e3a8a; font-size: 12px; }
.tax-burden-display-group > div span,
.tax-burden-display-group label > span { color: #64748b; font-size: 11px; }
.tax-burden-display-group input {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid #93c5fd;
    border-radius: 6px;
    box-sizing: border-box;
    background: white;
    font-size: 12px;
}
.tax-burden-display-group button { margin: 0; }
.tax-burden-file-row {
    display: grid;
    grid-template-columns: 112px minmax(220px, 1.3fr) minmax(180px, 1fr) minmax(190px, .9fr);
    align-items: end;
    gap: 12px;
    padding: 12px;
    border: 1px solid #dbe4ee;
    border-radius: 8px;
    background: white;
}
.tax-burden-file-row.grouped { border-color: #93c5fd; background: #f8fbff; }
.tax-burden-row-actions {
    display: grid;
    align-self: stretch;
    align-content: center;
    gap: 8px;
}
.tax-burden-merge-choice {
    align-self: center;
    grid-template-columns: auto 1fr !important;
    align-items: center;
    gap: 7px !important;
    color: #475569;
    white-space: nowrap;
}
.tax-burden-file-row .tax-burden-merge-choice input {
    width: 16px;
    min-height: 16px;
    margin: 0;
    padding: 0;
}
.tax-burden-file-row .tax-burden-merge-choice input:disabled { cursor: not-allowed; opacity: .55; }
.tax-burden-order-controls {
    display: grid;
    grid-template-columns: 26px 28px 26px;
    align-items: center;
    gap: 4px;
}
.tax-burden-order-move {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    margin: 0;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #334155;
    background: white;
    cursor: pointer;
    font-size: 14px;
}
.tax-burden-order-move:hover:not(:disabled) { border-color: #60a5fa; color: #1d4ed8; background: #eff6ff; }
.tax-burden-order-move:disabled { color: #cbd5e1; background: #f8fafc; cursor: not-allowed; }
.tax-burden-order-badge {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    color: white;
    background: #2563eb;
    font-size: 12px;
}
.tax-burden-file-group-badge {
    width: max-content;
    max-width: 100%;
    padding: 2px 6px;
    border-radius: 4px;
    color: #1d4ed8 !important;
    background: #dbeafe;
    font-weight: 600;
}
.tax-burden-file-name {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.tax-burden-file-name > b {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: white;
    background: #64748b;
    font-size: 11px;
}
.tax-burden-file-name > span { display: grid; min-width: 0; gap: 3px; }
.tax-burden-file-name strong {
    overflow: hidden;
    color: #334155;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tax-burden-file-name small { color: #94a3b8; font-size: 10px; }
.tax-burden-company-members { color: #2563eb !important; }
.tax-burden-file-row label { display: grid; gap: 5px; min-width: 0; }
.tax-burden-file-row label > span { color: #64748b; font-size: 11px; }
.tax-burden-file-row input,
.tax-burden-file-row select {
    width: 100%;
    min-height: 36px;
    padding: 7px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: white;
    box-sizing: border-box;
    font-size: 12px;
}
.tax-burden-status {
    margin-top: 14px;
    padding: 11px 13px;
    border-radius: 7px;
    color: #1e40af;
    background: #eff6ff;
    font-size: 13px;
}
.tax-burden-status.success { color: #166534; background: #f0fdf4; }
.tax-burden-status.error { color: #991b1b; background: #fef2f2; }
.tax-burden-standalone-result {
    margin-top: 16px;
    overflow: hidden;
    border: 1px solid #bbf7d0;
    border-radius: 10px;
    background: white;
}
.tax-burden-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px 18px;
    background: #f0fdf4;
}
.tax-burden-result-head > div { display: flex; align-items: center; gap: 11px; }
.tax-burden-success-mark {
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    background: #16a34a;
    font-weight: 700;
}
.tax-burden-result-head strong { color: #14532d; font-size: 15px; }
.tax-burden-result-head p { margin: 3px 0 0; color: #4b5563; font-size: 12px; }
.tax-burden-result-head .btn-primary { margin: 0; }
.tax-burden-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-top: 1px solid #dcfce7;
    border-bottom: 1px solid #e2e8f0;
}
.tax-burden-summary-grid > div { display: grid; gap: 6px; padding: 16px 18px; border-right: 1px solid #e2e8f0; }
.tax-burden-summary-grid > div:last-child { border-right: 0; }
.tax-burden-summary-grid span { color: #64748b; font-size: 11px; }
.tax-burden-summary-grid strong { color: #0f172a; font-size: 17px; }
.tax-burden-summary-grid .rate strong { color: #be123c; }
.tax-burden-policy-result {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    background: #f8fafc;
    font-size: 12px;
}
.tax-burden-policy-result span { color: #64748b; }
.tax-burden-policy-result strong { color: #334155; }
.tax-burden-policy-result em { margin-left: auto; color: #475569; font-style: normal; }
.tax-burden-policy-result.applied { background: #fff7ed; }
.tax-burden-policy-result.applied strong,
.tax-burden-policy-result.applied em { color: #9a3412; }
.tax-burden-company-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    padding: 13px 18px 2px;
}
.tax-burden-company-list > div {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #f8fafc;
}
.tax-burden-company-list span { display: grid; min-width: 0; gap: 2px; }
.tax-burden-company-list strong {
    overflow: hidden;
    color: #334155;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tax-burden-company-list small { color: #64748b; font-size: 10px; }
.tax-burden-company-list b { flex: 0 0 auto; color: #be123c; font-size: 13px; }
.tax-burden-warnings { margin: 14px 18px 17px; font-size: 12px; }
.tax-burden-warnings summary { color: #92400e; cursor: pointer; font-weight: 600; }
.tax-burden-warnings ul { margin: 9px 0 0; padding-left: 20px; color: #78350f; line-height: 1.65; }
.tax-burden-no-warning { margin: 14px 18px 17px; color: #166534; font-size: 12px; }
.tax-burden-recent-heading {
    display: flex;
    align-items: end;
    justify-content: space-between;
    margin: 28px 0 10px;
}
.tax-burden-recent-heading h3 { margin: 0; color: #0f172a; font-size: 16px; }
.tax-burden-recent-heading p { margin: 4px 0 0; color: #94a3b8; font-size: 11px; }
.btn-text { padding: 5px 0; border: 0; color: #2563eb; background: transparent; cursor: pointer; font-size: 12px; }
.tax-burden-recent { display: grid; gap: 8px; }
.tax-burden-recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: white;
}
.tax-burden-recent-item > div { display: grid; min-width: 0; gap: 3px; }
.tax-burden-recent-item strong { overflow: hidden; color: #334155; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.tax-burden-recent-item small { color: #94a3b8; font-size: 11px; }
.tax-burden-recent-item em { color: #b91c1c; font-size: 11px; font-style: normal; }
.tax-burden-recent-actions { display: flex; align-items: center; gap: 12px; white-space: nowrap; }
.tax-burden-recent-actions b { color: #166534; font-size: 11px; font-weight: 600; }
.tax-burden-recent-item.failed .tax-burden-recent-actions b { color: #b91c1c; }
.tax-burden-recent-actions .btn-secondary { padding: 6px 12px; font-size: 11px; }
.tax-burden-action-divider { color: #94a3b8; }

.tax-burden-policy-modal {
    width: min(520px, calc(100vw - 36px));
    box-sizing: border-box;
}
.tax-burden-policy-modal .modal-close { width: auto; background: transparent; color: #64748b; }
.tax-burden-policy-kicker {
    display: block;
    margin-bottom: 6px;
    color: #be123c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .08em;
}
.tax-burden-policy-modal h2 { margin: 0; color: #0f172a; font-size: 20px; }
.tax-burden-policy-source {
    overflow: hidden;
    margin: 8px 0 18px;
    color: #64748b;
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.tax-burden-policy-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 8px;
}
.tax-burden-policy-fields label { display: grid; gap: 5px; min-width: 0; }
.tax-burden-policy-fields span { color: #475569; font-size: 12px; font-weight: 600; }
.tax-burden-policy-fields b { color: #dc2626; }
.tax-burden-policy-fields input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    box-sizing: border-box;
    font-size: 13px;
}
.tax-burden-policy-fields input:focus {
    outline: 2px solid rgba(37, 99, 235, .18);
    border-color: #60a5fa;
}
.tax-burden-policy-hint {
    margin: 0 0 10px;
    color: #64748b;
    font-size: 11px;
    line-height: 1.5;
}
.tax-burden-policy-modal > .error {
    min-height: 18px;
    margin: 0 0 8px;
    color: #b91c1c;
    font-size: 12px;
}
.tax-burden-policy-choices { display: grid; gap: 10px; }
.tax-burden-policy-modal .tax-burden-policy-choice {
    display: grid;
    gap: 5px;
    width: 100%;
    padding: 14px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #334155;
    background: #f8fafc;
    text-align: left;
}
.tax-burden-policy-modal .tax-burden-policy-choice:hover { border-color: #94a3b8; background: #f1f5f9; }
.tax-burden-policy-modal .tax-burden-policy-choice.lishui { border-color: #fdba74; background: #fff7ed; }
.tax-burden-policy-modal .tax-burden-policy-choice.lishui:hover { border-color: #f97316; background: #ffedd5; }
.tax-burden-policy-choice strong { font-size: 14px; }
.tax-burden-policy-choice small { color: #64748b; font-size: 11px; line-height: 1.5; }
.tax-burden-policy-modal .modal-buttons { margin-top: 14px; }
.tax-burden-policy-modal .modal-buttons button { width: auto; padding: 8px 18px; }

/* ==================== 工资表截图 → 缴税缴费及工资打款通知 ==================== */
.payroll-notice-intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 18px 20px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: linear-gradient(135deg, #fff7ed, #fff);
}
.payroll-notice-intro > div { min-width: 0; }
.payroll-notice-intro strong { color: #7c2d12; font-size: 17px; }
.payroll-notice-intro p { margin: 6px 0 0; color: #64748b; font-size: 13px; line-height: 1.65; }
.payroll-notice-intro > span {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    color: #166534;
    background: #dcfce7;
    font-size: 11px;
    font-weight: 600;
}
.payroll-notice-rule {
    display: flex;
    gap: 10px;
    margin: 12px 0;
    padding: 11px 14px;
    border-left: 3px solid #f59e0b;
    color: #92400e;
    background: #fffbeb;
    font-size: 12px;
    line-height: 1.6;
}
.payroll-notice-rule b { flex: 0 0 auto; }
.payroll-notice-service {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 12px 0;
    padding: 10px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    background: #f8fafc;
    font-size: 12px;
}
.payroll-notice-service strong { flex: 0 0 auto; }
.payroll-notice-service span { color: currentColor; opacity: .78; }
.payroll-notice-service.ready { border-color: #bbf7d0; color: #166534; background: #f0fdf4; }
.payroll-notice-service.unavailable { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.payroll-notice-upload {
    display: grid;
    gap: 10px;
    padding: 18px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.payroll-notice-dropzone {
    display: flex;
    align-items: center;
    gap: 14px;
    min-height: 94px;
    padding: 16px 18px;
    border: 1px dashed #94a3b8;
    border-radius: 9px;
    outline: 0;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.payroll-notice-dropzone:hover,
.payroll-notice-dropzone:focus,
.payroll-notice-dropzone.dragging {
    border-color: #f59e0b;
    background: #fffbeb;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, .12);
}
.payroll-notice-dropzone.has-file { border-style: solid; border-color: #86efac; background: #f0fdf4; }
.payroll-notice-drop-icon {
    display: grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    place-items: center;
    border-radius: 10px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 18px;
    font-weight: 700;
}
.payroll-notice-drop-copy { display: grid; flex: 1; min-width: 0; gap: 5px; }
.payroll-notice-drop-copy strong { color: #0f172a; font-size: 14px; }
.payroll-notice-drop-copy small { color: #64748b; font-size: 11px; line-height: 1.55; }
.payroll-notice-dropzone .btn-secondary { flex: 0 0 auto; margin: 0; }
.payroll-notice-file-feedback { color: #64748b; font-size: 12px; }
.payroll-notice-file-feedback.success { color: #166534; }
.payroll-notice-file-feedback.error { color: #991b1b; }
.payroll-notice-file-pair {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    color: #334155;
}
.payroll-notice-file-pair > span {
    overflow: hidden;
    padding: 7px 9px;
    border: 1px solid #bbf7d0;
    border-radius: 6px;
    background: #f0fdf4;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.payroll-notice-file-pair > span.optional { border-color: #e2e8f0; color: #64748b; background: #f8fafc; }
.payroll-notice-file-pair b { margin-right: 7px; color: #166534; font-size: 10px; }
.payroll-notice-file-pair > span.optional b { color: #64748b; }
.payroll-notice-file-pair button {
    padding: 7px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #334155;
    background: #fff;
    font-size: 10px;
    cursor: pointer;
}
.payroll-notice-file-pair small { grid-column: 1 / -1; color: #64748b; }
.payroll-notice-upload > .btn-primary { width: max-content; min-width: 170px; margin: 0; }
.payroll-notice-upload > .btn-primary:disabled { opacity: .5; cursor: not-allowed; }
.payroll-notice-progress {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 12px;
}
.payroll-notice-progress.success { border-color: #bbf7d0; color: #166534; background: #f0fdf4; }
.payroll-notice-progress.error { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
#tab-payroll-notice.has-workbench > .payroll-notice-intro,
#tab-payroll-notice.has-workbench > .payroll-notice-rule,
#tab-payroll-notice.has-workbench > .payroll-notice-service,
#tab-payroll-notice.has-workbench > .payroll-notice-upload { display: none; }
#tab-payroll-notice.has-workbench > .payroll-notice-progress { margin: 0 0 12px; }
.payroll-notice-workbench {
    display: grid;
    grid-template-columns: minmax(360px, .92fr) minmax(0, 1.35fr);
    align-items: start;
    gap: 14px;
}
.payroll-notice-source-card,
.payroll-notice-work-pane {
    box-sizing: border-box;
    height: min(760px, calc(100vh - 96px));
    min-height: 570px;
    border: 1px solid #dbe3ee;
    border-radius: 10px;
    background: #fff;
}
.payroll-notice-source-card {
    position: sticky;
    top: 76px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.payroll-notice-source-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
}
.payroll-notice-source-head strong { display: block; color: #0f172a; font-size: 14px; }
.payroll-notice-source-head small { display: block; margin-top: 3px; color: #64748b; font-size: 10px; }
.payroll-notice-source-head .btn-secondary { flex: 0 0 auto; margin: 0; padding: 7px 11px; font-size: 11px; }
.payroll-notice-source-tabs {
    display: flex;
    gap: 5px;
    padding: 7px 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #fff;
}
.payroll-notice-source-tabs button,
.payroll-notice-subtable-head button {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #475569;
    background: #fff;
    font-size: 10px;
    cursor: pointer;
}
.payroll-notice-source-tabs button.active {
    border-color: #60a5fa;
    color: #1d4ed8;
    background: #eff6ff;
    font-weight: 600;
}
.payroll-notice-image-tools {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 8px 10px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.payroll-notice-image-tools button {
    min-width: 30px;
    height: 28px;
    padding: 0 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    color: #334155;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
}
.payroll-notice-image-tools button:hover,
.payroll-notice-image-tools button.active {
    border-color: #60a5fa;
    color: #1d4ed8;
    background: #eff6ff;
}
.payroll-notice-image-tools span {
    min-width: 58px;
    color: #64748b;
    font-size: 10px;
    text-align: center;
}
.payroll-notice-image-viewport {
    flex: 1;
    overflow: auto;
    background-color: #eef2f7;
    background-image:
        linear-gradient(45deg, rgba(148, 163, 184, .12) 25%, transparent 25%),
        linear-gradient(-45deg, rgba(148, 163, 184, .12) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, rgba(148, 163, 184, .12) 75%),
        linear-gradient(-45deg, transparent 75%, rgba(148, 163, 184, .12) 75%);
    background-position: 0 0, 0 8px, 8px -8px, -8px 0;
    background-size: 16px 16px;
}
.payroll-notice-image-viewport img {
    display: block;
    height: auto;
    background: #fff;
    transform-origin: top left;
}
.payroll-notice-source-card > p {
    margin: 0;
    padding: 9px 12px;
    border-top: 1px solid #e2e8f0;
    color: #475569;
    background: #fff;
    font-size: 10px;
    line-height: 1.5;
}
.payroll-notice-work-pane {
    overflow: auto;
    background: #f8fafc;
}
.payroll-notice-view-tabs {
    position: sticky;
    z-index: 8;
    top: 0;
    display: flex;
    gap: 4px;
    padding: 8px 10px 0;
    border-bottom: 1px solid #dbe3ee;
    background: rgba(248, 250, 252, .97);
    backdrop-filter: blur(8px);
}
.payroll-notice-view-tabs button {
    position: relative;
    padding: 9px 16px 10px;
    border: 0;
    border-bottom: 2px solid transparent;
    color: #64748b;
    background: transparent;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
}
.payroll-notice-view-tabs button.active { border-bottom-color: #2563eb; color: #1d4ed8; }
.payroll-notice-view-tabs button.ready::after {
    position: absolute;
    top: 7px;
    right: 6px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #22c55e;
    content: "";
}
.payroll-notice-view-tabs button:disabled { opacity: .45; cursor: default; }
.payroll-notice-work-pane > .payroll-notice-review,
.payroll-notice-work-pane > .payroll-notice-result {
    margin: 0;
    border: 0;
    border-radius: 0;
}
.payroll-notice-work-pane .payroll-notice-table-wrap { max-height: 430px; }
.payroll-notice-review {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    background: #fff;
}
.payroll-notice-review-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.payroll-notice-review-head h2 { margin: 0; color: #0f172a; font-size: 16px; }
.payroll-notice-review-head p { margin: 4px 0 0; color: #64748b; font-size: 11px; }
.payroll-notice-review-head-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.payroll-notice-review-head-actions > span {
    padding: 4px 8px;
    border-radius: 999px;
    color: #475569;
    background: #f1f5f9;
    font-size: 11px;
}
.payroll-notice-review-head-actions button {
    padding: 5px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    color: #334155;
    background: #fff;
    font-size: 11px;
    cursor: pointer;
}
.payroll-notice-review-head-actions button[aria-pressed="true"] {
    border-color: #f59e0b;
    color: #9a3412;
    background: #fff7ed;
}
.payroll-notice-review-head-actions button:disabled { opacity: .45; cursor: default; }
.payroll-notice-review-overview {
    display: flex;
    align-items: center;
    gap: 9px;
    margin: 12px 16px 0;
    padding: 9px 11px;
    border-radius: 6px;
    font-size: 11px;
}
.payroll-notice-review-overview strong { font-size: 12px; }
.payroll-notice-review-overview span { color: #64748b; }
.payroll-notice-review-overview.attention { color: #9a3412; background: #fff7ed; }
.payroll-notice-review-overview.clear { color: #166534; background: #f0fdf4; }
.payroll-notice-zero-warning {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 16px 0;
    padding: 9px 11px;
    border: 1px solid #fcd34d;
    border-radius: 6px;
    color: #92400e;
    background: #fffbeb;
    font-size: 11px;
    line-height: 1.5;
}
.payroll-notice-zero-warning strong { flex: 0 0 auto; }
.payroll-notice-warnings {
    margin: 8px 16px 0;
    padding: 8px 11px;
    border: 1px solid #fed7aa;
    border-radius: 6px;
    color: #9a3412;
    background: #fffbeb;
    font-size: 11px;
}
.payroll-notice-warnings summary { cursor: pointer; font-weight: 600; }
.payroll-notice-warnings ul { margin: 7px 0 0; padding-left: 18px; line-height: 1.6; }
.payroll-notice-context {
    display: grid;
    grid-template-columns: minmax(220px, 2fr) repeat(4, minmax(94px, .55fr));
    gap: 9px;
    padding: 13px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.payroll-notice-context label,
.payroll-notice-employer-entry label {
    display: grid;
    align-content: start;
    gap: 5px;
    min-width: 0;
}
.payroll-notice-context label > span,
.payroll-notice-employer-entry label > span { color: #475569; font-size: 10px; font-weight: 600; }
.payroll-notice-context label > span b,
.payroll-notice-employer-entry label > span b { color: #dc2626; }
.payroll-notice-context label > span em {
    color: #94a3b8;
    font-size: 9px;
    font-style: normal;
    font-weight: 400;
}
.payroll-notice-employer-entry label > span em {
    color: #94a3b8;
    font-size: 9px;
    font-style: normal;
    font-weight: 400;
}
.payroll-notice-context input,
.payroll-notice-employer-entry input {
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    padding: 6px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    font: inherit;
    font-size: 12px;
    line-height: 1.2;
}
.payroll-notice-context input:focus,
.payroll-notice-employer-entry input:focus {
    border-color: #f59e0b;
    box-shadow: 0 0 0 2px rgba(245, 158, 11, .12);
}
.payroll-notice-employer-entry {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) minmax(180px, 1fr);
    align-items: end;
    gap: 10px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.payroll-notice-employer-heading { align-self: center; }
.payroll-notice-employer-heading strong { display: block; color: #0f172a; font-size: 12px; }
.payroll-notice-employer-heading small { display: block; margin-top: 3px; color: #64748b; font-size: 10px; }
.payroll-notice-amount-input { position: relative; }
.payroll-notice-amount-input input { padding-right: 30px; text-align: right; font-variant-numeric: tabular-nums; }
.payroll-notice-amount-input i {
    position: absolute;
    top: 50%;
    right: 10px;
    color: #94a3b8;
    font-size: 10px;
    font-style: normal;
    transform: translateY(-50%);
    pointer-events: none;
}
.payroll-notice-personal-override {
    grid-column: 2 / span 2;
    padding-top: 2px;
    border-top: 1px dashed #cbd5e1;
}
.payroll-notice-personal-override small { color: #9a3412; font-size: 9px; line-height: 1.45; }
.payroll-notice-personal-override.multiple {
    display: grid;
    gap: 3px;
    color: #9a3412;
}
.payroll-notice-personal-override.multiple strong { font-size: 10px; }
.payroll-notice-live-status {
    grid-column: 1 / -1;
    min-height: 16px;
    color: #64748b;
    font-size: 10px;
}
.payroll-notice-live-status.ready { color: #166534; }
.payroll-notice-live-status.warning { color: #9a3412; }
.payroll-notice-live-status.updating { color: #1d4ed8; }
.payroll-notice-live-status.error { color: #b91c1c; }
.payroll-notice-table-wrap { max-height: 520px; overflow: auto; }
.payroll-notice-table {
    width: 100%;
    min-width: 980px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 11px;
}
.payroll-notice-table th {
    position: sticky;
    z-index: 2;
    top: 0;
    height: 34px;
    padding: 0 9px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
    color: #475569;
    background: #f1f5f9;
    text-align: right;
    white-space: nowrap;
}
.payroll-notice-table th:first-child { left: 0; width: 170px; text-align: left; }
.payroll-notice-table:not(.payroll-notice-labor-table) th:nth-child(9) { width: 98px; text-align: center; }
.payroll-notice-table td {
    height: 37px;
    padding: 0 6px;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    background: #fff;
    vertical-align: middle;
}
.payroll-notice-table tbody tr:hover td { background: #f8fafc; }
.payroll-notice-table tbody tr.needs-review td { background: #fffbeb; }
.payroll-notice-table tbody tr.social-review-confirmed td { background: #f8fffb; }
.payroll-notice-table tbody tr.has-salary-adjustment:not(.needs-review) td { background: #faf8ff; }
.payroll-notice-table tbody tr.negative-net:not(.needs-review) td { background: #f5f3ff; }
.payroll-notice-table tbody tr.needs-social-review .payroll-notice-social-cell {
    box-shadow: inset 3px 0 #f59e0b;
}
.payroll-notice-table input.payroll-notice-grid-input {
    box-sizing: border-box;
    width: 100%;
    height: 29px;
    padding: 3px 4px;
    border: 1px solid transparent;
    border-radius: 3px;
    outline: 0;
    color: #0f172a;
    background: transparent;
    text-align: right;
    font: inherit;
    font-size: 11px;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}
.payroll-notice-table input.payroll-notice-grid-input::-webkit-outer-spin-button,
.payroll-notice-table input.payroll-notice-grid-input::-webkit-inner-spin-button {
    margin: 0;
    -webkit-appearance: none;
}
.payroll-notice-table input.payroll-notice-grid-input[readonly] { cursor: default; }
.payroll-notice-table input.payroll-notice-grid-input[readonly]:hover { border-color: #e2e8f0; }
.payroll-notice-table input.payroll-notice-grid-input:focus,
.payroll-notice-table input.payroll-notice-grid-input.editing,
.payroll-notice-table input.payroll-notice-grid-input.always-editable {
    border-color: #f59e0b;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(245, 158, 11, .14);
}
.payroll-notice-name-cell {
    position: sticky;
    z-index: 1;
    left: 0;
    width: 170px;
}
.payroll-notice-name-input { text-align: left !important; font-weight: 600 !important; }
.payroll-notice-name-meta { display: flex; align-items: center; gap: 4px; margin: -2px 4px 3px; }
.payroll-notice-name-meta small {
    overflow: hidden;
    color: #92400e;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.payroll-notice-review-badge {
    flex: 0 0 auto;
    padding: 2px 5px;
    border-radius: 4px;
    color: #9a3412;
    background: #fed7aa;
    font-size: 9px;
    font-weight: 600;
}
.payroll-notice-adjustment-badge {
    flex: 0 0 auto;
    padding: 2px 5px;
    border-radius: 4px;
    color: #6d28d9;
    background: #ede9fe;
    font-size: 9px;
    font-weight: 600;
}
.payroll-notice-social-cell { position: relative; }
.payroll-notice-social-original {
    display: block;
    margin: -3px 4px 3px;
    color: #92400e;
    font-size: 9px;
    text-align: right;
}
.payroll-notice-row-status {
    color: #64748b;
    text-align: center;
    white-space: nowrap;
}
.payroll-notice-row-status.clear { color: #166534; }
.payroll-notice-row-status.confirmed { color: #047857; }
.payroll-notice-row-status.adjustment { color: #6d28d9; font-weight: 600; }
.payroll-notice-row-status.warning { color: #b45309; font-weight: 600; }
.payroll-notice-table tfoot th,
.payroll-notice-table tfoot td {
    position: sticky;
    z-index: 2;
    top: auto;
    bottom: 0;
    height: 36px;
    padding: 0 9px;
    border-top: 1px solid #cbd5e1;
    border-right: 1px solid #e2e8f0;
    border-bottom: 0;
    color: #0f172a;
    background: #f1f5f9;
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.payroll-notice-table tfoot th { z-index: 3; left: 0; text-align: left; }
.payroll-notice-table tfoot td:last-child { text-align: center; }
.payroll-notice-review.show-review-only tbody tr:not(.needs-review) { display: none; }
.payroll-notice-labor-review {
    border-top: 8px solid #f1f5f9;
    background: #fff;
}
.payroll-notice-subtable-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.payroll-notice-subtable-head strong { display: block; color: #0f172a; font-size: 12px; }
.payroll-notice-subtable-head small { display: block; margin-top: 2px; color: #64748b; font-size: 9px; }
.payroll-notice-work-pane .payroll-notice-table-wrap.labor { max-height: 250px; }
.payroll-notice-labor-table { min-width: 620px; }
.payroll-notice-labor-table th:nth-child(5) { width: 76px; text-align: center; }
.payroll-notice-review-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 16px;
    border-top: 1px solid #e2e8f0;
}
.payroll-notice-review-actions span { color: #64748b; font-size: 11px; }
.payroll-notice-review-actions .btn-primary { margin: 0; }
.payroll-notice-result {
    margin-top: 18px;
    padding: 18px;
    border: 1px solid #fed7aa;
    border-radius: 10px;
    background: #fffaf5;
}
.payroll-notice-result.complete { border-color: #86efac; background: #f8fff9; }
.payroll-notice-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 12px;
}
.payroll-notice-result-head h2 { margin: 0; color: #0f172a; font-size: 17px; }
.payroll-notice-result-head p { margin: 4px 0 0; color: #64748b; font-size: 11px; }
.payroll-notice-result-head .btn-primary { flex: 0 0 auto; margin: 0; }
.payroll-notice-result-head .btn-primary:disabled { opacity: .48; cursor: not-allowed; }
.payroll-notice-result-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 8px; }
.payroll-notice-result-actions .btn-primary,
.payroll-notice-result-actions .btn-secondary { margin: 0; white-space: nowrap; }
.payroll-notice-output-warnings { margin: 0 0 12px; padding: 10px 12px 10px 28px; border-radius: 7px; color: #92400e; background: #fffbeb; font-size: 11px; line-height: 1.6; }
.payroll-notice-result textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 430px;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    font: 13px/1.75 ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    resize: vertical;
}
.payroll-notice-result textarea:focus { border-color: #60a5fa; box-shadow: 0 0 0 2px rgba(37, 99, 235, .1); }
.payroll-notice-copy-status { min-height: 18px; margin-top: 8px; font-size: 11px; }
.payroll-notice-copy-status.success { color: #166534; }
.payroll-notice-copy-status.error { color: #991b1b; }

#tab-social-base-notice.has-workbench > .social-base-intro,
#tab-social-base-notice.has-workbench > .social-base-rule,
#tab-social-base-notice.has-workbench > .payroll-notice-service,
#tab-social-base-notice.has-workbench > .payroll-notice-upload { display: none; }
#tab-social-base-notice.has-workbench > .payroll-notice-progress { margin: 0 0 12px; }
.social-base-workbench { grid-template-columns: minmax(380px, .95fr) minmax(0, 1.45fr); }
.payroll-notice-drop-icon.social-base { color: #0f766e; background: #ccfbf1; }
.social-base-excel-source {
    display: flex;
    box-sizing: border-box;
    min-height: 100%;
    padding: 38px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 10px;
    color: #475569;
    background: #f8fafc;
    text-align: center;
}
.social-base-excel-source > span {
    display: grid;
    width: 58px;
    height: 58px;
    place-items: center;
    border-radius: 13px;
    color: #fff;
    background: #15803d;
    font-size: 18px;
    font-weight: 800;
}
.social-base-excel-source strong { max-width: 320px; color: #0f172a; font-size: 14px; word-break: break-all; }
.social-base-excel-source small { max-width: 360px; font-size: 11px; line-height: 1.65; }
.social-base-review,
.social-base-result {
    min-height: calc(100% - 52px);
    background: #fff;
}
.social-base-review { overflow: hidden; }
.social-base-candidate {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin: 12px 16px 0;
    padding: 11px 12px;
    border: 1px solid #fcd34d;
    border-radius: 7px;
    color: #92400e;
    background: #fffbeb;
}
.social-base-candidate div { display: grid; gap: 3px; }
.social-base-candidate strong { font-size: 12px; }
.social-base-candidate span { font-size: 10px; line-height: 1.55; }
.social-base-candidate button,
.social-base-row-status button {
    flex: 0 0 auto;
    padding: 6px 9px;
    border: 1px solid #f59e0b;
    border-radius: 5px;
    color: #92400e;
    background: #fff;
    font-size: 10px;
    font-weight: 600;
    cursor: pointer;
}
.social-base-candidate.confirmed {
    justify-content: flex-start;
    border-color: #86efac;
    color: #166534;
    background: #f0fdf4;
}
.social-base-context {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 9px;
    padding: 13px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.social-base-context label { display: grid; gap: 5px; }
.social-base-context label > span { color: #475569; font-size: 10px; font-weight: 600; }
.social-base-context input,
.social-base-intro-editor textarea {
    box-sizing: border-box;
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    font: inherit;
}
.social-base-context input {
    height: 34px;
    padding: 6px 9px;
    font-size: 12px;
}
.social-base-context input:focus,
.social-base-intro-editor textarea:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, .12);
}
.social-base-rate-input { position: relative; }
.social-base-rate-input input { padding-right: 30px; text-align: right; }
.social-base-rate-input i {
    position: absolute;
    top: 50%;
    right: 10px;
    color: #94a3b8;
    font-size: 10px;
    font-style: normal;
    transform: translateY(-50%);
    pointer-events: none;
}
.social-base-rate-note {
    grid-column: 1 / -1;
    margin: -1px 0 0;
    color: #64748b;
    font-size: 10px;
    line-height: 1.55;
}
.social-base-table-wrap { max-height: 425px; overflow: auto; }
.social-base-table {
    width: 100%;
    min-width: 820px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 11px;
}
.social-base-table th {
    position: sticky;
    z-index: 2;
    top: 0;
    height: 36px;
    padding: 0 8px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
    color: #475569;
    background: #f1f5f9;
    text-align: right;
    white-space: nowrap;
}
.social-base-table th:first-child { width: 92px; text-align: left; }
.social-base-table th:nth-child(2) { width: 176px; text-align: left; }
.social-base-table th:last-child { width: 78px; text-align: center; }
.social-base-table td {
    height: 48px;
    padding: 0 6px;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    color: #0f172a;
    background: #fff;
    vertical-align: middle;
}
.social-base-table tbody tr:hover td { background: #f8fafc; }
.social-base-table tbody tr.needs-review td { background: #fffbeb; }
.social-base-table input,
.social-base-table select {
    box-sizing: border-box;
    width: 100%;
    height: 31px;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    outline: 0;
    color: #0f172a;
    background: transparent;
    font: inherit;
    font-size: 11px;
}
.social-base-table input { text-align: right; font-variant-numeric: tabular-nums; }
.social-base-table td:first-child input { text-align: left; font-weight: 600; }
.social-base-table select { border-color: #e2e8f0; background: #fff; text-align: left; }
.social-base-table input:hover { border-color: #e2e8f0; }
.social-base-table input:focus,
.social-base-table select:focus {
    border-color: #14b8a6;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(20, 184, 166, .14);
}
.social-base-basis-cell small {
    display: block;
    overflow: hidden;
    margin: 1px 5px 0;
    color: #64748b;
    font-size: 9px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.social-base-row-status { color: #64748b; text-align: center; white-space: nowrap; }
.social-base-row-status.clear { color: #166534; }
.social-base-row-status.attention { color: #b45309; font-weight: 600; }
.social-base-row-status.error { color: #b91c1c; font-weight: 600; }
.social-base-table tfoot th,
.social-base-table tfoot td {
    position: sticky;
    z-index: 2;
    top: auto;
    bottom: 0;
    height: 37px;
    padding: 0 8px;
    border-top: 1px solid #cbd5e1;
    border-right: 1px solid #e2e8f0;
    border-bottom: 0;
    color: #0f172a;
    background: #ecfdf5;
    text-align: right;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}
.social-base-table tfoot th { text-align: left; }
.social-base-table tfoot td:last-child { text-align: center; }
.social-base-review.show-review-only tbody tr:not(.needs-review) { display: none; }
.social-base-intro-editor {
    display: grid;
    grid-template-columns: 180px minmax(0, 1fr);
    align-items: start;
    gap: 12px;
    padding: 13px 16px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
}
.social-base-intro-editor label { display: grid; gap: 4px; }
.social-base-intro-editor label strong { color: #0f172a; font-size: 11px; }
.social-base-intro-editor label small { color: #64748b; font-size: 9px; line-height: 1.45; }
.social-base-intro-editor textarea {
    min-height: 82px;
    padding: 8px 9px;
    font-size: 11px;
    line-height: 1.6;
    resize: vertical;
}
.social-base-review-actions span.ready { color: #166534; }
.social-base-review-actions span.warning { color: #9a3412; }
.social-base-result { padding: 18px; }
.social-base-result.complete { background: #f8fff9; }
.social-base-result.draft { background: #fffaf5; }
.social-base-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0 0 12px;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 7px;
    background: #fff;
}
.social-base-summary > div {
    display: flex;
    min-height: 66px;
    padding: 10px 12px;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    border-right: 1px solid #e2e8f0;
}
.social-base-summary > div:last-child { border-right: 0; }
.social-base-summary span { flex-basis: 100%; color: #64748b; font-size: 9px; text-align: center; }
.social-base-summary strong { color: #0f172a; font-size: 18px; font-variant-numeric: tabular-nums; }
.social-base-summary small { color: #64748b; font-size: 10px; }
.social-base-result textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 455px;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    font: 13px/1.75 ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    resize: vertical;
}
.social-base-result textarea:focus {
    border-color: #14b8a6;
    box-shadow: 0 0 0 2px rgba(20, 184, 166, .1);
}

#tab-input-vat-notice.has-workbench > .input-vat-intro,
#tab-input-vat-notice.has-workbench > .input-vat-rule,
#tab-input-vat-notice.has-workbench > .payroll-notice-service,
#tab-input-vat-notice.has-workbench > .payroll-notice-upload { display: none; }
#tab-input-vat-notice.has-workbench > .payroll-notice-progress { margin: 0 0 12px; }
.input-vat-workbench { grid-template-columns: minmax(360px, .82fr) minmax(0, 1.58fr); }
.payroll-notice-drop-icon.input-vat { color: #1d4ed8; background: #dbeafe; }
.input-vat-source-viewport img {
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
}
.input-vat-excel-source {
    box-sizing: border-box;
    width: 100%;
    min-height: 100%;
}
.input-vat-excel-placeholder { min-height: 100%; }
.input-vat-excel-source.with-preview {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    background: #fff;
}
.input-vat-excel-preview {
    display: flex;
    height: 100%;
    min-height: 0;
    flex-direction: column;
    background: #fff;
}
.input-vat-excel-preview-head {
    display: flex;
    padding: 11px 12px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    border-bottom: 1px solid #dbe3ee;
    background: #f8fafc;
}
.input-vat-excel-preview-head strong {
    display: block;
    color: #0f172a;
    font-size: 12px;
}
.input-vat-excel-preview-head small {
    display: block;
    margin-top: 2px;
    color: #64748b;
    font-size: 9px;
}
.input-vat-excel-preview-head > span {
    flex: 0 0 auto;
    padding: 5px 7px;
    border: 1px solid #bfdbfe;
    border-radius: 6px;
    color: #1e40af;
    background: #eff6ff;
    font-size: 9px;
    white-space: nowrap;
}
.input-vat-excel-preview-head b { font-size: 11px; }
.input-vat-excel-preview-scroll {
    flex: 1;
    min-height: 0;
    overflow: auto;
    background: #fff;
}
.input-vat-excel-preview table {
    width: 100%;
    min-width: 1050px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 9px;
}
.input-vat-excel-preview th,
.input-vat-excel-preview td {
    height: 30px;
    padding: 5px 7px;
    overflow: hidden;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    background: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.input-vat-excel-preview thead th {
    position: sticky;
    z-index: 3;
    top: 0;
    color: #334155;
    background: #e2e8f0;
    font-weight: 700;
    text-align: left;
}
.input-vat-excel-preview th:nth-child(1) { width: 48px; }
.input-vat-excel-preview th:nth-child(2),
.input-vat-excel-preview th:nth-child(3) { width: 86px; text-align: right; }
.input-vat-excel-preview th:nth-child(4) { width: 100px; text-align: right; }
.input-vat-excel-preview th:nth-child(5) { width: 66px; }
.input-vat-excel-preview th:nth-child(6) { width: 88px; }
.input-vat-excel-preview th:nth-child(7) { width: 150px; }
.input-vat-excel-preview th:nth-child(8) { width: 190px; }
.input-vat-excel-preview th:nth-child(9) { width: 175px; }
.input-vat-excel-preview td.source-money {
    color: #64748b;
    background: #f8fafc;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.input-vat-excel-preview .effective-tax {
    color: #1e3a8a;
    background: #eff6ff;
    font-variant-numeric: tabular-nums;
    font-weight: 700;
    text-align: right;
}
.input-vat-excel-preview tfoot th,
.input-vat-excel-preview tfoot td {
    position: sticky;
    z-index: 3;
    bottom: 0;
    color: #0f172a;
    background: #f1f5f9;
    font-weight: 700;
}
.input-vat-excel-preview tfoot th { text-align: right; }
.input-vat-excel-preview > p {
    margin: 0;
    padding: 7px 10px;
    border-top: 1px solid #dbe3ee;
    color: #475569;
    background: #f8fafc;
    font-size: 9px;
    line-height: 1.45;
}
.input-vat-review,
.input-vat-result {
    min-height: calc(100% - 52px);
    background: #fff;
}
.input-vat-source-badge {
    flex: 0 0 auto;
    padding: 5px 8px;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    color: #1d4ed8;
    background: #eff6ff;
    font-size: 10px;
    font-weight: 700;
}
.input-vat-summary {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 12px 16px;
    overflow: hidden;
    border: 1px solid #dbe3ee;
    border-radius: 8px;
    background: #fff;
}
.input-vat-summary > div {
    display: flex;
    min-height: 72px;
    padding: 11px 12px;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    border-right: 1px solid #e2e8f0;
}
.input-vat-summary > div:last-child { border-right: 0; }
.input-vat-summary span {
    flex-basis: 100%;
    color: #64748b;
    font-size: 9px;
    text-align: center;
}
.input-vat-summary strong {
    color: #0f172a;
    font-size: 19px;
    font-variant-numeric: tabular-nums;
}
.input-vat-summary small { color: #64748b; font-size: 10px; }
.input-vat-summary.output { margin: 0 0 12px; }
.input-vat-warnings {
    margin: 0 16px 12px;
    padding: 10px 12px;
    border: 1px solid #fde68a;
    border-radius: 7px;
    color: #92400e;
    background: #fffbeb;
}
.input-vat-warnings strong { font-size: 11px; }
.input-vat-warnings ul {
    margin: 6px 0 0;
    padding-left: 18px;
    font-size: 10px;
    line-height: 1.65;
}
.input-vat-context {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
    padding: 13px 16px;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.input-vat-context label { display: grid; min-width: 0; gap: 5px; }
.input-vat-context label.wide { grid-column: span 2; }
.input-vat-context label > span { color: #475569; font-size: 10px; font-weight: 600; }
.input-vat-context label > span b { color: #dc2626; }
.input-vat-context input,
.input-vat-context select {
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    padding: 6px 9px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    font: inherit;
    font-size: 11px;
}
.input-vat-context input:focus,
.input-vat-context select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, .12);
}
.input-vat-money-input { position: relative; }
.input-vat-money-input input { padding-right: 31px; text-align: right; }
.input-vat-money-input i {
    position: absolute;
    top: 50%;
    right: 10px;
    color: #94a3b8;
    font-size: 10px;
    font-style: normal;
    transform: translateY(-50%);
    pointer-events: none;
}
.input-vat-formula {
    display: flex;
    min-height: 42px;
    margin: 12px 16px;
    padding: 9px 11px;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    border: 1px solid #cbd5e1;
    border-radius: 7px;
    color: #475569;
    background: #f8fafc;
    font-size: 10px;
}
.input-vat-formula span { flex: 0 0 auto; font-weight: 700; }
.input-vat-formula strong {
    color: #0f172a;
    font-size: 12px;
    font-variant-numeric: tabular-nums;
    text-align: right;
}
.input-vat-formula.ready { border-color: #93c5fd; background: #eff6ff; }
.input-vat-formula.ready span { color: #1d4ed8; }
.input-vat-formula.error { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.input-vat-source-meta {
    display: grid;
    gap: 5px;
    margin: 0 16px 12px;
    padding: 10px 11px;
    border-left: 3px solid #93c5fd;
    color: #475569;
    background: #f8fafc;
    font-size: 9px;
    line-height: 1.55;
}
.input-vat-source-meta b { color: #334155; }
.input-vat-details {
    margin: 0 16px 12px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    background: #fff;
}
.input-vat-details summary {
    padding: 10px 12px;
    color: #334155;
    background: #f8fafc;
    font-size: 10px;
    font-weight: 700;
    cursor: pointer;
}
.input-vat-table-wrap { max-height: 330px; overflow: auto; }
.input-vat-table {
    width: 100%;
    min-width: 900px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 9px;
}
.input-vat-table th,
.input-vat-table td {
    padding: 7px 8px;
    overflow: hidden;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    background: #fff;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.input-vat-table th {
    position: sticky;
    z-index: 2;
    top: 0;
    color: #475569;
    background: #f1f5f9;
    text-align: left;
}
.input-vat-table th:first-child { width: 55px; }
.input-vat-table th:nth-child(2) { width: 85px; }
.input-vat-table th:nth-child(3) { width: 145px; }
.input-vat-table th:nth-child(4) { width: 180px; }
.input-vat-table th:nth-child(5) { width: 180px; }
.input-vat-table th:last-child,
.input-vat-table td:last-child { width: 100px; text-align: right; font-variant-numeric: tabular-nums; }
.input-vat-table tfoot th,
.input-vat-table tfoot td {
    position: sticky;
    z-index: 2;
    top: auto;
    bottom: 0;
    color: #0f172a;
    background: #eff6ff;
    font-weight: 700;
}
.input-vat-table-note { margin: 0; padding: 8px 11px; color: #64748b; font-size: 9px; }
.input-vat-confirm {
    display: flex;
    margin: 0 16px 12px;
    padding: 10px 12px;
    align-items: flex-start;
    gap: 8px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #1e3a8a;
    background: #eff6ff;
    font-size: 10px;
    line-height: 1.5;
    cursor: pointer;
}
.input-vat-confirm input { margin-top: 1px; accent-color: #2563eb; }
.input-vat-review-actions span.ready { color: #166534; }
.input-vat-review-actions span.warning { color: #9a3412; }
.input-vat-result { padding: 18px; background: #f8fff9; }
.input-vat-result textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 360px;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    font: 13px/1.8 ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    resize: vertical;
}
.input-vat-result textarea:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, .1);
}
.input-vat-calculation-note {
    margin: 9px 1px 0;
    color: #64748b;
    font-size: 9px;
    line-height: 1.6;
}

/* 记账凭证 PDF → 报销单 */
.reimbursement-export-guide {
    margin-bottom: 16px;
    padding: 20px;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    background: #eff6ff;
}
.reimbursement-export-guide-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.reimbursement-export-guide-head > div { display: grid; gap: 4px; }
.reimbursement-export-guide-head span {
    color: #2563eb;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}
.reimbursement-export-guide-head h2 {
    margin: 0;
    color: #1e3a8a;
    font-size: 17px;
}
.reimbursement-export-guide-head p {
    max-width: 820px;
    margin: 0;
    color: #475569;
    font-size: 11px;
    line-height: 1.65;
}
.reimbursement-export-guide-head > b {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    color: #9a3412;
    background: #ffedd5;
    font-size: 10px;
}
.reimbursement-export-steps {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 9px;
    margin: 15px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: reimbursement-export-step;
}
.reimbursement-export-steps li {
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    gap: 2px 8px;
    padding: 10px;
    border: 1px solid #dbeafe;
    border-radius: 8px;
    background: #fff;
    counter-increment: reimbursement-export-step;
}
.reimbursement-export-steps li::before {
    grid-row: 1 / span 2;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    background: #2563eb;
    font-size: 10px;
    font-weight: 700;
    content: counter(reimbursement-export-step);
}
.reimbursement-export-steps strong { color: #1e3a8a; font-size: 11px; }
.reimbursement-export-steps span { color: #64748b; font-size: 9px; line-height: 1.5; }
.reimbursement-export-figure {
    margin: 14px 0 0;
    overflow-x: auto;
}
.reimbursement-export-figure a { display: block; min-width: 760px; }
.reimbursement-export-figure img {
    display: block;
    width: 100%;
    border: 1px solid #bfdbfe;
    border-radius: 8px;
    background: #fff;
}
.reimbursement-export-figure figcaption {
    position: sticky;
    left: 0;
    margin-top: 6px;
    color: #475569;
    font-size: 9px;
}
.reimbursement-intro,
.reimbursement-rule,
.reimbursement-service,
.reimbursement-review-head,
.reimbursement-result {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
}
.reimbursement-intro {
    padding: 22px 24px;
    border: 1px solid #fed7aa;
    border-radius: 12px 12px 0 0;
    background: #fff7ed;
}
.reimbursement-intro > div { display: grid; gap: 6px; }
.reimbursement-intro strong { color: #7c2d12; font-size: 17px; }
.reimbursement-intro p { max-width: 780px; margin: 0; color: #9a3412; font-size: 12px; line-height: 1.7; }
.reimbursement-intro > span {
    flex: 0 0 auto;
    padding: 5px 9px;
    border-radius: 999px;
    color: #166534;
    background: #dcfce7;
    font-size: 10px;
    font-weight: 700;
}
.reimbursement-rule {
    justify-content: flex-start;
    padding: 12px 18px;
    border-right: 1px solid #fed7aa;
    border-bottom: 1px solid #fed7aa;
    border-left: 1px solid #fed7aa;
    color: #78350f;
    background: #fffbeb;
    font-size: 11px;
    line-height: 1.6;
}
.reimbursement-rule b {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 4px;
    color: #fff;
    background: #d97706;
    font-size: 10px;
}
.reimbursement-service {
    align-items: center;
    justify-content: flex-start;
    margin: 16px 0 0;
    padding: 10px 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
}
.reimbursement-service strong { color: #334155; }
.reimbursement-service span { color: #64748b; }
.reimbursement-service.ready { border-color: #bbf7d0; background: #f0fdf4; }
.reimbursement-service.ready strong { color: #166534; }
.reimbursement-service.unavailable { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.reimbursement-upload {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 14px;
    padding: 20px;
    border: 1px solid #e2e8f0;
    border-radius: 11px;
    background: #fff;
}
.reimbursement-file-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 16px;
    border: 1px solid #cbd5e1;
    border-radius: 9px;
    background: #f8fafc;
}
.reimbursement-file-card:focus-within { border-color: #fb923c; box-shadow: 0 0 0 3px rgba(251, 146, 60, .12); }
.reimbursement-file-card.is-builtin {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.reimbursement-file-card.is-builtin .reimbursement-file-number {
    color: #166534;
    background: #dcfce7;
}
.reimbursement-file-card.is-builtin strong { color: #166534; }
.reimbursement-file-card.is-optional strong em {
    display: inline-block;
    margin-left: 4px;
    padding: 1px 5px;
    border-radius: 999px;
    color: #475569;
    background: #e2e8f0;
    font-size: 8px;
    font-style: normal;
    vertical-align: 1px;
}
.reimbursement-file-number {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    color: #9a3412;
    background: #ffedd5;
    font-size: 12px;
    font-weight: 700;
}
.reimbursement-file-card > span:nth-child(2) { display: grid; min-width: 0; gap: 3px; }
.reimbursement-file-card strong { color: #0f172a; font-size: 13px; }
.reimbursement-file-card small { color: #64748b; font-size: 10px; line-height: 1.45; }
.reimbursement-file-card input {
    grid-column: 1 / -1;
    box-sizing: border-box;
    width: 100%;
    color: #475569;
    font-size: 11px;
}
.reimbursement-file-feedback {
    grid-column: 1 / -1;
    min-height: 18px;
    color: #64748b;
    font-size: 11px;
}
.reimbursement-file-feedback.success { color: #166534; }
.reimbursement-file-feedback.error { color: #991b1b; }
.reimbursement-upload > .btn-primary {
    grid-column: 1 / -1;
    width: max-content;
    margin: 0 0 0 auto;
}
.reimbursement-progress {
    margin-top: 14px;
    padding: 12px 14px;
    border: 1px solid #fdba74;
    border-radius: 8px;
    color: #9a3412;
    background: #fff7ed;
    font-size: 11px;
}
.reimbursement-progress.success { border-color: #86efac; color: #166534; background: #f0fdf4; }
.reimbursement-progress.error { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
.reimbursement-review {
    margin-top: 18px;
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    background: #fff;
}
.reimbursement-review-head {
    align-items: center;
    padding: 17px 18px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.reimbursement-review-head > div { display: grid; gap: 3px; }
.reimbursement-review-head > div > span { color: #c2410c; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.reimbursement-review-head h2 { margin: 0; color: #0f172a; font-size: 17px; }
.reimbursement-review-head p { margin: 2px 0 0; color: #64748b; font-size: 10px; line-height: 1.55; }
.reimbursement-review-head button { flex: 0 0 auto; margin: 0; }
.reimbursement-pdf-match {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 18px;
    border-bottom: 1px solid #e2e8f0;
    color: #475569;
    background: #f8fafc;
    font-size: 10px;
    line-height: 1.55;
}
.reimbursement-pdf-match strong { flex: 0 0 auto; color: #334155; font-size: 11px; }
.reimbursement-pdf-match.success { color: #166534; background: #f0fdf4; }
.reimbursement-pdf-match.success strong { color: #166534; }
.reimbursement-pdf-match.warning { color: #92400e; background: #fffbeb; }
.reimbursement-pdf-match.warning strong { color: #92400e; }
.reimbursement-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    border-bottom: 1px solid #e2e8f0;
}
.reimbursement-summary > div {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 8px;
    padding: 14px 16px;
    border-right: 1px solid #e2e8f0;
}
.reimbursement-summary > div:last-child { border-right: 0; }
.reimbursement-summary span { grid-column: 1 / -1; color: #64748b; font-size: 9px; }
.reimbursement-summary strong { color: #0f172a; font-size: 19px; font-variant-numeric: tabular-nums; }
.reimbursement-summary small { align-self: end; padding-bottom: 3px; color: #94a3b8; font-size: 9px; }
.reimbursement-warnings {
    margin: 14px 16px 0;
    padding: 11px 13px;
    border-left: 3px solid #f59e0b;
    border-radius: 4px 7px 7px 4px;
    color: #78350f;
    background: #fffbeb;
}
.reimbursement-warnings strong { font-size: 11px; }
.reimbursement-warnings ul { margin: 5px 0 0; padding-left: 18px; font-size: 10px; line-height: 1.6; }
.reimbursement-ignored {
    margin: 10px 16px 0;
    padding: 10px 12px;
    border: 1px solid #e2e8f0;
    border-radius: 7px;
    color: #475569;
    background: #f8fafc;
    font-size: 10px;
}
.reimbursement-ignored summary { cursor: pointer; font-weight: 700; }
.reimbursement-ignored p {
    display: grid;
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 2px 8px;
    margin: 8px 0 0;
    padding-top: 7px;
    border-top: 1px solid #e2e8f0;
}
.reimbursement-ignored p b { color: #334155; }
.reimbursement-ignored p small { grid-column: 2; color: #94a3b8; }
.reimbursement-context {
    display: grid;
    grid-template-columns: minmax(220px, 1.8fr) repeat(3, minmax(110px, .65fr)) minmax(160px, 1fr);
    gap: 10px;
    margin: 14px 16px;
    padding: 13px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
}
.reimbursement-context label,
.reimbursement-context > div { display: grid; align-content: start; min-width: 0; gap: 5px; }
.reimbursement-context span { color: #475569; font-size: 9px; font-weight: 600; }
.reimbursement-context span b { color: #dc2626; }
.reimbursement-context input {
    box-sizing: border-box;
    width: 100%;
    height: 34px;
    padding: 6px 8px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    color: #0f172a;
    background: #fff;
    font-size: 11px;
}
.reimbursement-context input:focus { outline: 0; border-color: #fb923c; box-shadow: 0 0 0 2px rgba(251, 146, 60, .12); }
.reimbursement-context > div strong { overflow: hidden; color: #334155; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.reimbursement-context > div small { color: #94a3b8; font-size: 9px; line-height: 1.4; }
.reimbursement-table-wrap { max-height: 560px; overflow: auto; border-top: 1px solid #e2e8f0; border-bottom: 1px solid #e2e8f0; }
.reimbursement-table {
    width: 100%;
    min-width: 1120px;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
    font-size: 10px;
}
.reimbursement-table th {
    position: sticky;
    z-index: 2;
    top: 0;
    padding: 9px 7px;
    border-right: 1px solid #e2e8f0;
    border-bottom: 1px solid #cbd5e1;
    color: #475569;
    background: #f1f5f9;
    text-align: left;
    white-space: nowrap;
}
.reimbursement-table th:nth-child(1) { width: 42px; text-align: center; }
.reimbursement-table th:nth-child(2) { width: 88px; }
.reimbursement-table th:nth-child(3) { width: 105px; }
.reimbursement-table th:nth-child(4) { width: 125px; }
.reimbursement-table th:nth-child(6) { width: 110px; }
.reimbursement-table th:nth-child(7) { width: 115px; text-align: right; }
.reimbursement-table td {
    padding: 6px;
    border-right: 1px solid #f1f5f9;
    border-bottom: 1px solid #e2e8f0;
    color: #334155;
    background: #fff;
    vertical-align: top;
}
.reimbursement-table tbody tr:hover td { background: #fffaf5; }
.reimbursement-table td > strong { display: block; color: #334155; font-size: 10px; }
.reimbursement-table td > small {
    display: block;
    overflow: hidden;
    margin-top: 3px;
    color: #94a3b8;
    font-size: 8px;
    line-height: 1.35;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.reimbursement-table td.needs-ticket { box-shadow: inset 3px 0 #f59e0b; background: #fffbeb; }
.reimbursement-table input[type="text"],
.reimbursement-table input[type="number"] {
    box-sizing: border-box;
    width: 100%;
    min-height: 31px;
    padding: 5px 6px;
    border: 1px solid transparent;
    border-radius: 4px;
    outline: 0;
    color: #0f172a;
    background: transparent;
    font: inherit;
}
.reimbursement-table input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; }
.reimbursement-table input:focus { border-color: #fb923c; background: #fff; box-shadow: 0 0 0 1px rgba(251, 146, 60, .12); }
.reimbursement-include { padding-top: 13px !important; text-align: center; }
.reimbursement-include input { width: 15px; height: 15px; accent-color: #ea580c; }
.reimbursement-output-option {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin: 13px 16px 0;
    padding: 11px 12px;
    border: 1px solid #bfdbfe;
    border-radius: 7px;
    color: #1e3a8a;
    background: #eff6ff;
    cursor: pointer;
}
.reimbursement-output-option input {
    flex: 0 0 auto;
    width: 15px;
    height: 15px;
    margin-top: 1px;
    accent-color: #2563eb;
}
.reimbursement-output-option span { display: grid; gap: 3px; }
.reimbursement-output-option strong { font-size: 10px; line-height: 1.45; }
.reimbursement-output-option small { color: #475569; font-size: 9px; line-height: 1.5; }
.reimbursement-confirm {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 13px 16px;
    padding: 10px 12px;
    border: 1px solid #fed7aa;
    border-radius: 7px;
    color: #9a3412;
    background: #fff7ed;
    font-size: 10px;
    line-height: 1.55;
    cursor: pointer;
}
.reimbursement-confirm input { margin-top: 1px; accent-color: #ea580c; }
.reimbursement-review-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 16px 16px;
}
.reimbursement-review-actions span { color: #64748b; font-size: 10px; }
.reimbursement-review-actions span.error { color: #991b1b; }
.reimbursement-review-actions span.warning { color: #9a3412; }
.reimbursement-review-actions span.ready { color: #166534; }
.reimbursement-review-actions button { flex: 0 0 auto; margin: 0; }
.reimbursement-result {
    align-items: center;
    flex-wrap: wrap;
    margin-top: 16px;
    padding: 18px 20px;
    border: 1px solid #86efac;
    border-radius: 10px;
    background: #f0fdf4;
}
.reimbursement-result > div:first-child { display: grid; gap: 3px; }
.reimbursement-result > div:first-child > span { color: #15803d; font-size: 9px; font-weight: 700; letter-spacing: .08em; }
.reimbursement-result h2 { margin: 0; color: #14532d; font-size: 17px; }
.reimbursement-result p { margin: 3px 0 0; color: #166534; font-size: 10px; line-height: 1.6; }
.reimbursement-result-actions { display: flex; flex: 0 0 auto; gap: 9px; }
.reimbursement-result-actions .btn-primary,
.reimbursement-result-actions .btn-secondary {
    box-sizing: border-box;
    margin: 0;
    text-decoration: none;
    white-space: nowrap;
}
.reimbursement-payment-message {
    flex: 1 0 100%;
    box-sizing: border-box;
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid #bbf7d0;
}
.reimbursement-payment-message-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 10px;
}
.reimbursement-payment-message-head > div { display: grid; gap: 3px; }
.reimbursement-payment-message-head span {
    color: #15803d;
    font-size: 9px;
    font-weight: 700;
    letter-spacing: .08em;
}
.reimbursement-payment-message-head h3 { margin: 0; color: #14532d; font-size: 15px; }
.reimbursement-payment-message-head p { margin: 0; color: #166534; font-size: 10px; line-height: 1.6; }
.reimbursement-payment-message-head button { flex: 0 0 auto; margin: 0; }
.reimbursement-payment-message textarea {
    box-sizing: border-box;
    width: 100%;
    min-height: 210px;
    padding: 12px 13px;
    border: 1px solid #86efac;
    border-radius: 7px;
    outline: 0;
    color: #0f172a;
    background: #fff;
    font: 12px/1.75 ui-monospace, "SFMono-Regular", Menlo, Monaco, Consolas, monospace;
    resize: vertical;
}
.reimbursement-payment-message textarea:focus {
    border-color: #22c55e;
    box-shadow: 0 0 0 2px rgba(34, 197, 94, .1);
}

@media (max-width: 960px) {
    .tool-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .tool-grid-featured { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-catalog-layout { grid-template-columns: 1fr; }
    .tool-group-filter {
        position: static;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
    .tool-group-filter h3 { grid-column: 1 / -1; }
    .favorite-tools-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-category-layout { grid-template-columns: minmax(0, 1fr); }
    .tool-category-span-2,
    .tool-category-span-4 { grid-column: 1; }
    .tool-grid-category,
    .tool-category-span-2 .tool-grid-category,
    .tool-category-span-4 .tool-grid-category { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .main.payroll-notice-mode { max-width: none; }
    .payroll-notice-workbench { grid-template-columns: 1fr; }
    .payroll-notice-source-card {
        position: relative;
        top: auto;
        height: 500px;
        min-height: 0;
    }
    .payroll-notice-work-pane { height: auto; min-height: 570px; }
    .commission-stepper small { display: none; }
    .commission-context-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-action-grid { grid-template-columns: 1fr; }
    .category-manual-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .category-manual-form button { width: max-content; }
    .commission-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .commission-field, .commission-field.compact, .commission-field.source, .commission-field.file { grid-column: span 1; }
    .commission-form > .btn-primary { grid-column: 1 / -1; }
    .commission-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .commission-summary-grid > div:nth-child(2) { border-right: 0; }
    .commission-summary-grid > div:nth-child(-n+2) { border-bottom: 1px solid #e2e8f0; }
    .tax-burden-form { grid-template-columns: 1fr 1fr; }
    .tax-burden-form .btn-primary { grid-column: 1 / -1; width: max-content; margin: 0; }
    .tax-burden-file-row { grid-template-columns: 112px 1fr 1fr; }
    .tax-burden-file-name { grid-column: 1 / -1; }
    .tax-burden-display-group { grid-template-columns: 1fr 1fr; }
    .tax-burden-display-group > div { grid-column: 1 / -1; }
    .tax-burden-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tax-burden-summary-grid > div:nth-child(2) { border-right: 0; }
    .tax-burden-summary-grid > div:nth-child(-n+2) { border-bottom: 1px solid #e2e8f0; }
    .payroll-notice-context { grid-template-columns: minmax(220px, 1fr) repeat(4, 105px); }
    .payroll-notice-employer-entry { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .payroll-notice-employer-heading,
    .payroll-notice-personal-override,
    .payroll-notice-live-status { grid-column: 1 / -1; }
    .study-companion-hero { grid-template-columns: 1fr; }
    .study-companion-connection { max-width: 360px; }
    .reimbursement-export-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reimbursement-context { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .reimbursement-context label.wide { grid-column: 1 / -1; }
    .reimbursement-context > div { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
    .tool-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
    .topbar-inner { width: calc(100% - 28px); min-height: 58px; }
    .brand-home small, .user-greeting { display: none; }
    .topbar .user { gap: 10px; }
    .main, .main.foreign-mode { margin: 18px auto 34px; padding: 0 12px; }
    .hall-hero { min-height: 0; padding: 28px 24px; }
    .hall-hero h1 { font-size: 25px; }
    .hall-summary { display: none; }
    .tool-grid { grid-template-columns: 1fr; }
    .tool-group-filter { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tool-group-filter button { padding: 8px 7px; }
    .tool-group-filter button span {
        overflow: visible;
        text-overflow: clip;
        white-space: normal;
        line-height: 1.35;
    }
    .favorite-tools-heading { align-items: flex-start; }
    .favorite-tools-heading p { max-width: 230px; }
    .favorite-tools-grid { grid-template-columns: 1fr; }
    .tool-category-layout { grid-template-columns: 1fr; }
    .tool-category-span-2,
    .tool-category-span-4 { grid-column: 1; }
    .tool-grid-category,
    .tool-category-span-2 .tool-grid-category,
    .tool-category-span-4 .tool-grid-category { grid-template-columns: 1fr; }
    .tool-category-group { padding: 14px; }
    .tool-card { min-height: 160px; padding: 18px; }
    .tool-workspace { padding: 20px 16px 26px; border-radius: 11px; }
    .workspace-breadcrumb { display: none; }
    .workspace-heading { align-items: flex-start; }
    .workspace-heading h1 { font-size: 21px; }
    .commission-workflow { padding: 11px 8px; }
    .commission-stepper li { flex-direction: column; gap: 6px; padding: 5px 3px; text-align: center; }
    .commission-stepper li:not(:last-child)::after { top: 19px; right: -14px; width: 28px; }
    .commission-stepper strong { font-size: 10px; white-space: normal; }
    .commission-stage-card { padding: 18px 15px; }
    .commission-stage-heading { flex-wrap: wrap; }
    .commission-stage-heading .commission-stage-back { width: calc(100% - 47px); margin-left: 47px; }
    .commission-context-form, .commission-category-decision, .commission-upload-form { grid-template-columns: 1fr; }
    .commission-context-form .commission-field,
    .commission-context-form .commission-field.compact { grid-column: 1; }
    .commission-stage-actions, .commission-output-actions { align-items: stretch; flex-direction: column-reverse; }
    .commission-stage-actions button, .commission-output-actions button { width: 100%; }
    .commission-stage-actions.back-only { align-items: flex-start; }
    .commission-stage-actions.back-only button { width: auto; }
    .commission-calculation-rule { align-items: flex-start; flex-direction: column; }
    .category-flow, .category-context, .category-action-grid, .category-manual-form { grid-template-columns: 1fr; }
    .category-action-card { grid-template-columns: 1fr; }
    .category-action-card > div, .category-action-card button { grid-column: 1; width: 100%; }
    .category-manual-form button { width: 100%; }
    .category-rule-row { grid-template-columns: 1fr auto; }
    .category-rule-status { width: max-content; }
    .category-rule-copy { grid-column: 1 / -1; grid-row: 2; }
    .category-candidate { grid-template-columns: 1fr; padding: 14px; }
    .category-candidate-image { min-height: 160px; }
    .category-candidate-image img { height: 260px; }
    .category-candidate-fields { grid-template-columns: 1fr; }
    .category-candidate-fields label.decision { grid-column: 1; }
    .category-review-head, .category-recent-item { align-items: flex-start; flex-direction: column; }
    .category-review-head button { width: 100%; }
    .commission-flow, .commission-form, .commission-summary-grid { grid-template-columns: 1fr; }
    .commission-field, .commission-field.compact, .commission-field.source, .commission-field.file,
    .commission-form > .btn-primary { grid-column: 1; width: 100%; }
    .commission-summary-grid > div { border-right: 0; border-bottom: 1px solid #e2e8f0; }
    .commission-summary-grid > div:last-child { border-bottom: 0; }
    .commission-result-head, .commission-recent-item { align-items: flex-start; flex-direction: column; }
    .commission-downloads { width: 100%; flex-direction: column; }
    .commission-downloads button { width: 100%; }
    .tax-burden-flow, .tax-burden-form, .tax-burden-summary-grid,
    .tax-burden-policy-fields { grid-template-columns: 1fr; }
    .tax-burden-form .btn-primary { width: 100%; }
    .tax-burden-file-row, .tax-burden-company-list { grid-template-columns: 1fr; }
    .tax-burden-row-actions { align-items: center; grid-template-columns: auto 1fr; }
    .tax-burden-file-name { grid-column: auto; }
    .tax-burden-group-toolbar { align-items: stretch; flex-direction: column; }
    .tax-burden-group-toolbar button { width: 100%; }
    .tax-burden-display-group { grid-template-columns: 1fr; }
    .tax-burden-display-group > div { grid-column: auto; }
    .tax-burden-display-group button { width: 100%; }
    .tax-burden-summary-grid > div { border-right: 0; border-bottom: 1px solid #e2e8f0; }
    .tax-burden-summary-grid > div:last-child { border-bottom: 0; }
    .tax-burden-result-head, .tax-burden-recent-item { align-items: flex-start; flex-direction: column; }
    .tax-burden-result-head .btn-primary { width: 100%; }
    .tax-burden-policy-result { align-items: flex-start; flex-direction: column; }
    .tax-burden-policy-result em { margin-left: 0; }
    .tax-burden-recent-actions { width: 100%; justify-content: space-between; }
    .payroll-notice-intro,
    .payroll-notice-rule,
    .payroll-notice-service,
    .payroll-notice-dropzone,
    .payroll-notice-source-head,
    .payroll-notice-review-head,
    .payroll-notice-review-actions,
    .payroll-notice-result-head { align-items: flex-start; flex-direction: column; }
    .payroll-notice-source-card { height: 430px; }
    .payroll-notice-file-pair { grid-template-columns: 1fr; width: 100%; }
    .payroll-notice-file-pair small { grid-column: 1; }
    .payroll-notice-file-pair button { width: 100%; }
    .payroll-notice-image-tools { flex-wrap: wrap; }
    .payroll-notice-work-pane { min-height: 0; }
    .payroll-notice-view-tabs button { flex: 1; }
    .payroll-notice-zero-warning { align-items: flex-start; }
    .payroll-notice-review-head-actions { width: 100%; justify-content: space-between; }
    .payroll-notice-dropzone .btn-secondary,
    .payroll-notice-upload > .btn-primary,
    .payroll-notice-review-actions .btn-primary,
    .payroll-notice-result-head .btn-primary { width: 100%; }
    .payroll-notice-result-actions { width: 100%; flex-direction: column-reverse; }
    .payroll-notice-result-actions .btn-primary,
    .payroll-notice-result-actions .btn-secondary,
    .payroll-result-panel .btn-secondary { width: 100%; }
    .payroll-result-panel { align-items: stretch; flex-direction: column; }
    .payroll-notice-review-overview { align-items: flex-start; flex-direction: column; gap: 3px; }
    .payroll-notice-context,
    .payroll-notice-employer-entry { grid-template-columns: 1fr; }
    .payroll-notice-employer-heading,
    .payroll-notice-personal-override,
    .payroll-notice-live-status { grid-column: 1; }
    .payroll-notice-result { padding: 14px; }
    .payroll-notice-result textarea { min-height: 520px; font-size: 12px; }
    .social-base-candidate { align-items: stretch; flex-direction: column; }
    .social-base-candidate button { width: 100%; }
    .social-base-context { grid-template-columns: 1fr; }
    .social-base-intro-editor { grid-template-columns: 1fr; }
    .social-base-summary { grid-template-columns: 1fr; }
    .social-base-summary > div { border-right: 0; border-bottom: 1px solid #e2e8f0; }
    .social-base-summary > div:last-child { border-bottom: 0; }
    .social-base-result { padding: 14px; }
    .social-base-result textarea { min-height: 520px; font-size: 12px; }
    .input-vat-context { grid-template-columns: 1fr; }
    .input-vat-context label.wide { grid-column: span 1; }
    .input-vat-summary { grid-template-columns: 1fr; }
    .input-vat-summary > div { border-right: 0; border-bottom: 1px solid #e2e8f0; }
    .input-vat-summary > div:last-child { border-bottom: 0; }
    .input-vat-formula { align-items: flex-start; flex-direction: column; }
    .input-vat-formula strong { text-align: left; }
    .input-vat-result { padding: 14px; }
    .input-vat-result textarea { min-height: 480px; font-size: 12px; }
    .reimbursement-intro,
    .reimbursement-rule,
    .reimbursement-service,
    .reimbursement-pdf-match,
    .reimbursement-review-head,
    .reimbursement-review-actions,
    .reimbursement-result { align-items: stretch; flex-direction: column; }
    .reimbursement-export-guide-head { flex-direction: column; }
    .reimbursement-export-steps { grid-template-columns: 1fr; }
    .reimbursement-upload,
    .reimbursement-summary,
    .reimbursement-context { grid-template-columns: 1fr; }
    .reimbursement-upload > .btn-primary,
    .reimbursement-review-head button,
    .reimbursement-review-actions button { width: 100%; }
    .reimbursement-summary > div { border-right: 0; border-bottom: 1px solid #e2e8f0; }
    .reimbursement-summary > div:last-child { border-bottom: 0; }
    .reimbursement-context label.wide,
    .reimbursement-context > div { grid-column: 1; }
    .reimbursement-result-actions { flex-direction: column; }
    .reimbursement-result-actions .btn-primary,
    .reimbursement-result-actions .btn-secondary { width: 100%; text-align: center; }
    .reimbursement-payment-message-head { align-items: stretch; flex-direction: column; }
    .reimbursement-payment-message-head button { width: 100%; }
    .study-companion-hero { padding: 20px 17px; }
    .study-companion-hero h2 { font-size: 18px; }
    .study-companion-connection { max-width: none; }
    .study-companion-steps { grid-template-columns: 1fr; }
    .study-companion-steps li { padding: 8px 4px; }
    .study-companion-steps li:not(:last-child)::after { display: none; }
    .study-companion-install,
    .study-companion-control-head { align-items: stretch; flex-direction: column; }
    .study-companion-install-actions,
    .study-companion-actions { align-items: stretch; flex-direction: column; }
    .study-companion-install-actions > *,
    .study-companion-actions button { width: 100%; }
    .study-companion-settings { grid-template-columns: 1fr; }
    .study-companion-local-only { align-self: flex-start; }
}

/* ==================== 社保公积金明细表 ==================== */
.social-fund-intro {
    border-color: #c7d2fe;
    background: linear-gradient(135deg, #eef2ff, #f8fafc 70%);
}
.social-fund-intro strong { color: #3730a3; }
.social-fund-intro > span {
    color: #4338ca;
    background: #e0e7ff;
}
.social-fund-rule {
    border-color: #fde68a;
    background: #fffbeb;
}
.payroll-notice-drop-icon.social-fund {
    color: #4338ca;
    background: #e0e7ff;
}
.social-fund-review {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}
.social-fund-file-audit,
.social-fund-context,
.social-fund-section,
.social-fund-review-actions,
.social-fund-result {
    border: 1px solid #dbe4f0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .05);
}
.social-fund-file-audit {
    padding: 15px 17px;
}
.social-fund-file-audit > strong {
    display: block;
    margin-bottom: 9px;
    color: #0f172a;
    font-size: 13px;
}
.social-fund-file-audit > div {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px;
}
.social-fund-file-audit span {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    border: 1px solid #dbe4f0;
    border-radius: 10px;
    background: #f8fafc;
}
.social-fund-file-audit span.success {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.social-fund-file-audit span.warning {
    border-color: #fde68a;
    background: #fffbeb;
}
.social-fund-file-audit b { color: #334155; font-size: 11px; }
.social-fund-file-audit small { color: #64748b; font-size: 9px; line-height: 1.5; }
.social-fund-alert {
    padding: 11px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 11px;
    color: #1e3a8a;
    background: #eff6ff;
}
.social-fund-alert.warning {
    border-color: #fde68a;
    color: #92400e;
    background: #fffbeb;
}
.social-fund-alert.error {
    border-color: #fecaca;
    color: #991b1b;
    background: #fef2f2;
}
.social-fund-alert strong { font-size: 11px; }
.social-fund-alert ul {
    margin: 6px 0 0;
    padding-left: 19px;
    font-size: 10px;
    line-height: 1.65;
}
.social-fund-context { padding: 16px; }
.social-fund-context-head,
.social-fund-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}
.social-fund-context-head > div,
.social-fund-section-head > div {
    display: grid;
    gap: 3px;
}
.social-fund-context-head strong,
.social-fund-section-head strong {
    color: #0f172a;
    font-size: 14px;
}
.social-fund-context-head small,
.social-fund-section-head small {
    color: #64748b;
    font-size: 10px;
}
.social-fund-context-grid {
    display: grid;
    grid-template-columns: minmax(260px, 1.7fr) repeat(2, minmax(155px, 1fr));
    gap: 11px;
    margin-top: 13px;
}
.social-fund-context-grid label {
    display: grid;
    gap: 5px;
    color: #475569;
    font-size: 10px;
    font-weight: 700;
}
.social-fund-context-grid input {
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    color: #0f172a;
    background: #fff;
    font: inherit;
}
.social-fund-context-grid input:focus {
    border-color: #6366f1;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, .1);
}
.social-fund-context > p {
    margin: 10px 0 0;
    font-size: 10px;
}
.social-fund-context > p.warning { color: #b45309; }
.social-fund-context > p.success { color: #15803d; }
.social-fund-section { overflow: hidden; }
.social-fund-section-head {
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
    background: #f8fafc;
}
.social-fund-section-head label {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #3730a3;
    font-size: 11px;
    font-weight: 800;
}
.social-fund-summary-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    border-bottom: 1px solid #e2e8f0;
}
.social-fund-summary-grid > div {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 3px;
    padding: 12px 15px;
    border-right: 1px solid #e2e8f0;
}
.social-fund-summary-grid > div:last-child { border-right: 0; }
.social-fund-summary-grid span {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 9px;
}
.social-fund-summary-grid strong {
    color: #0f172a;
    font-size: 20px;
    font-variant-numeric: tabular-nums;
}
.social-fund-summary-grid small { color: #94a3b8; font-size: 9px; }
.social-fund-reconcile {
    display: block;
    margin: 12px 15px 0;
    padding: 8px 10px;
    border-radius: 8px;
    font-size: 10px;
    font-weight: 700;
}
.social-fund-reconcile.success { color: #166534; background: #f0fdf4; }
.social-fund-reconcile.warning { color: #92400e; background: #fffbeb; }
.social-fund-reconcile.error { color: #991b1b; background: #fef2f2; }
.social-fund-table-wrap {
    max-height: 430px;
    overflow: auto;
}
.social-fund-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 10px;
}
.social-fund-table th {
    position: sticky;
    z-index: 1;
    top: 0;
    padding: 9px 10px;
    border-bottom: 1px solid #cbd5e1;
    color: #334155;
    background: #f1f5f9;
    text-align: right;
    white-space: nowrap;
}
.social-fund-table th:nth-child(1),
.social-fund-table th:nth-child(2) { text-align: left; }
.social-fund-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.social-fund-table td:nth-child(1),
.social-fund-table td:nth-child(2) { text-align: left; }
.social-fund-table tbody tr:hover td { background: #f8fafc; }
.social-fund-section > .social-fund-alert {
    margin: 12px 15px;
}
.social-fund-empty {
    padding: 18px;
    border: 1px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    background: #f8fafc;
    font-size: 11px;
    text-align: center;
}
.social-fund-review-actions {
    display: grid;
    grid-template-columns: minmax(260px, 1fr) auto auto;
    align-items: center;
    gap: 14px;
    padding: 15px 17px;
}
.social-fund-confirm {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
}
#socialFundReviewStatus { color: #92400e; font-size: 10px; }
#socialFundReviewStatus.ready { color: #15803d; }
.social-fund-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-top: 16px;
    padding: 18px;
}
.social-fund-result > div:first-child {
    display: flex;
    align-items: center;
    gap: 12px;
}
.social-fund-result-mark {
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: #16a34a;
    font-size: 20px;
}
.social-fund-result strong { color: #166534; font-size: 14px; }
.social-fund-result p { margin: 4px 0 0; color: #64748b; font-size: 10px; }
.social-fund-result-actions { display: flex; gap: 9px; }

@media (max-width: 760px) {
    .social-fund-context-head,
    .social-fund-section-head,
    .social-fund-result { align-items: stretch; flex-direction: column; }
    .social-fund-context-grid,
    .social-fund-summary-grid,
    .social-fund-review-actions { grid-template-columns: 1fr; }
    .social-fund-summary-grid > div {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }
    .social-fund-summary-grid > div:last-child { border-bottom: 0; }
    .social-fund-result-actions { flex-direction: column; }
    .social-fund-result-actions > * { width: 100%; text-align: center; }
}

/* ==================== 社保分险种到个税表 ==================== */
.social-split-intro {
    border-color: #99f6e4;
    background: linear-gradient(135deg, #f0fdfa, #f8fafc 72%);
}
.social-split-intro strong { color: #115e59; }
.social-split-intro > span {
    color: #0f766e;
    background: #ccfbf1;
}
.social-split-rule {
    border-color: #fde68a;
    background: #fffbeb;
}
.social-split-upload {
    display: grid;
    gap: 14px;
    margin-top: 14px;
    padding: 17px;
    border: 1px solid #dbe4f0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .05);
}
.social-split-upload-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 11px;
}
.social-split-file-card {
    position: relative;
    display: grid;
    min-height: 148px;
    padding: 16px 15px 14px;
    border: 1px dashed #94a3b8;
    border-radius: 12px;
    color: #334155;
    background: #f8fafc;
    cursor: pointer;
    transition: border-color .16s ease, background .16s ease, box-shadow .16s ease;
}
.social-split-file-card:hover,
.social-split-file-card:focus-within {
    border-color: #14b8a6;
    background: #f0fdfa;
    box-shadow: 0 0 0 3px rgba(20, 184, 166, .08);
}
.social-split-file-card.optional { border-color: #cbd5e1; }
.social-split-file-card.built-in {
    border-color: #5eead4;
    background: #f0fdfa;
}
.social-split-file-card.has-file {
    border-style: solid;
    border-color: #4ade80;
    background: #f0fdf4;
}
.social-split-file-card.error {
    border-style: solid;
    border-color: #fca5a5;
    background: #fef2f2;
}
.social-split-step {
    position: absolute;
    top: 12px;
    right: 12px;
    display: grid;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    background: #0f766e;
    font-size: 10px;
    font-weight: 800;
}
.social-split-file-card > strong {
    padding-right: 31px;
    color: #0f172a;
    font-size: 14px;
}
.social-split-file-card > strong em {
    margin-left: 4px;
    color: #0f766e;
    font-size: 9px;
    font-style: normal;
}
.social-split-file-card.optional > strong em { color: #64748b; }
.social-split-file-card > small {
    margin-top: 8px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.6;
}
.social-split-file-card > span:last-child {
    align-self: end;
    margin-top: 13px;
    overflow: hidden;
    color: #0f766e;
    font-size: 10px;
    font-weight: 700;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.social-split-file-card > span:last-child.success { color: #15803d; }
.social-split-file-card > span:last-child.error {
    color: #b91c1c;
    white-space: normal;
}
.social-split-upload > .btn-primary {
    justify-self: end;
    min-width: 230px;
}
.social-split-clear-social {
    justify-self: start;
    padding: 0;
    border: 0;
    color: #0f766e;
    background: transparent;
    cursor: pointer;
    font-size: 10px;
    font-weight: 700;
}
.social-split-clear-social:hover { text-decoration: underline; }
.social-split-review {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}
.social-split-finance-summary {
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 17px 18px;
    border: 1px solid #fcd34d;
    border-radius: 15px;
    background: #fffbeb;
    box-shadow: 0 9px 24px rgba(180, 83, 9, .07);
}
.social-split-finance-summary > span {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #fff;
    background: #d97706;
    font-size: 18px;
    font-weight: 900;
}
.social-split-finance-summary > div { display: grid; gap: 4px; }
.social-split-finance-summary strong { color: #78350f; font-size: 15px; }
.social-split-finance-summary p {
    margin: 0;
    color: #92400e;
    font-size: 11px;
    line-height: 1.6;
}
.social-split-finance-summary.all-clear {
    border-color: #bbf7d0;
    background: #f0fdf4;
}
.social-split-finance-summary.all-clear > span { background: #16a34a; }
.social-split-finance-summary.all-clear strong { color: #14532d; }
.social-split-finance-summary.all-clear p { color: #166534; }
.social-split-overview {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    overflow: hidden;
    border: 1px solid #dbe4f0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .05);
}
.social-split-overview > div {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: baseline;
    gap: 3px;
    padding: 15px 16px;
    border-right: 1px solid #e2e8f0;
}
.social-split-overview > div:last-child { border-right: 0; }
.social-split-overview span {
    grid-column: 1 / -1;
    color: #64748b;
    font-size: 11px;
}
.social-split-overview strong {
    color: #0f172a;
    font-size: 22px;
    font-variant-numeric: tabular-nums;
}
.social-split-overview small { color: #64748b; font-size: 10px; }
.social-split-overview .success strong { color: #15803d; }
.social-split-overview .warning strong { color: #b45309; }
.social-split-source-audit,
.social-split-finance-issues,
.social-split-section,
.social-split-auto,
.social-split-review-actions,
.social-split-result {
    border: 1px solid #dbe4f0;
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 9px 24px rgba(15, 23, 42, .05);
}
.social-split-source-audit { overflow: hidden; }
.social-split-source-audit summary {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 16px;
    color: #334155;
    background: #f8fafc;
    cursor: pointer;
}
.social-split-source-audit[open] summary { border-bottom: 1px solid #e2e8f0; }
.social-split-source-audit strong { color: #0f172a; font-size: 12px; }
.social-split-source-audit small { color: #64748b; font-size: 10px; }
.social-split-source-audit ul {
    display: grid;
    gap: 6px;
    margin: 11px 0 0;
    padding: 0 16px 15px;
    list-style: none;
}
.social-split-source-audit li {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    padding: 8px 10px;
    border-radius: 8px;
    color: #475569;
    background: #f8fafc;
    font-size: 11px;
}
.social-split-source-audit li b { color: #334155; }
.social-split-source-audit li span { color: #0f766e; font-weight: 700; }
.social-split-finance-issues { overflow: hidden; }
.social-split-finance-issues-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px;
    padding: 15px 16px;
    border-bottom: 1px solid #fed7aa;
    background: #fff7ed;
}
.social-split-finance-issues-head strong { color: #9a3412; font-size: 14px; }
.social-split-finance-issues-head small { color: #9a3412; font-size: 10px; }
.social-split-issue-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    padding: 12px;
}
.social-split-issue-card {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    min-width: 0;
    padding: 12px;
    border: 1px solid #fde68a;
    border-radius: 10px;
    background: #fffdf5;
}
.social-split-issue-card > span {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    color: #fff;
    background: #d97706;
    font-size: 11px;
    font-weight: 800;
}
.social-split-issue-card > div { display: grid; min-width: 0; gap: 5px; }
.social-split-issue-card strong { color: #78350f; font-size: 12px; }
.social-split-issue-card p {
    margin: 0;
    color: #334155;
    font-size: 11px;
    line-height: 1.55;
    overflow-wrap: anywhere;
}
.social-split-issue-card small {
    color: #475569;
    font-size: 10px;
    line-height: 1.65;
}
.social-split-issue-card small b { color: #9a3412; }
.social-split-all-clear {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 14px 16px;
    border: 1px solid #bbf7d0;
    border-radius: 13px;
    color: #166534;
    background: #f0fdf4;
}
.social-split-all-clear > span {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    color: #fff;
    background: #16a34a;
    font-weight: 800;
}
.social-split-all-clear div { display: grid; gap: 2px; }
.social-split-all-clear strong { font-size: 12px; }
.social-split-all-clear p { margin: 0; font-size: 9px; }
.social-split-section { overflow: hidden; }
.social-split-section.exception {
    border-color: #fcd34d;
    box-shadow: 0 9px 24px rgba(180, 83, 9, .07);
}
.social-split-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 16px;
    border-bottom: 1px solid #fde68a;
    background: #fffbeb;
}
.social-split-section-head > div { display: grid; gap: 3px; }
.social-split-section-head strong { color: #92400e; font-size: 14px; }
.social-split-section-head small { color: #92400e; font-size: 11px; line-height: 1.55; }
.social-split-section-head > span {
    padding: 4px 9px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 10px;
    font-weight: 800;
}
.social-split-table-wrap {
    max-height: 460px;
    overflow: auto;
}
.social-split-table {
    width: 100%;
    min-width: 760px;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 11px;
}
.social-split-table th {
    position: sticky;
    z-index: 1;
    top: 0;
    padding: 9px 10px;
    border-bottom: 1px solid #cbd5e1;
    color: #334155;
    background: #f1f5f9;
    text-align: right;
    white-space: nowrap;
    font-size: 11px;
}
.social-split-table th:first-child,
.social-split-table th:last-child { text-align: left; }
.social-split-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #edf2f7;
    color: #334155;
    text-align: right;
    vertical-align: top;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.social-split-table td:first-child,
.social-split-table td:last-child { text-align: left; }
.social-split-table td strong { display: block; color: #0f172a; font-size: 11px; }
.social-split-table td small {
    display: block;
    margin-top: 3px;
    color: #64748b;
    font-size: 10px;
    line-height: 1.5;
    white-space: normal;
}
.social-split-finance-reason {
    min-width: 280px;
    white-space: normal !important;
}
.social-split-finance-reason strong {
    color: #b45309 !important;
    font-size: 11px !important;
}
.social-split-finance-reason small {
    max-width: 360px;
    color: #475569 !important;
    font-size: 10px !important;
    line-height: 1.65 !important;
}
.social-split-table tbody tr:hover td { background: #f8fafc; }
.exception-table tbody td { background: #fffdf5; }
.exception-table input {
    width: 92px;
    padding: 7px 8px;
    border: 1px solid #d6b75a;
    border-radius: 7px;
    color: #0f172a;
    background: #fff;
    font: inherit;
    text-align: right;
}
.exception-table input:focus {
    border-color: #d97706;
    outline: 0;
    box-shadow: 0 0 0 3px rgba(217, 119, 6, .12);
}
.social-split-row-check {
    display: inline-block;
    padding: 4px 7px;
    border-radius: 999px;
    color: #92400e;
    background: #fef3c7;
    font-size: 10px;
    font-weight: 800;
    white-space: nowrap;
}
.social-split-row-check.success { color: #166534; background: #dcfce7; }
.social-split-row-check.warning { color: #92400e; background: #fef3c7; }
.social-split-row-check.error { color: #991b1b; background: #fee2e2; }
.social-split-status {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 9px;
    font-weight: 800;
}
.social-split-status.auto { color: #166534; background: #dcfce7; }
.social-split-status.auto_zero { color: #475569; background: #e2e8f0; }
.social-split-auto { overflow: hidden; }
.social-split-auto summary {
    padding: 13px 16px;
    color: #334155;
    background: #f8fafc;
    cursor: pointer;
    font-size: 12px;
    font-weight: 800;
}
.social-split-auto[open] summary { border-bottom: 1px solid #e2e8f0; }
.social-split-review-actions {
    display: grid;
    grid-template-columns: minmax(300px, 1fr) auto;
    align-items: center;
    gap: 10px 16px;
    padding: 16px 17px;
}
.social-split-generation-note {
    grid-column: 1;
    margin: 0;
    color: #475569;
    font-size: 11px;
    line-height: 1.6;
}
.social-split-generation-note strong { color: #0f766e; }
.social-split-review-actions > span {
    grid-column: 1;
    color: #92400e;
    font-size: 11px;
}
.social-split-review-actions > span.ready { color: #15803d; }
.social-split-review-actions > div {
    grid-column: 2;
    grid-row: 1 / span 2;
    display: flex;
    gap: 9px;
}
.social-split-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    margin-top: 16px;
    padding: 18px;
}
.social-split-result-copy {
    display: flex;
    align-items: center;
    gap: 12px;
}
.social-split-result-copy > span {
    display: grid;
    flex: 0 0 auto;
    place-items: center;
    width: 42px;
    height: 42px;
    border-radius: 50%;
    color: #fff;
    background: #16a34a;
    font-size: 20px;
}
.social-split-result-copy strong { color: #166534; font-size: 14px; }
.social-split-result-copy p {
    margin: 4px 0 0;
    color: #64748b;
    font-size: 11px;
    line-height: 1.55;
}
.social-split-result-actions { display: flex; gap: 9px; }

@media (max-width: 860px) {
    .social-split-upload-grid,
    .social-split-overview { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .social-split-issue-list { grid-template-columns: 1fr; }
    .social-split-overview > div:nth-child(2) { border-right: 0; }
    .social-split-overview > div:nth-child(-n+2) { border-bottom: 1px solid #e2e8f0; }
    .social-split-review-actions { grid-template-columns: 1fr; }
    .social-split-review-actions > div {
        grid-column: 1;
        grid-row: auto;
    }
}
@media (max-width: 620px) {
    .social-split-upload-grid,
    .social-split-overview { grid-template-columns: 1fr; }
    .social-split-upload > .btn-primary { width: 100%; min-width: 0; }
    .social-split-overview > div {
        border-right: 0;
        border-bottom: 1px solid #e2e8f0;
    }
    .social-split-overview > div:last-child { border-bottom: 0; }
    .social-split-source-audit summary,
    .social-split-finance-issues-head,
    .social-split-finance-summary,
    .social-split-section-head,
    .social-split-result { align-items: stretch; flex-direction: column; }
    .social-split-source-audit li { grid-template-columns: 1fr; }
    .social-split-review-actions > div,
    .social-split-result-actions { flex-direction: column; }
    .social-split-review-actions button,
    .social-split-result-actions > * { width: 100%; text-align: center; }
}

/* 全站统一拖入 / 粘贴上传 */
.unified-upload-hint {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin: 0 0 16px;
    padding: 10px 13px;
    border: 1px dashed #93c5fd;
    border-radius: 9px;
    color: #1e3a8a;
    background: #eff6ff;
}
.unified-upload-hint.hidden { display: none; }
.unified-upload-hint-mark {
    display: grid;
    place-items: center;
    width: 28px;
    height: 28px;
    border-radius: 7px;
    color: #fff;
    background: #2563eb;
    font-size: 11px;
    font-weight: 800;
}
.unified-upload-hint > div { display: grid; gap: 2px; }
.unified-upload-hint strong { font-size: 11px; }
.unified-upload-hint p { margin: 0; color: #1d4ed8; font-size: 10px; line-height: 1.5; }
.unified-upload-hint > small {
    color: #64748b;
    font-size: 9px;
    white-space: nowrap;
}
.unified-upload-overlay {
    position: fixed;
    z-index: 1200;
    inset: 70px 24px 24px;
    display: none;
    place-items: center;
    border: 3px dashed #3b82f6;
    border-radius: 18px;
    pointer-events: none;
    background: rgba(239, 246, 255, .92);
    box-shadow: 0 20px 70px rgba(15, 23, 42, .22);
    backdrop-filter: blur(3px);
}
body.unified-upload-active .unified-upload-overlay {
    display: grid;
    animation: unified-upload-in .14s ease-out;
}
.unified-upload-overlay > div {
    display: grid;
    max-width: 620px;
    padding: 30px 38px;
    place-items: center;
    gap: 8px;
    text-align: center;
}
.unified-upload-overlay > div > span {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    color: #fff;
    background: #2563eb;
    font-size: 30px;
    font-weight: 400;
    box-shadow: 0 10px 25px rgba(37, 99, 235, .25);
}
.unified-upload-overlay strong { color: #1e3a8a; font-size: 20px; }
.unified-upload-overlay small { color: #475569; font-size: 12px; line-height: 1.6; }
.unified-upload-toast {
    position: fixed;
    z-index: 1300;
    right: 24px;
    bottom: 24px;
    max-width: min(520px, calc(100vw - 48px));
    padding: 11px 14px;
    border: 1px solid #bfdbfe;
    border-radius: 9px;
    color: #1e3a8a;
    background: #eff6ff;
    box-shadow: 0 12px 35px rgba(15, 23, 42, .18);
    font-size: 11px;
    font-weight: 700;
    line-height: 1.55;
}
.unified-upload-toast.hidden { display: none; }
.unified-upload-toast.success { border-color: #86efac; color: #166534; background: #f0fdf4; }
.unified-upload-toast.warning { border-color: #fcd34d; color: #92400e; background: #fffbeb; }
.unified-upload-toast.error { border-color: #fecaca; color: #991b1b; background: #fef2f2; }
@keyframes unified-upload-in {
    from { opacity: 0; transform: scale(.985); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 680px) {
    .unified-upload-hint {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: start;
    }
    .unified-upload-hint > small { grid-column: 1 / -1; white-space: normal; }
    .unified-upload-overlay { inset: 58px 10px 10px; border-radius: 13px; }
    .unified-upload-overlay > div { padding: 22px 18px; }
    .unified-upload-overlay strong { font-size: 16px; }
    .unified-upload-toast {
        right: 12px;
        bottom: 12px;
        max-width: calc(100vw - 24px);
    }
}

/* 第 29e：收入明细直显区块 */
.income-detail-block { margin: 6px 0 10px; padding: 8px 10px; background: #f8f9fa; border: 1px solid #e3e6ea; border-radius: 6px; }
.income-detail-block summary { cursor: pointer; font-weight: 600; color: #334155; font-size: 13px; }
.income-detail-text { width: 100%; margin-top: 8px; padding: 8px; font-size: 13px; line-height: 1.6; border: 1px solid #d7dbe0; border-radius: 4px; background: #fff; resize: vertical; box-sizing: border-box; white-space: pre-wrap; }
.btn-copy-income-detail { margin-top: 6px; padding: 4px 14px; font-size: 13px; border: 1px solid #2563eb; color: #2563eb; background: #fff; border-radius: 4px; cursor: pointer; }
.btn-copy-income-detail:hover { background: #eff6ff; }
.btn-copy-income-detail:disabled { opacity: .7; cursor: default; }

.reverse-field select {
    width: 100%;
    box-sizing: border-box;
    padding: 9px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    color: #111827;
    background: #fff;
    font-size: 14px;
    line-height: 1.3;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 11px center;
    padding-right: 30px;
}
.reverse-field select:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

/* ===== 税负测算表：矩阵式表单 ===== */
.tax-plan-hint {
    margin: -2px 0 12px;
    font-size: 13px;
    line-height: 1.7;
    color: #6b7280;
}
.tax-plan-hint b { color: #374151; }
.tax-plan-matrix {
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}
.tax-plan-matrix-head,
.tax-plan-matrix-row,
.tax-plan-matrix-foot {
    display: grid;
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr) minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 9px 14px;
}
.tax-plan-matrix[data-companies="1"] .tax-plan-col-b { display: none; }
.tax-plan-matrix[data-companies="1"]:not(.tax-plan-matrix-people) .tax-plan-matrix-head,
.tax-plan-matrix[data-companies="1"]:not(.tax-plan-matrix-people) .tax-plan-matrix-row,
.tax-plan-matrix[data-companies="1"]:not(.tax-plan-matrix-people) .tax-plan-matrix-foot {
    grid-template-columns: minmax(0, 2.2fr) minmax(0, 1fr);
}
.tax-plan-matrix-head {
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: .3px;
}
.tax-plan-matrix-row + .tax-plan-matrix-row { border-top: 1px solid #f3f4f6; }
.tax-plan-matrix-row label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.tax-plan-matrix-row label b { color: #dc2626; }
.tax-plan-matrix input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 10px;
    border: 1px solid #d1d5db;
    border-radius: 5px;
    color: #111827;
    background: #fff;
    font-size: 14px;
}
.tax-plan-matrix input:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.tax-plan-matrix-foot {
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
    font-size: 13px;
    color: #6b7280;
}
.tax-plan-matrix-foot b {
    font-size: 15px;
    color: #111827;
    font-variant-numeric: tabular-nums;
}
.tax-plan-matrix-people .tax-plan-matrix-head,
.tax-plan-matrix-people .tax-plan-matrix-row {
    grid-template-columns: 110px minmax(0, 1.6fr) minmax(0, 1fr);
}
.tax-plan-submit {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 16px;
    margin-top: 18px;
}
.tax-plan-submit span { font-size: 13px; color: #4b5563; }
.tax-plan-submit span.is-error { color: #dc2626; }
.tax-plan-submit span.is-success { color: #047857; }
@media (max-width: 820px) {
    .tax-plan-matrix-head { display: none; }
    .tax-plan-matrix-row,
    .tax-plan-matrix-foot { grid-template-columns: 1fr !important; gap: 8px; }
}
