/* 登录 / 注册视图（浅色清爽风格） */
.auth-view {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #eef2f7 0%, #dde6f0 55%, #e2e8f0 100%);
  padding: 1rem;
}
.auth-card {
  width: 100%;
  max-width: 400px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 2.4rem 2.2rem;
  box-shadow: 0 16px 48px rgba(30, 41, 59, .12), 0 2px 8px rgba(30, 41, 59, .06);
}
.auth-logo {
  width: 56px;
  height: 56px;
  margin: 0 auto 1rem;
  border-radius: 14px;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.6rem;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .25);
}
.auth-title {
  font-size: 1.45rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0 0 .3rem;
  text-align: center;
}
.auth-sub {
  font-size: .88rem;
  color: #64748b;
  text-align: center;
  margin: 0 0 1.8rem;
}
.auth-form {
  display: flex;
  flex-direction: column;
  gap: .85rem;
}
.auth-form input {
  width: 100%;
  padding: .75rem .95rem;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  background: #f8fafc;
  color: #0f172a;
  font-size: .95rem;
  outline: none;
  box-sizing: border-box;
  transition: border-color .15s, box-shadow .15s;
}
.auth-form input:focus {
  border-color: #2563eb;
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.auth-form input::placeholder {
  color: #94a3b8;
}
.auth-btn {
  margin-top: .5rem;
  padding: .78rem !important;
  font-size: .98rem !important;
  background: #2563eb !important;
  border: none !important;
  border-radius: 10px !important;
  color: #ffffff !important;
  cursor: pointer;
  transition: background .15s, transform .05s;
}
.auth-btn:hover {
  background: #1d4ed8 !important;
}
.auth-btn:active {
  transform: scale(.99);
}
.auth-switch {
  text-align: center;
  margin-top: 1.3rem;
  font-size: .9rem;
  color: #64748b;
}
.auth-switch a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  cursor: pointer;
}
.auth-switch a:hover {
  text-decoration: underline;
}
.auth-msg {
  margin-top: .9rem;
  min-height: 1.2em;
  text-align: center;
  font-size: .85rem;
  color: #dc2626;
}
.auth-msg.ok {
  color: #16a34a;
}

/* 登录用户栏（侧边栏顶部：头像 + 账号 + 退出） */
.user-bar {
  display: flex;
  align-items: center;
  gap: .55rem;
  margin: .4rem 1.2rem 1rem;
  padding: .45rem .7rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, .08);   /* 深色侧边栏适配：半透明白 */
  border: 1px solid rgba(255, 255, 255, .14);
}
.user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2563eb, #38bdf8);
  color: #fff;
  font-size: .85rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid #1e293b;   /* 深色主题边框 */
  box-shadow: 0 2px 6px rgba(0, 0, 0, .3);
}
.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.user-bar-name {
  flex: 1;
  font-size: .84rem;
  color: #e2e8f0;   /* 深色侧边栏上使用浅色文字 */
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}
.user-bar-logout {
  font-size: .76rem;
  color: #94a3b8;
  background: none;
  border: 1px solid rgba(255, 255, 255, .25);
  border-radius: 6px;
  padding: .25rem .5rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: color .15s, border-color .15s;
}
.user-bar-logout:hover {
  color: #f87171;
  border-color: #f87171;
}

/* 头像设置弹窗 */
#avatarModal .modal-dialog {
  max-width: 340px;
}
#avatarModal .avatar-preview-wrap {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}
#avatarModal .avatar-preview {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  object-fit: cover;
  border: 3px solid #e2e8f0;
  background: #f1f5f9;
}
#avatarModal .form-hint {
  font-size: .78rem;
  color: #64748b;
  margin-top: .4rem;
  text-align: center;
}

/* 注册管理卡片（owner 可见） */
.admin-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .6rem;
}
.admin-card-title {
  font-size: .9rem;
  font-weight: 600;
  color: #0f172a;
}
.admin-card-desc {
  font-size: .76rem;
  color: #64748b;
  margin-top: .2rem;
}