/* ============================================================
   PC 管理端布局
   结构：深色侧栏（可折叠 / 分组导航） + 亮色顶栏 + 栅格内容区
   ============================================================ */
body { overflow: hidden; }

.app { display: flex; height: 100vh; background: var(--bg); }

/* ==================== 侧边栏 ==================== */
.side {
  width: 232px; flex: none; display: flex; flex-direction: column;
  background: linear-gradient(178deg, #16213c 0%, #101a30 62%, #0d1526 100%);
  color: #cbd5e1; transition: width .22s cubic-bezier(.4, 0, .2, 1);
  position: relative; z-index: 30;
}
.side::after { content: ''; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(120% 60% at 12% 0%, rgba(59, 130, 246, .16), transparent 60%); }

.side .brand {
  height: 64px; flex: none; display: flex; align-items: center; gap: 11px;
  padding: 0 16px; border-bottom: 1px solid rgba(255, 255, 255, .07); position: relative; z-index: 1;
}
.side .brand .lg {
  width: 34px; height: 34px; border-radius: 10px; flex: none;
  background: linear-gradient(135deg, #3b82f6, #2563eb); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 15px;
  box-shadow: 0 4px 12px rgba(37, 99, 235, .45);
}
.side .brand .bt { flex: 1; min-width: 0; }
.side .brand b { font-size: 14.5px; color: #f1f5f9; font-weight: 600; display: block; letter-spacing: .2px; }
.side .brand span { display: block; font-size: 10.5px; color: #64748b; font-weight: 400; margin-top: 2px; letter-spacing: .6px; }
.side .brand .tog { width: 26px; height: 26px; border-radius: 7px; display: flex; align-items: center; justify-content: center; cursor: pointer; color: #64748b; flex: none; transition: .15s; font-size: 13px; }
.side .brand .tog:hover { background: rgba(255, 255, 255, .08); color: #e2e8f0; }

.nav { flex: 1; padding: 12px 10px 8px; overflow: auto; position: relative; z-index: 1; }
.nav::-webkit-scrollbar { width: 5px; }
.nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .12); border-radius: 4px; }
.nav-group { margin-bottom: 14px; }
.nav-group .gt {
  font-size: 10.5px; color: #50607d; letter-spacing: 1.2px; font-weight: 600;
  padding: 0 10px 7px; text-transform: uppercase; white-space: nowrap;
}
.nav a {
  display: flex; align-items: center; gap: 11px; height: 40px; padding: 0 12px;
  border-radius: 9px; color: #94a3b8; font-size: 13.5px; margin-bottom: 3px;
  cursor: pointer; user-select: none; position: relative; transition: all .16s; white-space: nowrap;
}
.nav a:hover { background: rgba(255, 255, 255, .07); color: #e2e8f0; }
.nav a.on { background: linear-gradient(90deg, rgba(37, 99, 235, .9), rgba(37, 99, 235, .55)); color: #fff; font-weight: 600; box-shadow: 0 2px 10px rgba(37, 99, 235, .3); }
.nav a.on::before { content: ''; position: absolute; left: -10px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: #60a5fa; }
.nav a .ic { opacity: .9; flex: none; }
.nav a .cnt { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: #ef4444; color: #fff; font-size: 11px; display: flex; align-items: center; justify-content: center; font-weight: 600; }

.side .foot { padding: 10px; border-top: 1px solid rgba(255, 255, 255, .07); position: relative; z-index: 1; flex: none; }
.userbox { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .05); }
.userbox .av { width: 34px; height: 34px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; flex: none; box-shadow: 0 2px 8px rgba(0, 0, 0, .3); }
.userbox .uinfo { flex: 1; min-width: 0; }
.userbox .n { font-size: 13px; font-weight: 600; color: #e2e8f0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.userbox .r { font-size: 11px; color: #64748b; margin-top: 1px; }
.userbox .out { font-size: 11.5px; color: #64748b; cursor: pointer; padding: 3px 7px; border-radius: 6px; flex: none; transition: .15s; }
.userbox .out:hover { color: #fca5a5; background: rgba(239, 68, 68, .14); }

/* 折叠态 */
.app.mini .side { width: 68px; }
.app.mini .side .brand .bt, .app.mini .nav-group .gt, .app.mini .nav a span, .app.mini .userbox .uinfo, .app.mini .userbox .out { display: none; }
.app.mini .side .brand { justify-content: center; padding: 0; }
.app.mini .nav a { justify-content: center; padding: 0; }
.app.mini .nav a.on::before { left: -10px; }
.app.mini .userbox { justify-content: center; }

/* ==================== 主区 ==================== */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }

.topbar {
  height: 64px; flex: none; background: rgba(255, 255, 255, .88); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); display: flex; align-items: center; padding: 0 22px; gap: 14px; z-index: 20;
}
.topbar .crumb { font-size: 11.5px; color: var(--txt3); letter-spacing: .3px; margin-bottom: 2px; }
.topbar h2 { font-size: 17px; margin: 0; font-weight: 600; letter-spacing: -.2px; line-height: 1.2; }

.projsel {
  height: 36px; border: 1px solid var(--line); border-radius: 10px; padding: 0 30px 0 12px;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 11px center;
  min-width: 156px; appearance: none; font-size: 13px; color: var(--txt); font-weight: 500; cursor: pointer; transition: .15s;
}
.projsel:hover { border-color: #bfd3f7; box-shadow: 0 0 0 3px rgba(37, 99, 235, .08); }

.bell { position: relative; width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff; display: flex; align-items: center; justify-content: center; cursor: pointer; color: var(--txt2); transition: .15s; flex: none; }
.bell:hover { border-color: var(--brand); color: var(--brand); background: var(--brand-l); }
.bell .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; border-radius: 50%; background: var(--err); border: 2px solid #fff; }

.me { display: flex; align-items: center; gap: 8px; padding: 4px 10px 4px 4px; border-radius: 24px; border: 1px solid var(--line); background: #fff; cursor: pointer; transition: .15s; flex: none; }
.me:hover { border-color: #bfd3f7; box-shadow: var(--shadow); }
.me .av { width: 28px; height: 28px; border-radius: 50%; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.me .nm { font-size: 12.5px; font-weight: 600; }

.content { flex: 1; overflow: auto; padding: 22px 24px 32px; }
.content::-webkit-scrollbar { width: 10px; }

/* ==================== 页面头 / 工具条 ==================== */
.page-hd { display: flex; align-items: flex-end; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-hd h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -.3px; }
.page-hd .sub { font-size: 12.5px; color: var(--txt3); padding-bottom: 2px; }
.page-hd .spacer { flex: 1; }

.toolbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px;
  background: #fff; padding: 12px 14px; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line-2);
}
.toolbar .ipt { height: 36px; width: auto; }
.toolbar select.ipt { min-width: 116px; }
.toolbar .spacer { flex: 1; }
.search { position: relative; }
.search .ipt { padding-left: 34px; width: 210px; }
.search .ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--txt3); width: 15px; height: 15px; }

/* ==================== 统计卡片 ==================== */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-bottom: 18px; }
@media (max-width: 1500px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 1100px) { .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.stat {
  background: #fff; border-radius: var(--radius); padding: 17px 18px; box-shadow: var(--shadow);
  position: relative; overflow: hidden; border: 1px solid var(--line-2);
  transition: transform .18s cubic-bezier(.4, 0, .2, 1), box-shadow .18s;
}
.stat:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
/* 兼容旧结构：左侧竖色条 → 顶部渐变描边 */
.stat .bar { position: absolute; left: 0; right: 0; top: 0; height: 3px; width: auto !important; }
.stat .lb { font-size: 12.5px; color: var(--txt2); display: flex; align-items: center; gap: 6px; font-weight: 500; }
.stat .v { font-size: 26px; font-weight: 700; margin: 9px 0 5px; letter-spacing: -.8px; line-height: 1.1; }
.stat .v small { font-size: 13px; font-weight: 500; color: var(--txt3); margin-left: 3px; letter-spacing: 0; }
.stat .d { font-size: 12px; color: var(--txt3); display: flex; gap: 12px; flex-wrap: wrap; }
.stat .d b { color: var(--txt2); font-weight: 600; }
.stat .ico { position: absolute; right: 14px; top: 14px; width: 38px; height: 38px; border-radius: 11px; display: flex; align-items: center; justify-content: center; opacity: .12; }
.stat .ico svg { width: 20px; height: 20px; }

/* ==================== 面板 ==================== */
.panels { display: grid; gap: 16px; }
.panel { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border: 1px solid var(--line-2); }
.panel h4 { margin: 0 0 16px; font-size: 14.5px; font-weight: 600; display: flex; align-items: center; justify-content: space-between; letter-spacing: -.2px; }
.panel h4 .more { font-size: 12px; color: var(--brand); cursor: pointer; font-weight: 500; padding: 3px 8px; border-radius: 6px; transition: .15s; }
.panel h4 .more:hover { background: var(--brand-l); }
.g2 { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 1200px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }

/* ==================== 柱状图 ==================== */
.chart { display: flex; align-items: flex-end; gap: 10px; height: 196px; padding-top: 12px; }
.chart .col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; height: 100%; justify-content: flex-end; }
.chart .bars { display: flex; align-items: flex-end; gap: 6px; height: 148px; width: 100%; justify-content: center; }
.chart .b { width: 17px; border-radius: 5px 5px 2px 2px; background: linear-gradient(180deg, #3b82f6, #2563eb); position: relative; min-height: 2px; transition: height .5s cubic-bezier(.4, 0, .2, 1); }
.chart .b.g { background: linear-gradient(180deg, #cbd5e1, #b9c4d3); }
.chart .col:hover .b { filter: brightness(1.08); }
.chart .lb { font-size: 11.5px; color: var(--txt3); }
.chart .vv { font-size: 11px; color: var(--txt2); font-weight: 600; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--txt2); }
.legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; }

/* ==================== 排行条 ==================== */
.rank { display: flex; flex-direction: column; gap: 13px; }
.rank .row { display: grid; grid-template-columns: 104px 1fr 62px; align-items: center; gap: 12px; font-size: 13px; }
.rank .row > span:first-child { color: var(--txt2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ==================== 列表 / 提醒 ==================== */
.list-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }
.list-item:last-child { border: none; }
.list-item .t { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-item .amt { font-weight: 600; }

.rm-item { display: flex; gap: 11px; padding: 12px 0; border-bottom: 1px solid var(--line-2); align-items: flex-start; }
.rm-item:last-child { border-bottom: none; }
.rm-item .tp { font-size: 11px; padding: 3px 8px; border-radius: 6px; white-space: nowrap; font-weight: 500; }
.rm-item .tt { font-size: 13px; font-weight: 500; }
.rm-item .dd { font-size: 12px; color: var(--txt3); margin-top: 4px; }

/* ==================== 详情抽屉 ==================== */
.dt-hd { display: flex; align-items: center; gap: 14px; padding-bottom: 16px; border-bottom: 1px solid var(--line-2); margin-bottom: 16px; }
.dt-hd .av { width: 52px; height: 52px; border-radius: 13px; background: var(--brand-l); color: var(--brand); display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 700; flex: none; }
.dt-hd h3 { margin: 0 0 5px; font-size: 18px; letter-spacing: -.3px; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 16px; }
.tabs .tb { padding: 9px 15px; font-size: 13px; cursor: pointer; color: var(--txt2); border-bottom: 2px solid transparent; margin-bottom: -1px; border-radius: 8px 8px 0 0; transition: .15s; font-weight: 500; }
.tabs .tb:hover { color: var(--brand); background: #f8fafc; }
.tabs .tb.on { color: var(--brand); border-color: var(--brand); font-weight: 600; }
.timeline { position: relative; padding-left: 20px; }
.timeline::before { content: ''; position: absolute; left: 4px; top: 7px; bottom: 7px; width: 2px; background: linear-gradient(180deg, var(--brand-l), var(--line)); border-radius: 2px; }
.timeline .it { position: relative; padding-bottom: 17px; }
.timeline .it::before { content: ''; position: absolute; left: -20px; top: 5px; width: 10px; height: 10px; border-radius: 50%; background: #fff; border: 2.5px solid var(--brand); box-shadow: 0 0 0 3px var(--brand-l); }
.timeline .it .h { font-size: 13px; }
.timeline .it .h b { font-weight: 600; }
.timeline .it .m { font-size: 12px; color: var(--txt3); margin-top: 4px; }

/* ==================== 登录页 ==================== */
.login-wrap { height: 100vh; display: flex; align-items: stretch; background: var(--bg); }
.login-side {
  flex: 1; background: linear-gradient(150deg, #16213c 0%, #1e3a8a 55%, #2563eb 100%);
  color: #fff; padding: 54px 58px; display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
}
.login-side::before { content: ''; position: absolute; width: 420px; height: 420px; border-radius: 50%; background: rgba(255, 255, 255, .07); top: -120px; right: -130px; }
.login-side::after { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(96, 165, 250, .13); bottom: -110px; left: -80px; }
.login-side .lg { width: 52px; height: 52px; border-radius: 15px; background: rgba(255, 255, 255, .16); display: flex; align-items: center; justify-content: center; font-size: 23px; font-weight: 700; margin-bottom: 26px; position: relative; z-index: 1; backdrop-filter: blur(6px); border: 1px solid rgba(255, 255, 255, .18); }
.login-side h1 { margin: 0 0 14px; font-size: 32px; font-weight: 700; letter-spacing: -1px; position: relative; z-index: 1; line-height: 1.25; }
.login-side .desc { font-size: 14.5px; opacity: .82; line-height: 1.9; max-width: 460px; position: relative; z-index: 1; }
.login-side .kpis { display: flex; gap: 34px; margin-top: 40px; position: relative; z-index: 1; }
.login-side .kpi .v { font-size: 27px; font-weight: 700; letter-spacing: -.5px; }
.login-side .kpi .l { font-size: 12px; opacity: .7; margin-top: 4px; }
.login-side .feats { margin-top: 36px; display: flex; flex-direction: column; gap: 11px; position: relative; z-index: 1; }
.login-side .feat { display: flex; align-items: center; gap: 10px; font-size: 13px; opacity: .88; }
.login-side .feat i { width: 20px; height: 20px; border-radius: 6px; background: rgba(255, 255, 255, .15); display: flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; flex: none; }

.login-box { width: 500px; flex: none; background: #fff; display: flex; flex-direction: column; justify-content: center; padding: 48px 46px; box-shadow: -12px 0 40px rgba(15, 23, 42, .07); overflow: auto; }
.login-box h2 { margin: 0 0 8px; font-size: 22px; letter-spacing: -.5px; }
.login-box .d { color: var(--txt2); font-size: 13px; margin-bottom: 24px; line-height: 1.7; }
.role-list { display: flex; flex-direction: column; gap: 9px; }
.role-item { display: flex; align-items: center; gap: 13px; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: all .16s; background: #fff; }
.role-item:hover { border-color: var(--brand); background: #f8fbff; transform: translateX(2px); box-shadow: var(--shadow); }
.role-item .av { width: 40px; height: 40px; border-radius: 11px; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 15px; font-weight: 600; flex: none; }
.role-item .nm { font-size: 14px; font-weight: 600; }
.role-item .ds { font-size: 12px; color: var(--txt3); margin-top: 3px; }
.role-item .sc { margin-left: auto; font-size: 12px; color: var(--txt3); text-align: right; flex: none; }
.login-note { margin-top: 20px; font-size: 11.5px; color: var(--txt3); line-height: 1.8; padding-top: 16px; border-top: 1px dashed var(--line); }
@media (max-width: 1080px) { .login-side { display: none; } .login-box { width: 100%; max-width: 520px; margin: 0 auto; } }

/* ==================== 操作手册 ==================== */
.manual { padding: 26px 30px; }
.manual h4 { margin: 22px 0 10px; font-size: 15px; color: var(--brand); font-weight: 600; }
.manual h4:first-child { margin-top: 0; }
.manual p, .manual li { font-size: 13.5px; line-height: 2; color: var(--txt2); }
.manual ol, .manual ul { padding-left: 24px; margin: 8px 0; }
.manual li { margin-bottom: 5px; }
.manual code { background: #f1f5f9; padding: 2px 7px; border-radius: 5px; font-size: 12px; color: var(--brand-d); }
