/* 通用样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: #f5f5f5;
    color: #333;
}

.app-container {
    max-width: 1400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: 300;
}

.nav-tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.nav-tab {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.nav-tab:hover {
    background: rgba(255,255,255,0.3);
}

.nav-tab.active {
    background: white;
    color: #667eea;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* 标签页内容 */
.tab-content {
    display: none;
    padding: 30px;
}

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

/* 工具栏样式 */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.toolbar-left {
    display: flex;
    gap: 15px;
}

.toolbar-right {
    display: flex;
    gap: 15px;
    align-items: center;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 25px;
    width: 300px;
    font-size: 14px;
}

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

.auto-search {
    position: relative;
}

.auto-search::after {
    content: "🔍";
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;
    pointer-events: none;
}

.search-input.auto-search {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='%23999' d='M11.742 10.344a6.5 6.5 0 1 0-1.397 1.398h-.001c.03.04.062.078.098.115l3.85 3.85a1 1 0 0 0 1.415-1.414l-3.85-3.85a1.007 1.007 0 0 0-.115-.1zM12 6.5a5.5 5.5 0 1 1-11 0 5.5 5.5 0 0 1 11 0z'%3e%3c/path%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px;
}

.search-input.searching {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.search-results-count {
    font-size: 12px;
    color: #6c757d;
    margin-left: 10px;
    font-style: italic;
    white-space: nowrap;
}

/* 搜索高亮样式 */
#student-list mark {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    border-radius: 3px;
    padding: 1px 3px;
    font-weight: 600;
    color: #856404;
    border: 1px solid #ffeaa7;
    box-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* 按钮样式 */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 25px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
    transform: translateY(-2px);
}

/* 表格样式 */
.table-container {
    background: white;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
}

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

.student-table th,
.student-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.student-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
}

.student-table tr:hover {
    background: #f8f9fa;
}

.student-table tr:last-child td {
    border-bottom: none;
}

/* 排序按钮样式 */
.sortable {
    position: relative;
    cursor: pointer;
    user-select: none;
}

.sort-buttons {
    display: inline-flex;
    flex-direction: column;
    margin-left: 8px;
    gap: 1px;
}

.sort-btn {
    background: none;
    border: none;
    color: #6c757d;
    font-size: 10px;
    line-height: 1;
    padding: 1px 3px;
    cursor: pointer;
    transition: all 0.2s ease;
    border-radius: 2px;
}

.sort-btn:hover {
    color: #495057;
    background: rgba(0,0,0,0.1);
}

.sort-btn.active {
    color: #667eea;
    background: rgba(102, 126, 234, 0.1);
    font-weight: bold;
}

.sort-btn.active.sort-up {
    color: #28a745;
}

.sort-btn.active.sort-down {
    color: #dc3545;
}

.sortable:hover .sort-buttons {
    opacity: 1;
}

.sortable .sort-buttons {
    opacity: 0.6;
    transition: opacity 0.2s ease;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.page-info {
    font-size: 14px;
    color: #6c757d;
}

#page-size {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 0;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px 15px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-weight: 300;
}

.modal-close {
    color: white;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    opacity: 0.7;
}

.modal-body {
    padding: 30px;
}

/* 配置行样式 */
.config-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.config-row label {
    font-weight: 500;
    color: #495057;
    min-width: 120px;
}

.config-row select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 200px;
    background: white;
}

.config-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* 表单样式 */
.form-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-row label {
    font-weight: 500;
    color: #495057;
    min-width: 100px;
}

.form-row input {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 300px;
    font-size: 14px;
}

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

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

/* 设置页面样式 */
.settings-container {
    max-width: 1200px;
    margin: 0 auto;
}

.settings-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #495057;
    font-weight: 300;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.field-setting {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.field-setting h4 {
    color: #667eea;
    margin-bottom: 20px;
    font-size: 18px;
    font-weight: 500;
    text-align: center;
}

.setting-controls {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.setting-controls label {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.setting-controls input,
.setting-controls select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 13px;
    margin-top: 5px;
}

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

.settings-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
}

/* 打印设置与预览页面样式 */
.print-preview-container {
    display: flex;
    height: calc(100vh - 200px);
    gap: 20px;
}

.settings-panel {
    width: 400px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.settings-panel h2 {
    text-align: center;
    margin-bottom: 20px;
    color: #495057;
    font-weight: 300;
    padding: 20px 20px 0;
}

.school-name-setting {
    padding: 20px;
    background: #e8f4f8;
    border-radius: 10px;
    margin-bottom: 20px;
}

.school-name-setting h3 {
    margin-bottom: 15px;
    color: #2c5aa0;
    font-weight: 500;
}

.school-name-controls {
    display: flex;
    align-items: center;
    gap: 10px;
}

.school-name-controls label {
    font-weight: 500;
    color: #495057;
}

.school-name-controls input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    width: 200px;
    font-size: 14px;
}

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

.settings-scroll {
    flex: 1;
    overflow-y: auto;
    padding: 0 20px;
    max-height: calc(100vh - 500px);
}

.preview-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.preview-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.preview-controls {
    display: flex;
    gap: 10px;
}

.preview-actions {
    display: flex;
    gap: 15px;
}

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

.preview-help {
    color: #6c757d;
    font-size: 12px;
    margin-left: 15px;
    font-style: italic;
}

.preview-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    background: #f0f0f0;
    padding: 20px;
    border-radius: 10px;
    overflow: auto;
}

.preview-paper {
    width: 210mm;
    height: 297mm;
    background: white;
    position: relative;
    box-shadow: 0 0 20px rgba(0,0,0,0.2);
    transform: scale(0.85);
    transform-origin: top center;
    overflow: hidden;
    margin: 40px auto;
}

.card-template-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.preview-field {
    position: absolute;
    box-sizing: border-box;
    border: 1px dashed #667eea;
    display: flex;
    align-items: center;
    padding: 0 1px;
    background: rgba(102, 126, 234, 0.15);
    overflow: hidden;
    word-break: break-all;
    cursor: move;
    user-select: none;
    min-height: 20px;
    font-weight: 500;
    transition: all 0.2s ease;
    z-index: 1;
}

.preview-field:hover {
    border-color: #4c63d2;
    background: rgba(102, 126, 234, 0.25);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    z-index: 10;
}

.preview-field.dragging {
    opacity: 0.8;
    z-index: 1000;
    transform: rotate(2deg);
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.preview-field .field-label {
    position: absolute;
    top: -20px;
    left: 0;
    background: #667eea;
    color: white;
    padding: 2px 6px;
    border-radius: 3px;
    font-size: 10px;
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.2s ease;
    pointer-events: none;
}

.preview-field:hover .field-label {
    opacity: 1;
}

/* 调整大小手柄 */
.resize-handle {
    position: absolute;
    background: #667eea;
    border: 1px solid #4c63d2;
    opacity: 0;
    transition: all 0.2s ease;
    border-radius: 2px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.preview-field:hover .resize-handle {
    opacity: 1;
}

.resize-handle.se {
    bottom: -3px;
    right: -3px;
    width: 8px;
    height: 8px;
    cursor: se-resize;
}

.resize-handle.e {
    top: 50%;
    right: -3px;
    width: 6px;
    height: 20px;
    transform: translateY(-50%);
    cursor: e-resize;
}

.resize-handle.s {
    bottom: -3px;
    left: 50%;
    width: 20px;
    height: 6px;
    transform: translateX(-50%);
    cursor: s-resize;
}

.resize-handle.active {
    opacity: 1;
    background: #4c63d2;
    transform: scale(1.2);
    box-shadow: 0 2px 8px rgba(76, 99, 210, 0.4);
}

.resize-handle:hover {
    opacity: 1;
    background: #5a7ce8;
    transform: scale(1.1);
}

/* 数据管理页面样式 */
.data-management-container {
    max-width: 800px;
    margin: 0 auto;
}

.data-management-container h2 {
    text-align: center;
    margin-bottom: 40px;
    color: #495057;
    font-weight: 300;
}

.data-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.action-group {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.action-group h3 {
    color: #667eea;
    margin-bottom: 20px;
    font-weight: 500;
}

.action-group .btn {
    width: 100%;
    margin-bottom: 10px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .app-container {
        margin: 0;
    }

    .tab-content {
        padding: 15px;
    }

    .toolbar {
        flex-direction: column;
        gap: 15px;
    }

    .toolbar-left,
    .toolbar-right {
        width: 100%;
        justify-content: center;
        flex-direction: column;
        align-items: center;
        gap: 10px;
    }

    .search-input {
        width: 100%;
        max-width: 300px;
    }
    
    .search-results-count {
        margin-left: 0;
        text-align: center;
    }
    
    /* 移动端排序按钮优化 */
    .sort-buttons {
        margin-left: 4px;
    }
    
    .sort-btn {
        font-size: 8px;
        padding: 0 2px;
    }

    .settings-grid {
        grid-template-columns: 1fr;
    }

    .setting-controls {
        grid-template-columns: 1fr;
    }

    .nav-tabs {
        flex-wrap: wrap;
    }

    .print-preview-container {
        flex-direction: column;
        height: auto;
    }

    .settings-panel {
        width: 100%;
        margin-bottom: 20px;
    }

    .settings-scroll {
        max-height: 400px;
    }

    .preview-paper {
        transform: scale(0.4);
    }

    .modal-content {
        width: 95%;
        margin: 10% auto;
    }

    .config-row {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .form-row {
        flex-direction: column;
        gap: 5px;
        align-items: stretch;
    }

    .form-row input {
        width: 100%;
    }
}

/* 打印样式 */
@media print {
    body * {
        visibility: hidden;
    }

    .print-area,
    .print-area * {
        visibility: visible;
    }

    .print-area {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .print-page {
        width: 210mm;
        height: 297mm;
        page-break-after: always;
        position: relative;
        background: white;
    }

    .print-page:last-child {
        page-break-after: avoid;
    }

    .print-field {
        position: absolute;
        overflow: hidden;
        word-break: break-all;
        z-index: 1;
    }

    @page {
        size: A4 portrait;
        margin: 0;
    }
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 提示样式 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* 消息提示 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 5px;
    color: white;
    font-weight: 500;
    z-index: 1001;
    animation: slideInRight 0.3s ease;
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

.message.warning {
    background: #ffc107;
    color: #333;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 工具栏中心区域 */
.toolbar-center {
    display: flex;
    gap: 15px;
    align-items: center;
}

/* 成功按钮样式 */
.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1ba085 100%);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(40, 167, 69, 0.3);
}

/* 预览提示样式 */
.preview-note {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

/* 打印进度模态框样式 */
.print-progress-content {
    max-width: 500px;
}

.progress-info {
    text-align: center;
    margin-bottom: 30px;
}

.progress-info p {
    margin-bottom: 15px;
    font-size: 16px;
    color: #495057;
}

.progress-bar-container {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 20px 0;
}

.progress-bar {
    flex: 1;
    height: 20px;
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border-radius: 10px;
    transition: width 0.3s ease;
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        45deg,
        transparent 35%, 
        rgba(255,255,255,0.2) 35%, 
        rgba(255,255,255,0.2) 65%, 
        transparent 65%
    );
    background-size: 20px 20px;
    animation: progressStripes 1s linear infinite;
}

@keyframes progressStripes {
    0% {
        background-position: 0 0;
    }
    100% {
        background-position: 20px 0;
    }
}

.progress-percentage {
    font-size: 16px;
    font-weight: bold;
    color: #495057;
    min-width: 50px;
    text-align: right;
}

.progress-details {
    font-size: 14px !important;
    color: #6c757d !important;
    margin-top: 10px !important;
}

.progress-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 响应式工具栏 */
@media (max-width: 768px) {
    .toolbar-center {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .toolbar-center .btn {
        flex: 1;
        min-width: 100px;
    }
}

/* 导入配置模态框样式 */
.import-config-content {
    max-width: 1000px;
    width: 95%;
    max-height: 90vh;
}

.import-modal-body {
    max-height: 75vh;
    overflow-y: auto;
    padding: 20px;
}

.data-preview-section {
    margin-bottom: 25px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
}

.data-preview-section h4 {
    margin-bottom: 12px;
    color: #495057;
    font-weight: 500;
    font-size: 16px;
}

.preview-table-container {
    overflow-x: auto;
    max-height: 200px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
}

.preview-table th,
.preview-table td {
    padding: 6px 10px;
    text-align: left;
    border: 1px solid #ddd;
    white-space: nowrap;
    min-width: 70px;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.preview-table th {
    background: #e9ecef;
    font-weight: 600;
    color: #495057;
    position: sticky;
    top: 0;
    z-index: 1;
}

.preview-table td {
    background: white;
}

.preview-table .column-label {
    background: #667eea;
    color: white;
    font-weight: bold;
    text-align: center;
    min-width: 40px;
}

.column-mapping-section {
    margin-bottom: 20px;
}

.column-mapping-section h4 {
    margin-bottom: 15px;
    color: #495057;
    font-weight: 500;
    font-size: 16px;
    border-bottom: 2px solid #e9ecef;
    padding-bottom: 8px;
}

.auto-save-hint {
    font-size: 12px;
    color: #28a745;
    font-weight: normal;
    font-style: italic;
}

/* 两列网格布局 */
.config-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px 25px;
}

.config-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.config-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.config-row label {
    font-weight: 500;
    color: #495057;
    min-width: 80px;
    font-size: 14px;
}

.config-row select {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 13px;
    background: white;
    min-width: 120px;
}

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

.column-preview {
    padding: 8px 10px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 4px;
    font-size: 12px;
    color: #6c757d;
    min-height: 32px;
    display: flex;
    align-items: center;
    font-style: italic;
    word-break: break-all;
    transition: all 0.2s ease;
}

.column-preview.has-data {
    background: #e8f5e8;
    border-color: #28a745;
    color: #155724;
    font-style: normal;
    font-weight: 500;
}

.column-preview.empty-data {
    background: #fff3cd;
    border-color: #ffc107;
    color: #856404;
}

.auto-save-select {
    transition: border-color 0.2s ease;
}

.auto-save-select.saving {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.1);
}

.save-status {
    color: #28a745;
    font-size: 12px;
    margin-left: 15px;
    opacity: 0.8;
}

/* 响应式设计 - 导入配置 */
@media (max-width: 768px) {
    .import-config-content {
        width: 98%;
        margin: 2% auto;
        max-height: 95vh;
    }
    
    .import-modal-body {
        max-height: 80vh;
        padding: 15px;
    }
    
    .config-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .config-item {
        gap: 6px;
    }
    
    .config-row {
        flex-direction: column;
        align-items: stretch;
        gap: 5px;
    }
    
    .config-row label {
        min-width: auto;
        font-size: 13px;
    }
    
    .config-row select {
        min-width: auto;
        width: 100%;
    }
    
    .column-preview {
        font-size: 11px;
        padding: 6px 8px;
        min-height: 28px;
    }
    
    .preview-table {
        font-size: 10px;
    }
    
    .preview-table th,
    .preview-table td {
        padding: 4px 6px;
        min-width: 50px;
        max-width: 80px;
    }
    
    .config-actions {
        flex-direction: column;
        gap: 10px;
        align-items: center;
    }
    
    .save-status {
        margin-left: 0;
        text-align: center;
    }
}
