/* EMA 管理后台主样式 */

/* 基础布局 */
body { overflow: hidden; }

/* 头部样式 */
.layui-header {
    height: 60px;
    line-height: 60px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.layui-logo {
    display: flex;
    align-items: center;
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 1px;
}

.layui-logo img {
    height: 36px;
    margin-right: 10px;
    border-radius: 4px;
}

.layui-header .layui-nav {
    background: transparent;
}

.layui-header .layui-nav .layui-nav-item a {
    color: #fff;
}

.layui-header .layui-nav .layui-nav-child dd a {
    color: #333;
}

.layui-header .layui-nav-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
}

/* 侧边栏 */
.layui-side {
    width: 200px !important;
    top: 0;
    transition: width 0.3s;
}

.layui-side-scroll {
    width: 220px;
}

/* 侧边栏收起状态 */
.layui-side.layui-nav-hide {
    width: 0 !important;
    overflow: hidden;
}

.layui-side.layui-nav-hide .layui-side-scroll {
    display: none;
}

/* 收起/展开按钮 - 固定在左侧 */
.side-toggle {
    position: fixed;
    left: 200px;
    bottom: 52px;
    width: 20px;
    height: 40px;
    background: #009688;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
    transition: left 0.3s, background-color 0.2s;
    z-index: 1001;
}

.side-toggle:hover {
    background: #00b5ad;
}

.side-toggle .layui-icon {
    margin: 0;
    font-size: 14px;
}

/* 收起状态按钮位置 - 移到左侧边缘 */
.side-toggle.collapsed {
    left: 0;
    border-radius: 0 4px 4px 0;
}

/* 主体内容过渡 */
.layui-body {
    transition: left 0.3s;
}

.layui-side.layui-nav-hide ~ .layui-body {
    left: 0;
}

.layui-nav-tree .layui-nav-item a {
    height: 50px;
    line-height: 50px;
}

.layui-nav-tree .layui-nav-bar {
    width: 3px;
}

/* 主体内容 */
.layui-body {
    left: 200px;
    top: 60px;
    bottom: 42px;
    overflow: hidden;
}

/* 标签页 */
.layui-tab {
    margin: 0;
}

.layui-tab-title {
    height: 40px;
    background: #f2f2f2;
    border-bottom: 1px solid #e6e6e6;
}

.layui-tab-title li {
    height: 40px;
    line-height: 40px;
}

.layui-tab-title .layui-this {
    background: #fff;
    color: #667eea;
}

.layui-tab-title .layui-this::after {
    border: none;
    border-bottom: 2px solid #667eea;
}

.layui-tab-brief > .layui-tab-title .layui-this {
    color: #667eea;
}

.layui-tab-content {
    height: calc(100vh - 60px - 40px - 42px);
    padding: 0;
}

.layui-tab-item {
    height: 100%;
}

.main-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* 底部 */
.layui-footer {
    height: 42px;
    line-height: 42px;
    text-align: center;
    background: #f2f2f2;
    color: #999;
    font-size: 12px;
}

/* 通用表格样式 */
.table-toolbar {
    margin-bottom: 10px;
}

.table-search {
    float: right;
}

.table-search .layui-input {
    height: 32px;
    line-height: 32px;
}

/* 表单样式优化 */
.layui-form-item .layui-form-label {
    width: 100px;
}

.layui-form-item .layui-input-inline {
    width: 200px;
}

/* 弹窗优化 */
.layui-layer-title {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
}

/* 图标菜单 */
.layui-icon {
    margin-right: 5px;
}

/* 加载动画 */
.loading-mask {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.empty-state i {
    font-size: 60px;
    margin-bottom: 20px;
    color: #ddd;
}

/* 响应式 */
@media screen and (max-width: 768px) {
    .layui-side {
        display: none;
    }
    
    .layui-body {
        left: 0;
    }
}
