/* ============================================================
   简光OA · 智慧办公平台 — 全局样式
   设计语言:Apple HIG · 系统语义色 · 毛玻璃材质 · 克制动效
   ============================================================ */
:root {
  --accent: #0071e3;
  --accent-2: #0a84ff;
  --grad: linear-gradient(135deg, #0a84ff, #5e5ce6);
  --sidebar-bg: rgba(18, 18, 20, .82);
  --sidebar-text: #98989d;

  --bg: #f5f5f7;
  --card: #ffffff;
  --card-2: rgba(0, 0, 0, .03);
  --fill: rgba(120, 120, 128, .08);
  --fill-2: rgba(120, 120, 128, .12);
  --fill-3: rgba(120, 120, 128, .2);
  --border: rgba(0, 0, 0, .07);
  --text: #1d1d1f;
  --text-2: #6e6e73;
  --text-3: #aeaeb2;
  --green: #34c759;
  --red: #ff3b30;
  --orange: #ff9500;
  --blue-text: #0071e3;

  --shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 4px 14px rgba(0, 0, 0, .04);
  --shadow-lift: 0 8px 24px rgba(0, 0, 0, .1);
  --topbar-bg: rgba(245, 245, 247, .78);
  --input-bg: rgba(120, 120, 128, .08);
  --input-border: transparent;
  --input-text: var(--text);
  --btn2-bg: var(--fill);
  --btn2-color: var(--accent);
  --ghost-border: transparent;
  --ghost-color: var(--accent);
  --ghost-hover-bg: rgba(0, 113, 227, .08);
  --ghost-hover-color: var(--accent);
  --danger-bg: rgba(255, 59, 48, .1);
  --danger-text: #ff3b30;
  --success-bg: rgba(52, 199, 89, .12);
  --success-text: #248a3d;
  --th-bg: transparent;
  --row-border: rgba(60, 60, 67, .1);
  --hover-bg: rgba(120, 120, 128, .08);
  --li-icon-bg: rgba(0, 113, 227, .1);
  --tag-blue: rgba(0, 122, 255, .12);
  --tag-blue-text: #0069d9;
  --tag-green: rgba(52, 199, 89, .14);
  --tag-green-text: #248a3d;
  --tag-red: rgba(255, 59, 48, .12);
  --tag-red-text: #d70015;
  --tag-orange: rgba(255, 149, 0, .15);
  --tag-orange-text: #c93400;
  --tag-gray: rgba(120, 120, 128, .12);
  --tag-gray-text: #6e6e73;
  --chip-bg: var(--fill);
  --chip-border: transparent;
  --chip-color: var(--text-2);
  --chip-checked-text: var(--accent);
  --tl-body-bg: var(--card);
  --tl-date-bg: var(--fill);
  --tl-date-color: var(--text-2);
  --typeopt-bg: var(--card);
  --typeopt-active-text: var(--accent);
  --modal-bg: rgba(255, 255, 255, .8);
  --tab-active-bg: var(--card);
  --tab-active-text: var(--text);
  --avatar-ring: var(--card);
  --upload-border: rgba(0, 113, 227, .45);
  --upload-color: var(--accent);
  --upload-bg: rgba(0, 113, 227, .05);
  --scroll-thumb: rgba(0, 0, 0, .18);

  color-scheme: light;
}
html[data-theme="dark"] {
  --bg: #050507;
  --card: #1c1c1e;
  --card-2: #2c2c2e;
  --fill: rgba(120, 120, 128, .18);
  --fill-2: rgba(120, 120, 128, .24);
  --fill-3: rgba(120, 120, 128, .32);
  --border: rgba(255, 255, 255, .08);
  --text: #f5f5f7;
  --text-2: #98989d;
  --text-3: #636366;
  --blue-text: #409cff;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 22px rgba(0, 0, 0, .3);
  --shadow-lift: 0 10px 30px rgba(0, 0, 0, .5);
  --topbar-bg: rgba(10, 10, 12, .72);
  --input-bg: rgba(120, 120, 128, .16);
  --input-border: rgba(255, 255, 255, .1);
  --input-text: #f5f5f7;
  --btn2-bg: rgba(10, 132, 255, .16);
  --btn2-color: #409cff;
  --ghost-border: rgba(255, 255, 255, .14);
  --ghost-color: #d1d1d6;
  --ghost-hover-bg: rgba(120, 120, 128, .14);
  --ghost-hover-color: #fff;
  --danger-bg: rgba(255, 69, 58, .16);
  --danger-text: #ff6961;
  --success-bg: rgba(48, 209, 88, .16);
  --success-text: #30d158;
  --th-bg: transparent;
  --row-border: rgba(255, 255, 255, .07);
  --hover-bg: rgba(120, 120, 128, .12);
  --li-icon-bg: rgba(10, 132, 255, .18);
  --tag-blue: rgba(10, 132, 255, .2);
  --tag-blue-text: #64a8ff;
  --tag-green: rgba(48, 209, 88, .18);
  --tag-green-text: #4cd964;
  --tag-red: rgba(255, 69, 58, .18);
  --tag-red-text: #ff6961;
  --tag-orange: rgba(255, 159, 10, .18);
  --tag-orange-text: #ffb340;
  --tag-gray: rgba(142, 142, 147, .18);
  --tag-gray-text: #c7c7cc;
  --chip-bg: rgba(120, 120, 128, .2);
  --chip-border: transparent;
  --chip-color: #c7c7cc;
  --chip-checked-text: #409cff;
  --tl-body-bg: rgba(255, 255, 255, .04);
  --tl-date-bg: rgba(120, 120, 128, .14);
  --tl-date-color: #d1d1d6;
  --typeopt-bg: rgba(255, 255, 255, .04);
  --typeopt-active-text: #409cff;
  --modal-bg: rgba(28, 28, 30, .86);
  --tab-active-bg: rgba(120, 120, 128, .28);
  --tab-active-text: #fff;
  --avatar-ring: #1c1c1e;
  --upload-border: rgba(10, 132, 255, .5);
  --upload-color: #409cff;
  --upload-bg: rgba(10, 132, 255, .1);
  --scroll-thumb: rgba(255, 255, 255, .22);

  color-scheme: dark;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
::selection { background: rgba(10, 132, 255, .25); }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--scroll-thumb); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text); font-size: 14px;
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }
button { cursor: pointer; font-family: inherit; }
svg.ic { width: 20px; height: 20px; flex-shrink: 0; display: inline-block; vertical-align: -0.28em; }
svg.ic.sm { width: 16px; height: 16px; }
svg.ic.lg { width: 26px; height: 26px; }

input, select, textarea {
  font-family: inherit; font-size: 14px; padding: 9px 12px;
  border: 1px solid transparent; border-radius: 10px; outline: none;
  background: var(--input-bg); color: var(--input-text);
  width: 100%; transition: border-color .18s, box-shadow .18s, background .18s;
}
input::placeholder, textarea::placeholder { color: var(--text-3); }
select option { background: var(--card); color: var(--text); }
input:focus, select:focus, textarea:focus {
  border-color: var(--accent-2); background: var(--card);
  box-shadow: 0 0 0 3.5px rgba(10, 132, 255, .18);
}
textarea { resize: vertical; min-height: 90px; }

/* ---------- 按钮:胶囊 / 色调 / 幽灵 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 980px; padding: 7px 16px;
  font-size: 14px; font-weight: 500; background: var(--fill); color: var(--text);
  transition: transform .12s ease, filter .15s, background .15s, opacity .15s;
}
.btn:hover { filter: brightness(1.05); }
.btn:active { transform: scale(.965); }
.btn .ic { width: 15px; height: 15px; }
.btn.primary { background: var(--accent); color: #fff; box-shadow: 0 2px 10px rgba(0, 113, 227, .28); }
.btn.primary:hover { background: #0077ed; transform: translateY(-1px); box-shadow: 0 6px 18px rgba(0, 113, 227, .36); }
.btn.primary:active { transform: scale(.97); }
.btn.danger { background: var(--danger-bg); color: var(--danger-text); }
.btn.success { background: var(--success-bg); color: var(--success-text); }
.btn.ghost { background: var(--fill); border-color: transparent; color: var(--text-2); }
.btn.ghost:hover { background: var(--fill-2); color: var(--text); }
.btn.sm { padding: 4px 12px; font-size: 13px; }
.btn.block { display: block; width: 100%; padding: 12px; font-size: 15px; letter-spacing: 2px; }
.btn:disabled { opacity: .4; cursor: not-allowed; transform: none !important; }

/* ---------- 登录页(Apple 风格) ---------- */
.login-wrap {
  min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  position: relative; overflow: hidden; padding: 24px; background: var(--bg);
}
.login-bg { position: absolute; inset: 0; }
.lb { position: absolute; border-radius: 50%; filter: blur(90px); opacity: .45; animation: lb-drift 17s ease-in-out infinite; }
.lb1 { width: 560px; height: 560px; left: -150px; top: -170px; background: #0a84ff; }
.lb2 { width: 500px; height: 500px; right: -140px; top: 6%; background: #5e5ce6; animation-delay: -4s; }
.lb3 { width: 520px; height: 520px; right: 4%; bottom: -230px; background: #ff375f; opacity: .34; animation-delay: -8s; }
.lb4 { width: 430px; height: 430px; left: 8%; bottom: -170px; background: #ff9f0a; opacity: .3; animation-delay: -12s; }
@keyframes lb-drift { 0%, 100% { transform: translate(0, 0) scale(1); } 50% { transform: translate(38px, -30px) scale(1.09); } }
html[data-theme="dark"] .lb { opacity: .3; }
html[data-theme="dark"] .lb3 { opacity: .2; }
html[data-theme="dark"] .lb4 { opacity: .18; }
.login-card {
  width: 400px; max-width: 100%; position: relative; z-index: 1;
  background: var(--modal-bg); border: .5px solid var(--border);
  border-radius: 28px; padding: 44px 38px 26px;
  backdrop-filter: blur(40px) saturate(1.7); -webkit-backdrop-filter: blur(40px) saturate(1.7);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .2);
  text-align: center;
  animation: login-in .6s cubic-bezier(.2, .7, .2, 1) both;
}
@keyframes login-in { from { opacity: 0; transform: translateY(20px) scale(.96); } to { opacity: 1; transform: none; } }
.login-logo {
  width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 22px;
  background: var(--grad); color: #fff; font-size: 36px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 14px 34px rgba(10, 132, 255, .4), inset 0 1px 0 rgba(255, 255, 255, .35);
  animation: logo-float 4.5s ease-in-out infinite;
}
@keyframes logo-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
.login-card h1 { font-size: 27px; margin: 0 0 6px; font-weight: 700; letter-spacing: 1px; }
.login-sub { color: var(--text-2); font-size: 13px; margin-bottom: 28px; letter-spacing: 2px; }
.login-fields {
  background: var(--input-bg); border: .5px solid var(--border); border-radius: 14px;
  overflow: hidden; transition: box-shadow .18s, border-color .18s;
}
.login-fields:focus-within { border-color: var(--accent-2); box-shadow: 0 0 0 4px rgba(10, 132, 255, .16); }
.login-fields input {
  display: block; width: 100%; border: none; outline: none; background: transparent;
  padding: 14px 16px; font-size: 15.5px; color: var(--input-text);
}
.login-fields input::placeholder { color: var(--text-3); }
.lf-line { height: .5px; background: var(--border); margin: 0 16px; }
.login-go {
  width: 100%; margin-top: 18px; padding: 13px; border: none; border-radius: 13px;
  background: var(--accent); color: #fff; font-size: 16px; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: transform .12s, filter .18s;
}
.login-go:hover { filter: brightness(1.08); }
.login-go:active { transform: scale(.98); }
.login-go:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.login-demo { margin-top: 24px; padding-top: 16px; border-top: .5px solid var(--row-border); font-size: 12px; color: var(--text-2); }
.demo-btns { display: flex; gap: 8px; justify-content: center; margin-top: 10px; flex-wrap: wrap; }
.login-foot { position: relative; z-index: 1; margin-top: 26px; font-size: 12px; color: var(--text-2); opacity: .85; }
.theme-fab {
  position: absolute; top: 20px; right: 20px; z-index: 2; width: 42px; height: 42px;
  border-radius: 50%; cursor: pointer; border: .5px solid var(--border);
  background: var(--modal-bg); color: var(--text);
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .14); transition: transform .15s;
}
.theme-fab:hover { transform: scale(1.07); }
.theme-fab .ic { width: 19px; height: 19px; }

/* 置顶按钮(已置顶状态高亮) */
.btn.ghost.pin-btn.on { background: rgba(255, 149, 0, .14); color: var(--orange); }

/* ---------- 布局 ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar {
  width: 216px; background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; position: fixed; inset: 0 auto 0 0;
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border-right: 1px solid var(--border);
  z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 11px; padding: 20px 18px 16px;
  color: #f5f5f7;
}
.brand-logo {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  background: var(--grad); color: #fff; font-size: 16px; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 4px 14px rgba(10, 132, 255, .4);
}
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .5px; }
#nav { flex: 1; padding: 4px 10px; overflow-y: auto; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 10px 12px; margin-bottom: 2px;
  border-radius: 10px; color: var(--sidebar-text); cursor: pointer; font-size: 14px;
  transition: background .16s, color .16s; position: relative;
}
.nav-item .ic { width: 19px; height: 19px; transition: transform .18s cubic-bezier(.3, 1.4, .4, 1); }
.nav-item:hover { color: #f5f5f7; background: rgba(255, 255, 255, .07); }
.nav-item:hover .ic { transform: scale(1.08); }
.nav-item.active { background: var(--accent-2); color: #fff; font-weight: 500; box-shadow: 0 4px 14px rgba(10, 132, 255, .35); }
.nav-item.active .ic { color: #fff; }
.nav-item .nav-badge {
  position: absolute; right: 12px; background: var(--red); color: #fff;
  font-size: 11px; min-width: 18px; height: 18px; line-height: 18px; text-align: center;
  border-radius: 9px; padding: 0 4px; font-weight: 600;
}
.sidebar-foot { padding: 14px 20px; font-size: 11px; opacity: .4; letter-spacing: .5px; }
.main { flex: 1; margin-left: 216px; display: flex; flex-direction: column; min-width: 0; }
.topbar {
  height: 60px; background: var(--topbar-bg);
  backdrop-filter: blur(24px) saturate(1.6); -webkit-backdrop-filter: blur(24px) saturate(1.6);
  border-bottom: 1px solid var(--border);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 24px; position: sticky; top: 0; z-index: 10;
}
.topbar h2 { font-size: 18px; font-weight: 700; letter-spacing: .2px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-chip { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); cursor: pointer; border-radius: 980px; padding: 4px 10px 4px 4px; transition: background .15s; }
.user-chip:hover { background: var(--fill); }
.avatar {
  width: 30px; height: 30px; border-radius: 50%;
  background: var(--grad); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600;
  box-shadow: 0 2px 8px rgba(10, 132, 255, .3);
}
.badge-dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red); display: inline-block;
  box-shadow: 0 0 0 3px rgba(255, 59, 48, .16); animation: pulse 1.8s ease-in-out infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.3); opacity: .75; } }
.content { padding: 26px 28px 40px; max-width: 1160px; width: 100%; margin: 0 auto; }
#content > .card, #content > .stat-row, #content > .grid, #content > .row, #content > .tabs, #content > .form-card {
  animation: view-in .34s cubic-bezier(.2, .7, .25, 1) both;
}
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* ---------- 通用组件 ---------- */
.card {
  background: var(--card); border-radius: 16px;
  border: 1px solid var(--border); box-shadow: var(--shadow); padding: 22px;
}
.card + .card { margin-top: 16px; }
.card-title {
  font-size: 16px; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: space-between;
}
.card-title .ic { width: 19px; height: 19px; color: var(--accent-2); margin-right: 2px; }
.grid { display: grid; gap: 16px; }
.stat-row { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 16px; }
.stat-card {
  background: var(--card); border-radius: 16px;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  padding: 18px 20px; display: flex; gap: 14px; align-items: center;
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s;
  animation: rise .4s cubic-bezier(.2, .7, .3, 1) both;
}
.stat-card:nth-child(2) { animation-delay: .05s; }
.stat-card:nth-child(3) { animation-delay: .1s; }
.stat-card:nth-child(4) { animation-delay: .15s; }
.stat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lift); }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.stat-icon {
  width: 44px; height: 44px; border-radius: 12px;
  display: flex; align-items: center; justify-content: center; font-size: 21px;
}
.stat-icon .ic { width: 22px; height: 22px; color: #fff; }
.stat-num { font-size: 24px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; letter-spacing: -.4px; }
.stat-label { font-size: 12px; color: var(--text-2); margin-top: 2px; }

.tag { display: inline-flex; align-items: center; padding: 2px 9px; border-radius: 999px; font-size: 12px; line-height: 18px; font-weight: 500; }
.tag.blue { background: var(--tag-blue); color: var(--tag-blue-text); }
.tag.green { background: var(--tag-green); color: var(--tag-green-text); }
.tag.red { background: var(--tag-red); color: var(--tag-red-text); }
.tag.orange { background: var(--tag-orange); color: var(--tag-orange-text); }
.tag.gray { background: var(--tag-gray); color: var(--tag-gray-text); }

table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; color: var(--text-2); font-weight: 500;
  padding: 8px 12px;
  border-bottom: 1px solid var(--row-border);
}
.tbl td { padding: 11px 12px; border-bottom: 1px solid var(--row-border); }
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: var(--hover-bg); }

.empty { text-align: center; color: var(--text-2); padding: 44px 0; font-size: 13px; }
.empty .empty-icon { display: flex; justify-content: center; margin-bottom: 10px; color: var(--text-3); }
.empty .empty-icon .ic { width: 34px; height: 34px; }
.row { display: flex; align-items: center; gap: 10px; }
.spacer { flex: 1; }
.muted { color: var(--text-2); font-size: 12px; }
.search-box { max-width: 280px; }

/* ---------- 列表条目 ---------- */
.list-item {
  display: flex; gap: 12px; align-items: flex-start; padding: 12px 8px;
  border-bottom: 1px solid var(--row-border); cursor: pointer; border-radius: 10px;
  transition: background .15s;
}
.list-item:last-child { border-bottom: none; }
.list-item:hover { background: var(--hover-bg); }
.list-item .li-icon {
  width: 36px; height: 36px; border-radius: 10px; background: var(--li-icon-bg);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.list-item .li-icon .ic { width: 18px; height: 18px; color: var(--accent-2); }
.list-item .li-title { font-weight: 500; margin-bottom: 3px; }
.list-item .li-sub { color: var(--text-2); font-size: 12px; }

/* ---------- 分段控件 ---------- */
.tabs {
  display: inline-flex; gap: 2px; background: var(--fill); padding: 3px;
  border-radius: 10px; margin-bottom: 16px;
}
.tab {
  padding: 5px 16px; border-radius: 8px; font-size: 13px;
  color: var(--text-2); border: none; background: transparent;
  transition: background .18s, color .18s, box-shadow .18s; font-weight: 500;
}
.tab.active {
  background: var(--tab-active-bg); color: var(--tab-active-text); font-weight: 600;
  box-shadow: 0 1px 4px rgba(0, 0, 0, .14);
}
.apv-card {
  background: var(--card); border-radius: 14px; border: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 16px 20px; margin-bottom: 12px;
  animation: rise .38s cubic-bezier(.2, .7, .3, 1) both;
}
.apv-card:nth-child(2) { animation-delay: .04s; }
.apv-card:nth-child(3) { animation-delay: .08s; }
.apv-head { display: flex; align-items: center; gap: 10px; }
.apv-title { font-weight: 600; font-size: 14px; }
.apv-meta { color: var(--text-2); font-size: 12px; margin-top: 6px; line-height: 1.7; }
.apv-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--row-border); }

/* ---------- 考勤 ---------- */
.clock-card {
  background:
    radial-gradient(420px 220px at 88% -30%, rgba(10, 132, 255, .3), transparent 70%),
    var(--card);
  border: 1px solid var(--border);
  color: var(--text); border-radius: 20px; padding: 34px; text-align: center; margin-bottom: 16px;
  box-shadow: var(--shadow);
}
html[data-theme="dark"] .clock-card {
  background:
    radial-gradient(420px 220px at 88% -30%, rgba(10, 132, 255, .22), transparent 70%),
    var(--card);
}
.clock-time {
  font-size: 52px; font-weight: 700; font-variant-numeric: tabular-nums;
  letter-spacing: 2px; color: var(--accent-2);
}
html[data-theme="light"] .clock-time { color: #0071e3; }
.clock-date { opacity: .6; margin: 4px 0 22px; letter-spacing: 1px; }
.clock-btn {
  width: 118px; height: 118px; border-radius: 50%;
  border: none; background: var(--accent); color: #fff;
  font-size: 16px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 113, 227, .35);
  transition: transform .18s cubic-bezier(.3, 1.4, .4, 1), box-shadow .18s;
}
.clock-btn:hover:not(:disabled) { transform: scale(1.06); box-shadow: 0 14px 38px rgba(0, 113, 227, .45); }
.clock-btn:active:not(:disabled) { transform: scale(.97); }
.clock-btn:disabled { background: var(--fill); color: var(--text-3); box-shadow: none; cursor: not-allowed; }
.clock-status { margin-top: 16px; font-size: 13px; color: var(--text-2); }

/* ---------- 通讯录 ---------- */
.dept-group { margin-bottom: 20px; }
.dept-name { font-size: 13px; color: var(--text-2); margin-bottom: 8px; font-weight: 600; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.contact-card {
  background: var(--card); border-radius: 14px; border: 1px solid var(--border);
  box-shadow: var(--shadow); padding: 14px; display: flex; gap: 12px; align-items: center;
  transition: transform .18s, box-shadow .18s;
  animation: rise .35s cubic-bezier(.2, .7, .3, 1) both;
}
.contact-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-lift); }
.contact-card .avatar { width: 40px; height: 40px; font-size: 14px; border-radius: 12px; flex-shrink: 0; }
.contact-name { font-weight: 600; }
.contact-info { font-size: 12px; color: var(--text-2); margin-top: 2px; line-height: 1.5; }
.contact-info .ic { width: 12px; height: 12px; vertical-align: -0.15em; }

/* ---------- 弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .42);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  animation: fade-in .18s ease both;
}
@keyframes fade-in { from { opacity: 0; } to { opacity: 1; } }
.modal {
  background: var(--modal-bg); border: 1px solid var(--border);
  border-radius: 18px; width: 520px; max-width: 100%;
  max-height: 86vh; display: flex; flex-direction: column;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .35);
  animation: modal-in .24s cubic-bezier(.2, .9, .3, 1.05) both;
  backdrop-filter: blur(30px); -webkit-backdrop-filter: blur(30px);
}
@keyframes modal-in { from { opacity: 0; transform: translateY(14px) scale(.97); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--row-border); }
.modal-head h3 { font-size: 16px; font-weight: 600; }
.modal-close {
  border: none; background: var(--fill); color: var(--text-2);
  width: 26px; height: 26px; border-radius: 50%; font-size: 12px;
  display: flex; align-items: center; justify-content: center;
  transition: background .15s, color .15s;
}
.modal-close:hover { background: var(--fill-2); color: var(--text); }
.modal-body { padding: 20px; overflow-y: auto; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--row-border); display: flex; justify-content: flex-end; gap: 10px; }

/* ---------- Toast ---------- */
#toast-box { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; align-items: center; gap: 8px; }
.toast {
  background: var(--topbar-bg); color: var(--text); padding: 10px 22px; border-radius: 980px; font-size: 13px;
  border: 1px solid var(--border);
  backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 10px 34px rgba(0, 0, 0, .22); animation: toast-in .3s cubic-bezier(.2, .9, .3, 1.1) both;
  font-weight: 500;
}
.toast.err { background: rgba(255, 59, 48, .92); border-color: transparent; color: #fff; }
.toast.ok { background: rgba(48, 209, 88, .92); border-color: transparent; color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-14px) scale(.94); } to { opacity: 1; transform: none; } }

/* ---------- 公告 ---------- */
.ann-item { padding: 13px 8px; border-bottom: 1px solid var(--row-border); cursor: pointer; border-radius: 10px; transition: background .15s; }
.ann-item:last-child { border-bottom: none; }
.ann-item:hover { background: var(--hover-bg); }
.ann-title { font-weight: 600; display: flex; align-items: center; gap: 8px; }
.ann-meta { color: var(--text-2); font-size: 12px; margin-top: 5px; }
.ann-content { white-space: pre-wrap; line-height: 1.9; font-size: 14px; }

/* ---------- 表单页 ---------- */
.form-card { max-width: 620px; }
.type-select { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 18px; }
.type-opt {
  border: 1.5px solid var(--border); border-radius: 13px; padding: 12px 8px; text-align: center;
  cursor: pointer; transition: all .18s cubic-bezier(.2, .7, .3, 1); font-size: 13px; background: var(--typeopt-bg); color: var(--text);
}
.type-opt .t-icon { font-size: 22px; display: block; margin-bottom: 4px; }
.type-opt:hover { transform: translateY(-1px); }
.type-opt.active {
  border-color: var(--accent-2);
  background: rgba(10, 132, 255, .08);
  color: var(--typeopt-active-text); font-weight: 600;
  box-shadow: 0 4px 18px rgba(10, 132, 255, .16);
}

/* ---------- 项目 ---------- */
.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.proj-card {
  border: 1px solid var(--border); border-radius: 16px; padding: 16px;
  cursor: pointer; background: var(--card);
  transition: transform .22s cubic-bezier(.2, .7, .3, 1), box-shadow .22s, border-color .22s;
  animation: rise .42s cubic-bezier(.2, .7, .3, 1) both;
}
.proj-card:nth-child(2) { animation-delay: .05s; }
.proj-card:nth-child(3) { animation-delay: .1s; }
.proj-card:nth-child(4) { animation-delay: .15s; }
.proj-card:nth-child(5) { animation-delay: .2s; }
.proj-card:nth-child(6) { animation-delay: .25s; }
.proj-card:hover {
  border-color: rgba(10, 132, 255, .5);
  box-shadow: var(--shadow-lift); transform: translateY(-3px) scale(1.005);
}
.proj-card:hover .ic { transform: none; }
.proj-card.pinned { border-color: rgba(255, 149, 0, .5); }
.avatar-stack { display: flex; }
.avatar-stack .avatar { width: 25px; height: 25px; font-size: 10px; border: 2px solid var(--avatar-ring); margin-left: -7px; border-radius: 50%; box-shadow: none; }
.avatar-stack .avatar:first-child { margin-left: 0; }
.task-item { display: flex; align-items: center; gap: 10px; padding: 11px 2px; border-bottom: 1px solid var(--row-border); }
.task-item:last-child { border-bottom: none; }
.task-title { flex: 1; min-width: 0; font-weight: 500; }
.task-title .muted { font-weight: 400; margin-top: 2px; }
.done-title { text-decoration: line-through; color: var(--text-2); }

/* ---------- 进度时间线 ---------- */
.tl-form { border: 1px solid var(--border); border-radius: 13px; padding: 14px 16px; background: var(--card-2); }
.chip-group { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1px solid var(--chip-border); border-radius: 999px; padding: 4px 13px; font-size: 13px;
  cursor: pointer; user-select: none; color: var(--chip-color); background: var(--chip-bg);
  transition: all .16s cubic-bezier(.2, .7, .3, 1); font-weight: 500;
}
.chip:hover { transform: translateY(-1px); }
.chip input { position: absolute; opacity: 0; width: 0; height: 0; pointer-events: none; }
.chip { position: relative; display: inline-flex; align-items: center; gap: 5px; }
.chip .ic { width: 14px; height: 14px; }
.chip:has(input:checked) {
  background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600;
  box-shadow: 0 3px 12px rgba(10, 132, 255, .32);
}
.timeline { position: relative; margin-top: 16px; padding-left: 26px; }
.timeline::before {
  content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 1.5px;
  background: linear-gradient(180deg, var(--accent-2), var(--border));
}
.tl-date {
  display: inline-block; font-weight: 600; font-size: 13px; color: var(--text-2);
  background: var(--tl-date-bg); padding: 3px 14px; border-radius: 999px; margin: 8px 0 10px -26px;
}
.tl-item { position: relative; padding: 0 0 16px 14px; }
.tl-dot {
  position: absolute; left: -22px; top: 8px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent-2); box-shadow: 0 0 0 3.5px var(--bg), 0 0 12px rgba(10, 132, 255, .5);
}
.tl-body { background: var(--tl-body-bg); border: 1px solid var(--border); border-radius: 13px; padding: 12px 14px; transition: box-shadow .18s; }
.tl-body:hover { box-shadow: var(--shadow-lift); }
.tl-content { margin-top: 6px; line-height: 1.75; }

/* ---------- 图片凭证 ---------- */
.img-preview { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.img-preview:empty { margin-bottom: 0; }
.img-thumb {
  position: relative; width: 72px; height: 72px; border-radius: 10px;
  overflow: hidden; border: 1px solid var(--border);
}
.img-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-del {
  position: absolute; top: 3px; right: 3px; width: 18px; height: 18px; border-radius: 50%;
  border: none; background: rgba(0, 0, 0, .55); color: #fff; font-size: 10px;
  line-height: 18px; padding: 0; text-align: center;
}
.img-del:hover { background: var(--red); }
.img-upload-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 1.5px dashed var(--upload-border); color: var(--upload-color);
  border-radius: 11px; padding: 9px 16px; font-size: 13px; cursor: pointer;
  background: var(--upload-bg); transition: all .16s; font-weight: 500;
}
.img-upload-btn:hover { background: rgba(10, 132, 255, .12); border-color: var(--accent-2); transform: translateY(-1px); }
.img-upload-btn .ic { width: 15px; height: 15px; }
.apv-images { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 9px; }
.apv-img {
  width: 62px; height: 62px; object-fit: cover; border-radius: 9px;
  border: 1px solid var(--border); cursor: zoom-in; transition: transform .18s cubic-bezier(.2, .7, .3, 1);
}
.apv-img:hover { transform: scale(1.07); box-shadow: 0 6px 18px rgba(0, 0, 0, .22); z-index: 1; position: relative; }
.img-viewer { display: flex; flex-direction: column; gap: 10px; }
.img-viewer img { width: 100%; border-radius: 12px; border: 1px solid var(--border); }

/* ---------- 登录页快速按钮 ---------- */
.login-card .btn.ghost {
  color: var(--text-2); border-color: var(--border); background: var(--card);
}
.login-card .btn.ghost:hover { color: var(--accent); border-color: var(--accent-2); background: var(--upload-bg); }

@media (max-width: 900px) {
  .stat-row { grid-template-columns: repeat(2, 1fr); }
  .sidebar { width: 64px; }
  .main { margin-left: 64px; }
  .brand span:not(.brand-logo), .nav-item span:not(.nav-badge), .sidebar-foot { display: none; }
  .nav-item { justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}


/* ---------- 横向时间线(日期横轴 × 部门泳道) ---------- */
.htl-scroll { overflow-x: auto; padding-bottom: 8px; }
.htl-grid { display: grid; min-width: 100%; }
.htl-corner {
  position: sticky; left: 0; z-index: 2; background: var(--card);
  padding: 9px 12px; font-size: 12px; color: var(--text-2); white-space: nowrap;
  border-bottom: 2px solid var(--accent-2);
}
.htl-date {
  text-align: center; font-weight: 600; font-size: 12.5px; color: var(--text);
  padding: 9px 10px; white-space: nowrap;
  border-bottom: 2px solid var(--accent-2);
  position: relative;
}
.htl-date::after {
  content: ''; position: absolute; left: 50%; bottom: -5px; transform: translateX(-50%);
  width: 7px; height: 7px; border-radius: 50%; background: var(--accent-2);
}
.htl-lane {
  position: sticky; left: 0; z-index: 1; background: var(--card);
  padding: 14px 12px; font-weight: 600; font-size: 13px; white-space: nowrap;
  border-right: 1px solid var(--row-border); border-top: 1px solid var(--row-border);
}
.htl-cell {
  padding: 12px 10px; border-top: 1px solid var(--row-border);
  border-left: 1px dashed var(--row-border); min-width: 190px; min-height: 68px;
}
.htl-pt {
  display: inline-flex; flex-direction: column; align-items: center; gap: 3px;
  cursor: pointer; padding: 5px 8px; border-radius: 10px; transition: background .15s;
}
.htl-pt:hover { background: var(--hover-bg); }
.htl-pt .avatar { width: 27px; height: 27px; font-size: 10px; }
.htl-ptname { font-size: 11.5px; color: var(--text-2); font-weight: 500; white-space: nowrap; }
.htl-pt.open .htl-ptname { color: var(--accent); font-weight: 600; }
.htl-detail {
  margin-top: 8px; background: var(--card-2); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 11px; font-size: 12.5px; line-height: 1.65;
  animation: view-in .22s cubic-bezier(.2, .7, .25, 1) both;
}
.htl-detail[hidden] { display: none; }
.htl-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.htl-text { white-space: pre-wrap; word-break: break-word; }


/* ---------- v3:放大布局 ---------- */
body { font-size: 14.5px; }
.sidebar { width: 234px; }
.main { margin-left: 234px; }
.brand { padding: 22px 18px 18px; }
.brand-logo { width: 36px; height: 36px; border-radius: 11px; font-size: 17px; }
.brand-name { font-size: 18px; }
.nav-item { font-size: 15px; padding: 11px 13px; gap: 12px; }
.nav-item .ic { width: 20px; height: 20px; }
.sidebar-foot { font-size: 12px; }
.topbar { height: 64px; padding: 0 28px; }
.topbar h2 { font-size: 19px; }
.content { max-width: 1380px; padding: 28px 32px 48px; }
.card { padding: 24px; }
.card-title { font-size: 16.5px; margin-bottom: 18px; }
.stat-num { font-size: 27px; }
.stat-label { font-size: 12.5px; }
input, select, textarea { font-size: 14.5px; padding: 10px 12px; }
.tbl { font-size: 13.5px; }
.btn { font-size: 14.5px; }
@media (max-width: 900px) {
  .sidebar { width: 64px; }
  .main { margin-left: 64px; }
}

/* ---------- 时间进度条 ---------- */
.tpbar { height: 12px; background: var(--fill); border-radius: 999px; overflow: hidden; margin: 10px 0 7px; }
.tpbar > i { display: block; height: 100%; background: var(--grad); border-radius: 999px; transition: width .5s cubic-bezier(.2,.7,.3,1); }
.tpbar-dates { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); }

/* ---------- 日历时间线 ---------- */
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-title { font-weight: 700; font-size: 16px; min-width: 110px; text-align: center; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 7px; }
.cal-dow { text-align: center; font-size: 12.5px; color: var(--text-2); font-weight: 600; padding: 4px 0 6px; }
.cal-cell { min-height: 104px; border: 1px solid var(--border); border-radius: 12px; padding: 8px 9px; background: var(--card); transition: border-color .15s, box-shadow .15s; }
.cal-cell:hover { border-color: rgba(10, 132, 255, .4); }
.cal-cell.dim { opacity: .38; }
.cal-cell.today { border-color: var(--accent-2); box-shadow: 0 0 0 2.5px rgba(10, 132, 255, .16); }
.cal-cell.has-log { background: var(--card-2, var(--card)); border-color: rgba(10, 132, 255, .3); }
.cal-num { font-size: 13px; font-weight: 600; color: var(--text-2); margin-bottom: 6px; }
.cal-cell.has-log .cal-num { color: var(--accent-2); }
.cal-people { display: flex; flex-direction: column; gap: 4px; }
.cal-person {
  display: flex; align-items: center; gap: 6px; padding: 4px 7px; border-radius: 9px;
  cursor: pointer; background: var(--fill); border: none; width: 100%; text-align: left;
  transition: background .15s, transform .12s; font-family: inherit;
}
.cal-person:hover { background: var(--fill-2); transform: translateX(2px); }
.cal-person .avatar { width: 22px; height: 22px; font-size: 10px; border-radius: 50%; box-shadow: none; }
.cal-person .cp-name { font-size: 12.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--text); flex: 1; }
.cal-multi { font-size: 11px; color: var(--text-3); }

/* ===== 软蓝金融风(按参考图像素扫描校准) ===== */
:root {
  --accent: #3b3b40;
  --accent-2: #7ea6e8;
  --grad: linear-gradient(135deg, #414146, #232327);
  --base: #383838;              /* 深色底层框架(扫描值) */
  --sidebar-bg: transparent;
  --sidebar-text: #b9b9bf;
  --bg: #f4f5f8;                /* 浮动内容面板 */
  --card: #ffffff;
  --card-2: #f1f3f8;
  --fill: #eef0f6;
  --fill-2: #e7eaf2;
  --fill-3: #dde1ec;
  --border: rgba(27, 32, 51, .06);
  --text: #26262a;
  --text-2: #7c828d;
  --text-3: #aeb4c0;
  --blue-text: #4a72b8;
  --shadow: 0 2px 6px rgba(38, 51, 86, .05), 0 16px 36px rgba(38, 51, 86, .07);
  --shadow-lift: 0 18px 44px rgba(38, 51, 86, .16);
  --topbar-bg: rgba(244, 245, 248, .86);
  --input-bg: #f1f3f8;
  --input-border: transparent;
  --input-text: #26262a;
  --btn2-bg: #eef1f6;
  --btn2-color: #2e2e33;
  --ghost-border: transparent;
  --ghost-color: #2e2e33;
  --ghost-hover-bg: #e7eaf2;
  --ghost-hover-color: #2e2e33;
  --danger-bg: #ecd5d6;
  --danger-text: #b5544d;
  --success-bg: #e6f3d8;
  --success-text: #4a7a2e;
  --row-border: rgba(27, 32, 51, .07);
  --hover-bg: #eef1f6;
  --li-icon-bg: #e6edf9;
  --tag-blue: #e3ecf9;
  --tag-blue-text: #4a72b8;
  --tag-green: #e6f3d8;
  --tag-green-text: #4a7a2e;
  --tag-red: #ecd5d6;
  --tag-red-text: #b5544d;
  --tag-orange: #fceecd;
  --tag-orange-text: #b9770e;
  --tag-gray: #eceef3;
  --tag-gray-text: #7c828d;
  --chip-bg: #eef1f6;
  --chip-border: transparent;
  --chip-color: #565b66;
  --chip-checked-text: #ffffff;
  --modal-bg: rgba(255, 255, 255, .92);
  --avatar-ring: #ffffff;
  --upload-border: rgba(126, 166, 232, .55);
  --upload-color: #4a72b8;
  --upload-bg: rgba(126, 166, 232, .08);
  --scroll-thumb: rgba(27, 32, 51, .22);
}
html[data-theme="dark"] {
  --base: #101014;
  --bg: #191a20;
  --card: #202128;
  --card-2: #282931;
  --accent: #f5f5f7;
  --accent-2: #7ea6e8;
  --grad: linear-gradient(135deg, #f5f5f7, #c9ced9);
  --border: rgba(255, 255, 255, .07);
  --topbar-bg: rgba(25, 26, 32, .86);
  --btn2-bg: rgba(255, 255, 255, .08);
  --btn2-color: #f5f5f7;
  --ghost-color: #f5f5f7;
  --ghost-hover-color: #fff;
  --chip-checked-text: #141419;
  --modal-bg: rgba(28, 29, 36, .92);
  --avatar-ring: #202128;
}

/* ===== 布局层级:深色底层在下,内容面板浮在上方 ===== */
body { background: var(--base); }
.sidebar { background: transparent; border-right: none; backdrop-filter: none; -webkit-backdrop-filter: none; }
.main {
  margin: 12px 14px 12px 216px;
  border-radius: 26px;
  background: var(--bg);
  box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
  min-height: calc(100vh - 24px);
}
html[data-theme="dark"] .main { box-shadow: 0 30px 80px rgba(0, 0, 0, .55); }
.topbar { border-radius: 26px 26px 0 0; border-bottom: none; }

/* 卡片:大圆角、无边框、柔和弥散阴影 */
.card, .stat-card, .proj-card {
  border: none !important; border-radius: 22px;
  box-shadow: var(--shadow);
}
.proj-card:hover { border-color: transparent; box-shadow: var(--shadow-lift); }
.modal { border: none; border-radius: 26px; }

/* 侧栏(底层深色上) */
.nav-item { border-radius: 12px; }
.nav-item.active { background: rgba(255, 255, 255, .16); box-shadow: none; }
.brand-logo { background: #f5f5f7; color: #26262a; box-shadow: none; }

/* 主按钮:灰黑胶囊(深色主题反转为白底黑字) */
.btn.primary { box-shadow: 0 8px 20px rgba(30, 30, 34, .26); }
.btn.primary:hover { background: #4a4a51; box-shadow: 0 10px 26px rgba(30, 30, 34, .32); }
html[data-theme="dark"] .btn.primary { color: #141419; }
html[data-theme="dark"] .btn.primary:hover { background: #fff; }
html[data-theme="dark"] .brand-logo { color: #141419; }
.chip:has(input:checked) { background: var(--accent); border-color: transparent; color: #fff; }
html[data-theme="dark"] .chip:has(input:checked) { color: #141419; }
.tag { font-weight: 600; }
.tag.gray { background: var(--tag-gray); color: var(--tag-gray-text); }

/* 登录页:淡紫灰壁纸(扫描值 #c9d6e7)+ 纯白卡片 + 灰黑按钮 */
.login-wrap { background: #c9d6e7; }
.lb1 { background: #a9c6ef; }
.lb2 { background: #b9c2f0; }
.lb3 { background: #eed3d3; opacity: .4; }
.lb4 { background: #f3e2c9; opacity: .35; }
html[data-theme="dark"] .login-wrap { background: #0b0c10; }
.login-card { border: none; box-shadow: 0 30px 90px rgba(42, 58, 98, .32); }
html[data-theme="dark"] .login-card { background: rgba(28, 29, 36, .92); }
.login-logo { border-radius: 24px; box-shadow: 0 16px 36px rgba(42, 58, 98, .3); }
html[data-theme="dark"] .login-logo { background: #f5f5f7; color: #141419; box-shadow: 0 16px 36px rgba(0, 0, 0, .5); }
.login-go { border-radius: 999px; }
html[data-theme="dark"] .login-go { color: #141419; }
.theme-fab { border: none; box-shadow: 0 10px 28px rgba(42, 58, 98, .2); }

/* ===== 头像:图片头像 + 按人定色的字母头像 ===== */
.avatar { box-shadow: 0 2px 8px rgba(38, 51, 86, .18); }
.avatar.avatar-big { width: 56px; height: 56px; font-size: 22px; }
.avatar-img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; display: block; }
.avatar-stack .avatar { box-shadow: 0 0 0 2px var(--card); }
/* ===== 动态图表 & 科技感 ===== */
/* ---- 图表 ---- */
.chart { width: 100%; }
.ch-legend { display: flex; gap: 16px; justify-content: flex-end; margin-bottom: 8px; flex-wrap: wrap; }
.ch-key { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); }
.ch-key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.ch-plot { display: flex; align-items: stretch; gap: 6px; }
.ch-col { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.ch-bars { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 4px; min-height: 0; }
.ch-bar {
  width: 56%; max-width: 34px; height: var(--h, 0); border-radius: 7px 7px 3px 3px;
  position: relative; min-height: 2px;
  animation: ch-grow .75s cubic-bezier(.2, .7, .3, 1) both;
  box-shadow: 0 4px 12px rgba(38, 51, 86, .14);
}
@keyframes ch-grow { from { height: 0; opacity: .4; } }
.ch-v { position: absolute; top: -17px; left: 50%; transform: translateX(-50%); font-size: 10.5px; color: var(--text-2); white-space: nowrap; font-weight: 600; }
.ch-l { text-align: center; font-size: 11.5px; color: var(--text-2); margin-top: 7px; }

.dn-wrap { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.ch-donut .ch-seg { transition: stroke-dasharray .9s cubic-bezier(.2, .7, .3, 1); transition-delay: var(--d, 0ms); }
.ch-dn-t { font-size: 11px; fill: var(--text-2); }
.ch-dn-v { font-size: 17px; font-weight: 700; fill: var(--text); }
.dn-legend { flex: 1; min-width: 150px; display: flex; flex-direction: column; gap: 8px; }
.dn-key { display: flex; align-items: center; gap: 8px; font-size: 13px; }
.dn-key i { width: 11px; height: 11px; border-radius: 4px; }
.dn-key b { font-variant-numeric: tabular-nums; }

.rg-wrap { display: inline-flex; }
.rg-seg { transition: stroke-dasharray .9s cubic-bezier(.2, .7, .3, 1); }
.rg-t { font-size: 22px; font-weight: 700; fill: var(--text); }

.ch-radar .ch-ringp { fill: none; stroke: var(--border); stroke-width: 1; }
.ch-radar .ch-spoke { stroke: var(--border); stroke-width: 1; }
.ch-radar .ch-lbl { font-size: 11.5px; fill: var(--text-2); }
.ch-poly {
  fill: rgba(91, 143, 212, .26); stroke: #5b8fd4; stroke-width: 2; stroke-linejoin: round;
  transform-origin: center; transform-box: fill-box;
  animation: radar-in .8s cubic-bezier(.2, .7, .3, 1) both;
}
@keyframes radar-in { from { transform: scale(.08); opacity: 0; } }

.hb { display: flex; flex-direction: column; gap: 12px; }
.hb-row { display: flex; align-items: center; gap: 12px; }
.hb-l { width: 76px; font-size: 13px; text-align: right; color: var(--text-2); flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { flex: 1; height: 12px; background: var(--fill); border-radius: 999px; overflow: hidden; }
.hb-fill { display: block; height: 100%; width: 0; border-radius: 999px; transition: width .85s cubic-bezier(.2, .7, .3, 1); }
.hb-v { width: 84px; font-size: 13px; font-variant-numeric: tabular-nums; text-align: right; flex-shrink: 0; }

.tpbar > i { transition: width .9s cubic-bezier(.2, .7, .3, 1); }

/* ---- 凭证图 ---- */
.apv-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.apv-img { width: 96px; height: 72px; object-fit: cover; border-radius: 10px; cursor: zoom-in; box-shadow: var(--shadow); }

/* ---- 科技感:卡片微透明毛玻璃 + 深色底浮动光斑 ---- */
.card, .stat-card, .proj-card {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
}
html[data-theme="dark"] .card, html[data-theme="dark"] .stat-card, html[data-theme="dark"] .proj-card {
  background: rgba(32, 33, 40, .72);
}
body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(560px 420px at 14% 8%, rgba(91, 143, 212, .16), transparent 65%),
    radial-gradient(620px 480px at 88% 90%, rgba(166, 120, 216, .12), transparent 65%);
}
html[data-theme="dark"] body::before {
  background:
    radial-gradient(560px 420px at 14% 8%, rgba(91, 143, 212, .12), transparent 65%),
    radial-gradient(620px 480px at 88% 90%, rgba(166, 120, 216, .1), transparent 65%);
}
.sidebar, .main, .topbar, .modal-mask { position: relative; z-index: 1; }
.stat-num { font-variant-numeric: tabular-nums; }
/* ===== 滑动过渡 & 2.jpg 日历风格 ===== */
/* ---- 页面滑动过渡:卡片自上而下依次滑入 ---- */
@keyframes view-in-r { from { opacity: 0; transform: translateX(36px); } to { opacity: 1; transform: none; } }
@keyframes view-in-l { from { opacity: 0; transform: translateX(-36px); } to { opacity: 1; transform: none; } }
#content[data-dir="fwd"] > .card, #content[data-dir="fwd"] > .stat-row, #content[data-dir="fwd"] > .grid,
#content[data-dir="fwd"] > .row, #content[data-dir="fwd"] > .tabs, #content[data-dir="fwd"] > .form-card { animation-name: view-in-r; animation-duration: .48s; }
#content[data-dir="back"] > .card, #content[data-dir="back"] > .stat-row, #content[data-dir="back"] > .grid,
#content[data-dir="back"] > .row, #content[data-dir="back"] > .tabs, #content[data-dir="back"] > .form-card { animation-name: view-in-l; animation-duration: .48s; }
#content > *:nth-child(1) { animation-delay: .02s; }
#content > *:nth-child(2) { animation-delay: .07s; }
#content > *:nth-child(3) { animation-delay: .12s; }
#content > *:nth-child(4) { animation-delay: .17s; }
#content > *:nth-child(5) { animation-delay: .22s; }
#content > *:nth-child(6) { animation-delay: .27s; }
#content > *:nth-child(7) { animation-delay: .32s; }
#content > *:nth-child(n+8) { animation-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  #content > * { animation: none !important; }
}

/* ---- 项目进度日历(2.jpg:柔和渐变带 + 无边框色块 + 白色胶囊人名) ---- */
#cal-box {
  background: linear-gradient(165deg, rgba(157, 184, 164, .2), rgba(233, 224, 166, .16) 42%, rgba(154, 148, 232, .17));
  border-radius: 20px; padding: 16px;
}
html[data-theme="dark"] #cal-box {
  background: linear-gradient(165deg, rgba(157, 184, 164, .1), rgba(233, 224, 166, .07) 42%, rgba(154, 148, 232, .1));
}
.cal-title { font-size: 17px; }
.cal-grid { gap: 8px; }
.cal-cell {
  border: none; background: rgba(255, 255, 255, .68); border-radius: 14px;
  box-shadow: 0 1px 5px rgba(38, 51, 86, .06);
}
html[data-theme="dark"] .cal-cell { background: rgba(255, 255, 255, .05); }
.cal-cell:hover { border: none; box-shadow: 0 8px 22px rgba(38, 51, 86, .14); transform: translateY(-2px); }
.cal-cell.has-log { background: rgba(154, 148, 232, .18); }
.cal-cell.today { background: #fff; box-shadow: 0 10px 26px rgba(58, 79, 176, .2); }
html[data-theme="dark"] .cal-cell.today { background: rgba(255, 255, 255, .13); box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.cal-cell.today .cal-num { color: #5a6fe0; font-weight: 800; }
.cal-cell.has-log .cal-num { color: #6f68c8; }
.cal-person { background: rgba(255, 255, 255, .88); border-radius: 999px; box-shadow: 0 1px 4px rgba(38, 51, 86, .08); }
html[data-theme="dark"] .cal-person { background: rgba(255, 255, 255, .1); }
.cal-person:hover { background: #fff; }
html[data-theme="dark"] .cal-person:hover { background: rgba(255, 255, 255, .18); }
.day-entry { background: rgba(154, 148, 232, .09); border-radius: 14px; padding: 12px 14px; }
/* ===== 侧栏瘦身 & 2.jpg 细节 & 顺滑滑动 & 开场动画 ===== */
/* ---- 左侧工具栏瘦身,右侧内容加宽 ---- */
.sidebar { width: 184px; }
.main { margin-left: 184px; }
.brand { padding: 18px 14px 14px; }
.brand-logo { width: 30px; height: 30px; border-radius: 9px; font-size: 14px; }
.brand-name { font-size: 15.5px; letter-spacing: .5px; }
.nav-item { padding: 9px 11px; gap: 9px; font-size: 13.5px; }
.nav-item .ic { width: 17px; height: 17px; }
.nav-item .nav-badge { right: 8px; }
.sidebar-foot { font-size: 11px; }
.content { max-width: 1400px; padding: 24px 26px 40px; }

/* ---- 顺滑滑动:容器整体从右到左(或反向)进入,卡片轻微上浮错峰 ---- */
#content.anim { animation: page-slide-r .55s cubic-bezier(.22, 1, .36, 1) both; }
#content.anim[data-dir="back"] { animation-name: page-slide-l; }
@keyframes page-slide-r { from { opacity: 0; transform: translateX(48px); } to { opacity: 1; transform: none; } }
@keyframes page-slide-l { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
#content[data-dir] > .card, #content[data-dir] > .stat-row, #content[data-dir] > .grid,
#content[data-dir] > .row, #content[data-dir] > .tabs, #content[data-dir] > .form-card {
  animation-name: card-soft; animation-duration: .5s; animation-timing-function: cubic-bezier(.22, 1, .36, 1);
}
@keyframes card-soft { from { opacity: 0; transform: translateY(12px); } }

/* ---- 项目进度日历(2.jpg 扫描校准:黄绿→鼠尾草→淡蓝 渐变带) ---- */
.cal-hero {
  background: linear-gradient(95deg, rgba(233, 242, 148, .5), rgba(212, 229, 211, .42) 46%, rgba(205, 222, 234, .46));
  border-radius: 18px; padding: 14px 16px 12px; margin-bottom: 12px;
}
html[data-theme="dark"] .cal-hero {
  background: linear-gradient(95deg, rgba(233, 242, 148, .14), rgba(212, 229, 211, .1) 46%, rgba(205, 222, 234, .13));
}
.cal-head { margin-bottom: 10px; gap: 12px; }
.cal-title { font-size: 19px; font-weight: 800; min-width: 0; letter-spacing: .3px; }
.cal-today-btn {
  border: none; background: #fff; color: #26262a; font-weight: 700; font-size: 13px;
  padding: 7px 18px; border-radius: 999px; cursor: pointer; font-family: inherit;
  box-shadow: 0 4px 14px rgba(38, 51, 86, .16); transition: transform .15s, box-shadow .15s;
}
.cal-today-btn:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(38, 51, 86, .2); }
.cal-arrows { display: inline-flex; gap: 7px; margin-left: auto; }
.cal-arrow {
  width: 32px; height: 32px; border-radius: 50%; border: none;
  background: rgba(255, 255, 255, .78); color: #26262a; font-size: 17px; line-height: 1;
  cursor: pointer; font-family: inherit; box-shadow: 0 2px 8px rgba(38, 51, 86, .12);
  transition: transform .15s, background .15s;
}
.cal-arrow:hover { background: #fff; transform: scale(1.06); }
html[data-theme="dark"] .cal-arrow { background: rgba(255, 255, 255, .12); color: #f5f5f7; }
html[data-theme="dark"] .cal-arrow:hover { background: rgba(255, 255, 255, .22); }
html[data-theme="dark"] .cal-today-btn { background: #f5f5f7; }
.cal-weekstrip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin-bottom: 10px; }
.cal-wpill {
  border: none; background: rgba(255, 255, 255, .5); border-radius: 14px; padding: 8px 4px;
  display: flex; flex-direction: column; align-items: center; gap: 2px; cursor: pointer; font-family: inherit;
  transition: transform .16s, box-shadow .16s, background .16s;
}
.cal-wpill span { font-size: 11.5px; color: var(--text-2); font-weight: 600; }
.cal-wpill b { font-size: 17px; font-weight: 700; color: var(--text); font-variant-numeric: tabular-nums; }
.cal-wpill:hover { transform: translateY(-2px); background: rgba(255, 255, 255, .82); box-shadow: 0 6px 16px rgba(38, 51, 86, .12); }
.cal-wpill.today { background: #fff; box-shadow: 0 8px 22px rgba(58, 79, 176, .2); }
.cal-wpill.today b { color: #5a6fe0; }
.cal-wpill.has-log { box-shadow: inset 0 0 0 2px rgba(154, 148, 232, .5); }
.cal-wpill.has-log.today { box-shadow: 0 8px 22px rgba(58, 79, 176, .2), inset 0 0 0 2px rgba(154, 148, 232, .55); }
html[data-theme="dark"] .cal-wpill { background: rgba(255, 255, 255, .07); }
html[data-theme="dark"] .cal-wpill.today { background: rgba(255, 255, 255, .14); }
.cal-legend { margin: 0; }
.day-entry { border-left: 3px solid rgba(154, 148, 232, .55); }

/* ---- 登录页开场动画(AI/科技感,约 1.4s) ---- */
.boot {
  position: fixed; inset: 0; z-index: 600; overflow: hidden;
  background: #141419; display: flex; align-items: center; justify-content: center;
  animation: boot-out .5s ease 1.55s forwards;
}
.boot-grid {
  position: absolute; inset: 0; opacity: .5;
  background-image:
    linear-gradient(rgba(154, 148, 232, .1) 1px, transparent 1px),
    linear-gradient(90deg, rgba(154, 148, 232, .1) 1px, transparent 1px);
  background-size: 34px 34px;
  mask-image: radial-gradient(ellipse 62% 55% at 50% 46%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 62% 55% at 50% 46%, #000 30%, transparent 75%);
  animation: boot-grid-in 1s ease both;
}
@keyframes boot-grid-in { from { opacity: 0; transform: scale(1.12); } }
.boot-inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 16px; }
.boot-logo {
  position: relative; width: 68px; height: 68px; border-radius: 20px;
  background: linear-gradient(135deg, #f5f5f7, #c9ced9); color: #141419;
  display: flex; align-items: center; justify-content: center;
  font-size: 32px; font-weight: 800;
  box-shadow: 0 18px 50px rgba(154, 148, 232, .35);
  animation: boot-pop .55s cubic-bezier(.2, .9, .3, 1.25) .08s both;
  overflow: hidden;
}
@keyframes boot-pop { from { opacity: 0; transform: scale(.4); } }
.boot-logo::after {
  content: ''; position: absolute; left: -70%; top: -60%; width: 46%; height: 220%;
  background: linear-gradient(105deg, transparent, rgba(255, 255, 255, .85), transparent);
  transform: rotate(12deg);
  animation: boot-scan 1.05s ease .55s both;
}
@keyframes boot-scan { from { left: -70%; } to { left: 130%; } }
.boot-rings i {
  position: absolute; left: 50%; top: 34px; width: 68px; height: 68px;
  margin: -34px 0 0 -34px; border-radius: 50%;
  border: 1.5px solid rgba(154, 148, 232, .55);
  animation: boot-ring 1.1s cubic-bezier(.2, .7, .3, 1) both;
}
.boot-rings i:nth-child(1) { animation-delay: .45s; }
.boot-rings i:nth-child(2) { animation-delay: .75s; border-color: rgba(217, 168, 64, .4); }
.boot-rings i:nth-child(3) { animation-delay: 1.05s; border-color: rgba(111, 148, 128, .45); }
@keyframes boot-ring { from { opacity: .9; transform: scale(1); } to { opacity: 0; transform: scale(2.6); } }
.boot-tag {
  font-size: 13px; letter-spacing: 6px; text-indent: 6px; color: #b9b9c9; font-weight: 600;
  animation: boot-tag-in .5s ease .75s both;
}
@keyframes boot-tag-in { from { opacity: 0; transform: translateY(8px); } }
@keyframes boot-out { to { opacity: 0; visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .boot { display: none; } }

/* ===== 修正:侧栏恢复固定定位(菜单栏到红线处结束,右侧全是内容页) ===== */
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 20; }
.main { margin: 12px 14px 12px 200px; }
/* ===== 项目成员名单 & 日历头像 & 日期悬浮窗 ===== */
/* 项目成员卡:大卡展示成员名单 */
.mem-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.mem-chip {
  display: inline-flex; align-items: center; gap: 7px;
  background: var(--fill); border-radius: 999px; padding: 4px 12px 4px 5px;
  transition: background .15s, transform .15s;
}
.mem-chip:hover { background: var(--fill-2); transform: translateY(-1px); }
.mem-chip .avatar { width: 26px; height: 26px; font-size: 11px; }
.mem-chip .mc-name { font-size: 13px; font-weight: 600; }

/* 日历:去掉周头行后格子收紧;格内只放头像点 */
#cal-box { position: relative; }
.cal-dow { display: none; }
.cal-cell { min-height: 86px; }
.cal-people { display: flex; flex-direction: row; flex-wrap: wrap; gap: 0; margin-top: 2px; padding-left: 8px; }
.cal-person { display: none; }
.cal-avatar {
  width: 27px; height: 27px; border-radius: 50%; color: #fff;
  font-size: 11px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center;
  border: 2px solid rgba(255, 255, 255, .95);
  margin: 8px 0 0 -9px;
  box-shadow: 0 2px 6px rgba(38, 51, 86, .18);
}
.cal-avatar:first-child { margin-left: 0; }

/* 日期悬浮窗:20% 不透明度玻璃,锚定在日期格附近(不在底部) */
.day-pop {
  position: absolute; z-index: 40;
  width: min(560px, calc(100% - 20px));
  max-height: 420px; overflow-y: auto;
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(26px) saturate(1.7); -webkit-backdrop-filter: blur(26px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, .4);
  border-radius: 18px; padding: 14px 16px;
  box-shadow: 0 24px 70px rgba(20, 26, 46, .35);
  animation: pop-in .28s cubic-bezier(.2, .8, .3, 1) both;
}
@keyframes pop-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.dp-head { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.dp-head b { font-size: 15px; }
.dp-x {
  margin-left: auto; border: none; width: 26px; height: 26px; border-radius: 50%;
  background: rgba(255, 255, 255, .45); cursor: pointer; font-size: 12px;
  color: var(--text); font-family: inherit; flex-shrink: 0;
}
.dp-x:hover { background: rgba(255, 255, 255, .7); }
html[data-theme="dark"] .day-pop { background: rgba(24, 25, 32, .2); border-color: rgba(255, 255, 255, .14); }
html[data-theme="dark"] .dp-x { background: rgba(255, 255, 255, .12); color: #f5f5f7; }
.day-pop .day-entry { margin-bottom: 10px; background: rgba(255, 255, 255, .34); }
.day-pop .day-entry:last-child { margin-bottom: 0; }
html[data-theme="dark"] .day-pop .day-entry { background: rgba(255, 255, 255, .07); }
/* ===== 日历左列:各部门完成情况 ===== */
.cal-layout { display: grid; grid-template-columns: 292px 1fr; gap: 16px; align-items: start; }
.dept-side { position: relative; display: flex; flex-direction: column; gap: 10px; max-height: 640px; overflow-y: auto; padding-right: 2px; }
.ds-title {
  display: flex; align-items: center; gap: 7px;
  font-size: 14px; font-weight: 700; color: var(--text);
  padding: 2px 2px 4px;
}
.ds-title .ic { width: 16px; height: 16px; color: var(--accent-2); }
.dept-sum {
  background: var(--card); border-radius: 16px; padding: 13px 14px;
  box-shadow: 0 2px 10px rgba(38, 51, 86, .07);
  animation: card-soft .5s cubic-bezier(.22, 1, .36, 1) both;
}
.dept-sum:nth-child(3) { animation-delay: .05s; }
.dept-sum:nth-child(4) { animation-delay: .1s; }
.dept-sum:nth-child(5) { animation-delay: .15s; }
.dept-sum:nth-child(6) { animation-delay: .2s; }
.ds-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.ds-sec { margin-top: 9px; }
.ds-t { font-size: 11.5px; font-weight: 700; color: var(--text-2); letter-spacing: 1px; margin-bottom: 5px; }
.ds-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.ds-latest {
  margin-top: 7px; font-size: 12px; color: var(--text-2); line-height: 1.6;
  background: var(--fill); border-radius: 9px; padding: 6px 9px;
  overflow: hidden; text-overflow: ellipsis; display: -webkit-box;
  -webkit-line-clamp: 2; -webkit-box-orient: vertical;
}
@media (max-width: 1180px) {
  .cal-layout { grid-template-columns: 1fr; }
  .dept-side { max-height: none; order: 2; }
}
/* ===== 已完成堆叠展开 ===== */
/* 折叠容器:grid-rows 0fr→1fr 实现顺滑高度过渡 */
.ds-more {
  display: grid; grid-template-rows: 0fr;
  opacity: 0; margin-top: 0;
  transition: grid-template-rows .5s cubic-bezier(.22, 1, .36, 1), opacity .4s ease, margin-top .4s ease;
}
.ds-more.open { grid-template-rows: 1fr; opacity: 1; margin-top: 7px; }
.ds-more-in { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 6px; }
/* 条目堆叠级联浮现 */
.ds-more-in .ds-latest {
  margin-top: 0;
  opacity: 0; transform: translateY(9px);
  transition: opacity .35s ease, transform .4s cubic-bezier(.22, 1, .36, 1);
  transition-delay: calc(var(--i, 0) * 75ms);
}
.ds-more.open .ds-more-in .ds-latest { opacity: 1; transform: none; }
/* 展开按钮 */
.ds-toggle {
  margin-top: 9px; border: none; font-family: inherit; cursor: pointer;
  background: var(--fill); color: var(--text-2);
  font-size: 12px; font-weight: 600; padding: 5px 13px; border-radius: 999px;
  transition: background .15s, color .15s;
  align-self: flex-start;
}
.ds-toggle:hover { background: var(--fill-2); color: var(--text); }
.ds-toggle::after { content: '▾'; display: inline-block; margin-left: 5px; transition: transform .35s cubic-bezier(.22, 1, .36, 1); }
.ds-toggle.open::after { transform: rotate(180deg); }
@media (prefers-reduced-motion: reduce) { .ds-more, .ds-more-in .ds-latest, .ds-toggle::after { transition: none !important; } }
/* ===== card-title 排版修复 & 弹窗悬浮玻璃 ===== */
/* 标题紧跟图标居左;卡内操作件(按钮/输入/提示)靠右 */
.card-title { justify-content: flex-start; gap: 8px; }
.card-title .ic { margin-right: 0; }
.card-title > .btn, .card-title > input, .card-title > select,
.card-title > .muted, .card-title > a, .card-title > span:last-child { margin-left: auto; }

/* 弹窗:20% 透明悬浮玻璃(居中,所有新建/编辑类弹窗统一) */
.modal {
  background: rgba(255, 255, 255, .2);
  backdrop-filter: blur(30px) saturate(1.7); -webkit-backdrop-filter: blur(30px) saturate(1.7);
  border: 1px solid rgba(255, 255, 255, .4);
  box-shadow: 0 30px 90px rgba(20, 26, 46, .4);
}
html[data-theme="dark"] .modal {
  background: rgba(24, 25, 32, .2);
  border-color: rgba(255, 255, 255, .14);
}
.modal-mask { background: rgba(8, 10, 18, .48) !important; }

/* 弹窗内文字可读性 */
.modal .form-item label, .modal .fld label { color: var(--text); }
html[data-theme="dark"] .modal .form-item label, html[data-theme="dark"] .modal .fld label { color: #f5f5f7; }

/* modal-mask 恢复全屏固定(修"弹窗弹到最下面";此前被堆叠规则改为 relative) */
.modal-mask { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 20px; }

/* 弹窗白底(文字清晰) */
.modal { background: rgba(255, 255, 255, .2); border: 1px solid var(--border); }
html[data-theme="dark"] .modal { background: rgba(24, 25, 32, .2); border-color: rgba(255, 255, 255, .1); }
.day-pop { background: rgba(255, 255, 255, .2); border: 1px solid var(--border); }
html[data-theme="dark"] .day-pop { background: rgba(24, 25, 32, .2); border-color: rgba(255, 255, 255, .1); }
.day-pop .day-entry { background: var(--fill); }
html[data-theme="dark"] .day-pop .day-entry { background: rgba(255, 255, 255, .05); }

/* 弹窗透明度 20% */
.modal { background: rgba(255, 255, 255, .84); backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(40px) saturate(1.8); }
html[data-theme="dark"] .modal { background: rgba(28, 29, 34, .88); }
.day-pop { background: rgba(255, 255, 255, .85); backdrop-filter: blur(30px) saturate(1.8); -webkit-backdrop-filter: blur(40px) saturate(1.8); }
html[data-theme="dark"] .day-pop { background: rgba(28, 29, 34, .9); }
.modal .muted, .day-pop .muted { opacity: 1; }
/* ===== 部门卡条目底色 ===== */
.dept-sum .ds-latest { background: rgba(255, 255, 255, .62); color: var(--text); }
html[data-theme="dark"] .dept-sum .ds-latest { background: rgba(255, 255, 255, .1); color: var(--text); }
.dept-sum .ds-t { color: var(--text-2); }
/* ===== 部门列与日历上下对齐 ===== */
.cal-layout { align-items: stretch; }
.dept-side { max-height: none; overflow: hidden; }
.dept-side-scroll {
  position: absolute; inset: 0; overflow-y: auto;
  display: flex; flex-direction: column; gap: 10px; padding-right: 2px;
}
@media (max-width: 1180px) {
  .dept-side { max-height: 560px; }
  .dept-side-scroll { position: static; }
}
/* ===== 部门卡折叠手风琴(hover 展开) ===== */
.ds-body {
  display: grid; grid-template-rows: 0fr; opacity: .25;
  transition: grid-template-rows .5s cubic-bezier(.22, 1, .36, 1), opacity .35s ease;
}
.ds-body-in { overflow: hidden; min-height: 0; display: flex; flex-direction: column; gap: 9px; }
.dept-sum { cursor: pointer; transition: transform .2s ease, box-shadow .25s ease; }
.dept-sum:hover { transform: translateY(-2px); box-shadow: 0 14px 32px rgba(38, 51, 86, .16); }
.dept-sum:hover .ds-body, .dept-sum.open .ds-body { grid-template-rows: 1fr; opacity: 1; }
.ds-body-in > .ds-sec {
  opacity: 0; transform: translateY(7px);
  transition: opacity .3s ease, transform .4s cubic-bezier(.22, 1, .36, 1);
}
.ds-body-in > .ds-sec:nth-child(2) { transition-delay: .07s; }
.dept-sum:hover .ds-body-in > .ds-sec, .dept-sum.open .ds-body-in > .ds-sec { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .ds-body, .ds-body-in > .ds-sec { transition: none !important; }
}

/* 周几表头行 */
.cal-dow-row { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 0 0 8px; }
.cal-dow-row .cd { text-align: center; font-size: 12.5px; font-weight: 700; color: var(--text-2); padding: 6px 0; background: rgba(255, 255, 255, .5); border-radius: 10px; }
html[data-theme="dark"] .cal-dow-row .cd { background: rgba(255, 255, 255, .06); }

/* 弹窗磨砂半透明(文字实色):整体 88% 不透明白 + 输入框/条目实底 + 文字实色 */
.modal, .day-pop {
  background: rgba(255, 255, 255, .88);
  backdrop-filter: blur(26px) saturate(1.7); -webkit-backdrop-filter: blur(26px) saturate(1.7);
}
html[data-theme="dark"] .modal, html[data-theme="dark"] .day-pop { background: rgba(28, 29, 34, .9); }
/* 文字全部实色 */
.modal, .modal .it-t, .modal .it-s, .modal label, .modal .muted, .modal b, .modal span, .modal div { color: var(--text); }
.day-pop, .day-pop .it-t, .day-pop .it-s, .day-pop b, .day-pop span, .day-pop div { color: var(--text); }
.modal input, .modal textarea, .modal select, .day-pop input, .day-pop textarea, .day-pop select {
  background: var(--input-bg); color: var(--input-text);
}
html[data-theme="dark"] .modal, html[data-theme="dark"] .modal .it-t, html[data-theme="dark"] .modal .it-s, html[data-theme="dark"] .modal label, html[data-theme="dark"] .modal .muted, html[data-theme="dark"] .modal b, html[data-theme="dark"] .modal span, html[data-theme="dark"] .modal div { color: #f0f0f4; }
html[data-theme="dark"] .day-pop, html[data-theme="dark"] .day-pop .it-t, html[data-theme="dark"] .day-pop .it-s, html[data-theme="dark"] .day-pop b, html[data-theme="dark"] .day-pop span, html[data-theme="dark"] .day-pop div { color: #f0f0f4; }
html[data-theme="dark"] .modal input, html[data-theme="dark"] .modal textarea, html[data-theme="dark"] .modal select { background: rgba(255, 255, 255, .08); }

/* 弹窗不透明实底(根治文字模糊):实底白/深灰卡 + 文字实色 */
.modal { background: #ffffff !important; }
.day-pop { background: #ffffff !important; }
html[data-theme="dark"] .modal { background: #1c1d25 !important; }
html[data-theme="dark"] .day-pop { background: #1c1d25 !important; }

/* 弹窗 82% 白(再透一点):保留轻微透光质感,文字实色清晰 */
.modal { background: rgba(255, 255, 255, .82) !important; backdrop-filter: blur(24px) saturate(1.7) !important; -webkit-backdrop-filter: blur(24px) saturate(1.7) !important; }
.day-pop { background: rgba(255, 255, 255, .84) !important; backdrop-filter: blur(24px) saturate(1.7) !important; -webkit-backdrop-filter: blur(24px) saturate(1.7) !important; }
html[data-theme="dark"] .modal { background: rgba(28, 29, 34, .86) !important; }
html[data-theme="dark"] .day-pop { background: rgba(28, 29, 34, .88) !important; }

/* 头像字母白 */
.avatar { color: #fff !important; }
.avatar span { color: #fff; }
