.qt-modal.ai-download-batch-modal {
    width: min(1080px, 94vw);
    max-width: 1080px;
    max-height: 90vh;
    overflow: hidden;
}

.ai-download-modal-body {
    display: grid;
    grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr);
    gap: 16px;
    min-height: 0;
}

.ai-download-selected-pane,
.ai-download-batch-pane {
    min-width: 0;
}

.ai-download-pane-title {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    min-height: 32px;
    margin-bottom: 8px;
    color: #303133;
    font-size: 13px;
    font-weight: 600;
}

.ai-download-selected-count {
    color: #64748b;
    font-size: 12px;
    font-weight: 500;
}

.ai-download-table-wrap {
    max-height: 52vh;
    overflow: auto;
    border: 1px solid #dfe4ea;
    border-radius: 6px;
}

.ai-download-table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
    table-layout: fixed;
}

.ai-download-table th,
.ai-download-table td {
    padding: 9px 10px;
    border-bottom: 1px solid #edf0f3;
    text-align: left;
    vertical-align: middle;
    font-size: 12px;
}

.ai-download-table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: #f7f9fb;
    color: #475569;
    font-weight: 600;
}

.ai-download-table tr:last-child td {
    border-bottom: 0;
}

.ai-download-table .col-index { width: 42px; text-align: center; }
.ai-download-table .col-code { width: 150px; }
.ai-download-table .col-current { width: 180px; }
.ai-download-table .col-mode { width: 82px; }
.ai-download-table .col-edit { width: auto; }

.ai-download-current-link {
    display: block;
    overflow: hidden;
    color: #64748b;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ai-download-current-link.empty {
    color: #b45309;
}

.ai-download-row-input {
    width: 100%;
    min-width: 0;
    height: 34px;
    box-sizing: border-box;
    border: 1px solid #d5dbe3;
    border-radius: 5px;
    padding: 0 9px;
    color: #1f2937;
    background: #fff;
    font-size: 12px;
}

.ai-download-row-input:focus {
    border-color: #409eff;
    outline: 0;
    box-shadow: 0 0 0 2px rgba(64, 158, 255, .12);
}

.ai-download-batch-pane {
    padding-left: 16px;
    border-left: 1px solid #e5e9ef;
}

.ai-download-batch-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin: 9px 0 16px;
}

.ai-download-batch-actions button {
    min-width: 0;
    height: 34px;
    border: 1px solid #cfd6df;
    border-radius: 5px;
    background: #fff;
    color: #334155;
    cursor: pointer;
    font-size: 12px;
}

.ai-download-batch-actions button:hover {
    border-color: #409eff;
    color: #1677d2;
}

.ai-download-mode-group {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.ai-download-empty-note {
    margin: 10px 0 0;
    color: #64748b;
    font-size: 12px;
}

@media (max-width: 760px) {
    .qt-modal.ai-download-batch-modal {
        width: 96vw;
        max-height: 92vh;
        padding: 18px;
        overflow-y: auto;
    }

    .ai-download-modal-body {
        grid-template-columns: 1fr;
    }

    .ai-download-table-wrap {
        max-height: 42vh;
    }

    .ai-download-table {
        display: block;
        min-width: 0;
    }

    .ai-download-table thead {
        display: none;
    }

    .ai-download-table tbody,
    .ai-download-table tr {
        display: block;
        width: 100%;
    }

    .ai-download-table tr {
        box-sizing: border-box;
        padding: 8px 10px;
        border-bottom: 1px solid #edf0f3;
    }

    .ai-download-table tr:last-child {
        border-bottom: 0;
    }

    .ai-download-table td {
        display: grid;
        grid-template-columns: 76px minmax(0, 1fr);
        gap: 8px;
        width: auto;
        padding: 6px 0;
        border: 0;
        align-items: center;
    }

    .ai-download-table td::before {
        content: attr(data-label);
        color: #64748b;
        font-size: 12px;
        font-weight: 600;
    }

    .ai-download-table td.col-index {
        display: none;
    }

    .ai-download-table td.col-code,
    .ai-download-table td.col-current,
    .ai-download-table td.col-mode,
    .ai-download-table td.col-edit {
        width: auto;
    }

    .ai-download-current-link {
        white-space: normal;
        overflow-wrap: anywhere;
    }

    .ai-download-batch-pane {
        padding: 14px 0 0;
        border-top: 1px solid #e5e9ef;
        border-left: 0;
    }
}
