.admin-nav .nav-spacer {
  flex: 1;
}

.admin-login {
  padding: 88px 0;
  background: var(--bg-alt);
  min-height: calc(100vh - var(--nav-h));
}

.login-card {
  max-width: 420px;
  margin: 0 auto;
  padding: 34px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  text-align: center;
}

.login-card h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.login-card p {
  margin: 10px 0 22px;
  font-size: 15px;
  color: var(--text-muted);
}

.admin-main {
  padding: 40px 0 72px;
  background: var(--bg-alt);
  min-height: calc(100vh - var(--nav-h));
}

.admin-toolbar {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.toolbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  min-width: 260px;
}

.btn {
  height: 38px;
  padding: 0 18px;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid var(--line);
  border-radius: 980px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  transition: background 0.2s var(--ease), opacity 0.2s var(--ease);
}

.btn:hover {
  background: #ececed;
}

.btn-primary {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: #0077ed;
}

.btn-danger {
  color: #d70015;
}

.btn-sm {
  height: 30px;
  padding: 0 12px;
  font-size: 13px;
}

input,
select,
textarea {
  height: 38px;
  padding: 0 12px;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  width: 100%;
  transition: border-color 0.2s var(--ease);
}

textarea {
  height: auto;
  padding: 10px 12px;
  line-height: 1.55;
  resize: vertical;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--blue);
}

input[type='search'] {
  max-width: 260px;
}

.table-wrap {
  background: #fff;
  border-radius: var(--radius);
  overflow-x: auto;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  min-width: 720px;
}

.admin-table th,
.admin-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid #f0f0f2;
  vertical-align: middle;
}

.admin-table th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 13px;
  background: #fafafa;
  position: sticky;
  top: 0;
}

.admin-table tbody tr:last-child td {
  border-bottom: none;
}

.admin-table .thumb {
  width: 54px;
  height: 54px;
  border-radius: 10px;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f2 100%);
  object-fit: contain;
  display: block;
}

.admin-table .name {
  font-weight: 600;
}

.admin-table .muted {
  color: var(--text-muted);
}

.col-img {
  width: 72px;
}

.col-num {
  width: 72px;
}

.col-act {
  width: 190px;
  white-space: nowrap;
}

.status-pill {
  display: inline-block;
  padding: 3px 9px;
  font-size: 12px;
  border-radius: 980px;
  background: #eaf5ea;
  color: #1d7a33;
}

.status-pill.draft {
  background: #f2f2f4;
  color: #6e6e73;
}

.tabs {
  display: flex;
  gap: 6px;
  padding: 5px;
  margin-bottom: 20px;
  background: rgba(0, 0, 0, 0.05);
  border-radius: 980px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
}

.tab {
  border: none;
  background: transparent;
  font-family: inherit;
  font-size: 15px;
  color: var(--text);
  padding: 8px 20px;
  border-radius: 980px;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.25s var(--ease);
}

.tab.on {
  background: #fff;
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.swatch-dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid rgba(0, 0, 0, 0.12);
  vertical-align: -1px;
}

.status-select {
  height: 30px;
  padding: 0 6px;
  font-size: 13px;
  border-radius: 8px;
}

.form-tip {
  margin: 10px 0 0;
  font-size: 13px;
  color: var(--text-muted);
  min-height: 18px;
}

.form-tip.error {
  color: #d70015;
}

.form-tip.ok {
  color: #1d7a33;
}

/* ---------- 弹层 ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.4);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 40px 16px;
  overflow-y: auto;
}

.modal-panel {
  width: 100%;
  max-width: 640px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.24);
}

.modal-sm {
  max-width: 420px;
}

.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid #f0f0f2;
}

.modal-head h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.modal-close {
  border: none;
  background: rgba(0, 0, 0, 0.06);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  cursor: pointer;
  color: var(--text-muted);
  font-size: 13px;
  line-height: 1;
}

.modal-body {
  padding: 20px 24px;
}

.modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 24px 20px;
  border-top: 1px solid #f0f0f2;
}

.modal-foot .form-tip {
  margin: 0;
  flex: 1;
  text-align: left;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  margin-bottom: 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0 14px;
}

.img-row {
  display: flex;
  gap: 10px;
}

.img-row select {
  max-width: 220px;
}

.img-upload {
  align-items: center;
  margin-top: 10px;
}

#f-file {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.upload-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 34px;
  padding: 0 16px;
  white-space: nowrap;
  cursor: pointer;
  border: 1px solid var(--blue);
  background: #fff;
  color: var(--blue);
}

.upload-btn:hover {
  background: #f0f7ff;
}

.upload-btn.busy {
  opacity: 0.6;
  pointer-events: none;
}

.upload-hint {
  font-size: 12px;
  color: var(--text-muted);
  line-height: 1.4;
}

.img-preview {
  margin-top: 10px;
  height: 150px;
  border-radius: 12px;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.img-preview img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: none;
}

/* ---------- 定制欣赏独立页 ---------- */
.ga-head {
  display: flex;
  align-items: flex-end;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 22px;
}

.ga-head h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 600;
  letter-spacing: -0.015em;
}

.ga-head p {
  margin: 8px 0 0;
  font-size: 14px;
  color: var(--text-muted);
}

.ga-head .btn {
  margin-left: auto;
}

.gt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 8px;
}

.gt-tags i {
  font-style: normal;
  font-size: 11px;
  color: var(--blue);
  background: rgba(0, 113, 227, 0.1);
  border-radius: 980px;
  padding: 2px 8px;
}

.ge-desc {
  margin-top: 8px;
  font-family: inherit;
}

/* ---------- 定制欣赏：类型卡片 + 批量编辑 ---------- */
.muted {
  color: var(--text-muted);
}

.gallery-types {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 14px;
}

.gt-card {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: #fff;
  border: 1px solid transparent;
  border-radius: var(--radius);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
  cursor: pointer;
  text-align: left;
  font-family: inherit;
  color: var(--text);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s var(--ease);
}

.gt-card:hover {
  transform: translateY(-3px);
  border-color: rgba(0, 113, 227, 0.35);
  box-shadow: 0 14px 32px rgba(0, 0, 0, 0.09);
}

.gt-covers {
  flex: none;
  width: 96px;
  height: 96px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: 3px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--bg-alt);
}

.gt-covers .gt-shot:first-child:nth-last-child(1) {
  grid-column: span 2;
  grid-row: span 2;
}

.gt-shot {
  overflow: hidden;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f2 100%);
}

.gt-shot img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.gt-shot.is-empty {
  grid-column: span 2;
  grid-row: span 2;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: var(--text-muted);
}

.gt-info {
  flex: 1;
  min-width: 0;
}

.gt-info strong {
  display: block;
  font-size: 17px;
  font-weight: 600;
}

.gt-info em {
  display: block;
  margin-top: 4px;
  font-style: normal;
  font-size: 13px;
  color: var(--text-muted);
}

.gt-go {
  flex: none;
  font-size: 14px;
  font-weight: 600;
  color: var(--blue);
}

.modal-lg {
  max-width: 880px;
}

.ge-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}

.ge-bar .ge-pick {
  max-width: 240px;
  height: 34px;
  font-size: 14px;
}

#g-files {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.ge-empty {
  padding: 34px 10px;
  text-align: center;
  font-size: 14px;
}

.ge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(196px, 1fr));
  gap: 12px;
  margin-top: 10px;
  max-height: 58vh;
  overflow-y: auto;
  padding-right: 4px;
}

.ge-card {
  background: var(--bg-alt);
  border-radius: 14px;
  padding: 10px;
}

.ge-thumb {
  height: 108px;
  border-radius: 10px;
  overflow: hidden;
  background: linear-gradient(180deg, #fafafa 0%, #f0f0f2 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.ge-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.ge-card input,
.ge-card select {
  height: 32px;
  font-size: 13px;
  padding: 0 10px;
  border-radius: 8px;
}

.ge-card textarea {
  height: auto;
  min-height: 54px;
  font-size: 13px;
  padding: 6px 10px;
  border-radius: 8px;
  line-height: 1.5;
  resize: vertical;
}

.ge-card .ge-title {
  margin-top: 10px;
}

.ge-row {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.ge-row .ge-sort {
  width: 74px;
  flex: none;
}

.ge-row select {
  flex: 1;
}

.ge-row .btn {
  flex: none;
}

@media (max-width: 734px) {
  .gallery-types {
    grid-template-columns: 1fr;
  }
  .ge-grid {
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  }
}
@media (max-width: 734px) {
  .admin-login {
    padding: 48px 0;
  }
  .grid-2 {
    grid-template-columns: 1fr;
  }
  .img-row {
    flex-direction: column;
  }
  .img-row select {
    max-width: none;
  }
  .col-hide {
    display: none;
  }
  input[type='search'] {
    max-width: none;
  }
}
