.ac-directory { padding: clamp(14px, 2.5vw, 24px); }
.ac-toolbar, .ac-filter { display: flex; gap: 12px; align-items: end; }
.ac-toolbar { justify-content: space-between; align-items: start; }
.ac-toolbar h2 { font-size: 1.25rem; letter-spacing: -.045em; }
.ac-toolbar p, .ac-help { color: var(--p-muted); font-size: .79rem; line-height: 1.55; }
.ac-toolbar p { margin-top: 4px; }
.ac-filter { margin-top: 21px; }
.ac-filter label { display: grid; gap: 5px; min-width: 0; font-size: .75rem; font-weight: 760; }
.ac-filter label:first-child { flex: 1 1 220px; }
.ac-filter label:nth-child(2) { flex: 0 1 195px; }
.ac-filter input, .ac-filter select {
  min-width: 0;
  width: 100%;
  min-height: 44px;
  border: 1px solid #d6e1d1;
  border-radius: 9px;
  padding: 7px 10px;
  background: #fcfdfb;
  color: var(--p-ink);
  font-size: .86rem;
}
.ac-directory .p-button, .ac-dialog .p-button { min-height: 44px; }
.ac-directory .p-button:disabled, .ac-dialog button:disabled { opacity: .61; cursor: wait; }
.ac-list { padding: 0; list-style: none; }
.ac-row {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, .75fr) 58px auto;
  gap: 15px;
  align-items: center;
  padding: 13px 0;
  border-top: 1px solid #e5ebe2;
}
.ac-row:first-child { margin-top: 17px; }
.ac-row:last-child { padding-bottom: 0; }
.ac-identity, .ac-profile { display: grid; gap: 3px; overflow-wrap: anywhere; }
.ac-identity strong, .ac-profile strong { font-size: .86rem; line-height: 1.3; }
.ac-identity span, .ac-profile span, .ac-managed { color: var(--p-muted); font-size: .72rem; line-height: 1.4; }
.ac-state { justify-self: start; border-radius: 99px; padding: 5px 8px; background: #f0eee9; color: #51483e; font-size: .7rem; font-weight: 780; }
.ac-state.is-active { color: #275536; background: #e4f1e0; }
.ac-actions { display: flex; flex-wrap: wrap; justify-content: end; align-items: center; gap: 6px; }
.ac-directory .ac-feedback, .ac-directory .ac-empty { margin-top: 14px; color: var(--p-muted); font-size: .82rem; }
.ac-directory .ac-feedback { border-radius: 8px; padding: 9px 11px; background: #edf6e9; color: #254a31; }
.ac-directory .ac-feedback.ac-error { background: #fdf0eb; color: #893b2e; }
.ac-dialog { width: min(100% - 24px, 565px); }
.ac-dialog .ac-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.ac-dialog .ac-optional { border: 1px solid #e1e9dc; border-radius: 9px; padding: 9px 10px; }
.ac-optional summary { cursor: pointer; padding: 4px 0; font-size: .75rem; font-weight: 780; }
.ac-optional .ac-fields { margin: 9px 0 6px; }
.ac-dialog input { min-width: 0; }
.ac-dialog .p-form { gap: 12px; }
.ac-dialog .ac-danger { background: #823826; border-color: #823826; color: #fff; }
.ac-dialog .ac-danger:hover { background: #6c2c1d; border-color: #6c2c1d; }
@media (max-width: 980px) {
  .ac-row { grid-template-columns: minmax(0, 1fr) minmax(0, .75fr) 58px; gap: 8px 12px; }
  .ac-actions { grid-column: 1 / -1; justify-content: start; }
}
@media (max-width: 540px) {
  .ac-toolbar { flex-direction: column; }
  .ac-filter { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; margin-top: 14px; }
  .ac-filter label:first-child { grid-column: 1 / -1; }
  .ac-row { grid-template-columns: minmax(0, 1fr) auto; }
  .ac-profile { grid-row: 2; grid-column: 1 / -1; }
  .ac-state { grid-column: 2; grid-row: 1; justify-self: end; }
}
@media (max-width: 400px) {
  .ac-dialog .ac-fields { grid-template-columns: 1fr; }
}
