/* public/css/screens/asset-cache.css — 预载资源管理（js/ui/assetCachePanel.js）
   布局照 owner 给的界面稿（2026-10-16，参考社区服 test.misyra.com 的「预载资源管理」）：
     顶部「预载范围」三档 + 三块数字 + 总进度；中部四张分类卡（2×2）；底部 ZIP / 缓存清理折叠行 + 按钮。
   注意两点（2026-10-14 踩过，2026-10-16 沿用）：
   1) 尺寸一律用 **px / em / vw**，不要用 rem 或 --t —— 界面缩放会改根字号，rem 会把面板整体放大；
   2) 一行里"名称 / 数字 / 按钮"必须是**三个独立网格列**（minmax(0,1fr) + auto + auto），否则窄列里数字会压在一起。 */

.ac-panel {
  display: flex;
  flex-direction: column;
  gap: 14px;
  width: 100%;
  max-width: 100%;
  font-size: 1.2em;
}

/* ---- 顶部：预载范围 + 汇总 ---- */
.ac-scope {
  display: flex; flex-direction: column; gap: 10px;
  padding: 16px 20px;
  background: linear-gradient(180deg, rgba(78, 216, 175, .05), rgba(0, 0, 0, .25));
  border: 1px solid var(--line-2);
}
.ac-scope__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; }
.ac-scope__title { font-size: 20px; font-weight: 800; color: var(--text-hi); letter-spacing: .02em; }
.ac-scope__hint { font-size: 12px; color: var(--text-dim); }

.ac-scope__segs { display: flex; gap: 8px; }
.ac-scope__segs button {
  padding: 8px 20px;
  background: rgba(0, 0, 0, .35); border: 1px solid var(--line-2); color: var(--text-md);
  font-size: 13px; font-weight: 700; letter-spacing: .04em; cursor: pointer;
}
.ac-scope__segs button:hover { color: var(--text-hi); border-color: var(--line-3); }
.ac-scope__segs button.is-on { color: #07100d; background: var(--mint-400); border-color: var(--mint-400); }

.ac-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 4px; }
.ac-sum__cell { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ac-sum__k { font-size: 12px; color: var(--text-dim); letter-spacing: .04em; }
.ac-sum__v { font-size: 30px; font-weight: 800; color: var(--text-hi); line-height: 1.15; }
.ac-sum__cell--need .ac-sum__v { color: var(--mint-400); }

.ac-sum__bar { position: relative; height: 5px; margin-top: 4px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.ac-sum__bar > i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, var(--mint-600, #2f9e7d), var(--mint-400)); transition: width .3s ease; }
.ac-sum__foot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--text-dim); }

/* ---- 四张分类卡（2×2） ---- */
.ac-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 900px) {
  .ac-grid, .ac-sum { grid-template-columns: minmax(0, 1fr); }
}

.ac-card {
  display: flex; flex-direction: column; gap: 5px;
  padding: 16px 18px 12px;
  background: rgba(0, 0, 0, .28); border: 1px solid var(--line-2); min-width: 0;
}
.ac-card.is-on { border-color: rgba(78, 216, 175, .45); }
.ac-card--skins.is-on { border-color: rgba(242, 189, 62, .45); }

.ac-card__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ac-card__no { font-size: 11px; font-weight: 800; letter-spacing: .18em; color: var(--mint-400); }
.ac-card__badge { padding: 2px 10px; font-size: 11px; font-weight: 700; color: #07100d; background: var(--mint-400); }
.ac-card__flag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--text-md); cursor: pointer; }
.ac-card__flag input { accent-color: var(--mint-400); }

.ac-card__name { margin: 2px 0 0; font-size: 22px; font-weight: 800; color: var(--text-hi); }
.ac-card__hint { margin: 0; font-size: 13px; color: var(--text-dim); line-height: 1.5; }
.ac-card__nums { display: flex; align-items: baseline; gap: 5px; margin-top: 6px; font-size: 14px; color: var(--text-md); }
.ac-card__nums .num { font-weight: 800; color: var(--text-hi); }
.ac-card__unit { color: var(--text-dim); }
.ac-card__spacer { flex: 1; }
.ac-card__bar { position: relative; height: 3px; margin-top: 2px; background: rgba(255, 255, 255, .07); overflow: hidden; }
.ac-card__bar > i { position: absolute; inset: 0 auto 0 0; background: var(--mint-400); transition: width .3s ease; }
.ac-card--skins .ac-card__bar > i { background: #f2bd3e; }

.ac-card__more { margin-top: 4px; }
.ac-card__more > summary {
  padding: 4px 0; font-size: 13px; color: var(--text-md); cursor: pointer; list-style: none;
  border-top: 1px solid var(--line-2);
}
.ac-card__more > summary::-webkit-details-marker { display: none; }
.ac-card__more > summary::before { content: '▸ '; color: var(--text-dim); }
.ac-card__more[open] > summary::before { content: '▾ '; }
.ac-card__list { display: flex; flex-direction: column; gap: 2px; padding-top: 2px; }

/* ---- 明细里的一行：名称 | 数字 | 按钮 ---- */
.ac-row {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: center; gap: 8px;
  padding: 5px 0;
  border-bottom: 1px dashed rgba(255, 255, 255, .06);
}
.ac-row:last-child { border-bottom: 0; }
.ac-row__name { font-size: 13px; color: var(--text-md); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-row__name b { color: #ffb066; font-weight: 700; }
.ac-row__nums { display: flex; gap: 8px; font-size: 12px; color: var(--text-dim); }
.ac-row__bar { position: relative; grid-column: 1 / -1; height: 2px; background: rgba(255, 255, 255, .06); }
.ac-row__bar > i { position: absolute; inset: 0 auto 0 0; background: var(--mint-400); }
.ac-row__act { justify-self: end; }

/* ---- 底部：提示条 / 折叠行 / 按钮 ---- */
.ac-note {
  padding: 8px 12px; font-size: 13px; color: var(--text-md);
  background: rgba(78, 216, 175, .06); border-left: 3px solid var(--mint-400);
}
.ac-ok { padding: 8px 12px; font-size: 13px; color: var(--mint-400); border: 1px solid rgba(78, 216, 175, .35); }
.ac-warn { padding: 8px 12px; font-size: 13px; color: #ffb066; border: 1px solid rgba(255, 176, 102, .35); }

.ac-folds { display: flex; flex-direction: column; gap: 6px; }
.ac-fold { border: 1px solid var(--line-2); background: rgba(0, 0, 0, .2); }
.ac-fold > summary {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 10px 14px; cursor: pointer; list-style: none;
  font-size: 14px; color: var(--text-hi);
}
.ac-fold > summary::-webkit-details-marker { display: none; }
.ac-fold > summary b { font-weight: 700; }
.ac-fold__r { font-size: 12px; color: var(--text-dim); text-align: right; }
.ac-fold__body { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding: 0 14px 12px; }

.ac-file {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 12px; border: 1px dashed var(--line-3); color: var(--text-md); font-size: 13px; cursor: pointer;
}
.ac-file input { display: none; }
.ac-link { color: var(--mint-400); font-size: 13px; text-decoration: underline; }

.ac-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.ac-foot__space { min-width: 0; font-size: 13px; color: var(--text-dim); }
.ac-foot__act { display: flex; align-items: center; gap: 8px; }
