/* ===================================
   极简专业风 - 一键合并多表工具样式
   =================================== */

/* 基础样式重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 设备/账号弹窗样式已迁移到 00-common/common-header.css */

/* 去重字段下拉框：适当缩小字体，避免视觉过重 */
#dedupe-field {
    font-size: 13px;
}

/* 合并模式选择样式 */
.merge-mode-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.radio-label {
    display: flex;
    flex-direction: column;
    padding: 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    background: #FFFFFF;
}

.radio-label:hover {
    border-color: #1E3A8A;
    background: #F9FAFB;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-label input[type="radio"]:checked + .radio-text {
    color: #1E3A8A;
    font-weight: 600;
}

.radio-label input[type="radio"]:checked ~ .radio-hint {
    color: #1E3A8A;
}

.radio-label:has(input[type="radio"]:checked) {
    border-color: #1E3A8A;
    background: #EFF6FF;
}

.radio-text {
    font-size: 15px;
    font-weight: 500;
    color: #1F2937;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.radio-text::before {
    content: '';
    width: 18px;
    height: 18px;
    border: 2px solid #D1D5DB;
    border-radius: 50%;
    display: inline-block;
    transition: all 0.2s;
}

.radio-label input[type="radio"]:checked + .radio-text::before {
    border-color: #1E3A8A;
    border-width: 6px;
}

.radio-hint {
    font-size: 13px;
    color: #6B7280;
    margin-left: 26px;
    line-height: 1.5;
}

/* 输出文件名输入框：字体稍微缩小，整体更轻盈 */
#output-name {
    font-size: 13px;
    padding-top: 8px;
    padding-bottom: 8px;
}

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: #1F2937;
    background-color: #F8F9FA;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 应用容器 */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ===================================
   头部样式
   =================================== */
.app-header {
    background-color: #FFFFFF;
    border-bottom: 1px solid #E5E7EB;
    padding: 16px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 20px;
    font-weight: 600;
    color: #1E3A8A;
    text-decoration: none;
}

.logo-icon {
    font-size: 24px;
}

.header-search {
    position: relative;
    flex: 1;
    max-width: 400px;
    margin: 0 24px;
}

.search-input {
    width: 100%;
    padding: 8px 40px 8px 16px;
    border: 1.5px solid #E5E7EB;
    border-radius: 999px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.search-input::placeholder {
    color: #9CA3AF;
}

.search-icon {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 16px;
    pointer-events: none;
    opacity: 0.5;
}

.search-no-result {
    padding: 16px;
    text-align: center;
    color: #6B7280;
    font-size: 14px;
}

.nav {
    display: flex;
    gap: 32px;
}

.nav-link {
    font-size: 14px;
    color: #6B7280;
    text-decoration: none;
    transition: color 0.2s;
    font-weight: 500;
}

.nav-link:hover {
    color: #1E3A8A;
}

.nav-login-btn {
    padding: 6px 18px;
    border-radius: 999px;
    border: 1.5px solid #F97373;
    background-color: transparent;
    color: #F97373;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease, transform 0.1s ease;
    white-space: nowrap;
}

.nav-login-btn:hover {
    background-color: #F97373;
    color: #FFFFFF;
    box-shadow: 0 2px 8px rgba(248, 113, 113, 0.35);
}

.nav-login-btn:active {
    transform: translateY(1px);
}

/* 用户下拉菜单 */
.user-dropdown {
    position: relative;
    display: none;
    align-items: center;
}

.user-avatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: #F97373;
    color: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s, box-shadow 0.2s;
    user-select: none;
}

.user-avatar:hover {
    background-color: #F87171;
    box-shadow: 0 2px 8px rgba(248, 113, 113, 0.35);
}

.user-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    z-index: 1000;
    display: none;
}

.user-menu-item {
    padding: 12px 16px;
    color: #1F2937;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.user-menu-item:first-child {
    border-radius: 12px 12px 0 0;
}

.user-menu-item:last-child {
    border-radius: 0 0 12px 12px;
}

.user-menu-item:hover {
    background-color: #F9FAFB;
}

.user-menu-divider {
    height: 1px;
    background-color: #E5E7EB;
    margin: 4px 0;
}

.user-menu-email {
    padding: 12px 16px;
    font-size: 13px;
    color: #6B7280;
    border-bottom: 1px solid #E5E7EB;
    word-break: break-all;
}

/* 个人信息模态框 */
.profile-modal-dialog {
    max-width: 480px;
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 28px 24px 24px;
}

.profile-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 24px;
}

.profile-info-item {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.profile-info-label {
    font-size: 13px;
    color: #6B7280;
    font-weight: 500;
}

.profile-info-value {
    font-size: 14px;
    color: #1F2937;
    padding: 10px 12px;
    background-color: #F9FAFB;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    word-break: break-all;
}

/* ===================================
   主内容区域
   =================================== */
.app-main {
    flex: 1;
    padding: 32px 24px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.tool-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.tool-header {
    text-align: center;
    margin-bottom: 8px;
}

.tool-title {
    font-size: 32px;
    font-weight: 700;
    color: #1F2937;
    margin-bottom: 8px;
}

.tool-subtitle {
    font-size: 16px;
    color: #6B7280;
}

/* ===================================
   卡片样式
   =================================== */
.card {
    background-color: #FFFFFF;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 32px;
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.card-secondary {
    background-color: #F8F9FA;
    border: 1px solid #E5E7EB;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 16px;
}

/* ===================================
   区块样式
   =================================== */
.section {
    margin-bottom: 24px;
}

.section:last-child {
    margin-bottom: 0;
}

.section-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #1F2937;
    margin-bottom: 12px;
}

.field-config-bar {
    margin-top: 16px;
    padding: 16px;
    background-color: #F8F9FA;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
}

.field-config-summary {
    font-size: 14px;
    color: #6B7280;
}

.field-config-summary strong {
    color: #1E3A8A;
}

.field-overview {
    margin-top: 16px;
    padding: 20px;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.field-overview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-overview-title {
    font-size: 16px;
    font-weight: 600;
    color: #1F2937;
}

.field-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}

.field-status-ready {
    background-color: #ECFDF5;
    color: #047857;
}

.field-status-pending {
    background-color: #FEF3C7;
    color: #B45309;
}

.field-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
}

.field-overview-item {
    background-color: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-overview-label {
    font-size: 12px;
    color: #6B7280;
}

.field-overview-value {
    font-size: 20px;
    font-weight: 600;
    color: #1E3A8A;
}

.field-overview-hint {
    font-size: 13px;
    color: #4B5563;
    background-color: #F9FAFB;
    border-radius: 8px;
    padding: 12px 16px;
    line-height: 1.5;
}

.field-overview-hint strong {
    color: #1E3A8A;
}

/* ===================================
   文件上传区域
   =================================== */
.file-upload {
    border: 2px dashed #E5E7EB;
    border-radius: 12px;
    padding: 48px 24px;
    text-align: center;
    background-color: #F8F9FA;
    transition: all 0.2s;
    cursor: pointer;
}

.file-upload:hover {
    border-color: #1E3A8A;
    background-color: #F0F4FF;
}

.file-upload.drag-over {
    border-color: #1E3A8A;
    background-color: #EFF6FF;
    border-style: solid;
}

.file-input {
    display: none;
}

.file-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.file-icon {
    font-size: 48px;
    line-height: 1;
}

.file-text {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.file-title {
    font-size: 16px;
    font-weight: 500;
    color: #1F2937;
}

.file-hint {
    font-size: 14px;
    color: #6B7280;
}

/* ===================================
   文件列表
   =================================== */
.file-list {
    margin-top: 16px;
    padding: 16px;
    background-color: #F8F9FA;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.file-list-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.file-count {
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
}

.file-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.file-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    padding: 12px 16px;
    background-color: #FFFFFF;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
}

.file-item-info {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.file-item-icon {
    font-size: 20px;
    flex-shrink: 0;
}

.file-item-name {
    font-size: 14px;
    color: #1F2937;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    display: box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    box-orient: vertical;
    word-break: break-all;
    line-height: 1.4;
}

.file-item-size {
    font-size: 12px;
    color: #6B7280;
    margin-left: 8px;
}

.file-item-remove {
    background: none;
    border: none;
    color: #EF4444;
    cursor: pointer;
    font-size: 18px;
    padding: 4px 8px;
    transition: color 0.2s;
    flex-shrink: 0;
    align-self: flex-start;
    margin-top: -2px;
}

.file-item-remove:hover {
    color: #DC2626;
}

/* ===================================
   选项组
   =================================== */
.options-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.checkbox-label:hover {
    background-color: #F8F9FA;
}

.checkbox {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #1E3A8A;
}

.checkbox-text {
    font-size: 14px;
    color: #1F2937;
}

/* ===================================
   输入框
   =================================== */
.input-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.input-label {
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
}

.input {
    width: 100%;
    padding: 12px 16px;
    font-size: 14px;
    color: #1F2937;
    background-color: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    outline: none;
    transition: all 0.2s;
    font-family: inherit;
}

.input:hover {
    border-color: #9CA3AF;
}

.input:focus {
    border-color: #1E3A8A;
    box-shadow: 0 0 0 3px rgba(30, 58, 138, 0.1);
}

.input-hint {
    font-size: 12px;
    color: #6B7280;
}

/* ===================================
   按钮样式
   =================================== */
/* 按钮通用样式已迁移到 00-common/common-tool.css，由所有工具共享，这里不再重复定义。*/

.input-error {
    border-color: #DC2626 !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* ===================================
   进度条
   =================================== */
.progress-section {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #E5E7EB;
}

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

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-label {
    font-size: 14px;
    font-weight: 500;
    color: #1F2937;
}

.progress-percent {
    font-size: 14px;
    font-weight: 600;
    color: #1E3A8A;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #E5E7EB;
    border-radius: 4px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #1E3A8A 0%, #3B82F6 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 12px;
    color: #6B7280;
}

/* ===================================
   提示信息
   =================================== */
.alert-section {
    margin-top: 24px;
}

.alert {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px;
    border-radius: 8px;
    border-left: 4px solid;
}

.alert-success {
    background-color: #ECFDF5;
    border-color: #10B981;
    color: #065F46;
}

.alert-error {
    background-color: #FEF2F2;
    border-color: #EF4444;
    color: #991B1B;
}

.alert-warning {
    background-color: #FFFBEB;
    border-color: #F59E0B;
    color: #92400E;
}

.alert-info {
    background-color: #EFF6FF;
    border-color: #3B82F6;
    color: #1E40AF;
}

.alert-icon {
    font-size: 20px;
    font-weight: bold;
    flex-shrink: 0;
}

.alert-content {
    flex: 1;
}

.alert-title {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 4px;
}

.alert-message {
    font-size: 14px;
    line-height: 1.5;
}

/* ===================================
   字段配置弹窗
   =================================== */
body.modal-open {
    overflow: hidden;
}

.modal {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 200;
}

.modal.open {
    display: flex;
}

.modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
}

.modal-dialog {
    position: relative;
    background: #FFFFFF;
    border-radius: 16px;
    width: min(960px, 92%);
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.2);
    overflow: hidden;
    z-index: 1;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #E5E7EB;
    background-color: #F9FAFB;
}

.modal-title {
    font-size: 20px;
    font-weight: 600;
    color: #1F2937;
}

.modal-close {
    border: none;
    background: transparent;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #6B7280;
    transition: color 0.2s;
}

.modal-close:hover {
    color: #1E3A8A;
}

.modal-body {
    padding: 0 24px 24px;
    overflow-y: auto;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    padding: 16px 24px 24px;
    border-top: 1px solid #E5E7EB;
    background-color: #FFFFFF;
}

.field-loading {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background-color: #F3F4F6;
    border: 1px dashed #D1D5DB;
    border-radius: 8px;
    margin: 24px 0 16px;
}

.field-loading .loading:before {
    border-color: #1E3A8A transparent rgba(30, 58, 138, 0.4) transparent;
}

.field-loading-text {
    font-size: 14px;
    color: #4B5563;
}

.field-table-wrapper {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding-bottom: 8px;
}

.field-table-scroll {
    max-height: 60vh;
    overflow: auto;
    border-radius: 12px;
    border: 1px solid #E5E7EB;
    background-color: #FFFFFF;
    box-shadow: inset 0 0 0 1px rgba(229, 231, 235, 0.3);
    /* 优化滚动条样式 */
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F9FAFB;
    /* 触摸设备滚动优化 */
    -webkit-overflow-scrolling: touch;
    /* 添加渐变遮罩指示可滚动内容 */
    position: relative;
}

.field-table-scroll::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.field-table-scroll::-webkit-scrollbar-track {
    background: #F9FAFB;
    border-radius: 4px;
}

.field-table-scroll::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.field-table-scroll::-webkit-scrollbar-thumb:hover {
    background: #94A3B8;
}

.field-table-scroll::-webkit-scrollbar-corner {
    background: #F9FAFB;
}

.field-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: #4B5563;
}

.field-select-all {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    user-select: none;
}

.field-table {
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    min-width: 640px;
}

.field-table thead th {
    position: sticky;
    top: 0;
    background-color: #F3F4F6;
    z-index: 2;
    box-shadow: inset 0 -1px 0 #E5E7EB;
}

.field-table tr {
    transition: background-color 0.2s;
    align-items: flex-start;
}

.field-table tr:hover {
    background-color: #F9FAFB;
}

.field-table thead {
    background-color: #F3F4F6;
}

.field-table th,
.field-table td {
    padding: 14px 16px;
    text-align: left;
    font-size: 14px;
    color: #1F2937;
    border-bottom: 1px solid #E5E7EB;
    vertical-align: top;
    align-items: flex-start;
}

.field-table th.field-col-select,
.field-table td.field-cell-select {
    width: 72px;
    text-align: center;
}

.field-table th.field-col-final,
.field-table td.field-cell-final {
    width: 240px;
    min-width: 220px;
}

.field-table th.field-col-final {
    padding: 12px 16px;
    min-height: 68px;
    box-sizing: border-box;
}

.field-table th.field-col-file,
.field-table td.field-cell-source {
    width: 200px;
    min-width: 180px;
}

.field-table th.field-col-file {
    font-size: 13px;
    color: #1F2937;
    padding: 12px 16px;
    min-height: 68px;
    box-sizing: border-box;
}

.field-row {
    transition: opacity 0.2s;
}

.field-row-inactive {
    opacity: 0.55;
}

.field-row-inactive .field-name-input {
    background-color: #F3F4F6;
}

.field-final-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field-cell-final {
    padding: 12px 16px;
    min-height: 68px;
    box-sizing: border-box;
    vertical-align: top;
}

.field-cell-final .field-final-wrapper {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
}

.field-cell-final .field-name-input {
    width: 100%;
}

.field-cell-final .field-error-message {
    font-size: 12px;
    color: #DC2626;
    min-height: 0;
    margin-top: 4px;
    line-height: 1.2;
    display: none;
}

.field-cell-final .field-error-message:not(:empty) {
    display: block;
}

.field-cell-source {
    padding: 12px 16px;
    vertical-align: top;
    min-height: 68px;
    box-sizing: border-box;
}

.field-cell-source-present {
    color: #1F2937;
}

.field-source-primary {
    font-weight: 600;
    word-break: break-word;
    overflow-wrap: break-word;
    line-height: 1.4;
}

.field-source-meta {
    font-size: 12px;
    color: #6B7280;
    line-height: 1.4;
}

.field-source-primary-missing {
    color: #B45309;
    font-weight: 600;
}

.field-source-missing-dot {
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background-color: #F59E0B;
    display: inline-block;
    margin-right: 6px;
}

.field-source-missing-text {
    font-size: 13px;
    color: #B45309;
}

.field-source-meta-missing {
    color: #D97706;
}

.field-error-message {
    font-size: 12px;
    color: #DC2626;
    margin-top: 6px;
    min-height: 16px;
}

.field-row-error {
    background-color: #FEF2F2;
}

.field-error {
    font-size: 13px;
    color: #DC2626;
    background-color: #FEF2F2;
    border: 1px solid #FECACA;
    border-radius: 8px;
    padding: 12px 16px;
}

.field-empty {
    text-align: center;
    padding: 32px 0;
    color: #6B7280;
    font-size: 14px;
}

/* ===================================
   帮助列表
   =================================== */
.help-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.help-list li {
    font-size: 14px;
    color: #6B7280;
    padding-left: 24px;
    position: relative;
    line-height: 1.6;
}

.help-list li::before {
    content: "•";
    position: absolute;
    left: 8px;
    color: #1E3A8A;
    font-weight: bold;
    font-size: 14px;
    font-weight: bold;
    font-size: 14px;
}

/* ===================================
   数据预览表格（多表对比等工具共用）
   =================================== */
.data-preview {
    margin-top: 12px;
    padding: 12px 14px;
    border-radius: 10px;
    border: 1px solid #E5E7EB;
    background-color: #F9FAFB;
}

.data-preview-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 8px;
    font-size: 13px;
    color: #4B5563;
}

.data-preview-header span:first-child {
    font-weight: 600;
    color: #111827;
}

.data-preview-hint {
    font-size: 12px;
    color: #9CA3AF;
}

.data-preview-table-wrapper {
    max-height: 260px;
    overflow-x: auto;
    overflow-y: auto;
    border-radius: 8px;
    border: 1px solid #E5E7EB;
    background-color: #FFFFFF;
    scrollbar-width: thin;
    scrollbar-color: #CBD5E1 #F9FAFB;
    -webkit-overflow-scrolling: touch;
}

.data-preview-table-wrapper::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.data-preview-table-wrapper::-webkit-scrollbar-track {
    background: #F9FAFB;
}

.data-preview-table-wrapper::-webkit-scrollbar-thumb {
    background: #CBD5E1;
    border-radius: 4px;
}

.data-preview-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 13px;
    color: #111827;
}

.data-preview-table thead th,
.data-preview-table tbody td {
    padding: 6px 10px;
    border-bottom: 1px solid #E5E7EB;
    border-right: 1px solid #F3F4F6;
    white-space: nowrap;
    min-width: 80px;
}

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

.data-preview-table tr:nth-child(even) td {
    background-color: #F9FAFB;
}

.data-preview-table tr:hover td {
    background-color: #EEF2FF;
}

.data-preview-table .header-row-highlight td {
    background-color: #DBEAFE;
    font-weight: 600;
    border-bottom-color: #93C5FD;
}

@media (max-width: 768px) {
    .data-preview-table-wrapper {
        max-height: 220px;
    }

    .data-preview-table thead th,
    .data-preview-table tbody td {
        padding: 4px 8px;
        font-size: 12px;
    }
}

/* ===================================
   底部
   =================================== */
.app-footer {
    background-color: #FFFFFF;
    border-top: 1px solid #E5E7EB;
    padding: 24px;
    text-align: center;
    color: #6B7280;
    font-size: 14px;
    margin-top: 48px;
}

/* ===================================
   激活系统样式
   =================================== */

.activation-notice,
.trial-notice {
    margin-bottom: 24px;
    border-radius: 8px;
    overflow: hidden;
}

.activation-notice {
    background: linear-gradient(135deg, #FEF3C7 0%, #FDE68A 100%);
    border: 1px solid #F59E0B;
}

.trial-notice {
    background: linear-gradient(135deg, #DBEAFE 0%, #BFDBFE 100%);
    border: 1px solid #3B82F6;
}

.activation-notice-content,
.trial-notice-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    gap: 16px;
}

.activation-notice-content span,
.trial-notice-content span {
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    flex: 1;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .activation-notice-content,
    .trial-notice-content {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .activation-notice-content span,
    .trial-notice-content span {
        text-align: center;
    }
    
    .btn-sm {
        width: 100%;
    }
}

/* ===================================
   响应式设计
   =================================== */

/* 平板适配 */
@media (max-width: 1024px) {
    .header-content {
        max-width: 100%;
        padding: 0 20px;
    }

    .app-main {
        max-width: 100%;
        padding: 28px 20px;
    }

    .card {
        padding: 28px 20px;
    }

    .modal-dialog {
        width: min(900px, 90%);
    }
}

/* 小平板适配 */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 16px;
        padding: 0 16px;
    }

    .nav {
        gap: 16px;
    }

    .app-main {
        padding: 24px 16px;
    }

    .card {
        padding: 24px 16px;
    }

    .tool-title {
        font-size: 24px;
    }

    .button-group {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }

    .field-config-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .field-overview-grid {
        grid-template-columns: 1fr;
    }

    .field-overview-hint {
        font-size: 12px;
    }

    .modal-dialog {
        width: 94%;
    }

    .field-toolbar {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .field-table {
        min-width: 540px;
    }

    .field-table-scroll {
        max-height: 55vh;
    }

    .field-table th.field-col-final,
    .field-table td.field-cell-final {
        min-width: 180px;
        width: 200px;
    }

    .field-table th.field-col-file {
        min-width: 160px;
    }

    .field-table thead th {
        top: 0;
    }

    .file-upload {
        padding: 40px 20px;
    }
}

/* 手机适配 */
@media (max-width: 480px) {
    .app-header {
        padding: 12px 0;
    }

    .logo {
        font-size: 18px;
    }

    .logo-icon {
        font-size: 20px;
    }

    .nav {
        gap: 12px;
    }

    .nav-link {
        font-size: 13px;
    }

    .app-main {
        padding: 20px 12px;
    }

    .card {
        padding: 20px 12px;
        border-radius: 8px;
    }

    .tool-title {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .tool-subtitle {
        font-size: 14px;
    }

    .section {
        margin-bottom: 20px;
    }

    .section-label {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .file-upload {
        padding: 32px 16px;
    }

    .file-icon {
        font-size: 40px;
    }

    .file-title {
        font-size: 14px;
    }

    .file-hint {
        font-size: 12px;
    }

    .file-list {
        padding: 12px;
    }

    .file-item {
        padding: 10px 12px;
    }

    .file-item-name {
        font-size: 13px;
    }

    .checkbox-label {
        padding: 10px;
    }

    .checkbox-text {
        font-size: 13px;
    }

    .input {
        padding: 10px 14px;
        font-size: 15px;
    }

    .btn {
        padding: 10px 20px;
        font-size: 15px;
    }

    .field-config-bar {
        padding: 12px;
    }

    .field-overview {
        padding: 16px;
    }

    .field-overview-item {
        padding: 12px;
    }

    .field-overview-value {
        font-size: 18px;
    }

    .modal-dialog {
        width: 96%;
        border-radius: 12px;
    }

    .modal-header {
        padding: 20px;
    }

    .modal-title {
        font-size: 18px;
    }

    .modal-close {
        font-size: 20px;
    }

    .field-table {
        min-width: 480px;
    }

    .field-table-scroll {
        max-height: 50vh;
    }

    .field-table th,
    .field-table td {
        padding: 8px 10px;
        font-size: 12px;
    }

    .field-table th.field-col-final,
    .field-table td.field-cell-final {
        min-width: 150px;
        width: 160px;
    }

    .field-table th.field-col-file {
        min-width: 120px;
    }
}

/* ===================================
   加载动画
   =================================== */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #FFFFFF;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 8px;
}

