/* ==========================================================================
   圆梦鸿途 · Admin Console  ·  Shell (sidebar / topbar / page tabs)
   Owned by shell workstream. Loaded after base.css & backend.css.
   Layout: 232px sidebar | 56px topbar | 36px tabs bar | iframe content
   ========================================================================== */

/* ---------- reset frame ---------- */
html, body { height: 100%; }
body.console-shell {
    margin: 0;
    overflow: hidden;
    background: var(--bg);
    font-family: var(--sans);
    font-size: 13px;
    color: var(--ink);
}
body.console-shell * { -webkit-tap-highlight-color: transparent; }

#app svg.i {
    width: 16px;
    height: 16px;
    flex: none;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.7;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* ---------- app grid ---------- */
#app.wrapper {
    display: flex;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    overflow: hidden;
    background: var(--bg);
}
#app .main {
    flex: 1 1 auto;
    min-width: 0;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: var(--bg);
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
#app .main-sidebar {
    position: relative;
    top: auto;
    left: auto;
    flex: 0 0 232px;
    width: 232px;
    height: 100vh;
    height: 100dvh;
    min-height: 0;
    padding-top: 0;
    background: var(--panel);
    border-right: 1px solid var(--line);
    z-index: 30;
    transition: transform .2s ease;
}
#app .sb-inner {
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 0;
}

/* brand */
#app .brand {
    height: 56px;
    flex: 0 0 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 18px;
    border-bottom: 1px solid var(--line-2);
    text-decoration: none;
    color: var(--ink);
}
#app .brand:hover { text-decoration: none; color: var(--ink); }
#app .brand .logo {
    width: 28px;
    height: 28px;
    flex: none;
    border-radius: 6px;
    background: var(--pri);
    color: #fff;
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
#app .brand .brand-txt { min-width: 0; }
#app .brand b {
    display: block;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: .04em;
    color: var(--ink);
    white-space: nowrap;
}
#app .brand small {
    display: block;
    font-size: 11px;
    font-weight: 400;
    line-height: 1.3;
    letter-spacing: 0;
    color: var(--ink-3);
}

/* 侧栏品牌：公司 Logo 图片 */
#app .brand { justify-content: center; gap: 0; padding: 0 14px; }
#app .brand .brand-logo {
    display: block;
    height: 34px;
    width: auto;
    max-width: 100%;
}
#app .brand .brand-logo-dark { display: none; }
body.darktheme #app .brand .brand-logo-light { display: none; }
body.darktheme #app .brand .brand-logo-dark { display: block; }

/* menu search */
#app .sb-search {
    margin: 14px 14px 6px;
    position: relative;
    flex: none;
    padding: 0;
    background: transparent;
}
#app .sb-search .input-group {
    position: relative;
    display: flex;
    align-items: center;
    width: 100%;
    height: 32px;
}
#app .sb-search .form-control {
    float: none;
    flex: 1 1 auto;
    width: 100%;
    height: 32px;
    line-height: 30px;
    border: 1px solid var(--line);
    border-radius: var(--r);
    background: var(--bg);
    padding: 0 40px 0 32px;
    font-size: 12px;
    color: var(--ink);
    outline: none;
    box-shadow: none;
}
#app .sb-search .form-control:focus {
    border-color: var(--pri);
    background: #fff;
    box-shadow: 0 0 0 3px var(--pri-2);
}
#app .sb-search .form-control::placeholder { color: var(--ink-3); }
#app .sb-search .sb-ico {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 14px;
    color: var(--ink-3);
    pointer-events: none;
    z-index: 3;
}
#app .sb-search kbd {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    font: 11px/16px var(--mono);
    color: var(--ink-3);
    border: 1px solid var(--line);
    border-radius: 4px;
    padding: 0 4px;
    background: #fff;
    box-shadow: none;
    z-index: 3;
}
#app .menuresult {
    position: absolute;
    left: 0;
    right: 0;
    top: 38px;
    max-height: 320px;
    overflow-y: auto;
    margin: 0;
    padding: 4px;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(20, 26, 36, .12);
    z-index: 90;
}
#app .menuresult a {
    display: block;
    padding: 7px 10px;
    border-radius: 4px;
    color: var(--ink-2);
    font-size: 12.5px;
    text-decoration: none;
    border: 0;
}
#app .menuresult a:hover,
#app .menuresult a.active { background: var(--pri-2); color: var(--pri-ink); text-decoration: none; }

/* nav / menu list */
#app .sb-nav {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 8px 10px 12px;
}
#app .nav-cap {
    font-size: 11px;
    color: var(--ink-3);
    padding: 12px 10px 6px;
    letter-spacing: .06em;
    font-weight: 400;
}
#app ul.sidebar-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow: visible;
    white-space: normal;
}
#app .sidebar-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}
#app .sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 36px;
    padding: 0 10px;
    border-radius: var(--r);
    color: var(--ink-2);
    text-decoration: none;
    font-weight: 500;
    font-size: 13px;
    line-height: 36px;
    position: relative;
    white-space: nowrap;
    border: 0;
    background: transparent;
    transition: background .12s ease, color .12s ease;
}
#app .sidebar-menu a:hover,
#app .sidebar-menu a:focus {
    background: var(--bg);
    color: var(--ink);
    text-decoration: none;
}
#app .sidebar-menu a > svg.i,
#app .sidebar-menu a > i.fa {
    width: 16px;
    min-width: 16px;
    height: 16px;
    font-size: 15px;
    flex: none;
    text-align: center;
    color: inherit;
    line-height: 16px;
}
#app .sidebar-menu a > span { overflow: hidden; text-overflow: ellipsis; }

/* active leaf (top level or sub) */
#app .sidebar-menu > li.active:not(.treeview) > a,
#app .sidebar-menu .treeview-menu > li.active > a {
    background: var(--pri-2);
    color: var(--pri-ink);
    font-weight: 400;
}
#app .sidebar-menu > li.active:not(.treeview) > a::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--pri);
}
#app .sidebar-menu .treeview-menu > li.active > a::before {
    content: "";
    position: absolute;
    left: -10px;
    top: 8px;
    bottom: 8px;
    width: 3px;
    border-radius: 0 3px 3px 0;
    background: var(--pri);
}
#app .sidebar-menu > li.active:not(.treeview) > a:hover { background: var(--pri-2); color: var(--pri-ink); }

/* groups / sub menus */
#app .sidebar-menu .treeview-menu {
    display: none;
    list-style: none;
    margin: 0;
    padding: 2px 0 6px 26px;
}
#app .sidebar-menu li.treeview.treeview-open > .treeview-menu,
#app .sidebar-menu li.treeview.menu-open > .treeview-menu {
    display: block;
    animation: sb-sub-in .16s ease;
}
@keyframes sb-sub-in {
    from { opacity: 0; transform: translateY(-3px); }
    to { opacity: 1; transform: translateY(0); }
}
#app .sidebar-menu .treeview-menu > li {
    position: relative;
    margin: 0;
    padding: 0;
}
#app .sidebar-menu .treeview-menu > li > a {
    height: 32px;
    line-height: 32px;
    font-weight: 400;
    font-size: 12.5px;
    padding: 0 10px;
    gap: 0;
}
/* 设计稿二级菜单为纯文字，隐藏后端生成的图标 */
#app .sidebar-menu .treeview-menu > li > a > i.fa,
#app .sidebar-menu .treeview-menu > li > a > svg.i { display: none; }
#app .sidebar-menu .treeview-menu > li > a::after {
    content: "";
    position: absolute;
    left: -8px;
    top: 0;
    bottom: 0;
    border-left: 1px solid var(--line);
    pointer-events: none;
}
#app .sidebar-menu .treeview-menu > li.active > a::after { border-left-color: transparent; }

/* right side of a menu row: badges + chevron */
#app .sidebar-menu .pull-right-container {
    position: static;
    top: auto;
    right: auto;
    margin-top: 0;
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    float: none !important;
    padding: 0;
    min-width: 0;
}
#app .sidebar-menu .pull-right-container .label,
#app .sidebar-menu .pull-right-container .badge {
    float: none !important;
    display: inline-block;
    margin: 0 !important;
    font-family: var(--mono);
    font-size: 10px;
    font-weight: 600;
    line-height: 15px;
    padding: 1px 6px;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #fff;
    background: var(--pri);
}
#app .sidebar-menu .pull-right-container .label.bg-blue,
#app .sidebar-menu .pull-right-container .badge.bg-blue { background: var(--pri) !important; color: #fff !important; }
#app .sidebar-menu .pull-right-container .label.bg-red,
#app .sidebar-menu .pull-right-container .badge.bg-red { background: var(--err-bg) !important; color: var(--err) !important; }
#app .sidebar-menu .pull-right-container .label.bg-green,
#app .sidebar-menu .pull-right-container .label.bg-yellow,
#app .sidebar-menu .pull-right-container .label.bg-teal,
#app .sidebar-menu .pull-right-container .label.bg-orange,
#app .sidebar-menu .pull-right-container .label.bg-purple,
#app .sidebar-menu .pull-right-container .badge.bg-green,
#app .sidebar-menu .pull-right-container .badge.bg-yellow,
#app .sidebar-menu .pull-right-container .badge.bg-teal,
#app .sidebar-menu .pull-right-container .badge.bg-orange,
#app .sidebar-menu .pull-right-container .badge.bg-purple {
    background: var(--pri-2) !important;
    color: var(--pri-ink) !important;
}
#app .sidebar-menu .pull-right-container > .fa-angle-left,
#app .sidebar-menu .pull-right-container > .fa-angle-down {
    width: 14px;
    height: 14px;
    font-size: 14px;
    line-height: 14px;
    margin: 0;
    color: var(--ink-3);
    text-align: center;
    transition: transform .15s ease;
    transform: rotate(180deg);
}
#app .sidebar-menu li.treeview.treeview-open > a .pull-right-container > .fa-angle-left,
#app .sidebar-menu li.treeview.menu-open > a .pull-right-container > .fa-angle-left {
    transform: rotate(270deg);
}
#app .sidebar-menu .treeview-menu .fa-angle-left,
#app .sidebar-menu .treeview-menu .fa-angle-down { transform: none !important; }

/* bottom: version + theme toggle */
#app .sb-foot {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 16px;
    border-top: 1px solid var(--line-2);
    background: var(--panel);
}
#app .sb-foot .sb-ver {
    font-family: var(--mono);
    font-size: 11.5px;
    line-height: 1;
    letter-spacing: .02em;
    color: var(--ink-3);
}
#app .sb-foot .theme-toggle {
    --size: 18px;
    --icon-fill: var(--ink-3);
    --icon-fill-hover: var(--ink);
    flex: none;
    aspect-ratio: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
#app .sb-foot .theme-toggle > svg { display: block; }
/* 图标切换不要过渡动画，直接切换状态 */
#app .sb-foot .theme-toggle,
#app .sb-foot .theme-toggle * {
    animation: none !important;
    transition: none !important;
}

/* ==========================================================================
   Topbar
   ========================================================================== */
#app .main-header {
    position: relative;
    top: auto;
    right: auto;
    left: auto;
    flex: 0 0 56px;
    height: 56px;
    max-height: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 20px;
    background: var(--panel);
    border-bottom: 1px solid var(--line);
    z-index: 20;
}
#app .main-header .tb-left {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1 1 auto;
}
#app .main-header .icon-btn {
    height: 32px;
    min-width: 32px;
    padding: 0 8px;
    border-radius: var(--r);
    border: 0;
    background: transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--ink-2);
    font-size: 13px;
    font-weight: 400;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    box-shadow: none;
    line-height: 1;
}
#app .main-header .icon-btn:hover,
#app .main-header .icon-btn:focus,
#app .main-header .icon-btn.open {
    background: var(--bg);
    color: var(--ink);
    text-decoration: none;
    box-shadow: none;
}
#app .main-header .icon-btn svg.i { width: 16px; height: 16px; }
#app .main-header .tb-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 6px;
    flex: none;
}
#app .main-header .tb-div {
    width: 1px;
    height: 20px;
    background: var(--line);
    margin: 0 6px;
    flex: none;
}
#app .main-header .sidebar-toggle {
    display: none;
    float: none;
    padding: 0 8px;
    font-family: var(--sans);
    color: var(--ink-2);
    background: transparent;
    border: 0;
}
#app .main-header .sidebar-toggle:before { content: none; }

/* breadcrumb */
#app .main-header .crumb {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 4px;
    color: var(--ink-3);
    font-size: 12.5px;
    min-width: 0;
    overflow: hidden;
    white-space: nowrap;
}
#app .main-header .crumb > * { flex: none; }
#app .main-header .crumb span { color: var(--ink-3); }
#app .main-header .crumb b {
    color: var(--ink);
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}
#app .main-header .crumb svg.i {
    width: 12px;
    height: 12px;
    color: #C9D1DD;
}

/* dropdown containers in topbar */
#app .main-header .dropdown { position: relative; }
#app .main-header .dropdown-menu {
    top: calc(100% + 8px);
    left: auto;
    right: 0;
    min-width: 180px;
    margin: 0;
    float: none;
}
#app .main-header .dropdown-menu > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 10px;
}
#app .main-header .dropdown-menu > li > a svg.i { width: 15px; height: 15px; color: var(--ink-3); }
#app .main-header .dropdown-menu > li > a:hover svg.i { color: var(--pri-ink); }
#app .main-header .dropdown-menu.wipecache { min-width: 210px; }
#app .main-header .dropdown-menu.wipecache .divider { margin: 4px 2px; }

/* user dropdown trigger */
#app .main-header .tb-user {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 36px;
    padding: 0 6px 0 4px;
    border-radius: var(--r);
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
}
#app .main-header .tb-user:hover,
#app .main-header .tb-user:focus,
#app .main-header .tb-user.open { background: var(--bg); color: var(--ink); text-decoration: none; }
#app .main-header .tb-user .av { width: 26px; height: 26px; font-size: 11px; }
#app .main-header .tb-user .name {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink);
    max-width: 100px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
#app .main-header .tb-user .chev { width: 14px; height: 14px; color: var(--ink-3); }
#app .main-header .user-dd-menu { min-width: 236px; padding: 4px; overflow: hidden; }
#app .main-header .user-dd-menu .user-dd-head {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 10px;
    margin: -4px -4px 4px;
    background: #FAFBFC;
    border-bottom: 1px solid var(--line-2);
    border-radius: var(--r) var(--r) 0 0;
}
#app .main-header .user-dd-menu .user-dd-head .av { width: 36px; height: 36px; font-size: 13px; }
#app .main-header .user-dd-menu .user-dd-head b { display: block; font-size: 13px; color: var(--ink); line-height: 1.3; }
#app .main-header .user-dd-menu .user-dd-head small { display: block; font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
#app .main-header .wipe-tip {
    margin-left: auto;
    display: inline-flex;
    align-items: center;
    color: var(--ink-3);
}
#app .main-header .wipe-tip svg.i { width: 13px; height: 13px; }

/* ==========================================================================
   Page tabs bar
   ========================================================================== */
#app .tabs-bar {
    flex: 0 0 36px;
    height: 36px;
    background: var(--panel);
    border: 0;
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: flex-end;
    padding: 0 20px;
    overflow: visible;
    position: relative;
    z-index: 10;
}
#app #firstnav {
    flex: 1 1 auto;
    min-width: 0;
    height: 35px;
    position: relative;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    border: 0;
    box-shadow: none;
    overflow: visible;
}
#app #firstnav ul.nav-addtabs {
    display: flex;
    align-items: flex-end;
    flex: 1 1 auto;
    min-width: 0;
    height: 35px;
    margin: 0;
    padding: 0;
    border: 0;
    overflow: visible;
    white-space: nowrap;
    position: static;
    left: auto;
}
#app .nav-addtabs > li {
    position: relative;
    z-index: 2;
    float: none;
    margin: 0;
    display: flex;
    align-items: flex-end;
    flex: none;
}
#app .nav-addtabs > li.active { z-index: 3; }
#app .nav-addtabs > li + li { margin-left: 2px; }
#app .nav-addtabs > li.tabdrop + li { margin-left: 0; }
#app .nav-addtabs > li > a {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 30px;
    line-height: 28px;
    padding: 0 12px;
    margin: 0;
    border: 1px solid transparent;
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    background: transparent;
    color: var(--ink-3);
    font-size: 12.5px;
    font-weight: 400;
    text-decoration: none;
    white-space: nowrap;
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
    outline: none;
}
#app .nav-addtabs > li > a:hover,
#app .nav-addtabs > li > a:focus {
    background: var(--bg);
    color: var(--ink);
    border-color: transparent;
    text-decoration: none;
}
#app .nav-addtabs > li.active > a,
#app .nav-addtabs > li.active > a:hover,
#app .nav-addtabs > li.active > a:focus {
    height: 30px;
    line-height: 28px;
    padding: 0 12px;
    background: var(--bg);
    border: 1px solid var(--line);
    border-bottom: 0;
    border-radius: 6px 6px 0 0;
    color: var(--ink);
    font-weight: 500;
    position: relative;
    top: 1px;
    text-decoration: none;
    box-shadow: 0 1px 0 0 var(--bg);
}
#app .nav-addtabs > li > a > i.fa,
#app .nav-addtabs > li > a > i.glyphicon,
#app .nav-addtabs > li > a > .pull-right-container { display: none !important; }
#app .nav-addtabs > li.has-x > a { padding-right: 28px; }

/* close icon on tabs */
#app .nav-addtabs > li .close-tab {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    margin: 0;
    padding: 0;
    z-index: 3;
    cursor: pointer;
    opacity: .55;
    font-size: 0;
    color: transparent;
    background: transparent;
}
#app .nav-addtabs > li .close-tab:before { content: none; }
#app .nav-addtabs > li .close-tab::after {
    content: "";
    display: block;
    width: 12px;
    height: 12px;
    background: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238590A2' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E") center/12px 12px no-repeat;
}
#app .nav-addtabs > li .close-tab:hover { opacity: 1; }
#app .nav-addtabs > li .close-tab:hover::after {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23141A24' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M18 6 6 18M6 6l12 12'/%3E%3C/svg%3E");
}
#app .nav-addtabs > li.tabdrop { order: 1; margin-left: 2px; align-items: center; }
#app .nav-addtabs > li.tabdrop.hide { display: none !important; }
#app .nav-addtabs > li.tabdrop > a .glyphicon { display: none; }
#app .nav-addtabs > li.tabdrop > a {
    height: 30px;
    min-width: 30px;
    padding: 0 8px;
    line-height: 28px;
    font-size: 0;
    color: var(--ink-3);
    border: 1px solid transparent;
    background: transparent;
}
#app .nav-addtabs > li.tabdrop > a .glyphicon { font-size: 12px; }
#app .nav-addtabs > li.tabdrop > a:after { content: none; }
#app .nav-addtabs > li.tabdrop.open > a { background: var(--bg); border-color: var(--line); }
#app .nav-addtabs > li.tabdrop.active > a { background: var(--pri-2); color: var(--pri-ink); border-color: transparent; }
#app .nav-addtabs > li.tabdrop > ul.dropdown-menu { top: 32px; left: auto; right: 0; min-width: 160px; }
#app .nav-addtabs > li.tabdrop > ul.dropdown-menu > li { position: relative; }
#app .nav-addtabs > li.tabdrop > ul.dropdown-menu > li > a { display: block; padding: 7px 22px 7px 10px; border-radius: 4px; }
#app .nav-addtabs > li.tabdrop > ul.dropdown-menu > li > a .fa,
#app .nav-addtabs > li.tabdrop > ul.dropdown-menu > li > a .pull-right-container { display: none !important; }
#app .nav-addtabs > li.tabdrop > ul.dropdown-menu > li.active > a { background: var(--pri-2); color: var(--pri-ink); }
#app .nav-addtabs > li.tabdrop > ul.dropdown-menu > li .close-tab { display: none !important; }

/* ==========================================================================
   Content (iframe panes)
   ========================================================================== */
#app .content-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0;
    position: relative;
    background: var(--bg);
    z-index: auto;
    overflow: hidden;
}
#app .content-wrapper > .tab-pane {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    display: none;
    width: 100%;
    height: 100%;
    padding: 0;
    margin: 0;
    border: 0;
    overflow: hidden;
}
#app .content-wrapper > .tab-pane.active { display: block; }
#app .content-wrapper > .tab-pane iframe,
#app .content-wrapper > .tab-pane > iframe {
    display: block;
    width: 100%;
    height: 100%;
    border: 0;
    margin: 0;
    padding: 0;
    background: var(--bg);
}
#app .main-footer { display: none !important; }

/* ==========================================================================
   Mobile drawer + scrim
   ========================================================================== */
#app .shell-scrim {
    display: none;
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    background: rgba(20, 26, 36, .35);
    z-index: 25;
    opacity: 0;
    transition: opacity .2s ease;
}

@media (max-width: 1024px) {
    #app .main-sidebar {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        height: 100vh;
        transform: translateX(-100%);
        box-shadow: 0 10px 40px rgba(20, 26, 36, .15);
        z-index: 40;
    }
    body.sidebar-open #app .main-sidebar { transform: none; }
    #app .shell-scrim { display: block; pointer-events: none; }
    body.sidebar-open #app .shell-scrim { opacity: 1; pointer-events: auto; }
    body.sidebar-open #app .content-wrapper,
    body.sidebar-open #app .main-header,
    body.sidebar-open #app .main-footer { transform: none !important; }
    #app .main-header .sidebar-toggle { display: inline-flex; }
    #app .main-header .icon-btn .lbl { display: none; }
    #app .main-header { padding: 0 14px; }
    #app .tabs-bar { padding: 0 14px; }
}

@media (max-width: 640px) {
    #app .main-header { padding: 0 12px; }
    #app .tabs-bar { padding: 0 12px; }
    #app .main-header .crumb span { display: none; }
    #app .main-header .crumb svg.i { display: none; }
    #app .main-header .tb-user .name { display: none; }
    #app .main-header .tb-div { margin: 0 2px; }
    #app .nav-addtabs > li > a { max-width: 150px; }
}

/* ==========================================================================
   Legacy bits that must stay invisible/neutralized
   ========================================================================== */
#app .content-wrapper > .tab-content { display: none; }
#app .mobilenav { display: none; }
#app .control-sidebar-bg { display: none; }
#app .main-header .logo { display: none; }

/* ==========================================================================
   Single-page mode（单页模式：无标签栏，内容区自适应剩余高度）
   ========================================================================== */
body.console-shell.single-tab #app .tabs-bar { display: none !important; flex: none; }
body.console-shell.single-tab #app .main { height: 100vh; height: 100dvh; }
body.console-shell.single-tab #app .content-wrapper {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;
}
body.console-shell.single-tab #app .content-wrapper > .tab-pane { position: absolute; top: 0; right: 0; bottom: 0; left: 0; }
body.console-shell.single-tab #app .content-wrapper > .tab-pane iframe { display: block; width: 100%; height: 100%; border: 0; }
