/**
 * 熵巡 - 企业级氚云OpenAPI数据管理平台
 * 开发归属 Alyr.net
 * 全局样式 - 布局、表单、按钮、TAB等通用样式
 * 尊重劳动成果是一种美德
 */

/* 禁止硬编码颜色！统一使用CSS变量 */

/* 全局重置样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* 隐藏所有滚动条 */
* {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

*::-webkit-scrollbar {
    display: none;
}

body {
    overflow-x: hidden;
}

html {
    overflow-x: hidden;
}

/* 全局字体和背景设置 */
body {
    font-family: 'Microsoft YaHei', Arial, sans-serif;
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    line-height: var(--line-height-normal);
    font-size: var(--font-size-md);
}

/* 主容器样式 */
.container {
    margin: 0 auto;
    padding: var(--spacing-sm);
    max-width: 1400px;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--color-bg-light);
}

.login-box {
    background-color: var(--color-bg-white);
    padding: 40px;
    border-radius: var(--radius-xl);
    border: 1px solid var(--color-border);
    width: 400px;
}

.login-title {
    text-align: center;
    color: var(--color-text-dark);
    margin-bottom: var(--spacing-xl);
    font-size: var(--font-size-xxl);
    font-weight: normal;
}

/* 表单输入框样式 */
.form-group {
    margin-bottom: var(--spacing-lg);
}

.form-label {
    display: block;
    margin-bottom: var(--spacing-xs);
    color: var(--color-text-normal);
    font-weight: normal;
}

.form-input {
    width: 100%;
    padding: 12px var(--spacing-md);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    background-color: var(--color-bg-white);
    color: var(--color-text-dark);
    font-size: var(--font-size-md);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-text-normal);
}

/* 统一按钮样式 - 禁止使用阴影、渐变 */
.btn {
    display: inline-block;
    padding: var(--spacing-sm) var(--spacing-lg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-size: var(--font-size-md);
    text-decoration: none;
    text-align: center;
    font-family: inherit;
    transition: var(--transition-fast);
}

.btn:hover {
    opacity: var(--opacity-hover);
}

/* 主要按钮 - 黑色 */
.btn-primary {
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

/* 次要按钮 - 灰色 */
.btn-secondary {
    background-color: var(--color-secondary);
    color: var(--color-bg-white);
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background-color: var(--color-secondary-hover);
    border-color: var(--color-secondary-hover);
}

/* 上传按钮 - 浅灰 */
.btn-upload {
    background-color: var(--color-tertiary);
    color: var(--color-text-dark);
    border-color: var(--color-tertiary);
}

.btn-upload:hover {
    background-color: var(--color-tertiary-hover);
    border-color: var(--color-tertiary-hover);
}

.btn:disabled,
.btn.loading {
    opacity: var(--opacity-disabled);
    cursor: not-allowed;
}

/* 登录按钮特殊样式 */
.btn-login {
    width: 100%;
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    border-color: var(--color-primary);
    padding: 15px;
    font-size: 16px;
}

/* 登录按钮组样式 */
.login-button-group {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

/* 纯文字登录按钮 */
.btn-login-text {
    flex: 1;
    background-color: var(--color-primary);
    color: var(--color-bg-white);
    border: 1px solid var(--color-primary);
    padding: 15px;
    font-size: 16px;
    transition: all 0.3s;
}

.btn-login-text:hover:not(:disabled) {
    background-color: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-login-text:disabled {
    cursor: not-allowed;
}

/* 主页面布局 */
.main-header {
    background-color: #ffffff;
    border-bottom: 1px solid #dddddd;
}

.main-header .container > div {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-title {
    color: #333333;
    font-size: 18px;
    font-weight: normal;
    text-align: left; /* 左对齐标题 */
    display: flex;
    align-items: center;
}

.logo-icon {
    width: 32px;
    height: 32px;
    margin-right: 12px;
}

.welcome-text {
    color: #666666;
    margin-right: 15px;
    cursor: pointer;
    text-decoration: none;
}

.welcome-text:hover {
    color: #333333;
}

.user-config-icon {
    display: inline-block;
    margin-left: 8px;
    color: #999999;
    font-style: normal;
    font-size: 16px;
    transition: all 0.2s ease;
    vertical-align: middle;
}

.welcome-text:hover .user-config-icon {
    color: #666666;
}

/* 底部版权样式 */
.main-footer {
    background-color: #ffffff;
    padding: 20px 0;
    margin-top: 40px;
}

.main-footer p {
    margin: 0;
    color: #666666;
    font-size: 14px;
    text-align: center;
}

/* TAB导航样式 - 极简设计 */
.tab-nav {
    background-color: #ffffff;
}

.tab-list {
    list-style: none;
    display: flex;
    padding: 0;
    margin: 0;
}

.tab-item {
    margin: 0;
}

.tab-link {
    display: block;
    padding: 12px 20px;
    color: #666666;
    text-decoration: none;
    font-size: 14px;
}

.tab-link.active {
    color: #333333;
    border-bottom-color: #333333;
    font-weight: bold;
}

/* 内容区域样式 */
.tab-content {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 4px;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

.section-title {
    color: #333333;
    margin-bottom: 20px;
    font-weight: normal;
}

/* 测试面板样式 */
.test-panel {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    align-items: start;
}

.test-item {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
    
}

.test-item h3 {
    color: #333333;
    margin: 0 0 10px 0;
    font-size: 16px;
    font-weight: normal;
}

.test-item p {
    color: #666666;
    margin: 0 0 15px 0;
    font-size: 14px;
}

.test-result {
    margin-top: 15px;
    padding: 10px;
    border-radius: 4px;
    display: none;
}

.test-result.success {
    background-color: #f5f5f5;
    color: #333333;
    display: block;
}

.test-result.error {
    background-color: #f9f9f9;
    border: 1px solid #dddddd;
    color: #333333;
    display: block;
}

/* 数据表格样式 */
.data-table {
    width: 100%;
    border-collapse: collapse;
    background-color: #ffffff;
    border: 1px solid #dddddd;
}

.data-table th,
.data-table td {
    border: 1px solid #dddddd;
    padding: 10px;
    text-align: left;
    vertical-align: top;
}

.data-table th {
    background-color: #f5f5f5;
    font-weight: bold;
    color: #333333;
}

.data-table td {
    color: #333333;
}

.field-table {
    width: 100%;
    border-collapse: collapse;
}

.field-table td {
    border: 1px solid #eeeeee;
    padding: 5px;
    font-size: 12px;
}

.field-table td:first-child {
    background-color: #f9f9f9;
    font-weight: bold;
    width: 100px;
}

/* 数据查询样式 */
.query-panel {
    background-color: #ffffff;
}

.query-filters {
    background-color: #f9f9f9;
    padding: 15px;
    border-radius: 4px;
}

.query-filters h4 {
    color: #333333;
    margin: 0 0 15px 0;
    font-size: 14px;
    font-weight: bold;
}

.query-controls {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
    text-align: left;
}

.sync-controls {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.sync-controls .btn,
.query-controls .btn {
    padding: var(--spacing-sm) var(--spacing-lg);
    font-size: var(--font-size-md);
    font-weight: 500;
    border-radius: var(--radius-md);
    transition: var(--transition-fast);
}

.sync-controls .btn:hover,
.query-controls .btn:hover {
    opacity: var(--opacity-hover);
}

.btn-primary {
    background: var(--color-primary);
    border-color: var(--color-primary);
}

.btn-primary:hover {
    background: var(--color-primary-hover);
    border-color: var(--color-primary-hover);
}

.btn-secondary {
    background: var(--color-secondary);
    border-color: var(--color-secondary);
}

.btn-secondary:hover {
    background: var(--color-secondary-hover);
    border-color: var(--color-secondary-hover);
}

.query-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e0e0e0;
}

.query-status,
.sync-status {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 15px;
    font-size: 14px;
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    width: 100%;
    box-sizing: border-box;
    display: block;
}

.query-status.loading,
.sync-status.loading {
    background-color: #f9f9f9;
    border: 1px solid #dddddd;
    color: #666666;
}

.query-status.success,
.sync-status.success {
    background-color: #f5f5f5;
    border: 1px solid #dddddd;
    color: #333333;
}

.query-status.error,
.sync-status.error {
    background-color: #f9f9f9;
    border: 1px solid #dddddd;
    color: #333333;
}

.query-results {
    overflow-x: auto;
}

.no-data {
    text-align: center;
    color: #999999;
    padding: 40px;
    font-size: 16px;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.mb-20 {
    margin-bottom: 20px;
}

.mt-20 {
    margin-top: 20px;
}

/* 数据同步样式 */
.sync-panel {
    background-color: #ffffff;
}

.sync-header h3 {
    color: #333333;
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: normal;
}

.sync-header p {
    color: #666666;
    margin: 0 0 20px 0;
    font-size: 14px;
}

/* 过滤条件样式 */
.sync-filters,
.query-filters {
    background: var(--color-bg-panel);
    padding: var(--spacing-lg);
    border-radius: var(--radius-lg);
}

.sync-filters h4,
.query-filters h4 {
    color: #333333;
    margin: 0 0 20px 0;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #999999;
    display: inline-block;
}

.filter-row {
    display: flex;
    gap: 25px;
    margin-bottom: 18px;
    flex-wrap: wrap;
    align-items: flex-end;
}

.filter-row:last-child {
    margin-bottom: 0;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 220px;
    background: white;
    padding: 12px;
    border-radius: 4px;
}

.filter-group label {
    color: #555555;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    min-width: 90px;
    margin-right: 8px;
}

.filter-group select,
.filter-group input[type="date"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    color: #333333;
    font-size: 14px;
    flex: 1;
    min-width: 120px;
    transition: all 0.2s ease;
}

.filter-group select:focus,
.filter-group input[type="date"]:focus {
    outline: none;
    border-color: #999999;
}

/* 扁平化筛选容器样式 */
.filter-container {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.filter-container label {
    color: #555555;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.filter-container select,
.filter-container input[type="date"],
.filter-container input[type="text"],
.filter-container input[type="password"] {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    color: #333333;
    font-size: 14px;
    min-width: 140px;
    transition: all 0.2s ease;
}

/* 筛选条件select下拉箭头位置调整 */
.filter-container select {
    padding-right: 25px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 8"><polygon points="0,0 12,0 6,8" fill="%23666"/></svg>');
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 8px;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.filter-container select:focus,
.filter-container input[type="date"]:focus,
.filter-container input[type="text"]:focus,
.filter-container input[type="password"]:focus {
    outline: none;
    border-color: #999999;
}

.filter-container > span {
    display: flex;
    align-items: center;
    gap: 8px;
}

.filter-container > span > span {
    color: #666666;
    font-size: 14px;
}

#custom-dates,
#query-custom-dates {
    gap: 15px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 3px;
    border: 1px solid #ddd;
}

.sync-controls {
    margin-bottom: 20px;
}


.sync-results {
    margin-top: 20px;
}

.sync-result-card {
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 4px;
}

.sync-result-card h4 {
    color: #333333;
    margin: 0 0 15px 0;
    font-size: 16px;
    font-weight: bold;
}

.sync-info {
    margin-bottom: 15px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px solid #f0f0f0;
}

.info-item:last-child {
    border-bottom: none;
}

.info-item .label {
    color: #666666;
    font-weight: normal;
}

.info-item .value {
    color: #333333;
    font-weight: bold;
}

.sync-actions {
    text-align: right;
}

.btn.loading {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 图片悬停效果 */
.data-table img {
    transition: transform 0.2s ease;
    border-radius: 4px;
    cursor: pointer;
    max-width: 50px;
    max-height: 50px;
    object-fit: cover;
}

.data-table img:hover {
    transform: scale(1.2);
    z-index: 100;
    position: relative;
    border: 2px solid #999999;
}

/* 图片画廊样式 */
.image-gallery {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.image-item {
    position: relative;
}

.image-item img {
    transition: transform 0.2s ease;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #ddd;
}

.image-item img:hover {
    transform: scale(1.1);
    z-index: 100;
    position: relative;
    border-color: #999999;
}

/* 图片加载失败的占位符 */
.image-placeholder {
    width: 50px;
    height: 50px;
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #999;
    font-size: 12px;
    margin: 2px;
}

/* 附件链接悬停效果 */
.attachment-link:hover {
    background-color: #f0f0f0;
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

/* 表格中附件样式 */
.data-table a[href*="attachment_proxy.php"] {
    transition: all 0.2s ease;
}

.data-table a[href*="attachment_proxy.php"]:hover {
    background-color: #e8f4fd;
    transform: scale(1.05);
}

/* 附件列表样式 */
.attachment-list {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.attachment-item {
    display: inline-block;
}

/* 附件卡片样式 */
.attachment-card {
    border: 1px solid #ddd;
    border-radius: 6px;
    background: #f8f9fa;
    text-align: center;
    cursor: pointer;
    min-width: 80px;
    transition: all 0.2s ease;
    padding: 10px;
}

.attachment-card:hover {
    background: #e9ecef;
    border-color: #999999;
}

.attachment-preview {
    transition: all 0.2s ease;
}

.attachment-preview:hover {
    background: #e9ecef;
    border-color: #999999;
}

/* 表格中附件预览样式 */
.data-table .attachment-preview {
    margin: 1px;
    font-size: 11px;
}

/* 下载通知样式 */
.download-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #555555;
    color: white;
    padding: 10px 20px;
    border-radius: 4px;
    z-index: 10001;
    font-size: 14px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 模态窗口样式 */
.image-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
}

.image-modal img {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border: 2px solid white;
    border-radius: 4px;
}

/* ======================================== */
/* 字段管理功能样式 */
/* ======================================== */

.field-panel {
    background-color: #ffffff;
}

.field-actions {
    margin-bottom: 20px;
}

.action-container {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 15px;
}

/* 字段筛选器样式 */
#field-filter {
    position: relative;
    padding: 10px 35px 10px 15px;
    border: 1px solid #999999;
    border-radius: 4px;
    background-color: #999999;
    color: #ffffff;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    min-width: 140px;
    font-family: inherit;
    outline: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 12 12"><path fill="%23ffffff" d="M6 9L1 4h10z"/></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

#field-filter:hover {
    background-color: #7a7a7a;
    border-color: #7a7a7a;
}

#field-filter:focus {
    border-color: #666666;
    box-shadow: 0 0 0 2px rgba(102, 102, 102, 0.2);
}

#field-filter option {
    background-color: #ffffff;
    color: #333333;
    padding: 8px;
}

.field-status {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
}

.field-status.loading {
    background-color: #f5f5f5;
    color: #666666;
    
}

.field-status.success {
    background-color: #f5f5f5;
    color: #333333;
    border: 1px solid #dddddd;
}

.field-status.error {
    background-color: #f9f9f9;
    color: #333333;
    border: 1px solid #dddddd;
}

.field-status.info {
    background-color: #f5f5f5;
    color: #666666;
    border: 1px solid #dddddd;
}

.field-summary {
    margin-bottom: 20px;
}

.summary-card {
    background-color: #f8f9fa;
    
    border-radius: 6px;
    padding: 20px;
}

.summary-card h4 {
    margin-bottom: 15px;
    color: #333333;
    font-size: 16px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 15px;
}

.stat-item {
    text-align: center;
    padding: 10px;
    background-color: #ffffff;
    
    border-radius: 4px;
}

.stat-number {
    display: block;
    font-size: 24px;
    font-weight: bold;
    color: #333333;
    margin-bottom: 5px;
}

.stat-label {
    display: block;
    font-size: 12px;
    color: #666666;
    text-transform: uppercase;
}

.field-table-container {
    background-color: #ffffff;
}

.field-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    table-layout: fixed;
}

.field-table th,
.field-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
    vertical-align: middle;
    overflow: hidden;
}

.field-table th:first-child,
.field-table td:first-child {
    width: 70px;
    min-width: 70px;
    text-align: center;
}

.field-table th:nth-child(2),
.field-table td:nth-child(2) {
    width: 180px;
    min-width: 180px;
}

.field-table th:nth-child(3),
.field-table td:nth-child(3) {
    width: 150px;
    min-width: 150px;
}

.field-table th:nth-child(4),
.field-table td:nth-child(4) {
    width: 100px;
    min-width: 100px;
}

.field-table th:nth-child(5),
.field-table td:nth-child(5) {
    width: 100px;
    min-width: 100px;
}

.field-table input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.field-table th {
    background-color: #f8f9fa;
    color: #333333;
    font-weight: bold;
    font-size: 14px;
}

.field-table td {
    color: #555555;
    font-size: 13px;
    vertical-align: top;
}

.field-table code {
    background-color: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #d63384;
}

.field-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: bold;
    margin-right: 5px;
    text-transform: uppercase;
}

.field-tag.system {
    background-color: #f5f5f5;
    color: #666666;
}

.field-tag.business {
    background-color: #f9f9f9;
    color: #333333;
}

.field-tag.child-table {
    background-color: #f5f5f5;
    color: #666666;
}

.field-tag.child-field {
    background-color: #f9f9f9;
    color: #333333;
}

.field-tag.image {
    background-color: #f5f5f5;
    color: #666666;
}

.field-tag.attachment {
    background-color: #f9f9f9;
    color: #666666;
}

.type-badge {
    background-color: #e9ecef;
    color: #495057;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-family: 'Courier New', monospace;
    text-transform: uppercase;
}

.sample-value {
    font-family: 'Courier New', monospace;
    font-size: 12px;
    color: #666666;
    line-height: 1.4;
    padding: 4px 0;
    word-break: break-all;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sample-value:hover {
    background-color: #f8f9fa;
}

.sample-value.expanded {
    background-color: #e7f3ff;
    white-space: pre-wrap;
    overflow: visible;
    text-overflow: clip;
    word-break: break-all;
}

/* 按钮hover效果 */
.btn:hover {
    opacity: 0.9;
    transition: all 0.2s ease;
}

.btn:active {
    transform: translateY(0);
}

.btn.loading {
    opacity: 0.7;
    cursor: not-allowed;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .action-container {
        flex-direction: column;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .field-table {
        font-size: 12px;
    }
    
    .field-table th,
    .field-table td {
        padding: 6px 4px;
    }
    
    .field-table th:first-child,
    .field-table td:first-child {
        width: 50px;
    }
    
    .field-table th:nth-child(2),
    .field-table td:nth-child(2) {
        width: 100px;
    }
    
    .field-table th:nth-child(3),
    .field-table td:nth-child(3) {
        width: 90px;
    }
    
    .field-table th:nth-child(4),
    .field-table td:nth-child(4) {
        width: 70px;
    }
    
    .field-table th:nth-child(5),
    .field-table td:nth-child(5) {
        width: 70px;
    }
}

/* ======================================== */
/* 基础配置功能样式 */
/* ======================================== */

.config-panel {
    background-color: #ffffff;
}

.config-sections {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.config-section {
    background-color: #f8f9fa;
    
    border-radius: 6px;
    padding: 20px;
}

.config-section h4 {
    margin: 0 0 15px 0;
    color: #333333;
    font-size: 16px;
    font-weight: 600;
    padding-bottom: 10px;
    border-bottom: 2px solid #999999;
    display: inline-block;
}

.config-form {
    display: grid;
    gap: 15px;
}

/* 基础配置专用的扁平化字段配置样式 */
.config-section .filter-container {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px 20px;
    background: #f5f5f5;
    border-radius: 6px;
    margin-top: 15px;
}

.config-section .filter-container label {
    color: #555555;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    min-width: 80px;
}

.config-section .filter-container input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    color: #333333;
    font-size: 14px;
    min-width: 220px;
    flex: 1;
    transition: all 0.2s ease;
}

.config-section .filter-container input:focus {
    outline: none;
    border-color: #999999;
    box-shadow: none;
}

.config-row {
    display: grid;
    grid-template-columns: 120px 1fr;
    gap: 15px;
    align-items: center;
}

.config-row label {
    color: #555555;
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
}

.config-row input,
.config-row select,
.config-row textarea {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: #ffffff;
    color: #333333;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.config-row input:focus,
.config-row select:focus,
.config-row textarea:focus {
    outline: none;
    border-color: #999999;
    box-shadow: none;
}

.config-row textarea {
    min-height: 80px;
    resize: vertical;
    font-family: 'Courier New', monospace;
    line-height: 1.4;
}

.config-row input[type="checkbox"] {
    width: auto;
    margin: 0;
    cursor: pointer;
}

.config-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.config-checkbox label {
    margin: 0;
    cursor: pointer;
}

.field-array {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 8px;
    background-color: #ffffff;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 40px;
    align-items: flex-start;
    align-content: flex-start;
}

.field-chip {
    display: inline-flex;
    align-items: center;
    background-color: #f5f5f5;
    color: #666666;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    gap: 6px;
}

.field-chip button {
    background: none;
    border: none;
    color: #666666;
    cursor: pointer;
    padding: 0;
    font-size: 14px;
    line-height: 1;
    margin-left: 4px;
}

.field-chip button:hover {
    color: #333333;
}

.field-input-container {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 8px;
}

.field-input-container input {
    flex: 1;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
}

.field-input-container button {
    padding: 6px 12px;
    background-color: #333333;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    cursor: pointer;
}

.field-input-container button:hover {
    background-color: #555555;
}

.config-actions {
    margin-top: 20px;
    display: flex;
    gap: 10px;
    justify-content: center;
}

.config-status {
    padding: 10px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 14px;
}

.config-status.loading {
    background-color: #f5f5f5;
    color: #666666;
}

.config-status.success {
    background-color: #f5f5f5;
    color: #333333;
    border: 1px solid #dddddd;
}

.config-status.error {
    background-color: #f9f9f9;
    color: #333333;
    border: 1px solid #dddddd;
}

.config-hint {
    font-size: 12px;
    color: #666666;
    margin-top: 5px;
    line-height: 1.4;
}

.config-hint code {
    background-color: #f8f9fa;
    padding: 1px 4px;
    border-radius: 2px;
    font-family: 'Courier New', monospace;
    font-size: 11px;
}

/* 响应式设计 - 基础配置 */
@media (max-width: 768px) {
    .config-sections {
        grid-template-columns: 1fr;
    }
    
    .config-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    
    .config-row label {
        font-weight: 600;
    }
    
    .config-actions {
        flex-direction: column;
    }
    
    .field-array {
        min-height: 60px;
    }
    
    .field-input-container {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* 字段配置移动端优化 */
    .config-section .filter-container {
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
    }
    
    .config-section .filter-container label {
        font-weight: 600;
        min-width: auto;
    }
    
    .config-section .filter-container input {
        min-width: auto;
        width: 100%;
    }
}

/* 服务开关样式 */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 26px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #555555;
}

input:focus + .slider {
    box-shadow: 0 0 1px #999999;
}

input:checked + .slider:before {
    transform: translateX(24px);
}

.status-text {
    color: #666666;
    font-weight: 500;
    font-size: 14px;
}

.config-form-section {
    transition: all 0.3s ease;
}

.config-form-section[style*="pointer-events: none"] {
    opacity: 0.6 !important;
    pointer-events: none !important;
}

/* 用户配置弹窗样式 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-header {
    background: #333333;
    color: white;
    padding: 20px;
    border-radius: 8px 8px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}

.modal-header .close {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.modal-header .close:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.modal-body {
    padding: 25px;
}

.modal-body .form-group {
    margin-bottom: 20px;
}

.modal-body .form-group:last-child {
    margin-bottom: 0;
}

.modal-body label {
    display: block;
    margin-bottom: 8px;
    color: #333333;
    font-weight: 500;
    font-size: 14px;
}

.modal-body .form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 14px;
    color: #333333;
    background-color: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.modal-body .form-input:focus {
    outline: none;
    border-color: #999999;
    box-shadow: none;
}

.modal-body .form-input:invalid {
    border-color: #999999;
}

.modal-footer {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 0 0 8px 8px;
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.modal-footer .btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 80px;
}

.modal-footer .btn-secondary {
    background-color: #6c757d;
    color: white;
}

.modal-footer .btn-secondary:hover {
    background-color: #5a6268;
}

.modal-footer .btn-primary {
    background-color: #333333;
    color: white;
}

.modal-footer .btn-primary:hover {
    background-color: #555555;
}

/* 响应式设计 */
@media (max-width: 600px) {
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-header {
        padding: 15px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .modal-footer {
        padding: 15px;
        flex-direction: column;
    }
    
    .modal-footer .btn {
        width: 100%;
    }
}