/* ====== 后台外壳移动端适配（抽屉式侧栏） ======
   仅在 <=768 生效，桌面端(>768)完全不受影响。
   需在 xadmin.css 之后引入，以覆盖其 60px 图标条模式。 */
@media screen and (max-width: 768px) {
    /* 顶部栏 logo 收窄，给汉堡和用户区让位 */
    .container .logo a {
        max-width: 38vw;
        overflow: hidden;
        white-space: nowrap;
        text-overflow: ellipsis;
    }

    /* 侧栏改为抽屉：默认滑出屏幕外 */
    .left-nav {
        position: fixed !important;
        top: 45px;
        bottom: 0;
        left: 0;
        width: 220px !important;
        max-width: 80vw;
        transform: translateX(-100%);
        transition: transform 0.25s ease;
        z-index: 999;
        will-change: transform;
    }
    .left-nav.nav-drawer-open {
        transform: translateX(0);
        box-shadow: 4px 0 16px rgba(0, 0, 0, 0.15);
    }
    /* 抽屉里显示文字与箭头 */
    .left-nav cite,
    .left-nav .nav_right {
        display: inline-block !important;
    }
    /* 覆盖 xadmin.css 第 437 行的 18px */
    .left-nav #nav li a i {
        font-size: 14px;
    }

    /* 内容区占满宽度，覆盖 xadmin.css 的 left:60px */
    .page-content {
        left: 0 !important;
    }

    /* 遮罩 */
    .nav-backdrop {
        position: fixed;
        top: 45px;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.35);
        z-index: 998;
        display: none;
    }
    .nav-backdrop.show {
        display: block;
    }

    /* 标签页横向滚动、隐藏滚动条 */
    .page-content .layui-tab-title {
        overflow-x: auto;
        overflow-y: hidden;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }
    .page-content .layui-tab-title::-webkit-scrollbar {
        display: none;
    }
    .page-content .layui-tab-title li {
        display: inline-block;
        float: none;
    }
}
