/* AI模型引擎平台主样式 */

/* 全局样式重置 */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Microsoft YaHei', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f2f2f2;
}

/* 确保layui布局占满全屏 */
.layui-layout-body {
    height: 100vh;
    overflow: hidden;
}

.layui-layout-admin {
    height: 100%;
}

/* Logo样式 */
.layui-logo {
    color: #fff;
    font-size: 18px;
    font-weight: bold;
}

/* 头部导航样式 */
.layui-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 1px 4px rgba(0,21,41,.08);
    height: 60px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

.layui-header .layui-nav .layui-nav-item a {
    color: rgba(255,255,255,.8);
}

.layui-header .layui-nav .layui-nav-item a:hover {
    color: #fff;
}

/* 头部导航下拉菜单样式 */
.layui-header .layui-nav .layui-nav-child {
    background-color: #fff;
    border: 1px solid #e6e6e6;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    border-radius: 4px;
    margin-top: 5px;
}

.layui-header .layui-nav .layui-nav-child dd {
    margin: 0;
}

.layui-header .layui-nav .layui-nav-child dd a {
    color: #333;
    padding: 10px 15px;
    border-radius: 0;
    transition: all 0.3s ease;
}

.layui-header .layui-nav .layui-nav-child dd a:hover {
    background-color: #f5f5f5;
    color: #4c84ff;
}

/* 用户头像样式 */
.layui-nav-img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    margin-right: 8px;
}

/* 用户图标样式 */
.layui-header .layui-nav .layui-nav-item a .fa-user-circle {
    color: rgba(255,255,255,.9);
    font-size: 20px;
    margin-right: 8px;
    transition: color 0.3s ease;
}

.layui-header .layui-nav .layui-nav-item a:hover .fa-user-circle {
    color: #fff;
}

/* 保证下拉菜单在正确位置显示 */
.layui-header .layui-nav .layui-nav-item {
    position: relative;
}

/* 左侧导航样式 */
.layui-side {
    width: 220px;
    height: calc(100vh - 60px); /* 除去头部高度 */
    top: 60px;
}

.layui-side-scroll {
    height: 100%;
    overflow-y: auto;
}

.layui-nav-tree .layui-nav-item a {
    padding-left: 20px;
    color: #c2c2c2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: relative;
}

.layui-nav-tree .layui-nav-item a .nav-text {
    display: flex;
    align-items: center;
    flex: 1;
}

.layui-nav-tree .layui-nav-item a:hover {
    background-color: #4c84ff;
    color: #fff;
}

.layui-nav-tree .layui-this a {
    background-color: #4c84ff;
    color: #fff;
}

.layui-nav-tree .layui-nav-child dd a {
    padding-left: 45px;
    color: #999;
}

.layui-nav-tree .layui-nav-child dd a:hover {
    background-color: #363636;
    color: #fff;
}

/* 导航展开图标样式 */
.layui-nav-more {
    float: right;
    padding: 0;
    margin: 0;
    font-size: 12px;
    transition: all .3s;
    -webkit-transition: all .3s;
}

.layui-nav-more:after {
    content: "\e602";
    font-family: layui-icon !important;
    font-style: normal;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.layui-nav-mored {
    transform: rotate(180deg);
    -webkit-transform: rotate(180deg);
}

/* 树形导航的展开图标样式 */
.layui-nav-tree .layui-nav-more:after {
    content: "\e623";
}

.layui-nav-tree .layui-nav-mored:after {
    content: "\e625";
}

/* 图标样式 */
.layui-nav-tree .layui-nav-item a i {
    margin-right: 8px;
    width: 16px;
    text-align: center;
}

/* 内容区域样式 */
.layui-body {
    left: 220px;
    top: 60px;
    right: 0;
    bottom: 0;
    position: fixed;
    background-color: #f2f2f2;
    overflow: hidden;
    height: calc(100vh - 60px);
}

/* 页签样式 */
.layui-tab {
    margin: 0;
    border: none;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.layui-tab-title {
    background-color: #fff;
    border-bottom: 1px solid #e6e6e6;
    padding-left: 10px;
    flex-shrink: 0;
    height: 41px;
}

.layui-tab-title li {
    min-width: 120px;
    text-align: center;
}

.layui-tab-title li i {
    margin-right: 5px;
}

.layui-tab-close {
    margin-left: 8px;
    color: #999;
    cursor: pointer;
}

.layui-tab-close:hover {
    color: #ff5722;
}

/* iframe样式 */
#content-frame, .layui-tab-content iframe {
    width: 100%;
    height: 100%;
    border: none;
    background-color: #fff;
    display: block;
    margin: 0;
    padding: 0;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.layui-tab-content {
    padding: 0;
    height: calc(100vh - 60px - 41px); /* 精确计算：100vh - 头部高度(60px) - 页签高度(41px) */
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.layui-tab-item {
    height: 100%;
    overflow: hidden;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    padding: 0;
}

/* 底部样式已删除 */

/* 响应式设计 */
@media screen and (max-width: 768px) {
    .layui-side {
        left: -220px;
        transition: left 0.3s;
    }
    
    .layui-side.layui-show {
        left: 0;
    }
    
    .layui-body {
        left: 0;
        top: 60px;
        right: 0;
        bottom: 0;
        position: fixed;
        height: calc(100vh - 60px);
    }
    
    .layui-tab {
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        height: 100%;
    }
    
    .layui-tab-content {
        height: calc(100vh - 60px - 41px);
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
    }
}

/* 卡片样式 */
.ai-card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    padding: 20px;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.ai-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.ai-card-header {
    border-bottom: 1px solid #f0f0f0;
    padding-bottom: 12px;
    margin-bottom: 16px;
}

.ai-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin: 0;
}

.ai-card-extra {
    color: #8c8c8c;
    font-size: 14px;
}

/* 统计卡片 */
.stat-card {
    text-align: center;
    padding: 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 8px;
    margin-bottom: 16px;
}

.stat-number {
    font-size: 28px;
    font-weight: bold;
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
}

.stat-icon {
    font-size: 32px;
    opacity: 0.3;
    float: right;
    margin-top: -40px;
}

/* 按钮样式增强 */
.layui-btn-primary {
    border-color: #d9d9d9;
    color: #595959;
}

.layui-btn-primary:hover {
    border-color: #4c84ff;
    color: #4c84ff;
}

/* 表单样式增强 */
.layui-form-item {
    margin-bottom: 16px;
}

.layui-form-label {
    width: 100px;
    font-weight: 500;
}

.layui-input, .layui-select, .layui-textarea {
    border-radius: 4px;
    border-color: #d9d9d9;
}

.layui-input:focus, .layui-select:focus, .layui-textarea:focus {
    border-color: #4c84ff;
    box-shadow: 0 0 0 2px rgba(76, 132, 255, 0.2);
}

/* 加载动画 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4c84ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 消息提示样式 */
.message-success {
    color: #52c41a;
    background-color: #f6ffed;
    border: 1px solid #b7eb8f;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.message-error {
    color: #ff4d4f;
    background-color: #fff2f0;
    border: 1px solid #ffccc7;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 16px;
}

/* 标签样式 */
.ai-tag {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 12px;
    line-height: 1.5;
    margin-right: 8px;
}

.ai-tag-success {
    background-color: #f6ffed;
    color: #52c41a;
    border: 1px solid #b7eb8f;
}

.ai-tag-warning {
    background-color: #fffbe6;
    color: #faad14;
    border: 1px solid #ffe58f;
}

.ai-tag-error {
    background-color: #fff2f0;
    color: #ff4d4f;
    border: 1px solid #ffccc7;
}

.ai-tag-info {
    background-color: #f0f5ff;
    color: #1890ff;
    border: 1px solid #adc6ff;
}

/* 进度条样式 */
.progress-container {
    background-color: #f5f5f5;
    border-radius: 4px;
    height: 8px;
    margin-bottom: 16px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #4c84ff 0%, #667eea 100%);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* 图表容器 */
.chart-container {
    height: 300px;
    width: 100%;
    margin-bottom: 16px;
}

/* 工具提示 */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #000;
    color: #fff;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    z-index: 1000;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: #8c8c8c;
}

.empty-state-icon {
    font-size: 48px;
    color: #d9d9d9;
    margin-bottom: 16px;
}

.empty-state-text {
    font-size: 14px;
    margin-bottom: 16px;
}