/* ============ 联高研发智能管理系统 · 设计系统 ============ */
:root {
  --primary: #1a6dff;
  --primary-dark: #0d55d6;
  --primary-light: #e8f1ff;
  --success: #12b76a;
  --warning: #f79009;
  --danger: #f04438;
  --sidebar-bg: #001529;
  --sidebar-bg2: #06213b;
  --text-1: #16202c;
  --text-2: #4a5a6d;
  --text-3: #8595a8;
  --line: #e6ebf2;
  --line-2: #f0f3f8;
  --bg: #f4f7fb;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(16, 30, 54, .04), 0 8px 24px rgba(16, 30, 54, .06);
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 13px; color: var(--text-1); background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--primary); text-decoration: none; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a9b7c9; }
::-webkit-scrollbar-track { background: transparent; }

/* ============ 登录页 ============ */
.login-wrap { display: flex; min-height: 100vh; background: #f2f6fc; }
.login-left {
  flex: 1; position: relative; overflow: hidden;
  background: linear-gradient(150deg, #041a33 0%, #0a3a6b 55%, #1159a8 100%);
  color: #fff; padding: 64px 72px; display: flex; flex-direction: column; justify-content: space-between;
}
.login-left::after {
  content: ''; position: absolute; right: -160px; bottom: -180px; width: 620px; height: 620px;
  border-radius: 50%; background: radial-gradient(circle, rgba(38, 132, 255, .45), transparent 62%);
}
.login-left::before {
  content: ''; position: absolute; left: -120px; top: -140px; width: 420px; height: 420px;
  border-radius: 50%; border: 1px solid rgba(255, 255, 255, .12);
}
.login-brand { display: flex; align-items: center; gap: 12px; font-size: 20px; font-weight: 700; letter-spacing: .5px; z-index: 2; }
.login-brand .logo-img { width: 44px; height: 44px; object-fit: contain; filter: drop-shadow(0 4px 12px rgba(0, 0, 0, .35)); }
.login-logo { display: block; width: 170px; margin: 0 auto 20px; object-fit: contain; }
.login-slogan { z-index: 2; }
.login-slogan h1 { font-size: 34px; line-height: 1.35; margin: 0 0 18px; font-weight: 700; letter-spacing: 1px; }
.login-slogan p { color: rgba(255, 255, 255, .72); font-size: 14px; line-height: 2; margin: 0; }
.login-feats { display: flex; gap: 14px; z-index: 2; flex-wrap: wrap; }
.login-feat {
  flex: 1; min-width: 150px; padding: 16px; border-radius: 10px;
  background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12);
  backdrop-filter: blur(6px);
}
.login-feat b { display: block; font-size: 13px; margin-bottom: 6px; }
.login-feat span { color: rgba(255, 255, 255, .65); font-size: 12px; line-height: 1.7; }
.login-right { width: 460px; display: grid; place-items: center; background: #fff; }
.login-box { width: 348px; }
.login-box h2 { font-size: 24px; margin: 0 0 6px; }
.login-box .sub { color: var(--text-3); margin: 0 0 30px; font-size: 13px; }
.login-tip { margin-top: 22px; padding: 12px 14px; background: #f7faff; border: 1px dashed #c9dcff; border-radius: 8px; color: var(--text-2); font-size: 12px; line-height: 1.9; }

/* ============ 布局 ============ */
.layout { display: flex; min-height: 100vh; }
.sidebar {
  width: 236px; flex: none; background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
  color: #c3cfdd; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; z-index: 20;
}
.sidebar-logo {
  height: 58px; display: flex; align-items: center; gap: 10px; padding: 0 18px;
  color: #fff; font-weight: 700; font-size: 15px; letter-spacing: .5px;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
}
.sidebar-logo .mark-img { width: 30px; height: 30px; object-fit: contain; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .3)); }
.menu { flex: 1; overflow-y: auto; padding: 8px 0 30px; }
.menu::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .18); }
.menu-group > .menu-item { font-size: 13px; }
.menu-item {
  display: flex; align-items: center; gap: 9px; padding: 9px 18px; cursor: pointer; color: #b6c4d4;
  font-size: 13px; line-height: 20px; transition: all .16s; border-left: 3px solid transparent; user-select: none;
}
.menu-item:hover { color: #fff; background: rgba(255, 255, 255, .05); }
.menu-item.active { color: #fff; background: linear-gradient(90deg, rgba(26, 109, 255, .28), rgba(26, 109, 255, .04)); border-left-color: #3b8cff; }
.menu-item .ico { width: 16px; text-align: center; opacity: .9; font-size: 14px; }
.menu-item .arrow { margin-left: auto; font-size: 10px; opacity: .6; transition: transform .2s; }
.menu-item.open .arrow { transform: rotate(90deg); }
.menu-sub { overflow: hidden; }
.menu-sub .menu-item { padding-left: 44px; font-size: 12.5px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  height: 58px; background: #fff; border-bottom: 1px solid var(--line); display: flex; align-items: center;
  padding: 0 20px; gap: 16px; position: sticky; top: 0; z-index: 15;
}
.crumb { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.crumb b { color: var(--text-1); font-weight: 600; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 14px; }
.year-pick { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%; background: linear-gradient(135deg, #3b8cff, #0b4fd6);
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.user-chip:hover { background: var(--line-2); }
.content { padding: 18px 20px 40px; flex: 1; }

/* ============ 卡片 / 页头 ============ */
.card { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid #eef2f8; }
.card + .card { margin-top: 16px; }
.card-head { padding: 14px 18px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; gap: 10px; }
.card-head h3 { margin: 0; font-size: 14px; font-weight: 600; }
.card-head .desc { color: var(--text-3); font-size: 12px; }
.card-head .right { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-body { padding: 18px; }
.page-head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 16px; }
.page-head h2 { margin: 0 0 5px; font-size: 19px; font-weight: 650; letter-spacing: .2px; }
.page-head p { margin: 0; color: var(--text-3); font-size: 12.5px; line-height: 1.7; }
.page-head .right { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }

/* ============ 按钮 ============ */
.btn {
  height: 32px; padding: 0 14px; border-radius: 6px; border: 1px solid var(--line); background: #fff;
  color: var(--text-2); font-size: 13px; cursor: pointer; display: inline-flex; align-items: center; gap: 5px;
  transition: all .15s; white-space: nowrap; font-family: inherit;
}
.btn:hover { border-color: #bcd0ee; color: var(--primary); background: #f8fbff; }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: #fbd5d1; background: #fff7f6; }
.btn-danger:hover { background: #fee9e7; color: #d92d20; border-color: #f8b4ad; }
.btn-sm { height: 26px; padding: 0 9px; font-size: 12px; }
.btn-ghost { background: transparent; border-color: transparent; color: var(--primary); padding: 0 6px; height: 26px; }
.btn-ghost:hover { background: var(--primary-light); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-group { display: inline-flex; gap: 6px; }

/* ============ 表单 ============ */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.field > label em { color: var(--danger); font-style: normal; margin-right: 2px; }
.input, .select, .textarea {
  height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 0 10px; font-size: 13px;
  color: var(--text-1); background: #fff; outline: none; transition: all .15s; font-family: inherit; width: 100%;
}
.textarea { height: auto; padding: 8px 10px; line-height: 1.7; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(26, 109, 255, .1); }
.input::placeholder { color: #b6c2d1; }
.select { appearance: none; background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='10' height='6'><path d='M0 0l5 6 5-6z' fill='%238595a8'/></svg>"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 26px; cursor: pointer; }
.filter-bar { display: flex; gap: 10px; align-items: center; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.filter-bar .input, .filter-bar .select { width: auto; min-width: 150px; }
.filter-bar .spacer { flex: 1; }

/* ============ 表格 ============ */
.table-wrap { overflow: auto; }
table.tb { width: 100%; border-collapse: collapse; font-size: 12.8px; }
table.tb th {
  background: #f8fafd; color: var(--text-2); font-weight: 600; text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; z-index: 2; font-size: 12.5px;
}
table.tb td { padding: 10px 12px; border-bottom: 1px solid var(--line-2); color: var(--text-1); vertical-align: middle; }
table.tb tbody tr:hover td { background: #f9fbff; }
table.tb tbody tr:last-child td { border-bottom: none; }
table.tb .num { text-align: right; font-variant-numeric: tabular-nums; font-family: "SF Mono", Consolas, monospace; font-size: 12.4px; }
table.tb .center { text-align: center; }
table.tb .ellipsis { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: block; }
table.tb tfoot td { background: #f8fafd; font-weight: 600; border-top: 1px solid var(--line); }
.empty { padding: 50px 0; text-align: center; color: var(--text-3); font-size: 13px; }

.pager { display: flex; align-items: center; gap: 8px; padding: 12px 18px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--text-2); }
.pager .pages { display: flex; gap: 4px; margin-left: auto; }
.pager button {
  min-width: 28px; height: 28px; border-radius: 5px; border: 1px solid var(--line); background: #fff;
  cursor: pointer; color: var(--text-2); font-size: 12.5px; font-family: inherit;
}
.pager button:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.pager button.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.pager button:disabled { opacity: .45; cursor: not-allowed; }

/* ============ 标签 ============ */
.tag { display: inline-flex; align-items: center; gap: 4px; height: 21px; padding: 0 7px; border-radius: 4px; font-size: 11.5px; white-space: nowrap; }
.tag-blue { background: #e8f1ff; color: #0d55d6; }
.tag-green { background: #e6f8ef; color: #087443; }
.tag-orange { background: #fff3e0; color: #b54708; }
.tag-red { background: #feeceb; color: #b42318; }
.tag-gray { background: #f2f4f8; color: #5b6b7f; }
.tag-purple { background: #f2ecff; color: #6941c6; }

/* ============ KPI ============ */
.kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.kpi {
  background: #fff; border-radius: var(--radius); padding: 16px 18px; border: 1px solid #eef2f8;
  box-shadow: var(--shadow); position: relative; overflow: hidden;
}
.kpi .label { color: var(--text-3); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.kpi .val { font-size: 25px; font-weight: 650; margin: 8px 0 4px; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.kpi .val small { font-size: 13px; font-weight: 500; color: var(--text-3); margin-left: 3px; }
.kpi .foot { color: var(--text-3); font-size: 11.5px; }
.kpi .bar { position: absolute; right: 0; top: 0; width: 3px; height: 100%; background: var(--primary); opacity: .85; }
.kpi.g .bar { background: var(--success); } .kpi.o .bar { background: var(--warning); } .kpi.r .bar { background: var(--danger); }

/* ============ 弹窗 ============ */
.mask { position: fixed; inset: 0; background: rgba(9, 22, 40, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 60px 16px; overflow: auto; }
.dialog { background: #fff; border-radius: 10px; width: 640px; max-width: 100%; box-shadow: 0 20px 60px rgba(9, 22, 40, .25); animation: pop .18s ease-out; }
@keyframes pop { from { transform: translateY(-8px) scale(.99); opacity: 0; } to { transform: none; opacity: 1; } }
.dialog-head { padding: 16px 20px; border-bottom: 1px solid var(--line-2); display: flex; align-items: center; }
.dialog-head h3 { margin: 0; font-size: 15px; font-weight: 600; }
.dialog-head .x { margin-left: auto; cursor: pointer; color: var(--text-3); font-size: 18px; line-height: 1; padding: 2px 6px; border-radius: 4px; }
.dialog-head .x:hover { background: var(--line-2); color: var(--text-1); }
.dialog-body { padding: 20px; max-height: 60vh; overflow: auto; }
.dialog-foot { padding: 13px 20px; border-top: 1px solid var(--line-2); display: flex; justify-content: flex-end; gap: 8px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 18px; }
.form-grid .full { grid-column: 1 / -1; }

/* ============ 提示 ============ */
.toasts { position: fixed; top: 16px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: #fff; border: 1px solid var(--line); box-shadow: 0 8px 24px rgba(9, 22, 40, .12); border-radius: 7px; padding: 9px 16px; font-size: 13px; display: flex; gap: 8px; align-items: center; animation: pop .18s; }
.toast.ok { border-color: #b7ebd0; color: #087443; background: #f4fdf8; }
.toast.err { border-color: #f9c6c0; color: #b42318; background: #fff7f6; }

/* ============ 描述列表 ============ */
.desc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 24px; }
.desc-item { display: flex; flex-direction: column; gap: 4px; }
.desc-item .k { color: var(--text-3); font-size: 12px; }
.desc-item .v { color: var(--text-1); font-size: 13px; font-weight: 500; }

/* ============ 图表 ============ */
.chart-grid { display: grid; grid-template-columns: 1.35fr 1fr; gap: 16px; }
.legend { display: flex; gap: 16px; font-size: 12px; color: var(--text-2); flex-wrap: wrap; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.bar-row { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; font-size: 12.5px; }
.bar-row .nm { width: 118px; color: var(--text-2); flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bar-track { flex: 1; display: block; height: 8px; background: #f0f3f8; border-radius: 4px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 4px; background: linear-gradient(90deg, #4a94ff, #1a6dff); }
.bar-row .vl { width: 96px; text-align: right; font-variant-numeric: tabular-nums; color: var(--text-1); font-size: 12px; }

/* ============ 预警 ============ */
.warn-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px dashed var(--line); }
.warn-item:last-child { border-bottom: none; }
.warn-dot { width: 8px; height: 8px; border-radius: 50%; margin-top: 6px; flex: none; }
.warn-dot.high { background: var(--danger); box-shadow: 0 0 0 3px #feeceb; }
.warn-dot.medium { background: var(--warning); box-shadow: 0 0 0 3px #fff3e0; }
.warn-dot.low { background: #3b8cff; box-shadow: 0 0 0 3px #e8f1ff; }
.warn-item .t { font-size: 13px; font-weight: 600; margin-bottom: 3px; }
.warn-item .d { font-size: 12px; color: var(--text-3); line-height: 1.7; margin-bottom: 3px; }
.warn-item .s { font-size: 12px; color: var(--primary); }

/* ============ 其它 ============ */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); padding: 0 18px; }
.tab { padding: 11px 14px; font-size: 13px; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tab:hover { color: var(--primary); }
.tab.on { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
.row { display: flex; gap: 12px; align-items: center; }
.muted { color: var(--text-3); }
.mono { font-family: "SF Mono", Consolas, monospace; font-variant-numeric: tabular-nums; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mb12 { margin-bottom: 12px; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.hint { font-size: 12px; color: var(--text-3); line-height: 1.8; }
.empty-state { padding: 60px 20px; text-align: center; color: var(--text-3); }
.checkbox { width: 14px; height: 14px; accent-color: var(--primary); cursor: pointer; }
.dot-live { width: 6px; height: 6px; border-radius: 50%; background: var(--success); display: inline-block; }
.section-title { font-size: 13px; font-weight: 600; margin: 0 0 12px; display: flex; align-items: center; gap: 8px; }
.section-title::before { content: ''; width: 3px; height: 13px; border-radius: 2px; background: var(--primary); }
@media (max-width: 1280px) { .kpi-grid { grid-template-columns: repeat(2, 1fr); } .chart-grid { grid-template-columns: 1fr; } }

/* 表格不换行列 */
table.tb th.nw, table.tb td.nw { white-space: nowrap; }

/* ============ 多租户：服务商后台 ============ */
.tenant-banner {
  display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 10px 0 12px;
  background: #fff7ed; border: 1px solid #fed7aa; border-radius: 15px;
  font-size: 12px; color: #b54708; white-space: nowrap;
}
.tenant-banner b { color: #8a3a06; max-width: 180px; overflow: hidden; text-overflow: ellipsis; }
.tenant-banner .dot { width: 6px; height: 6px; border-radius: 50%; background: #f79009; box-shadow: 0 0 0 3px rgba(247,144,9,.18); }
.tenant-banner .btn { height: 22px; padding: 0 8px; font-size: 11.5px; border-color: #fed7aa; color: #b54708; background: #fff; }
.tenant-banner .btn:hover { background: #ffedd5; color: #8a3a06; border-color: #fdba74; }

.sidebar-foot { padding: 12px 16px 16px; border-top: 1px solid rgba(255,255,255,.07); }
.sidebar-foot .sf-label { font-size: 10.5px; color: #7d8ea3; letter-spacing: .5px; margin-bottom: 4px; }
.sidebar-foot .sf-name { font-size: 12px; color: #dbe4ee; line-height: 1.5; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

.co-dot {
  width: 26px; height: 26px; border-radius: 7px; flex: none; display: grid; place-items: center;
  background: linear-gradient(135deg, #e8f1ff, #d5e5ff); color: #0d55d6; font-size: 12px; font-weight: 700;
}
.text-danger { color: var(--danger); }
.pwd-result { text-align: center; padding: 6px 0 4px; }
.pwd-result .ok-ico {
  width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: #e6f8ef; color: #087443; font-size: 22px; font-weight: 700;
}
.pwd-line { margin-top: 10px; padding: 10px; background: #f7faff; border: 1px dashed #c9dcff; border-radius: 8px; font-size: 13px; }
.pwd-line b { color: var(--primary); font-size: 14px; }

/* ============ 研发过程文档：附件上传 ============ */
.file-ico {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 38px; height: 20px; padding: 0 5px; border-radius: 4px;
  background: #eef3fb; color: #2b5fa8; font-size: 9.5px; font-weight: 700; letter-spacing: .3px;
  border: 1px solid #dbe6f7; vertical-align: middle;
}
.up-list { max-height: 210px; overflow: auto; border: 1px solid var(--line); border-radius: 8px; padding: 4px; background: #fbfcfe; }
.up-item { display: flex; align-items: center; padding: 6px 8px; border-radius: 6px; }
.up-item:hover { background: #f2f6fc; }
