.admin-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20000;
  background: rgba(0, 0, 0, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

/* 宽版弹窗：左右留白略减，让内容区更宽 */
.admin-modal-backdrop:has(.admin-modal-panel--wide) {
  padding: 12px;
}

.admin-modal-panel {
  width: 100%;
  max-width: 520px;
  max-height: min(90vh, 720px);
  background: #fff;
  border-radius: 14px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.2);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 项目编辑：表单更宽、更高，便于技术栈多选 */
.admin-modal-panel--wide {
  max-width: min(98vw, 1120px);
  max-height: min(94vh, 920px);
}

.admin-modal-panel--wide .admin-modal-header,
.admin-modal-panel--wide .admin-modal-footer {
  padding-left: 24px;
  padding-right: 24px;
}

.admin-modal-panel--wide .admin-modal-body {
  padding: 20px 32px;
}

.admin-modal-header {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid #eee;
}

.admin-modal-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 600;
  color: #5c3d42;
}

.admin-modal-close {
  border: none;
  background: #f0f0f0;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  color: #333;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}

.admin-modal-close:hover {
  background: #e0e0e0;
}

.admin-modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
  -webkit-overflow-scrolling: touch;
}

.admin-modal-footer {
  flex-shrink: 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 12px 16px;
  border-top: 1px solid #eee;
  background: #fafafa;
}

.admin-modal-footer button {
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 14px;
  cursor: pointer;
  border: none;
}

.admin-modal-footer button.secondary {
  background: #e8e8e8;
  color: #333;
}

.admin-modal-footer button.secondary:disabled,
.admin-modal-footer button.primary:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.admin-modal-footer button.primary {
  background: var(--accent);
  color: #fff;
}

.admin-field-hint {
  margin: -8px 0 10px;
  font-size: 12px;
  color: #666;
  line-height: 1.4;
}
