/* ================================================================
   逍遥DAO · 内部管理系统 · v3
   深黑底 + 金紫渐变 + 玻璃拟态 + 全端响应式
   ================================================================ */

@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+SC:wght@300;400;500;600;700&family=Noto+Serif+SC:wght@400;600;700&display=swap');

:root {
  --bg-primary:    #080a12;
  --bg-secondary:  #0d1020;
  --bg-card:       rgba(255,255,255,0.04);
  --bg-card-hover: rgba(255,255,255,0.07);
  --border:        rgba(255,255,255,0.08);
  --border-gold:   rgba(212,175,55,0.3);

  --gold-1: #f6d365;
  --gold-2: #e8a838;
  --purple-1: #a78bfa;
  --purple-2: #7c3aed;

  --gradient-gold:   linear-gradient(135deg, #f6d365 0%, #e8a838 50%, #d4a017 100%);
  --gradient-purple: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  --gradient-hero:   linear-gradient(135deg, #0a0a1a 0%, #12102a 40%, #1a1040 100%);

  --text-primary:   #f1f5f9;
  --text-secondary: rgba(255,255,255,0.55);
  --text-muted:     rgba(255,255,255,0.3);

  --radius-sm:  8px;
  --radius-md:  12px;
  --radius-lg:  16px;
  --radius-xl:  20px;
  --radius-2xl: 28px;

  /* 手机端底栏高度 */
  --bottom-nav-h: 60px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Noto Sans SC', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg-primary);
  color: var(--text-primary);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.12); border-radius: 2px; }

/* ================================================================
   登录页
   ================================================================ */
.login-page {
  min-height: 100vh;
  background: var(--gradient-hero);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem 1rem;
  position: relative; overflow: hidden;
}
.login-page::before {
  content:''; position:absolute; width:600px; height:600px;
  background: radial-gradient(circle, rgba(124,58,237,0.15) 0%, transparent 70%);
  top:-100px; right:-100px; pointer-events:none;
}
.login-page::after {
  content:''; position:absolute; width:400px; height:400px;
  background: radial-gradient(circle, rgba(212,160,23,0.08) 0%, transparent 70%);
  bottom:-50px; left:-50px; pointer-events:none;
}
.login-card {
  position: relative;
  background: rgba(255,255,255,0.05);
  backdrop-filter: blur(24px); -webkit-backdrop-filter: blur(24px);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-2xl);
  padding: 3rem 2.75rem;
  width: 100%; max-width: 440px;
  box-shadow: 0 32px 80px rgba(0,0,0,0.6), 0 0 0 1px rgba(255,255,255,0.04) inset;
  z-index: 1;
}
.login-brand { text-align:center; margin-bottom:2.75rem; }
.login-brand .brand-badge {
  display:inline-flex; align-items:center; gap:.4rem;
  background:rgba(212,175,55,0.12); border:1px solid rgba(212,175,55,0.25);
  border-radius:20px; padding:.3rem .875rem; font-size:.72rem; color:var(--gold-1);
  letter-spacing:1.5px; text-transform:uppercase; margin-bottom:1rem;
}
.login-brand .brand-title {
  font-family:'Noto Serif SC',serif; font-size:2.2rem; font-weight:700;
  background:var(--gradient-gold); -webkit-background-clip:text;
  -webkit-text-fill-color:transparent; background-clip:text; line-height:1.2; margin-bottom:.4rem;
}
.login-brand .brand-sub { color:var(--text-muted); font-size:.8rem; letter-spacing:2px; }
.form-group { margin-bottom:1.2rem; }
.form-label { display:block; font-size:.8rem; color:var(--text-secondary); margin-bottom:.5rem; }
.form-input {
  width:100%; background:rgba(255,255,255,0.06); border:1px solid rgba(255,255,255,0.1);
  border-radius:var(--radius-md); padding:.875rem 1.1rem; color:var(--text-primary);
  font-size:.95rem; font-family:inherit; outline:none; transition:all .25s;
}
.form-input:focus {
  border-color:rgba(167,139,250,0.5); background:rgba(102,126,234,0.08);
  box-shadow:0 0 0 3px rgba(102,126,234,0.12);
}
.form-input::placeholder { color:var(--text-muted); }
.btn-login {
  width:100%; padding:1rem; background:var(--gradient-gold); border:none;
  border-radius:var(--radius-md); color:#1a1000; font-size:1rem; font-weight:700;
  font-family:inherit; cursor:pointer; transition:all .25s; margin-top:.75rem;
}
.btn-login:hover { transform:translateY(-2px); box-shadow:0 12px 30px rgba(212,160,23,0.35); }
.login-divider { text-align:center; margin:1.75rem 0; position:relative; }
.login-divider::before {
  content:''; position:absolute; left:0; right:0; top:50%; height:1px; background:var(--border);
}
.login-divider span {
  position:relative; background:#0f1320; padding:0 .75rem; font-size:.75rem; color:var(--text-muted);
}
.login-footer-note { text-align:center; font-size:.74rem; color:var(--text-muted); line-height:1.6; }

/* ================================================================
   APP 布局（桌面端：侧边栏）
   ================================================================ */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* 侧边栏 */
.sidebar {
  width: 248px; background:rgba(8,10,18,0.95); backdrop-filter:blur(20px);
  border-right:1px solid var(--border); display:flex; flex-direction:column;
  position:fixed; top:0; left:0; height:100vh; z-index:50;
  transition:transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar-header { padding:1.5rem 1.5rem 1.25rem; border-bottom:1px solid var(--border); }
.sidebar-logo { display:flex; align-items:center; gap:.6rem; }
.logo-icon {
  width:34px; height:34px; background:var(--gradient-gold); border-radius:9px;
  display:flex; align-items:center; justify-content:center; font-size:1rem; flex-shrink:0;
}
.logo-text .logo-main {
  font-family:'Noto Serif SC',serif; font-size:1.1rem; font-weight:700;
  background:var(--gradient-gold); -webkit-background-clip:text;
  -webkit-text-fill-color:transparent; background-clip:text; line-height:1.2;
}
.logo-text .logo-sub { font-size:.65rem; color:var(--text-muted); letter-spacing:1.5px; text-transform:uppercase; }
.sidebar-user {
  padding:1.1rem 1.5rem; border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:.75rem;
}
.user-avatar {
  width:36px; height:36px; background:var(--gradient-purple); border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:.85rem; font-weight:600; color:white; flex-shrink:0;
  border:2px solid rgba(167,139,250,0.3);
}
.user-name { font-size:.88rem; font-weight:500; color:var(--text-primary); }
.user-role { font-size:.7rem; color:var(--text-muted); margin-top:1px; }
.sidebar-nav { flex:1; padding:.875rem .75rem; overflow-y:auto; }
.nav-section-label {
  font-size:.65rem; color:var(--text-muted); letter-spacing:1.5px;
  text-transform:uppercase; padding:.875rem .75rem .4rem;
}
.nav-item {
  display:flex; align-items:center; gap:.75rem; padding:.7rem .875rem;
  color:var(--text-secondary); cursor:pointer; transition:all .2s; font-size:.875rem;
  border-radius:var(--radius-md); margin-bottom:2px; position:relative;
}
.nav-item:hover { color:var(--text-primary); background:rgba(255,255,255,0.05); }
.nav-item.active { color:var(--gold-1); background:rgba(212,175,55,0.08); font-weight:500; }
.nav-item.active::before {
  content:''; position:absolute; left:0; top:20%; bottom:20%;
  width:3px; background:var(--gradient-gold); border-radius:2px;
}
.nav-item i { width:18px; text-align:center; font-size:.875rem; flex-shrink:0; }
.sidebar-footer { padding:1rem .75rem; border-top:1px solid var(--border); }
.logout-btn {
  width:100%; padding:.65rem .875rem; background:transparent; border:1px solid var(--border);
  border-radius:var(--radius-md); color:var(--text-muted); cursor:pointer; font-size:.82rem;
  font-family:inherit; transition:all .2s; display:flex; align-items:center; justify-content:center; gap:.5rem;
}
.logout-btn:hover { background:rgba(239,68,68,0.08); border-color:rgba(239,68,68,0.25); color:#f87171; }

/* 主内容 */
.main-content {
  margin-left: 248px; flex:1; padding:2rem 2.5rem;
  min-height:100vh; background:var(--bg-primary);
}

/* 顶部栏 */
.page-header {
  display:flex; align-items:flex-start; justify-content:space-between;
  margin-bottom:2rem; padding-bottom:1.5rem; border-bottom:1px solid var(--border);
  gap:1rem; flex-wrap:wrap;
}
.page-title {
  font-size:1.5rem; font-weight:600; color:var(--text-primary); line-height:1.3;
}
.page-title .highlight {
  background:var(--gradient-gold); -webkit-background-clip:text;
  -webkit-text-fill-color:transparent; background-clip:text;
}
.page-subtitle { font-size:.8rem; color:var(--text-muted); margin-top:.3rem; letter-spacing:.5px; }
.page-actions { display:flex; gap:.75rem; align-items:center; flex-wrap:wrap; }

/* ================================================================
   按钮系统
   ================================================================ */
.btn {
  display:inline-flex; align-items:center; gap:.45rem; padding:.6rem 1.2rem;
  border-radius:var(--radius-md); font-size:.845rem; font-weight:500; font-family:inherit;
  cursor:pointer; transition:all .2s; border:none; white-space:nowrap; text-decoration:none;
}
.btn-gold { background:var(--gradient-gold); color:#1a1000; font-weight:600; }
.btn-gold:hover { transform:translateY(-1px); box-shadow:0 8px 24px rgba(212,160,23,0.3); }
.btn-purple { background:var(--gradient-purple); color:white; }
.btn-purple:hover { transform:translateY(-1px); box-shadow:0 8px 24px rgba(102,126,234,0.3); }
.btn-ghost {
  background:rgba(255,255,255,0.05); border:1px solid var(--border); color:var(--text-secondary);
}
.btn-ghost:hover { background:rgba(255,255,255,0.09); border-color:rgba(255,255,255,0.15); color:var(--text-primary); }
.btn-danger { background:rgba(239,68,68,0.1); border:1px solid rgba(239,68,68,0.2); color:#f87171; }
.btn-danger:hover { background:rgba(239,68,68,0.18); }
.btn-sm { padding:.38rem .75rem; font-size:.78rem; }
.btn-xs { padding:.28rem .6rem; font-size:.72rem; border-radius:6px; }

/* ================================================================
   统计卡片
   ================================================================ */
.stats-grid {
  display:grid; grid-template-columns:repeat(auto-fill,minmax(170px,1fr)); gap:1rem; margin-bottom:2rem;
}
.stat-card {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:1.375rem 1.25rem; transition:all .25s; cursor:default; position:relative; overflow:hidden;
}
.stat-card::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg,transparent,rgba(255,255,255,0.08),transparent);
}
.stat-card:hover { border-color:rgba(212,175,55,0.2); background:rgba(212,175,55,0.04); transform:translateY(-2px); }
.stat-card.clickable { cursor:pointer; }
.stat-icon { font-size:1.3rem; margin-bottom:.75rem; display:block; }
.stat-label { font-size:.75rem; color:var(--text-muted); letter-spacing:.5px; margin-bottom:.375rem; }
.stat-value { font-size:2.1rem; font-weight:700; color:var(--text-primary); line-height:1; }
.stat-value.gold { background:var(--gradient-gold); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.stat-value.green { color:#4ade80; }
.stat-value.amber { color:#fbbf24; }
.stat-value.red   { color:#f87171; }
.stat-value.purple{ color:#a78bfa; }
.stat-sub { font-size:.72rem; color:var(--text-muted); margin-top:.3rem; }

/* 进度条 */
.progress-wrap { background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.5rem; margin-bottom:1.5rem; }
.progress-header { display:flex; justify-content:space-between; align-items:baseline; margin-bottom:.875rem; }
.progress-label { font-size:.875rem; color:var(--text-secondary); font-weight:500; }
.progress-pct { font-size:1.75rem; font-weight:700; background:var(--gradient-gold); -webkit-background-clip:text; -webkit-text-fill-color:transparent; background-clip:text; }
.progress-bar { height:6px; background:rgba(255,255,255,0.07); border-radius:3px; overflow:hidden; }
.progress-fill { height:100%; border-radius:3px; background:var(--gradient-gold); transition:width .6s cubic-bezier(.4,0,.2,1); }
.progress-footer { display:flex; justify-content:space-between; margin-top:.75rem; font-size:.75rem; color:var(--text-muted); }

/* ================================================================
   表格（桌面端）
   ================================================================ */
.table-wrap {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-xl); overflow:hidden;
}
.table-toolbar {
  padding:1rem 1.25rem; border-bottom:1px solid var(--border);
  display:flex; align-items:center; gap:.75rem; flex-wrap:wrap;
  background:rgba(255,255,255,0.02);
}
.search-input {
  background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:.5rem .875rem .5rem 2rem; color:var(--text-primary); font-size:.845rem; font-family:inherit;
  outline:none; min-width:200px; transition:all .2s;
  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='rgba(255,255,255,0.3)' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat:no-repeat; background-position:.6rem center;
}
.search-input:focus { border-color:rgba(167,139,250,0.4); background-color:rgba(102,126,234,0.07); }
.search-input::placeholder { color:var(--text-muted); }
.filter-select {
  background:rgba(255,255,255,0.05); border:1px solid var(--border); border-radius:var(--radius-sm);
  padding:.5rem .875rem; color:var(--text-secondary); font-size:.845rem; font-family:inherit;
  outline:none; cursor:pointer; transition:all .2s;
}
.filter-select:focus { border-color:rgba(167,139,250,0.4); }
.filter-select option { background:#0f1320; color:var(--text-primary); }
.table-count { margin-left:auto; font-size:.78rem; color:var(--text-muted); white-space:nowrap; }

table { width:100%; border-collapse:collapse; }
thead th {
  padding:.75rem 1rem; text-align:left; font-size:.72rem; color:var(--text-muted);
  font-weight:500; text-transform:uppercase; letter-spacing:.8px;
  background:rgba(255,255,255,0.02); border-bottom:1px solid var(--border); white-space:nowrap;
}
tbody tr { border-bottom:1px solid rgba(255,255,255,0.04); transition:background .15s; }
tbody tr:hover { background:rgba(255,255,255,0.03); }
tbody tr:last-child { border-bottom:none; }
tbody td { padding:.9rem 1rem; font-size:.845rem; color:#c8d5e3; vertical-align:middle; }

.name-cell { display:flex; align-items:center; gap:.7rem; }
.name-avatar {
  width:32px; height:32px; background:var(--gradient-purple); border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:.82rem; font-weight:600; color:white; flex-shrink:0;
  border:1.5px solid rgba(167,139,250,0.25);
}
.name-main { font-weight:500; color:var(--text-primary); font-size:.875rem; }
.name-org { font-size:.75rem; color:var(--text-muted); margin-top:2px; }

/* 行操作 */
.row-actions { display:flex; gap:.4rem; opacity:0; transition:opacity .15s; }
tbody tr:hover .row-actions { opacity:1; }

/* ================================================================
   徽章
   ================================================================ */
.badge {
  display:inline-flex; align-items:center; gap:.3rem; padding:.28rem .65rem;
  border-radius:6px; font-size:.72rem; font-weight:500; white-space:nowrap; line-height:1.4;
}
.badge-both    { background:rgba(212,175,55,0.12); color:#f6d365; border:1px solid rgba(212,175,55,0.2); }
.badge-invest  { background:rgba(167,139,250,0.12); color:#c4b5fd; border:1px solid rgba(167,139,250,0.2); }
.badge-client  { background:rgba(59,130,246,0.1); color:#93c5fd; border:1px solid rgba(59,130,246,0.15); }
.badge-pending          { background:rgba(148,163,184,0.1); color:#94a3b8; border:1px solid rgba(148,163,184,0.15); }
.badge-invited_replied  { background:rgba(34,197,94,0.1); color:#4ade80; border:1px solid rgba(34,197,94,0.15); }
.badge-invited_no_reply { background:rgba(251,191,36,0.1); color:#fbbf24; border:1px solid rgba(251,191,36,0.15); }
.badge-rejected         { background:rgba(239,68,68,0.1); color:#f87171; border:1px solid rgba(239,68,68,0.15); }
.badge-high     { background:rgba(239,68,68,0.1); color:#f87171; border:1px solid rgba(239,68,68,0.15); }
.badge-medium   { background:rgba(251,191,36,0.1); color:#fbbf24; border:1px solid rgba(251,191,36,0.15); }
.badge-low      { background:rgba(34,197,94,0.1); color:#4ade80; border:1px solid rgba(34,197,94,0.15); }
.badge-todo-pending { background:rgba(148,163,184,0.1); color:#94a3b8; border:1px solid rgba(148,163,184,0.15); }
.badge-in_progress  { background:rgba(59,130,246,0.1); color:#60a5fa; border:1px solid rgba(59,130,246,0.15); }
.badge-completed    { background:rgba(34,197,94,0.1); color:#4ade80; border:1px solid rgba(34,197,94,0.15); }
.star-badge {
  display:inline-flex; align-items:center; justify-content:center;
  width:20px; height:20px; background:rgba(212,175,55,0.15); border-radius:50%;
  font-size:.65rem; flex-shrink:0;
}

/* 自定义标签芯片 */
.tag-chip {
  display:inline-flex; align-items:center; gap:.25rem; padding:.2rem .5rem;
  border-radius:20px; font-size:.68rem; font-weight:500; white-space:nowrap; line-height:1.4;
  border:1px solid transparent; cursor:default;
}
.tag-chip-rm {
  display:inline-flex; align-items:center; justify-content:center;
  width:14px; height:14px; border-radius:50%; cursor:pointer;
  background:rgba(0,0,0,0.25); font-size:.6rem; transition:background .15s;
}
.tag-chip-rm:hover { background:rgba(0,0,0,0.5); }
.tags-wrap { display:flex; flex-wrap:wrap; gap:.3rem; }

/* ================================================================
   标签页 Tabs
   ================================================================ */
.tab-bar {
  display:flex; gap:.25rem; margin-bottom:1.5rem;
  border-bottom:1px solid var(--border); padding-bottom:0;
  overflow-x:auto; -webkit-overflow-scrolling:touch;
}
.tab-bar::-webkit-scrollbar { height:0; }
.tab-item {
  padding:.6rem 1rem; color:var(--text-muted); cursor:pointer; font-size:.845rem;
  border-bottom:2px solid transparent; transition:all .2s; margin-bottom:-1px; white-space:nowrap;
  flex-shrink:0;
}
.tab-item:hover { color:var(--text-secondary); }
.tab-item.active { color:var(--gold-1); border-bottom-color:var(--gold-1); font-weight:500; }

/* ================================================================
   待办卡片
   ================================================================ */
.todo-list { display:flex; flex-direction:column; gap:.625rem; }
.todo-card {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:1.1rem 1.25rem; display:flex; align-items:flex-start; gap:.875rem; transition:all .2s;
  position:relative; overflow:hidden;
}
.todo-card::before {
  content:''; position:absolute; left:0; top:0; bottom:0; width:3px; background:transparent; transition:background .2s;
}
.todo-card.priority-high::before   { background:#f87171; }
.todo-card.priority-medium::before { background:#fbbf24; }
.todo-card.priority-low::before    { background:#4ade80; }
.todo-card:hover { border-color:rgba(255,255,255,0.1); background:var(--bg-card-hover); }
.todo-card.is-done { opacity:.5; }
.todo-checkbox {
  width:20px; height:20px; border-radius:50%; border:2px solid rgba(255,255,255,0.2);
  cursor:pointer; flex-shrink:0; margin-top:2px;
  display:flex; align-items:center; justify-content:center; transition:all .2s;
}
.todo-checkbox:hover { border-color:var(--gold-1); }
.todo-checkbox.done      { background:var(--gradient-gold); border-color:transparent; }
.todo-checkbox.inprogress{ background:rgba(96,165,250,0.25); border-color:#60a5fa; }
.todo-body { flex:1; min-width:0; }
.todo-title { font-size:.9rem; font-weight:500; color:var(--text-primary); margin-bottom:.3rem; }
.todo-title.done { text-decoration:line-through; color:var(--text-muted); }
.todo-desc { font-size:.8rem; color:var(--text-muted); margin-bottom:.4rem; line-height:1.5; }
.todo-meta {
  display:flex; gap:1rem; flex-wrap:wrap; font-size:.75rem; color:var(--text-muted);
}
.todo-meta-item { display:flex; align-items:center; gap:.3rem; }

/* ================================================================
   空状态
   ================================================================ */
.empty-state { text-align:center; padding:4rem 2rem; color:var(--text-muted); }
.empty-state .empty-icon { font-size:2.5rem; margin-bottom:1rem; opacity:.5; display:block; }
.empty-state p { font-size:.875rem; margin-bottom:1.25rem; }

/* ================================================================
   Modal
   ================================================================ */
.modal-overlay {
  position:fixed; inset:0; background:rgba(0,0,0,0.75);
  backdrop-filter:blur(6px); -webkit-backdrop-filter:blur(6px);
  z-index:300; display:flex; align-items:center; justify-content:center;
  padding:1rem; animation:fadeIn .2s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.modal-box {
  background:#0f1320; border:1px solid rgba(255,255,255,0.1); border-radius:var(--radius-2xl);
  width:100%; max-width:560px; max-height:90vh; overflow-y:auto;
  box-shadow:0 40px 80px rgba(0,0,0,0.7); animation:slideUp .25s cubic-bezier(.4,0,.2,1);
  position:relative;
}
.modal-box::before {
  content:''; position:absolute; top:0; left:0; right:0; height:1px;
  background:linear-gradient(90deg,transparent,rgba(212,175,55,0.3),transparent);
}
@keyframes slideUp { from{opacity:0;transform:translateY(24px) scale(.98)} to{opacity:1;transform:none} }
.modal-header {
  padding:1.5rem 1.5rem 1.25rem; display:flex; align-items:center; justify-content:space-between;
  border-bottom:1px solid var(--border); position:sticky; top:0; background:#0f1320; z-index:1;
}
.modal-title { font-size:1.05rem; font-weight:600; color:var(--text-primary); }
.modal-close {
  color:var(--text-muted); cursor:pointer; font-size:1.1rem; width:28px; height:28px;
  border-radius:50%; display:flex; align-items:center; justify-content:center; transition:all .2s;
}
.modal-close:hover { background:rgba(255,255,255,0.08); color:var(--text-primary); }
.modal-body { padding:1.5rem; }
.modal-footer {
  padding:1.1rem 1.5rem; border-top:1px solid var(--border);
  display:flex; justify-content:flex-end; gap:.75rem;
  position:sticky; bottom:0; background:#0f1320; z-index:1;
}

/* Modal 表单 */
.field-group { margin-bottom:1.1rem; }
.field-label { display:block; font-size:.78rem; color:var(--text-secondary); margin-bottom:.45rem; letter-spacing:.3px; }
.field-input, .field-select, .field-textarea {
  width:100%; background:rgba(255,255,255,0.05); border:1px solid var(--border);
  border-radius:var(--radius-sm); padding:.7rem .875rem; color:var(--text-primary);
  font-size:.845rem; font-family:inherit; outline:none; transition:all .2s;
}
.field-input:focus, .field-select:focus, .field-textarea:focus {
  border-color:rgba(167,139,250,0.4); background:rgba(102,126,234,0.07);
  box-shadow:0 0 0 2px rgba(102,126,234,0.1);
}
.field-select option { background:#0f1320; }
.field-textarea { resize:vertical; min-height:80px; line-height:1.5; }
.field-input::placeholder,.field-textarea::placeholder { color:var(--text-muted); }
.field-row { display:grid; grid-template-columns:1fr 1fr; gap:.875rem; }

/* ================================================================
   Toast
   ================================================================ */
.toast {
  position:fixed; bottom:1.75rem; right:1.75rem; background:#141824;
  border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:.875rem 1.25rem; color:var(--text-primary); font-size:.845rem;
  box-shadow:0 16px 40px rgba(0,0,0,0.5); z-index:500;
  animation:slideInRight .3s cubic-bezier(.4,0,.2,1);
  display:flex; align-items:center; gap:.75rem; max-width:340px;
}
.toast.success { border-color:rgba(34,197,94,0.2); }
.toast.error   { border-color:rgba(239,68,68,0.2); }
.toast.info    { border-color:rgba(99,102,241,0.2); }
.toast.warning { border-color:rgba(251,191,36,0.25); }
@keyframes slideInRight { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:none} }

/* 快捷卡片 */
.quick-card {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg); padding:1.375rem; transition:all .25s;
}
.quick-card:hover { border-color:rgba(212,175,55,0.2); transform:translateY(-2px); box-shadow:0 8px 24px rgba(0,0,0,0.25); }

/* 邀请函卡片 */
.invite-card {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-xl); padding:1.375rem; transition:all .25s;
}
.invite-card:hover { border-color:rgba(212,175,55,0.2); transform:translateY(-2px); box-shadow:0 12px 32px rgba(0,0,0,0.3); }

/* 修改密码 */
.change-pwd-link {
  display:inline-flex; align-items:center; gap:.4rem; font-size:.75rem; color:var(--text-muted);
  cursor:pointer; transition:color .2s; margin-top:.75rem;
}
.change-pwd-link:hover { color:var(--gold-1); }

/* ================================================================
   手机端卡片式名单（代替表格）
   ================================================================ */
.invitee-cards { display:none; flex-direction:column; gap:.75rem; }

.invitee-card {
  background:var(--bg-card); border:1px solid var(--border); border-radius:var(--radius-lg);
  padding:1rem 1rem .875rem; transition:all .2s; position:relative;
}
.invitee-card.is-priority {
  border-color:rgba(212,175,55,0.2);
}
.invitee-card-top {
  display:flex; align-items:flex-start; gap:.75rem; margin-bottom:.75rem;
}
.invitee-card-avatar {
  width:40px; height:40px; background:var(--gradient-purple); border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  font-size:.9rem; font-weight:700; color:white; flex-shrink:0;
  border:2px solid rgba(167,139,250,0.2);
}
.invitee-card-info { flex:1; min-width:0; }
.invitee-card-name {
  font-size:.95rem; font-weight:600; color:var(--text-primary);
  display:flex; align-items:center; gap:.35rem; flex-wrap:wrap;
}
.invitee-card-title {
  font-size:.76rem; color:var(--text-muted); margin-top:3px;
  overflow:hidden; text-overflow:ellipsis; display:-webkit-box;
  -webkit-line-clamp:2; -webkit-box-orient:vertical;
  line-height:1.4;
}
.invitee-card-badges {
  display:flex; gap:.4rem; flex-wrap:wrap; margin-bottom:.625rem;
}
.invitee-card-tags {
  display:flex; flex-wrap:wrap; gap:.3rem; margin-bottom:.75rem;
}
.invitee-card-meta {
  font-size:.74rem; color:var(--text-muted); display:flex; gap:.75rem; flex-wrap:wrap; margin-bottom:.75rem;
}
.invitee-card-meta span { display:flex; align-items:center; gap:.3rem; }
.invitee-card-notes {
  font-size:.76rem; color:var(--text-muted); background:rgba(255,255,255,0.03);
  border-radius:var(--radius-sm); padding:.5rem .75rem; line-height:1.5; margin-bottom:.75rem;
}
.invitee-card-actions {
  display:flex; gap:.5rem; border-top:1px solid var(--border); padding-top:.75rem; flex-wrap:wrap;
}
.invitee-card-actions .btn { flex:1; justify-content:center; min-width:80px; }

/* ================================================================
   手机端顶部导航（固定）
   ================================================================ */
.mobile-topbar {
  display:none;
  position:fixed; top:0; left:0; right:0; z-index:100; height:56px;
  background:rgba(8,10,18,0.97); backdrop-filter:blur(12px);
  border-bottom:1px solid var(--border);
  align-items:center; justify-content:space-between; padding:0 1rem; gap:.75rem;
}
.mobile-topbar-logo {
  font-family:'Noto Serif SC',serif; font-size:1.05rem; font-weight:700;
  background:var(--gradient-gold); -webkit-background-clip:text;
  -webkit-text-fill-color:transparent; background-clip:text;
}
.mobile-topbar-user {
  display:flex; align-items:center; gap:.5rem; font-size:.8rem; color:var(--text-secondary);
}
.mobile-topbar-avatar {
  width:28px; height:28px; background:var(--gradient-purple); border-radius:50%;
  display:flex; align-items:center; justify-content:center; font-size:.72rem; font-weight:700; color:white;
}

/* 手机端底部导航 */
.mobile-bottombar {
  display:none;
  position:fixed; bottom:0; left:0; right:0; z-index:100; height:var(--bottom-nav-h);
  background:rgba(8,10,18,0.97); backdrop-filter:blur(12px);
  border-top:1px solid var(--border); align-items:stretch;
}
.mobile-tab {
  flex:1; display:flex; flex-direction:column; align-items:center; justify-content:center;
  gap:.25rem; cursor:pointer; transition:all .2s; padding:.25rem;
  font-size:.65rem; color:var(--text-muted); border:none; background:transparent; font-family:inherit;
}
.mobile-tab i { font-size:1.1rem; display:block; }
.mobile-tab.active { color:var(--gold-1); }
.mobile-tab.active i { -webkit-text-fill-color:var(--gold-1); }

/* 手机端遮罩（侧边栏打开时）*/
.sidebar-overlay {
  display:none; position:fixed; inset:0; background:rgba(0,0,0,0.6); z-index:49;
}
.sidebar-overlay.visible { display:block; }

/* 旧的 mobile-toggle 兼容保留 */
.mobile-toggle { display:none !important; }

/* ================================================================
   响应式断点
   ================================================================ */
@media (max-width: 768px) {
  /* 隐藏侧边栏，显示手机端导航 */
  .sidebar { display:none; }
  .mobile-topbar { display:flex; }
  .mobile-bottombar { display:flex; }

  /* 主内容上下留出顶栏和底栏空间 */
  .main-content {
    margin-left:0; padding:calc(56px + 1rem) 1rem calc(var(--bottom-nav-h) + 1rem);
  }

  /* 页面标题区域手机端紧凑 */
  .page-header {
    padding-bottom:.875rem; margin-bottom:1.25rem;
    flex-direction:column; gap:.75rem;
  }
  .page-title { font-size:1.2rem; }
  .page-actions { width:100%; }
  .page-actions .btn { flex:1; justify-content:center; }

  /* 统计卡片2列 */
  .stats-grid { grid-template-columns:repeat(2,1fr); gap:.75rem; }
  .stat-value { font-size:1.6rem; }

  /* 表格在手机端隐藏，改用卡片 */
  .table-wrap { border-radius:var(--radius-lg); }
  .table-wrap table,
  .table-wrap thead,
  .table-wrap tbody,
  .table-wrap .table-desktop-only { display:none !important; }

  /* 工具栏手机端紧凑 */
  .table-toolbar {
    padding:.75rem 1rem; gap:.5rem;
    flex-wrap:wrap;
  }
  .search-input { min-width:0; width:100%; }
  .filter-select { flex:1; min-width:0; }
  .table-count { width:100%; text-align:right; font-size:.72rem; }
  .table-actions-row { width:100%; display:flex; gap:.5rem; }
  .table-actions-row .btn { flex:1; justify-content:center; font-size:.78rem; }

  /* 手机端显示卡片列表 */
  .invitee-cards { display:flex; }

  /* Modal 手机端全屏 */
  .modal-overlay { padding:0; align-items:flex-end; }
  .modal-box {
    border-radius:var(--radius-2xl) var(--radius-2xl) 0 0; max-height:92vh;
    animation:slideUpMobile .3s cubic-bezier(.4,0,.2,1);
  }
  @keyframes slideUpMobile { from{opacity:0;transform:translateY(100%)} to{opacity:1;transform:none} }

  /* Modal 内表单手机端单列 */
  .field-row { grid-template-columns:1fr; gap:.75rem; }

  /* Toast 手机端居底 */
  .toast { left:1rem; right:1rem; bottom:calc(var(--bottom-nav-h) + .75rem); max-width:none; }

  /* 待办卡片手机端 */
  .todo-meta { gap:.5rem; }

  /* 邀请函卡片手机端 */
  .invite-cards-grid { grid-template-columns:1fr !important; }
}

@media (max-width: 400px) {
  .stats-grid { grid-template-columns:repeat(2,1fr); gap:.5rem; }
  .stat-card { padding:1rem; }
}
