:root { --cp-blue: #0052d9; --cp-deep: #002fa7; }
* { box-sizing: border-box; }
body { margin: 0; font-family: "PingFang SC","Microsoft YaHei",system-ui,sans-serif; background: #f3f5f8; color: #1d2129; }
a { text-decoration: none; color: var(--cp-blue); }
.cp-layout { height: 100vh; }
.cp-aside { background: #101828; display: flex; flex-direction: column; }
.cp-logo { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid rgba(255,255,255,.08); }
.cp-logo b { color: #fff; font-size: 16px; }
.cp-logo span { font-size: 12px; color: #94a3b8; display: block; }
.cp-menu { border-right: none; flex: 1; overflow-y: auto; background: transparent; }
.cp-menu .el-menu-item { color: #c6d0dd; }
.cp-menu .el-menu-item:hover { background: rgba(255,255,255,.06); color: #fff; }
.cp-menu .el-menu-item.is-active { background: var(--cp-blue); color: #fff; }
.cp-header { background: #fff; border-bottom: 1px solid #e7eaf0; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; height: 56px; }
.cp-header h3 { margin: 0; font-size: 15px; }
.cp-main { padding: 20px; overflow-y: auto; }
.cp-cards { display: grid; grid-template-columns: repeat(auto-fit,minmax(180px,1fr)); gap: 14px; margin-bottom: 16px; }
.cp-card { background: #fff; border-radius: 8px; padding: 16px 18px; border: 1px solid #eceff5; }
.cp-card .t { font-size: 13px; color: #86909c; }
.cp-card .v { font-size: 22px; font-weight: 700; margin-top: 6px; }
.cp-panel { background: #fff; border-radius: 8px; border: 1px solid #eceff5; padding: 18px 20px; margin-bottom: 16px; }
.cp-panel h4 { margin: 0 0 14px; font-size: 15px; }
.total-bar { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; flex-wrap: wrap; gap: 10px; }
.mono { font-family: ui-monospace, Consolas, monospace; }
.menu-group { font-size: 12px; color: #64748b; padding: 14px 20px 4px; }
.muted { color: #86909c; font-size: 12px; }
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(1200px 600px at 80% -10%, #14306e 0%, #050d24 60%); position: relative; }
.auth-card { width: 400px; background: #fff; border-radius: 12px; padding: 34px 36px; box-shadow: 0 20px 60px rgba(0,0,0,.5); position: relative; z-index: 2; }
.auth-card h2 { margin: 14px 0 4px; }
.chart { display: flex; align-items: flex-end; gap: 10px; height: 140px; padding-top: 10px; }
.chart .bar { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 4px; height: 100%; }
.chart .bar i { display: block; width: 60%; max-width: 34px; background: linear-gradient(180deg,#3b82f6,#0052d9); border-radius: 4px 4px 0 0; }
.chart .bar span { font-size: 11px; color: #86909c; }
.chart .bar b { font-size: 10px; color: #475569; font-weight: 400; white-space: nowrap; }

/* ===== V2：工单时间线 / 客服记录 ===== */
.tk-timeline { max-height: 55vh; overflow-y: auto; }
.tk-item { margin-bottom: 14px; }
.tk-meta { display: flex; justify-content: space-between; font-size: 12px; color: #86909c; margin-bottom: 4px; }
.tk-meta b { color: #1d2129; font-size: 13px; }
.tk-content { background: #f6f8fc; border: 1px solid #eceff5; border-radius: 10px; padding: 10px 12px; font-size: 13px; line-height: 1.7; white-space: pre-wrap; }
.tk-item.admin .tk-content { background: #eef3ff; border-color: #c9d9ff; }

/* ================= V3 视觉主题 ================= */
:root {
  --el-color-primary: #0052d9;
  --el-color-primary-light-3: #4d8af0;
  --el-color-primary-light-5: #84b1f5;
  --el-color-primary-light-7: #b8d4fa;
  --el-color-primary-light-8: #d3e3fc;
  --el-color-primary-light-9: #eaf1fe;
  --el-color-primary-dark-2: #0042b0;
  --el-border-radius-base: 8px;
}
body {
  background:
    radial-gradient(900px 420px at 100% -10%, #e9effd 0%, transparent 60%),
    radial-gradient(700px 380px at -10% 110%, #eef2fb 0%, transparent 55%),
    #f3f5f9;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c6d2e8; border-radius: 8px; }
::-webkit-scrollbar-thumb:hover { background: #a9bcdf; }
::-webkit-scrollbar-track { background: transparent; }

/* 侧边栏：渐变 + 发光高亮 */
.cp-aside { background: linear-gradient(180deg, #0f1e3f 0%, #0a142e 60%, #070f22 100%); }
.cp-logo { border-bottom: 1px solid rgba(255,255,255,.08); }
.cp-menu .el-menu-item { margin: 3px 10px; border-radius: 9px; height: 42px; line-height: 42px; }
.cp-menu .el-menu-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.cp-menu .el-menu-item.is-active { background: linear-gradient(100deg, #1a5cff 0%, #0e43c6 100%); color: #fff;
  box-shadow: 0 6px 18px rgba(10,60,190,.5); }
.menu-group { color: #64748b; padding: 14px 20px 4px; letter-spacing: .5px; }

/* 顶栏：玻璃拟态 */
.cp-header { background: rgba(255,255,255,.88); backdrop-filter: blur(10px);
  box-shadow: 0 1px 0 #e9edf5, 0 6px 24px rgba(15,40,100,.05); }

/* 卡片 */
.cp-card, .cp-panel { border: none; box-shadow: 0 2px 10px rgba(20,45,110,.04), 0 10px 30px rgba(20,45,110,.05);
  transition: transform .2s ease, box-shadow .25s ease; }
.cp-card:hover { transform: translateY(-3px); box-shadow: 0 8px 18px rgba(20,45,110,.09), 0 20px 44px rgba(20,45,110,.10); }
.cp-card .v { background: linear-gradient(120deg, #101828 30%, #2f5bd8); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* 图表柱：渐变 + 动效 */
.chart .bar i { border-radius: 5px 5px 0 0; animation: growBar .5s ease; }
@keyframes growBar { from { transform: scaleY(0); transform-origin: bottom; } to { transform: scaleY(1); transform-origin: bottom; } }
.chart .bar:hover i { filter: brightness(1.15); }

/* 按钮 / 输入框 / 表格 / 弹窗 / 分页 */
.el-button--primary { background: linear-gradient(135deg, #2f6dff, #0052d9); border: none;
  box-shadow: 0 4px 14px rgba(0,82,217,.24); }
.el-button--primary:hover { background: linear-gradient(135deg, #4d82ff, #1a63ea); transform: translateY(-1px); }
.el-button--primary:active { transform: translateY(0); }
.el-button--primary.is-plain { background: #eef4ff; border: 1px solid #c9dcff; color: #0a52d9; box-shadow: none; }
.el-button--primary.is-plain:hover { background: #dfeaff; transform: none; }
.el-button--primary.is-disabled, .el-button--primary.is-disabled:hover { background: #a8c1f2; transform: none; box-shadow: none; }
.el-input__wrapper { border-radius: 10px; background: #fbfcff; box-shadow: 0 0 0 1px #e2e8f4 inset; }
.el-input__wrapper.is-focus { box-shadow: 0 0 0 1.5px #2f6dff inset, 0 0 0 3px rgba(47,109,255,.12); }
.el-textarea__inner { border-radius: 10px; box-shadow: 0 0 0 1px #e2e8f4 inset; }
.el-select__wrapper { border-radius: 10px; }
.el-table { --el-table-header-bg-color: transparent; --el-table-row-hover-bg-color: #f4f8ff; border-radius: 12px; }
.el-table th.el-table__cell { background: #f6f8fd; color: #5a67a0; font-weight: 600; }
.el-table .el-table__cell { padding: 11px 0; }
.el-table--striped .el-table__body tr.el-table__row--striped td.el-table__cell { background: #fafbfe; }
.el-dialog { border-radius: 16px; overflow: hidden; }
.el-dialog__header { margin-right: 0; padding: 16px 22px; border-bottom: 1px solid #eef1f7; }
.el-dialog__title { font-weight: 600; }
.el-dialog__body { padding: 20px 22px; }
.el-drawer__header { margin-bottom: 0; padding: 16px 20px; border-bottom: 1px solid #eef1f7; color: #1d2129; font-weight: 600; }
.el-drawer__body { padding: 20px; }
.el-pagination .el-pager li { border-radius: 9px; font-weight: 500; }
.el-pagination .el-pager li.is-active { background: #0052d9; color: #fff; box-shadow: 0 3px 10px rgba(0,82,217,.3); }
.el-tag { border-radius: 999px; font-weight: 500; }

/* 登录页动效 */
.auth-wrap { background: linear-gradient(130deg, #14306e, #050d24, #0b2a7a); background-size: 220% 220%;
  animation: authShift 14s ease infinite; }
@keyframes authShift { 0% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } 100% { background-position: 0% 50%; } }
.auth-card { border-radius: 18px; border-top: 4px solid #2f6dff; }

/* 路由切换动画 */
.fade-slide-enter-active, .fade-slide-leave-active { transition: opacity .22s ease, transform .22s ease; }
.fade-slide-enter-from { opacity: 0; transform: translateY(10px); }
.fade-slide-leave-to { opacity: 0; transform: translateY(-6px); }
