/* 数据平台管理系统主样式文件 */

/* 全局样式重置 */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Microsoft YaHei', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    background: #f2f4f8;
}

/* 自定义头部样式 */
.custom-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-bottom: none;
}

.custom-header .layui-logo {
    width: 240px;
    background: transparent;
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    padding: 0 20px;
    display: flex;
    align-items: center;
}

.custom-header .layui-logo i {
    margin-right: 10px;
    font-size: 20px;
    color: #64b5f6;
}

.custom-header .layui-nav {
    background: transparent;
}

.custom-header .layui-nav .layui-nav-item > a {
    color: rgba(255,255,255,0.9);
    transition: all 0.3s ease;
}

.custom-header .layui-nav .layui-nav-item > a:hover {
    color: #fff;
    background: rgba(255,255,255,0.1);
}

.custom-header .layui-nav .layui-nav-item > a i {
    margin-right: 6px;
}

.layui-nav-img {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.3);
    transition: all 0.3s ease;
}

.layui-nav-img:hover {
    border-color: #fff;
}

/* 自定义侧边栏样式 */
.custom-side {
    background: #2c3e50;
    width: 240px;
    box-shadow: 2px 0 6px rgba(0,0,0,0.1);
}

.layui-nav-tree {
    background: transparent;
}

.layui-nav-tree .layui-nav-item {
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.layui-nav-tree .layui-nav-item > a {
    color: #bdc3c7;
    padding: 15px 45px 15px 20px; /* 增加右侧padding为展开收缩图标预留空间 */
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    align-items: center;
    line-height: 1.4;
}

.layui-nav-tree .layui-nav-item > a:hover {
    background: #34495e;
    color: #fff;
}

.layui-nav-tree .layui-nav-item > a i {
    margin-right: 12px;
    width: 18px;
    height: 18px;
    text-align: center;
    color: #64b5f6;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.layui-nav-tree .layui-nav-item > a span {
    flex: 1;
    display: inline-block;
    vertical-align: middle;
}

/* 修复导航展开收缩图标对齐问题 */
.layui-nav-tree .layui-nav-item > a .layui-nav-more {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #bdc3c7;
    transition: all 0.3s ease;
}

.layui-nav-tree .layui-nav-item > a:hover .layui-nav-more {
    color: #fff;
}

.layui-nav-tree .layui-nav-itemed > a .layui-nav-more {
    color: #fff;
    transform: translateY(-50%) rotate(180deg);
}

.layui-nav-tree .layui-nav-itemed > a {
    background: #34495e;
    color: #fff;
}

.layui-nav-tree .layui-nav-child {
    background: #2c3e50;
    box-shadow: inset 0 0 10px rgba(0,0,0,0.1);
}

.layui-nav-tree .layui-nav-child dd {
    border-bottom: 1px solid rgba(255,255,255,0.03);
}

.layui-nav-tree .layui-nav-child dd > a {
    color: #95a5a6;
    padding: 12px 20px 12px 50px;
    font-size: 13px;
    position: relative;
    display: flex;
    align-items: center;
    line-height: 1.4;
    transition: all 0.3s ease;
}

.layui-nav-tree .layui-nav-child dd > a:hover {
    background: #34495e;
    color: #fff;
}

.layui-nav-tree .layui-nav-child dd > a:before {
    content: '';
    width: 4px;
    height: 4px;
    background: #64b5f6;
    border-radius: 50%;
    position: absolute;
    left: 30px;
    top: 50%;
    transform: translateY(-50%);
    transition: all 0.3s ease;
}

.layui-nav-tree .layui-nav-child dd > a:hover:before {
    background: #fff;
    width: 6px;
    height: 6px;
}

/* 主体内容样式 */
.custom-body {
    left: 240px;
    background: #f2f4f8;
    overflow: hidden;
}

.content-wrapper {
    height: 100%;
    width: 100%;
    padding: 0;
    margin: 0;
    position: relative;
}

#main-content {
    width: 100%;
    height: 100%;
    border: none;
    background: #fff;
}

/* 自定义底部样式 */
.custom-footer {
    left: 240px;
    background: #fff;
    color: #666;
    border-top: 1px solid #e6e6e6;
    text-align: center;
    font-size: 12px;
    height: 40px;
    line-height: 40px;
}

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .custom-header .layui-logo {
        width: 160px;
        font-size: 16px;
    }
    
    .custom-side {
        width: 200px;
    }
    
    .custom-body {
        left: 200px;
    }
    
    .custom-footer {
        left: 200px;
    }
}

/* 加载动画 */
.loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
}

.loading.show {
    display: block;
}

.loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #e6e6e6;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 页面内容基础样式 */
.page-container {
    padding: 20px;
    min-height: calc(100vh - 80px);
    background: #f2f4f8;
}

.page-header {
    background: #fff;
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-left: 4px solid #667eea;
}

.page-title {
    font-size: 20px;
    font-weight: 600;
    color: #2c3e50;
    margin: 0;
    display: flex;
    align-items: center;
}

.page-title i {
    margin-right: 10px;
    color: #667eea;
}

.page-description {
    color: #7f8c8d;
    margin: 10px 0 0 0;
    font-size: 14px;
    line-height: 1.5;
}

/* 卡片样式 */
.stats-card {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    border-left: 4px solid #64b5f6;
}

.stats-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.stats-card .stats-number {
    font-size: 28px;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stats-card .stats-label {
    color: #7f8c8d;
    font-size: 14px;
    margin-bottom: 10px;
}

.stats-card .stats-icon {
    font-size: 32px;
    color: #64b5f6;
    float: right;
    margin-top: -50px;
    opacity: 0.8;
}

/* 表格样式增强 */
.layui-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.layui-table tbody tr:hover {
    background: #f1f3f4;
}

/* 按钮样式增强 */
.layui-btn {
    border-radius: 4px;
    transition: all 0.3s ease;
}

.layui-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* 表单样式增强 */
.layui-form-item {
    margin-bottom: 20px;
}

.layui-form-label {
    font-weight: 600;
    color: #2c3e50;
}

.layui-input, .layui-select, .layui-textarea {
    border-radius: 4px;
    transition: all 0.3s ease;
}

.layui-input:focus, .layui-select:focus, .layui-textarea:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* 工具栏样式 */
.toolbar {
    background: #fff;
    padding: 15px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.toolbar .toolbar-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.toolbar .toolbar-right {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* 状态标签样式 */
.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-align: center;
    min-width: 60px;
}

.status-badge.status-running {
    background: #d4edda;
    color: #155724;
}

.status-badge.status-stopped {
    background: #f8d7da;
    color: #721c24;
}

.status-badge.status-error {
    background: #f5c6cb;
    color: #721c24;
}

.status-badge.status-warning {
    background: #fff3cd;
    color: #856404;
}

/* 进度条样式 */
.progress-bar {
    background: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
    height: 8px;
    position: relative;
}

.progress-bar .progress-fill {
    background: linear-gradient(90deg, #667eea, #764ba2);
    height: 100%;
    transition: width 0.3s ease;
    border-radius: 10px;
}

/* 图表容器样式 */
.chart-container {
    background: #fff;
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    margin-bottom: 20px;
}

.chart-title {
    font-size: 16px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid #e6e6e6;
}

/* 面包屑样式 */
.breadcrumb {
    background: #fff;
    padding: 12px 20px;
    margin-bottom: 20px;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.breadcrumb .layui-breadcrumb {
    margin: 0;
}

.breadcrumb .layui-breadcrumb a {
    color: #667eea;
}

/* 标签页样式增强 */
.layui-tab {
    margin: 0;
}

.layui-tab-title {
    background: #fff;
    border-bottom: 1px solid #e6e6e6;
}

.layui-tab-title li {
    position: relative;
}

.layui-tab-title li.layui-this {
    background: transparent;
}

.layui-tab-title li.layui-this::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: #667eea;
}

/* 空状态样式 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #7f8c8d;
}

.empty-state i {
    font-size: 48px;
    color: #bdc3c7;
    margin-bottom: 20px;
    display: block;
}

.empty-state h3 {
    font-size: 18px;
    font-weight: 500;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 14px;
    line-height: 1.5;
}