/* --------------------------------------------------
   Backup modal
-------------------------------------------------- */

.modal--backup .modal__dialog {
    width: min(1200px, calc(100% - 24px));
  }
  
  .modal--backup .modal__body {
    max-height: 84vh;
  }
  
  .backup-modal-wrap {
    display: grid;
    gap: 14px;
  }
  
  .backup-tabbar {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  
  .backup-tabbtn {
    border: 1px solid #cfcfcf;
    background: #f6f6f6;
    color: #222;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
    font-weight: 600;
  }
  
  .backup-tabbtn.is-active {
    background: var(--ui-accent);
    color: #fff;
    border-color: var(--ui-accent);
  }
  
  .backup-panel {
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    padding: 14px;
    background: #fff;
    display: grid;
    gap: 12px;
  }
  
  .backup-panel[hidden] {
    display: none !important;
  }
  
  .backup-card {
    border: 1px solid #ddd;
    border-radius: 12px;
    padding: 12px;
    background: #fff;
  }
  
  .backup-name-input,
  .backup-search-input {
    width: 100%;
    padding: 8px;
    border-radius: 10px;
    border: 1px solid #cfcfcf;
    background: #fff;
  }
  
  .backup-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
  }
  
  .backup-list-scroll {
    max-height: 52vh;
    overflow: auto;
    padding-right: 4px;
  }
  
  .backup-item {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    gap: 14px;
    padding: 14px;
    border: 1px solid #ddd;
    border-radius: 14px;
    margin-bottom: 10px;
    background: #fff;
  }
  
  .backup-item:hover {
    background: #f8fbff;
    border-color: #bfd7ff;
  }
  
  .backup-item-main {
    min-width: 0;
    display: grid;
    gap: 8px;
  }
  
  .backup-title-row {
    display: flex;
    align-items: center;
    gap: 8px;
    min-width: 0;
  }
  
  .backup-title {
    display: block;
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.25;
    color: #1f2933;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .backup-meta-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
  
  .backup-meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    max-width: 100%;
    padding: 5px 8px;
    border: 1px solid #dde5ef;
    border-radius: 999px;
    background: #f7f9fc;
    color: #263442;
    font-size: 0.82rem;
    line-height: 1.2;
  }
  
  .backup-meta-chip--profile {
    background: #eef5ff;
    border-color: #cfe2ff;
  }
  
  .backup-meta-chip--date {
    background: #f4f7f4;
    border-color: #d7e8d7;
  }
  
  .backup-meta-label {
    color: #667085;
    font-weight: 600;
  }
  
  .backup-meta-value {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .backup-root-uri,
  .backup-filename {
    color: #667085;
    font-size: 0.78rem;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  
  .backup-filename {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  }
  
  .backup-restore-btn {
    white-space: nowrap;
  }
  
  @media (max-width: 720px) {
    .backup-item {
      grid-template-columns: 1fr;
    }
  
    .backup-restore-btn {
      width: 100%;
    }
  }

  .backup-search-card {
    display: grid;
    gap: 8px;
    margin-bottom: 12px;
  }
  
  .backup-search-label {
    font-weight: 700;
    color: #1f2933;
  }
  
  .backup-search-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 8px;
    align-items: center;
  }
  
  .backup-meta-chip--person {
    background: #fff7ed;
    border-color: #fed7aa;
  }
  
  @media (max-width: 720px) {
    .backup-search-row {
      grid-template-columns: 1fr;
    }
  }