/* ===== CSS Reset & Base ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* 主色调 - 淡粉色 */
    --primary: #EEBEBE;
    --primary-hover: #DDA5A5;
    --primary-light: #FDF5F5;
    --primary-border: #EEBEBE;
    --primary-bg: #FDF5F5;

    /* 辅助色 - 灰度 */
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;

    /* 功能色 */
    --success: #10B981;
    --success-light: #D1FAE5;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;

    /* 背景色 */
    --bg: #FFFFFF;
    --card-bg: #FFFFFF;

    /* 阴影 */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.1), 0 1px 2px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);

    /* 圆角 */
    --radius-sm: 4px;
    --radius: 6px;
    --radius-lg: 8px;
    --radius-xl: 12px;

    /* 过渡 */
    --transition: all 0.2s ease;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: var(--bg);
    color: var(--gray-700);
    line-height: 1.5;
    min-height: 100vh;
    display: flex;
    font-size: 14px;
}

/* ===== Sidebar ===== */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: 200px;
    background: var(--card-bg);
    border-right: 1px solid var(--gray-200);
    display: flex;
    flex-direction: column;
    z-index: 100;
}

.sidebar-header {
    padding: 20px;
    border-bottom: 1px solid var(--gray-200);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    transition: var(--transition);
}

.logo:hover {
    opacity: 0.8;
}

.logo-icon {
    width: 28px;
    height: 28px;
    color: var(--primary);
}

.logo-text {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
}

/* ===== Nav Menu ===== */
.nav-menu {
    flex: 1;
    padding: 16px 0;
}

.nav-item {
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    border-left: 4px solid transparent;
    color: var(--gray-700);
    font-size: 14px;
    font-weight: 400;
}

.nav-item:hover {
    background: var(--gray-100);
    border-left-color: var(--primary);
}

.nav-item.active {
    background: var(--primary-light);
    color: var(--primary);
    border-left-color: var(--primary);
}

.sidebar-footer {
    padding: 16px 20px;
    border-top: 1px solid var(--gray-200);
}

.current-project-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.project-label {
    font-size: 12px;
    color: var(--gray-400);
}

.project-name {
    font-size: 14px;
    color: var(--gray-700);
    font-weight: 500;
}

/* ===== Main Content ===== */
.main-content {
    flex: 1;
    margin-left: 200px;
    min-height: 100vh;
    background: var(--bg);
}

.page {
    display: none;
    padding: 24px;
    padding-right: 360px;
    min-height: 100vh;
}

.page.active {
    display: block;
}

.page-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--gray-200);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-700);
}

.page-desc {
    font-size: 14px;
    color: var(--gray-400);
}

/* ===== Bind Indicator ===== */
.bind-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--gray-100);
    border-radius: var(--radius);
    margin-bottom: 24px;
    font-size: 14px;
    color: var(--gray-600);
}

.bind-indicator.locked {
    background: var(--primary-light);
    color: var(--gray-700);
}

.bind-icon {
    font-size: 16px;
}

/* ===== Module Section ===== */
.module-section {
    margin-bottom: 32px;
}

/* ===== Upload Zone ===== */
.module-upload {
    width: 100%;
    height: 120px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--gray-50);
}

.module-upload:hover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.module-upload.dragover {
    border-color: var(--primary);
    background: var(--primary-light);
}

.upload-content {
    text-align: center;
}

.upload-icon {
    width: 32px;
    height: 32px;
    color: var(--gray-400);
    margin-bottom: 8px;
}

.upload-text {
    font-size: 14px;
    color: var(--gray-500);
}

/* ===== Validation Result ===== */
.validation-result {
    margin-top: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.validation-stats {
    display: flex;
    gap: 24px;
    font-size: 14px;
    color: var(--gray-600);
    margin-bottom: 16px;
}

.validation-stats strong {
    font-weight: 600;
    color: var(--gray-700);
}

.data-options {
    display: flex;
    align-items: center;
    gap: 24px;
}

.valid-count {
    font-size: 14px;
    color: var(--gray-500);
}

.valid-count strong {
    font-weight: 600;
    color: var(--primary);
}

/* ===== Data Preview Section ===== */
.data-preview-section {
    margin-bottom: 32px;
}

.data-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    gap: 16px;
}

.data-preview-info {
    display: flex;
    gap: 24px;
    font-size: 13px;
    color: var(--gray-500);
}

.preview-info-item {
    display: flex;
    align-items: center;
    gap: 6px;
}

.preview-info-item .info-label {
    color: var(--gray-400);
}

.preview-info-item .info-value {
    color: var(--gray-700);
    font-weight: 500;
}

.data-preview-content {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
    background: var(--card-bg);
}

.preview-table-container {
    max-height: 400px;
    overflow-y: auto;
}

.preview-table th {
    position: sticky;
    top: 0;
    z-index: 10;
    background: var(--gray-50);
    box-shadow: 0 1px 0 var(--gray-200);
}

.preview-table td:first-child {
    color: var(--gray-500);
    font-size: 13px;
}

.preview-footer {
    padding: 10px 16px;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
    text-align: center;
}

.preview-hint {
    font-size: 12px;
    color: var(--gray-400);
}

/* 响应式适配 */
@media (max-width: 768px) {
    .data-preview-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .data-preview-info {
        flex-direction: column;
        gap: 8px;
    }
    .preview-table-container {
        max-height: 300px;
    }
}

/* ===== Config Row ===== */
.config-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.config-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    width: 80px;
}

/* ===== Section Title ===== */
.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-hint {
    font-size: 12px;
    font-weight: 400;
    color: var(--gray-400);
}

/* ===== Combobox ===== */
.combobox {
    position: relative;
    width: 300px;
}

.combobox input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
}

.combobox input:focus {
    border-color: var(--primary);
}

.combobox-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--card-bg);
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: none;
    z-index: 100;
    max-height: 200px;
    overflow-y: auto;
    margin-top: 4px;
}

.combobox-dropdown.active {
    display: block;
}

.combobox-option {
    padding: 10px 12px;
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
}

.combobox-option:hover {
    background: var(--gray-100);
}

.combobox-option.selected {
    background: var(--primary-light);
    color: var(--primary);
}

.combobox-hint {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--warning);
    background: var(--warning-light);
    border-top: 1px solid var(--warning);
}

/* ===== Service List ===== */
.service-list {
    margin-bottom: 16px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.service-item:hover {
    border-color: var(--gray-300);
}

.service-item.selected {
    background: var(--primary-light);
    border-color: var(--primary);
}

.service-item input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.service-item-info {
    flex: 1;
}

.service-item-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
}

.service-item-url {
    font-size: 12px;
    color: var(--gray-400);
    margin-top: 2px;
}

.service-item-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.service-item:hover .service-item-actions {
    opacity: 1;
}

/* ===== Bottom Action Bar ===== */
.bottom-action-bar {
    position: fixed;
    bottom: 0;
    left: 200px;
    right: 0;
    padding: 16px 24px;
    display: flex;
    justify-content: flex-end;
    z-index: 50;
}

/* ===== Column Config ===== */
.column-config {
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.config-group {
    margin-bottom: 16px;
}

.config-group .config-label {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.column-items {
    display: flex;
    gap: 24px;
}

.column-count {
    font-size: 14px;
    color: var(--gray-600);
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.column-count strong {
    font-weight: 600;
    color: var(--primary);
}

/* ===== Checkbox Label ===== */
.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--gray-700);
}

.checkbox-label input[type="checkbox"],
.checkbox-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--primary);
}

.checkbox-label.locked {
    color: var(--gray-400);
    cursor: not-allowed;
}

.checkbox-label.locked input {
    accent-color: var(--gray-400);
}

/* ===== Reference Options ===== */
.reference-options {
    margin-left: 24px;
    margin-top: 8px;
}

/* ===== Generation Section ===== */
.generation-section {
    text-align: center;
}

.progress-section {
    margin-top: 24px;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
}

.progress-bar {
    flex: 1;
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 14px;
    color: var(--gray-600);
    min-width: 80px;
}

.progress-stats {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 16px;
}

.progress-stats .stat {
    font-size: 14px;
    color: var(--gray-600);
}

.progress-stats .stat.success {
    color: var(--success);
}

.progress-stats .stat.danger {
    color: var(--danger);
}

.progress-stats .stat.warning {
    color: var(--warning);
}

.progress-actions {
    margin-top: 16px;
}

.completion-actions {
    margin-top: 24px;
}

.link-action {
    color: var(--primary);
    text-decoration: none;
    font-size: 14px;
}

.link-action:hover {
    text-decoration: underline;
}

/* ===== Search Bar ===== */
.search-bar {
    display: flex;
    align-items: flex-end;
    gap: 16px;
    padding: 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.search-group label {
    font-size: 12px;
    color: var(--gray-500);
}

.search-group select,
.search-group input[type="text"],
.search-group input[type="date"] {
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
}

.search-group select:focus,
.search-group input:focus {
    border-color: var(--primary);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 8px;
}

.date-range input {
    width: 130px;
}

.date-range span {
    color: var(--gray-400);
    font-size: 13px;
}

.search-result-count {
    font-size: 12px;
    color: var(--gray-400);
    margin-left: auto;
}

/* ===== History List ===== */
.history-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.history-item:nth-child(odd) {
    background: var(--gray-50);
}

.history-item:hover {
    background: var(--gray-100);
}

.history-item-left {
    flex: 1;
    min-width: 0;
}

.history-item-project {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.history-item-batch {
    font-size: 12px;
    color: var(--gray-400);
    margin-left: 8px;
}

.history-item-preview {
    font-size: 14px;
    color: var(--gray-600);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.history-item-name {
    font-weight: 500;
    color: var(--gray-700);
}

.history-item-count {
    font-size: 12px;
    color: var(--gray-400);
    background: var(--gray-100);
    padding: 2px 6px;
    border-radius: 4px;
}

.history-item-time {
    font-size: 12px;
    color: var(--gray-400);
}

.history-item-right {
    display: flex;
    align-items: center;
    gap: 16px;
}

.status-cell {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: var(--radius-sm);
    font-size: 12px;
    font-weight: 500;
}

.status-cell.success {
    background: var(--success-light);
    color: var(--success);
}

.status-cell.failed {
    background: var(--danger-light);
    color: var(--danger);
}

.status-cell.pending {
    background: var(--warning-light);
    color: var(--warning);
}

/* ===== Dashboard ===== */
.dashboard-content {
    padding-bottom: 80px;
}

.projects-section {
    margin-bottom: 32px;
}

.projects-section .section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.projects-section .section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin: 0;
}

.project-search-panel {
    margin-bottom: 16px;
    padding: 12px 16px;
    background: var(--gray-50);
    border-radius: var(--radius);
}

.project-search-panel .search-input {
    margin: 0;
    width: 100%;
}

.project-search-panel .search-input input {
    width: 100%;
}

.show-more-projects {
    text-align: center;
    margin-top: 16px;
}

.project-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--gray-200);
}

.project-pagination .pagination-info {
    font-size: 13px;
    color: var(--gray-500);
    margin-left: 16px;
}

.project-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

.project-card {
    padding: 16px;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    height: 120px;
    display: flex;
    flex-direction: column;
}

.project-card:hover {
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(238, 190, 190, 0.3);
}

.project-card.selected {
    border-color: var(--primary);
    background: var(--primary-light);
}

.project-card-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: auto;
}

.project-card-stats {
    font-size: 14px;
    color: var(--gray-500);
    margin-bottom: 8px;
}

.project-card-actions {
    display: flex;
    gap: 8px;
    opacity: 0;
    transition: var(--transition);
}

.project-card:hover .project-card-actions {
    opacity: 1;
}

/* ===== Current Project Section ===== */
.current-project-section {
    margin-top: 24px;
}

.batch-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.batch-tab {
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    color: var(--gray-600);
    background: var(--gray-100);
    cursor: pointer;
    transition: var(--transition);
}

.batch-tab:hover {
    background: var(--gray-200);
}

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

.table-toolbar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.search-input {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    margin-left: auto;
}

.search-input svg {
    color: var(--gray-400);
}

.search-input input {
    border: none;
    outline: none;
    font-size: 14px;
    width: 150px;
}

/* ===== Table ===== */
.table-container {
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    overflow: hidden;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table th,
.data-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--gray-100);
}

.data-table th {
    background: var(--gray-50);
    font-size: 12px;
    font-weight: 500;
    color: var(--gray-500);
    text-transform: uppercase;
}

.data-table td {
    font-size: 14px;
    color: var(--gray-700);
}

.data-table tbody tr:nth-child(odd) {
    background: var(--gray-50);
}

.data-table tbody tr:hover {
    background: var(--gray-100);
}

/* ===== Column Manager ===== */
.column-manager {
    position: fixed;
    right: 24px;
    top: 100px;
    width: 280px;
    background: var(--card-bg);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 50;
}

.column-manager-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-200);
}

.column-manager-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
}

.column-list {
    max-height: 400px;
    overflow-y: auto;
}

.column-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid var(--gray-100);
}

.column-item span {
    font-size: 14px;
    color: var(--gray-700);
}

.column-actions {
    display: flex;
    gap: 8px;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    border: none;
    outline: none;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    background: var(--gray-200) !important;
    color: var(--gray-400) !important;
    border-color: var(--gray-300) !important;
    box-shadow: none !important;
}

.btn-primary {
    background: var(--primary);
    color: white;
    border: 1px solid var(--primary);
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-hover);
    border-color: var(--primary-hover);
    box-shadow: 0 0 0 2px rgba(238, 190, 190, 0.3);
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 1px solid var(--primary);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--primary-light);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(238, 190, 190, 0.3);
}

.btn-danger {
    background: white;
    color: var(--danger);
    border: 1px solid var(--danger);
}

.btn-danger:hover:not(:disabled) {
    background: var(--danger-light);
    border-color: var(--danger);
    box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 13px;
}

.btn-large {
    padding: 14px 32px;
    font-size: 16px;
}

.btn svg {
    width: 16px;
    height: 16px;
}

.btn-sm svg {
    width: 14px;
    height: 14px;
}

/* ===== Modal ===== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.2);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--card-bg);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-xl);
}

.modal-small {
    max-width: 360px;
}

.modal-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
}

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--gray-200);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-group input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    outline: none;
    transition: var(--transition);
}

.form-group input:focus {
    border-color: var(--primary);
}

.password-input {
    position: relative;
}

.password-input input {
    padding-right: 40px;
}

.toggle-password {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    color: var(--gray-400);
}

.delete-hint {
    font-size: 14px;
    color: var(--gray-600);
    text-align: center;
}

/* ===== 项目选择弹窗 ===== */
.project-option {
    margin-bottom: 16px;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 6px;
}

.project-option:last-child {
    margin-bottom: 0;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    cursor: pointer;
}

.project-input-group input,
.project-select-group select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 14px;
}

.modal-hint {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
}

/* ===== Toast ===== */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    background: var(--card-bg);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    font-size: 14px;
    color: var(--gray-700);
    animation: slideIn 0.3s ease;
}

.toast.success {
    border-left: 3px solid var(--success);
}

.toast.error {
    border-left: 3px solid var(--danger);
}

.toast.warning {
    border-left: 3px solid var(--warning);
}

.toast.info {
    border-left: 3px solid var(--primary);
}

/* ===== Save Indicator ===== */
.save-indicator {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 8px 16px;
    background: var(--gray-700);
    color: white;
    border-radius: var(--radius);
    font-size: 13px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.save-indicator.show {
    opacity: 1;
}

/* ===== Import Loading Overlay ===== */
.import-loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.import-loading-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.import-loading-card {
    background: white;
    border-radius: 16px;
    padding: 40px;
    min-width: 400px;
    max-width: 480px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    animation: loadingSlideUp 0.3s ease-out;
}

@keyframes loadingSlideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Loading Icon - Three dots animation */
.loading-icon {
    margin-bottom: 24px;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 12px;
}

.loading-dots span {
    width: 16px;
    height: 16px;
    background: var(--primary);
    border-radius: 50%;
    animation: loadingBounce 1.4s infinite ease-in-out both;
}

.loading-dots span:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-dots span:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.6;
    }
    40% {
        transform: scale(1.2);
        opacity: 1;
    }
}

/* Loading title and description */
.loading-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--gray-900);
    margin: 0 0 12px 0;
}

.loading-desc {
    font-size: 16px;
    color: var(--gray-500);
    margin: 0 0 32px 0;
}

/* Progress container */
.progress-container {
    margin-bottom: 24px;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--gray-100);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 12px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary) 0%, #3b82f6 100%);
    border-radius: 4px;
    width: 0%;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: loadingShimmer 1.5s infinite;
}

@keyframes loadingShimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

.progress-info {
    display: flex;
    justify-content: center;
    align-items: center;
}

.progress-status {
    font-size: 14px;
    color: var(--gray-500);
}

/* Loading hint */
.loading-hint {
    font-size: 13px;
    color: var(--gray-400);
    text-align: center;
}

/* Loading states */
.import-loading-card.success .loading-dots span {
    background: var(--success);
    animation: none;
    transform: scale(1);
}

.import-loading-card.error .loading-dots span {
    background: var(--danger);
    animation: none;
    transform: scale(1);
}

/* ===== Animations ===== */
@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* ===== Empty State ===== */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 20px;
    text-align: center;
}

.empty-icon {
    width: 64px;
    height: 64px;
    color: var(--gray-300);
    margin-bottom: 16px;
}

.empty-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.empty-desc {
    font-size: 14px;
    color: var(--gray-400);
    margin-bottom: 16px;
}

/* ===== Responsive ===== */
@media (max-width: 1200px) {
    .project-grid {
        grid-template-columns: 1fr;
    }

    .combobox {
        width: 200px;
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 60px;
    }

    .sidebar-header {
        padding: 12px;
    }

    .logo-text,
    .nav-item span,
    .project-label,
    .project-name {
        display: none;
    }

    .nav-item {
        justify-content: center;
    }

    .main-content {
        margin-left: 60px;
    }

    .page {
        padding: 16px;
        padding-right: 16px;
    }

    .bottom-action-bar {
        left: 60px;
    }
}
