/* 仁泰 · 企业系统门户 —— 样式表
   浅色专业风：低饱和底色 + 单色卡片 + 每系统一个强调色 */

:root {
  --bg: #f3f6fb;
  --bg-2: #eef2f9;
  --surface: #ffffff;
  --surface-2: #fafbfe;
  --border: #e3e8f1;
  --border-strong: #d3dae7;
  --text: #16202e;
  --text-2: #4b5768;
  --muted: #7a8699;
  --brand: #1d4ed8;
  --brand-2: #0e9f8f;
  --ok: #15a34a;
  --warn: #c2820b;
  --danger: #d0342c;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-1: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-2: 0 10px 26px rgba(16, 24, 40, .10), 0 2px 6px rgba(16, 24, 40, .05);
  --font: "PingFang SC", "Microsoft YaHei", "Hiragino Sans GB", "Source Han Sans SC", system-ui, -apple-system, "Segoe UI", sans-serif;

  --a-indigo: #4f46e5;
  --a-emerald: #059669;
  --a-sky: #0284c7;
  --a-amber: #d97706;
  --a-rose: #e11d48;
  --a-violet: #7c3aed;
  --a-slate: #64748b;
  --a-zinc: #71717a;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .92em; background: var(--bg-2); padding: 1px 5px; border-radius: 5px; }

/* ============================ 品牌标记 ============================ */
.brand-mark {
  width: 44px; height: 44px; flex: 0 0 44px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  box-shadow: 0 6px 16px rgba(29, 78, 216, .28);
}
.brand-mark svg { width: 26px; height: 26px; }
.brand-mark.sm { width: 38px; height: 38px; flex-basis: 38px; border-radius: 11px; }
.brand-mark.sm svg { width: 22px; height: 22px; }

/* ============================ 登录页 ============================ */
.login-body {
  min-height: 100vh;
  background: linear-gradient(160deg, #eef2fb 0%, #f6f8fc 55%, #edf6f5 100%);
}
.login-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
}

.login-hero {
  position: relative;
  overflow: hidden;
  padding: 44px 52px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #eaf0ff;
  background: linear-gradient(150deg, #142a63 0%, #1d4ed8 48%, #0e9f8f 130%);
}
.login-hero::before {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 82% 12%, rgba(255, 255, 255, .16), transparent 42%),
    radial-gradient(circle at 12% 88%, rgba(255, 255, 255, .10), transparent 45%);
  pointer-events: none;
}
.login-hero > * { position: relative; }
.login-hero-top { display: flex; align-items: center; gap: 14px; }
.login-hero-top .brand-mark { background: rgba(255, 255, 255, .16); box-shadow: none; backdrop-filter: blur(4px); }
.brand-name { font-size: 17px; font-weight: 700; letter-spacing: .3px; }
.brand-sub { font-size: 12.5px; opacity: .78; margin-top: 3px; }

.login-hero-mid h1 {
  font-size: 40px; line-height: 1.28; margin: 0 0 18px;
  font-weight: 800; letter-spacing: -.5px;
}
.login-hero-mid p { margin: 0 0 26px; font-size: 15px; line-height: 1.8; opacity: .86; max-width: 460px; }
.hero-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; }
.hero-list li { display: flex; align-items: center; gap: 11px; font-size: 14px; opacity: .92; }
.hero-list .dot { width: 7px; height: 7px; border-radius: 50%; background: #7ef0d8; box-shadow: 0 0 0 4px rgba(126, 240, 216, .18); }
.login-hero-foot { font-size: 12.5px; opacity: .7; line-height: 1.7; max-width: 420px; }

.login-panel { display: grid; place-items: center; padding: 40px 28px; }
.login-card {
  width: 100%; max-width: 396px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 36px 34px;
  box-shadow: var(--shadow-2);
}
.login-card h2 { margin: 0 0 8px; font-size: 23px; font-weight: 750; }
.login-tip { margin: 0 0 26px; font-size: 13px; color: var(--muted); line-height: 1.7; }
.login-card label { display: block; font-size: 13px; font-weight: 600; color: var(--text-2); margin: 0 0 7px; }
.login-card input[type=text], .login-card input[type=password] {
  width: 100%; height: 44px;
  padding: 0 13px;
  font-size: 14.5px; font-family: inherit; color: var(--text);
  background: var(--surface-2);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  margin-bottom: 18px;
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.login-card input:focus {
  outline: none; background: #fff;
  border-color: var(--brand);
  box-shadow: 0 0 0 3.5px rgba(29, 78, 216, .13);
}
.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute; right: 8px; top: 8px;
  height: 28px; padding: 0 10px;
  font-size: 12px; font-family: inherit; color: var(--text-2);
  background: #eef1f7; border: 1px solid var(--border);
  border-radius: 7px; cursor: pointer;
}
.pw-toggle:hover { background: #e6eaf3; }
.btn-primary {
  width: 100%; height: 46px;
  font-size: 15.5px; font-weight: 700; letter-spacing: 3px;
  font-family: inherit; color: #fff; cursor: pointer;
  background: linear-gradient(135deg, var(--brand), #2563eb);
  border: 0; border-radius: var(--radius-sm);
  box-shadow: 0 6px 16px rgba(29, 78, 216, .26);
  transition: transform .12s, box-shadow .18s, opacity .15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 9px 22px rgba(29, 78, 216, .32); }
.btn-primary:disabled { opacity: .62; cursor: not-allowed; transform: none; }
.login-error {
  margin: -6px 0 16px;
  padding: 10px 12px;
  font-size: 13px; color: #a3231c;
  background: #fdf1f0; border: 1px solid #f6d3d0;
  border-radius: 9px;
}
.login-foot {
  margin-top: 24px; padding-top: 18px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted);
  display: flex; justify-content: space-between; gap: 10px;
}
.login-foot a { color: var(--brand); font-weight: 600; }

@media (max-width: 900px) {
  .login-shell { grid-template-columns: 1fr; }
  .login-hero { padding: 30px 26px; }
  .login-hero-mid h1 { font-size: 29px; }
  .login-hero-mid { margin: 26px 0; }
  .hero-list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .login-hero-foot { display: none; }
}

/* ============================ 顶栏 ============================ */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
}
.topbar-brand { display: flex; align-items: center; gap: 12px; }
.topbar-titles { display: flex; flex-direction: column; line-height: 1.35; }
.topbar-titles b { font-size: 15.5px; font-weight: 750; letter-spacing: .2px; }
.topbar-titles i { font-style: normal; font-size: 12px; color: var(--muted); }
.topbar-right { display: flex; align-items: center; gap: 12px; }
.user-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 12px 6px 6px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 999px; box-shadow: var(--shadow-1);
}
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  font-size: 13px; font-weight: 700; color: #fff;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
}
.user-meta { display: flex; flex-direction: column; line-height: 1.35; }
.user-meta b { font-size: 13.5px; font-weight: 700; }
.user-meta i { font-style: normal; font-size: 11.5px; color: var(--muted); }
.btn-ghost {
  height: 34px; padding: 0 14px;
  display: inline-flex; align-items: center;
  font-size: 13px; font-weight: 600; color: var(--text-2);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; transition: background .15s, color .15s;
}
.btn-ghost:hover { background: #f1f4fa; color: var(--text); }

/* ============================ 待办提醒铃铛 ============================ */
.bell-wrap { position: relative; }
.bell-btn {
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--border); border-radius: 10px;
  background: var(--surface); color: var(--text-2);
  cursor: pointer; transition: background .15s, color .15s, border-color .15s;
}
.bell-btn:hover { background: #f1f4fa; color: var(--text); border-color: var(--border-strong); }
.bell-btn svg { width: 20px; height: 20px; }
.bell-badge {
  position: absolute; top: -4px; right: -4px;
  min-width: 18px; height: 18px; padding: 0 5px;
  display: grid; place-items: center;
  font-size: 11px; font-weight: 800; color: #fff;
  background: var(--danger); border-radius: 999px;
  border: 2px solid var(--surface);
  box-sizing: border-box;
}
.bell-popover {
  position: absolute; top: calc(100% + 8px); right: 0;
  width: 320px; max-height: 420px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 14px; box-shadow: var(--shadow-2);
  z-index: 100; overflow: hidden;
  display: flex; flex-direction: column;
}
.bell-popover[hidden] { display: none; }
.bell-head {
  padding: 12px 14px;
  display: flex; align-items: center; justify-content: space-between;
  border-bottom: 1px solid var(--border);
}
.bell-head b { font-size: 14px; font-weight: 700; }
.bell-head span { font-size: 12px; color: var(--muted); }
.bell-body { flex: 1; overflow-y: auto; }
.bell-empty { padding: 30px 14px; text-align: center; font-size: 13px; color: var(--muted); }
.bell-item { padding: 12px 14px; border-bottom: 1px solid var(--border); }
.bell-item.unread { background: #f8fafc; }
.bell-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 4px; }
.bell-row b { font-size: 13px; font-weight: 600; color: var(--text); }
.bell-row span { font-size: 11px; color: var(--muted); white-space: nowrap; }
.bell-meta { font-size: 12px; color: var(--text-2); margin-bottom: 6px; }
.bell-meta i { font-style: normal; margin-left: 6px; font-size: 11px; }
.bell-meta i.un { color: var(--danger); }
.bell-meta i.read { color: var(--muted); }
.bell-link { font-size: 12px; color: var(--brand); font-weight: 600; }
.bell-link:hover { text-decoration: underline; }
.bell-foot {
  padding: 10px 14px;
  border-top: 1px solid var(--border);
  text-align: right;
}
.bell-foot a { font-size: 12px; color: var(--muted); }
.bell-foot a:hover { color: var(--brand); }

/* ============================ Hero ============================ */
.hero {
  background: linear-gradient(180deg, #fff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--border);
}
.hero-inner {
  max-width: 1280px; margin: 0 auto;
  padding: 30px 24px 26px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 26px; flex-wrap: wrap;
}
.hero-text h1 { margin: 0 0 7px; font-size: 26px; font-weight: 780; letter-spacing: -.3px; }
.hero-sub { margin: 0; font-size: 13.5px; color: var(--text-2); line-height: 1.7; }
.hero-sub .scope-pill {
  display: inline-block; margin: 0 4px 4px 0;
  padding: 2px 9px; font-size: 12px;
  background: #eaf1fe; color: #1b4ed0;
  border: 1px solid #d3e0fb; border-radius: 999px;
}
.search-wrap { position: relative; flex: 1 1 320px; max-width: 460px; }
.search-icon {
  position: absolute; left: 13px; top: 50%; transform: translateY(-50%);
  width: 18px; height: 18px; color: var(--muted);
}
#search {
  width: 100%; height: 44px;
  padding: 0 14px 0 40px;
  font-size: 14px; font-family: inherit; color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong); border-radius: 12px;
  box-shadow: var(--shadow-1);
  transition: border-color .15s, box-shadow .15s;
}
#search:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3.5px rgba(29, 78, 216, .12); }

/* ============================ 分组与卡片 ============================ */
.container { max-width: 1280px; margin: 0 auto; padding: 30px 24px 46px; }

.group { margin-bottom: 38px; }
.group-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; }
.group-head h2 {
  margin: 0; font-size: 17.5px; font-weight: 750;
  padding-left: 11px; border-left: 4px solid var(--brand); line-height: 1.25;
}
.group-count { font-size: 12px; color: var(--muted); background: var(--bg-2); padding: 2px 8px; border-radius: 999px; }
.group-desc { margin: 0 0 18px 15px; font-size: 13px; color: var(--muted); line-height: 1.7; max-width: 860px; }

.grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(316px, 1fr)); }

.card {
  position: relative;
  display: flex; flex-direction: column;
  padding: 20px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
  transition: transform .16s, box-shadow .2s, border-color .16s;
}
.card::before {
  content: ""; position: absolute; left: 0; top: 16px; bottom: 16px;
  width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent, var(--brand)); opacity: .85;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-2); border-color: var(--border-strong); }
.card.planned { background: var(--surface-2); border-style: dashed; box-shadow: none; }
.card.planned:hover { transform: none; box-shadow: none; }

.card-top { display: flex; align-items: flex-start; gap: 13px; margin-bottom: 12px; }
.card-icon {
  width: 42px; height: 42px; flex: 0 0 42px;
  display: grid; place-items: center; border-radius: 12px;
  color: var(--accent, var(--brand));
  background: color-mix(in srgb, var(--accent, var(--brand)) 11%, #fff);
  border: 1px solid color-mix(in srgb, var(--accent, var(--brand)) 22%, #fff);
}
.card-icon svg { width: 22px; height: 22px; }
.card-heads { min-width: 0; flex: 1; }
.card-name { display: flex; align-items: center; gap: 8px; font-size: 16px; font-weight: 730; letter-spacing: -.1px; }
.card-sub { margin-top: 3px; font-size: 12.5px; color: var(--muted); }

.status-dot { width: 8px; height: 8px; border-radius: 50%; flex: 0 0 8px; }
.status-dot.on { background: var(--ok); box-shadow: 0 0 0 3px rgba(21, 163, 74, .16); }
.status-dot.off { background: var(--danger); box-shadow: 0 0 0 3px rgba(208, 52, 44, .14); }
.status-dot.unk { background: #c4ccd8; }

.card-desc { margin: 0 0 13px; font-size: 13px; color: var(--text-2); line-height: 1.72; }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.tag {
  font-size: 11.5px; color: var(--text-2);
  background: var(--bg-2); border: 1px solid var(--border);
  padding: 2px 8px; border-radius: 6px;
}

.badge {
  font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px;
  letter-spacing: .2px; white-space: nowrap;
}
.badge.sso-direct { color: #0a7a3d; background: #e8f7ee; border: 1px solid #c3ead2; }
.badge.sso-hub { color: #0a7a3d; background: #e8f7ee; border: 1px solid #c3ead2; }
.badge.sso-pending { color: #1b4ed0; background: #eaf1fe; border: 1px solid #d3e0fb; }
.badge.sso-na { color: #5a6472; background: #f0f2f6; border: 1px solid #e1e5ec; }
.badge.sso-planned { color: #8a6100; background: #fdf5e4; border: 1px solid #f2e2bd; }

.card-note {
  margin: 0 0 14px; font-size: 12px; color: var(--muted);
  padding-left: 9px; border-left: 2px solid var(--border-strong); line-height: 1.6;
}

.card-actions { margin-top: auto; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.btn-enter {
  flex: 1 1 120px; height: 38px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: #fff;
  background: var(--accent, var(--brand));
  border: 0; border-radius: 9px; cursor: pointer;
  font-family: inherit;
  transition: filter .15s, transform .12s;
}
.btn-enter:hover { filter: brightness(1.08); transform: translateY(-1px); }
.btn-enter.primary {
  background: linear-gradient(135deg, var(--brand), #2563eb);
  box-shadow: 0 5px 14px rgba(29, 78, 216, .24);
}
.btn-enter svg { width: 15px; height: 15px; }
.btn-enter.disabled { background: #dfe4ec; color: #8b95a5; cursor: not-allowed; transform: none; filter: none; }
.btn-mini {
  height: 38px; padding: 0 11px;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12.5px; font-weight: 600; font-family: inherit; color: var(--text-2);
  background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 9px; cursor: pointer;
  transition: background .15s, color .15s;
}
.btn-mini:hover { background: #eef1f7; color: var(--text); }
.btn-mini svg { width: 14px; height: 14px; }

.creds-hint { margin: 8px 0 0; font-size: 11.5px; color: var(--muted); line-height: 1.6; width: 100%; }

/* 骨架屏 */
.skeleton-grid { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(316px, 1fr)); }
.skel { height: 196px; border-radius: var(--radius); background: linear-gradient(100deg, #eef1f7 30%, #f7f9fc 50%, #eef1f7 70%); background-size: 220% 100%; animation: shimmer 1.3s infinite linear; }
@keyframes shimmer { from { background-position: 120% 0; } to { background-position: -20% 0; } }

.empty-hint { padding: 40px 0; text-align: center; color: var(--muted); font-size: 14px; }

/* ============================ 页脚 / Toast ============================ */
.footer {
  max-width: 1280px; margin: 0 auto;
  padding: 22px 24px 40px;
  border-top: 1px solid var(--border);
  font-size: 12.5px; color: var(--muted); line-height: 1.8;
}
.footer-sub { margin-top: 4px; }

.toast {
  position: fixed; left: 50%; bottom: 34px; transform: translateX(-50%);
  padding: 11px 20px;
  font-size: 13.5px; font-weight: 600; color: #fff;
  background: #16202e; border-radius: 10px;
  box-shadow: 0 10px 26px rgba(16, 24, 40, .28);
  z-index: 60;
  animation: toastIn .18s ease-out;
}
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 8px); } to { opacity: 1; transform: translate(-50%, 0); } }

@media (max-width: 640px) {
  .topbar-inner, .hero-inner, .container, .footer { padding-left: 16px; padding-right: 16px; }
  .grid, .skeleton-grid { grid-template-columns: 1fr; }
  .hero-text h1 { font-size: 21px; }
  .user-meta { display: none; }
}

/* ============================ AI 智能体对话框 ============================ */
.ai-fab {
  position: fixed; right: 26px; bottom: 26px;
  width: 58px; height: 58px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #4f6ef7, #7a5af8);
  color: #fff; cursor: pointer; z-index: 70;
  box-shadow: 0 10px 26px rgba(90, 90, 248, .38);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ai-fab svg { width: 26px; height: 26px; }
.ai-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 14px 32px rgba(90, 90, 248, .46); }
/* 面板展开态：FAB 高亮，提示点击可收起 */
.ai-fab.ai-fab-active {
  background: linear-gradient(135deg, #7a5af8, #4f6ef7);
  box-shadow: 0 10px 26px rgba(90, 90, 248, .55);
}

.ai-panel {
  position: fixed; right: 26px; bottom: 96px;
  width: 400px; max-width: calc(100vw - 32px);
  height: 560px; max-height: calc(100vh - 140px);
  background: #fff; border-radius: 16px;
  box-shadow: 0 20px 60px rgba(16, 24, 40, .30);
  display: flex; flex-direction: column; overflow: hidden;
  z-index: 80; animation: aiPanelIn .22s ease-out;
}
.ai-panel[hidden] { display: none !important; }
@keyframes aiPanelIn { from { opacity: 0; transform: translateY(16px) scale(.98); } to { opacity: 1; transform: none; } }

.ai-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 16px;
  background: linear-gradient(135deg, #4f6ef7, #7a5af8);
  color: #fff;
}
.ai-head-title { display: flex; align-items: center; gap: 10px; }
.ai-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: rgba(255,255,255,.22);
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 15px;
}
.ai-head-title b { display: block; font-size: 14.5px; }
.ai-head-title i { display: block; font-size: 11px; opacity: .85; font-style: normal; }
.ai-close {
  min-width: 44px; min-height: 44px; padding: 0 10px;
  border: 0; border-radius: 10px;
  background: rgba(255,255,255,.16); color: #fff;
  font-size: 22px; line-height: 1; cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.ai-close:active, .ai-close:hover { background: rgba(255,255,255,.32); }

.ai-msgs {
  flex: 1; overflow-y: auto; padding: 14px;
  background: #f6f8fb; display: flex; flex-direction: column; gap: 10px;
}
.ai-msg { display: flex; }
.ai-msg.ai-bot { justify-content: flex-start; }
.ai-msg.ai-user { justify-content: flex-end; }
.ai-msg.ai-err .ai-bubble { background: #fdecec; color: #a33; border: 1px solid #f5c6c6; }
.ai-bubble {
  max-width: 86%; padding: 10px 13px;
  border-radius: 14px; font-size: 13.5px; line-height: 1.65;
  white-space: pre-wrap; word-break: break-word;
}
.ai-bot .ai-bubble {
  background: #fff; color: #1c2536;
  border: 1px solid #e8edf5; border-bottom-left-radius: 4px;
}
.ai-user .ai-bubble {
  background: #4f6ef7; color: #fff; border-bottom-right-radius: 4px;
}
.ai-bubble a { color: #4f6ef7; font-weight: 700; text-decoration: underline; word-break: break-all; }
.ai-user .ai-bubble a { color: #fff; }
.ai-typing .ai-bubble { color: #8894a8; }
.ai-typing .dot { display: inline-block; animation: aiBlink 1.2s infinite; }
.ai-typing .dot:nth-child(2) { animation-delay: .2s; }
.ai-typing .dot:nth-child(3) { animation-delay: .4s; }
@keyframes aiBlink { 0%, 80%, 100% { opacity: .25; } 40% { opacity: 1; } }

.ai-input-row {
  display: flex; gap: 8px; align-items: flex-end;
  padding: 10px 12px; border-top: 1px solid #e8edf5; background: #fff;
}
.ai-input {
  flex: 1; border: 1px solid #dfe6f0; border-radius: 10px;
  padding: 9px 12px; font-size: 13.5px; font-family: inherit;
  resize: none; max-height: 100px; line-height: 1.5;
  outline: none; color: #1c2536; background: #f9fbfe;
}
.ai-input:focus { border-color: #4f6ef7; background: #fff; box-shadow: 0 0 0 3px rgba(79,110,247,.14); }
.ai-send {
  width: 38px; height: 38px; border: 0; border-radius: 10px; flex-shrink: 0;
  background: #4f6ef7; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
}
.ai-send svg { width: 17px; height: 17px; }
.ai-send:hover { background: #3f5ce6; }
.ai-send:disabled { opacity: .5; cursor: not-allowed; }

@media (max-width: 640px) {
  .ai-panel { right: 12px; bottom: 88px; width: calc(100vw - 24px); }
  .ai-fab { right: 18px; bottom: 18px; }
}
/* ===== HR-Systems 统一设计令牌 (Phase A · 2026-08-25) =====
   纯增量、可一键回退：仅设置装饰性属性，不改变布局/事件/数据。 */
:root{
  --brand:#2563eb; --brand-600:#1d4ed8; --brand-700:#1e40af; --brand-50:#eff6ff;
  --accent:#7c3aed; --accent-50:#f5f3ff;
  --ok:#16a34a; --warn:#d97706; --danger:#dc2626;
  --ink:#0f172a; --body:#334155; --muted:#64748b;
  --line:#e2e8f0; --line-2:#cbd5e1;
  --bg:#f8fafc; --surface:#ffffff; --surface-2:#f1f5f9;
  --r-xs:6px; --r-sm:8px; --r:12px; --r-lg:16px; --r-xl:20px;
  --sh-1:0 1px 2px rgba(15,23,42,.04),0 1px 3px rgba(15,23,42,.06);
  --sh-2:0 4px 14px rgba(15,23,42,.08);
  --f-zh:"PingFang SC","Microsoft YaHei","Hiragino Sans GB","Source Han Sans SC","Noto Sans CJK SC",sans-serif;
}
body{font-family:var(--f-zh);color:var(--body);background:var(--bg);-webkit-font-smoothing:antialiased;}
button,input,select,textarea,table,code,th,td{font-family:inherit;}
a{color:var(--brand);}
button,.btn{border-radius:var(--r-sm);cursor:pointer;transition:border-color .15s,background .15s,box-shadow .15s;}
input[type=text],input[type=password],input[type=email],input[type=search],input[type=number],input[type=date],select,textarea{
  border:1px solid var(--line-2);border-radius:var(--r-sm);background:var(--surface);color:var(--ink);
  padding:8px 10px;transition:border-color .15s,box-shadow .15s;}
input:focus,select:focus,textarea:focus{border-color:var(--brand);box-shadow:0 0 0 3px var(--brand-50);outline:none;}
.card,.panel,.box,.module,.widget{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--sh-1);}
table{border-collapse:collapse;width:100%;}
th,td{border:1px solid var(--line);padding:8px 10px;color:var(--body);vertical-align:top;}
th{background:var(--surface-2);color:var(--ink);font-weight:600;text-align:left;}
.btn-primary,button.primary{background:var(--brand);border:1px solid var(--brand);color:#fff;}
.btn-primary:hover,button.primary:hover{background:var(--brand-600);}


/* == HR-Systems UI 阶段 B（组件级精修） == */
/* === 阶段 B：组件级精修 · 安全增量 CSS === */
/* 仅新增类/状态，不覆盖已有业务选择器，零功能风险 */

/* 页面标题 */
.page-title,.page-heading{font-size:1.5rem;font-weight:700;color:var(--ink);margin-bottom:1rem;line-height:1.3;}
.page-title small,.page-heading small{display:block;font-size:.85rem;font-weight:400;color:var(--muted);margin-top:.25rem;}

/* 统计卡片 */
.stat-card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:1.25rem;box-shadow:var(--sh-1);transition:transform .15s,box-shadow .15s;}
.stat-card:hover{transform:translateY(-2px);box-shadow:var(--sh-2);}
.stat-card .value{font-size:1.75rem;font-weight:700;color:var(--ink);line-height:1.2;}
.stat-card .label{font-size:.875rem;color:var(--muted);margin-top:.25rem;}
.stat-card .icon{width:40px;height:40px;border-radius:var(--r-sm);display:flex;align-items:center;justify-content:center;background:var(--brand-50);color:var(--brand);margin-bottom:.75rem;}

/* 表单标签 */
.form-label,.label{font-size:.875rem;font-weight:500;color:var(--ink);margin-bottom:.375rem;display:block;}
.form-label.required::after,.label.required::after{content:"*";color:var(--danger);margin-left:2px;}

/* 空状态 */
.empty-state{text-align:center;padding:2.5rem 1rem;color:var(--muted);}
.empty-state .icon{font-size:2.5rem;color:var(--line-2);margin-bottom:.75rem;}
.empty-state .title{font-size:1rem;font-weight:600;color:var(--ink);margin-bottom:.25rem;}

/* 表格行悬停 */
table tbody tr{transition:background .12s;}
table tbody tr:hover{background:var(--surface-2);}

/* 按钮焦点环强化 */
button:focus-visible,.btn:focus-visible,input:focus-visible,select:focus-visible,textarea:focus-visible{outline:none;box-shadow:0 0 0 3px var(--brand-50);}

/* 链接下划线 */
a:hover{text-decoration:underline;}

/* 面包屑 */
.breadcrumb{display:flex;align-items:center;gap:.5rem;font-size:.875rem;color:var(--muted);margin-bottom:1rem;}
.breadcrumb a{color:var(--brand);text-decoration:none;}
.breadcrumb a:hover{text-decoration:underline;}
.breadcrumb .sep{color:var(--line-2);}
