/* ==========================================================================
   青衿纪念册 · 后台样式
   ========================================================================== */

.cm-page--admin { color: #fff; }

.shell {
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  min-height: 100vh;
}

/* ---------------------------------------------------------- 侧边栏 */
.side {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px;
  background: rgba(6, 22, 26, .58);
  backdrop-filter: blur(20px) saturate(1.3);
  border-right: 1px solid rgba(255, 255, 255, .12);
  z-index: 30;
}

.side__brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 14px; border-bottom: 1px solid rgba(255, 255, 255, .1); }
.side__logo {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  font-weight: 800; font-size: 19px; color: #06302c;
  background: linear-gradient(140deg, #a8f7ea, #ffe0ee);
  box-shadow: 0 12px 26px -14px rgba(0, 0, 0, .9);
}
.side__names { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.side__names b { font-size: 15px; }
.side__names i { font-size: 11.5px; font-style: normal; opacity: .65; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side__nav { display: flex; flex-direction: column; gap: 4px; flex: 1 1 auto; overflow-y: auto; }
.side__link {
  position: relative;
  display: flex; align-items: center; gap: 11px;
  padding: 11px 13px;
  border-radius: 14px;
  font-size: 14.5px;
  color: rgba(255, 255, 255, .82);
  transition: background .3s ease, color .3s ease, transform .35s var(--ease);
}
.side__link:hover { background: rgba(255, 255, 255, .1); color: #fff; transform: translateX(3px); }
.side__link.is-active {
  color: #052e2b;
  background: linear-gradient(120deg, #a8f7ea, #d9fbff 60%, #ffe6f2);
  box-shadow: 0 16px 30px -18px rgba(0, 0, 0, .95);
  font-weight: 700;
}
.side__icon { font-size: 16px; }
.side__badge { margin-left: auto; font-size: 10.5px; font-style: normal; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.side__link.is-active .side__badge { background: rgba(5, 46, 43, .12); }

.side__foot { border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 14px; display: grid; gap: 10px; }
.side__me { display: flex; align-items: center; gap: 10px; font-size: 13.5px; }
.side__me b { display: block; }
.side__me i { font-style: normal; font-size: 11.5px; opacity: .68; }
.avatar--admin { background: linear-gradient(140deg, #ffe6a8, #ffc247); color: #4a3200; }
.avatar--super { background: linear-gradient(140deg, #ffe9a8, #ffb020); color: #4a3200; }

.side__links { display: flex; gap: 8px; font-size: 12.5px; }
.side__links a { flex: 1 1 auto; text-align: center; padding: 8px; border-radius: 10px; background: rgba(255, 255, 255, .1); transition: background .3s ease; }
.side__links a:hover { background: rgba(255, 255, 255, .2); }

/* ---------------------------------------------------------- 主区域 */
.main { display: flex; flex-direction: column; min-width: 0; }

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px clamp(16px, 3vw, 36px) 14px;
  background: linear-gradient(180deg, rgba(6, 22, 26, .72), rgba(6, 22, 26, 0));
  backdrop-filter: blur(10px);
}
.topbar__titles h1 { font-size: clamp(19px, 2.4vw, 25px); letter-spacing: -.01em; }
.topbar__titles p { font-size: 13px; opacity: .74; margin-top: 3px; }
.topbar__actions { margin-left: auto; display: flex; gap: 8px; }
.topbar__burger {
  display: none;
  width: 40px; height: 40px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .12);
  color: #fff; font-size: 17px; cursor: pointer;
}

.content { padding: 6px clamp(16px, 3vw, 36px) 40px; display: grid; gap: 18px; align-content: start; }

.panel {
  background: rgba(255, 255, 255, .09);
  border: 1px solid rgba(255, 255, 255, .17);
  border-radius: 22px;
  padding: clamp(18px, 2.2vw, 26px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 50px -40px rgba(0, 0, 0, .95);
}
.panel--soft { background: rgba(255, 255, 255, .06); }
.panel--side { height: fit-content; }
.panel--hero { background: linear-gradient(120deg, rgba(255, 255, 255, .16), rgba(255, 255, 255, .06)); }

.panel__head { margin-bottom: 16px; }
.panel__head--row { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.panel__head h2 { font-size: 17px; display: flex; align-items: center; gap: 9px; }
.panel__head p { font-size: 12.5px; opacity: .72; margin-top: 4px; }

.pill {
  font-size: 11.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .18);
}

.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 18px; }
.cols--2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.cols--bg { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); align-items: start; }
.cols--msg { grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); align-items: start; }

@media (max-width: 1000px) {
  .cols--bg { grid-template-columns: minmax(0, 1fr); }
}

/* ---------------------------------------------------------- 概览卡片 */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; }
/* 9 个数据卡时排成整齐的 3 列（3×3），避免最后一行孤零零 */
@media (min-width: 1180px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (min-width: 1560px) {
  .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.statcard {
  position: relative;
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .09);
  overflow: hidden;
  transition: transform .5s var(--ease), box-shadow .5s var(--ease);
}
.statcard:hover { transform: translateY(-5px); box-shadow: 0 26px 44px -30px rgba(0, 0, 0, .95); }
.statcard::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 120px; height: 120px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .3), transparent 62%);
  opacity: .5;
}
.statcard__icon { font-size: 20px; }
.statcard__value { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.statcard__value i { font-size: 13px; font-weight: 600; font-style: normal; margin-left: 4px; opacity: .75; }
.statcard__label { font-size: 12.5px; opacity: .78; }
.statcard--mint { background: linear-gradient(140deg, rgba(125, 255, 216, .26), rgba(255, 255, 255, .06)); }
.statcard--violet { background: linear-gradient(140deg, rgba(160, 145, 255, .3), rgba(255, 255, 255, .06)); }
.statcard--pink { background: linear-gradient(140deg, rgba(255, 150, 190, .3), rgba(255, 255, 255, .06)); }
.statcard--amber { background: linear-gradient(140deg, rgba(255, 205, 110, .3), rgba(255, 255, 255, .06)); }

/* ---------------------------------------------------------- 列表 / 键值 */
.kv { display: grid; gap: 8px; margin-bottom: 14px; }
.kv li { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .07); }
.kv li span { opacity: .72; }
.kv li b { font-weight: 700; }

.steps { display: grid; gap: 12px; }
.steps li { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 14px; padding: 14px 16px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.steps b { font-size: 14.5px; white-space: nowrap; }
.steps span { font-size: 12.8px; opacity: .78; }
@media (max-width: 700px) { .steps li { grid-template-columns: 1fr; } }

.logs { display: grid; gap: 6px; }
.logs li { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; font-size: 12.8px; padding: 9px 12px; border-radius: 12px; background: rgba(255, 255, 255, .06); }
.logs b { font-size: 12.5px; }
.logs span { opacity: .74; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.logs i { font-style: normal; opacity: .55; font-size: 11.5px; white-space: nowrap; }

.hint { font-size: 12.5px; opacity: .74; margin: 10px 0; }
.tips { display: grid; gap: 7px; font-size: 12.8px; opacity: .82; padding-left: 2px; }
.tips li { padding-left: 18px; position: relative; }
.tips li::before { content: "•"; position: absolute; left: 4px; opacity: .6; }
.tips code { background: rgba(255, 255, 255, .16); padding: 1px 5px; border-radius: 5px; font-size: 12px; }

.empty { padding: 34px 20px; text-align: center; border-radius: 18px; border: 1px dashed rgba(255, 255, 255, .26); font-size: 13.5px; opacity: .8; }
.empty--sm { padding: 18px; font-size: 12.5px; }

/* ---------------------------------------------------------- 背景当前状态 */
.bgnow { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.bgnow__item { display: grid; gap: 7px; }
.bgnow__thumb {
  position: relative;
  padding-top: 62%;
  border-radius: 14px;
  background-size: cover;
  background-position: center;
  background-color: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .2);
  overflow: hidden;
}
.bgnow__tag { position: absolute; left: 8px; bottom: 8px; font-size: 10.5px; padding: 2px 7px; border-radius: 6px; background: rgba(0, 0, 0, .6); }
.bgnow__item figcaption b { display: block; font-size: 12.5px; }
.bgnow__item figcaption span { font-size: 11.5px; opacity: .68; }
@media (max-width: 620px) { .bgnow { grid-template-columns: 1fr 1fr; } }

/* ---------------------------------------------------------- 背景设置页 */
.bgtabs { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px; }
.bgtab {
  display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto;
  gap: 2px 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  transition: transform .45s var(--ease), background .35s ease, border-color .35s ease;
}
.bgtab:hover { transform: translateY(-4px); background: rgba(255, 255, 255, .13); }
.bgtab span { grid-row: 1 / span 2; font-size: 22px; align-self: center; }
.bgtab b { font-size: 14.5px; }
.bgtab i { font-style: normal; font-size: 12px; opacity: .7; }
.bgtab.is-active { border-color: rgba(168, 247, 234, .8); background: linear-gradient(120deg, rgba(168, 247, 234, .24), rgba(255, 255, 255, .08)); }

.form { display: grid; gap: 16px; }
.form__row { display: grid; gap: 8px; }
.form__row--grid { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; }
.form__row--grid3 { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.form__row--checks { display: flex; gap: 18px; flex-wrap: wrap; }
.form__actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.form__meta { font-size: 12px; opacity: .62; }

.lbl { font-size: 13px; font-weight: 600; opacity: .9; display: flex; align-items: center; gap: 8px; }
.lbl output { font-weight: 700; color: #a8f7ea; }

.input {
  width: 100%;
  padding: 11px 14px;
  font-size: 14px;
  font-family: inherit;
  color: #fff;
  background: rgba(255, 255, 255, .1);
  border: 1.5px solid rgba(255, 255, 255, .2);
  border-radius: 13px;
  outline: none;
  transition: border-color .3s ease, background .3s ease, box-shadow .3s ease;
}
.input::placeholder { color: rgba(255, 255, 255, .42); }
.input:focus { border-color: rgba(168, 247, 234, .85); background: rgba(255, 255, 255, .16); box-shadow: 0 0 0 4px rgba(168, 247, 234, .14); }
.input--sm { padding: 7px 11px; font-size: 13px; border-radius: 10px; }
.input--search { width: 200px; }
.input--color { padding: 4px; height: 44px; cursor: pointer; }
.textarea { min-height: 150px; line-height: 1.85; resize: vertical; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, rgba(255,255,255,.7) 50%), linear-gradient(135deg, rgba(255,255,255,.7) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
select.input option { color: #0d2b2a; }

input[type="range"] { width: 100%; accent-color: #7dffd8; }
.form small { font-size: 11.5px; opacity: .6; }

.field-inline { display: grid; gap: 6px; font-size: 12.5px; }
.field-inline > span { opacity: .78; }
.field-inline--wide { grid-column: 1 / -1; }
.inline-form { display: inline-flex; align-items: center; }

.switch { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch span {
  width: 42px; height: 24px; border-radius: 999px; position: relative;
  background: rgba(255, 255, 255, .22); transition: background .3s ease;
  flex: 0 0 auto;
}
.switch span::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff;
  transition: transform .32s var(--ease);
}
.switch input:checked + span { background: linear-gradient(120deg, #7dffd8, #4fd1c5); }
.switch input:checked + span::after { transform: translateX(18px); }

/* ---------------------------------------------------------- 素材选择器 */
.picker { display: grid; gap: 10px; }
.picker__title { font-size: 12.5px; opacity: .72; }
.picker__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(124px, 1fr)); gap: 10px; }
.picker__item {
  position: relative;
  padding: 0; border: 1.5px solid rgba(255, 255, 255, .18);
  border-radius: 14px; overflow: hidden; cursor: pointer;
  background: rgba(255, 255, 255, .08);
  transition: transform .4s var(--ease), border-color .3s ease, box-shadow .4s var(--ease);
}
.picker__item img { width: 100%; height: 78px; object-fit: cover; display: block; }
.picker__item em { display: block; font-style: normal; font-size: 11px; padding: 6px 8px; text-align: left; opacity: .82; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.picker__item:hover { transform: translateY(-3px); border-color: rgba(255, 255, 255, .5); }
.picker__item.is-active { border-color: #7dffd8; box-shadow: 0 0 0 3px rgba(125, 255, 216, .28); }
.picker__item.is-active::after { content: "✓"; position: absolute; top: 6px; right: 6px; width: 20px; height: 20px; border-radius: 50%; background: #7dffd8; color: #06302c; font-size: 12px; display: grid; place-items: center; font-weight: 800; }
.picker__video { display: grid; place-items: center; height: 78px; font-size: 22px; background: linear-gradient(140deg, rgba(124, 108, 246, .55), rgba(18, 194, 180, .45)); }

.dropzone {
  display: grid; place-items: center; gap: 4px;
  padding: 22px;
  text-align: center;
  border: 2px dashed rgba(255, 255, 255, .3);
  border-radius: 16px;
  cursor: pointer;
  background: rgba(255, 255, 255, .05);
  transition: border-color .3s ease, background .3s ease, transform .3s var(--ease);
}
.dropzone:hover, .dropzone.is-over { border-color: #7dffd8; background: rgba(125, 255, 216, .12); transform: translateY(-2px); }
.dropzone input[type="file"] { display: none; }
.dropzone__icon { font-size: 24px; }
.dropzone b { font-size: 13.5px; }
.dropzone i { font-style: normal; font-size: 11.5px; opacity: .62; }
.dropzone--big { padding: 34px; }

.segmented { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: rgba(255, 255, 255, .1); }
.segmented label { cursor: pointer; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span { display: block; padding: 7px 15px; border-radius: 999px; font-size: 13px; transition: background .3s ease, color .3s ease; }
.segmented input:checked + span { background: linear-gradient(120deg, #a8f7ea, #d9fbff); color: #052e2b; font-weight: 700; }
.segmented--sm span { padding: 6px 12px; font-size: 12.5px; }

/* ---------------------------------------------------------- 预览 */
.preview {
  position: relative;
  border-radius: 18px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  border: 1px solid rgba(255, 255, 255, .2);
  background: linear-gradient(150deg, #0d4f4a, #123a52 45%, #2b2350);
}
.preview__media, .preview__video { position: absolute; inset: 0; background-size: cover; background-position: center; transition: filter .3s ease; }
.preview__video { width: 100%; height: 100%; object-fit: cover; }
.preview__overlay { position: absolute; inset: 0; background: rgba(8, 20, 28, var(--preview-overlay, .5)); }
.preview__ui { position: absolute; inset: auto 0 0 0; padding: 20px; display: grid; gap: 4px; }
.preview__ui b { font-size: 20px; }
.preview__ui span { font-size: 12.5px; opacity: .85; }

/* ---------------------------------------------------------- 上传进度 */
.uploader { display: grid; gap: 14px; }
.uploader__row { display: flex; gap: 14px; align-items: flex-end; flex-wrap: wrap; }
.uploader__row .field-inline { min-width: 170px; }
.progress { position: relative; height: 10px; border-radius: 999px; background: rgba(255, 255, 255, .14); overflow: hidden; }
.progress__bar { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #7dffd8, #ffd6e8); transition: width .25s ease; }
.progress span { position: absolute; right: 10px; top: -22px; font-size: 12px; }
.uploadlog { display: grid; gap: 6px; font-size: 12.5px; }
.uploadlog li { padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .08); display: flex; justify-content: space-between; gap: 10px; }
.uploadlog li.is-error { background: rgba(255, 100, 120, .18); }

/* ---------------------------------------------------------- 深色后台的基础组件修正
   base.css 里 .btn--soft / .checkbox 是给浅色卡片设计的（深色文字），
   在深色后台上几乎看不见，这里统一改成浅色。 */
.cm-page--admin .btn--soft {
  color: rgba(255, 255, 255, .88);
  background: rgba(255, 255, 255, .12);
  border: 1px solid rgba(255, 255, 255, .16);
}
.cm-page--admin .btn--soft:hover { background: rgba(255, 255, 255, .2); color: #fff; }
.cm-page--admin .checkbox { color: rgba(255, 255, 255, .8); }
.cm-page--admin .filter label { color: rgba(255, 255, 255, .82); }

/* ---------------------------------------------------------- 媒体网格 */
.bulkbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; padding: 10px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
/* 批量操作条里的下拉框不要被 .input 的 width:100% 撑满 */
.bulkbar .input,
.bulkbar select { flex: 0 0 auto; width: auto; min-width: 150px; }
.bulkbar .checkbox { flex: 0 0 auto; }
.bulkbar .btn { flex: 0 0 auto; }

/* 列表头部的筛选区：允许换行、避免搜索按钮被挤出容器 */
.filters { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; max-width: 100%; }
.filters .segmented { flex: 0 0 auto; }
.filters .input--search { flex: 1 1 160px; width: auto; min-width: 140px; }
.filters .btn { flex: 0 0 auto; }

.media { display: grid; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); gap: 14px; }
.media__item { position: relative; border-radius: 16px; overflow: hidden; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); transition: transform .45s var(--ease), border-color .3s ease; }
.media__item:hover { transform: translateY(-4px); border-color: rgba(255, 255, 255, .4); }
.media__item.is-hidden-item { opacity: .55; }
.media__check { position: absolute; top: 9px; left: 9px; z-index: 2; }
.media__check input { width: 18px; height: 18px; accent-color: #7dffd8; }
.media__thumb { padding-top: 64%; background-size: cover; background-position: center; position: relative; background-color: rgba(0, 0, 0, .25); }
.media__badge { position: absolute; left: 8px; bottom: 8px; font-size: 10.5px; padding: 2px 8px; border-radius: 6px; background: rgba(0, 0, 0, .62); }
.media__badge--video { background: rgba(124, 108, 246, .8); }
.media__badge--bg { left: auto; right: 8px; top: 8px; bottom: auto; background: rgba(18, 194, 180, .85); }
.media__badge--star { left: 8px; top: 8px; bottom: auto; background: linear-gradient(120deg, #ffe6a8, #ffc247); color: #4a3200; font-weight: 700; }
.media__body { padding: 10px 12px 12px; display: grid; gap: 8px; }
.media__meta { display: flex; flex-wrap: wrap; gap: 8px; font-size: 11.5px; opacity: .68; }
.media__ops { display: flex; gap: 6px; flex-wrap: wrap; }
.media__warn { font-size: 11px; padding: 6px 12px 0; color: #ffd9a0; }

.editpanel { margin: 4px 0 18px; padding: 16px; border-radius: 16px; background: rgba(255, 255, 255, .08); border: 1px dashed rgba(255, 255, 255, .28); }
.editpanel__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 12px; align-items: end; }

.pager { display: flex; gap: 6px; justify-content: center; margin-top: 20px; flex-wrap: wrap; }
.pager a { min-width: 36px; text-align: center; padding: 7px 10px; border-radius: 10px; background: rgba(255, 255, 255, .1); font-size: 13px; }
.pager a.is-active { background: linear-gradient(120deg, #a8f7ea, #d9fbff); color: #052e2b; font-weight: 700; }

/* ---------------------------------------------------------- 寄语列表 */
.msglist { display: grid; gap: 10px; }
.msglist li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: start; padding: 13px 14px; border-radius: 14px; background: rgba(255, 255, 255, .07); }
.msglist li.is-off { opacity: .55; }
.msglist__idx { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, .16); }
.msglist__body b { font-size: 13.5px; display: flex; align-items: center; gap: 8px; }
.msglist__body p { font-size: 12.5px; opacity: .8; margin: 5px 0; line-height: 1.7; }
.msglist__body span { font-size: 11.5px; opacity: .6; }
.msglist__ops { display: flex; gap: 4px; flex-wrap: wrap; }
.msglist__ops form { display: inline; }

.iconbtn {
  width: 30px; height: 30px; border-radius: 9px;
  display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .2);
  background: rgba(255, 255, 255, .1);
  color: #fff; font-size: 13px; cursor: pointer;
  transition: background .25s ease, transform .3s var(--ease);
}
.iconbtn:hover { background: rgba(255, 255, 255, .22); transform: translateY(-2px); }
.iconbtn[disabled] { opacity: .35; pointer-events: none; }
.iconbtn--danger:hover { background: rgba(255, 90, 110, .5); }

/* ---------------------------------------------------------- 账号 */
.supercard { display: grid; grid-template-columns: auto 1fr; gap: 16px; align-items: start; }
.supercard__icon { font-size: 32px; }
.supercard b { font-size: 15.5px; }
.supercard p { font-size: 13px; opacity: .8; margin-top: 6px; line-height: 1.8; }
.supercard__meta { grid-column: 1 / -1; display: flex; gap: 18px; flex-wrap: wrap; font-size: 12.5px; opacity: .78; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, .12); }

.userlist { display: grid; gap: 12px; }
.userlist__item { padding: 13px 14px; border-radius: 16px; background: rgba(255, 255, 255, .07); }
.userlist__head { display: flex; align-items: center; gap: 13px; }
.userlist__head > div { min-width: 0; flex: 1 1 auto; }
.userlist__head b { display: flex; align-items: center; gap: 8px; font-size: 14px; flex-wrap: wrap; }
.userlist__head span { display: block; font-size: 12px; opacity: .74; }
.userlist__meta { opacity: .55 !important; font-size: 11.5px !important; }

.tag { font-size: 10.5px; font-style: normal; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: rgba(255, 255, 255, .18); }
.tag--gold { background: linear-gradient(120deg, #ffe6a8, #ffc247); color: #4a3200; }
.tag--gray { background: rgba(255, 255, 255, .16); color: rgba(255, 255, 255, .8); }

.statrows { display: grid; gap: 8px; }
.statrow { display: grid; grid-template-columns: 110px 90px 1fr; gap: 8px; }

.backuplist { display: grid; gap: 7px; font-size: 12.5px; }
.backuplist li { display: flex; justify-content: space-between; gap: 10px; padding: 8px 12px; border-radius: 10px; background: rgba(255, 255, 255, .07); }
.backuplist span { opacity: .68; }

.avatar-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.avatar-row__img { width: 62px; height: 62px; border-radius: 50%; object-fit: cover; border: 2px solid rgba(255, 255, 255, .5); }

.admin-foot { padding: 18px clamp(16px, 3vw, 36px) 26px; font-size: 11.5px; opacity: .55; }

/* ---------------------------------------------------------- 后台登录补充 */
.cm-page--adminlogin .login-wrap--admin { grid-template-columns: minmax(0, 460px); justify-content: center; }
.login-logo--admin { background: linear-gradient(140deg, #ffd98a, #ff8fb1); }
.adminlogin__tips { margin-top: 20px; padding-top: 16px; border-top: 1px dashed rgba(13, 43, 42, .16); font-size: 12.5px; color: var(--ink-2); }
.adminlogin__tips b { display: block; margin-bottom: 7px; color: var(--ink); }
.adminlogin__tips ul { display: grid; gap: 5px; padding-left: 4px; list-style: none; }
.adminlogin__tips li { padding-left: 16px; position: relative; }
.adminlogin__tips li::before { content: "•"; position: absolute; left: 3px; color: var(--c-primary); }
.adminlogin__tips u { text-decoration: none; font-weight: 700; color: color-mix(in srgb, var(--c-primary) 80%, black); }

/* ---------------------------------------------------------- 移动端 */
@media (max-width: 900px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side {
    position: fixed;
    left: 0; top: 0; bottom: 0;
    width: 262px;
    height: 100vh;
    transform: translateX(-104%);
    transition: transform .45s var(--ease);
    z-index: 60;
  }
  .shell.is-open .side { transform: none; box-shadow: 40px 0 80px -40px rgba(0, 0, 0, .95); }
  .topbar__burger { display: grid; place-items: center; }
  .content { padding-bottom: 60px; }
  .statrow { grid-template-columns: 1fr 1fr; }
}

/* ---------------------------------------------------------- 留言墙管理 */
.walladmin { display: grid; gap: 12px; }
.walladmin__item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.walladmin__item:hover { background: rgba(255, 255, 255, .11); }
.walladmin__item.is-pending { border-color: rgba(255, 190, 110, .5); background: rgba(255, 190, 110, .1); }
.walladmin__check { padding-top: 4px; }
.walladmin__check input { width: 17px; height: 17px; accent-color: #7dffd8; }
.walladmin__body { min-width: 0; }
.walladmin__meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 11.5px; }
.walladmin__meta b { font-size: 13.5px; }
.walladmin__meta span { opacity: .55; }
.walladmin__text { font-size: 13.5px; line-height: 1.85; margin: 7px 0 0; color: rgba(255, 255, 255, .9); overflow-wrap: anywhere; }
.walladmin__reply { font-size: 12.5px; line-height: 1.8; margin-top: 8px; padding: 8px 12px; border-radius: 10px; background: rgba(125, 255, 216, .12); border-left: 3px solid #7dffd8; }
.walladmin__ops { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; align-items: center; }

.pill--warn { background: linear-gradient(120deg, #ffe6a8, #ffc247); color: #4a3200; border-color: transparent; }

/* ---------------------------------------------------------- 时间轴 / 同学录 */
.timeline-thumb {
  width: 96px; height: 62px; object-fit: cover;
  border-radius: 10px; border: 1px solid rgba(255, 255, 255, .3);
}
.member-dot {
  width: 38px; height: 38px;
  border-radius: 50%;
  overflow: hidden;
  display: grid; place-items: center;
  font-size: 15px; font-weight: 800;
  color: hsl(var(--hue, 170) 60% 22%);
  background: linear-gradient(140deg, hsl(var(--hue, 170) 78% 80%), hsl(calc(var(--hue, 170) + 50) 82% 86%));
}
.member-dot img { width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 640px) {
  .walladmin__item { grid-template-columns: auto minmax(0, 1fr); }
  .walladmin__check { grid-row: 1; }
  .walladmin__body { grid-column: 2; }
}

/* ---------------------------------------------------------- 访问统计 */
.pvhead { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: rgba(255, 255, 255, .66); }
.pvhead b { color: #a8f7ea; font-size: 14px; margin-left: 2px; }
.pvchart {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 128px;
  padding: 8px 4px 0;
  margin-top: 6px;
}
.pvchart__col {
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  height: 100%;
  gap: 6px;
}
.pvchart__bar {
  width: 100%;
  max-width: 26px;
  height: var(--h, 3%);
  border-radius: 6px 6px 3px 3px;
  background: linear-gradient(180deg, #7dffd8, #22d3b8 60%, rgba(34, 211, 184, .25));
  box-shadow: 0 0 18px -6px rgba(125, 255, 216, .8);
  transition: height .6s var(--ease);
  min-height: 3px;
}
.pvchart__col:hover .pvchart__bar { background: linear-gradient(180deg, #fff, #7dffd8); }
.pvchart__col em { font-style: normal; font-size: 9.5px; color: rgba(255, 255, 255, .38); white-space: nowrap; }
.pvtop { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pvtop li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: 11.5px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .12);
}
.pvtop li b { color: #a8f7ea; }

/* ---------------------------------------------------------- 导入：撤销条
   纯 CSS 自动收起：14 秒后淡出并塌陷，鼠标移上去会暂停（不用 JS） */
.panel--undo { padding: 0; background: transparent; border: 0; box-shadow: none; }
.undobar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(120deg, rgba(255, 122, 107, .18), rgba(255, 207, 122, .12));
  border: 1px solid rgba(255, 160, 140, .35);
  animation: undoAutoHide 14s ease forwards;
}
/* 鼠标停在上面就不收（CSS 就能做到，不依赖脚本） */
.undobar:hover,
.undobar:focus-within { animation-play-state: paused; }

@keyframes undoAutoHide {
  0%, 88% {
    opacity: 1;
    max-height: 140px;
    padding-top: 14px;
    padding-bottom: 14px;
    margin-bottom: 0;
    border-width: 1px;
  }
  100% {
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    margin-bottom: -16px;
    border-width: 0;
    visibility: hidden;
  }
}
.undobar__icon { font-size: 20px; }
.undobar__body { flex: 1 1 auto; display: grid; gap: 2px; min-width: 0; }
.undobar__body b { font-size: 13.5px; }
.undobar__body span { font-size: 11.5px; color: rgba(255, 255, 255, .62); }

/* 关闭按钮：一个普通表单提交，点了服务端记住「别再弹」 */
.undobar__closeform { margin: 0; }
.undobar__close {
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .66);
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.undobar__close:hover {
  background: rgba(255, 255, 255, .14);
  color: #fff;
  border-color: rgba(255, 255, 255, .32);
}

/* 倒计时细条 */
.undobar__timer {
  position: absolute;
  left: 0;
  bottom: 0;
  height: 2px;
  width: 100%;
  transform-origin: left center;
  background: linear-gradient(90deg, rgba(255, 122, 107, .9), rgba(255, 207, 122, .9));
  animation: undoCountdown 14s linear forwards;
}
.undobar:hover .undobar__timer { animation-play-state: paused; }
@keyframes undoCountdown {
  from { transform: scaleX(1); }
  to   { transform: scaleX(0); }
}

/* 常驻的小入口 */
.undochip { margin: 0 0 10px; }
.undochip .btn { font-size: 11.5px; }

@media (max-width: 640px) {
  .undobar { flex-wrap: wrap; gap: 10px; }
  .undobar__body { flex: 1 1 100%; order: 2; }
  .undobar__closeform { margin-left: auto; }
  .undobar form { order: 3; }
}

@media (prefers-reduced-motion: reduce) {
  /* 自动收起是「功能」不是装饰，不能因为关了动效就不收；
     只是把过渡做得更生硬一点，倒计时条改成静态刻度 */
  .undobar { animation-duration: 14s; animation-timing-function: steps(28, end); }
  .undobar__timer { animation-timing-function: steps(28, end); }
}

/* ---------------------------------------------------------- 导入：队列 */
.uq {
  display: grid;
  gap: 5px;
  margin-top: 12px;
  max-height: 260px;
  overflow-y: auto;
  padding-right: 4px;
}
.uq__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 12.5px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
}
.uq__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.uq__size { color: rgba(255, 255, 255, .55); font-variant-numeric: tabular-nums; }
.uq__note { grid-column: 1 / -1; font-size: 11.5px; color: rgba(255, 255, 255, .55); margin-top: -2px; }
.uq__del {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .16);
  background: rgba(255, 255, 255, .06);
  color: rgba(255, 255, 255, .7);
  font-size: 11px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
}
.uq__del:hover { background: rgba(255, 90, 90, .3); color: #fff; }

.uq__item.is-warn {
  background: rgba(255, 200, 80, .12);
  border-color: rgba(255, 200, 80, .4);
}
.uq__item.is-warn .uq__note { color: #ffd88a; }
.uq__item.is-blocked {
  background: rgba(255, 80, 80, .12);
  border-color: rgba(255, 100, 100, .45);
}
.uq__item.is-blocked .uq__name { text-decoration: line-through; opacity: .7; }
.uq__item.is-blocked .uq__note { color: #ff9d9d; }

.uhint {
  display: grid;
  gap: 4px;
  margin-top: 10px;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 12px;
  line-height: 1.7;
  color: #ffd88a;
  background: rgba(255, 200, 80, .1);
  border: 1px solid rgba(255, 200, 80, .3);
}

.progress__bar.is-error {
  background: linear-gradient(90deg, #ff7a6b, #ff4d6d);
}

.uploadlog li.is-ok b { color: #7dffd8; }
.uploadlog li.is-undo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(255, 255, 255, .05);
  border: 1px dashed rgba(255, 255, 255, .18);
}
.uploadlog li.is-undo span { font-size: 12px; }
.uploadlog li.is-undo b { display: none; }

/* 卡片按钮：2×2 网格，四颗按钮不会挤成一团换行 */
.media__ops {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 8px;
}
.media__ops .btn {
  width: 100%;
  justify-content: center;
  padding-left: 4px;
  padding-right: 4px;
}

/* ---------------------------------------------------------- 媒体卡片：标题可直接改 */
.media__title {
  transition: border-color .25s ease, background .25s ease, box-shadow .25s ease;
  cursor: text;
}
.media__title:hover {
  border-color: rgba(255, 255, 255, .34);
  background: rgba(255, 255, 255, .1);
}
.media__title:focus {
  border-color: rgba(125, 255, 216, .7);
  background: rgba(255, 255, 255, .14);
  outline: none;
  box-shadow: 0 0 0 3px rgba(125, 255, 216, .16);
}
.media__title.is-saving { opacity: .55; }
.media__title.is-saved {
  border-color: rgba(125, 255, 216, .85);
  box-shadow: 0 0 0 3px rgba(125, 255, 216, .22);
}
.media__title.is-error {
  border-color: rgba(255, 122, 107, .85);
  box-shadow: 0 0 0 3px rgba(255, 122, 107, .2);
}

/* ---------------------------------------------------------- 侧边栏：Bug 反馈 */
.side__bug {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 8px;
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px dashed rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .04);
  color: rgba(255, 255, 255, .68);
  font-size: 11.5px;
  font-family: inherit;
  text-decoration: none;
  cursor: pointer;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.side__bug:hover {
  background: rgba(255, 122, 107, .14);
  border-color: rgba(255, 160, 140, .45);
  color: #fff;
}
.side__bug em {
  margin-left: auto;
  font-style: normal;
  font-size: 10.5px;
  color: rgba(255, 255, 255, .42);
}

/* 上传速度 / 剩余时间 */
.uspeed {
  margin: 6px 2px 0;
  font-size: 11.5px;
  letter-spacing: .02em;
  color: rgba(125, 255, 216, .9);
  font-variant-numeric: tabular-nums;
}

/* ---------------------------------------------------------- 概览：模式条 */
.panel--mode { padding: 0; background: transparent; border: 0; box-shadow: none; }
.modestrip {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, rgba(125, 180, 255, .16), rgba(125, 255, 216, .1));
  border: 1px solid rgba(255, 255, 255, .16);
}
.modestrip.is-browse { background: linear-gradient(120deg, rgba(255, 207, 122, .18), rgba(125, 255, 216, .12)); }
.modestrip__icon { font-size: 22px; }
.modestrip__body { flex: 1 1 auto; display: grid; gap: 2px; min-width: 0; }
.modestrip__body b { font-size: 13.5px; }
.modestrip__body span { font-size: 12px; color: rgba(255, 255, 255, .66); }

/* ---------------------------------------------------------- 模式切换 */
.mode-badge {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  padding: .45em 1em;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: .04em;
}
.mode-badge__dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.mode-badge.is-browse { color: #06231f; background: linear-gradient(120deg, #ffcf7a, #7dffd8); }
.mode-badge.is-memorial { color: #d8f7ff; background: rgba(125, 180, 255, .18); border: 1px solid rgba(125, 180, 255, .35); }

.mode-explain {
  font-size: 13.5px;
  line-height: 1.9;
  color: rgba(255, 255, 255, .78);
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .1);
  margin-bottom: 16px;
}
.mode-explain b { color: #a8f7ea; }

.mode-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}
.mode-card {
  display: grid;
  gap: 8px;
  padding: 20px 22px;
  border-radius: 18px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
  transition: border-color .3s ease, background .3s ease;
}
.mode-card:hover { background: rgba(255, 255, 255, .08); }
.mode-card.is-current { border-color: rgba(125, 255, 216, .55); background: rgba(125, 255, 216, .08); }
.mode-card__icon { font-size: 26px; }
.mode-card h3 { font-size: 1.05rem; }
.mode-card__lead { font-size: 11.5px; letter-spacing: .08em; color: rgba(255, 255, 255, .5); }
.mode-card__list { display: grid; gap: 5px; font-size: 12.5px; color: rgba(255, 255, 255, .72); margin: 4px 0 10px; }
.mode-card__list li { padding-left: 14px; position: relative; }
.mode-card__list li::before { content: "·"; position: absolute; left: 3px; color: #7dffd8; }
.mode-card__now {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: .72em 1em;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #06231f;
  background: rgba(125, 255, 216, .85);
}
.mode-links { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 16px; }
.mode-links__hint { font-size: 11.5px; color: rgba(255, 255, 255, .5); }

/* ---------------------------------------------------------- 专属评语 */
.photopick {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(104px, 1fr));
  gap: 8px;
  max-height: 320px;
  overflow-y: auto;
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, .05);
  border: 1px solid rgba(255, 255, 255, .12);
}
.photopick__item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
  border: 2px solid transparent;
  background: rgba(255, 255, 255, .08);
  transition: border-color .25s ease, transform .3s var(--ease);
}
.photopick__item img { width: 100%; height: 72px; object-fit: cover; display: block; }
.photopick__item em {
  display: block;
  font-style: normal;
  font-size: 10.5px;
  padding: 5px 7px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: .8;
}
.photopick__item input { position: absolute; opacity: 0; pointer-events: none; }
.photopick__item.is-checked {
  border-color: #7dffd8;
  box-shadow: 0 0 0 3px rgba(125, 255, 216, .2);
}
.photopick__item.is-checked::after {
  content: "✓";
  position: absolute;
  top: 6px;
  right: 6px;
  width: 20px;
  height: 20px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #7dffd8;
  color: #052e2b;
  font-size: 12px;
  font-weight: 800;
}
.photopick__item:hover { transform: translateY(-2px); }
.photopick__ops { display: flex; align-items: center; gap: 10px; margin-top: 8px; flex-wrap: wrap; }
.photopick__count { font-size: 12px; opacity: .7; }
.photopick__count b { color: #a8f7ea; font-size: 13px; }

.notelist { display: grid; gap: 12px; }
.notelist__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255, 255, 255, .07);
  border: 1px solid transparent;
  transition: background .3s ease, border-color .3s ease;
}
.notelist__item:hover { background: rgba(255, 255, 255, .11); }
.notelist__item.is-off { opacity: .6; border-color: rgba(255, 190, 110, .35); }
.notelist__body { min-width: 0; }
.notelist__meta { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; font-size: 11.5px; }
.notelist__meta b { font-size: 13.5px; }
.notelist__meta span { opacity: .6; }
.notelist__count { margin-left: auto; }
.notelist__title { font-size: 14px; font-weight: 700; margin-top: 6px; }
.notelist__text { font-size: 12.8px; line-height: 1.85; margin-top: 4px; color: rgba(255, 255, 255, .8); overflow-wrap: anywhere; }
.notelist__thumbs { display: flex; gap: 6px; margin-top: 9px; flex-wrap: wrap; align-items: center; }
.notelist__thumbs img { width: 54px; height: 40px; object-fit: cover; border-radius: 8px; }
.notelist__thumbs > span {
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .12);
}
.notelist__ops { display: flex; gap: 5px; flex-wrap: wrap; }

@media (max-width: 640px) {
  .notelist__item { grid-template-columns: auto minmax(0, 1fr); }
  .notelist__ops { grid-column: 2; justify-content: flex-end; }
}
