/* CSS Document */

/* =========================================
   主页面样式
   说明：
   1. 尽量保持结构简单，方便后续你自己改
   2. 优先兼顾 PC 和手机端
   3. 左侧菜单 + 顶部栏 + iframe 内容区
========================================= */

/* 基础重置 */
html,
body {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    font-family: "Helvetica Neue", Helvetica, Arial, "Microsoft YaHei", sans-serif;
}

* {
    box-sizing: border-box;
}

.bq-body {
    min-width: 320px;
}

/* 外层整体布局 */
.bq-layout {
    display: flex;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* 左侧菜单栏 */
.bq-side {
    width: 240px;
    min-width: 240px;
    height: 100%;
    background: #20222A;
    color: #fff;
    overflow-y: auto;
    transition: all 0.3s;
    position: relative;
    z-index: 1001;
}

.bq-logo {
    padding: 18px 16px 14px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.bq-logo-title {
    font-size: 20px;
    font-weight: bold;
    line-height: 1.4;
}

.bq-logo-sub {
    font-size: 12px;
    opacity: 0.75;
    margin-top: 4px;
}

.bq-nav {
    width: 100%;
    background: #20222A;
    border-radius: 0;
}

.bq-nav.layui-nav-tree .layui-nav-bar {
    background-color: #1E9FFF;
}

/* 右侧主区域 */
.bq-main-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

/* 顶部栏 */
.bq-header {
    height: 64px;
    background: #fff;
    border-bottom: 1px solid #ebeef5;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    flex-shrink: 0;
}

.bq-header-left {
    display: flex;
    align-items: center;
    min-width: 0;
}

.bq-menu-btn {
    margin-right: 12px;
}

.bq-page-info {
    min-width: 0;
}

.bq-page-main-title {
    font-size: 20px;
    color: #303133;
    font-weight: 600;
    line-height: 1.3;
}

.bq-page-sub-title {
    font-size: 13px;
    color: #909399;
    margin-top: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* 用户信息 */
.bq-header-right {
    margin-left: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.bq-user-box {
    text-align: right;
}

.bq-user-name {
    font-size: 14px;
    color: #303133;
    font-weight: 600;
    line-height: 1.4;
}

.bq-user-role {
    font-size: 12px;
    color: #909399;
    margin-top: 2px;
}

.bq-header-btns {
    display: flex;
    align-items: center;
}

/* 内容区 */
.bq-content {
    flex: 1;
    min-height: 0;
    padding: 12px;
    background: #f5f7fa;
    overflow: hidden;
}

.bq-iframe {
    width: 100%;
    height: 100%;
    min-height: 600px;
    border: none;
    background: #fff;
    border-radius: 8px;
    display: block;
    overflow: auto;
}

/* 手机端遮罩 */
.bq-side-mask {
    display: none;
    position: fixed;
    z-index: 1000;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.45);
}

/* PC 折叠状态 */
.bq-side-collapsed .bq-side {
    width: 0;
    min-width: 0;
    overflow: hidden;
}

/* 占位页面公共样式可复用 */
.page-placeholder {
    padding: 20px;
}

.page-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #ebeef5;
}

.page-title {
    font-size: 22px;
    font-weight: bold;
    color: #303133;
    margin-bottom: 10px;
}

.page-desc {
    color: #606266;
    line-height: 1.8;
    font-size: 14px;
}

.page-tag-wrap {
    margin-top: 16px;
}

.page-tag-wrap .layui-btn {
    margin-bottom: 10px;
}

/* 手机端 */
@media screen and (max-width: 768px) {
    .bq-side {
        position: fixed;
        top: 0;
        left: -240px;
        bottom: 0;
    }

    .bq-mobile-open .bq-side {
        left: 0;
    }

    .bq-mobile-open .bq-side-mask {
        display: block;
    }

    .bq-header {
        padding: 0 12px;
        height: 60px;
    }

    .bq-page-main-title {
        font-size: 16px;
    }

    .bq-page-sub-title {
        font-size: 12px;
        max-width: 160px;
    }

    .bq-user-name {
        font-size: 13px;
        max-width: 120px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .bq-user-role {
        font-size: 11px;
    }

    .bq-header-right {
        gap: 8px;
    }

    .bq-header-btns .layui-btn {
        padding: 0 10px;
    }

    .bq-content {
        padding: 8px;
        overflow: hidden;
    }

    .bq-iframe {
        width: 100%;
        height: 100%;
        min-height: 500px;
        border: none;
        overflow: auto;
    }
}