/* ProjectOS — Administration › Import ClickUp et Sauvegardes (administration.js). Préfixe .ad-. */

.ad-body { display: grid; gap: 16px; margin-top: 14px; max-width: 1180px; min-width: 0; }
.ad-section { display: grid; gap: 16px; min-width: 0; }
.ad-section[hidden] { display: none; }
.ad-banner:empty { display: none; }

/* Formulaire d'import */
.ad-form { display: grid; gap: 14px; min-width: 0; }
.ad-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; align-items: start; min-width: 0; }
.ad-explore { align-self: end; padding-bottom: 1px; }
.ad-explore .btn { min-height: 38px; }
.ad-options { border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px 14px; margin: 0; display: grid; gap: 8px; min-width: 0; }
.ad-options legend { font-weight: 600; font-size: 13px; padding: 0 4px; }
.ad-options .ad-row { margin-top: 6px; }
.ad-indent { padding-left: 24px; }
.ad-token-note { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.ad-token-note[hidden] { display: none; }
.ad-form select.ctl, .ad-form input.ctl { width: 100%; min-height: 38px; }

/* Import suivi */
.ad-run-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ad-run-list { font-weight: 600; }
.ad-state { display: inline-block; font-size: 12px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.ad-state.en_cours { background: var(--accent-soft); color: var(--accent); }
.ad-state.termine { background: var(--ok-soft); color: var(--ok); }
.ad-state.echec, .ad-state.interrompu { background: var(--warn-soft); color: var(--warn-ink); }
.ad-live { margin: 0; font-weight: 600; }
.ad-err { margin: 0; padding: 10px 12px; border-radius: 8px; background: var(--warn-soft); color: var(--warn-ink); font-weight: 600; overflow-wrap: anywhere; }
.ad-err-t { color: var(--warn-ink); overflow-wrap: anywhere; }
.ad-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; counter-reset: ad-step; }
.ad-step { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto; align-items: center; gap: 4px 8px; font-size: 13.5px; color: var(--muted); counter-increment: ad-step; }
.ad-step::before {
  content: counter(ad-step); display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--line); font-size: 11px; font-weight: 700;
}
.ad-step.fait { color: var(--ink); }
.ad-step.fait::before { content: "✓"; border-color: var(--ok); background: var(--ok-soft); color: var(--ok); }
.ad-step.encours { color: var(--ink); font-weight: 600; }
.ad-step.encours::before { border-color: var(--accent); color: var(--accent); }
.ad-step-n { font-variant-numeric: tabular-nums; font-size: 12.5px; }
.ad-step progress { grid-column: 2 / -1; width: 100%; height: 6px; accent-color: var(--accent); }
.ad-next { display: grid; gap: 8px; padding: 12px 14px; border-radius: 10px; border: 2px solid var(--ok); background: var(--ok-soft); }
.ad-next p { margin: 0; }

/* Rapport */
.ad-report { display: grid; gap: 10px; min-width: 0; }
.ad-mode { margin: 0; font-weight: 600; }
.ad-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.ad-chip { padding: 4px 10px; border-radius: 999px; background: var(--surface-2); font-size: 13px; }
.ad-chip b { font-variant-numeric: tabular-nums; }
.ad-chip.warn { background: var(--warn-soft); color: var(--warn-ink); }
.ad-group { border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; min-width: 0; }
.ad-group.warn { border-color: var(--warn-ink); }
.ad-group summary { cursor: pointer; font-weight: 600; font-size: 13.5px; }
.ad-group ul { margin: 8px 0 2px; padding-left: 1.2em; display: grid; gap: 4px; font-size: 13px; }
.ad-group p { margin: 8px 0 2px; font-size: 13px; overflow-wrap: anywhere; }
.ad-tasks li { overflow-wrap: anywhere; }
.ad-ref { font-size: 12px; }
.ad-changes { margin: 2px 0 4px !important; color: var(--muted); }
.ad-old { text-decoration: line-through; }

/* Tableaux */
.ad-table td { overflow-wrap: anywhere; }
.ad-table tr.ad-current td { background: var(--accent-soft); }
.ad-file { font-size: 12.5px; overflow-wrap: anywhere; }

@media (max-width: 720px) {
  .ad-row { grid-template-columns: minmax(0, 1fr); }
  .ad-explore { align-self: start; }
  .ad-indent { padding-left: 0; }
  .ad-table td[data-l]::before { content: attr(data-l) " : "; color: var(--muted); font-size: 12px; font-weight: 600; }
}
