/* 学习资料、我的资料、照片上传和学员风采。 */

/* ===== 学习资料管理 ===== */
.mat-cat-tabs { justify-content: center; display: flex; gap: 10px; margin-bottom: 12px; }

.mat-tab { padding: 8px 28px; border-radius: 99px; border: none; font-weight: 700; font-size: 14px; cursor: pointer; font-family: inherit; background: #f1f5f9; color: #64748b; transition: all 0.2s; }

.mat-tab.active { background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; box-shadow: 0 2px 8px rgba(79,70,229,0.2); }

.mat-tab:active { transform: scale(0.96); }

.mat-add-row { background: #f8fafc; border: 1.5px dashed #cbd5e1; border-radius: 12px; padding: 14px; margin-bottom: 12px; }

.mat-add-fields { display: flex; flex-wrap: wrap; gap: 10px; }

.mat-add-grp { flex: 1; min-width: 130px; }

.mat-add-grp label { display: block; font-size: 12px; font-weight: 600; color: #64748b; margin-bottom: 3px; }

.mat-add-input { width: 100%; padding: 8px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; box-sizing: border-box; transition: border-color 0.2s; }

.mat-add-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,0.1); }

.mat-add-row-actions { display: flex; gap: 8px; margin-top: 10px; }

.mat-card { background: #fff; border: 1px solid #e2e8f0; border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; transition: all 0.2s; }

.mat-card:hover { border-color: #cbd5e1; box-shadow: 0 1px 6px rgba(0,0,0,0.04); }

.mat-card-top { display: flex; align-items: flex-start; gap: 12px; }

.mat-card-num { width: 30px; height: 30px; border-radius: 8px; background: #f1f5f9; color: #64748b; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700; flex-shrink: 0; }

.mat-card-body { flex: 1; min-width: 0; }

.mat-card-title { font-size: 15px; font-weight: 700; color: #1e293b; }

.mat-card-desc { font-size: 13px; color: #94a3b8; margin-top: 2px; }

.mat-card-link { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: #4f46e5; text-decoration: none; margin-top: 6px; }

.mat-card-link:hover { text-decoration: underline; }

.mat-card-actions { display: flex; gap: 6px; margin-top: 8px; }

.mat-card-edit { padding: 6px 14px; border-radius: 8px; border: none; background: #eef2ff; color: #4f46e5; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; }

.mat-card-edit:hover { background: #dbeafe; }

.mat-card-del { padding: 6px 14px; border-radius: 8px; border: none; background: #fef2f2; color: #ef4444; font-weight: 600; font-size: 13px; cursor: pointer; font-family: inherit; }

.mat-card-del:hover { background: #fee2e2; }

.mat-edit-fields { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.mat-edit-grp { flex: 1; min-width: 100px; }

.mat-edit-grp label { display: block; font-size: 12px; font-weight: 600; color: #64748b; margin-bottom: 3px; }

.mat-edit-input { width: 100%; padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px; font-size: 14px; font-family: inherit; outline: none; box-sizing: border-box; }

.mat-edit-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,0.1); }

.mat-edit-actions { display: flex; gap: 6px; }

.mat-empty { text-align: center; padding: 2rem; color: #94a3b8; font-size: 14px; }

@media (max-width: 640px) {
  .mat-tab { flex: 1; text-align: center; border-radius: 10px; }

  .mat-cat-tabs { justify-content: stretch; }

  .mat-card { padding: 12px; }

  .mat-add-grp { min-width: 100%; }

  .mat-edit-grp { min-width: 100%; }
}

@media (max-width: 768px) {
  .photos-wrap { padding: 1.25rem; }

  .photo-gallery-wrap { padding: 1.25rem; }

  .photo-card-upload { padding: 0.8rem 1.25rem; }
}

.mat-cat-tabs { display: flex; gap: 6px; margin-bottom: 10px; }

.mat-tab {
  padding: 6px 22px; border-radius: 99px; border: none; font-weight: 700; font-size: 0.85rem;
  cursor: pointer; font-family: inherit; background: #f1f5f9; color: #64748b;
  transition: all 0.2s;
}

.mat-tab.active {
  background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff;
  box-shadow: 0 2px 8px rgba(79,70,229,0.25);
}

.mat-tab:hover:not(.active) { background: #e2e8f0; }

.mat-tab:active { transform: scale(0.95); }

.mat-add-row {
  background: #f8fafc; border: 1.5px dashed #cbd5e1;
  border-radius: 10px; padding: 12px; margin-bottom: 10px;
}

.mat-add-fields { display: flex; flex-wrap: wrap; gap: 8px; }

.mat-add-grp { flex: 1; min-width: 120px; }

.mat-add-grp label { display: block; font-size: 0.75rem; font-weight: 600; color: #64748b; margin-bottom: 2px; }

.mat-add-input { width: 100%; padding: 6px 8px; border: 1px solid #cbd5e1; border-radius: 6px; font-size: 0.85rem; font-family: inherit; outline: none; box-sizing: border-box; transition: border-color 0.2s; }

.mat-add-input:focus { border-color: #4f46e5; box-shadow: 0 0 0 2px rgba(79,70,229,0.1); }

.mat-add-row-actions { display: flex; gap: 6px; margin-top: 8px; }

.mat-card {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 12px 14px; margin-bottom: 8px;
  transition: all 0.15s;
}

.mat-card:hover { border-color: #cbd5e1; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }

.mat-card-top { display: flex; align-items: flex-start; gap: 10px; }

.mat-card-num {
  background: #f1f5f9; color: #64748b; font-size: 0.78rem; font-weight: 700;
  width: 26px; height: 26px; display: flex; align-items: center;
  justify-content: center; border-radius: 6px; flex-shrink: 0;
}

.mat-card-body { flex: 1; min-width: 0; }

.mat-card-title { font-weight: 600; font-size: 0.9rem; color: #1e293b; }

.mat-card-desc { font-size: 0.8rem; color: #94a3b8; margin-top: 1px; }

.mat-card-link { font-size: 0.78rem; }

.mat-card-link a { color: #4f46e5; text-decoration: none; }

.mat-card-link a:hover { text-decoration: underline; }

.mat-card-actions { margin-top: 6px; display: flex; gap: 4px; }

.mat-card-edit,
.mat-card-del {
  padding: 4px 10px; border-radius: 6px; border: none;
  font-size: 0.75rem; font-weight: 600; cursor: pointer;
  font-family: inherit; transition: background 0.15s;
}

.mat-card-edit { background: #eef2ff; color: #4f46e5; }

.mat-card-edit:hover { background: #dbeafe; }

.mat-card-del { background: #fef2f2; color: #ef4444; }

.mat-card-del:hover { background: #fee2e2; }

.materials-notes .user-page-note-icon { background: #ecfdf5; color: #059669; }

.materials-panel {
  background: #fff; border: 1px solid #e2eee9; border-radius: 20px;
  box-shadow: 0 14px 34px rgba(30,41,59,0.07); overflow: hidden;
}

.materials-panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 1rem 1.35rem; border-bottom: 1px solid #eef2f6;
  background: linear-gradient(135deg, #fff, #fbfefc);
}

.materials-panel-title,
.materials-panel-subtitle { display: block; }

.materials-panel-title { color: #1e293b; font-size: 0.92rem; font-weight: 800; }

.materials-panel-subtitle { margin-top: 2px; color: #94a3b8; font-size: 0.7rem; }

.materials-refresh {
  display: inline-flex; align-items: center; gap: 5px; padding: 6px 11px;
  border: 1px solid #a7f3d0; border-radius: 9px; background: #ecfdf5; color: #059669;
  font-size: 0.72rem; font-weight: 700; font-family: inherit; cursor: pointer; transition: all .18s;
}

.materials-refresh svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.materials-refresh:hover { background: #d1fae5; border-color: #6ee7b7; transform: translateY(-1px); }

#my-materials-list { padding: 0.85rem 1rem 1rem; background: #fbfefc; }

.my-mat-item {
  display: flex; align-items: center; gap: 12px; min-width: 0; margin-bottom: 0.65rem; padding: 1rem 1.05rem;
  background: #fff; border: 1px solid #e6f0eb; border-left: 3px solid #6ee7b7; border-radius: 16px;
  box-shadow: 0 3px 10px rgba(30,41,59,0.045); transition: all .22s;
}

.my-mat-item:last-child { margin-bottom: 0; }

.my-mat-item:hover { border-color: #a7f3d0; box-shadow: 0 8px 20px rgba(5,150,105,0.1); transform: translateY(-2px); }

.my-mat-item.junior { border-left-color: #fda4af; }

.my-mat-item.general { border-left-color: #6ee7b7; }

.my-mat-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 42px; height: 42px;
  flex: 0 0 42px; border-radius: 13px; background: #ecfdf5;
}

.my-mat-icon img { width: 25px; height: 25px; object-fit: contain; }

.my-mat-item.junior .my-mat-icon { background: #fff1f2; }

.my-mat-item.general .my-mat-icon { background: #ecfdf5; }

.my-mat-main { flex: 1; min-width: 0; }

.my-mat-title { color: #1e293b; font-size: 0.88rem; font-weight: 800; line-height: 1.5; overflow-wrap: anywhere; }

.my-mat-meta { display: flex; align-items: center; gap: 7px; margin-top: 5px; color: #a0aec0; font-size: 0.68rem; }

.my-mat-category { padding: 2px 8px; border-radius: 99px; background: #ecfdf5; color: #059669; font-size: 0.65rem; font-weight: 800; }

.my-mat-item.junior .my-mat-category { background: #fff1f2; color: #be123c; }

.my-mat-item.general .my-mat-category { background: #ecfdf5; color: #047857; }

.my-mat-actions { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }

.my-mat-open,
.my-mat-remove {
  display: inline-flex; align-items: center; justify-content: center; height: 32px; padding: 0 12px;
  border-radius: 9px; font-size: 0.7rem; font-weight: 800; font-family: inherit; white-space: nowrap; transition: all .18s;
}

.my-mat-open { background: #eef2ff; border: 1px solid #c7d2fe; color: #4f46e5; text-decoration: none; }

.my-mat-open:hover { background: #e0e7ff; border-color: #a5b4fc; }

.my-mat-remove { background: #fff1f2; border: 1px solid #fecdd3; color: #e11d48; cursor: pointer; }

.my-mat-remove:hover { background: #ffe4e6; border-color: #fda4af; transform: translateY(-1px); }

.materials-loading,
.materials-error,
.materials-empty {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  min-height: 210px; padding: 2.5rem 1rem; text-align: center;
}

.materials-loading-icon,
.materials-empty-icon {
  display: inline-flex; align-items: center; justify-content: center; width: 48px; height: 48px;
  margin-bottom: 5px; border-radius: 15px; background: #ecfdf5; box-shadow: 0 8px 18px rgba(5,150,105,0.1);
}

.materials-loading-icon img,
.materials-empty-icon img { width: 30px; height: 30px; object-fit: contain; opacity: 0.7; }

.materials-loading strong,
.materials-empty strong,
.materials-error strong { color: #475569; font-size: 0.88rem; }

.materials-loading small,
.materials-empty small,
.materials-error small { color: #a0aec0; font-size: 0.72rem; }

.materials-empty a { color: #059669; font-weight: 700; text-decoration: none; }

.materials-empty a:hover { text-decoration: underline; }

.materials-error { color: #dc2626; }

.materials-error strong { color: #dc2626; }

@media (max-width: 640px) {
  .materials-panel-head { padding: 0.8rem 0.95rem; }

  .materials-panel-subtitle { font-size: 0.66rem; }

  #my-materials-list { padding: 0.7rem; }

  .my-mat-item { align-items: flex-start; padding: 0.9rem 0.8rem; }

  .my-mat-icon { width: 36px; height: 36px; flex-basis: 36px; border-radius: 11px; }

  .my-mat-icon img { width: 22px; height: 22px; }

  .my-mat-actions { flex-direction: column; align-items: stretch; }

  .my-mat-open,
  .my-mat-remove { height: 30px; padding: 0 9px; }
}

#materials-empty { text-align: center; padding: 2.5rem 1rem; color: #94a3b8; font-size: 0.9rem; }

@media (max-width: 480px) {
  .photos-wrap { padding: 1rem; }

  .photo-gallery-wrap { padding: 1rem; }

  .photo-card-upload { padding: 0.6rem 1rem; }
}

#tab-admin-photos { animation: regFadeIn 0.3s ease; }

/* 上传区卡片 */
.photo-upload-toast {
  position: fixed; top: 16px; left: 50%; transform: translateX(-50%);
  z-index: 99999; background: #059669; color: #fff;
  padding: 10px 24px; border-radius: 12px;
  font-size: 0.85rem; font-weight: 600;
  box-shadow: 0 4px 20px rgba(5,150,105,0.3);
  opacity: 0; transition: opacity .3s, transform .3s;
  pointer-events: none;
}

.photo-upload-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

.photo-card-upload {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 92% 10%, rgba(79,70,229,0.15) 0 16%, transparent 34%),
    radial-gradient(circle at 8% 100%, rgba(14,165,233,0.10) 0 18%, transparent 38%),
    linear-gradient(135deg, #ffffff 0%, #f8fbff 56%, #f3f7ff 100%);
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: 0 18px 46px rgba(15,23,42,0.08), inset 0 1px 0 rgba(255,255,255,0.92);
  border: 1px solid rgba(226,232,240,0.86);
  max-width: 100%;
  margin: 0 auto 1.5rem;
}

.photo-card-upload::before {
  content: '';
  position: absolute;
  width: 190px;
  height: 190px;
  right: -92px;
  top: -108px;
  border-radius: 52px;
  transform: rotate(18deg);
  background: rgba(79,70,229,0.10);
  pointer-events: none;
}

.photo-upload-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.photo-upload-head-copy strong {
  display: block;
  font-size: 1.08rem;
  line-height: 1.2;
  color: #0f172a;
  font-weight: 900;
  letter-spacing: 0.01em;
}

.photo-upload-eyebrow {
  display: block;
  margin-bottom: 3px;
  color: #4f46e5;
  font-size: 0.68rem;
  font-weight: 900;
  letter-spacing: 0.12em;
}

.photo-upload-head-copy p {
  margin: 0.35rem 0 0;
  color: #64748b;
  font-size: 0.8rem;
  line-height: 1.6;
}

.photo-upload-head-mark {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: linear-gradient(135deg, #eef2ff, #ffffff);
  border: 1px solid rgba(199,210,254,0.72);
  box-shadow: 0 10px 22px rgba(79,70,229,0.12);
}

.photo-upload-head-mark img { width: 28px; height: 28px; object-fit: contain; }

.photo-upload-form-row {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, 0.95fr);
  gap: 1rem;
  align-items: stretch;
}

.photo-upload-col-left,
.photo-upload-col-right {
  min-width: 0;
  min-height: 260px;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  height: 100%;
  padding: 1rem;
  border-radius: 20px;
  background: rgba(255,255,255,0.66);
  border: 1px solid rgba(226,232,240,0.78);
  box-shadow: 0 8px 20px rgba(15,23,42,0.035);
}

.photo-upload-col-right { justify-content: stretch; }

.photo-upload-area {
  position: relative;
  min-height: 178px;
  border: 1.8px dashed #c7d2fe;
  border-radius: 20px;
  padding: 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: transform .22s ease, border-color .22s ease, box-shadow .22s ease, background .22s ease;
  background: rgba(255,255,255,0.72);
  width: 100%;
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.78), 0 8px 20px rgba(15,23,42,0.035);
}

.photo-upload-glow {
  position: absolute;
  inset: 12px;
  border-radius: 16px;
  background:
    linear-gradient(90deg, rgba(79,70,229,0.08) 1px, transparent 1px),
    linear-gradient(180deg, rgba(79,70,229,0.06) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.55;
  pointer-events: none;
  mask-image: radial-gradient(circle at center, #000 0, transparent 72%);
  -webkit-mask-image: radial-gradient(circle at center, #000 0, transparent 72%);
}

.photo-upload-area:hover,
.photo-upload-area:focus-within {
  transform: translateY(-2px);
  border-color: #6366f1;
  background: rgba(255,255,255,0.94);
  box-shadow: 0 14px 32px rgba(79,70,229,0.12);
}

.photo-upload-area:active { transform: translateY(0); }

.photo-file-input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 5;
}

.photo-upload-icon {
  position: relative;
  z-index: 1;
  width: auto;
  height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #94a3b8;
  background: transparent;
  border: 0;
  box-shadow: none;
  opacity: 0.86;
  pointer-events: none;
}

.photo-upload-main { position: relative; z-index: 1; pointer-events: none; }

.photo-upload-text { font-size: 0.96rem; color: #334155; font-weight: 900; }

.photo-upload-text .file-name {
  display: inline-block;
  max-width: 100%;
  color: #4f46e5;
  font-weight: 900;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.photo-upload-subtext { margin-top: 0.28rem; color: #94a3b8; font-size: 0.76rem; line-height: 1.5; }

.photo-field-group {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
}

.photo-caption-help {
  font-size: 0.75rem;
  color: #94a3b8;
  margin: -0.25rem 0 0.65rem 0;
  line-height: 1.55;
}

.photo-caption-input {
  width: 100%;
  min-height: 42px;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.88rem;
  outline: none;
  font-family: inherit;
  color: #334155;
  background: #f8fafc;
  transition: all .2s;
}

.photo-caption-input:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79,70,229,0.10);
  background: #fff;
}

.photo-caption-input:disabled { color: #94a3b8; background: #f1f5f9; cursor: not-allowed; }

.photo-category-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.photo-category-label {
  font-size: 0.82rem;
  font-weight: 900;
  color: #475569;
  white-space: nowrap;
}

.photo-category-select {
  flex: 1;
  min-width: 0;
  min-height: 42px;
  padding: 10px 12px;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  font-size: 0.86rem;
  font-family: inherit;
  color: #334155;
  background-color: rgba(255,255,255,0.9);
  outline: none;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 34px;
  box-shadow: 0 1px 2px rgba(15,23,42,0.03);
}

.photo-category-select:focus {
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79,70,229,0.09);
  background-color: #fff;
}

.photo-upload-tips {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
  margin-top: auto;
}

.photo-upload-tips div {
  min-width: 0;
  padding: 0.78rem 0.85rem;
  border-radius: 16px;
  background: rgba(248,250,252,0.86);
  border: 1px solid rgba(226,232,240,0.78);
  box-shadow: 0 6px 16px rgba(15,23,42,0.035);
}

.photo-upload-tips b {
  display: block;
  margin-bottom: 0.22rem;
  color: #334155;
  font-size: 0.78rem;
  font-weight: 900;
}

.photo-upload-tips span {
  display: block;
  color: #94a3b8;
  font-size: 0.72rem;
  line-height: 1.5;
}

.photo-upload-btns {
  display: flex;
  justify-content: flex-end;
  gap: 0.65rem;
  width: 100%;
  margin-top: 1.2rem;
  padding-top: 0.15rem;
}

.photo-upload-btn,
.photo-cancel-btn {
  min-height: 40px;
  padding: 0 18px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 900;
  cursor: pointer;
  font-family: inherit;
  white-space: nowrap;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease, border-color .18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.photo-upload-btn {
  border: none;
  background: linear-gradient(135deg, #6366f1, #4338ca);
  color: #fff;
  box-shadow: 0 10px 20px rgba(79,70,229,0.24);
}

.photo-upload-btn:hover {
  box-shadow: 0 14px 26px rgba(79,70,229,0.30);
  transform: translateY(-1px);
}

.photo-cancel-btn {
  border: 1.5px solid #e2e8f0;
  background: #fff;
  color: #64748b;
}

.photo-cancel-btn:hover { background: #f8fafc; border-color: #cbd5e1; transform: translateY(-1px); }

.photo-upload-btn:disabled,
.photo-cancel-btn:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none !important;
  box-shadow: none;
}

.photo-upload-btn.is-loading { padding-left: 38px; }

.photo-upload-btn.is-loading::before {
  content: '';
  position: absolute;
  left: 16px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid rgba(255,255,255,0.45);
  border-top-color: #fff;
  animation: photoUploadSpin .75s linear infinite;
}

@keyframes photoUploadSpin { to { transform: rotate(360deg); } }

@media (max-width: 860px) {
  .photo-upload-form-row { grid-template-columns: 1fr; }

  .photo-upload-tips { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 600px) {
  .photo-card-upload {
    border-radius: 20px;
    padding: 0.9rem;
    margin-bottom: 0.8rem;
  }

  .photo-upload-head { align-items: flex-start; margin-bottom: 0.8rem; }

  .photo-upload-head-copy strong { font-size: 1rem; }

  .photo-upload-head-copy p { font-size: 0.74rem; }

  .photo-upload-head-mark { width: 42px; height: 42px; border-radius: 14px; }

  .photo-upload-head-mark img { width: 24px; height: 24px; }

  .photo-category-wrap { flex-direction: column; align-items: stretch; gap: 6px; }

  .photo-category-select,
  .photo-caption-input { min-height: 40px; font-size: 0.82rem; }

  .photo-upload-area { flex: initial; min-height: 154px; padding: 1rem 0.75rem; border-radius: 18px; }

  .photo-upload-icon { width: auto; height: auto; border-radius: 0; }

  .photo-upload-text { font-size: 0.88rem; }

  .photo-upload-subtext { font-size: 0.7rem; }

  .photo-upload-col-left,
  .photo-upload-col-right { min-height: auto; padding: 0.8rem; border-radius: 18px; }

  .photo-field-group { min-height: auto; }

  .photo-upload-tips { grid-template-columns: 1fr; margin-top: 0.2rem; gap: 0.5rem; }

  .photo-upload-tips div { padding: 0.65rem 0.75rem; }

  .photo-upload-btns { gap: 0.5rem; }

  .photo-upload-btn,
  .photo-cancel-btn { flex: 1; min-height: 40px; padding: 0 12px; }
}

/* 照片列表区 */
.photo-gallery-wrap {
  background: #fff; border-radius: 18px; padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
}

.photo-gallery-header {
  display: flex; align-items: center;
  margin-bottom: 1.2rem;
}

.photo-gallery-title {
  font-weight: 700; font-size: 1.15rem; color: #1e293b;
  display: inline-flex; align-items: center; gap: 6px;
}

.photo-gallery-title .tab-icon { width: 24px; height: 24px; }

.photo-gallery-count {
  font-size: 0.75rem; font-weight: 600;
  color: #64748b; background: #f1f5f9;
  padding: 2px 10px; border-radius: 10px;
}

.photo-gallery-count .num { font-size: 1.05rem; }

/* 照片卡片 */
#tab-admin-photos .photo-gallery {
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1rem;
}

#tab-admin-photos .photo-card {
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  transition: all .2s;
}

#tab-admin-photos .photo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.08);
}

#tab-admin-photos .photo-card-img { position: relative; overflow: hidden; }

#tab-admin-photos .photo-card-img img {
  width: 100%; height: 180px; object-fit: cover;
  display: block;
}

#tab-admin-photos .photo-card-del {
  position: absolute; top: 8px; right: 8px;
  min-width: 56px; height: 28px; border-radius: 14px;
  border: none; background: rgba(239,68,68,0.85);
  color: #fff; font-size: 0.78rem; font-weight: 700;
  cursor: pointer; transition: all .2s;
  display: flex; align-items: center; justify-content: center;
  padding: 0 10px; gap: 3px;
}

#tab-admin-photos .photo-card:hover .photo-card-del { opacity: 1; }

#tab-admin-photos .photo-card-del:hover { background: #dc2626; transform: scale(1.05); }

#tab-admin-photos .photo-card-caption {
  padding: 0.7rem 1rem;
  font-size: 0.85rem; color: #475569;
}

/* 手机端 */
@media (max-width: 600px) {
  .photo-gallery-wrap { padding: 1rem; margin-top: 1rem; }

  .photo-gallery-header { margin-bottom: 0.8rem; }

  .photo-gallery-title { font-size: 0.85rem; }

  .photo-gallery-count { font-size: 0.68rem; padding: 2px 8px; }

  .photo-gallery-count .num { font-size: 0.76rem; }
}

/* ===== 学员风采（用户端）样式 ===== */
#tab-photos { animation: regFadeIn 0.3s ease; }

.photos-wrap {
  background: #fff; border-radius: 18px; padding: 1.5rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
}

#tab-photos .photo-gallery {
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

#tab-photos .photo-card {
  border-radius: 14px; overflow: hidden;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  border: 1px solid #f0f0f0;
  transition: all .25s;
  background: #fff;
}

#tab-photos .photo-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0,0,0,0.1);
}

#tab-photos .photo-card-inner { position: relative; overflow: hidden; }

#tab-photos .photo-card-inner img {
  width: 100%; height: 200px; object-fit: cover;
  display: block; transition: transform .3s;
}

#tab-photos .photo-card:hover .photo-card-inner img { transform: scale(1.08); }

#tab-photos .photo-card-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.3);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transition: opacity .25s;
}

#tab-photos .photo-card:hover .photo-card-overlay { opacity: 1; }

.photo-card-view {
  padding: 6px 20px; border-radius: 20px;
  background: rgba(255,255,255,0.9);
  color: #1e293b; font-size: 0.85rem; font-weight: 600;
  backdrop-filter: blur(4px);
}

#tab-photos .photo-card-caption {
  padding: 0.7rem 1rem;
  font-size: 0.85rem; color: #475569;
  text-align: center;
}

.my-mat-item,
.photo-card { box-shadow: 0 10px 28px rgba(15, 23, 42, 0.07); }

.my-mat-item:hover {
  transform: translateY(-2px);
  box-shadow: 0 16px 38px rgba(15, 23, 42, 0.1);
}

.my-mat-item { transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease; }

.photos-wrap,
.photo-gallery-wrap,
.photo-card-upload { margin-top: 0 !important; }

.photos-wrap,
.photo-gallery-wrap { margin-top: 0 !important; }

.photos-wrap,
.photo-gallery-wrap { margin-bottom: 0.42rem !important; }

@media (max-width: 768px) {
  .photos-wrap,
  .photo-gallery-wrap { margin-bottom: 0.32rem !important; }
}

/* ===== User dashboard four tabs tighter spacing ===== */
#tab-my-materials { --user-tab-gap: 0.28rem; }

#tab-my-materials .user-page-hero {
  min-height: 118px !important;
  margin: 0 0 var(--user-tab-gap) !important;
  padding: 1rem 1.2rem !important;
  border-radius: 18px !important;
}

#tab-my-materials .user-page-eyebrow {
  margin-bottom: 0.3rem !important;
  padding: 0.2rem 0.52rem !important;
}

#tab-my-materials .user-page-hero h2 {
  margin: 0 !important;
  line-height: 1.28 !important;
}

#tab-my-materials .user-page-hero p {
  margin-top: 0.22rem !important;
  line-height: 1.5 !important;
}

#tab-my-materials .user-page-hero-mark {
  width: 86px !important;
  height: 86px !important;
  padding: 0.72rem !important;
  border-radius: 20px !important;
}

#tab-my-materials .user-page-notes {
  margin: 0 0 var(--user-tab-gap) !important;
  gap: 0.38rem !important;
}

#tab-my-materials .user-page-note {
  padding: 0.58rem 0.7rem !important;
  border-radius: 13px !important;
}

#tab-my-materials .materials-panel {
  margin-top: 0 !important;
  margin-bottom: var(--user-tab-gap) !important;
  border-radius: 16px !important;
}

#tab-my-materials .materials-panel-head { padding: 0.68rem 0.9rem !important; }

#tab-my-materials #my-materials-list { padding: 0.62rem 0.72rem !important; }

#tab-my-materials .my-mat-item {
  margin-bottom: 0.42rem !important;
  padding-top: 0.72rem !important;
  padding-bottom: 0.72rem !important;
}

@media (max-width: 768px) {
  #tab-my-materials { --user-tab-gap: 0.22rem; }

  #tab-my-materials .user-page-hero {
    min-height: 96px !important;
    padding: 0.68rem 0.75rem !important;
    border-radius: 15px !important;
  }

  #tab-my-materials .user-page-hero h2 { font-size: 1rem !important; }

  #tab-my-materials .user-page-hero p { font-size: 0.75rem !important; }

  #tab-my-materials .user-page-hero-mark {
    width: 58px !important;
    height: 58px !important;
    padding: 0.42rem !important;
    border-radius: 15px !important;
  }

  #tab-my-materials .user-page-hero-mark span { display: none !important; }

  #tab-my-materials .user-page-hero-mark strong { font-size: 1rem !important; }

  #tab-my-materials .user-page-note {
    padding: 0.48rem 0.58rem !important;
    min-height: auto !important;
  }

  #tab-my-materials .materials-panel-head { padding: 0.55rem 0.68rem !important; }

  #tab-my-materials #my-materials-list { padding: 0.5rem 0.55rem !important; }

  #tab-my-materials .my-mat-item {
    margin-bottom: 0.32rem !important;
    padding-top: 0.58rem !important;
    padding-bottom: 0.58rem !important;
  }
}

@media (max-width: 768px) {
  #tab-my-materials #my-materials-list { padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)) !important; }

  #tab-my-materials .my-mat-item:last-child { margin-bottom: 0.85rem !important; }
}
