/* 拼多多授权 / 应用管理：统一肖像比例卡片 */

.pdd-platform-hero,
.pdd-platform-filter,
.pdd-platform-list-panel {
  overflow: visible;
  border-radius: 8px;
}

.pdd-platform-hero .panel-header,
.pdd-platform-list-panel > .panel-header {
  min-height: 58px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.pdd-platform-filter {
  padding-top: 12px;
  padding-bottom: 12px;
}

.pdd-platform-card-grid {
  padding: 12px 14px 8px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 280px));
  align-items: stretch;
  justify-content: start;
  gap: 12px;
}

.pdd-platform-card {
  position: relative;
  min-width: 0;
  min-height: 390px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 9px;
  overflow: visible;
  border: 1px solid #e5e7eb;
  border-top: 3px solid #bfbfbf;
  border-radius: 8px;
  background: #ffffff;
  transition: border-color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.pdd-platform-card:hover {
  transform: translateY(-1px);
  border-color: #f0a7a1;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
}

.pdd-platform-card.is-active {
  border-top-color: #73d13d;
}

.pdd-platform-card.is-disabled {
  border-top-color: #bfbfbf;
}

.pdd-platform-card.is-expired,
.pdd-platform-card.is-error {
  border-top-color: #ff4d4f;
}

.pdd-auth-card {
  min-height: 430px;
}

.pdd-platform-card-top,
.pdd-platform-inline-action,
.pdd-platform-callback-row,
.pdd-platform-card-actions {
  display: flex;
  align-items: center;
}

.pdd-platform-card-top {
  min-height: 24px;
  justify-content: space-between;
  gap: 8px;
}

.pdd-platform-card-eyebrow {
  color: #8a8f98;
  font-size: 11px;
  font-weight: 700;
}

.pdd-platform-card-title {
  min-width: 0;
  min-height: 52px;
}

.pdd-platform-card-title h3 {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  color: #111827;
  font-size: 16px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.pdd-platform-card-title > span {
  margin-top: 4px;
  display: block;
  overflow: hidden;
  color: #667085;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdd-platform-card-id,
.pdd-platform-card-updated {
  overflow: hidden;
  color: #8a8f98;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdd-platform-card-id {
  padding: 5px 7px;
  border-radius: 5px;
  background: #f6f7f9;
  color: #667085;
}

.pdd-platform-card-section {
  min-width: 0;
  padding-top: 7px;
  display: grid;
  gap: 4px;
  border-top: 1px solid #f0f1f3;
}

.pdd-platform-card-section > strong,
.pdd-platform-inline-action > strong {
  min-width: 0;
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdd-platform-card-label {
  color: #98a0ad;
  font-size: 10px;
}

.pdd-platform-inline-action {
  min-width: 0;
  justify-content: space-between;
  gap: 6px;
}

.pdd-platform-inline-action .text-button {
  flex: 0 0 auto;
}

.pdd-platform-card-dates {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pdd-platform-card-dates > div {
  min-width: 0;
  min-height: 48px;
  padding: 6px 7px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #edf0f3;
  border-radius: 6px;
  background: #f8f9fb;
}

.pdd-platform-card-dates span {
  color: #98a0ad;
  font-size: 9px;
}

.pdd-platform-card-dates strong {
  overflow: hidden;
  color: #475467;
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdd-platform-card-alert,
.pdd-platform-card-note {
  min-height: 30px;
  padding: 6px 8px;
  overflow: hidden;
  border-radius: 5px;
  font-size: 10px;
  line-height: 1.5;
  text-overflow: ellipsis;
}

.pdd-platform-card-alert {
  color: #cf1322;
  background: #fff1f0;
}

.pdd-platform-card-note {
  color: #667085;
  background: #f7f8fa;
  white-space: nowrap;
}

.pdd-platform-card-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.pdd-platform-card-metrics > div {
  min-width: 0;
  min-height: 58px;
  padding: 8px;
  display: grid;
  align-content: center;
  gap: 3px;
  border: 1px solid #edf0f3;
  border-radius: 6px;
  background: #f8f9fb;
}

.pdd-platform-card-metrics strong {
  overflow: hidden;
  color: #111827;
  font-size: 14px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdd-platform-card-metrics span {
  color: #8a8f98;
  font-size: 10px;
}

.pdd-platform-card-metrics .is-success {
  border-color: #d9f7be;
  background: #f6ffed;
}

.pdd-platform-card-metrics .is-warning {
  border-color: #ffe58f;
  background: #fffbe6;
}

.pdd-platform-card-code {
  min-width: 0;
  overflow: hidden;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdd-platform-callback-row {
  min-width: 0;
  justify-content: space-between;
  gap: 6px;
}

.pdd-platform-callback-row > span {
  flex: 1 1 auto;
  color: #475467;
  font-size: 10px;
}

.pdd-platform-callback-row .text-button {
  flex: 0 0 auto;
}

.pdd-platform-card-actions {
  margin-top: auto;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid #f0f1f3;
}

.pdd-platform-card-actions .primary-button,
.pdd-platform-card-actions .secondary-button,
.pdd-platform-card-actions .text-button {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}

.pdd-app-card .pdd-platform-card-actions {
  display: grid;
  grid-template-columns: 1fr auto;
}

.pdd-app-card .pdd-platform-card-actions .primary-button {
  grid-column: 1 / -1;
  width: 100%;
}

.pdd-auth-card .pdd-platform-card-actions .text-button {
  flex: 1 1 auto;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #ffffff;
  text-decoration: none;
}

.pdd-auth-card .pdd-platform-card-actions .text-button:hover {
  background: #f6f7f9;
}

.pdd-platform-empty {
  margin: 14px;
}

@media (max-width: 820px) {
  .pdd-platform-hero .panel-header,
  .pdd-platform-list-panel > .panel-header {
    align-items: stretch;
    flex-direction: column;
  }

  .pdd-platform-hero .panel-header > .actions,
  .pdd-platform-list-panel > .panel-header > .actions {
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

@media (max-width: 560px) {
  .pdd-platform-card-grid {
    grid-template-columns: minmax(250px, 280px);
    justify-content: center;
  }
}
