/* ==========================================================================
   林中科技 · Linzhong Members — 设计系统 base.css
   深邃午夜蓝 + 电光蓝 · 极简高级 · 科技质感
   ========================================================================== */

/* ---------- 字体 ---------- */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,500;0,600;0,700;1,400&family=Noto+Sans+SC:wght@300;400;500;700&family=JetBrains+Mono:wght@400;500&display=swap');

/* ---------- 设计令牌 ---------- */
:root {
  /* 色彩 — 奶白浅灰系（底色 · 亮色主题） */
  --forest-900: #F6F8FC;
  --forest-800: #EEF2F9;
  --forest-700: #E5EBF5;
  --forest-600: #D5DDEC;
  --forest-500: #B9C3D6;

  /* 色彩 — 电光蓝系（主色） */
  --gold-500: #2F6FE0;
  --gold-400: #4F8EF7;
  --gold-300: #7BA9FB;
  --gold-600: #1E57B8;

  /* 文字与线条 */
  --ivory: #0E1320;
  --mist: #6B7383;
  --mist-dim: #9AA3B4;
  --line: rgba(14, 19, 32, 0.08);
  --line-strong: rgba(14, 19, 32, 0.16);

  --danger: #D94848;
  --danger-bg: rgba(217, 72, 72, 0.10);
  --success: #22A06B;
  --success-bg: rgba(34, 160, 107, 0.10);

  /* 字体 */
  --font-display: 'Cormorant Garamond', 'Songti SC', serif;
  --font-body: 'Noto Sans SC', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;

  /* 间距 (4 的倍数) */
  --s-1: 4px; --s-2: 8px; --s-3: 12px; --s-4: 16px;
  --s-5: 20px; --s-6: 24px; --s-8: 32px; --s-10: 40px;
  --s-12: 48px; --s-16: 64px; --s-20: 80px;

  /* 圆角 */
  --r-sm: 6px; --r-md: 10px; --r-lg: 16px; --r-xl: 24px;

  /* 阴影 */
  --shadow-card: 0 8px 24px -8px rgba(24, 40, 72, 0.06), 0 0 0 1px var(--line);
  --shadow-glow: 0 0 28px -6px rgba(47, 111, 224, 0.14);
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--ivory);
  background: var(--forest-800);
  line-height: 1.6;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: none; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; }

/* ---------- 全局氛围背景 ---------- */
.atmosphere {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden;
  background:
    radial-gradient(ellipse 80% 60% at 20% 0%, rgba(47, 111, 224, 0.10), transparent 60%),
    radial-gradient(ellipse 60% 50% at 100% 100%, rgba(79, 142, 247, 0.08), transparent 60%),
    linear-gradient(180deg, var(--forest-900) 0%, var(--forest-800) 50%, var(--forest-900) 100%);
}
.atmosphere::before {
  content: ''; position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(14, 19, 32, 0.04) 1px, transparent 0);
  background-size: 32px 32px;
  opacity: 0.6;
}
/* 飘浮的光晕 */
.atmosphere::after {
  content: ''; position: absolute;
  width: 600px; height: 600px; border-radius: 50%;
  background: radial-gradient(circle, rgba(47, 111, 224, 0.10), transparent 70%);
  top: -200px; right: -150px;
  animation: drift 18s ease-in-out infinite alternate;
  filter: blur(20px);
}
@keyframes drift {
  0%   { transform: translate(0,0) scale(1); }
  100% { transform: translate(-80px, 60px) scale(1.15); }
}

/* ---------- 排版 ---------- */
.display, h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }
.eyebrow {
  font-family: var(--font-mono); font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.28em; text-transform: uppercase; color: var(--gold-500);
}
.muted { color: var(--mist); }
.gold { color: var(--gold-500); }
.serif-italic { font-family: var(--font-display); font-style: italic; }

/* ---------- 品牌 Logo ---------- */
.brand { display: inline-flex; align-items: center; gap: var(--s-3); }
.brand-mark { width: 48px; height: 48px; flex-shrink: 0; }
.brand-mark svg, .brand-mark img { width: 100%; height: 100%; display: block; }
.brand-text { display: flex; flex-direction: column; line-height: 1; }
.brand-name { font-family: var(--font-display); font-size: 1.35rem; font-weight: 600; color: var(--ivory); letter-spacing: 0.02em; }
.brand-sub { font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.3em; color: var(--gold-500); text-transform: uppercase; margin-top: 3px; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  padding: 12px 24px; border-radius: var(--r-md);
  font-size: 0.92rem; font-weight: 500; letter-spacing: 0.02em;
  transition: all 0.3s cubic-bezier(.22,1,.36,1);
  border: 1px solid transparent; white-space: nowrap;
  position: relative; overflow: hidden;
}
.btn:active:not(:disabled) { transform: scale(.97); }
.btn::after {
  content: '';
  position: absolute; inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,.08), transparent);
  transform: translateX(-100%);
  transition: transform .6s ease;
}
.btn:hover:not(:disabled)::after { transform: translateX(100%); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-primary {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #ffffff; font-weight: 600;
  box-shadow: 0 4px 18px -4px rgba(47, 111, 224, 0.45);
}
.btn-primary:not(:disabled):hover { transform: translateY(-2px); box-shadow: 0 8px 26px -4px rgba(47, 111, 224, 0.55); }
.btn-ghost {
  background: rgba(47, 111, 224, 0.04); color: var(--ivory);
  border-color: var(--line);
}
.btn-ghost:not(:disabled):hover { background: rgba(47, 111, 224, 0.08); border-color: var(--line-strong); }
.btn-danger { background: var(--danger-bg); color: var(--danger); border-color: rgba(217, 72, 72, 0.28); }
.btn-danger:not(:disabled):hover { background: rgba(217, 72, 72, 0.16); }
.btn-sm { padding: 7px 14px; font-size: 0.82rem; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.field { margin-bottom: var(--s-5); }
.field-label {
  display: block; font-size: 0.78rem; font-weight: 500; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--gold-400); margin-bottom: var(--s-2);
}
.field-input, .field-select, .field-textarea {
  width: 100%; padding: 12px 14px;
  background: rgba(255,255,255,0.9); border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--ivory); font-size: 0.95rem;
  transition: all 0.2s ease;
}
.field-input::placeholder, .field-textarea::placeholder { color: var(--mist-dim); }
.field-input:focus, .field-select:focus, .field-textarea:focus {
  outline: none; border-color: var(--gold-500);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(47, 111, 224, 0.10);
}
.field-textarea { resize: vertical; min-height: 80px; }
.field-input.is-error, .field-select.is-error { border-color: var(--danger); }
.field-error { font-size: 0.78rem; color: var(--danger); margin-top: 6px; }
.field-hint { font-size: 0.78rem; color: var(--mist); margin-top: 6px; }

.input-group { position: relative; display: flex; align-items: center; }
.input-group .field-input { padding-right: 44px; }
.input-toggle {
  position: absolute; right: 10px; padding: 6px; color: var(--mist);
  display: inline-flex; transition: color 0.2s;
}
.input-toggle:hover { color: var(--gold-500); }

select.field-select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%232F6FE0' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 36px;
}
select.field-select option { background: #ffffff; color: var(--ivory); }

/* ---------- 卡片 ---------- */
.card {
  background: linear-gradient(180deg, rgba(255,255,255,0.85), rgba(255,255,255,0.72));
  border: 1px solid var(--line); border-radius: var(--r-lg);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: var(--shadow-card);
}
.card-pad { padding: var(--s-8); }
.card-header { padding: var(--s-6) var(--s-8); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); }

/* ---------- 顶部导航 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-4) var(--s-10);
  background: rgba(255,255,255,0.78); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar-nav { display: flex; align-items: center; gap: var(--s-6); }
.topbar-link {
  font-size: 0.88rem; color: var(--mist); padding: 6px 2px;
  border-bottom: 1px solid transparent; transition: all 0.2s;
}
.topbar-link:hover, .topbar-link.active { color: var(--ivory); border-bottom-color: var(--gold-500); }
.topbar-right { display: flex; align-items: center; gap: var(--s-4); }

/* 用户菜单 */
.user-chip {
  display: flex; align-items: center; gap: var(--s-3); padding: 6px 8px 6px 6px;
  border-radius: 999px; border: 1px solid var(--line); background: rgba(255,255,255,0.6);
  transition: all 0.2s; cursor: pointer;
}
.user-chip:hover { border-color: var(--line-strong); background: rgba(79,142,247,0.06); }
.avatar {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, rgba(47,111,224,0.12), rgba(47,111,224,0.06));
  border: 1px solid rgba(47,111,224,0.2); color: var(--gold-600);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-display); font-weight: 600; font-size: 0.95rem;
}
.avatar.lg { width: 88px; height: 88px; font-size: 2.2rem; }
.user-chip-name { font-size: 0.85rem; color: var(--ivory); }
.user-chip-role { font-size: 0.7rem; color: var(--gold-500); letter-spacing: 0.1em; text-transform: uppercase; }

/* ---------- Toast 通知 ---------- */
.toast-wrap {
  position: fixed; top: 20px; right: 20px; z-index: 9999;
  display: flex; flex-direction: column; gap: 10px; max-width: 360px;
}
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  padding: 14px 18px; border-radius: var(--r-md);
  background: rgba(255,255,255,0.95); backdrop-filter: blur(12px);
  border: 1px solid var(--line); color: var(--ivory);
  box-shadow: 0 8px 24px -6px rgba(24,40,72,0.08);
  animation: toastIn 0.35s cubic-bezier(.2,.8,.2,1);
  font-size: 0.88rem;
}
.toast.out { animation: toastOut 0.3s ease forwards; }
.toast-icon { flex-shrink: 0; margin-top: 1px; }
.toast.success { border-left: 3px solid var(--success); }
.toast.success .toast-icon { color: var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.error .toast-icon { color: var(--danger); }
.toast.info { border-left: 3px solid var(--gold-500); }
.toast.info .toast-icon { color: var(--gold-500); }
@keyframes toastIn { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: translateX(0); } }
@keyframes toastOut { to { opacity: 0; transform: translateX(40px); } }

/* ---------- 模态框 ---------- */
.modal-mask {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(14,19,32,0.12); backdrop-filter: blur(6px);
  display: flex; align-items: center; justify-content: center; padding: var(--s-6);
  animation: fadeIn 0.25s ease;
}
.modal {
  width: 100%; max-width: 560px; max-height: 90vh; overflow-y: auto;
  animation: modalIn 0.35s cubic-bezier(.2,.8,.2,1);
}
.modal-head { padding: var(--s-6) var(--s-8); border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; }
.modal-title { font-family: var(--font-display); font-size: 1.5rem; font-weight: 600; }
.modal-body { padding: var(--s-8); }
.modal-foot { padding: var(--s-5) var(--s-8); border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: var(--s-3); }
.modal-close {
  color: var(--mist); padding: 6px;
  transition: color 0.2s, transform 0.2s cubic-bezier(.22,1,.36,1);
}
.modal-close:hover { color: var(--ivory); transform: rotate(90deg) scale(1.1); }
@keyframes modalIn {
  from { opacity: 0; transform: translateY(24px) scale(.96); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-mask { animation: fadeIn .3s cubic-bezier(.22,1,.36,1); }
.modal { animation: modalIn .4s cubic-bezier(.22,1.1,.36,1); }
.modal-close {
  color: var(--mist); padding: 6px;
  transition: color 0.2s, transform 0.2s cubic-bezier(.22,1,.36,1);
}
.modal-close:hover { color: var(--ivory); transform: rotate(90deg) scale(1.1); }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.table thead th {
  text-align: left; padding: var(--s-4) var(--s-5);
  font-family: var(--font-mono); font-size: 0.7rem; font-weight: 500;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--gold-500);
  border-bottom: 1px solid var(--line-strong); white-space: nowrap;
}
.table tbody td { padding: var(--s-4) var(--s-5); border-bottom: 1px solid var(--line); }
.table tbody tr { transition: background 0.18s; }
.table tbody tr:hover { background: rgba(79,142,247,0.04); }
.table tbody tr:last-child td { border-bottom: none; }

/* ---------- 标签 / 徽章 ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: 999px; font-size: 0.72rem; font-weight: 500;
  letter-spacing: 0.04em; border: 1px solid var(--line);
}
.badge.gold { color: var(--gold-400); border-color: rgba(79,142,247,0.4); background: rgba(79,142,247,0.08); }
.badge.admin { color: var(--gold-300); border-color: rgba(79,142,247,0.5); background: rgba(79,142,247,0.14); }
.badge.employee { color: var(--mist); border-color: var(--line); background: rgba(139,154,145,0.08); }
.badge-warning { color: #d97706; border-color: rgba(234, 179, 8, 0.3); background: rgba(234, 179, 8, 0.12); }
.badge-success { color: #059669; border-color: rgba(16, 185, 129, 0.3); background: rgba(16, 185, 129, 0.12); }
.badge-info { color: #2563eb; border-color: rgba(59, 130, 246, 0.3); background: rgba(59, 130, 246, 0.12); }
.badge-danger { color: #dc2626; border-color: rgba(239, 68, 68, 0.3); background: rgba(239, 68, 68, 0.12); }

/* ---------- 工具类 ---------- */
.row { display: flex; align-items: center; }
.row-between { display: flex; align-items: center; justify-content: space-between; }
.gap-2 { gap: var(--s-2); } .gap-3 { gap: var(--s-3); } .gap-4 { gap: var(--s-4); } .gap-6 { gap: var(--s-6); }
.grid { display: grid; gap: var(--s-6); }
.hide { display: none !important; }
[hidden] { display: none !important; }
.text-center { text-align: center; }
.text-sm { font-size: 0.82rem; } .text-xs { font-size: 0.72rem; }
.text-danger { color: var(--danger); }
.text-muted { color: var(--mist); }
.mt-2 { margin-top: var(--s-2); } .mt-4 { margin-top: var(--s-4); } .mt-6 { margin-top: var(--s-6); } .mt-8 { margin-top: var(--s-8); }
.mb-4 { margin-bottom: var(--s-4); } .mb-6 { margin-bottom: var(--s-6); } .mb-8 { margin-bottom: var(--s-8); }
.flex-1 { flex: 1; }

/* ---------- 通用动画 ---------- */
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInDown {
  from { opacity: 0; transform: translateY(-12px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(20px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 16px -4px rgba(79,142,247,0.3); }
  50%      { box-shadow: 0 0 28px -4px rgba(79,142,247,0.55); }
}

/* 入场动画工具类 */
.anim-fade-in     { opacity: 0; animation: fadeIn .5s ease forwards; }
.anim-fade-up     { opacity: 0; animation: fadeInUp .6s cubic-bezier(.22,1,.36,1) forwards; }
.anim-fade-down   { opacity: 0; animation: fadeInDown .5s cubic-bezier(.22,1,.36,1) forwards; }
.anim-fade-scale  { opacity: 0; animation: fadeInScale .5s cubic-bezier(.22,1,.36,1) forwards; }
.anim-slide-right { opacity: 0; animation: slideInRight .5s cubic-bezier(.22,1,.36,1) forwards; }

/* ---------- 确认弹窗 ---------- */
.confirm-modal .modal { max-width: 420px; width: 90%; }
.confirm-modal .modal-body { padding: var(--s-6) var(--s-8); font-size: 0.92rem; line-height: 1.7; }
.confirm-modal .modal-foot { justify-content: flex-end; gap: var(--s-3); }

.prompt-modal .modal { max-width: 440px; width: 90%; }
.prompt-modal .modal-body { padding: var(--s-6) var(--s-8); }
.prompt-modal .prompt-msg { font-size: 0.92rem; line-height: 1.7; margin-bottom: var(--s-4); }
.prompt-modal .field-input { width: 100%; }

/* 错位延迟 */
.delay-1 { animation-delay: .06s; }
.delay-2 { animation-delay: .12s; }
.delay-3 { animation-delay: .18s; }
.delay-4 { animation-delay: .24s; }
.delay-5 { animation-delay: .30s; }
.delay-6 { animation-delay: .36s; }

/* 内容切换过渡容器（淡入淡出） */
.transition-content {
  position: relative;
}
.transition-content > * {
  transition: opacity .35s ease, transform .35s cubic-bezier(.22,1,.36,1);
}

/* 进入 / 离开 状态（JS 控制） */
.is-entering { opacity: 0; transform: translateY(8px); }
.is-leaving   { opacity: 0; transform: translateY(-4px); }

/* 可过渡显示的元素 */
.fade-appear { opacity: 0; transform: translateY(10px); transition: opacity .45s ease, transform .45s cubic-bezier(.22,1,.36,1); }
.fade-appear.is-visible { opacity: 1; transform: translateY(0); }

/* 卡片 / 列表项 通用入场 */
.card { opacity: 0; animation: fadeInUp .6s cubic-bezier(.22,1,.36,1) forwards; }
.card:nth-of-type(1) { animation-delay: .02s; }
.card:nth-of-type(2) { animation-delay: .08s; }
.card:nth-of-type(3) { animation-delay: .14s; }
.card:nth-of-type(4) { animation-delay: .20s; }
.card:nth-of-type(5) { animation-delay: .26s; }

/* 加载骨架 */
.skeleton {
  background: linear-gradient(90deg, rgba(14,19,32,0.04) 25%, rgba(14,19,32,0.08) 37%, rgba(14,19,32,0.04) 63%);
  background-size: 400% 100%; animation: shimmer 1.4s infinite;
  border-radius: var(--r-sm);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.spinner {
  width: 18px; height: 18px; border: 2px solid rgba(14,19,32,0.08);
  border-top-color: var(--gold-500); border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 滚动条 */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--forest-900); }
::-webkit-scrollbar-thumb { background: var(--forest-600); border-radius: 999px; border: 2px solid var(--forest-900); }
::-webkit-scrollbar-thumb:hover { background: var(--forest-500); }

/* ---------- 移动端汉堡菜单按钮 ---------- */
.topbar-toggle {
  display: none;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  border-radius: var(--r-sm);
  color: var(--ivory);
  border: 1px solid var(--line);
  background: rgba(245,242,236,0.03);
  transition: all 0.2s;
}
.topbar-toggle:hover { background: rgba(79,142,247,0.08); border-color: var(--line-strong); }
.topbar-toggle svg { width: 20px; height: 20px; }

/* ---------- 响应式 ---------- */
@media (max-width: 768px) {
  body { font-size: 15px; }
  h1 { font-size: clamp(1.8rem, 7vw, 2.6rem); }
  h2 { font-size: clamp(1.3rem, 5vw, 1.8rem); }
  h3 { font-size: 1.1rem; }

  /* 顶栏：汉堡菜单 */
  .topbar {
    padding: var(--s-3) var(--s-4);
    gap: var(--s-2);
    flex-wrap: wrap;
  }
  .topbar .brand { flex: 1; min-width: 0; }
  .topbar .brand-mark { width: 36px; height: 36px; }
  .topbar .brand-name { font-size: 1rem; }
  .topbar .brand-sub { display: none; }
  .topbar-right { order: 2; gap: var(--s-2); }
  .topbar-toggle { display: inline-flex; order: 3; }
  .topbar-nav {
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding-top: var(--s-3);
    margin-top: var(--s-3);
    border-top: 1px solid var(--line);
    display: none;
  }
  .topbar-nav.open { display: flex; }
  .topbar-link {
    padding: var(--s-3) var(--s-2);
    border-bottom: 1px solid var(--line);
    border-bottom-color: var(--line);
  }
  .topbar-link:last-child { border-bottom: none; }
  .topbar-link:hover, .topbar-link.active {
    border-bottom-color: var(--gold-500);
    background: rgba(79,142,247,0.06);
    padding-left: var(--s-3);
    border-radius: var(--r-sm);
  }
  .topbar-right { gap: var(--s-2); }
  .user-chip { padding: 4px 6px 4px 4px; }
  .user-chip-name, .user-chip-role { display: none; }

  /* 按钮：移动端触摸区域 */
  .btn { min-height: 44px; padding: 10px 18px; }
  .btn-sm { min-height: 36px; padding: 6px 12px; }

  /* 输入框：移动端触摸区域 */
  .field-input, .field-select, .field-textarea {
    min-height: 44px;
    font-size: 16px; /* 防止 iOS 自动放大 */
  }

  /* 卡片 */
  .card-pad { padding: var(--s-5); }
  .card-header {
    padding: var(--s-5);
    flex-direction: column;
    align-items: flex-start;
    gap: var(--s-3);
  }
  .card-header > div:last-child { align-self: stretch; }

  /* 模态框 */
  .modal-mask { padding: 0; align-items: flex-end; }
  .modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    border-bottom: none;
  }
  .modal-head, .modal-body, .modal-foot { padding-left: var(--s-5); padding-right: var(--s-5); }
  .modal-head { padding-top: var(--s-5); padding-bottom: var(--s-5); }
  .modal-body { padding-top: var(--s-5); padding-bottom: var(--s-5); }
  .modal-foot {
    padding-top: var(--s-4);
    padding-bottom: calc(var(--s-5) + env(safe-area-inset-bottom));
  }

  /* Toast：移动端顶部全宽 */
  .toast-wrap {
    top: 0; left: 0; right: 0;
    max-width: 100%;
    padding: var(--s-3);
  }
  .toast {
    font-size: 0.86rem;
    padding: 12px 16px;
  }

  /* 表格移动端 */
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: var(--s-3) 0; border-bottom: 1px solid var(--line); }
  .table tbody tr:last-child { border-bottom: none; }
  .table td {
    border: none;
    padding: 5px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--s-3);
    text-align: right;
  }
  .table td::before {
    content: attr(data-label);
    color: var(--mist);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    flex-shrink: 0;
    margin-right: auto;
    text-align: left;
    font-family: var(--font-mono);
  }

  /* 工具类隐藏 */
  .hide-sm { display: none !important; }
  .text-sm { font-size: 0.78rem; }
}

/* 超小屏 */
@media (max-width: 380px) {
  .brand-sub { display: none; }
  .eyebrow { font-size: 0.65rem; letter-spacing: 0.22em; }
}

/* ==========================================================================
   私信功能样式（全局）
   ========================================================================== */

/* 顶栏消息按钮 */
.msg-btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: var(--r-sm);
  color: var(--mist); border: 1px solid var(--line);
  background: rgba(255,255,255,0.6);
  transition: all 0.2s;
}
.msg-btn:hover {
  color: var(--gold-500); border-color: var(--line-strong);
  background: rgba(79,142,247,0.06);
}
.msg-badge {
  position: absolute; top: -6px; right: -6px;
  min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--danger);
  color: #fff; font-size: 0.66rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center;
  line-height: 1; border: 2px solid var(--forest-800);
}

/* 会话列表 */
.dm-conv-list {
  display: flex; flex-direction: column; gap: 2px;
  margin: calc(-1 * var(--s-8)); margin-top: 0;
  max-height: 60vh; overflow-y: auto;
}
.dm-conv-item {
  display: flex; align-items: center; gap: var(--s-3);
  padding: var(--s-4) var(--s-8);
  cursor: pointer; transition: background 0.15s;
  border-bottom: 1px solid var(--line);
}
.dm-conv-item:hover { background: rgba(79,142,247,0.04); }
.dm-conv-item:last-child { border-bottom: none; }
.dm-conv-info { flex: 1; min-width: 0; }
.dm-conv-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
}
.dm-conv-name { font-size: 0.92rem; font-weight: 500; color: var(--ivory); }
.dm-conv-time { font-size: 0.7rem; color: var(--mist-dim); flex-shrink: 0; font-family: var(--font-mono); }
.dm-conv-preview {
  display: flex; align-items: center; gap: var(--s-2); margin-top: 3px;
}
.dm-conv-text {
  font-size: 0.8rem; color: var(--mist);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  flex: 1; min-width: 0;
}
.dm-conv-text.unread { color: var(--ivory); font-weight: 500; }
.dm-conv-unread {
  flex-shrink: 0; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--gold-500);
  color: #fff; font-size: 0.66rem; font-weight: 600;
  display: flex; align-items: center; justify-content: center; line-height: 1;
}

/* 对话窗口 */
.dm-chat {
  display: flex; flex-direction: column; gap: 0;
  margin: calc(-1 * var(--s-8));
}
.dm-messages {
  height: 360px; max-height: 50vh; overflow-y: auto;
  padding: var(--s-6) var(--s-8);
  display: flex; flex-direction: column; gap: var(--s-3);
}
.dm-msg {
  display: flex; flex-direction: column; gap: 3px;
  max-width: 75%;
}
.dm-msg.mine { align-self: flex-end; align-items: flex-end; }
.dm-msg.theirs { align-self: flex-start; align-items: flex-start; }
.dm-msg-bubble {
  padding: 8px 14px; border-radius: var(--r-md);
  font-size: 0.88rem; line-height: 1.5; word-break: break-word;
}
.dm-msg.mine .dm-msg-bubble {
  background: linear-gradient(135deg, var(--gold-500), var(--gold-600));
  color: #fff; border-bottom-right-radius: 4px;
}
.dm-msg.theirs .dm-msg-bubble {
  background: rgba(79,142,247,0.08); color: var(--ivory);
  border: 1px solid var(--line); border-bottom-left-radius: 4px;
}
.dm-msg-time { font-size: 0.68rem; color: var(--mist-dim); font-family: var(--font-mono); }

.dm-input-bar {
  display: flex; align-items: flex-end; gap: var(--s-2);
  padding: var(--s-4) var(--s-8);
  border-top: 1px solid var(--line);
  background: rgba(255,255,255,0.6);
}
.dm-input {
  flex: 1; resize: none; border: 1px solid var(--line);
  border-radius: var(--r-sm); padding: 10px 14px;
  font-size: 0.88rem; line-height: 1.5; max-height: 100px;
  background: rgba(255,255,255,0.9); color: var(--ivory);
  transition: border-color 0.2s;
}
.dm-input:focus {
  outline: none; border-color: var(--gold-500);
  box-shadow: 0 0 0 3px rgba(47,111,224,0.10);
}
.dm-input-bar .btn { flex-shrink: 0; height: 42px; width: 42px; padding: 0; }

.dm-empty {
  text-align: center; padding: var(--s-10) var(--s-4);
  color: var(--mist); font-size: 0.88rem;
}

/* 系统通知头像 */
.sys-avatar {
  background: linear-gradient(135deg, rgba(79,142,247,0.15), rgba(47,111,224,0.08)) !important;
  color: var(--gold-500) !important;
}
.sys-avatar svg { width: 20px; height: 20px; }

/* 系统通知列表项 */
.dm-conv-system {
  background: rgba(79,142,247,0.03);
  border-bottom: 2px solid var(--line-strong);
}

/* 系统通知详情 */
.notify-item {
  display: flex; align-items: flex-start; gap: var(--s-3);
  padding: var(--s-4) var(--s-8);
  border-bottom: 1px solid var(--line);
  transition: background 0.15s;
}
.notify-item:last-child { border-bottom: none; }
.notify-item.unread { background: rgba(79,142,247,0.04); }
.notify-icon {
  width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.85rem; font-weight: 700; line-height: 1;
}
.notify-approved { background: rgba(34,197,94,0.15); color: #16a34a; }
.notify-rejected { background: rgba(239,68,68,0.12); color: #dc2626; }
.notify-birthday { background: rgba(251,191,36,0.15); color: #d97706; font-size: 1rem; }
.notify-info { flex: 1; min-width: 0; }
.notify-top {
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-2);
}
.notify-title { font-size: 0.9rem; font-weight: 500; color: var(--ivory); }
.notify-item.unread .notify-title { font-weight: 600; }
.notify-time { font-size: 0.7rem; color: var(--mist-dim); flex-shrink: 0; font-family: var(--font-mono); }
.notify-content {
  font-size: 0.82rem; color: var(--mist); margin-top: 3px;
  line-height: 1.5; word-break: break-word;
}
.notify-item.unread .notify-content { color: var(--ivory); }
.notify-actions {
  display: flex; align-items: center; gap: var(--s-3);
  margin-top: var(--s-3);
}
.notify-confirmed {
  display: inline-block;
  padding: 3px 10px;
  font-size: 0.72rem;
  font-weight: 500;
  color: #16a34a;
  background: rgba(34,197,94,0.12);
  border-radius: 999px;
}

/* 送祝福按钮 */
.wish-btn {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 3px 10px; border-radius: 999px;
  font-size: 0.72rem; font-weight: 500; color: var(--gold-500);
  background: rgba(251,191,36,0.10); border: 1px solid rgba(251,191,36,0.25);
  cursor: pointer; transition: all 0.2s; margin-top: 6px;
}
.wish-btn:hover {
  background: rgba(251,191,36,0.18); border-color: rgba(251,191,36,0.4);
}

/* 移动端私信适配 */
@media (max-width: 480px) {
  .dm-conv-list { margin: 0; }
  .dm-conv-item { padding: var(--s-4) var(--s-5); }
  .dm-messages { height: 300px; padding: var(--s-4) var(--s-5); }
  .dm-input-bar { padding: var(--s-3) var(--s-5); }
  .dm-chat { margin: 0; }
  .notify-item { padding: var(--s-4) var(--s-5); }
}
