﻿:root {
  --brand: #6366f1;
  --brand-2: #8b5cf6;
  --brand-3: #ec4899;
  --brand-soft: #eef2ff;
  --bg: #f6f5fb;
  --surface: #ffffff;
  --text: #1d1d1f;
  --text-muted: #6e6e73;
  --border: #eceaf2;
  --shadow: 0 4px 16px rgba(30, 20, 60, .06);
  --shadow-hover: 0 12px 30px rgba(99, 102, 241, .22);
  --radius: 12px;
  --radius-card: 16px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* 顶栏 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 24px;
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  white-space: nowrap;
}
.brand-dot {
  width: 26px; height: 26px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2) 50%, var(--brand-3));
  box-shadow: 0 4px 12px rgba(139, 92, 246, .35);
}
.brand-name {
  font-size: 20px;
  font-weight: 700;
  background: linear-gradient(135deg, var(--brand), var(--brand-3));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.search-wrap { flex: 1; max-width: 420px; }
.search {
  width: 100%;
  height: 40px;
  padding: 0 16px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  font-size: 14px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
.search:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
}
.actions { display: flex; align-items: center; gap: 12px; margin-left: auto; }
.user-area { display: flex; align-items: center; gap: 8px; }
.user-name { font-size: 14px; font-weight: 600; }
.badge-admin {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
}

/* 按钮 */
.btn-primary {
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .15s, box-shadow .2s, filter .2s;
  box-shadow: 0 6px 16px rgba(99, 102, 241, .32);
}
.btn-primary:hover { transform: translateY(-1px); filter: brightness(1.05); box-shadow: 0 10px 22px rgba(99, 102, 241, .42); }
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; transform: none; }
.btn-ghost {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.btn-ghost:hover { background: var(--brand-soft); }
.btn-block { width: 100%; height: 46px; font-size: 15px; }

/* 标签栏 */
.tag-bar {
  display: flex;
  gap: 8px;
  padding: 12px 24px 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.tag-bar::-webkit-scrollbar { display: none; }

/* 标签栏容器 + 管理按钮 */
.tag-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px 0;
}
.tag-bar-wrap .tag-bar { padding: 0; flex: 1; }
.tag-manage-btn {
  flex-shrink: 0;
  width: 32px; height: 32px;
  border: 1px solid var(--border);
  border-radius: 50%;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 16px;
  cursor: pointer;
  transition: all .2s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tag-manage-btn:hover { color: var(--brand); border-color: var(--brand); background: var(--brand-soft); }

/* 标签管理模态框 */
.tag-add-form {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}
.tag-add-form input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  outline: none;
  background: var(--surface);
  transition: border-color .2s, box-shadow .2s;
}
.tag-add-form input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99,102,241,.14); }
.tag-add-form .btn-primary { height: 40px; padding: 0 18px; }
.tag-manage-list {
  max-height: 340px;
  overflow-y: auto;
  padding-right: 4px;
}
.tag-manage-list::-webkit-scrollbar { width: 4px; }
.tag-manage-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.tag-manage-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  border-radius: 8px;
  margin-bottom: 4px;
  transition: background .15s;
  animation: cardIn .25s ease both;
}
.tag-manage-item:hover { background: var(--brand-soft); }
.tmi-name {
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
}
.tmi-ops { display: flex; gap: 4px; }
.tmi-edit, .tmi-del {
  border: none;
  background: transparent;
  cursor: pointer;
  font-size: 14px;
  width: 28px; height: 28px;
  border-radius: 6px;
  transition: all .15s;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tmi-edit { color: var(--text-muted); }
.tmi-edit:hover { background: #fff; color: var(--brand); }
.tmi-del { color: var(--text-muted); }
.tmi-del:hover { background: #fee2e2; color: #e11d48; }
.tag-manage-hint {
  text-align: center;
  color: var(--text-muted);
  font-size: 13px;
  padding: 20px 0;
}
.tag-chip {
  flex-shrink: 0;
  padding: 6px 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  transition: all .2s;
}
.tag-chip:hover { color: var(--brand); border-color: var(--brand); }
.tag-chip.active {
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  border-color: transparent;
}

/* 照片墙瀑布流 */
.wall-wrap { padding: 16px 24px 48px; }
.wall {
  column-gap: 16px;
  column-count: 4;
}
.photo-card {
  break-inside: avoid;
  margin-bottom: 16px;
  background: var(--surface);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  transition: transform .22s, box-shadow .22s;
  animation: cardIn .4s ease both;
}
.photo-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-hover);
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.card-img {
  width: 100%;
  background-size: cover;
  background-position: center;
  min-height: 160px;
  cursor: pointer;
  transition: transform .3s;
}
.photo-card:hover .card-img { transform: scale(1.04); }
.card-body { padding: 12px 14px 14px; }
.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 6px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.card-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 8px; }
.chip {
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  cursor: pointer;
  transition: background .2s;
}
.chip:hover { background: #e0e7ff; }
.card-foot { display: flex; justify-content: flex-end; }
.like-btn {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: none;
  background: transparent;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 999px;
  transition: color .2s, transform .15s;
}
.like-btn .heart { font-size: 15px; }
.like-btn.liked { color: var(--brand-3); }
.like-btn.liked .heart { animation: pop .35s ease; }
@keyframes pop {
  0% { transform: scale(1); }
  50% { transform: scale(1.5); }
  100% { transform: scale(1); }
}

/* 空状态 / 加载 */
.empty {
  text-align: center;
  padding: 80px 20px;
  color: var(--text-muted);
}
.empty-art {
  width: 90px; height: 90px;
  margin: 0 auto 20px;
  border-radius: 24px;
  background: linear-gradient(135deg, var(--brand-soft), #fce7f3);
}
.empty p { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
.empty span { font-size: 14px; }
.loading { text-align: center; padding: 60px; color: var(--text-muted); }

/* 模态框 */
.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn .2s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-mask {
  position: absolute;
  inset: 0;
  background: rgba(20, 15, 40, .5);
  backdrop-filter: blur(4px);
}
.modal-box {
  position: relative;
  width: 100%;
  max-width: 460px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--surface);
  border-radius: 20px;
  box-shadow: 0 24px 60px rgba(20, 15, 40, .3);
  animation: slideUp .28s cubic-bezier(.2, .8, .2, 1);
}
@keyframes slideUp {
  from { opacity: 0; transform: translateY(24px) scale(.98); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid var(--border);
}
.modal-head h3 { font-size: 17px; }
.modal-close {
  width: 32px; height: 32px;
  border: none;
  border-radius: 50%;
  background: var(--bg);
  color: var(--text-muted);
  font-size: 20px;
  cursor: pointer;
  transition: background .2s, color .2s;
}
.modal-close:hover { background: var(--brand-soft); color: var(--brand); }
.modal-body { padding: 20px; }
.modal-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 16px;
}
.error-text { color: #e11d48; font-size: 13px; margin-right: auto; }

/* 上传表单 - 新设计 */
.upload-section {
  margin-bottom: 16px;
}
.section-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}
.photo-count {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: normal;
}
.photo-count.full {
  color: #e11d48;
  font-weight: 500;
}
.photo-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
}
@media (min-width: 480px) {
  .photo-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
@media (min-width: 600px) {
  .photo-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}
.photo-item {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--bg);
}
.photo-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.photo-remove {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 20px;
  height: 20px;
  background: rgba(0, 0, 0, 0.6);
  color: #fff;
  border-radius: 50%;
  font-size: 14px;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background .2s;
}
.photo-remove:hover {
  background: rgba(220, 38, 38, 0.9);
}
.photo-add {
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--radius);
  border: 2px dashed var(--border);
  background: var(--bg);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: border-color .2s, background .2s;
  color: var(--text-muted);
  gap: 4px;
}
.photo-add:hover {
  border-color: var(--brand);
  background: var(--brand-soft);
  color: var(--brand);
}
.photo-add-icon {
  font-size: 32px;
  line-height: 1;
  font-weight: 300;
}
.photo-add-text {
  font-size: 12px;
}
.photo-grid.full .photo-add {
  display: none;
}
.photo-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 8px;
  text-align: center;
}

/* 拖拽状态 */
.photo-grid.drag-over {
  background: var(--brand-soft);
  border-radius: var(--radius);
  outline: 2px dashed var(--brand);
  outline-offset: 4px;
}
.photo-grid.drag-over .photo-add {
  border-color: var(--brand);
  background: var(--brand-soft);
}

/* PC端拖拽提示 */
@media (min-width: 768px) {
  .photo-grid::after {
    content: '💡 提示：可直接将图片拖拽到此区域';
    display: block;
    grid-column: 1 / -1;
    text-align: center;
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 4px;
    font-style: italic;
  }
  .photo-grid.full::after {
    display: none;
  }
}
.field { margin-bottom: 14px; }
.field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 6px;
  color: var(--text);
}
.req { color: #e11d48; }
.field input, .field textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 14px;
  font-family: var(--font);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: var(--surface);
}
.field input:focus, .field textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .14);
}
.quick-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.quick-tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  transition: all .2s;
}
.quick-tag.active {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* 大图查看 */
.view-box { max-width: 760px; }
.view-img {
  width: 100%;
  max-height: 70vh;
  object-fit: contain;
  background: #1a1726;
  display: block;
}
.view-close { position: absolute; top: 12px; right: 12px; z-index: 2; background: rgba(255,255,255,.9); }
/* 大图左右切换箭头 */
.view-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, .92);
  color: var(--brand);
  font-size: 30px;
  font-weight: 700;
  cursor: pointer;
  z-index: 6;
  box-shadow: 0 4px 16px rgba(20, 15, 40, .25);
  transition: background .2s, transform .15s;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 1;
}
.view-arrow:hover { background: #fff; transform: translateY(-50%) scale(1.08); }
.view-prev { left: 20px; }
.view-next { right: 20px; }
.view-info { padding: 18px 22px 22px; }
.view-info h3 { font-size: 20px; margin-bottom: 8px; }
.view-meta { font-size: 13px; color: var(--text-muted); margin-bottom: 10px; }
.view-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.view-desc { font-size: 14px; line-height: 1.6; color: var(--text); margin-bottom: 14px; }
.view-actions { display: flex; gap: 10px; }
.btn-like {
  height: 40px;
  padding: 0 18px;
  border: none;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all .2s;
}
.btn-like.liked { background: linear-gradient(135deg, var(--brand-3), #f43f5e); color: #fff; }
.btn-like:hover { transform: scale(1.04); }

/* 星级评分 */
.view-rating {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 14px 0 6px;
  padding: 10px 14px;
  background: var(--brand-soft);
  border-radius: var(--radius);
}
.rating-label { font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; }
.stars { display: inline-flex; gap: 2px; }
.star {
  font-size: 22px;
  line-height: 1;
  color: #d1d5db;
  cursor: pointer;
  transition: color .15s, transform .15s;
  user-select: none;
}
.star.on, .star.hover { color: #fbbf24; }
.star:hover { transform: scale(1.18); }
.rating-meta { font-size: 12px; color: var(--text-muted); margin-left: auto; }

/* 评论区 */
.view-comments { margin-top: 16px; border-top: 1px solid var(--border); padding-top: 14px; }
.view-comments h4 { font-size: 15px; margin-bottom: 10px; }
.comment-list {
  max-height: 220px;
  overflow-y: auto;
  margin-bottom: 12px;
  padding-right: 4px;
}
.comment-list::-webkit-scrollbar { width: 4px; }
.comment-list::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
.comment {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--bg);
  margin-bottom: 6px;
  animation: cardIn .3s ease both;
}
.c-name { font-size: 13px; font-weight: 600; color: var(--brand); }
.c-text { font-size: 13px; color: var(--text); flex: 1; min-width: 120px; word-break: break-word; }
.c-time { font-size: 11px; color: var(--text-muted); }
.c-empty { font-size: 13px; color: var(--text-muted); text-align: center; padding: 12px; }
.comment-input { display: flex; gap: 8px; }
.comment-input input {
  flex: 1;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: 13px;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  background: var(--surface);
}
.comment-input input:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(99, 102, 241, .14); }
.comment-input .btn-primary { height: 40px; padding: 0 18px; }

/* 登录页 */
.login-body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef2ff 0%, #fce7f3 50%, #e0f2fe 100%);
  padding: 20px;
}
.login-card {
  width: 100%;
  max-width: 380px;
  background: var(--surface);
  border-radius: 24px;
  padding: 36px 32px;
  box-shadow: 0 24px 60px rgba(99, 102, 241, .22);
  text-align: center;
}
.login-logo { display: flex; align-items: center; justify-content: center; gap: 10px; margin-bottom: 8px; }
.login-slogan { font-size: 13px; color: var(--text-muted); margin-bottom: 24px; }
.login-form { text-align: left; }
.login-form h2 { font-size: 22px; margin-bottom: 18px; text-align: left; }
.switch-mode { text-align: center; color: var(--brand); font-size: 13px; margin-top: 14px; cursor: pointer; }
.login-hint { text-align: center; color: var(--text-muted); font-size: 12px; margin-top: 8px; }
.remember-field { margin-bottom: 16px; }
.remember {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--text-muted);
  cursor: pointer;
  user-select: none;
}
.remember input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--brand);
  cursor: pointer;
}

/* 活动卡片封面（多图折叠展示，点击展开） */
.group-card { cursor: pointer; }
.g-cover {
  width: 100%;
  background-size: cover;
  background-position: center;
}
.g-cover.single {
  aspect-ratio: 4 / 3;
  transition: transform .3s;
}
.group-card:hover .g-cover.single { transform: scale(1.04); }
.g-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 2px;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.g-thumb {
  position: relative;
  background-size: cover;
  background-position: center;
  transition: transform .3s;
}
.group-card:hover .g-thumb { transform: scale(1.04); }
.g-more {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(20, 15, 40, .5);
  color: #fff;
  font-size: 22px;
  font-weight: 700;
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}
.g-count {
  padding: 1px 8px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 600;
}

/* 活动详情模态框 */
.modal-box.group-box { max-width: 860px; }
#groupMeta { padding: 14px 20px 0; }
#groupTags { padding: 8px 20px 0; }
.group-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 16px 20px 20px;
}
.grid-photo {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: transform .2s, box-shadow .2s;
  animation: cardIn .4s ease both;
}
.grid-photo:hover { transform: translateY(-3px); box-shadow: var(--shadow-hover); }
.gp-img {
  width: 100%;
  aspect-ratio: 1 / 1;
  background-size: cover;
  background-position: center;
  transition: transform .3s;
}
.grid-photo:hover .gp-img { transform: scale(1.06); }
.gp-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  padding: 8px 10px;
}
.gp-title {
  font-size: 12px;
  color: var(--text-muted);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
  min-width: 0;
}
.grid-photo .like-btn { flex-shrink: 0; padding: 2px 6px; }

/* 响应式 */
@media (max-width: 1024px) {
  .wall { column-count: 3; }
}
@media (max-width: 768px) {
  .wall { column-count: 2; }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 10px 14px; }
  .brand-name { font-size: 18px; }
  .search-wrap { order: 3; flex-basis: 100%; max-width: none; }
  .actions { margin-left: 0; }
  .wall-wrap, .tag-bar-wrap { padding-left: 14px; padding-right: 14px; }
  .modal { padding: 12px; }
  .view-info { padding: 14px 16px 16px; }
  .view-arrow { width: 40px; height: 40px; font-size: 24px; }
  .view-prev { left: 8px; }
  .view-next { right: 8px; }
  .group-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; padding: 14px 16px 16px; }
  #groupMeta, #groupTags { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 420px) {
  .wall { column-count: 2; column-gap: 10px; }
  .photo-card { margin-bottom: 10px; }
  .btn-primary { padding: 0 14px; font-size: 13px; }
  .user-name { display: none; }
}

/* 组织管理页 */
.admin-body { background: var(--bg); min-height: 100vh; }
.admin-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 20px 24px 48px;
}
.admin-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.admin-head h1 { font-size: 22px; flex: 1; }
.admin-back {
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-size: 13px;
  cursor: pointer;
  transition: background .2s;
}
.admin-back:hover { background: var(--brand-soft); color: var(--brand); }
.admin-cols {
  display: grid;
  grid-template-columns: 320px 1fr;
  gap: 20px;
  align-items: start;
}
.admin-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.admin-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.admin-card-head h2 { font-size: 16px; }
.admin-card-body { padding: 16px 18px; }
.admin-add {
  width: 26px; height: 26px;
  border: none;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  color: #fff;
  font-size: 18px;
  line-height: 24px;
  cursor: pointer;
  transition: transform .15s;
}
.admin-add:hover { transform: scale(1.1); }
/* 部门树 */
.dept-tree { list-style: none; }
.dept-node { position: relative; }
.dept-node-row {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 6px;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}
.dept-node-row:hover { background: var(--brand-soft); }
.dept-node-row.active { background: var(--brand-soft); color: var(--brand); font-weight: 600; }
.dept-toggle {
  width: 18px; height: 18px;
  border: none;
  background: transparent;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 12px;
  text-align: center;
}
.dept-name { flex: 1; font-size: 14px; }
.dept-ops { display: flex; gap: 4px; }
.dept-op {
  border: none;
  background: transparent;
  color: var(--text-muted);
  font-size: 13px;
  cursor: pointer;
  padding: 2px 6px;
  border-radius: 4px;
  opacity: .55;
  transition: opacity .15s, background .15s, color .15s;
}
.dept-node-row:hover .dept-op { opacity: 1; }
.dept-op:hover { background: #fff; color: var(--brand); opacity: 1; }
.dept-children { list-style: none; margin-left: 14px; border-left: 1px dashed var(--border); padding-left: 6px; }
.dept-empty { font-size: 13px; color: var(--text-muted); padding: 8px 0; }
/* 人员表 */
.user-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.user-table th, .user-table td {
  padding: 10px 12px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.user-table th {
  background: var(--bg);
  font-weight: 600;
  color: var(--text-muted);
  font-size: 12px;
  position: sticky;
  top: 0;
}
.user-table tr:hover td { background: var(--brand-soft); }
.user-table select, .user-table input {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 8px;
  font-size: 13px;
  background: var(--surface);
  outline: none;
  max-width: 110px;
}
.user-table select:focus, .user-table input:focus { border-color: var(--brand); }
.role-admin { color: #e11d48; font-weight: 600; }
.role-member { color: var(--text); }
.status-active { color: #10b981; }
.status-disabled { color: #9ca3af; }
.tiny-btn {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  margin-right: 4px;
}
.tiny-btn:hover { background: var(--brand-soft); color: var(--brand); }
.tiny-btn.danger:hover { background: #fee2e2; color: #e11d48; }
.user-empty { text-align: center; color: var(--text-muted); padding: 30px; font-size: 14px; }
/* 内联表单（新增部门 / 重置密码） */
.inline-form {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 12px;
  background: var(--bg);
  border-radius: 8px;
  margin-bottom: 12px;
}
.inline-form input {
  flex: 0 1 160px;
  max-width: 160px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 13px;
  background: var(--surface);
  outline: none;
}
.inline-form input:focus { border-color: var(--brand); }
.inline-form select { height: 34px; flex: 1 1 100px; min-width: 100px; }
.inline-form .btn-primary { height: 34px; padding: 0 14px; font-size: 13px; flex-shrink: 0; white-space: nowrap; }
.admin-stat {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 4px 12px;
}
.admin-stat b { color: var(--brand); }
@media (max-width: 860px) {
  .admin-cols { grid-template-columns: 1fr; }
  .user-table th, .user-table td { padding: 8px 6px; }
  .user-table select, .user-table input { max-width: 80px; }
  .inline-form { flex-wrap: wrap; }
  .inline-form input { flex: 1 1 100%; }
  .inline-form select { flex: 1; min-width: 120px; }
  .inline-form .btn-primary { flex-shrink: 0; }
}

/* 存储状态徽章 */
.storage-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 999px;
  margin-left: 6px;
  font-weight: 500;
}
.storage-wecom {
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  color: white;
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.15);
}
.storage-wecom::before {
  content: "☁";
  font-size: 10px;
}