/* =========================================================
   sidebar.css — 浅色轻奢 · 商务风侧边栏（统一）
   作用：覆盖各页内联的侧边栏样式，保持 8 页一致。
   用法：在各页 </style> 之后引入：
        <link rel="stylesheet" href="sidebar.css" />
   依赖：页面 :root 中已有的变量（--text-1/2/3、--success、
        --danger、--primary 等），下面均带回退值。
   ========================================================= */

.sidebar{
  width:248px;flex:0 0 248px;
  background:linear-gradient(180deg,#ffffff 0%,#f6f8fc 100%);
  border-right:1px solid rgba(17,32,54,.07);
  box-shadow:inset -1px 0 0 rgba(255,255,255,.7), 8px 0 28px -22px rgba(17,32,54,.35);
  display:flex;flex-direction:column;padding:22px 16px 18px;
  color:var(--text-2,#566173);
}

/* —— 品牌区 —— */
.brand{display:flex;align-items:center;gap:12px;padding:4px 10px 22px}
.brand .logo{
  width:42px;height:42px;border-radius:13px;font-size:19px;font-weight:800;
  background:linear-gradient(135deg,#2563eb 0%,#3b82f6 100%);
  color:#fff;display:flex;align-items:center;justify-content:center;
  box-shadow:0 8px 18px rgba(37,99,235,.30);
}
.brand .name{font-size:16px;font-weight:700;letter-spacing:.3px;color:var(--text-1,#1f2329);line-height:1.2}
.brand .sub{margin-top:3px;font-size:11px;color:var(--text-3,#9aa1ad)}

/* —— 菜单 —— */
.menu{margin-top:10px;display:flex;flex-direction:column;gap:10px}
.menu-item{
  display:flex;align-items:center;gap:13px;padding:14px 14px;border-radius:12px;
  color:#5b6577;cursor:pointer;font-size:14px;font-weight:500;
  transition:background .2s ease,color .2s ease,transform .2s ease,box-shadow .2s ease;
  position:relative;text-decoration:none;
}
.menu-item .ic{width:20px;height:20px;flex:0 0 20px;opacity:.8;transition:opacity .2s ease,color .2s ease}
.menu-item:hover{
  background:#eef2f8;color:var(--text-1,#1f2329);transform:translateX(2px);
}
.menu-item:hover .ic{opacity:1}
.menu-item.active{
  background:linear-gradient(135deg,#eef4ff 0%,#e2ecff 100%);
  color:#1d4ed8;font-weight:600;
  box-shadow:0 8px 18px -10px rgba(37,99,235,.55);
}
.menu-item.active .ic{opacity:1;color:#2563eb}
.menu-item.active::before{
  content:"";position:absolute;left:-16px;top:50%;transform:translateY(-50%);
  width:4px;height:22px;background:#2563eb;border-radius:0 3px 3px 0;
}
.menu-item .badge{
  margin-left:auto;background:var(--danger,#ef4444);color:#fff;font-size:10px;font-weight:600;
  min-width:18px;height:18px;border-radius:9px;display:flex;align-items:center;justify-content:center;padding:0 5px;
}

/* —— 底部用户信息 —— */
.side-user{
  margin-top:auto;display:flex;align-items:center;gap:12px;padding:12px 14px;
  background:linear-gradient(135deg,#f7f9fc 0%,#eef2f8 100%);
  border:1px solid rgba(17,32,54,.06);
  border-radius:14px;
}
.side-user .ava{
  width:42px;height:42px;border-radius:50%;flex:0 0 42px;
  background:linear-gradient(135deg,#475569 0%,#334155 100%);color:#fff;
  display:flex;align-items:center;justify-content:center;font-weight:700;font-size:16px;
}
.side-user .info{line-height:1.45;min-width:0}
.side-user .nm{font-size:14px;font-weight:700;color:var(--text-1,#1f2329)}
.side-user .rl{font-size:12px;color:var(--text-3,#9aa1ad);margin-top:2px}
.side-user .st{display:flex;align-items:center;gap:5px;font-size:11.5px;color:var(--success,#10b981);margin-top:4px}
.side-user .st .dot{width:7px;height:7px;border-radius:50%;background:var(--success,#10b981);box-shadow:0 0 0 3px rgba(16,185,129,.15)}

/* —— 底部语言切换（全局） —— */
.side-lang{margin:10px 14px 16px}
.side-lang .lang-switch{position:relative}
.lang-trigger{display:flex;align-items:center;gap:8px;width:100%;justify-content:space-between;padding:9px 12px;border:1px solid rgba(17,32,54,.12);background:#fff;border-radius:10px;cursor:pointer;font-size:13px;color:var(--text-1,#1f2329);transition:.15s}
.lang-trigger:hover{border-color:var(--primary,#2563eb);color:var(--primary,#2563eb)}
.lang-trigger svg{width:15px;height:15px;flex:0 0 15px}
.lang-menu{position:absolute;top:auto;bottom:calc(100% + 6px);left:0;right:0;width:100%;background:#fff;border:1px solid var(--border,#e6e8ec);border-radius:10px;box-shadow:0 8px 24px rgba(15,23,42,.12);padding:6px;display:none;z-index:50}
.lang-switch.open .lang-menu{display:block}
.lang-opt{padding:8px 12px;border-radius:7px;font-size:13px;color:var(--text-1,#1f2329);cursor:pointer}
.lang-opt:hover{background:var(--bg,#f6f7f9)}
.lang-opt.active{background:var(--primary-soft,#eef2ff);color:var(--primary,#2563eb);font-weight:600}
