/* ===========================================================
   项目管理系统 · 布局与组件
   =========================================================== */

/* ================= 登录页 ================= */
.login-wrap {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  align-items: center;
  gap: 40px;
  padding: 40px 6vw;
}

.login-hero { position: relative; animation: fadeUp .7s both; }
.login-hero .brand-line { display: flex; align-items: center; gap: 12px; margin-bottom: 26px; }
.login-hero h1 {
  font-size: 46px;
  line-height: 1.25;
  letter-spacing: -1px;
  margin-bottom: 32px;
  background: linear-gradient(110deg, #16233d 20%, #2f6bff 60%, #22c7d6 95%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.login-hero p.lead { font-size: 15px; color: var(--text-2); max-width: 520px; margin: 18px 0 30px; line-height: 1.9; }

.hero-stats { display: flex; gap: 14px; flex-wrap: wrap; }
.hero-stat {
  flex: 1 1 140px;
  padding: 16px 18px;
  border-radius: var(--r-m);
}
.hero-stat .v { font-size: 26px; font-weight: 700; color: var(--primary-deep); letter-spacing: -.5px; }
.hero-stat .k { font-size: 12.5px; color: var(--muted); margin-top: 2px; }

.hero-depts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 26px; }
.hero-dept {
  font-size: 12.5px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .55);
  border: 1px solid rgba(255, 255, 255, .9);
  color: var(--text-2);
  box-shadow: var(--shadow-s);
  backdrop-filter: blur(12px);
}

.login-card { padding: 38px 36px; animation: popIn .6s .1s both; }
.login-card .tab-row { display: flex; gap: 6px; background: rgba(255, 255, 255, .5); padding: 5px; border-radius: 13px; margin-bottom: 24px; }
.login-card .tab-row button {
  flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px;
  font-family: var(--font-cn); font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; transition: all .22s;
}
.login-card .tab-row button.on { background: #fff; color: var(--primary); box-shadow: var(--shadow-s); }

.quick-login { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.quick-login button {
  font-family: var(--font-cn); font-size: 12px; cursor: pointer; padding: 9px 4px; border-radius: 10px;
  border: 1px dashed rgba(47, 107, 255, .35); background: rgba(255, 255, 255, .4); color: var(--primary);
  transition: all .2s;
}
.quick-login button:hover { background: rgba(47, 107, 255, .1); transform: translateY(-2px); border-style: solid; }

@media (max-width: 980px) {
  .login-wrap { grid-template-columns: 1fr; padding: 32px 20px; }
  .login-hero h1 { font-size: 32px; }
}

/* ================= 主框架 ================= */
.layout { display: flex; min-height: 100vh; }

.sidebar {
  width: 246px;
  flex: none;
  margin: 14px 0 14px 14px;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  position: sticky;
  top: 14px;
  height: calc(100vh - 28px);
}

.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 16px; }
.side-brand .logo-img {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  object-fit: cover; display: block;
  box-shadow: var(--shadow-glow);
}
.side-brand .logo {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: linear-gradient(135deg, var(--primary-2), var(--primary) 60%, var(--violet));
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 17px;
  box-shadow: var(--shadow-glow);
}
/* 数据同步状态指示 */
.sync-pill {
  display: inline-flex; align-items: center; gap: 6px; cursor: pointer;
  font-size: 11.5px; font-weight: 600; padding: 5px 11px; border-radius: 999px;
  border: 1px solid transparent; white-space: nowrap; user-select: none;
  transition: all .22s ease;
}
.sync-pill i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.sync-pill.on { color: #0f8a5f; background: rgba(56, 211, 159, .13); border-color: rgba(56, 211, 159, .3); }
.sync-pill.on i { background: #38d39f; box-shadow: 0 0 0 3px rgba(56, 211, 159, .22); animation: livePulse 1.8s infinite; }
.sync-pill.off { color: #e5484d; background: rgba(229, 72, 77, .14); border-color: rgba(229, 72, 77, .34); }
.sync-pill.off i { background: #e5484d; box-shadow: 0 0 0 3px rgba(229, 72, 77, .2); }
.sync-pill:hover { filter: brightness(.97); transform: translateY(-1px); }

.side-brand .t1 { font-size: 14.5px; font-weight: 700; letter-spacing: .3px; }
.side-brand .t2 { font-size: 11px; color: var(--muted); letter-spacing: .6px; }

.side-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; padding-right: 4px; }
.side-group { font-size: 11px; color: var(--muted-2); font-weight: 700; letter-spacing: 1.4px; padding: 14px 10px 7px; }

.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  color: var(--text-2); font-size: 13.5px; font-weight: 500;
  transition: all .2s cubic-bezier(.2, .8, .3, 1);
  position: relative; margin-bottom: 3px;
  border: 1px solid transparent;
}
.nav-item svg { flex: none; opacity: .82; }
.nav-item:hover { background: rgba(255, 255, 255, .62); transform: translateX(3px); color: var(--primary); }
.nav-item.on {
  background: linear-gradient(100deg, rgba(47, 107, 255, .95), rgba(91, 140, 255, .85) 55%, rgba(34, 199, 214, .8));
  color: #fff;
  box-shadow: var(--shadow-glow);
  border-color: rgba(255, 255, 255, .5);
}
.nav-item.on svg { opacity: 1; }
.nav-item .nav-badge {
  margin-left: auto; font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 999px;
  background: rgba(47, 107, 255, .13); color: var(--primary);
}
.nav-item.on .nav-badge { background: rgba(255, 255, 255, .28); color: #fff; }
.nav-sub { font-size: 12.5px; padding-left: 15px; }
.nav-sub .nav-item { padding: 7px 12px; }

.side-user { margin-top: 10px; padding: 12px; border-radius: var(--r-m); background: rgba(255, 255, 255, .5); border: 1px solid rgba(255, 255, 255, .8); }
.side-user .row { display: flex; align-items: center; gap: 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center;
  color: #fff; font-weight: 700; font-size: 13.5px;
  background: linear-gradient(135deg, var(--primary-2), var(--violet));
  box-shadow: 0 6px 16px rgba(47, 107, 255, .3);
}
.avatar.sm { width: 26px; height: 26px; border-radius: 8px; font-size: 11px; box-shadow: none; }
.avatar.lg { width: 48px; height: 48px; border-radius: 14px; font-size: 17px; }

/* ================= 主区 ================= */
.main { flex: 1; min-width: 0; padding: 14px 18px 34px 14px; }

.topbar {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 18px; border-radius: var(--r-l); margin-bottom: 16px;
  position: sticky; top: 14px; z-index: 60;
}
.crumb { font-size: 13px; color: var(--muted); }
.crumb b { color: var(--text); font-size: 15px; font-weight: 700; }
.topbar .spacer { flex: 1; }
.clock { font-size: 13px; color: var(--text-2); font-variant-numeric: tabular-nums; font-weight: 600; }

.icon-btn {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .8); background: rgba(255, 255, 255, .55);
  color: var(--text-2); transition: all .2s; position: relative;
}
.icon-btn:hover { color: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-m); }
.icon-btn .dot { position: absolute; top: 7px; right: 8px; width: 7px; height: 7px; border-radius: 50%; background: var(--rose); border: 1.5px solid #fff; }

/* ================= 卡片 ================= */
.card { padding: 18px 20px; }
.card-hd { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.card-hd h3 { font-size: 14.5px; font-weight: 700; }
.card-hd .sub { font-size: 12px; color: var(--muted); }
.card-hd .spacer { flex: 1; }

.grid { display: grid; gap: 14px; }
.g-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.g-2-1 { grid-template-columns: 2fr 1fr; }
.g-1-2 { grid-template-columns: 1fr 2fr; }
.g-3-2 { grid-template-columns: 3fr 2fr; }

@media (max-width: 1500px) { .g-4, .g-5 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 1200px) { .g-2, .g-3, .g-2-1, .g-1-2, .g-3-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .layout { flex-direction: column; }
  .sidebar { width: auto; margin: 12px; height: auto; position: relative; top: 0; }
  .side-scroll { max-height: 260px; }
  .main { padding: 0 12px 24px; }
  .g-4, .g-5 { grid-template-columns: 1fr; }
}

/* ================= KPI 卡 ================= */
.kpi { padding: 16px 18px; overflow: hidden; transition: transform .3s cubic-bezier(.2,.8,.3,1), box-shadow .3s; }
.kpi:hover { transform: translateY(-5px) scale(1.012); box-shadow: var(--shadow-l); }
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--primary-2), var(--cyan));
}
.kpi.k2::before { background: linear-gradient(180deg, var(--mint), var(--cyan)); }
.kpi.k3::before { background: linear-gradient(180deg, var(--violet), var(--primary-2)); }
.kpi.k4::before { background: linear-gradient(180deg, var(--amber), var(--rose)); }
.kpi .k-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi .k-label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.kpi .k-ico {
  width: 34px; height: 34px; border-radius: 11px; display: grid; place-items: center; flex: none;
  background: linear-gradient(135deg, rgba(47,107,255,.16), rgba(34,199,214,.16));
  color: var(--primary);
}
.kpi.k2 .k-ico { background: linear-gradient(135deg, rgba(56,211,159,.18), rgba(34,199,214,.16)); color: #0d8f68; }
.kpi.k3 .k-ico { background: linear-gradient(135deg, rgba(123,97,255,.18), rgba(47,107,255,.14)); color: #5b3fd8; }
.kpi.k4 .k-ico { background: linear-gradient(135deg, rgba(255,176,32,.2), rgba(255,107,139,.16)); color: #b06f00; }
.kpi .k-val { font-size: 29px; font-weight: 700; letter-spacing: -.8px; margin-top: 8px; font-variant-numeric: tabular-nums; }
.kpi .k-val small { font-size: 14px; font-weight: 600; color: var(--muted); margin-left: 4px; letter-spacing: 0; }
.kpi .k-foot { display: flex; align-items: center; gap: 7px; margin-top: 6px; font-size: 12px; color: var(--muted); }
.trend { font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.trend.up { color: #d6353f; }
.trend.down { color: #12a06b; }

/* 迷你进度条 */
.bar { height: 6px; border-radius: 999px; background: rgba(140, 165, 205, .22); overflow: hidden; }
.bar > i { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--primary-2), var(--cyan)); transition: width .9s cubic-bezier(.2,.8,.3,1); }
.bar.mint > i { background: linear-gradient(90deg, var(--mint), var(--cyan)); }
.bar.violet > i { background: linear-gradient(90deg, var(--violet), var(--primary-2)); }
.bar.amber > i { background: linear-gradient(90deg, var(--amber), var(--rose)); }

/* ================= 大屏 ================= */
.screen {
  padding: 18px 20px;
  background: linear-gradient(140deg, rgba(255,255,255,.62), rgba(240,247,255,.5) 45%, rgba(238,240,255,.55));
}
.screen-hd { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.screen-hd h2 { font-size: 19px; font-weight: 800; letter-spacing: -.3px; color: var(--text); }
.screen-hd .live { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--muted); font-weight: 600; }

.map-box { position: relative; height: 460px; border-radius: var(--r-l); overflow: hidden; }
.map-box::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; border-radius: inherit;
  background: radial-gradient(circle at 50% 50%, rgba(47,107,255,.07), transparent 62%);
}
.map-legend {
  position: absolute; left: 14px; bottom: 14px; z-index: 5;
  display: flex; gap: 12px; padding: 8px 13px; border-radius: 12px; font-size: 11.5px;
  background: rgba(255,255,255,.72); backdrop-filter: blur(14px); border: 1px solid rgba(255,255,255,.9);
  box-shadow: var(--shadow-s); flex-wrap: wrap;
}
.map-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
.map-tip {
  position: absolute; right: 14px; top: 14px; z-index: 5; font-size: 11.5px; color: var(--muted);
  background: rgba(255,255,255,.7); padding: 6px 12px; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.9); backdrop-filter: blur(12px);
}

/* 实时监测列表 */
.monitor-list { max-height: 460px; overflow: hidden; position: relative; }
.monitor-row {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; border-radius: 12px;
  transition: all .25s; animation: fadeUp .45s both;
  border: 1px solid transparent;
}
.monitor-row:hover { background: rgba(255,255,255,.72); transform: translateX(4px); border-color: rgba(255,255,255,.95); }
.monitor-row .m-city { font-size: 11.5px; color: var(--muted); min-width: 54px; }
.monitor-row .m-name { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.monitor-row .m-dept { font-size: 11px; }
.monitor-row .m-time { font-size: 11px; color: var(--muted-2); margin-left: auto; font-variant-numeric: tabular-nums; }

.tick-scroll { max-height: 214px; overflow: hidden; }

/* ================= 表格 ================= */
.tbl-wrap { overflow-x: auto; border-radius: var(--r-m); }
table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 980px; }
table.tbl thead th {
  text-align: left; font-size: 12px; font-weight: 700; color: var(--text-2);
  padding: 11px 13px; background: rgba(255,255,255,.55);
  border-bottom: 1px solid rgba(150,175,215,.25);
  white-space: nowrap; position: sticky; top: 0; z-index: 2;
  backdrop-filter: blur(12px);
}
table.tbl thead th:first-child { border-radius: 12px 0 0 0; }
table.tbl thead th:last-child { border-radius: 0 12px 0 0; }
table.tbl tbody tr { transition: all .2s; cursor: pointer; }
table.tbl tbody tr:hover { background: rgba(255,255,255,.75); }
table.tbl tbody tr:hover td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
table.tbl tbody td { padding: 12px 13px; border-bottom: 1px solid rgba(150,175,215,.16); vertical-align: middle; }
table.tbl tbody tr:last-child td { border-bottom: 0; }
.cell-main { font-weight: 600; color: var(--text); }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.num { font-variant-numeric: tabular-nums; font-weight: 600; }
/* 主文字统一加深，避免玻璃材质下标题发灰、看不清 */
.cell-main, .t-title, .card-hd h3, .crumb b, .drawer-hd h3, .kb-hd h4, .qa .qt,
.monitor-row .m-name, .sec-title, .info-item .val, .hero-stat .v, .kpi .k-val,
.perm-tbl .cell-main, .side-brand .t1, .clock { color: var(--text); }

.pager { display: flex; align-items: center; gap: 8px; justify-content: flex-end; padding-top: 14px; font-size: 12.5px; color: var(--muted); }
.pager .btn { padding: 5px 11px; font-size: 12.5px; }

/* ================= 看板 ================= */
.kanban { display: grid; gap: 14px; grid-template-columns: repeat(4, minmax(250px, 1fr)); align-items: start; }
@media (max-width: 1250px) { .kanban { grid-template-columns: repeat(2, minmax(250px, 1fr)); } }
@media (max-width: 760px) { .kanban { grid-template-columns: 1fr; } }

.kb-col { padding: 14px; min-height: 180px; transition: background .25s, box-shadow .25s; }
.kb-col.drop-on { background: rgba(47,107,255,.10); box-shadow: inset 0 0 0 2px rgba(47,107,255,.35); }
.kb-hd { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.kb-hd .kb-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.kb-hd h4 { font-size: 13.5px; font-weight: 700; }
.kb-hd .cnt { font-size: 11.5px; color: var(--muted); background: rgba(255,255,255,.7); padding: 1px 8px; border-radius: 999px; font-weight: 700; }
.kb-body { display: flex; flex-direction: column; gap: 10px; }

.task-card {
  padding: 12px 13px; border-radius: 14px; cursor: grab;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: var(--shadow-s);
  transition: all .25s cubic-bezier(.2,.8,.3,1);
  animation: fadeUp .4s both;
}
.task-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: rgba(47,107,255,.35); }
.task-card.dragging { opacity: .45; transform: rotate(2deg) scale(.98); cursor: grabbing; }
.task-card .t-title { font-size: 13.5px; font-weight: 600; margin-bottom: 7px; line-height: 1.5; }
.task-card .t-meta { display: flex; align-items: center; gap: 7px; flex-wrap: wrap; font-size: 11.5px; color: var(--muted); }
.task-card .t-remark {
  margin-top: 9px; padding: 8px 10px; border-radius: 10px; font-size: 11.5px; line-height: 1.6;
  background: rgba(255, 176, 32, .1); border-left: 3px solid rgba(255,176,32,.6); color: #8a5d00;
}
.task-card .t-remark b { color: #6d4a00; }
.task-card .t-foot { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed rgba(150,175,215,.35); }
.task-card .t-bar { flex: 1; }

/* ================= 抽屉 ================= */
.mask {
  position: fixed; inset: 0; z-index: 900; background: rgba(23, 32, 51, .32);
  backdrop-filter: blur(4px); animation: fadeIn .25s both;
}
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 901;
  width: min(720px, 94vw);
  margin: 0;
  padding: 0;
  border-radius: 24px 0 0 24px;
  display: flex; flex-direction: column;
  animation: drawerIn .42s cubic-bezier(.2,.9,.3,1) both;
}
@keyframes drawerIn { from { transform: translateX(105%); opacity: .4; } to { transform: translateX(0); opacity: 1; } }
.drawer.out { animation: drawerOut .32s forwards; }
@keyframes drawerOut { to { transform: translateX(105%); opacity: 0; } }

.drawer-hd { padding: 20px 24px 16px; border-bottom: 1px solid rgba(150,175,215,.22); display: flex; align-items: flex-start; gap: 14px; }
.drawer-hd h3 { font-size: 17px; font-weight: 700; line-height: 1.45; }
.drawer-hd .sub { font-size: 12.5px; color: var(--muted); margin-top: 5px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 24px 30px; scroll-behavior: smooth; overscroll-behavior: contain; }
.drawer-ft { padding: 14px 24px; border-top: 1px solid rgba(150,175,215,.22); display: flex; gap: 10px; justify-content: flex-end; background: rgba(255,255,255,.4); border-radius: 0 0 0 24px; }

/* 滚动进度提示 */
.scroll-hint {
  position: absolute; right: 8px; top: 96px; width: 3px; height: 120px; border-radius: 3px;
  background: rgba(150,175,215,.25); overflow: hidden; pointer-events: none;
}
.scroll-hint > i { display: block; width: 100%; background: linear-gradient(180deg, var(--primary-2), var(--cyan)); border-radius: 3px; transition: transform .12s; }

.sec { margin-bottom: 22px; animation: fadeUp .45s both; }
.sec-title {
  display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--text-2);
  margin-bottom: 12px;
}
.sec-title::before { content: ""; width: 3px; height: 14px; border-radius: 2px; background: linear-gradient(180deg, var(--primary-2), var(--cyan)); }

.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 620px) { .info-grid { grid-template-columns: 1fr; } }
.info-item { padding: 12px 14px; border-radius: 13px; background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.9); }
.info-item .lbl { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; font-weight: 600; }
.info-item .val { font-size: 13.5px; font-weight: 600; word-break: break-all; }
.info-item.full { grid-column: 1 / -1; }

/* 时间轴 */
.timeline { position: relative; padding-left: 22px; }
.timeline::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(180deg, rgba(47,107,255,.5), rgba(34,199,214,.35), transparent); border-radius: 2px; }
.tl-item { position: relative; padding-bottom: 16px; }
.tl-item::before {
  content: ""; position: absolute; left: -21px; top: 5px; width: 10px; height: 10px; border-radius: 50%;
  background: #fff; border: 2.5px solid var(--primary-2); box-shadow: 0 0 0 3px rgba(47,107,255,.12);
}
.tl-item.done::before { border-color: var(--mint); box-shadow: 0 0 0 3px rgba(56,211,159,.15); }
.tl-item .tl-t { font-size: 13px; font-weight: 600; }
.tl-item .tl-d { font-size: 11.5px; color: var(--muted); margin-top: 2px; }

/* ================= 弹窗 ================= */
.modal {
  position: fixed; z-index: 950; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(680px, 94vw); max-height: 88vh; display: flex; flex-direction: column;
  animation: modalIn .38s cubic-bezier(.2,.9,.3,1.1) both;
  border-radius: var(--r-xl);
}
.modal.wide { width: min(880px, 96vw); }
.modal.narrow { width: min(460px, 94vw); }
.modal-hd { padding: 20px 24px 14px; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid rgba(150,175,215,.2); }
.modal-hd h3 { font-size: 16px; font-weight: 700; flex: 1; }
.modal-body { padding: 20px 24px; overflow-y: auto; }
.modal-ft { padding: 14px 24px 18px; display: flex; gap: 10px; justify-content: flex-end; border-top: 1px solid rgba(150,175,215,.2); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.form-grid .full { grid-column: 1 / -1; }
@media (max-width: 620px) { .form-grid { grid-template-columns: 1fr; } }

/* ================= 部门板块 ================= */
.dept-hero {
  padding: 22px 24px; border-radius: var(--r-xl); margin-bottom: 14px; position: relative; overflow: hidden;
  background: linear-gradient(120deg, rgba(255,255,255,.72), rgba(238,245,255,.55));
}
.dept-hero .dh-tag { font-size: 11.5px; font-weight: 700; letter-spacing: 1.2px; color: var(--primary); }
.dept-hero h2 { font-size: 22px; font-weight: 800; margin: 6px 0 8px; letter-spacing: -.4px; }
.dept-hero p { font-size: 13px; color: var(--text-2); max-width: 780px; margin: 0; line-height: 1.85; }
.dept-hero .dh-orb {
  position: absolute; right: -60px; top: -60px; width: 210px; height: 210px; border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, rgba(47,107,255,.28), rgba(34,199,214,.16) 60%, transparent 72%);
  filter: blur(6px); animation: floatBlob 16s ease-in-out infinite;
}
.dept-kpis { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 16px; position: relative; z-index: 2; }
@media (max-width: 900px) { .dept-kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } }
.dept-kpi { padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.9); }
.dept-kpi .v { font-size: 21px; font-weight: 700; color: var(--primary-deep); letter-spacing: -.4px; }
.dept-kpi .k { font-size: 11.5px; color: var(--muted); }

.chip-row { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  font-size: 12.5px; padding: 7px 14px; border-radius: 999px; cursor: pointer;
  background: rgba(255,255,255,.5); border: 1px solid rgba(255,255,255,.9); color: var(--text-2);
  transition: all .2s; font-weight: 500; font-family: var(--font-cn);
}
.chip:hover { transform: translateY(-2px); box-shadow: var(--shadow-s); color: var(--primary); }
.chip.on { background: linear-gradient(120deg, var(--primary-2), var(--primary)); color: #fff; border-color: transparent; box-shadow: var(--shadow-glow); }

/* 权限矩阵 */
.perm-tbl td { text-align: center; }
.perm-tbl td:first-child, .perm-tbl th:first-child { text-align: left; }
.switch { position: relative; display: inline-block; width: 42px; height: 23px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .sl {
  position: absolute; cursor: pointer; inset: 0; border-radius: 999px;
  background: rgba(150,175,215,.4); transition: .3s;
}
.switch .sl::before {
  content: ""; position: absolute; height: 17px; width: 17px; left: 3px; top: 3px; border-radius: 50%;
  background: #fff; transition: .3s cubic-bezier(.2,.9,.3,1.3); box-shadow: 0 1px 4px rgba(0,0,0,.2);
}
.switch input:checked + .sl { background: linear-gradient(120deg, var(--primary-2), var(--primary)); }
.switch input:checked + .sl::before { transform: translateX(19px); }
.switch input:disabled + .sl { opacity: .45; cursor: not-allowed; }

/* 空状态 */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty .ico { font-size: 40px; opacity: .35; margin-bottom: 10px; }

/* 骨架 */
.skeleton {
  background: linear-gradient(90deg, rgba(200,215,240,.28) 25%, rgba(220,232,250,.5) 37%, rgba(200,215,240,.28) 63%);
  background-size: 300% 100%;
  animation: shimmer 1.4s infinite linear;
  border-radius: 8px;
}

/* 加载动画 */
.spinner {
  width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.35); border-top-color: #fff;
  animation: spin .7s linear infinite;
}

/* 图表容器 */
.chart { width: 100%; }
.chart.h180 { height: 180px; }
.chart.h200 { height: 200px; }
.chart.h220 { height: 220px; }
.chart.h260 { height: 260px; }
.chart.h300 { height: 300px; }

/* 部门色带 */
.dept-activity { --dc: #ff8a3d; --dc2: #ffb020; }
.dept-design { --dc: #2f6bff; --dc2: #5b8cff; }
.dept-video { --dc: #7b61ff; --dc2: #a48cff; }
.dept-office { --dc: #38d39f; --dc2: #22c7d6; }
.dept-brand { --dc: #ff6b8b; --dc2: #ff9db3; }

.tag-dept {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 600;
  padding: 3px 10px; border-radius: 999px;
  background: color-mix(in srgb, var(--dc) 13%, transparent);
  color: var(--dc);
  border: 1px solid color-mix(in srgb, var(--dc) 26%, transparent);
}
.tag-dept i { width: 6px; height: 6px; border-radius: 50%; background: var(--dc); }

/* 项目进度环 */
.ring-wrap { display: flex; align-items: center; gap: 14px; }
.ring { position: relative; width: 64px; height: 64px; flex: none; }
.ring svg { transform: rotate(-90deg); }
.ring .rv { position: absolute; inset: 0; display: grid; place-items: center; font-size: 13.5px; font-weight: 700; }

/* 快捷操作 */
.quick-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.qa {
  display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; cursor: pointer;
  background: rgba(255,255,255,.6); border: 1px solid rgba(255,255,255,.9); transition: all .25s;
  font-family: var(--font-cn); text-align: left;
}
.qa:hover { transform: translateY(-3px); box-shadow: var(--shadow-m); border-color: rgba(47,107,255,.3); }
.qa .qi { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; background: linear-gradient(135deg, rgba(47,107,255,.15), rgba(34,199,214,.15)); color: var(--primary); }
.qa .qt { font-size: 13px; font-weight: 600; color: var(--text); }
.qa .qs { font-size: 11.5px; color: var(--muted); }

/* 可编辑标记 */
.editable-hint {
  font-size: 11px; color: var(--primary); background: rgba(47,107,255,.1); padding: 2px 8px; border-radius: 999px; font-weight: 600;
}
.locked-hint { font-size: 11px; color: var(--muted); background: rgba(100,116,139,.12); padding: 2px 8px; border-radius: 999px; font-weight: 600; }
