.restore-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 1rem 0;
}

.restore-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border, #3b4b60);
  border-radius: 12px;
  background: var(--panel, #14202d);
}

.restore-card h3 { margin: 0 0 .65rem; }
.restore-list { display: grid; gap: .6rem; max-height: 30rem; overflow: auto; }
.restore-row { display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem; border: 1px solid var(--border, #3b4b60); border-radius: 9px; }
.restore-row > div:first-child { min-width: 0; overflow-wrap: anywhere; }
.restore-row small { display: block; color: var(--muted, #b5c2cf); margin-top: .25rem; }
.restore-row-actions, .restore-actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.restore-preview { margin-top: .8rem; }
.restore-metadata { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .6rem 1rem; }
.restore-metadata div { min-width: 0; }
.restore-metadata dt { color: var(--muted, #b5c2cf); font-size: .85rem; }
.restore-metadata dd { margin: .15rem 0 0; overflow-wrap: anywhere; }
.restore-metadata code { font-size: .78rem; }
.restore-warnings { padding-left: 1.3rem; }
.restore-warnings li { margin: .35rem 0; }
.restore-status { min-height: 2rem; margin: .8rem 0 0; padding: .6rem .75rem; border-radius: 8px; background: rgba(30, 120, 140, .16); }
.restore-status.error { background: rgba(170, 55, 55, .2); color: #ffcece; }
.backup-tabs { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.backup-tabs button { padding: .65rem 1rem; min-height: 44px; border: 1px solid var(--border, #3b4b60); border-radius: 8px; background: var(--panel, #14202d); color: var(--text, #eef5ff); cursor: pointer; }
.backup-tabs button[aria-selected=true] { border-color: var(--accent, #38bdf8); background: #075985; color: #fff; }
.backup-tabs button:focus-visible { outline: 3px solid var(--accent, #38bdf8); outline-offset: 2px; }
.backup-local-settings, [data-backup-view] { min-width: 0; }
[data-backup-view] input { min-width: 0; max-width: 100%; box-sizing: border-box; }
.restore-card { overflow-wrap: anywhere; }
@media (max-width: 650px) {
  .backup-tabs button { flex: 1 1 100%; }
}

@media (max-width: 940px) {
  .restore-grid, .restore-metadata { grid-template-columns: 1fr; }
  .restore-row { align-items: flex-start; flex-direction: column; }
}
