/* ============================================================
   后台外壳样式：侧边栏 + 顶栏 + 内容区
   全部基于 Element Plus 的 el-container / el-aside / el-menu /
   el-header / el-main / el-drawer，主色 #2563eb，无紫色。
   桌面端：侧栏可折叠（224px ↔ 64px）
   手机端（<992px）：侧栏隐藏，改由 el-drawer 抽屉弹出
   ============================================================ */

[v-cloak] { display: none; }

.app-shell {
    min-height: 100vh;
    background:
        radial-gradient(900px 420px at 88% -8%, rgba(37, 99, 235, .06), transparent 60%),
        radial-gradient(700px 380px at 4% 0%, rgba(14, 165, 233, .05), transparent 55%),
        var(--wb-bg, #f5f7fa);
}

/* ───────────── 侧边栏 ───────────── */
.app-aside {
    background: #fff;
    border-right: 1px solid var(--wb-border, rgba(15, 23, 42, .08));
    display: flex;
    flex-direction: column;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
    transition: width .24s cubic-bezier(.22, .61, .36, 1);
    flex-shrink: 0;
    box-shadow: 1px 0 0 rgba(15, 23, 42, .02);
    z-index: 95;
}

.brand {
    height: 56px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid var(--wb-border, rgba(15, 23, 42, .08));
    flex-shrink: 0;
    overflow: hidden;
    white-space: nowrap;
}

.brand-logo {
    width: 32px;
    height: 32px;
    border-radius: 10px;
    background: linear-gradient(135deg, #2563eb, #38bdf8);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .32);
    transition: transform .3s cubic-bezier(.34, 1.56, .64, 1);
}

.brand:hover .brand-logo { transform: rotate(-8deg) scale(1.06); }

.brand-name {
    font-size: 15px;
    font-weight: 600;
    color: #0f172a;
    letter-spacing: .2px;
    transition: opacity .18s ease;
}

.app-menu {
    border-right: none !important;
    padding: 10px 8px;
    flex: 1;
    overflow-x: hidden;
    overflow-y: auto;
    background: transparent;
}

.app-menu .el-menu-item {
    position: relative;
    height: 44px;
    line-height: 44px;
    border-radius: 10px;
    margin-bottom: 4px;
    font-size: 14px;
    color: #475569;
    overflow: hidden;
    transition: background-color .22s ease, color .22s ease, transform .22s ease;
}

/* 左侧高亮条（激活态） */
.app-menu .el-menu-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 3px;
    height: 0;
    border-radius: 0 3px 3px 0;
    background: var(--wb-primary, #2563eb);
    transform: translateY(-50%);
    transition: height .26s cubic-bezier(.22, .61, .36, 1);
}

.app-menu .el-menu-item:hover {
    background: #f4f7fe;
    color: #1d4ed8;
    transform: translateX(2px);
}

.app-menu .el-menu-item.is-active {
    background: linear-gradient(90deg, #eff6ff, #f7faff);
    color: var(--wb-primary, #2563eb);
    font-weight: 500;
}

.app-menu .el-menu-item.is-active::before { height: 20px; }

.app-menu .el-menu-item.is-active .el-icon { color: var(--wb-primary, #2563eb); }

.app-menu .el-icon { transition: transform .22s ease; }
.app-menu .el-menu-item:hover .el-icon { transform: scale(1.08); }

.menu-sep {
    height: 1px;
    background: var(--wb-border, rgba(15, 23, 42, .08));
    margin: 10px 8px;
}

/* 折叠态：菜单项居中，隐藏文字与高亮条 */
.el-menu--collapse.app-menu { padding: 10px 7px; }
.el-menu--collapse .el-menu-item { padding: 0 !important; justify-content: center; }
.el-menu--collapse .el-menu-item .el-icon { margin: 0; }
.el-menu--collapse .el-menu-item::before { display: none; }
.el-menu--collapse .el-menu-item:hover { transform: none; }

/* ───────────── 右侧主体 ───────────── */
.app-body {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.app-head {
    position: sticky;
    top: 0;
    z-index: 90;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 0 16px !important;
    background: rgba(255, 255, 255, .78);
    backdrop-filter: saturate(180%) blur(12px);
    -webkit-backdrop-filter: saturate(180%) blur(12px);
    border-bottom: 1px solid var(--wb-border, rgba(15, 23, 42, .08));
}

.head-left,
.head-right { display: flex; align-items: center; gap: 10px; min-width: 0; }

.head-left { flex: 1; }

.head-crumb { font-size: 13px; }
.head-crumb .el-breadcrumb__inner { color: #64748b !important; font-weight: 400 !important; }
.head-crumb .el-breadcrumb__item:last-child .el-breadcrumb__inner { color: #0f172a !important; font-weight: 500 !important; }

.hamburger { color: #475569; }
.hamburger .el-icon { transition: transform .28s cubic-bezier(.22, .61, .36, 1); }
.hamburger:hover .el-icon { transform: scale(1.12); color: var(--wb-primary, #2563eb); }

.app-main {
    padding: 16px !important;
    flex: 1;
    min-width: 0;
    overflow-x: hidden;
}

/* ───────────── 移动端抽屉 ───────────── */
.nav-drawer .el-drawer__body { padding: 0 !important; }
.nav-drawer .brand { height: 56px; }
.nav-drawer .app-menu { padding: 10px 8px; }
.nav-drawer .el-menu-item {
    height: 46px;
    line-height: 46px;
    border-radius: 10px;
    margin-bottom: 4px;
}
.nav-drawer .el-menu-item.is-active {
    background: #eff6ff;
    color: var(--wb-primary, #2563eb);
    font-weight: 500;
}
.nav-drawer .menu-sep { height: 1px; background: rgba(15, 23, 42, .08); margin: 10px 8px; }

/* ───────────── 响应式 ───────────── */
@media (max-width: 991px) {
    .app-aside { display: none !important; }
    .app-head { padding: 0 10px !important; }
    .app-main { padding: 10px !important; }
    .head-crumb .el-breadcrumb__item:first-child { display: none; }
    .hide-sm { display: none !important; }
}

@media (max-width: 480px) {
    .brand-name { font-size: 14px; }
    .app-main { padding: 8px !important; }
    .head-right { gap: 4px; }
}
