/* Proxy registry — admin list + phone linking */

.px-root {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
}

.px-stats {
  margin-bottom: 0;
}

.px-toolbar.ops-accounts-toolbar {
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0;
  gap: 0.75rem 1rem;
}

.px-search {
  flex: 1 1 auto;
  min-width: 12rem;
  max-width: 360px;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--ops-border, var(--border));
  background: var(--ops-input-bg, var(--input-bg));
  color: var(--text);
  font: inherit;
}

.px-search:focus {
  outline: none;
  border-color: var(--accent, #7c3aed);
  box-shadow: 0 0 0 2px rgba(124, 58, 237, 0.2);
}

.px-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-left: auto;
}

.px-count {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.px-hint {
  margin: -0.35rem 0 0;
  line-height: 1.45;
}

.px-list-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.px-list-head .ops-panel-h {
  margin: 0;
}

.px-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 3rem 1.5rem;
  gap: 0.75rem;
  min-height: 260px;
  justify-content: center;
}

.px-empty--filter {
  min-height: 180px;
  padding: 2rem 1.25rem;
}

.px-empty-icon {
  font-size: 2.5rem;
  line-height: 1;
  opacity: 0.85;
}

.px-empty-title {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 600;
}

.px-empty-text {
  max-width: 440px;
  margin: 0;
  line-height: 1.5;
}

.px-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 1rem;
}

.px-card {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  min-height: 0;
}

.px-card-head {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  align-items: flex-start;
}

.px-card-title {
  font-weight: 600;
  font-size: 1rem;
  line-height: 1.3;
}

.px-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  justify-content: flex-end;
  flex-shrink: 0;
}

.px-conn-row {
  display: flex;
  gap: 0.35rem;
  align-items: center;
  flex-wrap: wrap;
}

.px-protocol-pill {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  background: rgba(168, 85, 247, 0.18);
  color: #d8b4fe;
  flex-shrink: 0;
}

.ops-phone-proxy-row {
  align-items: flex-start;
}

.ops-phone-proxy-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  min-width: 0;
}

.ops-phone-proxy-admin-actions {
  display: flex;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.px-conn {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.82rem;
  word-break: break-all;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--ops-border, rgba(255, 255, 255, 0.1));
}

.px-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.45rem 0.75rem;
  font-size: 0.88rem;
}

.px-meta-grid strong {
  display: block;
  font-weight: 600;
}

.px-purposes-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
}

.px-tag {
  display: inline-block;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  background: rgba(59, 130, 246, 0.18);
  color: #93c5fd;
}

.px-linked {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  padding-top: 0.35rem;
  border-top: 1px solid var(--ops-border, rgba(255, 255, 255, 0.08));
}

.px-linked-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 0.5rem;
  align-items: center;
}

.px-linked-phone {
  font-weight: 600;
}

.px-notes {
  padding-top: 0.25rem;
}

.ops-phone-proxy-head {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  justify-content: space-between;
}

.ops-phone-proxy-head .ops-panel-h {
  margin: 0;
}

.ops-phone-proxy-conn {
  font-size: 0.84rem;
  word-break: break-all;
}

@media (max-width: 720px) {
  .px-toolbar.ops-accounts-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .px-search {
    max-width: none;
    width: 100%;
  }

  .px-toolbar-actions {
    margin-left: 0;
    justify-content: space-between;
    width: 100%;
  }

  .px-toolbar-actions .btn {
    flex: 1 1 auto;
  }
}

.px-phone-pick {
  margin-top: 0.15rem;
}

.px-phone-hint {
  margin: 0.35rem 0 0;
}
