/* PTP_TEAM_ACCESS_V1 */
.ptp-team-page {
  padding: 28px;
}

.ptp-team-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 18px;
}

.ptp-team-head h1 {
  margin: 0;
  color: #172033;
  font-size: 28px;
}

.ptp-team-head p {
  margin: 6px 0 0;
  color: #70809d;
}

.ptp-team-refresh {
  border: 0;
  border-radius: 12px;
  background: #2563eb;
  padding: 12px 17px;
  color: white;
  font-weight: 800;
  box-shadow: 0 9px 22px rgba(37, 99, 235, .20);
}

.ptp-team-refresh:disabled {
  cursor: wait;
  opacity: .65;
}

.ptp-team-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 15px;
  margin-bottom: 18px;
}

.ptp-team-stat {
  border: 1px solid #e2e8f0;
  border-radius: 17px;
  background: white;
  padding: 18px;
}

.ptp-team-stat span {
  display: block;
  color: #7c8aa4;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .7px;
  text-transform: uppercase;
}

.ptp-team-stat strong {
  display: block;
  margin-top: 8px;
  color: #172033;
  font-size: 28px;
}

.ptp-team-stat small {
  display: block;
  margin-top: 4px;
  color: #8190a8;
}

.ptp-team-panel {
  overflow: hidden;
  border: 1px solid #e2e8f0;
  border-radius: 17px;
  background: white;
}

.ptp-team-toolbar {
  display: grid;
  grid-template-columns: minmax(250px, 1fr) 190px 190px auto;
  gap: 11px;
  align-items: center;
  padding: 15px;
  border-bottom: 1px solid #edf1f7;
}

.ptp-team-search {
  display: flex;
  align-items: center;
  gap: 9px;
  border: 1px solid #dbe3ef;
  border-radius: 11px;
  padding: 0 12px;
}

.ptp-team-search input {
  width: 100%;
  min-height: 42px;
  border: 0;
  background: transparent;
  outline: none;
}

.ptp-team-toolbar select {
  min-height: 43px;
  border: 1px solid #dbe3ef;
  border-radius: 11px;
  background: white;
  padding: 9px 11px;
  outline: none;
}

.ptp-team-toolbar > span {
  color: #70809d;
  font-size: 12px;
  font-weight: 750;
  white-space: nowrap;
}

.ptp-team-table-wrap {
  overflow-x: auto;
}

.ptp-team-table {
  width: 100%;
  min-width: 900px;
  border-collapse: collapse;
}

.ptp-team-table th,
.ptp-team-table td {
  padding: 14px 16px;
  border-bottom: 1px solid #edf1f7;
  text-align: left;
  vertical-align: middle;
}

.ptp-team-table th {
  background: #f8fafc;
  color: #64748b;
  font-size: 11px;
  letter-spacing: .4px;
  text-transform: uppercase;
}

.ptp-team-table td {
  color: #334155;
  font-size: 13px;
}

.ptp-team-person {
  display: flex;
  align-items: center;
  gap: 11px;
}

.ptp-team-avatar {
  display: grid;
  width: 39px;
  height: 39px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: #eaf2ff;
  color: #2563eb;
  font-weight: 900;
}

.ptp-team-person strong,
.ptp-team-person small {
  display: block;
}

.ptp-team-person small {
  margin-top: 3px;
  color: #8190a8;
}

.ptp-team-badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 11px;
  font-weight: 850;
}

.ptp-team-badge.admin {
  background: #ede9fe;
  color: #6d28d9;
}

.ptp-team-badge.staff {
  background: #eaf2ff;
  color: #2563eb;
}

.ptp-team-badge.active {
  background: #ecfdf5;
  color: #047857;
}

.ptp-team-badge.inactive {
  background: #fef2f2;
  color: #b91c1c;
}

.ptp-team-id {
  max-width: 230px;
  overflow: hidden;
  color: #8190a8;
  font-family: monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ptp-team-edit {
  border: 1px solid #dbe3ef;
  border-radius: 9px;
  background: white;
  padding: 8px 12px;
  color: #172033;
  font-weight: 800;
}

.ptp-team-empty {
  padding: 40px !important;
  color: #8190a8 !important;
  text-align: center !important;
}

.ptp-team-security-note {
  margin-top: 17px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #eff6ff;
  padding: 14px 16px;
}

.ptp-team-security-note strong {
  color: #172033;
  font-size: 13px;
}

.ptp-team-security-note p {
  margin: 5px 0 0;
  color: #526783;
  font-size: 12px;
  line-height: 1.55;
}

.ptp-team-error,
.ptp-team-modal-error {
  border: 1px solid #fecaca;
  border-radius: 11px;
  background: #fff1f2;
  padding: 11px 13px;
  color: #b91c1c;
  font-size: 12px;
}

.ptp-team-error {
  margin-bottom: 16px;
}

.ptp-team-modal {
  position: fixed;
  z-index: 10000;
  inset: 0;
  display: grid;
  place-items: center;
  background: rgba(15, 23, 42, .58);
  padding: 18px;
}

.ptp-team-modal.hidden {
  display: none !important;
}

.ptp-team-modal-card {
  width: min(650px, 100%);
  overflow: hidden;
  border-radius: 18px;
  background: white;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .25);
}

.ptp-team-modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 21px;
  border-bottom: 1px solid #edf1f7;
}

.ptp-team-modal-head h2 {
  margin: 0;
  color: #172033;
  font-size: 20px;
}

.ptp-team-modal-head p {
  margin: 5px 0 0;
  color: #8190a8;
  font-size: 12px;
}

.ptp-team-modal-head button {
  border: 0;
  background: transparent;
  color: #64748b;
  font-size: 27px;
}

#ptpTeamForm {
  padding: 21px;
}

.ptp-team-form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}

.ptp-team-form-grid label > span {
  display: block;
  margin-bottom: 7px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.ptp-team-form-grid input,
.ptp-team-form-grid select {
  width: 100%;
  min-height: 43px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  background: white;
  padding: 9px 11px;
  outline: none;
}

.ptp-team-form-grid input:focus,
.ptp-team-form-grid select:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .10);
}

.ptp-team-form-grid input[readonly] {
  background: #f8fafc;
  color: #64748b;
}

.ptp-team-toggle-row {
  display: flex;
  align-items: center;
  min-height: 43px;
  gap: 9px;
  border: 1px solid #dbe3ef;
  border-radius: 10px;
  padding: 9px 11px;
}

.ptp-team-toggle-row input {
  width: 18px;
  min-height: auto;
  height: 18px;
}

.ptp-team-toggle-row strong {
  color: #334155;
  font-size: 12px;
}

.ptp-team-modal-error {
  margin-top: 15px;
}

.ptp-team-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 20px;
}

.ptp-team-cancel,
.ptp-team-save {
  border-radius: 10px;
  padding: 10px 15px;
  font-weight: 850;
}

.ptp-team-cancel {
  border: 1px solid #dbe3ef;
  background: white;
  color: #334155;
}

.ptp-team-save {
  border: 0;
  background: #2563eb;
  color: white;
}

.ptp-team-save:disabled {
  cursor: wait;
  opacity: .65;
}

@media (max-width: 1000px) {
  .ptp-team-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ptp-team-toolbar {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 650px) {
  .ptp-team-page {
    padding: 17px;
  }

  .ptp-team-head,
  .ptp-team-modal-actions {
    flex-direction: column;
  }

  .ptp-team-refresh,
  .ptp-team-cancel,
  .ptp-team-save {
    width: 100%;
  }

  .ptp-team-stats,
  .ptp-team-toolbar,
  .ptp-team-form-grid {
    grid-template-columns: 1fr;
  }
}