/* ===========================================================
   项目管理系统 · 基础主题
   字体：微软雅黑   风格：透明玻璃材质 · 清新
   =========================================================== */

:root {
  --font-cn: "Microsoft YaHei", "微软雅黑", "MSYH", "PingFang SC", "Hiragino Sans GB", sans-serif;

  /* 主色 */
  --primary: #2f6bff;
  --primary-2: #5b8cff;
  --primary-deep: #1c47d6;
  --cyan: #22c7d6;
  --mint: #38d39f;
  --violet: #7b61ff;
  --amber: #ffb020;
  --rose: #ff6b8b;
  --slate: #64748b;

  /* 文本 */
  --text: #14223b;
  --text-2: #3d4a60;
  --muted: #6b7a92;
  --muted-2: #9aa7ba;

  /* 玻璃 */
  --glass: rgba(255, 255, 255, 0.58);
  --glass-strong: rgba(255, 255, 255, 0.78);
  --glass-soft: rgba(255, 255, 255, 0.42);
  --glass-brd: rgba(255, 255, 255, 0.85);
  --glass-brd-2: rgba(151, 178, 226, 0.28);
  --blur: 22px;

  --shadow-s: 0 2px 8px rgba(28, 55, 116, 0.06);
  --shadow-m: 0 10px 30px rgba(28, 55, 116, 0.10);
  --shadow-l: 0 22px 60px rgba(28, 55, 116, 0.16);
  --shadow-glow: 0 8px 28px rgba(47, 107, 255, 0.28);

  --r-s: 10px;
  --r-m: 16px;
  --r-l: 22px;
  --r-xl: 28px;

  --ok: #1aa87a;
  --warn: #e79b13;
  --danger: #e5484d;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-cn);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  background: #eef3fc;
  overflow-x: hidden;
}

/* ---------- 清新动态背景 ---------- */
.bg-stage {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  background:
    radial-gradient(1200px 700px at 8% 4%, #dbe9ff 0%, rgba(219, 233, 255, 0) 60%),
    radial-gradient(1000px 600px at 96% 10%, #dcfbf6 0%, rgba(220, 251, 246, 0) 58%),
    radial-gradient(1100px 800px at 50% 108%, #e6e2ff 0%, rgba(230, 226, 255, 0) 62%),
    linear-gradient(180deg, #f4f8ff 0%, #eef4fd 45%, #f7f5ff 100%);
}

.bg-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  opacity: .55;
  animation: floatBlob 22s ease-in-out infinite;
}
.bg-blob.b1 { width: 520px; height: 520px; left: -120px; top: -140px; background: radial-gradient(circle at 35% 35%, #9fc2ff, #cfe0ff 70%); }
.bg-blob.b2 { width: 460px; height: 460px; right: -140px; top: 60px; background: radial-gradient(circle at 40% 40%, #9ff0e2, #d6f7f1 70%); animation-delay: -6s; }
.bg-blob.b3 { width: 560px; height: 560px; left: 34%; bottom: -260px; background: radial-gradient(circle at 45% 45%, #cbc1ff, #e9e4ff 70%); animation-delay: -12s; }
.bg-blob.b4 { width: 340px; height: 340px; right: 16%; bottom: -120px; background: radial-gradient(circle at 45% 45%, #ffd9e3, #ffeef3 70%); animation-delay: -3s; }

@keyframes floatBlob {
  0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
  33% { transform: translate3d(38px, -30px, 0) scale(1.07); }
  66% { transform: translate3d(-26px, 22px, 0) scale(.95); }
}

.bg-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(120, 150, 210, 0.10) 1px, transparent 1px),
    linear-gradient(90deg, rgba(120, 150, 210, 0.10) 1px, transparent 1px);
  background-size: 46px 46px;
  mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 20%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 20%, #000 20%, transparent 78%);
}

/* ---------- 玻璃材质通用类 ---------- */
.glass {
  background: var(--glass);
  backdrop-filter: blur(var(--blur)) saturate(180%);
  -webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow-m), inset 0 1px 0 rgba(255, 255, 255, .85);
  border-radius: var(--r-l);
  position: relative;
}

.glass-strong {
  background: var(--glass-strong);
  backdrop-filter: blur(28px) saturate(190%);
  -webkit-backdrop-filter: blur(28px) saturate(190%);
  border: 1px solid var(--glass-brd);
  box-shadow: var(--shadow-l), inset 0 1px 0 rgba(255, 255, 255, .9);
  border-radius: var(--r-xl);
}

/* 玻璃高光扫掠
   ⚠️ 关键：这层高光必须压在文字【下方】（z-index:-1）。
   原来它是盖在文字上方的，55% 白色把卡片左侧 1/3 的文字全部冲淡成灰白色，
   导致“关键词搜索”“项目名称”“表头”等在同一张卡片里一半清晰、一半发灰。 */
.sheen { isolation: isolate; }
.sheen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: linear-gradient(115deg, rgba(255, 255, 255, .45) 0%, rgba(255, 255, 255, 0) 30%, rgba(255, 255, 255, 0) 70%, rgba(255, 255, 255, .24) 100%);
  pointer-events: none;
}

/* ---------- 滚动条 ---------- */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: rgba(120, 145, 190, .35);
  border-radius: 8px;
}
::-webkit-scrollbar-thumb:hover { background: rgba(90, 120, 175, .55); }

/* ---------- 文字与标题 ---------- */
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: .2px; }
a { color: var(--primary); text-decoration: none; }
.muted { color: var(--muted); }
.mono { font-variant-numeric: tabular-nums; }

/* ---------- 按钮 ---------- */
.btn {
  font-family: var(--font-cn);
  font-size: 13.5px;
  cursor: pointer;
  border: 1px solid rgba(255, 255, 255, .8);
  background: rgba(255, 255, 255, .62);
  color: var(--text-2);
  padding: 8px 16px;
  border-radius: 11px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  transition: all .22s cubic-bezier(.2, .8, .3, 1);
  backdrop-filter: blur(10px);
  box-shadow: var(--shadow-s);
  white-space: nowrap;
  line-height: 1.4;
}
.btn:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-m);
  color: var(--primary);
  border-color: rgba(47, 107, 255, .45);
}
.btn:active { transform: translateY(0) scale(.98); }
.btn:disabled { opacity: .45; cursor: not-allowed; transform: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary-2), var(--primary) 55%, var(--primary-deep));
  color: #fff;
  border-color: transparent;
  box-shadow: var(--shadow-glow);
}
.btn-primary:hover { color: #fff; box-shadow: 0 14px 34px rgba(47, 107, 255, .38); }

.btn-ghost { background: rgba(255, 255, 255, .34); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { color: #fff; background: linear-gradient(135deg, #ff7a80, var(--danger)); border-color: transparent; }
.btn-sm { padding: 5px 11px; font-size: 12.5px; border-radius: 9px; }
.btn-icon { padding: 7px; width: 32px; height: 32px; justify-content: center; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label { font-size: 12.5px; color: var(--text-2); font-weight: 600; }
.field .req { color: var(--rose); }

.input, .select, .textarea {
  font-family: var(--font-cn);
  font-size: 13.5px;
  color: var(--text);
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(160, 185, 225, .45);
  border-radius: 11px;
  padding: 9px 12px;
  width: 100%;
  transition: all .2s;
  outline: none;
}
.textarea { resize: vertical; min-height: 78px; line-height: 1.65; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(47, 107, 255, .13);
}
.input::placeholder, .textarea::placeholder { color: var(--muted); }

/* 搜索框 */
.search-box { position: relative; }
.search-box .input { padding-left: 34px; }
.search-box svg { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--muted); }

/* ---------- 徽章 / 标签 ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11.5px;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  white-space: nowrap;
  line-height: 1.5;
}
.badge-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.blue { color: #1d4ed8; background: rgba(47, 107, 255, .12); border-color: rgba(47, 107, 255, .22); }
.badge.cyan { color: #0e7f8c; background: rgba(34, 199, 214, .14); border-color: rgba(34, 199, 214, .26); }
.badge.mint { color: #0d7f5d; background: rgba(56, 211, 159, .15); border-color: rgba(56, 211, 159, .28); }
.badge.violet { color: #5b3fd8; background: rgba(123, 97, 255, .14); border-color: rgba(123, 97, 255, .26); }
.badge.amber { color: #a36700; background: rgba(255, 176, 32, .17); border-color: rgba(255, 176, 32, .3); }
.badge.rose { color: #c02d4d; background: rgba(255, 107, 139, .15); border-color: rgba(255, 107, 139, .3); }
.badge.slate { color: #4a5a72; background: rgba(100, 116, 139, .13); border-color: rgba(100, 116, 139, .22); }

/* ---------- 动效 ---------- */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn {
  0% { opacity: 0; transform: scale(.94) translateY(12px); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}
/* 弹窗专用：必须保留 translate(-50%,-50%)，否则会覆盖 .modal 的居中定位 */
@keyframes modalIn {
  0% { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
  100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}
/* 关闭动画同样必须保留居中位移，否则弹窗会瞬间右移再消失 */
@keyframes modalOut {
  0% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(.94); }
}
@keyframes pulseRing {
  0% { transform: scale(.6); opacity: .85; }
  100% { transform: scale(2.4); opacity: 0; }
}
@keyframes shimmer {
  0% { background-position: -300% 0; }
  100% { background-position: 300% 0; }
}
@keyframes spin { to { transform: rotate(360deg); } }

.anim-up { animation: fadeUp .5s cubic-bezier(.2, .8, .3, 1) both; }
.d1 { animation-delay: .05s; }
.d2 { animation-delay: .11s; }
.d3 { animation-delay: .17s; }
.d4 { animation-delay: .23s; }
.d5 { animation-delay: .29s; }
.d6 { animation-delay: .35s; }

.live-dot {
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--mint);
  box-shadow: 0 0 0 0 rgba(56, 211, 159, .7);
  animation: livePulse 1.8s infinite;
  display: inline-block;
}
@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(56, 211, 159, .65); }
  70% { box-shadow: 0 0 0 9px rgba(56, 211, 159, 0); }
  100% { box-shadow: 0 0 0 0 rgba(56, 211, 159, 0); }
}

/* ---------- 提示条 ---------- */
.toast-wrap {
  position: fixed;
  top: 22px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 20px;
  border-radius: 14px;
  font-size: 13.5px;
  font-weight: 500;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255, 255, 255, .95);
  box-shadow: var(--shadow-l);
  animation: popIn .32s cubic-bezier(.2, .9, .3, 1.2) both;
  color: var(--text);
  max-width: 460px;
}
.toast.out { animation: fadeOutUp .3s forwards; }
@keyframes fadeOutUp { to { opacity: 0; transform: translateY(-14px); } }
.toast .ti { width: 20px; height: 20px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 12px; flex: none; }
.toast.ok .ti { background: var(--mint); }
.toast.err .ti { background: var(--danger); }
.toast.info .ti { background: var(--primary); }
.toast.warn .ti { background: var(--amber); }
