/**
 * 参数管理页面样式
 */

/* 整体布局 */
.app-wrapper {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

.sidebar-column {
    width: 280px;
    background: #fff;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.main-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* 左侧分类导航 */
.class-sidebar {
    height: 100vh;
    display: flex;
    flex-direction: column;
}

.class-sidebar-header {
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.class-sidebar-header h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
}

.class-btn-add {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(255,255,255,0.2);
    color: #fff;
    border-radius: 6px;
    text-decoration: none;
    font-size: 14px;
}

.class-btn-add:hover {
    background: rgba(255,255,255,0.3);
}

.class-tree {
    flex: 1;
    overflow-y: auto;
    padding: 15px;
}

.class-item {
    padding: 10px 12px;
    margin-bottom: 4px;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    transition: all 0.2s;
}

.class-item:hover {
    background: #f3f4f6;
}

.class-item.active {
    background: #dbeafe;
    color: #1e40af;
}

.class-item.sub {
    padding-left: 30px;
    font-size: 13px;
}

.class-icon {
    margin-right: 8px;
    font-size: 16px;
}

.class-item a {
    color: #374151;
    text-decoration: none;
    flex: 1;
}

.class-item.active a {
    color: #1e40af;
}

.class-expand {
    padding: 4px 8px;
    font-size: 10px;
    color: #6b7280;
    cursor: pointer;
}

.class-sub-list {
    display: none;
}

.class-sub-list.show {
    display: block;
}

.class-sidebar-footer {
    padding: 15px;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

.class-sidebar-footer a {
    color: #6b7280;
    text-decoration: none;
    font-size: 13px;
}

/* 移动端头部 */
.mobile-header {
    display: none;
    padding: 15px 20px;
    background: #fff;
    border-bottom: 1px solid #e5e7eb;
    align-items: center;
}

.btn-toggle-sidebar {
    padding: 8px 12px;
    background: #f3f4f6;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

/* 主内容区 */
.main-content-inner {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

/* 搜索栏 */
.value-search-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    padding: 15px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    flex-wrap: wrap;
}

.value-search-bar form {
    display: flex;
    gap: 10px;
    flex: 1;
}

.value-search-bar input[type="text"] {
    padding: 10px 15px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    min-width: 200px;
}

.value-btn {
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    cursor: pointer;
    border: none;
    display: inline-block;
}

.value-btn-primary {
    background: #3b82f6;
    color: #fff;
}

.value-btn-primary:hover {
    background: #2563eb;
}

.value-btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.value-btn-secondary:hover {
    background: #e5e7eb;
}

/* 分类信息 */
.value-class-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.value-class-info h2 {
    margin: 0;
    font-size: 20px;
    color: #374151;
}

.value-class-id {
    font-size: 14px;
    color: #6b7280;
}

.value-class-actions a {
    color: #3b82f6;
    text-decoration: none;
    font-size: 14px;
}

/* 参数列表 */
.value-list {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    overflow: hidden;
}

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

.value-table th {
    padding: 12px 15px;
    background: #f9fafb;
    text-align: left;
    font-weight: 600;
    color: #374151;
    border-bottom: 1px solid #e5e7eb;
}

.value-table td {
    padding: 12px 15px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.value-table tr:hover {
    background: #f9fafb;
}

.value-xpath strong {
    color: #1f2937;
}

.value-memo {
    color: #6b7280;
    font-size: 12px;
}

.value-content {
    max-width: 400px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* 标签 */
.value-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
}

.value-tag-public {
    background: #d1fae5;
    color: #065f46;
}

.value-tag-private {
    background: #fee2e2;
    color: #991b1b;
}

/* 操作按钮 */
.value-action a {
    display: inline-block;
    padding: 4px 10px;
    margin-right: 5px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 13px;
}

.value-action .edit {
    background: #dbeafe;
    color: #1e40af;
}

.value-action .clone {
    background: #fef3c7;
    color: #92400e;
}

/* 空状态 */
.value-empty {
    padding: 40px;
    text-align: center;
}

.value-empty .icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.value-empty h3 {
    margin: 0 0 10px 0;
    color: #374151;
}

.value-empty p {
    margin: 0;
    color: #6b7280;
}

/* 分页 */
.value-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    padding: 20px;
    border-top: 1px solid #e5e7eb;
}

.value-pagination a {
    padding: 8px 16px;
    background: #f3f4f6;
    color: #374151;
    border-radius: 6px;
    text-decoration: none;
}

.value-pagination a:hover {
    background: #e5e7eb;
}

.value-pagination a.active {
    background: #3b82f6;
    color: #fff;
}

.value-pagination-info {
    color: #6b7280;
    font-size: 14px;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar-column {
        position: fixed;
        left: -280px;
        top: 0;
        z-index: 1000;
        transition: left 0.3s;
    }

    .sidebar-column.show {
        left: 0;
    }

    .mobile-header {
        display: flex;
    }

    .main-content-inner {
        padding: 15px;
    }

    .value-search-bar {
        flex-direction: column;
    }

    .value-search-bar form {
        flex-direction: column;
    }

    .value-search-bar input[type="text"] {
        min-width: 100%;
    }

    .value-class-info {
        flex-direction: column;
        gap: 10px;
    }

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

    .value-content {
        max-width: 150px;
    }
}