﻿        .batch-container {
            width: 100%;
            max-width: 100%;
            margin: 0;
            padding: 0;
            border: none;
            background: transparent;
            box-shadow: none;
        }

        body {
            border: none !important;
            outline: none !important;
        }

        .app-shell {
            border: none !important;
            outline: none !important;
        }

        /* 浠诲姟鍒楄〃寮圭獥鏍峰紡 */
        #task-modal .modal-content {
            width: min(720px, 100%);
            max-height: 85vh;
            display: flex;
            flex-direction: column;
        }

        .task-actions {
            display: flex;
            gap: var(--spacing-sm);
            margin-bottom: var(--spacing-lg);
            flex-wrap: wrap;
        }

        .task-list-section {
            flex: 1;
            overflow-y: auto;
            min-height: 0;
        }

        .task-list {
            display: flex;
            flex-direction: column;
            gap: var(--spacing-md);
        }

        .task-item {
            background: var(--surface-2);
            border: 1px solid var(--hairline);
            border-radius: var(--rounded-md);
            padding: var(--spacing-md);
            transition: var(--transition-fast);
        }

        .task-item:hover {
            border-color: var(--hairline-strong);
        }

        .task-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--spacing-sm);
            flex-wrap: wrap;
            gap: var(--spacing-sm);
        }

        .task-item-header h4 {
            margin: 0;
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--ink);
        }

        .task-item .info {
            font-size: 0.85rem;
            color: var(--ink-subtle);
            margin-bottom: var(--spacing-sm);
            display: flex;
            gap: var(--spacing-lg);
            flex-wrap: wrap;
        }

        .task-item .info div {
            display: flex;
            align-items: center;
        }

        .task-item .actions {
            display: flex;
            gap: var(--spacing-sm);
            flex-wrap: wrap;
        }

        .task-item .actions button {
            padding: 6px 12px;
            border: none;
            border-radius: var(--rounded-md);
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition-fast);
        }

        .task-item .actions button.update {
            background: var(--primary-subtle);
            color: var(--primary);
        }

        .task-item .actions button.update:hover {
            background: var(--primary);
            color: #fff;
        }

        .task-item .actions button.download {
            background: rgba(16, 185, 129, 0.1);
            color: var(--semantic-success);
        }

        .task-item .actions button.download:hover {
            background: var(--semantic-success);
            color: #fff;
        }

        .status {
            padding: 4px 10px;
            border-radius: var(--rounded-pill);
            font-size: 0.8rem;
            font-weight: 600;
        }

        .status.Running,
        .status.Created {
            background: rgba(245, 158, 11, 0.15);
            color: #f59e0b;
        }

        .status.Succeeded {
            background: rgba(16, 185, 129, 0.15);
            color: var(--semantic-success);
        }

        .status.Failed {
            background: rgba(239, 68, 68, 0.15);
            color: var(--semantic-error);
        }

        .pager {
            display: flex;
            justify-content: center;
            align-items: center;
            gap: var(--spacing-xs);
            margin-top: var(--spacing-lg);
            flex-wrap: wrap;
        }

        .pager button {
            min-width: 36px;
            height: 36px;
            padding: 0 var(--spacing-sm);
            border: 1px solid var(--hairline);
            border-radius: var(--rounded-md);
            background: var(--surface-2);
            color: var(--ink);
            font-size: 0.875rem;
            cursor: pointer;
            transition: var(--transition-fast);
        }


        .pager button.active {
            background: var(--primary);
            border-color: var(--primary);
            color: #fff;
        }

        .pager button:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }

        .loading {
            text-align: center;
            padding: var(--spacing-2xl);
            color: var(--ink-subtle);
        }

        .loading .spinner {
            width: 32px;
            height: 32px;
            border: 3px solid var(--hairline);
            border-top-color: var(--primary);
            border-radius: 50%;
            animation: spin 0.8s linear infinite;
            margin: 0 auto var(--spacing-md);
        }

        .task-empty {
            text-align: center;
            padding: var(--spacing-2xl);
            color: var(--ink-subtle);
        }

        @media (max-width: 768px) {
            #task-modal .modal-content {
                width: 100%;
                max-height: 90vh;
                margin: 0;
                border-radius: var(--rounded-lg);
            }

            .task-item .info {
                flex-direction: column;
                gap: var(--spacing-xs);
            }

            .task-item .actions {
                width: 100%;
            }

            .task-item .actions button {
                flex: 1;
            }

            .pager {
                gap: var(--spacing-xs);
            }

            .pager button {
                min-width: 32px;
                height: 32px;
                font-size: 0.8rem;
            }
        }

        .batch-section {
            background: var(--surface-1);
            border-radius: var(--rounded-xl);
            border: 1px solid var(--hairline);
            padding: var(--spacing-xl);
            margin-bottom: var(--spacing-xl);
            box-shadow: var(--shadow-md);
            box-sizing: border-box;
        }

        .batch-section h2 {
            color: var(--ink);
            font-size: 1.3rem;
            font-weight: 700;
            margin-bottom: var(--spacing-lg);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .batch-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: var(--spacing-lg);
            border-bottom: 2px solid var(--hairline);
            padding-bottom: 10px;
            flex-wrap: wrap;
        }

        .batch-tab {
            padding: 10px 20px;
            border: none;
            border-radius: var(--rounded-md);
            background: var(--surface-2);
            color: var(--ink-subtle);
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition-fast);
            flex-shrink: 0;
        }

        .batch-tab:hover {
            color: var(--primary);
            background: var(--primary-subtler);
        }

        .batch-tab.active {
            background: var(--primary);
            color: #fff;
        }

        .batch-content {
            display: none;
        }

        .batch-content.active {
            display: block;
        }

        .text-input-area {
            width: 100%;
            box-sizing: border-box;
            min-height: 150px;
            max-height: 400px;
            padding: var(--spacing-md);
            border: 1px solid var(--hairline);
            border-radius: var(--rounded-md);
            font-size: 0.95rem;
            line-height: 1.5;
            resize: vertical;
            background: var(--surface-2);
            color: var(--ink);
            font-family: inherit;
            transition: var(--transition-fast);
        }

        .text-input-area:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-subtle);
        }

        .text-stats {
            display: flex;
            align-items: center;
            margin-top: var(--spacing-sm);
            font-size: 0.85rem;
            color: var(--ink-subtle);
            white-space: nowrap;
        }

        .text-stats span {
            white-space: nowrap;
        }

        .text-stats.warning {
            color: #f59e0b;
        }

        .text-stats.error {
            color: #ef4444;
        }

        .file-upload-area {
            border: 2px dashed var(--hairline);
            border-radius: var(--rounded-md);
            padding: var(--spacing-2xl);
            text-align: center;
            cursor: pointer;
            transition: var(--transition-fast);
            background: var(--surface-2);
        }

        .file-upload-area:hover,
        .file-upload-area.dragover {
            border-color: var(--primary);
            background: var(--primary-subtler);
        }

        .file-upload-icon {
            font-size: 48px;
            margin-bottom: var(--spacing-md);
        }

        .file-upload-text {
            color: var(--ink);
            font-size: 1rem;
            margin-bottom: var(--spacing-sm);
        }

        .file-upload-hint {
            color: var(--ink-subtle);
            font-size: 0.85rem;
        }

        .file-list {
            margin-top: var(--spacing-lg);
        }

        .file-item {
            padding: var(--spacing-md);
            background: var(--surface-2);
            border: 1px solid var(--hairline);
            border-radius: var(--rounded-md);
            margin-bottom: var(--spacing-sm);
        }

        .file-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--spacing-sm);
            flex-wrap: wrap;
            gap: var(--spacing-sm);
        }

        .file-item-info {
            display: flex;
            align-items: center;
            gap: var(--spacing-sm);
        }

        .file-item-name {
            color: var(--ink);
            font-weight: 600;
        }

        .file-item-size {
            color: var(--ink-subtle);
            font-size: 0.85rem;
        }

        .file-item-stats {
            font-size: 0.85rem;
            color: var(--ink-subtle);
        }

        .file-item-content {
            margin-bottom: var(--spacing-sm);
        }

        .file-item-textarea {
            width: 100%;
            box-sizing: border-box;
            min-height: 100px;
            max-height: 200px;
            padding: var(--spacing-sm);
            border: 1px solid var(--hairline);
            border-radius: var(--rounded-md);
            font-size: 0.9rem;
            line-height: 1.4;
            resize: vertical;
            background: var(--surface-2);
            color: var(--ink);
            font-family: inherit;
        }

        .file-item-textarea:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-subtle);
        }

        .text-module {
            background: var(--surface-2);
            border: 1px solid var(--hairline);
            border-radius: var(--rounded-md);
            padding: var(--spacing-md);
            margin-bottom: var(--spacing-md);
        }

        .text-module-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: var(--spacing-sm);
            flex-wrap: wrap;
            gap: var(--spacing-sm);
        }

        .text-module-title {
            font-size: 0.95rem;
            font-weight: 600;
            color: var(--ink);
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            flex: 1;
        }

        .text-module-remove {
            padding: 6px 14px;
            border: none;
            border-radius: var(--rounded-md);
            background: rgba(239, 68, 68, 0.12);
            color: #ef4444;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition-fast);
            flex-shrink: 0;
        }

        .text-module-remove:hover {
            background: #ef4444;
            color: #fff;
        }

        .text-module-settings {
            margin-top: var(--spacing-sm);
            padding: var(--spacing-sm);
            background: var(--primary-subtler);
            border-radius: var(--rounded-md);
        }

        .text-module-role {
            display: flex;
            align-items: center;
            gap: var(--spacing-sm);
            flex-wrap: wrap;
        }

        .text-module-role label {
            font-size: 0.85rem;
            font-weight: 600;
            color: var(--ink);
            white-space: nowrap;
        }

        .text-module-role-select {
            flex: 1;
            min-width: 120px;
            height: 36px;
            padding: 0 var(--spacing-sm);
            border: 1px solid var(--hairline);
            border-radius: var(--rounded-md);
            font-size: 0.85rem;
            background: var(--surface-1);
            color: var(--ink);
            transition: var(--transition-fast);
        }

        .text-module-role-select:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-subtle);
        }

        .file-item-remove {
            padding: 6px 12px;
            border: none;
            border-radius: var(--rounded-md);
            background: rgba(239, 68, 68, 0.12);
            color: #ef4444;
            font-size: 0.85rem;
            font-weight: 500;
            cursor: pointer;
            transition: var(--transition-fast);
        }

        .file-item-remove:hover {
            background: #ef4444;
            color: #fff;
        }

        .batch-settings {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
            gap: var(--spacing-lg);
            margin-bottom: var(--spacing-xl);
        }

        .setting-group {
            display: flex;
            flex-direction: column;
            gap: var(--spacing-xs);
        }

        .setting-group label {
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--ink);
        }

        .setting-group select,
        .setting-group input {
            width: 100%;
            box-sizing: border-box;
            height: 44px;
            padding: 0 var(--spacing-md);
            border: 1px solid var(--hairline);
            border-radius: var(--rounded-md);
            font-size: 0.9rem;
            background: var(--surface-2);
            color: var(--ink);
            transition: var(--transition-fast);
        }

        .setting-group select:focus,
        .setting-group input:focus {
            outline: none;
            border-color: var(--primary);
            box-shadow: 0 0 0 3px var(--primary-subtle);
        }

        .batch-actions {
            display: flex;
            gap: var(--spacing-md);
            justify-content: center;
            margin-top: var(--spacing-xl);
            flex-wrap: wrap;
            position: relative;
            z-index: 10;
            padding: var(--spacing-md);
        }

        .btn-batch {
            min-height: 44px;
            padding: 10px 24px;
            border: none;
            border-radius: var(--rounded-md);
            font-size: 0.95rem;
            font-weight: 600;
            cursor: pointer;
            transition: var(--transition-fast);
            flex-shrink: 0;
        }

        .btn-primary-batch {
            background: var(--primary);
            color: #fff;
            box-shadow: var(--shadow-sm);
        }

        .btn-primary-batch:hover {
            background: var(--primary-hover);
            transform: translateY(-1px);
            box-shadow: var(--shadow-md);
        }

        .btn-secondary-batch {
            background: var(--surface-2);
            color: var(--ink);
            border: 1px solid var(--hairline);
        }

        .btn-secondary-batch:hover {
            border-color: var(--primary);
            color: var(--primary);
        }

        .btn-danger-batch {
            background: rgba(239, 68, 68, 0.12);
            color: #ef4444;
            border: 1px solid rgba(239, 68, 68, 0.2);
        }

        .btn-danger-batch:hover {
            background: #ef4444;
            color: #fff;
            border-color: #ef4444;
        }

        .batch-progress {
            display: none;
            margin-top: var(--spacing-xl);
        }

        .batch-progress.active {
            display: block;
        }

        .progress-info {
            text-align: center;
            margin-bottom: var(--spacing-lg);
        }

        .progress-status {
            font-size: 1.1rem;
            font-weight: 700;
            color: var(--ink);
            margin-bottom: var(--spacing-sm);
        }

        .progress-detail {
            font-size: 0.9rem;
            color: var(--ink-subtle);
        }

        .progress-bar-container {
            width: 100%;
            height: 8px;
            background: var(--surface-2);
            border-radius: 4px;
            overflow: hidden;
        }

        .progress-bar {
            height: 100%;
            background: var(--primary);
            border-radius: 4px;
            transition: width 0.3s ease;
            width: 0%;
        }

        .batch-result {
            display: none;
            margin-top: var(--spacing-xl);
            padding: var(--spacing-xl);
            background: rgba(16, 185, 129, 0.1);
            border: 1px solid var(--semantic-success);
            border-radius: var(--rounded-md);
        }

        .batch-result.active {
            display: block;
        }

        .batch-result.error {
            background: rgba(239, 68, 68, 0.1);
            border-color: var(--semantic-error);
        }

        .result-title {
            font-size: 1.1rem;
            font-weight: 700;
            margin-bottom: var(--spacing-md);
        }

        .batch-result .result-title {
            color: var(--semantic-success);
        }

        .batch-result.error .result-title {
            color: var(--semantic-error);
        }

        .result-message {
            color: var(--ink);
            line-height: 1.6;
            margin-bottom: var(--spacing-lg);
        }

        .result-download {
            display: inline-block;
            padding: 12px 24px;
            background: var(--semantic-success);
            color: #fff;
            text-decoration: none;
            border-radius: var(--rounded-md);
            font-weight: 700;
            transition: var(--transition-fast);
        }

        .result-download:hover {
            background: #10b981;
            transform: translateY(-1px);
        }

        .batch-info {
            background: var(--primary-subtler);
            border-left: 4px solid var(--primary);
            padding: var(--spacing-md);
            border-radius: 0 var(--rounded-md) var(--rounded-md) 0;
            margin-bottom: var(--spacing-xl);
        }

        .batch-info p {
            color: var(--ink);
            font-size: 0.9rem;
            line-height: 1.6;
            margin: 0;
        }

        .batch-usage {
            margin-top: var(--spacing-xl);
        }

        .batch-usage h4 {
            font-family: var(--font-sans);
            font-size: 1rem;
            font-weight: 600;
            color: var(--ink);
            margin: 0 0 var(--spacing-sm) 0;
        }

        .batch-usage ul {
            margin: 0;
            padding-left: var(--spacing-lg);
        }

        .batch-usage li {
            font-family: var(--font-sans);
            font-size: 0.875rem;
            color: var(--ink-subtle);
            line-height: 1.8;
        }

        .batch-actions-container {
            display: flex;
            align-items: center;
            flex-wrap: wrap;
            gap: var(--spacing-sm);
            margin-top: var(--spacing-md);
            padding-bottom: var(--spacing-md);
            border-bottom: 1px solid var(--hairline);
        }

        .batch-actions-container .btn-batch {
            margin-bottom: var(--spacing-xs);
            flex-shrink: 0;
        }

        .upload-hint {
            font-size: 0.85rem;
            color: var(--ink-subtle);
            margin-top: var(--spacing-sm);
        }

        .total-stats {
            font-size: 0.9rem;
            color: var(--ink-subtle);
            margin-top: var(--spacing-md);
            text-align: right;
        }

        .total-stats strong {
            color: var(--ink);
            font-weight: 600;
        }

        @media (max-width: 768px) {
            .batch-section {
                padding: var(--spacing-lg);
            }

            .batch-section h2 {
                font-size: 1.15rem;
            }

            .batch-tabs {
                flex-direction: column;
                border-bottom: none;
                gap: var(--spacing-sm);
            }

            .batch-tab {
                width: 100%;
                text-align: center;
            }

            .batch-settings {
                grid-template-columns: 1fr;
                gap: var(--spacing-lg);
            }

            .setting-group select,
            .setting-group input {
                font-size: 0.875rem;
            }

            .batch-actions {
                flex-direction: column;
                gap: var(--spacing-md);
            }

            .btn-batch {
                width: 100%;
            }

            .batch-actions-container {
                flex-direction: column;
                align-items: stretch;
            }

            .batch-actions-container #batch-role-select {
                width: 100%;
            }

            .text-module-header {
                flex-wrap: wrap;
            }

            .text-module-remove {
                padding: 5px 12px;
                font-size: 0.8rem;
            }

            .text-module-role {
                width: 100%;
            }

            .text-module-role-select {
                width: 100%;
                min-width: auto;
            }

            .file-item-header {
                flex-wrap: wrap;
                gap: var(--spacing-sm);
            }

            .batch-usage {
                padding-left: 0;
                padding-right: 0;
            }

            .batch-usage ul {
                padding-left: var(--spacing-md);
            }

            .batch-usage li {
                font-size: 0.8rem;
                line-height: 1.6;
            }

            .file-upload-area {
                padding: var(--spacing-lg);
            }

            .file-upload-icon {
                font-size: 36px;
            }

            .total-stats {
                text-align: left;
            }
        }

