/* 登录 / 首页 / 会员管理 样式 */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #eef2f7;
  color: #1e293b;
}

.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ecfdf5 0%, #eff6ff 50%, #f5f3ff 100%);
  padding: 20px;
}

.login-card {
  background: #fff;
  border-radius: 14px;
  padding: 36px 32px;
  width: 100%;
  max-width: 400px;
  box-shadow: 0 20px 50px rgba(0,0,0,.1);
  border: 1px solid #e2e8f0;
}

.login-card h1 { font-size: 1.5rem; text-align: center; }
.login-card .subtitle { text-align: center; color: #64748b; margin: 6px 0 24px; font-size: 0.875rem; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; margin-bottom: 6px; font-weight: 500; }
.field input, .field select {
  width: 100%; padding: 10px 12px; border: 1px solid #e2e8f0;
  border-radius: 8px; font-size: 0.9rem;
}
.field input.readonly-field {
  background: #f1f5f9;
  color: #64748b;
  cursor: not-allowed;
}
.field small { display: block; margin-top: 4px; color: #94a3b8; font-size: 0.75rem; }
.req { color: #dc2626; }

.btn-login {
  width: 100%; padding: 11px; background: #059669; color: #fff;
  border: none; border-radius: 8px; font-size: 0.95rem; font-weight: 600;
  cursor: pointer; margin-top: 4px;
}
.btn-login:hover { background: #047857; }

.error { color: #dc2626; font-size: 0.85rem; margin-top: 10px; min-height: 20px; text-align: center; }
.hint { text-align: center; color: #94a3b8; font-size: 0.78rem; margin-top: 16px; }

.home-page { max-width: 900px; margin: 0 auto; padding: 32px 24px; }

.home-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 32px; flex-wrap: wrap; gap: 16px;
}

.home-header h1 { font-size: 1.6rem; }
.home-header p { color: #64748b; margin-top: 6px; }

.role-badge {
  display: inline-block; padding: 2px 10px; border-radius: 12px;
  font-size: 0.75rem; font-weight: 600; margin-left: 8px;
}
.role-badge.admin { background: #dbeafe; color: #1d4ed8; }
.role-badge.user { background: #f1f5f9; color: #475569; }

.home-actions { display: flex; gap: 10px; }

.module-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px; margin-bottom: 24px;
}

.module-card {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 14px;
  padding: 28px 24px; text-decoration: none; color: inherit;
  transition: transform .15s, box-shadow .15s, border-color .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.04);
}

.module-card:hover { transform: translateY(-3px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }
.module-card.salary:hover { border-color: #86efac; }
.module-card.fan:hover { border-color: #93c5fd; }

.module-icon { font-size: 2rem; margin-bottom: 12px; }
.module-card h2 { font-size: 1.15rem; margin-bottom: 8px; }
.module-card p { color: #64748b; font-size: 0.875rem; line-height: 1.5; }

.admin-tip, .user-tip {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 14px 18px; font-size: 0.875rem; color: #475569;
}
.admin-tip { border-left: 4px solid #2563eb; }
.user-tip { border-left: 4px solid #059669; }

.admin-page { max-width: 1000px; margin: 0 auto; padding: 24px; }

.admin-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 20px; flex-wrap: wrap; gap: 12px;
}

.table-wrap {
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px; overflow-x: auto;
}

.user-table { width: 100%; border-collapse: collapse; }
.user-table th, .user-table td {
  padding: 12px 14px; text-align: left; border-bottom: 1px solid #f1f5f9; font-size: 0.875rem;
}
.user-table th { background: #f8fafc; color: #64748b; font-weight: 600; }

.tag-admin { background: #dbeafe; color: #1d4ed8; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; }
.tag-user { background: #f1f5f9; color: #475569; padding: 2px 8px; border-radius: 4px; font-size: 0.75rem; }
.tag-on { color: #059669; }
.tag-off { color: #dc2626; }

.btn {
  display: inline-flex; align-items: center; padding: 7px 14px;
  border-radius: 7px; font-size: 0.85rem; cursor: pointer; border: none;
  text-decoration: none; font-family: inherit;
}
.btn-primary { background: #059669; color: #fff; }
.btn-outline { background: #fff; border: 1px solid #e2e8f0; color: #1e293b; }
.btn-ghost { background: #f8fafc; border: 1px solid #e2e8f0; color: #64748b; }
.btn-sm { padding: 4px 10px; font-size: 0.78rem; }
.btn-danger { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.modal-overlay {
  display: none; position: fixed; inset: 0; background: rgba(15,23,42,.45);
  z-index: 1000; align-items: center; justify-content: center; padding: 16px;
}
.modal-overlay.is-open { display: flex; }

.modal {
  background: #fff; border-radius: 12px; width: 100%; max-width: 440px;
  box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.modal-header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 16px 20px; border-bottom: 1px solid #e2e8f0;
}
.modal-body { padding: 20px; }
.modal-footer {
  display: flex; justify-content: flex-end; gap: 8px;
  padding: 14px 20px; border-top: 1px solid #e2e8f0;
}
.btn-close { background: none; border: none; font-size: 1.4rem; cursor: pointer; color: #94a3b8; }

.toast {
  display: none; position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: #1e293b; color: #fff; padding: 10px 20px; border-radius: 8px; z-index: 2000;
}
.toast.show { display: block; }
.toast.success { background: #059669; }
.toast.error { background: #dc2626; }

.user-bar {
  display: flex; justify-content: space-between; align-items: center;
  background: #fff; border: 1px solid #e2e8f0; border-radius: 10px;
  padding: 10px 16px; margin-bottom: 16px; font-size: 0.85rem;
}
.user-bar-left { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.user-bar-right { display: flex; gap: 8px; align-items: center; }
.view-scope { color: #64748b; }
.view-scope strong { color: #059669; }

.lock-policy {
  color: #b45309;
  font-size: 0.78rem;
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 999px;
  padding: 2px 10px;
}

.lock-badge {
  display: inline-block;
  margin-left: 6px;
  font-size: 0.72rem;
  font-weight: 600;
  color: #b45309;
  background: #fef3c7;
  border: 1px solid #fcd34d;
  border-radius: 999px;
  padding: 1px 8px;
  vertical-align: middle;
}

.lock-hint {
  font-size: 0.78rem;
  color: #94a3b8;
}

.lock-notice {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: #92400e;
}

.readonly-notice {
  background: #fffbeb; border: 1px solid #fde68a; border-radius: 8px;
  padding: 12px 16px; margin-bottom: 16px; font-size: 0.875rem; color: #92400e;
}
