/* BP在线收集平台 — 多主题（默认：暗黑炫酷；可切换：雾霾蓝）*/

:root {
  --bg:        #0a0e17;
  --bg-card:   #131825;
  --bg-card-2: #1a2032;
  --border:    rgba(99, 179, 255, 0.12);
  --border-strong: rgba(99, 179, 255, 0.25);
  --text:      #e6edf7;
  --text-dim:  #8a95ab;
  --text-muted:#5a6478;
  --accent:    #3b82f6;
  --accent-2:  #8b5cf6;
  --cyan:      #06b6d4;
  --pink:      #ec4899;
  --green:     #10b981;
  --orange:    #f59e0b;
  --red:       #ef4444;
  --glow:      0 0 30px rgba(59, 130, 246, 0.25);
  --shadow:    0 4px 24px rgba(0, 0, 0, 0.4);

  --sidebar-w: 240px;
}

/* 雾霾蓝主题：同色调低饱和 · 主雾霾蓝 / 辅陶土粉 / 中性沙砾 */
body[data-theme="mist"] {
  --bg:        #1e293b;
  --bg-card:   #273449;
  --bg-card-2: #2f3d54;
  --border:    rgba(148, 163, 184, 0.15);
  --border-strong: rgba(148, 163, 184, 0.35);
  --text:      #f1f5f9;
  --text-dim:  #cbd5e1;
  --text-muted:#94a3b8;
  --accent:    #64748b;
  --accent-2:  #fda4af;
  --cyan:      #94a3b8;
  --pink:      #fda4af;
  --green:     #86efac;
  --orange:    #fcd34d;
  --red:       #fca5a5;
  --glow:      0 0 24px rgba(253, 164, 175, 0.18);
  --shadow:    0 4px 20px rgba(0, 0, 0, 0.25);
}
body[data-theme="mist"] {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(253, 164, 175, 0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(100, 116, 139, 0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(241, 245, 249, 0.04) 0%, transparent 50%) !important;
}
body[data-theme="mist"] .brand-logo {
  background: linear-gradient(135deg, #64748b, #fda4af) !important;
  box-shadow: 0 4px 14px rgba(253,164,175,0.28) !important;
}
body[data-theme="mist"] .sidebar {
  background: linear-gradient(180deg, #273449 0%, #1e293b 100%) !important;
}

/* 莫兰迪绿主题 · 林间静谧 · 墨绿基底 + 灰绿高光 */
body[data-theme="forest"] {
  --bg:        #2f3b33;
  --bg-card:   #39473c;
  --bg-card-2: #425148;
  --border:    rgba(188, 202, 182, 0.15);
  --border-strong: rgba(188, 202, 182, 0.35);
  --text:      #f2f0e7;
  --text-dim:  #dde4d6;
  --text-muted:#bccab6;
  --accent:    #7d977c;
  --accent-2:  #bccab6;
  --cyan:      #bccab6;
  --pink:      #dde4d6;
  --green:     #7d977c;
  --orange:    #c9b97a;
  --red:       #c07878;
  --glow:      0 0 22px rgba(125, 151, 124, 0.25);
  --shadow:    0 4px 20px rgba(0, 0, 0, 0.3);
}
body[data-theme="forest"] {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(188,202,182,0.10) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(125,151,124,0.14) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(242,240,231,0.05) 0%, transparent 50%) !important;
}
body[data-theme="forest"] .brand-logo {
  background: linear-gradient(135deg, #7d977c, #bccab6) !important;
  box-shadow: 0 4px 14px rgba(125,151,124,0.35) !important;
}
body[data-theme="forest"] .sidebar {
  background: linear-gradient(180deg, #39473c 0%, #2f3b33 100%) !important;
}

/* 纸面白主题 · 浅色纯净 · 米白纸底 + 蓝紫高光 */
body[data-theme="paper"] {
  --bg:        #f7f5ef;
  --bg-card:   #ffffff;
  --bg-card-2: #f0ebe0;
  --border:    rgba(0, 0, 0, 0.08);
  --border-strong: rgba(0, 0, 0, 0.18);
  --text:      #1a1a1a;
  --text-dim:  #5a5a5a;
  --text-muted:#9a9a9a;
  --accent:    #2563eb;
  --accent-2:  #7c3aed;
  --cyan:      #0891b2;
  --pink:      #db2777;
  --green:     #059669;
  --orange:    #d97706;
  --red:       #dc2626;
  --glow:      0 0 12px rgba(37, 99, 235, 0.15);
  --shadow:    0 2px 14px rgba(0, 0, 0, 0.06);
}
body[data-theme="paper"] {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(139,92,246,0.05) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(37,99,235,0.06) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(236,72,153,0.03) 0%, transparent 50%) !important;
}

/* 浅色主题需要覆盖的元素（原深色硬编码色值） */
body[data-theme="paper"] .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #f7f5ef 100%) !important;
  border-right: 1px solid rgba(0,0,0,0.08) !important;
}
body[data-theme="paper"] .brand-logo {
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  box-shadow: 0 4px 14px rgba(37,99,235,0.25) !important;
}
body[data-theme="paper"] .brand-title { color: #1a1a1a !important; }
body[data-theme="paper"] .nav-item { color: #5a5a5a !important; }
body[data-theme="paper"] .nav-item:hover {
  background: rgba(37,99,235,0.08) !important; color: #1a1a1a !important;
}
body[data-theme="paper"] .nav-item.active {
  background: linear-gradient(135deg, rgba(37,99,235,0.12), rgba(124,58,237,0.12)) !important;
  color: #1a1a1a !important;
}
body[data-theme="paper"] .user-card {
  background: rgba(0,0,0,0.03) !important;
  color: #1a1a1a !important;
}
body[data-theme="paper"] .user-name { color: #1a1a1a !important; }
body[data-theme="paper"] .logout-btn {
  background: rgba(0,0,0,0.03) !important; color: #5a5a5a !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
}
body[data-theme="paper"] .logout-btn:hover {
  background: rgba(220,38,38,0.08) !important; color: #dc2626 !important;
}
body[data-theme="paper"] .theme-toggle {
  background: rgba(0,0,0,0.04) !important; color: #5a5a5a !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
}
body[data-theme="paper"] .theme-toggle:hover {
  background: rgba(37,99,235,0.08) !important; color: #2563eb !important;
  border-color: rgba(37,99,235,0.3) !important;
}

body[data-theme="paper"] .card,
body[data-theme="paper"] .form-fill-card,
body[data-theme="paper"] .modal,
body[data-theme="paper"] .login-card {
  background: #ffffff !important;
  border: 1px solid rgba(0,0,0,0.08) !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04) !important;
}
body[data-theme="paper"] .card.glow {
  box-shadow: 0 2px 20px rgba(37,99,235,0.1) !important;
}

body[data-theme="paper"] .input,
body[data-theme="paper"] .select,
body[data-theme="paper"] input.input,
body[data-theme="paper"] select.select,
body[data-theme="paper"] textarea.input {
  background: #ffffff !important;
  color: #1a1a1a !important;
  border-color: rgba(0,0,0,0.15) !important;
}
body[data-theme="paper"] .input::placeholder { color: #aaa !important; }

body[data-theme="paper"] .table th {
  background: #f5f5f0 !important;
  color: #666 !important;
}
body[data-theme="paper"] .table td {
  border-bottom-color: rgba(0,0,0,0.05) !important;
  color: #1a1a1a !important;
}
body[data-theme="paper"] .table tr:hover td { background: rgba(37,99,235,0.03) !important; }

body[data-theme="paper"] .btn {
  background: rgba(0,0,0,0.04) !important;
  color: #333 !important;
  border: 1px solid rgba(0,0,0,0.1) !important;
}
body[data-theme="paper"] .btn:hover { background: rgba(0,0,0,0.08) !important; }
body[data-theme="paper"] .btn-primary {
  background: linear-gradient(135deg, #2563eb, #7c3aed) !important;
  color: #fff !important; border: none !important;
}
body[data-theme="paper"] .btn-danger { background: #dc2626 !important; color: #fff !important; }

body[data-theme="paper"] .alert-info  { background: rgba(37,99,235,0.08) !important; color: #1e40af !important; }
body[data-theme="paper"] .alert-warn  { background: rgba(217,119,6,0.08) !important; color: #92400e !important; }
body[data-theme="paper"] .alert-error { background: rgba(220,38,38,0.08) !important; color: #991b1b !important; }
body[data-theme="paper"] .alert-success { background: rgba(5,150,105,0.08) !important; color: #065f46 !important; }

/* 淡蓝天空主题 · 浅色湖蓝系 · 蓝灰底 + 亮蓝高光 */
body[data-theme="sky"] {
  --bg:        #eef4fb;
  --bg-card:   #ffffff;
  --bg-card-2: #dbe7f5;
  --border:    rgba(59, 130, 246, 0.14);
  --border-strong: rgba(59, 130, 246, 0.3);
  --text:      #0f2744;
  --text-dim:  #475569;
  --text-muted:#94a3b8;
  --accent:    #3b82f6;
  --accent-2:  #06b6d4;
  --cyan:      #0891b2;
  --pink:      #d946ef;
  --green:     #10b981;
  --orange:    #f59e0b;
  --red:       #ef4444;
  --glow:      0 0 14px rgba(59, 130, 246, 0.2);
  --shadow:    0 2px 14px rgba(59, 130, 246, 0.08);
}
body[data-theme="sky"] {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(6,182,212,0.08) 0%, transparent 50%),
    radial-gradient(circle at 85% 30%, rgba(59,130,246,0.12) 0%, transparent 50%),
    radial-gradient(circle at 50% 90%, rgba(139,92,246,0.05) 0%, transparent 50%) !important;
}
body[data-theme="sky"] .sidebar {
  background: linear-gradient(180deg, #ffffff 0%, #e4eef9 100%) !important;
  border-right: 1px solid rgba(59,130,246,0.12) !important;
}
body[data-theme="sky"] .brand-logo {
  background: linear-gradient(135deg, #3b82f6, #06b6d4) !important;
  box-shadow: 0 4px 14px rgba(59,130,246,0.3) !important;
}
body[data-theme="sky"] .brand-title { color: #0f2744 !important; }
body[data-theme="sky"] .nav-item { color: #475569 !important; }
body[data-theme="sky"] .nav-item:hover {
  background: rgba(59,130,246,0.1) !important; color: #0f2744 !important;
}
body[data-theme="sky"] .nav-item.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.16), rgba(6,182,212,0.14)) !important;
  color: #0f2744 !important;
}
body[data-theme="sky"] .user-card { background: rgba(59,130,246,0.06) !important; }
body[data-theme="sky"] .user-name { color: #0f2744 !important; }
body[data-theme="sky"] .logout-btn {
  background: rgba(0,0,0,0.03) !important; color: #475569 !important;
  border: 1px solid rgba(59,130,246,0.15) !important;
}
body[data-theme="sky"] .logout-btn:hover {
  background: rgba(239,68,68,0.08) !important; color: #ef4444 !important;
}
body[data-theme="sky"] .theme-toggle {
  background: rgba(59,130,246,0.06) !important; color: #475569 !important;
  border: 1px solid rgba(59,130,246,0.18) !important;
}
body[data-theme="sky"] .theme-toggle:hover {
  background: rgba(59,130,246,0.15) !important; color: #1e40af !important;
}
body[data-theme="sky"] .card,
body[data-theme="sky"] .form-fill-card,
body[data-theme="sky"] .modal,
body[data-theme="sky"] .login-card {
  background: #ffffff !important;
  border: 1px solid rgba(59,130,246,0.12) !important;
  box-shadow: 0 2px 14px rgba(59,130,246,0.08) !important;
}
body[data-theme="sky"] .card.glow {
  box-shadow: 0 4px 24px rgba(59,130,246,0.15) !important;
}
body[data-theme="sky"] .input,
body[data-theme="sky"] .select,
body[data-theme="sky"] input.input,
body[data-theme="sky"] select.select,
body[data-theme="sky"] textarea.input {
  background: #ffffff !important;
  color: #0f2744 !important;
  border-color: rgba(59,130,246,0.25) !important;
}
body[data-theme="sky"] .input::placeholder { color: #94a3b8 !important; }
body[data-theme="sky"] .input:focus,
body[data-theme="sky"] .select:focus {
  border-color: #3b82f6 !important;
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15) !important;
}
body[data-theme="sky"] .table th {
  background: #e4eef9 !important; color: #475569 !important;
}
body[data-theme="sky"] .table td {
  border-bottom-color: rgba(59,130,246,0.1) !important;
  color: #0f2744 !important;
}
body[data-theme="sky"] .table tr:hover td { background: rgba(59,130,246,0.05) !important; }
body[data-theme="sky"] .btn {
  background: rgba(59,130,246,0.06) !important;
  color: #1e40af !important;
  border: 1px solid rgba(59,130,246,0.2) !important;
}
body[data-theme="sky"] .btn:hover {
  background: rgba(59,130,246,0.15) !important;
}
body[data-theme="sky"] .btn-primary {
  background: linear-gradient(135deg, #3b82f6, #06b6d4) !important;
  color: #fff !important; border: none !important;
}
body[data-theme="sky"] .btn-danger { background: #ef4444 !important; color: #fff !important; border: none !important; }
body[data-theme="sky"] .alert-info  { background: rgba(59,130,246,0.1) !important; color: #1e40af !important; }
body[data-theme="sky"] .alert-warn  { background: rgba(245,158,11,0.1) !important; color: #92400e !important; }
body[data-theme="sky"] .alert-error { background: rgba(239,68,68,0.1) !important; color: #991b1b !important; }
body[data-theme="sky"] .alert-success { background: rgba(16,185,129,0.1) !important; color: #065f46 !important; }

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body {
  background: var(--bg); color: var(--text);
  font-family: "PingFang SC", "Microsoft YaHei", -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 14px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
body {
  background-image:
    radial-gradient(circle at 15% 10%, rgba(139, 92, 246, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 85% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 45%),
    radial-gradient(circle at 50% 90%, rgba(6, 182, 212, 0.10) 0%, transparent 45%);
  background-attachment: fixed;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--cyan); }

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: rgba(255,255,255,0.02); }
::-webkit-scrollbar-thumb { background: rgba(99,179,255,0.18); border-radius: 5px; }
::-webkit-scrollbar-thumb:hover { background: rgba(99,179,255,0.35); }

/* ============= 侧栏 ============= */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, #0d1220 0%, #0a0e17 100%);
  border-right: 1px solid var(--border);
  display: flex; flex-direction: column;
  padding: 20px 14px; z-index: 100;
  transition: transform .3s;
}

.brand { display: flex; align-items: center; gap: 12px; padding: 6px 6px 22px; border-bottom: 1px solid var(--border); margin-bottom: 14px; }
.brand-logo {
  width: 40px; height: 40px; border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; font-weight: 700; color: #fff;
  box-shadow: 0 4px 14px rgba(59,130,246,0.4);
}
.brand-title { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: .5px; }
.brand-sub { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

.nav { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 8px;
  color: var(--text-dim); font-size: 14px;
  transition: all .2s;
}
.nav-item:hover { background: rgba(99,179,255,0.06); color: var(--text); }
.nav-item.active {
  background: linear-gradient(135deg, rgba(59,130,246,0.18), rgba(139,92,246,0.18));
  color: #fff; box-shadow: inset 0 0 0 1px var(--border-strong);
}
.nav-icon { font-size: 16px; width: 20px; text-align: center; }

.sidebar-bottom { padding-top: 14px; border-top: 1px solid var(--border); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; background: rgba(255,255,255,0.02); margin-bottom: 8px; }
.user-avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cyan), var(--accent));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700; font-size: 15px;
}
.user-info { flex: 1; min-width: 0; }
.user-name { font-size: 13px; color: #fff; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-role { font-size: 11px; color: var(--text-muted); }
.logout-btn {
  display: block; text-align: center; padding: 8px;
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-dim); font-size: 13px;
}
.logout-btn:hover { color: var(--red); border-color: rgba(239,68,68,0.4); }

/* ============= 主体 ============= */
.main {
  margin-left: var(--sidebar-w);
  min-height: 100vh;
  padding: 28px 32px 40px;
  position: relative;
}

.mobile-menu {
  display: none; position: fixed; top: 14px; right: 14px;
  width: 42px; height: 42px; border-radius: 10px;
  background: var(--bg-card); border: 1px solid var(--border);
  color: var(--text); font-size: 22px; cursor: pointer; z-index: 200;
}

/* ============= 通用卡片/按钮/输入 ============= */
.page-title {
  font-size: 24px; font-weight: 700; color: #fff;
  margin-bottom: 6px; display: flex; align-items: center; gap: 12px;
}
.page-sub { color: var(--text-dim); font-size: 13px; margin-bottom: 24px; }

.card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border); border-radius: 14px;
  padding: 22px 24px; position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.5), transparent);
}
.card.glow { box-shadow: var(--glow); }
.card-title { font-size: 16px; font-weight: 700; color: #fff; margin-bottom: 14px; display: flex; align-items: center; gap: 10px; }
.card-title::before { content: ''; width: 4px; height: 16px; background: linear-gradient(to bottom, var(--accent), var(--accent-2)); border-radius: 2px; }

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 16px; border-radius: 8px; cursor: pointer;
  font-size: 13px; font-weight: 500; border: 1px solid var(--border);
  background: rgba(255,255,255,0.03); color: var(--text);
  transition: all .2s;
}
.btn:hover { background: rgba(99,179,255,0.08); border-color: var(--border-strong); }
.btn-primary {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; color: #fff;
  box-shadow: 0 4px 14px rgba(59,130,246,0.3);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,0.45); color: #fff; }
.btn-danger { color: var(--red); border-color: rgba(239,68,68,0.3); }
.btn-danger:hover { background: rgba(239,68,68,0.1); border-color: var(--red); }
.btn-sm { padding: 4px 10px; font-size: 12px; }

.input, .select, .textarea {
  width: 100%; padding: 9px 12px; font-size: 14px;
  background: rgba(0,0,0,0.25); color: var(--text);
  border: 1px solid var(--border); border-radius: 8px;
  font-family: inherit;
  transition: all .2s;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.15);
}
.textarea { resize: vertical; min-height: 80px; }
.input::placeholder { color: var(--text-muted); }
label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--text-dim); }

.form-row { margin-bottom: 14px; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

/* ============= 表格 ============= */
.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table thead th {
  text-align: left; padding: 11px 14px;
  background: rgba(59,130,246,0.08); color: var(--accent);
  font-weight: 600; font-size: 12px; letter-spacing: .5px;
  border-bottom: 1px solid var(--border);
}
.table tbody td { padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.04); color: var(--text-dim); vertical-align: middle; }
.table tbody tr:hover td { background: rgba(59,130,246,0.04); color: var(--text); }
.table tbody tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* ============= 角色徽章 ============= */
.badge {
  display: inline-block; padding: 3px 9px; border-radius: 99px;
  font-size: 11px; font-weight: 600;
}
.badge-super     { background: rgba(236,72,153,0.15); color: var(--pink); }
.badge-form_owner{ background: rgba(245,158,11,0.15); color: var(--orange); }
.badge-member    { background: rgba(6,182,212,0.15); color: var(--cyan); }
.badge-active    { background: rgba(16,185,129,0.15); color: var(--green); }
.badge-disabled  { background: rgba(239,68,68,0.15); color: var(--red); }
.badge-dept      { background: rgba(59,130,246,0.15); color: var(--accent); }
.badge-team      { background: rgba(139,92,246,0.15); color: var(--accent-2); }
.badge-custom    { background: rgba(255,255,255,0.06); color: var(--text-dim); }

/* ============= Tab ============= */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 24px; overflow-x: auto; }
.tab-btn {
  padding: 10px 18px; font-size: 14px; cursor: pointer;
  background: none; border: none; color: var(--text-dim);
  border-bottom: 2px solid transparent; transition: all .2s;
  white-space: nowrap;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--accent); border-bottom-color: var(--accent); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ============= 提示条 ============= */
.alert { padding: 12px 16px; border-radius: 8px; margin-bottom: 16px; font-size: 13px; border-left: 3px solid; }
.alert-info    { background: rgba(59,130,246,0.06);  border-color: var(--accent); color: var(--accent); }
.alert-success { background: rgba(16,185,129,0.06); border-color: var(--green);  color: var(--green); }
.alert-warn    { background: rgba(245,158,11,0.06); border-color: var(--orange); color: var(--orange); }
.alert-error   { background: rgba(239,68,68,0.06);  border-color: var(--red);    color: var(--red); }

/* ============= 弹窗 ============= */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,0.6);
  display: none; align-items: center; justify-content: center;
  z-index: 1000; backdrop-filter: blur(4px);
  padding: 20px;
}
.modal-mask.show { display: flex; }
.modal {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border-strong); border-radius: 14px;
  width: 100%; max-width: 460px; padding: 24px;
  box-shadow: var(--shadow), var(--glow);
  animation: modalIn .25s ease;
}
@keyframes modalIn { from { transform: scale(.9); opacity: 0; } }
.modal-title { font-size: 17px; font-weight: 700; color: #fff; margin-bottom: 14px; }
.modal-body { color: var(--text-dim); margin-bottom: 20px; font-size: 14px; line-height: 1.7; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }

/* ============= 登录页 ============= */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 20px;
}
.login-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border-strong); border-radius: 20px;
  width: 100%; max-width: 420px; padding: 40px 36px;
  box-shadow: var(--shadow), 0 0 60px rgba(59,130,246,0.12);
  position: relative; overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; top: -50%; left: -50%;
  width: 200%; height: 200%;
  background: radial-gradient(circle, rgba(139,92,246,0.15) 0%, transparent 50%);
  animation: rotate 20s linear infinite;
}
@keyframes rotate { to { transform: rotate(360deg); } }
.login-content { position: relative; z-index: 1; }
.login-logo {
  width: 64px; height: 64px; margin: 0 auto 20px; border-radius: 16px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; font-weight: 700; color: #fff;
  box-shadow: 0 8px 24px rgba(59,130,246,0.4);
}
.login-title { text-align: center; font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.login-sub { text-align: center; color: var(--text-dim); font-size: 13px; margin-bottom: 30px; }
.btn-login {
  width: 100%; padding: 12px; font-size: 14px; font-weight: 600;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none; border-radius: 10px; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 10px;
  box-shadow: 0 4px 14px rgba(59,130,246,0.35);
  transition: all .25s;
}
.btn-login:hover { transform: translateY(-1px); box-shadow: 0 6px 20px rgba(59,130,246,0.5); }
.dev-divider { display: flex; align-items: center; margin: 20px 0; color: var(--text-muted); font-size: 11px; }
.dev-divider::before, .dev-divider::after { content: ''; flex: 1; height: 1px; background: var(--border); }
.dev-divider span { padding: 0 12px; }

/* ============= 移动端 ============= */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: 8px 0 40px rgba(0,0,0,0.6); }
  .main { margin-left: 0; padding: 70px 16px 30px; }
  .mobile-menu { display: flex; align-items: center; justify-content: center; }
  .form-grid { grid-template-columns: 1fr; }
  .page-title { font-size: 20px; }
}

/* ============= 表单设计器 ============= */
.fields-list { display: flex; flex-direction: column; gap: 10px; }
.field-card {
  background: rgba(0,0,0,0.2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px 14px;
}
.field-card-head {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
}
.field-handle { color: var(--text-muted); cursor: grab; }
.field-type-badge {
  display: inline-block; padding: 3px 10px; border-radius: 99px;
  background: linear-gradient(135deg, rgba(59,130,246,0.2), rgba(139,92,246,0.2));
  color: var(--cyan); font-size: 11px; font-weight: 600;
}
.field-label { flex: 1; min-width: 180px; }
.field-req { display: inline-flex; align-items: center; gap: 4px; color: var(--text-dim); font-size: 12px; cursor: pointer; }
.field-card-body { margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--border); }
.subtable-children {
  margin-top: 10px; padding: 10px 12px; background: rgba(99,179,255,0.04);
  border: 1px dashed var(--border-strong); border-radius: 8px;
}
.sub-head { font-size: 13px; color: var(--text-dim); margin-bottom: 8px; }
.sub-list { display: flex; flex-direction: column; gap: 8px; }

.opt-editor { border: 1px solid var(--border); border-radius: 8px; padding: 10px; background: rgba(0,0,0,0.15); }
.opt-list { display: flex; flex-direction: column; gap: 6px; margin: 6px 0; }
.opt-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; }

.check-grid { display: flex; flex-direction: column; gap: 6px; max-height: 240px; overflow-y: auto; padding: 6px; background: rgba(0,0,0,0.2); border-radius: 8px; }
.check-item { display: flex; align-items: center; gap: 8px; cursor: pointer; padding: 4px; font-size: 13px; color: var(--text); }
.check-item:hover { background: rgba(99,179,255,0.06); border-radius: 4px; }

.tag-bag { display: flex; flex-wrap: wrap; gap: 6px; }
.tag {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px; border-radius: 99px; font-size: 12px;
  background: rgba(59,130,246,0.15); color: var(--accent);
}
.tag .tag-x {
  border: none; background: none; color: inherit; cursor: pointer;
  font-size: 14px; line-height: 1; padding: 0; opacity: .7;
}
.tag .tag-x:hover { opacity: 1; color: var(--red); }

/* ============= 填表页 ============= */
.form-fill-wrap { max-width: 760px; margin: 0 auto; }
.form-fill-card {
  background: linear-gradient(135deg, var(--bg-card), var(--bg-card-2));
  border: 1px solid var(--border); border-radius: 16px;
  padding: 28px 32px; box-shadow: var(--glow);
}
.form-fill-head { padding-bottom: 18px; border-bottom: 1px solid var(--border); margin-bottom: 22px; }
.form-cat-pill { display: inline-block; padding: 3px 10px; border-radius: 99px; font-size: 11px; font-weight: 600; margin-bottom: 10px; }
.form-title { font-size: 22px; font-weight: 700; color: #fff; margin-bottom: 8px; }
.form-desc { color: var(--text-dim); font-size: 13px; line-height: 1.7; margin-bottom: 10px; }
.form-rich-desc { color: var(--text); font-size: 14px; line-height: 1.8; }
.form-rich-desc h3, .form-rich-desc h4, .form-rich-desc h5 { color: #fff; margin: 14px 0 8px; }
.form-rich-desc h3 { font-size: 16px; padding-left: 10px; border-left: 3px solid var(--accent); }
.form-rich-desc h4 { font-size: 14px; }
.form-rich-desc p  { margin: 6px 0; }
.form-rich-desc ul { margin: 8px 0 8px 20px; }
.form-rich-desc li { margin: 4px 0; }
.form-rich-desc a  { color: var(--accent); text-decoration: underline; }
.form-rich-desc code { padding: 1px 6px; background: rgba(6,182,212,0.1); border-radius: 4px; color: var(--cyan); font-size: 12px; }
.form-rich-desc img { display: block; max-width: 100%; border-radius: 8px; margin: 10px 0; border: 1px solid var(--border); }
.form-meta { display: flex; gap: 16px; flex-wrap: wrap; color: var(--text-muted); font-size: 12px; }

.ff-row { margin-bottom: 18px; }
.ff-row.has-error { padding: 10px; border-radius: 8px; background: rgba(239,68,68,0.06); border: 1px solid rgba(239,68,68,0.2); }
.ff-label { display: block; margin-bottom: 8px; font-size: 14px; color: #fff; font-weight: 500; }
.ff-req { color: var(--red); }
.ff-input { position: relative; }

.ff-options { display: flex; flex-wrap: wrap; gap: 8px; }
.ff-opt {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 14px; border: 1px solid var(--border); border-radius: 8px;
  cursor: pointer; font-size: 13px; color: var(--text);
  background: rgba(0,0,0,0.2); transition: all .2s;
}
.ff-opt:hover { border-color: var(--border-strong); background: rgba(99,179,255,0.06); }
.ff-opt input:checked + span,
.ff-opt:has(input:checked) { background: rgba(59,130,246,0.15); border-color: var(--accent); color: #fff; }

.ff-num-wrap { position: relative; }
.ff-num-wrap .ff-unit { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); color: var(--text-muted); font-size: 12px; pointer-events: none; }

.ff-help { margin-top: 4px; font-size: 12px; color: var(--text-muted); }

/* ---- 文件 / 图片 ---- */
.ff-file { padding: 12px; border: 1px dashed var(--border-strong); border-radius: 10px; background: rgba(0,0,0,0.15); position: relative; }
.ff-file-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 10px; }
.ff-file-list:empty { display: none; }
.ff-file-item { position: relative; padding: 6px 10px; background: rgba(99,179,255,0.08); border-radius: 6px; display: inline-flex; align-items: center; gap: 6px; }
.ff-file-item img { max-width: 80px; max-height: 80px; border-radius: 4px; }
.ff-file-item a { color: var(--cyan); font-size: 13px; }
.ff-file-del {
  border: none; background: rgba(239,68,68,0.2); color: var(--red); cursor: pointer;
  width: 20px; height: 20px; border-radius: 50%; font-size: 14px; line-height: 1;
}
.ff-file-btn {
  display: inline-flex; align-items: center; padding: 8px 14px;
  background: rgba(59,130,246,0.1); border: 1px solid var(--border-strong);
  border-radius: 8px; cursor: pointer; color: var(--accent); font-size: 13px;
}
.ff-file-btn:hover { background: rgba(59,130,246,0.2); }
.ff-uploading {
  position: absolute; top: 8px; right: 12px; font-size: 11px;
  color: var(--orange); padding: 2px 8px; background: rgba(245,158,11,0.15); border-radius: 4px;
}

/* ---- 子表 ---- */
.ff-subtable {
  margin-bottom: 22px; padding: 14px;
  background: rgba(99,179,255,0.04); border: 1px solid var(--border-strong);
  border-radius: 12px;
}
.ff-subtable-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; flex-wrap: wrap; gap: 10px; }
.ff-subtable-title { font-size: 14px; font-weight: 600; color: #fff; }
.ff-subtable-rows { display: flex; flex-direction: column; gap: 12px; }
.ff-sub-row {
  background: rgba(0,0,0,0.2); border: 1px solid var(--border);
  border-radius: 10px; padding: 12px;
}
.ff-sub-row-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px dashed var(--border); }
.ff-sub-idx { font-size: 12px; color: var(--cyan); font-weight: 600; }

.ff-actions {
  margin-top: 24px; padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex; gap: 12px; justify-content: flex-end;
}
.ff-actions .btn { padding: 10px 22px; }

/* ============= 员工首页 ============= */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 16px; }
.form-list { display: flex; flex-direction: column; gap: 10px; }
.form-card {
  display: block; padding: 14px;
  background: rgba(0,0,0,0.2); border: 1px solid var(--border); border-radius: 10px;
  color: var(--text); transition: all .2s;
}
.form-card:hover { border-color: var(--border-strong); background: rgba(59,130,246,0.06); transform: translateY(-1px); }
.form-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.form-card-title { font-size: 14px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.form-card-meta { font-size: 12px; color: var(--text-muted); }
.form-card-dim { opacity: .65; }
.form-card-dim:hover { opacity: 1; }

/* 移动端：填表页内边距收紧 */
@media (max-width: 640px) {
  .form-fill-card { padding: 18px 16px; }
  .form-title { font-size: 18px; }
  .ff-options { flex-direction: column; }
  .ff-opt { width: 100%; }
}

/* ============= 用户详情弹窗 ============= */
.detail-sec { margin-bottom: 18px; }
.detail-sec-title {
  font-size: 14px; font-weight: 600; color: #fff;
  margin-bottom: 10px; padding: 7px 12px;
  background: linear-gradient(90deg, rgba(59,130,246,0.12), transparent);
  border-left: 3px solid var(--accent); border-radius: 4px;
}
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 10px 14px; }
.detail-row { display: flex; flex-direction: column; gap: 4px; }
.detail-row label { font-size: 12px; color: var(--text-dim); margin-bottom: 0; }
.detail-row .input, .detail-row .select, .detail-row .textarea { font-size: 13px; padding: 7px 10px; }

/* ============= 工具类 ============= */
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.flex-gap { display: flex; gap: 10px; }
.gap-2 { gap: 8px; }
.gap-3 { gap: 12px; }
.mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 16px; }
.mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 16px; }
.text-dim { color: var(--text-dim); }
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.text-right { text-align: right; }
.empty { padding: 40px 20px; text-align: center; color: var(--text-muted); font-size: 13px; }
