.power-attorney-tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}

.power-attorney-tabs button {
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: #64748b;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
}

.power-attorney-tabs button.active {
  background: #0b83d8;
}

.section-hint {
  margin: 4px 0 0;
  color: #64748b;
  font-size: 13px;
}

.hidden {
  display: none !important;
}

.suggest-field {
  position: relative;
  overflow: visible !important;
}

.suggest-box {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 4px);
  z-index: 99999;
  max-height: 280px;
  overflow-y: auto;
  background: #fff;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
  padding: 6px;
}

.suggest-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  border-radius: 8px;
  background: #fff;
  color: #111827;
  padding: 9px 10px;
  cursor: pointer;
  font-family: inherit;
}

.suggest-item:hover {
  background: #e7f1ff;
  color: #084298;
}

.suggest-item b {
  display: block;
  font-weight: 900;
  line-height: 1.25;
}

.suggest-item span {
  display: block;
  margin-top: 3px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.25;
}

.selected-person-preview {
  margin-top: 8px;
  border: 1px solid #dbeafe;
  background: #f0f7ff;
  border-radius: 10px;
  padding: 10px 12px;
  color: #1e3a5f;
  font-size: 13px;
  line-height: 1.45;
}

.selected-person-preview b {
  display: block;
  margin-bottom: 4px;
  color: #0b5f99;
}

.people-search-row {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 8px;
  margin-bottom: 12px;
}

.people-card-list {
  display: grid;
  gap: 12px;
}

.person-card {
  border: 1px solid #dce3eb;
  background: #fff;
  border-radius: 12px;
  padding: 12px;
}

.person-card-main {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  margin-bottom: 10px;
}

.person-card-main b {
  font-size: 16px;
}

.person-card-main span {
  font-weight: 900;
  color: #0b5f99;
  white-space: nowrap;
}

.person-card-grid {
  display: grid;
  grid-template-columns: 110px 110px 210px 1fr;
  gap: 10px;
  color: #334155;
  margin-bottom: 10px;
}

.person-address-cell {
  min-width: 0;
  word-break: break-word;
}

.field-label {
  color: #64748b;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 3px;
}

.small-text {
  color: #64748b;
  font-size: 12px;
  margin-top: 3px;
}

.person-note {
  border: 1px solid #eef2f7;
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px;
  color: #475569;
  margin-bottom: 10px;
  white-space: pre-line;
}

.person-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border-top: 1px solid #eef2f7;
  padding-top: 10px;
}

.people-pagination {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  margin-top: 14px;
}

.people-pagination button {
  min-width: 38px;
  border: 1px solid #b9d9f5 !important;
  border-radius: 8px !important;
  padding: 8px 10px !important;
  background: #e8f3ff !important;
  color: #0b5f99 !important;
  font-weight: 800 !important;
  cursor: pointer;
}

.people-pagination button.active {
  background: #0b83d8 !important;
  color: #fff !important;
}

.people-pagination button:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.power-attorney-page .authority-items-wrap {
  display: grid;
  gap: 10px;
}

.power-attorney-page .authority-item-row {
  display: grid;
  grid-template-columns: 42px 1fr auto;
  gap: 8px;
  align-items: start;
  border: 1px solid #dce3eb;
  background: #f8fafc;
  border-radius: 10px;
  padding: 10px;
  overflow: visible;
}

.power-attorney-page .authority-item-no {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #0b83d8;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
}

.power-attorney-page .authority-item-main {
  display: grid;
  gap: 6px;
}

.power-attorney-page .authority-template-select {
  display: none;
  width: 100%;
  border: 1px solid #ccd3dd;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: #111827;
  font-family: inherit;
}

.power-attorney-page .authority-item-row:hover .authority-template-select,
.power-attorney-page .authority-item-row:focus-within .authority-template-select {
  display: block;
}

.power-attorney-page .authority-item-input {
  min-height: 74px;
  resize: vertical;
}

@media (max-width: 900px) {
  .people-search-row,
  .person-card-grid {
    grid-template-columns: 1fr;
  }

  .person-card-main {
    flex-direction: column;
  }
}

@media (max-width: 700px) {
  .power-attorney-page .authority-item-row {
    grid-template-columns: 1fr;
  }

  .power-attorney-page .authority-item-no {
    width: 100%;
    border-radius: 8px;
  }
}
