/* 新加样式 */
/* 选项卡样式 */
.nav-tabs {
    border: 1px solid #e5e7eb;
	background-color: #ffffff;
    display: flex;
    /* border-bottom: 2px solid #eee; */
    margin-bottom: 16px;
    border-radius: 8px;
    overflow: hidden;
    /* gap: 2px; */
}

.nav-tab {
    position: relative;
    padding: 12px 24px;
    cursor: pointer;
    border-radius: 0;
    background: transparent;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-weight: 500;
    color: #666;
}

.nav-tab::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 2px;
    background: #1890ff;
    transform: scaleX(0);
    transition: transform 0.2s ease;
}

.nav-tab:hover {
    background: rgba(24, 144, 255, 0.06);
    color: #333;
}

.nav-tab.active {
    background: rgba(24, 144, 255, 0.08);
    color: #1890ff;
    font-weight: bold;
}

.nav-tab.active::after {
    transform: scaleX(1);
}

/* 内容区域样式 */
.tab-content {
    display: none;
    animation: fadeIn 0.3s ease;
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 列表项样式 (Log Item) */
.log-item {
    background: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    transition: all 0.2s ease;
    position: relative;
    padding-left: 16px;
}

.log-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-1px);
}

.log-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.log-title {
    font-weight: bold;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.log-meta {
    font-size: 13px;
    color: #999;
}

.log-body {
    font-size: 14px;
    color: #555;
}

/* 变更详情样式 */
.change-detail {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 6px;
    padding: 12px;
    margin-top: 8px;
}

.change-row {
    display: flex;
    margin-bottom: 8px;
    align-items: baseline;
    flex-wrap: wrap;
}

.change-label {
    width: 100px;
    font-weight: 600;
    color: #666;
    flex-shrink: 0;
}

.change-old {
    text-decoration: line-through;
    color: #ff4d4f;
    background: rgba(255, 77, 79, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    margin-right: 8px;
    font-size: 13px;
}

.change-new {
    color: #52c41a;
    background: rgba(82, 196, 26, 0.1);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 500;
    font-size: 13px;
}

.arrow-icon {
    color: #999;
    margin: 0 8px;
    font-size: 12px;
}

/* 状态标签 */
.status-tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: bold;
}

.status-success {
    background: rgba(82, 196, 26, 0.1);
    color: #52c41a;
}

.status-error {
    background: rgba(255, 77, 79, 0.1);
    color: #ff4d4f;
}

.status-warn {
    background: rgba(250, 173, 20, 0.1);
    color: #faad14;
}

/* 统计卡片优化 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: #fff;
    border-radius: 12px;
    padding: 20px;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
}

.stat-value {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 4px;
}

.stat-label {
    color: #888;
    font-size: 13px;
}

/* 表单样式 */
.simple-form-item {
    margin-bottom: 15px;
}

.simple-form-item label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
    color: #555;
}

.simple-form-item .input {
    width: 100%;
    box-sizing: border-box;
}

/* 日志列表样式 */
.log-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid #eee;
    transition: background 0.2s;
}

.log-list-item:last-child {
    border-bottom: none;
}

.log-list-item:hover {
    background: #f9f9f9;
}

.log-tag {
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: bold;
}

.tag-ce {
    background: rgba(40, 167, 69, 0.1);
    color: #28a745;
}

.tag-std {
    background: rgba(0, 123, 255, 0.1);
    color: #007bff;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .nav-tabs {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 4px;
    }

    .change-row {
        flex-direction: column;
        gap: 4px;
    }

    .arrow-icon {
        display: none;
    }

    .change-old,
    .change-new {
        display: inline-block;
    }
}

/* 黑暗模式适配 */
@media (prefers-color-scheme: dark) {
    .nav-tabs {
        border-color: #1F1F1F;
        background-color: #161616;
    }

    .nav-tab {
        background: transparent;
        color: #aaa;
    }

    .nav-tab:hover {
        background: rgba(255, 255, 255, 0.05);
        color: #fff;
    }

    .nav-tab.active {
        background: rgba(24, 144, 255, 0.12);
        color: #1890ff;
    }

    .log-item {
        background: #2b2b2b;
        border-color: #444;
    }

    .log-header {
        border-bottom-color: #444;
    }

    .change-detail {
        background: rgba(255, 255, 255, 0.05);
    }

    .change-label {
        color: #aaa;
    }

    .stat-card {
        background: #2b2b2b;
        border-color: #444;
    }

    .log-body {
        color: #aaa;
    }

    .log-list-item {
        border-bottom-color: #444;
    }

    .log-list-item:hover {
        background: #333;
    }

    .simple-form-item label {
        color: #aaa;
    }

    .tag-inactive {
        background: rgba(255, 255, 255, 0.1);
        color: #aaa;
    }
}
