:root {
  --bg: #0b0d12;
  --panel: #161a23;
  --line: #242a36;
  --text: #e7e9f0;
  --muted: #8d95a8;
  --accent: #f2a0c4;
  --accent2: #7aa2ff;
  --radius: 14px;
  --header-h: 62px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: radial-gradient(1200px 600px at 20% -10%, #1a2030 0%, transparent 60%), var(--bg);
  color: var(--text);
  font: 15px/1.6 "Microsoft YaHei", system-ui, -apple-system, "Segoe UI", sans-serif;
  min-height: 100vh;
  -webkit-tap-highlight-color: transparent;
}
body.noscroll { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; color: inherit; }
button { touch-action: manipulation; cursor: pointer; }
.hidden { display: none !important; }
:focus-visible { outline: 2px solid var(--accent2); outline-offset: 2px; }
input:focus-visible, select:focus-visible { outline: none; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; gap: 14px;
  padding: 10px 20px;
  background: rgba(11, 13, 18, .92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; flex: none; }
.logo {
  width: 36px; height: 36px; border-radius: 11px;
  display: grid; place-items: center; font-size: 19px; font-weight: 700; color: #17121a;
  background: linear-gradient(135deg, var(--accent), #ffd0e2);
  box-shadow: 0 4px 18px rgba(242, 160, 196, .25);
}
.brandtext { display: flex; flex-direction: column; line-height: 1.15; }
.brandtext b { font-size: 15.5px; letter-spacing: .5px; }
.brandtext small { color: var(--muted); font-size: 11px; }
.searchwrap { flex: 1; max-width: 520px; }
.searchwrap input {
  width: 100%; padding: 9px 14px; background: var(--panel);
  border: 1px solid var(--line); border-radius: 10px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.searchwrap input:focus { border-color: #46506a; box-shadow: 0 0 0 3px rgba(122, 162, 255, .12); }
.searchwrap input::-webkit-search-cancel-button { filter: invert(.6); }
.actions { display: flex; gap: 8px; margin-left: auto; flex: none; position: relative; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 8px 14px; border-radius: 10px; min-height: 36px;
  background: linear-gradient(135deg, #2a3242, #232a38);
  border: 1px solid var(--line);
  font-size: 13.5px; white-space: nowrap;
  transition: transform .12s, background .15s, border-color .15s;
}
.btn:hover { border-color: #46506a; }
.btn:active { transform: scale(.97); }
.btn.ghost { background: transparent; }
.btn.primary { background: linear-gradient(135deg, var(--accent), #e78bb3); color: #1a1216; border-color: transparent; font-weight: 700; }
.icon {
  background: transparent; border: 1px solid var(--line);
  width: 34px; height: 34px; border-radius: 9px; color: var(--muted);
  display: grid; place-items: center; font-size: 17px; line-height: 1;
}
.icon:hover { color: var(--text); border-color: #46506a; }

/* ---------- 公告（右上角） ---------- */
.ann { display: flex; }
.ann-btn { position: relative; gap: 5px; }
.ann-btn.has-new { border-color: #4a3a48; }
.ann-ico { font-size: 14px; line-height: 1; transform-origin: 60% 20%; }
.ann-btn.has-new .ann-ico { animation: annwave 2.4s ease-in-out 2; }
@keyframes annwave {
  0%, 60%, 100% { transform: rotate(0); }
  10%, 30%, 50% { transform: rotate(-12deg); }
  20%, 40% { transform: rotate(12deg); }
}
.ann-dot {
  position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0 2px rgba(11, 13, 18, .95);
}
.annpanel {
  position: absolute; top: calc(100% + 10px); right: 0; z-index: 70;
  width: min(360px, calc(100vw - 24px));
  background: #141924; border: 1px solid #313b4f; border-radius: 14px;
  box-shadow: 0 22px 54px rgba(0, 0, 0, .6);
  overflow: hidden; animation: annin .14s ease;
}
@keyframes annin { from { opacity: 0; transform: translateY(-5px); } }
.annhead {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 10px 11px 14px; border-bottom: 1px solid #242c3a;
  background: #171d29;
}
.annhead b { font-size: 13.5px; letter-spacing: .3px; }
.anncount { color: var(--muted); font-size: 11.5px; }
.annx {
  margin-left: auto; width: 26px; height: 26px; border: 0; border-radius: 7px;
  background: transparent; color: var(--muted); font-size: 12px; line-height: 1;
}
.annx:hover { background: #232c3b; color: var(--text); }
.annlist { max-height: min(430px, 62vh); overflow-y: auto; overscroll-behavior: contain; }
.annitem { padding: 12px 14px; border-bottom: 1px solid #1e2531; }
.annitem:last-child { border-bottom: 0; }
.annitem h3 { margin: 0 0 3px; font-size: 13px; font-weight: 700; }
.annitem time { display: block; margin-bottom: 5px; color: var(--muted); font-size: 11px; }
.annitem p {
  margin: 0; font-size: 12.5px; line-height: 1.7; color: #ccd3e1;
  white-space: pre-wrap; word-break: break-word;
}
.annempty { margin: 0; padding: 28px 14px; text-align: center; color: var(--muted); font-size: 12.5px; }

/* ---------- 日历（内嵌，不再浮层遮挡） ---------- */
.calpanel {
  max-width: 380px; margin: 12px auto 0; padding: 14px;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
}
.calhead { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.calhead strong { flex: 1; text-align: center; font-size: 14.5px; }
.calweek, .calgrid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.calweek span { text-align: center; font-size: 11.5px; color: var(--muted); padding-bottom: 4px; }
.calday {
  position: relative; aspect-ratio: 1; border: 0; border-radius: 8px;
  background: transparent; color: #5c6475; font-size: 12.5px;
}
.calday.has { color: var(--text); background: #1d2330; cursor: pointer; }
.calday.has:hover { background: #2a3242; }
.calday.has::after {
  content: ""; position: absolute; left: 50%; bottom: 4px; transform: translateX(-50%);
  width: 4px; height: 4px; border-radius: 50%; background: var(--accent);
}
.calday.sel { outline: 2px solid var(--accent); background: #2a2130; color: #fff; }
.calday.today { box-shadow: inset 0 0 0 1px #46506a; }
.calday .n { position: absolute; top: 1px; right: 4px; font-size: 9.5px; color: var(--accent); opacity: .85; }

/* ---------- 筛选区 ---------- */
.controls { padding: 12px 20px 0; }
.months { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px; scrollbar-width: thin; }
.months::-webkit-scrollbar { height: 5px; }
.months::-webkit-scrollbar-thumb { background: #2c3444; border-radius: 3px; }
.mpill {
  flex: none; padding: 6px 13px; border-radius: 999px; min-height: 32px;
  border: 1px solid var(--line); background: transparent; color: var(--muted); font-size: 13px;
  white-space: nowrap; transition: all .15s;
}
.mpill:hover { color: var(--text); border-color: #46506a; }
.mpill.on { background: var(--text); color: #0b0d12; border-color: var(--text); font-weight: 700; }
.mpill small { opacity: .55; margin-left: 4px; font-weight: 400; }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 8px; }
.sel {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 4px 8px 4px 12px; border-radius: 10px; min-height: 36px;
  background: var(--panel); border: 1px solid var(--line);
}
.sel span { font-size: 12px; color: var(--muted); flex: none; }
.sel select {
  background: transparent; border: 0; outline: none; cursor: pointer;
  font-size: 13px; max-width: 210px; padding: 3px 2px;
}
.sel select option { background: #161a23; color: var(--text); }
.sel:focus-within { border-color: #46506a; }

.seg { display: inline-flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg button {
  border: 0; background: transparent; color: var(--muted);
  padding: 5px 12px; border-radius: 7px; font-size: 12.5px;
}
.seg button.on { background: #2b3346; color: var(--text); font-weight: 700; }

.tagbar { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.tchip {
  padding: 4px 10px; border-radius: 999px; font-size: 12px; min-height: 28px;
  background: #171c26; border: 1px solid #232a36; color: var(--muted);
}
.tchip:hover { color: var(--text); }
.tchip.on { color: #1a1216; background: var(--accent); border-color: transparent; font-weight: 700; }

.resultbar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 12px 0 4px; margin-top: 4px; color: var(--muted); font-size: 13px;
  border-top: 1px solid #1a1f29;
}
.resultbar b { color: var(--text); font-size: 15px; margin-right: 4px; }
.fchip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 6px 3px 10px; border-radius: 999px; min-height: 26px;
  background: #222a3a; border: 1px solid #2f3a4e; color: #cfd6e6; font-size: 12px;
}
.fchip i { font-style: normal; opacity: .65; font-size: 13px; padding: 0 2px; }
.fchip:hover { border-color: #46506a; color: #fff; }

/* ---------- 分组与网格 ---------- */
main { padding: 0 20px 40px; }
.group { margin-top: 22px; }
.grouphead {
  display: flex; align-items: baseline; gap: 10px;
  margin: 0 0 10px; padding-bottom: 8px; border-bottom: 1px solid var(--line);
}
.grouphead h2 { margin: 0; font-size: 15.5px; font-weight: 700; }
.grouphead .d { color: var(--muted); font-size: 12.5px; }
.grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.card {
  position: relative; display: block; overflow: hidden; border-radius: 12px;
  background: #151a23; border: 1px solid #1e2531;
  transition: transform .18s, border-color .18s, box-shadow .18s;
}
.card:hover { transform: translateY(-3px); border-color: #3b4457; box-shadow: 0 10px 26px rgba(0, 0, 0, .45); }
.card .shot { overflow: hidden; }
.card img { width: 100%; height: 100%; object-fit: cover; display: block; }
.card .cap {
  position: absolute; inset: auto 0 0 0; padding: 22px 9px 8px;
  background: linear-gradient(to top, rgba(8, 10, 14, .94), transparent);
  font-size: 12px; line-height: 1.35; color: #dfe3ec; pointer-events: none;
  opacity: 0; transition: opacity .18s;
}
.card:hover .cap, .card:focus-visible .cap { opacity: 1; }
.card .cap .t { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.card .cap .sub { display: block; margin-top: 2px; font-size: 11px; color: var(--accent); }

.sentinel { height: 1px; }
.empty { text-align: center; color: var(--muted); padding: 60px 20px; }
.empty .btn { margin-top: 14px; }
.loading { text-align: center; color: var(--muted); font-size: 13px; padding: 20px; }
.loadfail { text-align: center; color: var(--muted); font-size: 13px; padding: 56px 20px; }
.loadfail .btn { margin-top: 14px; }
.foot { text-align: center; color: #5c6475; font-size: 12px; padding: 10px 0 40px; }

/* ---------- 多选模式 ---------- */
body.selecting .card { cursor: pointer; }
.card .pick {
  position: absolute; top: 7px; left: 7px; width: 22px; height: 22px; z-index: 2;
  border-radius: 50%; border: 2px solid rgba(255, 255, 255, .75);
  background: rgba(10, 12, 18, .55); display: none; place-items: center;
  color: #1a1216; font-size: 13px; font-weight: 700;
}
body.selecting .card .pick { display: grid; }
body.selecting .card:hover { transform: none; }
.card.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.card.sel .pick { background: var(--accent); border-color: var(--accent); }
.card.sel .pick::after { content: "✓"; }
.card.sel img { opacity: .82; }

.selbar {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%);
  z-index: 60; display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; border-radius: 14px;
  background: rgba(22, 26, 35, .96); border: 1px solid #333c4d;
  box-shadow: 0 16px 44px rgba(0, 0, 0, .55);
}
.selbar .selnum { font-size: 13px; color: var(--muted); margin-right: 4px; }
.selbar .selnum b { color: var(--accent); font-size: 15px; }
.btn.danger { background: linear-gradient(135deg, #b33a4d, #8f2c3c); border-color: transparent; color: #fff; }

/* ---------- 首页 hero ---------- */
.hero {
  display: flex; align-items: flex-end; gap: 28px; flex-wrap: wrap;
  padding: 26px 20px 6px;
  background: radial-gradient(600px 200px at 0% 0%, rgba(242, 160, 196, .10), transparent 70%);
}
.hero-text .lead { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.hero-text .sub { margin: 5px 0 0; color: var(--muted); font-size: 13px; }
.stats { display: flex; gap: 22px; flex-wrap: wrap; margin-left: auto; }
.stat { display: flex; flex-direction: column; gap: 1px; }
.stat b { font-size: 20px; letter-spacing: .5px; }
.stat span { font-size: 11.5px; color: var(--muted); }
.hero-actions { flex: none; }

.recent { padding: 14px 20px 4px; }
.recent-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 8px; }
.recent-head h2 { margin: 0; font-size: 14px; font-weight: 700; }
.recent-head span { color: var(--muted); font-size: 12px; }
.recent-strip {
  display: flex; gap: 8px; overflow-x: auto; padding-bottom: 6px;
  scrollbar-width: thin;
}
.recent-strip::-webkit-scrollbar { height: 5px; }
.recent-strip::-webkit-scrollbar-thumb { background: #2c3444; border-radius: 3px; }
.rthumb {
  position: relative; flex: none; width: 86px; height: 112px; padding: 0;
  border-radius: 9px; overflow: hidden; border: 1px solid #232a36; background: #131820;
}
.rthumb img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s; }
.rthumb:hover img { transform: scale(1.05); }
.rthumb span {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px;
  padding: 8px 4px 3px; color: #dfe3ec; text-align: center;
  background: linear-gradient(to top, rgba(0, 0, 0, .82), transparent);
}

/* ---------- 日期范围 ---------- */
.daterow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.daterow .dlab { font-size: 12px; color: var(--muted); }
.drange {
  display: inline-flex; align-items: center; gap: 2px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  padding: 2px 5px; min-height: 34px;
  transition: border-color .15s, box-shadow .15s;
}
.drange:focus-within { border-color: #46506a; box-shadow: 0 0 0 3px rgba(122, 162, 255, .1); }
.dcell { position: relative; display: inline-flex; border-radius: 7px; }
.dph {
  position: absolute; left: 9px; top: 50%; transform: translateY(-50%);
  font-size: 12.5px; color: var(--muted); pointer-events: none; white-space: nowrap;
}
.dcell.is-empty input[type=date]:not(:focus) { color: transparent; }
.dcell:not(.is-empty) .dph { display: none; }
.drange input[type=date] {
  background: transparent; border: 0; border-radius: 7px;
  padding: 4px 5px; font-size: 12.5px; color: var(--text); outline: none;
  font-variant-numeric: tabular-nums; min-width: 112px;
}
.drange input[type=date]:hover { background: #1b2130; }
.drange input[type=date]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; }
.drange input[type=date]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.drange .dash { color: #596174; font-size: 12px; user-select: none; }
.qbtn {
  padding: 5px 11px; border-radius: 999px; font-size: 12px;
  background: transparent; border: 1px solid var(--line); color: var(--muted);
  transition: color .15s, border-color .15s, background .15s;
}
.qbtn:hover { color: var(--text); border-color: #46506a; }
.qbtn.on { color: var(--text); border-color: rgba(242, 160, 196, .6); background: rgba(242, 160, 196, .12); }

/* ---------- 提示条 / 回顶 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 92px; transform: translateX(-50%);
  z-index: 90; display: flex; align-items: center; gap: 12px;
  padding: 10px 12px 10px 16px; border-radius: 12px;
  background: rgba(24, 29, 40, .97); border: 1px solid #333c4d;
  box-shadow: 0 14px 40px rgba(0, 0, 0, .5); font-size: 13px;
  max-width: calc(100vw - 32px);
}
.toast-btn {
  background: var(--accent); color: #1a1216; border: 0; border-radius: 8px;
  padding: 6px 12px; font-size: 12.5px; font-weight: 700;
}
.toast-x { background: transparent; border: 0; color: var(--muted); font-size: 14px; padding: 2px 4px; }

.totop {
  position: fixed; right: 18px; bottom: 22px; z-index: 50;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(30, 36, 48, .92); border: 1px solid #333c4d; color: #cfd6e6;
  font-size: 17px; box-shadow: 0 8px 22px rgba(0, 0, 0, .4);
}
.totop:hover { background: rgba(50, 60, 80, .95); }

/* ---------- 看图 ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(5, 6, 9, .96);
  animation: fade .15s ease;
  display: flex; align-items: center; justify-content: center;
}
@keyframes fade { from { opacity: 0 } to { opacity: 1 } }
.lbstage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; touch-action: none; cursor: default;
  padding: 64px 60px 84px;
}
.lbstage.zoomed { cursor: grab; }
#lbImg {
  max-width: 100%; max-height: 100%;
  object-fit: contain; user-select: none; -webkit-user-drag: none;
  transform-origin: center center; will-change: transform;
  border-radius: 4px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, .55);
}
.lbtop {
  position: absolute; top: 0; left: 0; right: 0; z-index: 3;
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px;
  background: linear-gradient(to bottom, rgba(6, 8, 12, .98) 0%, rgba(6, 8, 12, .88) 60%, rgba(6, 8, 12, 0) 100%);
}
.lbinfo { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.lbinfo strong { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbinfo span { color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lbtools { display: flex; align-items: center; gap: 6px; flex: none; }
.zbtn {
  min-width: 34px; height: 34px; padding: 0 9px; border-radius: 9px;
  background: rgba(38, 45, 60, .85); border: 1px solid #333c4d; color: #e7e9f0; font-size: 16px;
}
.zbtn.wide { font-size: 12px; }
.zbtn:hover { background: rgba(58, 68, 88, .95); }
.zbtn.close { margin-left: 4px; }
#zoomPct { min-width: 48px; text-align: center; font-size: 12.5px; color: var(--muted); }

.lb-nav {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 4;
  width: 50px; height: 76px; border: 0; border-radius: 10px;
  background: rgba(30, 36, 48, .55); color: #e7e9f0; font-size: 30px;
  display: grid; place-items: center;
}
.lb-nav:hover { background: rgba(50, 60, 80, .85); }
.lb-nav.prev { left: 12px; }
.lb-nav.next { right: 12px; }

/* ---------- 管理页 ---------- */
.admin { max-width: 1020px; margin: 0 auto; padding: 24px 20px 60px; }
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.panel h2 { font-size: 16px; margin: 0 0 14px; }
.h2 {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font-size: 16px; font-weight: 700; margin: 28px 0 0;
}
.h2 span { color: var(--muted); font-size: 12.5px; font-weight: 400; }
/* 后台分页导航 */
.adnav {
  display: flex; gap: 4px; flex-wrap: wrap;
  padding: 6px; margin-bottom: 20px;
  background: #0e1219; border: 1px solid var(--line); border-radius: 12px;
  position: sticky; top: 0; z-index: 20;
}
.adtab {
  padding: 8px 14px; border-radius: 9px; font-size: 13px;
  background: transparent; border: 1px solid transparent; color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}
.adtab:hover { color: var(--text); background: #161b24; }
.adtab.on { color: var(--text); background: #1c2330; border-color: #2c3444; }
.adtab b { color: var(--accent); font-weight: 700; }
.adpage { animation: fade .12s ease; }
.pagetop { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.pagetop h2 { margin: 0; font-size: 17px; }
.pagetop h2 span { color: var(--muted); font-size: 12.5px; font-weight: 400; }
.pagetop-acts { display: flex; gap: 8px; margin-left: auto; flex-wrap: wrap; }

/* 图片库搜索 */
.listsearch { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.listsearch input[type=search] {
  flex: 1 1 260px; min-width: 180px; padding: 9px 12px;
  background: #0f131a; border: 1px solid var(--line); border-radius: 9px;
  outline: none; color: var(--text); font-size: 13px;
}
.listsearch input[type=search]:focus { border-color: #46506a; }
.listsearch select {
  max-width: 220px; padding: 8px 10px; font-size: 13px;
  background: #0f131a; border: 1px solid var(--line); border-radius: 9px;
  color: var(--text); outline: none;
}
.listmore { display: flex; justify-content: center; margin-top: 14px; }

#login { max-width: 420px; margin: 8vh auto; }
#login form { display: flex; gap: 8px; }
#login input, .row input {
  flex: 1; padding: 9px 12px; background: #0f131a; border: 1px solid var(--line);
  border-radius: 9px; outline: none; min-width: 0;
}
#login input:focus, .row input:focus { border-color: #46506a; }
.hint { color: var(--muted); font-size: 12.5px; margin: 12px 0 0; }
.drop {
  border: 1.5px dashed #333c4d; border-radius: var(--radius);
  padding: 30px 20px; text-align: center; color: var(--muted);
  background: #0f131a; transition: all .15s;
}
.drop:hover, .drop.over { border-color: var(--accent); color: var(--text); background: #141a24; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; margin-top: 14px; }
.row label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); min-width: 0; }
.row label.chk { flex-direction: row; align-items: center; gap: 7px; padding-bottom: 10px; }
.queue { margin-top: 14px; display: flex; flex-direction: column; gap: 6px; }
.qitem { display: flex; align-items: center; gap: 10px; font-size: 12.5px; padding: 7px 10px; background: #121720; border-radius: 8px; }
.qitem .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.qitem .st { color: var(--muted); }
.qitem .st.ok { color: #74d99f; }
.qitem .st.err { color: #ff7b7b; }

.listbar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 8px 10px; margin-bottom: 10px;
  background: #121720; border: 1px solid #1d2431; border-radius: 10px; font-size: 12.5px;
}
.listbar .chk { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.listbar #selectedCount { color: var(--muted); margin-right: auto; }
.listbar #selectedCount.has { color: var(--accent); }
.arow .rowchk { width: 17px; height: 17px; accent-color: var(--accent); flex: none; cursor: pointer; }

.alist { display: flex; flex-direction: column; gap: 8px; }
.arow { display: flex; align-items: center; gap: 12px; padding: 8px; background: #121720; border: 1px solid #1d2431; border-radius: 10px; }
.arow img { width: 42px; height: 56px; object-fit: cover; border-radius: 6px; background: #1a1f29; flex: none; }
.arow .info { flex: 1; min-width: 0; }
.arow .info b { display: block; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.arow .info small { color: var(--muted); font-size: 11.5px; }
.arow .del { background: transparent; border: 1px solid #3a2730; color: #ff8f9e; border-radius: 8px; padding: 6px 12px; font-size: 12px; }
.arow .del:hover { background: #2a1a20; }
.rowacts { display: flex; align-items: center; gap: 4px; flex: none; }
.rowacts .mini {
  background: transparent; border: 1px solid #2c3444; color: var(--muted);
  border-radius: 7px; padding: 5px 8px; font-size: 12px; line-height: 1;
}
.rowacts .mini:hover { color: var(--text); border-color: #46506a; }

/* 待导入确认 */
.pending {
  margin-top: 14px; padding: 12px; border-radius: 12px;
  background: #121821; border: 1px solid #2a3446;
}
.pending-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; font-size: 13px; }
.pending-head b { font-size: 14px; }
.pending-head b span { color: var(--accent); }
.pending-head #pendSize { color: var(--muted); font-size: 12.5px; margin-right: auto; }
.pendlist {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
  gap: 8px; max-height: 320px; overflow-y: auto;
}
.penditem { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: #0e131a; border: 1px solid #232a36; }
.penditem img { width: 100%; height: 100%; object-fit: cover; display: block; }
.penditem .x {
  position: absolute; top: 3px; right: 3px; width: 20px; height: 20px;
  border-radius: 50%; border: 0; background: rgba(10, 12, 18, .8); color: #cfd6e6;
  font-size: 12px; line-height: 1;
}
.penditem .nm {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 9.5px; color: #cfd6e6;
  padding: 6px 4px 2px; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  background: linear-gradient(to top, rgba(0, 0, 0, .85), transparent);
}

/* QQ 群相册 */
.obcfg { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.obcfg label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.obcfg input {
  padding: 8px 11px; background: #0f131a; border: 1px solid var(--line);
  border-radius: 9px; outline: none; min-width: 240px;
}
.obcfg input:focus { border-color: #46506a; }
.obrow { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.obrow .sel select { max-width: 260px; }

/* 站点设置 */
.setgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.setgrid label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); }
.setgrid input {
  padding: 8px 11px; background: #0f131a; border: 1px solid var(--line);
  border-radius: 9px; outline: none;
}
.setgrid input:focus { border-color: #46506a; }
.setactions { display: flex; align-items: center; gap: 12px; margin-top: 14px; }

/* 公告编辑 */
.noticelist { display: flex; flex-direction: column; gap: 8px; margin-bottom: 10px; }
.noticerow { padding: 10px; background: #121720; border: 1px solid #1d2431; border-radius: 10px; }
.noticerow-head { display: flex; gap: 8px; align-items: center; margin-bottom: 6px; flex-wrap: wrap; }
.noticerow-head .nr-date { width: 142px; flex: none; }
.noticerow-head .nr-title { flex: 1; min-width: 120px; }
.noticerow textarea, .noticenew textarea { resize: vertical; width: 100%; }
.noticerow input[type=text], .noticerow input[type=date], .noticerow textarea,
.noticenew input[type=text], .noticenew textarea {
  padding: 7px 10px; background: #0f131a; border: 1px solid var(--line);
  border-radius: 8px; outline: none; color: var(--text); font-size: 13px;
}
.noticerow input:focus, .noticerow textarea:focus,
.noticenew input:focus, .noticenew textarea:focus { border-color: #46506a; }
.noticenew { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.noticenew .btn { align-self: flex-end; }

/* 编辑弹窗 */
.dlg {
  width: min(520px, 92vw); padding: 20px; border-radius: 14px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
}
.dlg::backdrop { background: rgba(4, 6, 10, .72); backdrop-filter: blur(3px); }
.dlg h3 { margin: 0 0 14px; font-size: 16px; }
.dlg h3 span { margin-left: 6px; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.dlg label { display: flex; flex-direction: column; gap: 5px; font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.dlg label em { font-style: normal; font-size: 11px; color: #6b7488; }
.dlg input {
  padding: 8px 11px; background: #0f131a; border: 1px solid var(--line);
  border-radius: 9px; outline: none; color: var(--text);
}
.dlg input:focus { border-color: #46506a; }
.dlgrow { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.dlgactions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 6px; }

/* QQ 监听 */
.qqwatch { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.qqwatch .chk { display: flex; align-items: center; gap: 6px; font-size: 13px; }

/* 轻提示 */
.flash {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 200; padding: 10px 18px; border-radius: 10px;
  background: rgba(24, 29, 40, .97); border: 1px solid #333c4d;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .5); font-size: 13px;
  animation: fade .18s ease;
}

/* 作品 / 作者 管理 */
.taxgrid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
.taxcol { background: #10141b; border: 1px solid #1d2431; border-radius: 12px; padding: 14px; }
.taxcol h3 { margin: 0 0 10px; font-size: 14px; }
.taxlist { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; margin-bottom: 10px; }
.taxrow { display: flex; align-items: center; gap: 8px; padding: 6px 8px; background: #161b24; border-radius: 8px; font-size: 12.5px; }
.taxrow .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.taxrow .cnt { color: var(--muted); font-size: 11.5px; }
.taxrow button { background: transparent; border: 1px solid #2c3444; color: var(--muted); border-radius: 6px; padding: 2px 8px; font-size: 11.5px; }
.taxrow button:hover { color: var(--text); border-color: #46506a; }
.taxrow button.danger:hover { color: #ff8f9e; border-color: #5a2b36; }
.taxadd { display: flex; gap: 6px; }
.taxadd input { flex: 1; padding: 7px 10px; background: #0f131a; border: 1px solid var(--line); border-radius: 8px; outline: none; font-size: 12.5px; }

/* QQ */
.qqpanel { margin-top: 22px; }
.qqhead { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.qqhead h2 { font-size: 16px; margin: 0; }
.qqgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 7px; margin-top: 12px; max-height: 420px; overflow-y: auto; }
.qtile { position: relative; padding: 0; border: 2px solid transparent; border-radius: 9px; overflow: hidden; aspect-ratio: 1; background: #0f131a; }
.qtile img { width: 100%; height: 100%; object-fit: cover; display: block; opacity: .9; }
.qtile.on { border-color: var(--accent); }
.qtile .chk {
  position: absolute; top: 4px; right: 4px; width: 17px; height: 17px; border-radius: 50%;
  background: var(--accent); color: #1a1216; font-size: 11px; font-style: normal; display: none; place-items: center;
}
.qtile.on .chk { display: grid; }
.qtile .qd {
  position: absolute; left: 0; right: 0; bottom: 0; font-size: 10px; padding: 6px 4px 2px;
  color: #dfe3ec; text-align: center; background: linear-gradient(to top, rgba(0, 0, 0, .8), transparent);
}
.qqactions { display: flex; align-items: center; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.qqactions b { color: var(--accent); }
.qqfilters { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 10px; font-size: 12.5px; color: var(--muted); }
.qqfilters .chk { display: flex; align-items: center; gap: 6px; }
.qqfilters input[type=date] {
  background: #0f131a; border: 1px solid var(--line); border-radius: 8px;
  padding: 4px 7px; font-size: 12px; color: var(--text); outline: none;
}
.qtile.imported { opacity: .45; cursor: default; border-color: transparent; }
.qtile .done {
  position: absolute; top: 4px; left: 4px; font-size: 9.5px; font-style: normal;
  background: rgba(10, 12, 18, .85); color: #9aa4b8; padding: 1px 5px; border-radius: 5px;
}
.arow .restore {
  background: transparent; border: 1px solid #2d4a3a; color: #74d99f;
  border-radius: 8px; padding: 6px 12px; font-size: 12px;
}
.arow .restore:hover { background: #16251d; }

/* ---------- 移动端 ---------- */
@media (hover: none) {
  .card:hover { transform: none; box-shadow: none; border-color: #1e2531; }
  .card .cap { opacity: 1; }
}
@media (max-width: 720px) {
  .hero { padding: 18px 12px 2px; gap: 12px; }
  .hero-text .lead { font-size: 17px; }
  .hero-text .sub { font-size: 12px; }
  .stats { margin-left: 0; gap: 18px; width: 100%; }
  .stat b { font-size: 17px; }
  .recent { padding: 10px 12px 0; }
  .rthumb { width: 72px; height: 96px; }
  .toast { bottom: 118px; }
  .selbar { bottom: 12px; padding: 8px 10px; gap: 8px; }
  .selbar .btn { padding: 6px 10px; font-size: 12.5px; }
  .topbar { padding: 8px 12px; gap: 8px; }
  .brandtext small { display: none; }
  .brandtext b { font-size: 14px; }
  .searchwrap { min-width: 0; }
  .searchwrap input { padding: 8px 10px; font-size: 14px; }
  .actions { gap: 6px; }
  .actions .btn { padding: 0 10px; }
  .ann-text { display: none; }
  .ann-btn { padding: 0 9px; }
  .annpanel { position: fixed; top: 58px; left: 10px; right: 10px; width: auto; max-height: calc(100vh - 76px); }
  .annlist { max-height: calc(100vh - 130px); }
  .drange input[type=date] { min-width: 104px; font-size: 12px; padding: 4px 3px; }
  .controls, main { padding-left: 12px; padding-right: 12px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 7px; }
  .card .cap { font-size: 11px; padding: 16px 6px 5px; }
  .sel select { max-width: 120px; }
  .lbstage { padding: 66px 8px 96px; }
  .lb-nav { width: 38px; height: 60px; font-size: 24px; }
  .lb-nav.prev { left: 4px; } .lb-nav.next { right: 4px; }
  .lbtop { padding: 8px 10px; gap: 8px; }
  .lbinfo span { display: none; }
  #zoomPct { min-width: 40px; font-size: 12px; }
  .zbtn { min-width: 32px; height: 32px; }
  .zbtn.wide { display: none; }
  .taxgrid { grid-template-columns: 1fr; }
  .setgrid { grid-template-columns: 1fr; }
  .arow { flex-wrap: wrap; }
  .rowacts { width: 100%; justify-content: flex-end; }
  .admin { padding: 16px 12px 48px; }
  .adnav { flex-wrap: nowrap; overflow-x: auto; margin-bottom: 14px; scrollbar-width: none; }
  .adnav::-webkit-scrollbar { display: none; }
  .adtab { flex: none; padding: 7px 12px; }
  .listsearch select { flex: 1 1 140px; max-width: none; }
  .pagetop-acts { margin-left: 0; width: 100%; }
}

@media (max-width: 560px) {
  #calBtn { display: none; }
  .brandtext b { max-width: 76px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
