/* ============================================================
   v1.3.33 — 복구 센터: 버전 표시 · 실패 이유 표시 · 시점 정리
   디자인 전용 오버레이. 업무 로직/API/DB/FIFO/예측/권한은 변경하지 않는다.
   기존 화면 파일(styles.css, theme-v1324~v1332.css)은 건드리지 않는다.
   ============================================================ */

/* ── 고른 시점의 버전 한 줄 ─────────────────────────────────── */
.restore-version{
  margin:6px 0 0!important;
  padding:7px 10px!important;
  border-radius:9px!important;
  font-size:12.5px!important;
  font-weight:800!important;
  line-height:1.45!important;
}
html:not([data-theme="dark"]) .restore-version{ background:#eef4fb!important;color:#274b6d!important; }
html:not([data-theme="dark"]) .restore-version.same{ background:#eef7f1!important;color:#1d6b46!important; }
html:not([data-theme="dark"]) .restore-version.diff{ background:#fff6e8!important;color:#8a5300!important; }
html[data-theme="dark"] .restore-version{ background:#1a222c!important;color:#c4d6e8!important; }
html[data-theme="dark"] .restore-version.same{ background:#16261f!important;color:#7fd7ab!important; }
html[data-theme="dark"] .restore-version.diff{ background:#2a2317!important;color:#ffc46b!important; }
.restore-version b{ font-variant-numeric:tabular-nums!important; }

/* ── 복구 결과 알림 (성공·실패·진행중) ───────────────────────── */
.restore-result{
  margin-top:10px!important;
  padding:12px 14px!important;
  border-radius:12px!important;
  border:1px solid transparent!important;
  font-size:13px!important;
  line-height:1.55!important;
}
.restore-result strong{ display:block!important;font-size:14.5px!important;font-weight:950!important;margin-bottom:4px!important; }
.restore-result p{ margin:3px 0 0!important; }
.restore-result code{
  padding:1px 6px!important;border-radius:5px!important;
  font-family:"IBM Plex Mono",Consolas,monospace!important;font-size:12px!important;
}
html:not([data-theme="dark"]) .restore-result.running{ background:#eef4fb!important;border-color:#cfe0f0!important;color:#274b6d!important; }
html:not([data-theme="dark"]) .restore-result.ok{ background:#eef7f1!important;border-color:#bfe3ce!important;color:#175f3e!important; }
html:not([data-theme="dark"]) .restore-result.bad{ background:#fdf0f1!important;border-color:#f3c9cd!important;color:#96222d!important; }
html:not([data-theme="dark"]) .restore-result.warn{ background:#fff6e8!important;border-color:#f2ddb9!important;color:#7a4a00!important; }
html:not([data-theme="dark"]) .restore-result code{ background:#ffffff!important;color:#1b3f63!important;border:1px solid #d9e5f1!important; }
html[data-theme="dark"] .restore-result.running{ background:#161d26!important;border-color:#2b3744!important;color:#c4d6e8!important; }
html[data-theme="dark"] .restore-result.ok{ background:#13211b!important;border-color:#2a4437!important;color:#8ee0b5!important; }
html[data-theme="dark"] .restore-result.bad{ background:#241618!important;border-color:#4a2b30!important;color:#ff9ba3!important; }
html[data-theme="dark"] .restore-result.warn{ background:#241f14!important;border-color:#463a22!important;color:#ffc978!important; }
html[data-theme="dark"] .restore-result code{ background:#0f151d!important;color:#9ad3ff!important;border:1px solid #2b3744!important; }

/* ── 복구 시점 정리 목록 ────────────────────────────────────── */
.restore-cleanup{ margin-top:12px!important; }
.restore-cleanup>summary{
  cursor:pointer!important;list-style:none!important;
  padding:11px 12px!important;border-radius:10px!important;min-height:42px!important;box-sizing:border-box!important;display:flex!important;align-items:center!important;flex-wrap:wrap!important;
  font-size:13px!important;font-weight:900!important;
}
.restore-cleanup>summary::-webkit-details-marker{ display:none!important; }
.restore-cleanup>summary::before{ content:"▸ ";font-weight:900!important; }
.restore-cleanup[open]>summary::before{ content:"▾ "; }
.restore-cleanup>summary small{ font-weight:700!important;font-size:11px!important;margin-left:6px!important;opacity:.8; }
html:not([data-theme="dark"]) .restore-cleanup>summary{ background:#f3f7fb!important;border:1px solid #dfe9f2!important;color:#28496b!important; }
html[data-theme="dark"] .restore-cleanup>summary{ background:#161d26!important;border:1px solid #2b3744!important;color:#c4d6e8!important; }
@media(min-width:960px){
  .restore-cleanup>summary{ min-height:34px!important;padding:7px 12px!important; }
}

.restore-cleanup-list{
  margin-top:8px!important;
  max-height:340px!important;
  overflow-y:auto!important;
  border-radius:10px!important;
}
.restore-cleanup-row{
  display:grid!important;
  grid-template-columns:158px minmax(118px,180px) 66px 70px 1fr!important;
  gap:8px!important;align-items:center!important;
  padding:8px 10px!important;
  font-size:12px!important;
  border-bottom:1px solid transparent!important;
}
.restore-cleanup-row .rc-when{ font-weight:850!important;font-variant-numeric:tabular-nums!important; }
.restore-cleanup-row .rc-ver{ font-weight:950!important;font-variant-numeric:tabular-nums!important; }
.restore-cleanup-row .rc-origin,
.restore-cleanup-row .rc-kind{ font-weight:700!important; }
.restore-cleanup-row .rc-lock{ font-size:10.5px!important;font-weight:800!important;white-space:nowrap!important;justify-self:start!important; }
/* AGENTS.md 3장 — 손가락으로 누르는 곳은 42px 이상. PC 는 이 프로젝트의 밀도 규칙(약 34px)을 따른다. */
.restore-cleanup-row .rc-del{ justify-self:start!important;min-height:42px!important;padding:0 14px!important;font-size:12.5px!important;border-radius:8px!important; }
@media(min-width:960px){
  .restore-cleanup-row .rc-del{ min-height:34px!important;padding:0 12px!important;font-size:11.5px!important; }
}
html:not([data-theme="dark"]) .restore-cleanup-row{ background:#fff!important;border-bottom-color:#eef3f8!important;color:#2b4a68!important; }
html:not([data-theme="dark"]) .restore-cleanup-row.full{ background:#fffaf2!important; }
html:not([data-theme="dark"]) .restore-cleanup-row .rc-ver{ color:#15395c!important; }
html:not([data-theme="dark"]) .restore-cleanup-row .rc-origin{ color:#5f7488!important; }
html:not([data-theme="dark"]) .restore-cleanup-row .rc-lock{ color:#1d6b46!important; }
html[data-theme="dark"] .restore-cleanup-row{ background:#141b24!important;border-bottom-color:#222c37!important;color:#c4d6e8!important; }
html[data-theme="dark"] .restore-cleanup-row.full{ background:#1b1a15!important; }
html[data-theme="dark"] .restore-cleanup-row .rc-ver{ color:#eaf2fb!important; }
html[data-theme="dark"] .restore-cleanup-row .rc-origin{ color:#a9bccf!important; }
html[data-theme="dark"] .restore-cleanup-row .rc-lock{ color:#7fd7ab!important; }

/* 좁은 화면 — 한 줄에 다 못 넣으면 두 줄로 접는다 */
@media(max-width:820px){
  .restore-cleanup-row{
    grid-template-columns:1fr 1fr auto!important;
    grid-template-areas:"when when del" "kind ver origin"!important;
    row-gap:3px!important;
  }
  .restore-cleanup-row .rc-when{grid-area:when!important}
  .restore-cleanup-row .rc-kind{grid-area:kind!important}
  .restore-cleanup-row .rc-ver{grid-area:ver!important}
  .restore-cleanup-row .rc-origin{grid-area:origin!important}
  .restore-cleanup-row .rc-del,
  .restore-cleanup-row .rc-lock{grid-area:del!important;justify-self:end!important}
}
