/* ============================================================
   布局层：登录页骨架 / 侧栏面板 / 响应式
   ============================================================ */

/* ---------------- 登录 / 注册 ---------------- */
.auth-body {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 18px;
    min-height: 100vh;
}
.auth-wrap {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 432px;
    animation: fadeUp .6s var(--ease) both;
}
.auth-wrap.wide { max-width: 760px; }

.brand-block {
    display: flex; align-items: center; gap: 12px;
    margin-bottom: 20px; padding-left: 4px;
}
.brand-mark {
    width: 46px; height: 46px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(140deg, rgba(124, 77, 255, .95), rgba(95, 225, 255, .55));
    color: #fff;
    box-shadow: 0 10px 26px rgba(109, 63, 224, .42), inset 0 1px 0 rgba(255, 255, 255, .35);
    flex: none;
}
.brand-mark.sm { width: 38px; height: 38px; border-radius: 12px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; }
.brand-text strong { font-size: 16px; letter-spacing: .02em; }
.brand-text span { font-size: 9.5px; letter-spacing: .22em; color: var(--text-3); text-transform: uppercase; }

.auth-card { padding: 30px 28px 26px; }
.auth-title { font-size: 22px; margin-bottom: 6px; }
.auth-sub { font-size: 12.8px; color: var(--text-3); margin-bottom: 20px; line-height: 1.6; }
.auth-foot { text-align: center; font-size: 11.5px; color: var(--text-3); margin-top: 18px; }

.role-hint {
    display: flex; align-items: center; gap: 9px;
    padding: 10px 13px; margin-bottom: 18px;
    border-radius: 12px;
    background: linear-gradient(120deg, rgba(139, 92, 246, .13), rgba(95, 225, 255, .06));
    border: 1px solid rgba(139, 92, 246, .22);
    font-size: 12px; color: #cfc2ff;
}
.role-hint .ico { flex: none; color: #b49aff; }

.auth-links { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; font-size: 12.5px; color: var(--text-3); }
.auth-links a { font-weight: 600; }

.login-extra { display: flex; align-items: center; justify-content: space-between; margin: 2px 0 18px; }

/* ---------------- 面板 ---------------- */
.app-shell { position: relative; z-index: 1; display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-w);
    flex: none;
    position: fixed;
    inset: 0 auto 0 0;
    display: flex;
    flex-direction: column;
    padding: 20px 12px 16px;
    background: linear-gradient(180deg, rgba(20, 15, 38, .82), rgba(10, 7, 20, .9));
    -webkit-backdrop-filter: blur(20px) saturate(140%);
    backdrop-filter: blur(20px) saturate(140%);
    border-right: 1px solid var(--line);
    z-index: 60;
    transition: transform var(--mid) var(--ease);
}
.side-brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 18px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.side-brand .brand-text strong { font-size: 14px; }
.side-brand .brand-text span { font-size: 9px; }

.side-nav { display: flex; flex-direction: column; gap: 3px; overflow-y: auto; flex: 1; padding-right: 2px; }
.side-nav::-webkit-scrollbar { width: 4px; }
.side-nav::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, .35); border: 0; }

.nav-item {
    display: flex; align-items: center; gap: 11px;
    padding: 10px 12px;
    border-radius: 11px;
    color: var(--text-3);
    font-size: 13px;
    font-weight: 500;
    position: relative;
    transition: all var(--fast) var(--ease);
    border: 1px solid transparent;
}
.nav-item .ico { flex: none; opacity: .85; }
.nav-item:hover { color: var(--text); background: rgba(255, 255, 255, .055); }
.nav-item.active {
    color: #fff;
    background: linear-gradient(100deg, rgba(124, 77, 255, .32), rgba(95, 225, 255, .07));
    border-color: rgba(139, 92, 246, .3);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 8px 20px rgba(109, 63, 224, .16);
}
.nav-item.active .ico { color: #c3aeff; opacity: 1; }
.nav-item.active::before {
    content: ""; position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
    width: 3px; height: 18px; border-radius: 0 3px 3px 0;
    background: linear-gradient(180deg, #a98bff, #5fe1ff);
    box-shadow: 0 0 12px rgba(139, 92, 246, .7);
}
.nav-dot {
    margin-left: auto; font-style: normal; font-size: 10px; font-weight: 700;
    background: linear-gradient(135deg, #ff5f86, #ff8ba7); color: #fff;
    padding: 1px 6px; border-radius: 99px; line-height: 1.6;
}
.side-foot { border-top: 1px solid var(--line); padding-top: 10px; margin-top: 10px; }

.main { flex: 1; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; }

.topbar {
    position: sticky; top: 0; z-index: 40;
    display: flex; align-items: center; gap: 14px;
    padding: 14px 26px;
    background: rgba(11, 8, 23, .66);
    -webkit-backdrop-filter: blur(18px) saturate(150%);
    backdrop-filter: blur(18px) saturate(150%);
    border-bottom: 1px solid var(--line);
}
.topbar-title { min-width: 0; }
.topbar-title h2 { font-size: 17px; }
.crumbs { font-size: 11px; color: var(--text-3); letter-spacing: .03em; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 12px; }
.menu-btn { display: none; }

.user-chip {
    display: flex; align-items: center; gap: 9px;
    padding: 5px 10px 5px 5px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, .045);
}
.user-chip img { width: 30px; height: 30px; border-radius: 9px; object-fit: cover; background: rgba(255, 255, 255, .06); }
.uc-text { display: flex; flex-direction: column; line-height: 1.25; }
.uc-text strong { font-size: 12px; font-weight: 600; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uc-text span { font-size: 10px; color: var(--text-3); }
.dot-badge { position: absolute; top: 7px; right: 7px; width: 7px; height: 7px; border-radius: 50%; background: #ff6b8a; box-shadow: 0 0 8px #ff6b8a; }

.page-body { padding: 22px 26px 10px; flex: 1; animation: fadeUp .4s var(--ease) both; }
.app-foot {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 26px 22px; font-size: 11.5px; color: var(--text-3); flex-wrap: wrap;
}
.foot-links a { color: var(--text-3); }
.foot-links a:hover { color: var(--text-2); }

.side-mask {
    position: fixed; inset: 0; z-index: 55;
    background: rgba(4, 2, 10, .55);
    -webkit-backdrop-filter: blur(3px);
    backdrop-filter: blur(3px);
    opacity: 0; pointer-events: none; transition: opacity var(--mid) var(--ease);
}

/* 页面头部 */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; letter-spacing: -.02em; }
.page-head .lead { font-size: 12.5px; color: var(--text-3); margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }

/* 工具栏 */
.toolbar {
    display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
    padding: 12px 14px; margin-bottom: 16px;
    border-radius: 14px; border: 1px solid var(--line);
    background: rgba(255, 255, 255, .035);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}
.toolbar .input, .toolbar .select { height: 36px; font-size: 12.5px; }
.toolbar .field-inline { display: flex; align-items: center; gap: 7px; }
.toolbar .field-inline > span { font-size: 11.5px; color: var(--text-3); white-space: nowrap; }

@media (max-width: 980px) {
    .sidebar { transform: translateX(-102%); width: 260px; }
    body.side-open .sidebar { transform: translateX(0); box-shadow: 20px 0 60px rgba(0, 0, 0, .5); }
    body.side-open .side-mask { opacity: 1; pointer-events: auto; }
    .main { margin-left: 0; }
    .menu-btn { display: inline-flex; }
    .topbar { padding: 12px 16px; }
    .page-body { padding: 16px 16px 8px; }
    .app-foot { padding: 14px 16px 20px; }
    .uc-text { display: none; }
}
@media (max-width: 560px) {
    .auth-card { padding: 24px 20px 22px; }
    .page-head h1 { font-size: 19px; }
    .toolbar { padding: 10px; }
    .topbar-title .crumbs { display: none; }
}
