        /* 开票统计卡片 */
        .invoice-stats-grid {
            display: flex;
            gap: 16px;
            margin-top: 16px;
            flex-wrap: wrap;
        }

        .invoice-stat-card {
            flex: 1;
            min-width: 160px;
            color: #fff;
            padding: 20px;
            border-radius: 12px;
            text-align: left;
            transition: transform 0.2s ease, box-shadow 0.2s ease;
        }

        .invoice-stat-card.clickable {
            cursor: pointer;
        }

        .invoice-stat-card.clickable:hover {
            transform: translateY(-3px);
        }

        .invoice-stat-card.is-active {
            outline: 3px solid rgba(255, 255, 255, 0.85);
            outline-offset: 2px;
            transform: translateY(-2px);
        }

        .invoice-stat-pending {
            background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
            box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
        }

        .invoice-stat-total {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
        }

        .invoice-stat-year {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
        }

        .invoice-stat-month {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
        }

        .invoice-stat-label {
            font-size: 13px;
            opacity: 0.9;
            margin-bottom: 8px;
        }

        .invoice-stat-amount {
            font-size: 28px;
            font-weight: 700;
            line-height: 1.2;
        }

        .invoice-stat-count {
            font-size: 12px;
            opacity: 0.8;
            margin-top: 4px;
        }

        .invoice-batch-result-list {
            text-align: left;
            margin: 8px 0 0;
            padding-left: 20px;
            max-height: 220px;
            overflow-y: auto;
            font-size: 13px;
            color: #374151;
        }

        .invoice-batch-result-list li {
            margin: 4px 0;
        }

        .invoice-review-log {
            margin-top: 14px;
            padding-top: 12px;
            border-top: 1px dashed #dee2e6;
        }

        .invoice-review-log ul {
            margin: 8px 0 0;
            padding-left: 18px;
            max-height: 160px;
            overflow-y: auto;
            font-size: 12px;
            color: #64748b;
        }

        .invoice-review-log li {
            margin: 4px 0;
        }

        .invoice-renew-tag,
        .invoice-notify-tag {
            display: inline-flex;
            align-items: center;
            padding: 2px 8px;
            border-radius: 999px;
            font-size: 11px;
            font-weight: 600;
            line-height: 1.4;
        }

        .invoice-renew-ok { background: #dcfce7; color: #166534; }
        .invoice-renew-soon { background: #fef3c7; color: #92400e; }
        .invoice-renew-expired { background: #fee2e2; color: #991b1b; }
        .invoice-renew-unknown { background: #f1f5f9; color: #64748b; }

        .invoice-notify-sent { background: #dbeafe; color: #1d4ed8; }
        .invoice-notify-reject { background: #ffedd5; color: #c2410c; }
        .invoice-notify-none { color: #94a3b8; background: transparent; padding: 0; }

        .invoice-suspected-dup-badge {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 18px;
            height: 18px;
            padding: 0 5px;
            border-radius: 999px;
            background: #fee2e2;
            color: #b91c1c;
            font-size: 10px;
            font-weight: 700;
            flex-shrink: 0;
            white-space: nowrap;
        }

        .invoice-type-special,
        .invoice-type-special-text {
            color: #b45309;
            font-weight: 700;
        }

        .invoice-row-special {
            border-left-color: #f59e0b !important;
        }

        .invoice-row-special .invoice-type-special {
            background: #fff7ed;
            padding: 2px 6px;
            border-radius: 6px;
        }

        .invoice-special-warning {
            margin-bottom: 12px;
            padding: 10px 12px;
            border-radius: 8px;
            background: #fff7ed;
            border: 1px solid #fdba74;
            color: #9a3412;
            font-size: 13px;
            font-weight: 600;
        }

        .invoice-client-link {
            color: #667eea;
            text-decoration: none;
            font-size: 12px;
            margin-left: 6px;
        }

        .invoice-client-link:hover {
            text-decoration: underline;
        }

        .confirm-dialog-reason-wrap {
            margin-top: 12px;
            text-align: left;
        }

        .confirm-dialog-reason-wrap label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 6px;
        }

        .confirm-dialog-reason-wrap textarea {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 13px;
            resize: vertical;
            min-height: 72px;
        }

        /* 列表行不可整行点击；仅「查看」按钮打开详情 */
        .invoice-list-row {
            cursor: default;
            transition: background 0.15s ease, box-shadow 0.15s ease;
        }

        .invoice-copy-btn {
            flex: 0 0 auto;
            border: none;
            background: transparent;
            cursor: pointer;
            font-size: 13px;
            line-height: 1;
            padding: 2px 4px;
            opacity: 0.45;
            transition: opacity 0.15s ease;
        }

        .invoice-copy-btn:hover {
            opacity: 1;
        }

        .data-col-with-copy {
            display: inline-flex !important;
            align-items: center;
            gap: 4px;
            width: 100%;
            max-width: 100%;
            min-width: 0;
            overflow: hidden;
        }

        .data-col-with-copy .invoice-cell-text {
            flex: 1 1 auto;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
            min-width: 0;
        }

        .invoice-table-scroll .data-col[data-col="tax_id"] {
            overflow: hidden !important;
        }

        .invoice-domain-text {
            color: #333;
            font-size: 14px;
        }

        .invoice-amount-col {
            font-weight: 600;
            color: #374151;
        }

        .invoice-billing-tag {
            display: inline-block;
            margin-left: 6px;
            color: #fff;
            font-size: 12px;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 500;
            vertical-align: middle;
        }

        .invoice-billing-tag-hz {
            background: #10b981;
        }

        .invoice-billing-tag-sz {
            background: #667eea;
        }

        #invoice-page-size {
            padding: 10px 12px;
            border: 1px solid #dee2e6;
            border-radius: 8px;
            font-size: 14px;
            background: #fff;
            color: #495057;
            cursor: pointer;
        }

        /* 页面布局 */
        .invoice-header-actions {
            display: flex;
            justify-content: flex-end;
            gap: 10px;
            margin-bottom: 8px;
        }

        .invoice-main-toolbar {
            margin-top: 16px;
        }

        .invoice-main-toolbar .search-box-input-only input {
            min-width: 260px;
            padding-left: 36px;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: 12px center;
        }

        .invoice-todo-container {
            margin-top: 16px;
        }

        .btn-gen-link {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: #fff;
            border: none;
        }

        .btn-gen-link:hover {
            box-shadow: 0 4px 12px rgba(16, 185, 129, 0.35);
        }

        /* 表头 sticky + 同名筛选条在 scroll 外 */
        .invoice-table-scroll {
            overflow-x: auto;
            overflow-y: visible;
        }

        .invoice-table-scroll .client-header-row {
            background: #f8f9fa;
            border-radius: 8px;
            padding: 12px 20px;
            margin-bottom: 8px;
            display: flex !important;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
            font-weight: 600;
            font-size: 14px;
            color: #495057;
            border: 1px solid #dee2e6;
            overflow: visible;
            min-width: 0;
        }

        .invoice-table-scroll .client-header-content {
            display: flex;
            align-items: center;
            flex: 1;
            gap: 15px;
            flex-wrap: nowrap;
            overflow: visible;
            min-width: 0;
        }

        .invoice-table-scroll .client-item {
            background: #fff;
            border-radius: 8px;
            padding: 12px 20px;
            margin-bottom: 8px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: all 0.2s ease;
            border-left: 4px solid #667eea;
        }

        .invoice-table-scroll .client-item:hover {
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
            background: #f8f9fa;
        }

        .invoice-table-scroll .client-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 15px;
            flex-wrap: nowrap;
        }

        .invoice-table-scroll .client-info-line {
            display: flex;
            align-items: center;
            flex: 1;
            gap: 15px;
            font-size: 14px;
            color: #333;
            flex-wrap: nowrap;
            overflow: visible;
            min-width: 0;
        }

        .invoice-table-scroll .header-col {
            font-weight: 600;
            color: #495057;
            white-space: nowrap;
            flex-shrink: 0;
        }

        .invoice-table-header {
            position: sticky;
            top: 0;
            z-index: 20;
            background: #f8f9fa;
            box-shadow: 0 2px 0 rgba(0, 0, 0, 0.04);
        }

        /* 表头与数据列严格对齐：固定列宽 + 垂直居中 */
        .invoice-table-scroll .client-header-content,
        .invoice-table-scroll .client-info-line {
            align-items: center !important;
            gap: 10px !important;
        }

        .invoice-table-scroll .header-col,
        .invoice-table-scroll .data-col {
            display: inline-flex !important;
            align-items: center !important;
            flex: 0 0 auto;
            box-sizing: border-box;
            min-height: 32px;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .invoice-table-scroll .header-col[data-col="checkbox"],
        .invoice-table-scroll .data-col[data-col="checkbox"] {
            flex: 0 0 36px;
            width: 36px;
            max-width: 36px;
            justify-content: center;
        }

        .invoice-table-scroll .header-col[data-col="id"],
        .invoice-table-scroll .data-col[data-col="id"],
        .invoice-table-scroll .header-id,
        .invoice-table-scroll .data-id {
            flex: 0 0 38px !important;
            width: 38px !important;
            min-width: 38px !important;
            max-width: 38px !important;
            padding: 0 !important;
            justify-content: flex-start;
        }

        .invoice-table-scroll .header-col[data-col="company"],
        .invoice-table-scroll .data-col[data-col="company"] {
            flex: 0 0 210px;
            width: 210px;
            max-width: 210px;
        }

        .invoice-table-scroll .header-col[data-col="tax_id"],
        .invoice-table-scroll .data-col[data-col="tax_id"] {
            flex: 0 0 160px;
            width: 160px;
            max-width: 160px;
        }

        .invoice-table-scroll .header-col[data-col="domain"],
        .invoice-table-scroll .data-col[data-col="domain"] {
            flex: 0 0 140px;
            width: 140px;
            max-width: 140px;
            justify-content: flex-start !important;
            text-align: left !important;
            align-items: center !important;
        }

        .invoice-table-scroll .data-col[data-col="domain"] .invoice-domain-text {
            display: inline-block;
            line-height: 1.35;
            vertical-align: middle;
            max-width: 100%;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .invoice-table-scroll .header-col[data-col="billing_company"],
        .invoice-table-scroll .data-col[data-col="billing_company"] {
            flex: 0 0 72px;
            width: 72px;
            max-width: 72px;
        }

        .invoice-table-scroll .header-col[data-col="invoice_type"],
        .invoice-table-scroll .data-col[data-col="invoice_type"] {
            flex: 0 0 100px;
            width: 100px;
            max-width: 100px;
            gap: 6px;
            overflow: visible;
        }

        .invoice-table-scroll .header-col[data-col="client_renew"],
        .invoice-table-scroll .data-col[data-col="client_renew"] {
            flex: 0 0 78px;
            width: 78px;
            max-width: 78px;
        }

        .invoice-table-scroll .header-col[data-col="client_manager"],
        .invoice-table-scroll .data-col[data-col="client_manager"] {
            flex: 0 0 80px;
            width: 80px;
            max-width: 80px;
        }

        .invoice-table-scroll .header-col[data-col="customer_notify"],
        .invoice-table-scroll .data-col[data-col="customer_notify"] {
            flex: 0 0 88px;
            width: 88px;
            max-width: 88px;
        }

        .invoice-table-scroll .header-col[data-col="amount"],
        .invoice-table-scroll .data-col[data-col="amount"] {
            flex: 0 0 78px;
            width: 78px;
            max-width: 78px;
        }

        .invoice-table-scroll .header-col[data-col="created_at"],
        .invoice-table-scroll .data-col[data-col="created_at"] {
            flex: 0 0 100px;
            width: 100px;
            max-width: 100px;
        }

        .invoice-table-scroll .header-col[data-col="status"],
        .invoice-table-scroll .data-col[data-col="status"] {
            flex: 0 0 80px;
            width: 80px;
            max-width: 80px;
        }

        .invoice-table-scroll .header-col[data-col="contact_name"],
        .invoice-table-scroll .data-col[data-col="contact_name"] {
            flex: 0 0 90px;
            width: 90px;
            max-width: 90px;
        }

        .invoice-table-scroll .header-col[data-col="contact_phone"],
        .invoice-table-scroll .data-col[data-col="contact_phone"] {
            flex: 0 0 110px;
            width: 110px;
            max-width: 110px;
        }

        .invoice-table-scroll .header-col[data-col="email"],
        .invoice-table-scroll .data-col[data-col="email"] {
            flex: 0 0 160px;
            width: 160px;
            max-width: 160px;
        }

        .invoice-table-scroll .header-col[data-col="invoice_file"],
        .invoice-table-scroll .data-col[data-col="invoice_file"] {
            flex: 0 0 80px;
            width: 80px;
            max-width: 80px;
        }

        .invoice-table-scroll .header-col[data-col="review_at"],
        .invoice-table-scroll .data-col[data-col="review_at"] {
            flex: 0 0 100px;
            width: 100px;
            max-width: 100px;
        }

        .invoice-table-scroll .header-actions-col,
        .invoice-table-scroll .invoice-row-actions[data-col="actions"] {
            flex: 0 0 auto !important;
            flex-shrink: 0 !important;
            width: auto;
            min-width: 96px !important;
            max-width: none;
            display: inline-flex !important;
            align-items: center;
            justify-content: flex-end;
            box-sizing: border-box;
            gap: 6px;
            margin-left: auto;
        }

        .invoice-table-scroll .invoice-row-actions[data-col="actions"] {
            padding: 0;
            background: transparent;
            border: none;
            border-radius: 0;
            box-shadow: none;
            overflow: visible;
        }

        .invoice-table-scroll .invoice-row-actions[data-col="actions"] .action-btn {
            flex-shrink: 0;
        }

        /* 表头/数据行外框铺满容器；列多时横向滚动 */
        .invoice-table-scroll {
            width: 100%;
        }

        .invoice-table-scroll .client-header-row,
        .invoice-table-scroll .client-item {
            width: 100% !important;
            min-width: 100%;
            box-sizing: border-box;
        }

        .invoice-table-scroll.clients-table-scroll .client-header-row,
        .invoice-table-scroll.clients-table-scroll .client-item {
            min-width: max(100%, fit-content);
            width: 100%;
        }

        .invoice-table-scroll .client-row,
        .invoice-table-scroll .client-header-row {
            display: flex !important;
            width: 100% !important;
            box-sizing: border-box;
            flex-wrap: nowrap !important;
            align-items: center;
        }

        .invoice-table-scroll .client-info-line,
        .invoice-table-scroll .client-header-content {
            flex: 1 1 0 !important;
            width: 100% !important;
            min-width: 0;
            max-width: 100%;
            overflow: visible;
        }

        .invoice-table-scroll .client-header-content::after,
        .invoice-table-scroll .client-info-line::after {
            content: none;
            display: none;
        }

        /* 行级状态色（左边框） */
        #invoiceInfoList .invoice-list-row {
            border-left-width: 4px;
            border-left-style: solid;
        }

        #invoiceInfoList .invoice-row-status-review {
            border-left-color: #f59e0b;
        }

        #invoiceInfoList .invoice-row-status-pending-invoice {
            border-left-color: #3b82f6;
        }

        #invoiceInfoList .invoice-row-status-rejected {
            border-left-color: #ef4444;
        }

        #invoiceInfoList .invoice-row-status-invoiced {
            border-left-color: #10b981;
        }

        #invoiceInfoList .invoice-row-status-review:hover {
            background: #fffbeb !important;
        }

        #invoiceInfoList .invoice-row-status-pending-invoice:hover {
            background: #eff6ff !important;
        }

        #invoiceInfoList .invoice-row-status-rejected:hover {
            background: #fef2f2 !important;
        }

        #invoiceInfoList .invoice-row-status-invoiced:hover {
            background: #ecfdf5 !important;
        }

        /* 操作按钮 */
        .action-btn.invoice-send-email-btn {
            background: linear-gradient(135deg, #10b981 0%, #059669 100%);
            color: #fff;
            margin-left: 6px;
        }

        .action-btn.invoice-send-email-btn-disabled {
            background: #9ca3af;
            color: #fff;
            margin-left: 6px;
            cursor: not-allowed;
        }

        /* 空状态 */
        .invoice-empty-state {
            text-align: center;
            padding: 48px 24px;
            background: #fff;
            border-radius: 12px;
            border: 1px dashed #dee2e6;
        }

        .invoice-empty-state .invoice-empty-icon {
            font-size: 40px;
            margin-bottom: 12px;
            line-height: 1;
        }

        .invoice-empty-state .invoice-empty-title {
            font-size: 16px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 8px;
        }

        .invoice-empty-state .invoice-empty-desc {
            font-size: 14px;
            color: #6b7280;
            margin-bottom: 16px;
            line-height: 1.6;
        }

        .invoice-empty-filtered {
            border-color: #c7d2fe;
            background: linear-gradient(180deg, #f8f9ff 0%, #fff 100%);
        }

        /* 审核详情中的凭证图片缩略图（样式来自 invoice_request.css） */
        .review-proof-list {
            display: inline-flex;
            flex-wrap: wrap;
            gap: 6px;
            vertical-align: middle;
        }

        .review-proof-btn {
            border: none;
            padding: 0;
            background: transparent;
            cursor: pointer;
        }

        .review-proof-thumb {
            width: 48px;
            height: 48px;
            border-radius: 6px;
            object-fit: cover;
            border: 1px solid #e5e7eb;
            transition: transform 0.2s ease;
        }

        .review-proof-thumb:hover {
            transform: scale(1.1);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        /* 开票列表：铺满容器，列多时 min-width 100% 保证可滚动 */
        .invoice-table-scroll.clients-table-scroll .client-header-row,
        .invoice-table-scroll.clients-table-scroll .client-item {
            min-width: max(100%, fit-content);
            width: 100%;
        }

        .invoice-sortable {
            user-select: none;
        }

        .invoice-sortable.is-sorted {
            color: #667eea;
        }

        .invoice-sortable .sort-indicator {
            font-size: 11px;
            opacity: 0.85;
        }

        .batch-actions-right {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
            justify-content: flex-end;
        }

        .batch-actions-right .btn {
            white-space: nowrap;
        }

        .clients-table-scroll [data-col].col-hidden {
            display: none !important;
        }

        .clients-table-scroll .client-actions.col-hidden,
        .clients-table-scroll .invoice-row-actions.col-hidden {
            display: none !important;
        }

        /* 列表：同名抬头多次开票时，公司名旁序号角标（覆盖 clients.css .data-col 的 overflow:hidden，避免裁切） */
        #invoiceInfoList .data-col.data-col-company-invoice {
            position: relative;
            display: inline-flex !important;
            flex-direction: row;
            align-items: center !important;
            gap: 6px;
            flex: 0 0 210px;
            width: 210px;
            max-width: 210px;
            box-sizing: border-box;
            overflow: visible !important;
        }

        #invoiceInfoList .invoice-company-name-text {
            flex: 1 1 auto;
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        #invoiceInfoList .invoice-company-dup-badge {
            flex: 0 0 auto;
            align-self: flex-start;
            margin-top: 1px;
            min-width: 20px;
            min-height: 18px;
            padding: 0 6px;
            box-sizing: border-box;
            border-radius: 9px;
            font-size: 11px;
            font-weight: 700;
            line-height: 18px;
            text-align: center;
            color: #fff;
            background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
            box-shadow: 0 1px 3px rgba(234, 88, 12, 0.45);
            z-index: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
        }

        #invoiceInfoList .invoice-company-dup-badge:focus-visible {
            outline: 2px solid #c2410c;
            outline-offset: 2px;
        }

        .invoice-same-company-bar {
            display: none;
            align-items: center;
            justify-content: space-between;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 12px;
            padding: 10px 14px;
            background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
            border: 1px solid #fdba74;
            border-radius: 8px;
            font-size: 14px;
            color: #9a3412;
        }

        .invoice-same-company-bar strong {
            color: #7c2d12;
            font-weight: 600;
        }

        .invoice-same-company-bar .btn-clear-same-company {
            flex-shrink: 0;
            padding: 6px 14px;
            font-size: 13px;
            border: none;
            border-radius: 6px;
            cursor: pointer;
            background: #fff;
            color: #c2410c;
            border: 1px solid #ea580c;
            font-weight: 500;
        }

        .invoice-same-company-bar .btn-clear-same-company:hover {
            background: #fff7ed;
        }

        /* 审核详情凭证大图预览弹层 */
        .review-image-modal {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.85);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 99999;
        }

        .review-image-modal.active {
            display: flex;
        }

        .review-image-modal-content {
            position: relative;
            max-width: 90vw;
            max-height: 85vh;
            background: #000;
            border-radius: 10px;
            overflow: hidden;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
        }

        .review-image-modal-content img {
            display: block;
            max-width: 90vw;
            max-height: 85vh;
            object-fit: contain;
        }

        .review-image-close {
            position: absolute;
            top: 10px;
            right: 10px;
            width: 36px;
            height: 36px;
            border-radius: 999px;
            border: none;
            background: rgba(255, 255, 255, 0.9);
            color: #333;
            cursor: pointer;
            font-size: 20px;
            line-height: 36px;
            text-align: center;
            z-index: 100000;
            transition: all 0.2s ease;
        }

        .review-image-close:hover {
            background: #fff;
            transform: scale(1.1);
        }

        .review-image-nav {
            position: absolute;
            top: 50%;
            transform: translateY(-50%);
            width: 44px;
            height: 44px;
            border-radius: 999px;
            border: none;
            background: rgba(255, 255, 255, 0.9);
            color: #333;
            cursor: pointer;
            font-size: 20px;
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 100000;
            transition: all 0.2s ease;
        }

        .review-image-prev {
            left: 15px;
        }

        .review-image-next {
            right: 15px;
        }

        .review-image-nav:hover {
            background: #fff;
            transform: translateY(-50%) scale(1.1);
        }

        /* 状态徽章（独立类名，避免 todo.css .badge-status 灰色覆盖） */
        .invoice-status-badge {
            display: inline-flex;
            align-items: center;
            padding: 3px 10px;
            border-radius: 12px;
            font-size: 12px;
            font-weight: 500;
            white-space: nowrap;
            line-height: 1.3;
        }

        .invoice-status-review {
            background: #fef3c7;
            color: #92400e;
        }

        .invoice-status-pending-invoice {
            background: #dbeafe;
            color: #1d4ed8;
        }

        .invoice-status-rejected {
            background: #fee2e2;
            color: #991b1b;
        }

        .invoice-status-invoiced {
            background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
            color: #fff;
        }

        .invoice-status-file-yes {
            background: #dcfce7;
            color: #166534;
        }

        .invoice-status-file-no {
            background: #f1f5f9;
            color: #64748b;
        }

        .invoice-todo-container .domain-link {
            color: #333;
            text-decoration: none;
        }

        .invoice-todo-container .domain-link:hover {
            text-decoration: none;
        }

        /* 已开票状态徽章（兼容旧类名） */
        .badge-status.invoiced {
            background: linear-gradient(135deg, #a78bfa 0%, #8b5cf6 100%);
            color: #fff;
            font-weight: 500;
        }

        /* 操作按钮通用样式 */
        .action-btn {
            padding: 8px 14px !important;
            border: none;
            border-radius: 8px !important;
            cursor: pointer;
            font-size: 13px !important;
            font-weight: 500;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        /* 查看按钮 */
        .action-btn.edit {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
            color: white;
        }

        .action-btn.edit:hover {
            background: linear-gradient(135deg, #5a6fd6 0%, #6a4190 100%) !important;
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(102, 126, 234, 0.35);
        }

        /* 复制公司和税号按钮 */
        .copy-info-btn {
            position: absolute;
            top: 10px;
            right: 10px;
            padding: 6px 12px;
            border: none;
            border-radius: 6px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            font-size: 12px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
        }

        .copy-info-btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 8px rgba(102, 126, 234, 0.35);
        }

        /* 编辑模式样式 */
        .edit-row {
            margin-bottom: 12px;
        }

        .edit-row label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #374151;
            margin-bottom: 4px;
        }

        .edit-row input,
        .edit-row select {
            padding: 8px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            transition: border-color 0.2s;
        }

        .edit-row input:focus,
        .edit-row select:focus,
        .edit-row textarea:focus {
            outline: none;
            border-color: #667eea;
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .edit-row textarea {
            padding: 10px 12px;
            border: 1px solid #d1d5db;
            border-radius: 6px;
            font-size: 14px;
            font-family: inherit;
            resize: vertical;
            min-height: 80px;
            transition: border-color 0.2s;
            line-height: 1.5;
        }

        .btn-warning {
            background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
            color: #fff;
            border: none;
        }

        .btn-warning:hover {
            background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
        }

        /* 编辑表单样式（与前台 invoice_request.html 一致） */
        .edit-form-container {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.03) 0%, rgba(118, 75, 162, 0.03) 100%);
            border-radius: 16px;
            padding: 24px;
            border: 1px solid rgba(102, 126, 234, 0.1);
        }

        .edit-form-row {
            display: flex;
            gap: 16px;
            flex-wrap: wrap;
        }

        .edit-form-group {
            flex: 1 1 45%;
            margin-bottom: 20px;
            position: relative;
        }

        .edit-form-group.full {
            flex-basis: 100%;
        }

        .edit-form-group label {
            display: block;
            font-size: 13px;
            font-weight: 600;
            color: #334155;
            margin-bottom: 8px;
            letter-spacing: 0.2px;
        }

        .edit-form-group label .required {
            color: #ef4444;
            margin-left: 4px;
            font-weight: 700;
        }

        .edit-form-group input,
        .edit-form-group select,
        .edit-form-group textarea {
            width: 100%;
            box-sizing: border-box;
            border: 2px solid #e2e8f0;
            border-radius: 12px;
            padding: 12px 16px;
            font-size: 14px;
            font-family: inherit;
            background: rgba(255, 255, 255, 0.9);
            transition: all 0.3s ease;
            color: #1e293b;
        }

        .edit-form-group input:hover,
        .edit-form-group select:hover,
        .edit-form-group textarea:hover {
            border-color: #cbd5e1;
            background: #fff;
        }

        .edit-form-group input:focus,
        .edit-form-group select:focus,
        .edit-form-group textarea:focus {
            outline: none;
            border-color: #667eea;
            background: #ffffff;
            box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1), 0 4px 12px rgba(102, 126, 234, 0.15);
            transform: translateY(-1px);
        }

        .edit-form-group textarea {
            resize: vertical;
            min-height: 80px;
        }

        .edit-form-group select {
            cursor: pointer;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23667eea' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
            background-repeat: no-repeat;
            background-position: right 16px center;
            padding-right: 40px;
            appearance: none;
            -webkit-appearance: none;
        }

        /* 生成申请链接弹窗 */
        .gen-link-modal .gen-link-modal-content {
            max-width: 560px;
            max-height: min(92vh, 820px);
            display: flex;
            flex-direction: column;
        }

        .gen-link-modal .modal-body {
            overflow-y: auto;
            flex: 1;
            min-height: 0;
        }

        .gen-link-form-body {
            margin-bottom: 0;
        }

        .gen-label-hint {
            color: #94a3b8;
            font-weight: normal;
            font-size: 12px;
        }

        .gen-expire-preview {
            margin: 8px 0 0;
            font-size: 12px;
            color: #64748b;
        }

        .gen-client-lookup {
            margin: 8px 0 0;
            font-size: 12px;
            line-height: 1.5;
            color: #64748b;
        }

        .gen-client-lookup.is-found {
            color: #059669;
        }

        .gen-client-lookup.is-missing {
            color: #b45309;
        }

        .gen-client-lookup.is-loading {
            color: #94a3b8;
        }

        .gen-link-form-body textarea {
            width: 100%;
            min-height: 64px;
            resize: vertical;
            box-sizing: border-box;
        }

        .gen-link-form-actions {
            margin-top: 20px;
        }

        .gen-result-area {
            margin-top: 20px;
            padding: 20px;
            background: linear-gradient(135deg, rgba(16, 185, 129, 0.08) 0%, rgba(5, 150, 105, 0.08) 100%);
            border-radius: 12px;
            border: 1px solid rgba(16, 185, 129, 0.2);
        }

        .gen-result-head {
            display: flex;
            align-items: center;
            gap: 10px;
            margin-bottom: 12px;
        }

        .gen-result-icon {
            font-size: 24px;
            line-height: 1;
        }

        .gen-result-title {
            font-size: 16px;
            font-weight: 600;
            color: #059669;
        }

        .gen-result-link-box {
            background: #fff;
            border-radius: 8px;
            padding: 12px;
            border: 1px solid #e5e7eb;
        }

        .gen-result-link-box input {
            width: 100%;
            border: none;
            font-size: 13px;
            color: #334155;
            background: transparent;
            cursor: text;
            box-sizing: border-box;
        }

        .gen-result-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 12px;
        }

        .gen-result-actions .edit-btn-primary,
        .gen-result-actions .edit-btn-secondary {
            padding: 10px 20px;
            font-size: 14px;
        }

        .gen-result-expires {
            margin: 12px 0 0;
            font-size: 12px;
            color: #64748b;
        }

        .gen-recent-tokens {
            margin-top: 24px;
            padding-top: 20px;
            border-top: 1px solid #e5e7eb;
        }

        .gen-recent-head {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 10px;
        }

        .gen-recent-title {
            font-size: 13px;
            font-weight: 600;
            color: #475569;
        }

        .gen-recent-refresh {
            border: none;
            background: transparent;
            color: #64748b;
            cursor: pointer;
            font-size: 16px;
            line-height: 1;
            padding: 4px 8px;
            border-radius: 6px;
        }

        .gen-recent-refresh:hover {
            background: #f1f5f9;
            color: #334155;
        }

        .gen-recent-list {
            display: flex;
            flex-direction: column;
            gap: 8px;
        }

        .gen-recent-empty {
            margin: 0;
            font-size: 12px;
            color: #94a3b8;
            text-align: center;
            padding: 12px 0;
        }

        .gen-recent-item {
            display: flex;
            align-items: flex-start;
            justify-content: space-between;
            gap: 10px;
            padding: 10px 12px;
            background: #f8fafc;
            border: 1px solid #e2e8f0;
            border-radius: 8px;
        }

        .gen-recent-item-main {
            flex: 1;
            min-width: 0;
            display: flex;
            flex-direction: column;
            gap: 2px;
        }

        .gen-recent-label {
            font-size: 13px;
            font-weight: 600;
            color: #334155;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .gen-recent-remark {
            font-size: 11px;
            color: #64748b;
            overflow: hidden;
            text-overflow: ellipsis;
            white-space: nowrap;
        }

        .gen-recent-meta {
            font-size: 11px;
            color: #94a3b8;
        }

        .gen-recent-item-actions {
            display: flex;
            flex-shrink: 0;
            gap: 6px;
        }

        .gen-recent-btn {
            border: 1px solid #cbd5e1;
            background: #fff;
            color: #475569;
            font-size: 12px;
            padding: 4px 10px;
            border-radius: 6px;
            cursor: pointer;
            white-space: nowrap;
        }

        .gen-recent-btn:hover {
            border-color: #94a3b8;
            background: #f8fafc;
        }

        .gen-recent-btn-danger {
            color: #dc2626;
            border-color: #fecaca;
        }

        .gen-recent-btn-danger:hover {
            background: #fef2f2;
            border-color: #f87171;
        }

        .edit-form-actions {
            display: flex;
            gap: 16px;
            justify-content: center;
            margin-top: 24px;
            padding-top: 20px;
            border-top: 1px solid rgba(102, 126, 234, 0.1);
        }

        .edit-btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            border: none;
            border-radius: 12px;
            padding: 14px 32px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        .edit-btn-primary:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
        }

        .edit-btn-secondary {
            background: #ffffff;
            color: #667eea;
            border: 2px solid #667eea;
            border-radius: 12px;
            padding: 14px 32px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .edit-btn-secondary:hover {
            background: rgba(102, 126, 234, 0.05);
            transform: translateY(-2px);
        }

        /* 凭证编辑区域 */
        .edit-proof-preview {
            display: flex;
            flex-wrap: wrap;
            gap: 10px;
            margin-bottom: 12px;
        }

        .edit-proof-item {
            position: relative;
            width: 80px;
            height: 80px;
            border-radius: 10px;
            overflow: hidden;
            border: 2px solid #e2e8f0;
        }

        .edit-proof-item img {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .edit-proof-remove {
            position: absolute;
            top: 4px;
            right: 4px;
            width: 20px;
            height: 20px;
            border-radius: 50%;
            border: none;
            background: rgba(239, 68, 68, 0.9);
            color: #fff;
            font-size: 12px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .edit-proof-remove:hover {
            background: #dc2626;
        }

        .edit-proof-upload {
            border: 2px dashed #e2e8f0;
            border-radius: 12px;
            padding: 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s ease;
            background: rgba(255, 255, 255, 0.8);
        }

        .edit-proof-upload:hover,
        .edit-proof-upload.dragover {
            border-color: #667eea;
            background: rgba(102, 126, 234, 0.08);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .edit-proof-upload .upload-placeholder {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 6px;
        }

        .edit-proof-upload .upload-placeholder span {
            font-size: 28px;
        }

        .edit-proof-upload .upload-placeholder p {
            margin: 0;
            font-size: 14px;
            color: #475569;
        }

        .edit-proof-upload .upload-main-text {
            font-size: 14px;
            font-weight: 500;
            color: #334155;
        }

        .edit-proof-upload .upload-hint {
            font-size: 12px !important;
            color: #94a3b8 !important;
        }

        /* 展开更多信息按钮 */
        .edit-toggle-btn {
            width: 100%;
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
            border: 2px dashed rgba(102, 126, 234, 0.3);
            border-radius: 12px;
            padding: 12px 16px;
            font-size: 14px;
            font-weight: 500;
            color: #667eea;
            cursor: pointer;
            transition: all 0.3s ease;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 8px;
            margin-bottom: 20px;
        }

        .edit-toggle-btn:hover {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.15) 0%, rgba(118, 75, 162, 0.15) 100%);
            border-color: rgba(102, 126, 234, 0.5);
        }

        .edit-toggle-btn.active {
            background: linear-gradient(135deg, rgba(102, 126, 234, 0.2) 0%, rgba(118, 75, 162, 0.2) 100%);
            border-color: rgba(102, 126, 234, 0.5);
        }

        .edit-toggle-btn .toggle-icon {
            display: inline-block;
            transition: transform 0.3s ease;
            font-size: 12px;
        }

        .edit-toggle-btn.active .toggle-icon {
            transform: rotate(180deg);
        }

        /* 自定义提示框样式 */
        .custom-alert-modal {
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.6);
            display: none;
            align-items: center;
            justify-content: center;
            z-index: 99999;
            backdrop-filter: blur(4px);
            -webkit-backdrop-filter: blur(4px);
        }

        .custom-alert-modal.active {
            display: flex;
            animation: alertFadeIn 0.2s ease;
        }

        @keyframes alertFadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .custom-alert-content {
            background: #fff;
            border-radius: 16px;
            padding: 32px 40px;
            text-align: center;
            max-width: 360px;
            box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
            animation: alertSlideUp 0.3s ease;
        }

        @keyframes alertSlideUp {
            from {
                opacity: 0;
                transform: translateY(20px) scale(0.95);
            }

            to {
                opacity: 1;
                transform: translateY(0) scale(1);
            }
        }

        .custom-alert-icon {
            font-size: 48px;
            margin-bottom: 16px;
        }

        .custom-alert-message {
            font-size: 16px;
            color: #334155;
            line-height: 1.6;
            margin-bottom: 24px;
            font-weight: 500;
        }

        .custom-alert-btn {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            border: none;
            border-radius: 10px;
            padding: 12px 48px;
            font-size: 15px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s ease;
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .custom-alert-btn:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
        }

        /* 分页样式 */
        .pagination-container {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 16px 20px;
            background: #fff;
            border-radius: 12px;
            margin-top: 16px;
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        }

        .pagination-info {
            font-size: 14px;
            color: #64748b;
        }

        .pagination-buttons {
            display: flex;
            align-items: center;
            gap: 6px;
        }

        .pagination-btn {
            padding: 8px 14px;
            border: 1px solid #e2e8f0;
            background: #fff;
            color: #475569;
            border-radius: 8px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .pagination-btn:hover:not(:disabled) {
            border-color: #667eea;
            color: #667eea;
            background: rgba(102, 126, 234, 0.05);
        }

        .pagination-btn.active {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            border-color: transparent;
        }

        .pagination-btn:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .pagination-ellipsis {
            padding: 0 8px;
            color: #94a3b8;
        }

        /* 复选框样式 */
        .item-checkbox,
        #selectAll,
        #batchSelectAll {
            width: 16px;
            height: 16px;
            cursor: pointer;
            accent-color: #667eea;
        }

        /* 批量操作栏样式 */
        .batch-actions {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-top: 16px;
            padding: 12px 16px;
            background: #fff;
            border-radius: 10px;
            box-shadow: 0 8px 24px rgba(31, 41, 55, 0.08);
        }

        .batch-actions-left {
            display: flex;
            align-items: center;
            gap: 12px;
        }

        .batch-actions-left label {
            font-size: 14px;
            color: #374151;
            cursor: pointer;
            user-select: none;
        }

        .selected-count {
            font-size: 14px;
            color: #6b7280;
            margin-left: 8px;
        }

        .batch-actions-right {
            display: flex;
            gap: 10px;
            position: relative;
        }

        .batch-select-divider {
            color: #cbd5e1;
            font-size: 13px;
            user-select: none;
        }

        .batch-link-btn {
            border: none;
            background: transparent;
            color: #667eea;
            font-size: 14px;
            cursor: pointer;
            padding: 0;
        }

        .batch-link-btn:hover {
            text-decoration: underline;
        }

        .invoice-batch-menu-wrap {
            position: relative;
        }

        .invoice-batch-menu-trigger {
            display: inline-flex;
            align-items: center;
            gap: 8px;
            padding: 8px 14px;
            border: 1px solid #93c5fd;
            border-radius: 8px;
            background: #fff;
            color: #2563eb;
            font-size: 14px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.2s ease;
        }

        .invoice-batch-menu-trigger:hover,
        .invoice-batch-menu-trigger[aria-expanded="true"] {
            background: #eff6ff;
            border-color: #60a5fa;
            box-shadow: 0 2px 8px rgba(37, 99, 235, 0.12);
        }

        .invoice-batch-menu-icon {
            width: 14px;
            height: 14px;
            color: #64748b;
        }

        .invoice-batch-menu {
            display: none;
            position: absolute;
            right: 0;
            bottom: calc(100% + 8px);
            min-width: 188px;
            background: #fff;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            box-shadow: 0 10px 30px rgba(15, 23, 42, 0.14);
            padding: 6px 0;
            z-index: 120;
        }

        .invoice-batch-menu.is-open {
            display: block;
        }

        .invoice-batch-menu-item {
            display: flex;
            align-items: center;
            gap: 10px;
            width: 100%;
            border: none;
            background: transparent;
            padding: 10px 14px;
            font-size: 14px;
            color: #111827;
            text-align: left;
            cursor: pointer;
            transition: background 0.15s ease;
        }

        .invoice-batch-menu-item:hover {
            background: #f8fafc;
        }

        .invoice-batch-menu-item-icon {
            width: 22px;
            height: 22px;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            flex-shrink: 0;
            font-size: 13px;
            line-height: 1;
        }

        .invoice-batch-menu-item .icon-success {
            background: #dcfce7;
            color: #16a34a;
            border-radius: 50%;
            font-weight: 700;
        }

        .invoice-batch-menu-item.item-success span:last-child {
            color: #16a34a;
        }

        .invoice-batch-menu-item .icon-warning {
            background: #ffedd5;
            color: #ea580c;
            border-radius: 50%;
            font-weight: 700;
        }

        .invoice-batch-menu-item.item-warning span:last-child {
            color: #ea580c;
        }

        .invoice-batch-menu-item .icon-danger {
            background: transparent;
            color: #dc2626;
            font-size: 16px;
        }

        .invoice-batch-menu-item.item-danger span:last-child {
            color: #dc2626;
        }

        .btn-danger {
            padding: 8px 16px;
            background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
            color: #fff;
            border: none;
            border-radius: 8px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s ease;
            box-shadow: 0 2px 8px rgba(220, 38, 38, 0.3);
        }

        .btn-danger:hover {
            background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(220, 38, 38, 0.4);
        }

        /* 确认对话框样式 */
        .confirm-dialog {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: rgba(0, 0, 0, 0.5);
            display: flex;
            justify-content: center;
            align-items: center;
            z-index: 100000;
            animation: fadeIn 0.2s ease;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .confirm-dialog-content {
            background: white;
            border-radius: 12px;
            box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
            max-width: 450px;
            width: 90%;
            animation: slideDown 0.3s ease;
        }

        @keyframes slideDown {
            from {
                transform: translateY(-50px);
                opacity: 0;
            }

            to {
                transform: translateY(0);
                opacity: 1;
            }
        }

        .confirm-dialog-header {
            padding: 24px 24px 16px;
            display: flex;
            align-items: center;
            gap: 12px;
            border-bottom: 1px solid #e9ecef;
        }

        .confirm-dialog-icon {
            font-size: 32px;
            line-height: 1;
        }

        .confirm-dialog-title {
            margin: 0;
            font-size: 20px;
            font-weight: 600;
            color: #333;
        }

        .confirm-dialog-body {
            padding: 24px;
        }

        .confirm-dialog-message {
            margin: 0;
            font-size: 15px;
            color: #495057;
            line-height: 1.8;
            white-space: pre-line;
        }

        .confirm-dialog-message strong {
            color: #dc2626;
            font-weight: 600;
        }

        .confirm-dialog-footer {
            padding: 16px 24px;
            display: flex;
            justify-content: flex-end;
            gap: 12px;
            background: #f8f9fa;
            border-radius: 0 0 12px 12px;
        }

        .confirm-dialog-cancel {
            background: #6c757d;
            color: white;
            border: none;
            padding: 7px 14px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .confirm-dialog-cancel:hover {
            background: #5a6268;
            transform: translateY(-1px);
            box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
        }

        .confirm-dialog-confirm {
            background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
            color: white;
            border: none;
            padding: 7px 14px;
            border-radius: 6px;
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            transition: all 0.3s ease;
        }

        .confirm-dialog-confirm:hover {
            background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(220, 53, 69, 0.3);
        }

        .invoice-send-email-row {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: 10px;
            margin-top: 14px;
            padding: 12px 14px;
            background: #fff;
            border: 1px solid #d1fae5;
            border-radius: 10px;
        }

        .invoice-send-email-row label {
            font-size: 13px;
            font-weight: 600;
            color: #047857;
            white-space: nowrap;
        }

        .invoice-send-email-row input[type="email"] {
            flex: 1 1 220px;
            min-width: 180px;
            padding: 8px 12px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            font-size: 14px;
            color: #334155;
        }

        .invoice-send-email-row input[type="email"]:focus {
            outline: none;
            border-color: #10b981;
            box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
        }

        .invoice-send-email-row .btn {
            padding: 8px 14px;
            font-size: 13px;
            white-space: nowrap;
        }

        .invoice-domain-edit-row {
            margin: 0;
        }

        .invoice-domain-view {
            display: flex;
            align-items: flex-start;
            flex-wrap: wrap;
            gap: 4px 6px;
            margin: 0 0 8px;
        }

        .invoice-domain-value-wrap {
            position: relative;
            display: inline-block;
            padding-right: 22px;
            min-height: 1.2em;
            max-width: 100%;
            word-break: break-all;
        }

        .invoice-inline-edit-btn {
            position: absolute;
            top: -4px;
            right: -2px;
            width: 22px;
            height: 22px;
            padding: 0;
            border: none;
            border-radius: 6px;
            background: transparent;
            color: #64748b;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            opacity: 0.78;
            transition: opacity 0.15s ease, background 0.15s ease, color 0.15s ease, transform 0.15s ease;
        }

        .invoice-inline-edit-btn .invoice-inline-edit-icon {
            display: block;
            width: 14px;
            height: 14px;
            pointer-events: none;
        }

        .invoice-inline-edit-btn:hover {
            opacity: 1;
            color: #4f46e5;
            background: rgba(99, 102, 241, 0.12);
            transform: scale(1.06);
        }

        .invoice-domain-editor {
            display: none;
            align-items: center;
            flex-wrap: wrap;
            gap: 8px;
            margin: 0 0 8px;
        }

        .invoice-domain-editor input[type="text"],
        .invoice-domain-editor input[type="email"] {
            flex: 1 1 180px;
            min-width: 140px;
            max-width: 280px;
            padding: 6px 10px;
            border: 1px solid #cbd5e1;
            border-radius: 8px;
            font-size: 14px;
            color: #334155;
        }

        .invoice-domain-editor input[type="text"]:focus,
        .invoice-domain-editor input[type="email"]:focus {
            outline: none;
            border-color: #6366f1;
            box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
        }

        .invoice-domain-editor .btn {
            padding: 6px 12px;
            font-size: 13px;
            white-space: nowrap;
        }

        /* 窄屏自适应：渐进隐藏次要列，减少横向滚动 */
        @media (max-width: 1500px) {
            .invoice-table-scroll .header-col[data-col="tax_id"],
            .invoice-table-scroll .data-col[data-col="tax_id"] {
                display: none !important;
            }
        }

        @media (max-width: 1280px) {
            .invoice-header-actions {
                flex-wrap: wrap;
                justify-content: flex-start;
            }

            .invoice-table-scroll .header-col[data-col="billing_company"],
            .invoice-table-scroll .data-col[data-col="billing_company"],
            .invoice-table-scroll .header-col[data-col="client_manager"],
            .invoice-table-scroll .data-col[data-col="client_manager"],
            .invoice-table-scroll .header-col[data-col="customer_notify"],
            .invoice-table-scroll .data-col[data-col="customer_notify"],
            .invoice-table-scroll .header-col[data-col="contact_name"],
            .invoice-table-scroll .data-col[data-col="contact_name"],
            .invoice-table-scroll .header-col[data-col="contact_phone"],
            .invoice-table-scroll .data-col[data-col="contact_phone"],
            .invoice-table-scroll .header-col[data-col="email"],
            .invoice-table-scroll .data-col[data-col="email"],
            .invoice-table-scroll .header-col[data-col="invoice_file"],
            .invoice-table-scroll .data-col[data-col="invoice_file"],
            .invoice-table-scroll .header-col[data-col="review_at"],
            .invoice-table-scroll .data-col[data-col="review_at"] {
                display: none !important;
            }

            .invoice-table-scroll .header-col[data-col="company"],
            .invoice-table-scroll .data-col[data-col="company"],
            #invoiceInfoList .data-col.data-col-company-invoice {
                flex: 1 1 140px !important;
                width: auto !important;
                max-width: none !important;
                min-width: 110px !important;
            }
        }

        @media (max-width: 1100px) {
            .invoice-table-scroll .header-col[data-col="client_renew"],
            .invoice-table-scroll .data-col[data-col="client_renew"] {
                display: none !important;
            }

            .invoice-table-scroll .header-col[data-col="domain"],
            .invoice-table-scroll .data-col[data-col="domain"] {
                flex: 0 1 140px !important;
                width: auto !important;
                max-width: 150px !important;
                min-width: 96px !important;
                justify-content: flex-start !important;
                text-align: left !important;
            }

            .invoice-main-toolbar .search-box-input-only input {
                min-width: 0;
            }
        }

        /* 移动端响应式样式 */
        @media (max-width: 768px) {
            body.with-sidebar {
                padding-left: 0 !important;
            }

            body.with-sidebar .container {
                max-width: 100% !important;
                padding: 15px !important;
            }

            header {
                flex-direction: column !important;
                align-items: flex-start !important;
                gap: 12px !important;
            }

            header h1 {
                font-size: 18px !important;
            }

            .header-actions {
                width: 100% !important;
                display: grid !important;
                grid-template-columns: 1fr 1fr !important;
                gap: 8px !important;
            }

            .header-actions .btn {
                width: 100% !important;
                justify-content: center !important;
                padding: 8px 12px !important;
                font-size: 12px !important;
                text-align: center !important;
                display: flex !important;
                align-items: center !important;
                white-space: nowrap !important;
            }

            .invoice-stats-grid {
                flex-direction: column !important;
                gap: 12px !important;
            }

            .invoice-stat-card {
                min-width: 100% !important;
                flex: none !important;
            }

            .toolbar {
                flex-direction: column !important;
                gap: 12px !important;
            }

            .toolbar .filter-group {
                width: 100% !important;
                flex-direction: column !important;
                gap: 10px !important;
            }

            .toolbar .filter-group select,
            .toolbar .filter-group .search-box {
                width: 100% !important;
            }

            .toolbar .search-box input {
                width: 100% !important;
            }

            .batch-actions {
                flex-direction: column !important;
                gap: 12px !important;
            }

            .batch-actions-left,
            .batch-actions-right {
                width: 100% !important;
            }

            .batch-actions-right {
                justify-content: flex-end !important;
            }

            .pagination-container {
                flex-direction: column !important;
                gap: 12px !important;
                text-align: center !important;
            }

            .pagination-buttons {
                flex-wrap: wrap !important;
                justify-content: center !important;
            }
        }
